I'm assuming you did not start with a fresh tree on your out-of-tree
build attempt. Trying to build in-tree 'polluted' the tree, and the
out-of-tree build still picks up the old CMakeCache, thus why you are
getting this error.

I just tried with a _fresh_ tree and it works.

Alex

[mrnuke@nukelap Sources]$ <git://gitorious.org/libusbtmc/libusbtmc.git>
bash: syntax error near unexpected token `newline'
[mrnuke@nukelap Sources]$ git clone
git://gitorious.org/libusbtmc/libusbtmc.git
Cloning into 'libusbtmc'...
remote: Counting objects: 984, done.
remote: Compressing objects: 100% (493/493), done.
remote: Total 984 (delta 596), reused 796 (delta 486)
Receiving objects: 100% (984/984), 171.00 KiB | 34 KiB/s, done.
Resolving deltas: 100% (596/596), done.
[mrnuke@nukelap Sources]$  cd /home/mrnuke/Sources/libusbtmc
[mrnuke@nukelap libusbtmc]$ mkdir build
[mrnuke@nukelap libusbtmc]$ cd build/
[mrnuke@nukelap build]$ cmake ..
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/lib64/ccache/gcc
-- Check for working C compiler: /usr/lib64/ccache/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.25")
-- PkgConfig was found.
-- checking for module 'libusb-1.0'
--   found libusb-1.0, version 1.0.9
-- libusb was found: usb-1.0
-- Found git: /usr/bin/git
-- Building usbtmc as a shared library.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mrnuke/Sources/libusbtmc/build
[mrnuke@nukelap build]$ make
Scanning dependencies of target usbtmc
[ 50%] Building C object src/CMakeFiles/usbtmc.dir/core.c.o
Linking C shared library libusbtmc.so
[ 50%] Built target usbtmc
Scanning dependencies of target tests
[100%] Building C object tests/CMakeFiles/tests.dir/main.c.o
Linking C executable tests
[100%] Built target tests
[mrnuke@nukelap build]$

On 11/08/2012 03:35 PM, Karl Cunningham wrote:
> Lisandro Damián Nicanor Pérez Meyer <perezmeyer@...> writes:
>> Hi everyone! I've started to write a lib to interface USB GPIB devices. So 
> far 
>> it's **very** simple, but it starts to work 
>>
>> If anyone has a usbtmc device, it can check out the code from
>>
>> <git://gitorious.org/libusbtmc/libusbtmc.git>
>>
>> All you need is CMake and libusb[x]. It ships with a simple test that will 
>> check for usbtmc devices and tried to open the first one it gets, and sends 
>> a 
>> GPIB message (implemented byte-wise, as it's a sub-class of TMC).
>>
>> So, if anyone has a usbtmc device, feel free to check the code.
>>
>> **WARNING**: I plan to change the current API. I started the project with 
>> the 
>> idea of doing the same as the Linux's usbtmc module. It turned out that the 
>> module implemented mostly the usbtmc usb488 specs, not just usbtmc.
>>
>> So I implemented read and write as the module does, but that's more gpib-
>> isish. I plan to change that soon.
> 
> I'm also happy to see alternate development to the kernel usbtmc. I am 
> developing a USBTMC instrument and want to use Linux for product testing.
> 
> I cloned the git repo, but I have not gotten it to build using CMake. I ran 
> cmake from the top level directory but it complained about needing to do an 
> out-
> of-source build. I understand why, and have created a directory for the 
> object 
> code, but can't get cmake to use it. My experience with cmake is very limited.
> 
> I have done this:
> ~/libusbtmc$ mkdir build
> ~/libusbtmc$ cd build
> ~/libusbtmc/build$ cmake ..
> This obviously doesn't work, cmake still complains about requiring an out-of-
> source build.
> 
> Could someone tell me what I'm doing wrong?
> 
> Thanks
> Karl
> 
> 
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_nov
> _______________________________________________
> sigrok-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sigrok-devel
> 


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to