[CMake] Bug in TARGET_LINK_LIBRARIES

2006-02-10 Thread Filipe Sousa
with -l TARGET_LINK_LIBRARIES(math -lm -lz) Linking C executable math /usr/local/bin/cmake -E remove -f math /usr/bin/gcc -fPIC "CMakeFiles/math.dir/math.o" -o math -rdynamic - -lm -lz cmake version 2.3-20060210 - -- Filipe Sousa -BEGIN PGP SIGNATU

Re: [CMake] Bug in TARGET_LINK_LIBRARIES

2006-02-10 Thread Alexander Neundorf
> Von: Filipe Sousa <[EMAIL PROTECTED]> > > Hi > > PROJECT(math) > ADD_EXECUTABLE(math math.c) > TARGET_LINK_LIBRARIES(math m z) > > Linking C executable math > /usr/local/bin/cmake -E remove -f math > /usr/bin/gcc -fPIC "CMakeFiles/math.dir/math.o" -o math -rdynamic > > TARGET

Re: [CMake] Bug in TARGET_LINK_LIBRARIES

2006-02-10 Thread Filipe Sousa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alexander Neundorf wrote: >> Von: Filipe Sousa <[EMAIL PROTECTED]> >> >> Hi >> >> PROJECT(math) >> ADD_EXECUTABLE(math math.c) >> TARGET_LINK_LIBRARIES(math m z) >> >> Linking C executable math >> /usr/local/bin/cmake -E remove -f math >> /u

Re: [CMake] Bug in TARGET_LINK_LIBRARIES

2006-02-10 Thread Brad King
Filipe Sousa wrote: pos = lib.find_last_not_of(" \t\r\n"); if(pos != lib.npos) { lib = lib.substr(0, pos); //** this code always eats the fist char ** } Actually it always eats the last character but thanks for tracking it down. We've fixed it. The fix also

Re: [CMake] EXEC_PROGRAM vs EXECUTE_PROCESS

2006-02-10 Thread Brad King
Filipe Sousa wrote: Now that cmake has EXECUTE_PROCESS command, should we use this instead of EXEC_PROGRAM? If you want. It is much more powerful. I'll add this to the documentation. I notice that both commands captures output in a different way: [snip] EXECUTE_PROCESS does not remove the

[CMake] how to use DEFINED with ENV

2006-02-10 Thread Xavier Delannoy
my CMakeLists.txt need an environement variable. I try this, with no success. /tmp> cat CMakeLists.txt IF(DEFINED ENV{TEST}) MESSAGE("test is defined") ELSE(DEFINED ENV{TEST}) MESSAGE("test is not defined") ENDIF(DEFINED ENV{TEST}) /tmp>env | grep TEST TEST=toto /tmp cmake . te

Re: [CMake] how to use DEFINED with ENV

2006-02-10 Thread Filipe Sousa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xavier Delannoy wrote: > my CMakeLists.txt need an environement variable. > > I try this, with no success. > /tmp> cat CMakeLists.txt > IF(DEFINED ENV{TEST}) > MESSAGE("test is defined") > ELSE(DEFINED ENV{TEST}) > MESSAGE("test is n

RE: [CMake] ADD_CUSTOM_COMMAND and unix makefile generator

2006-02-10 Thread Ian . Appru
The solution use suggested does not quite work since the java compile kicks off before swig has had a chance to generate the java files. However I did come up with a working soln. The key is to tie the java compile target to a fake cxx file - see below SET(DUMMY_CXX_FILE "${BUILD_DIR}/d

Re: [CMake] padding link arguments to the linker

2006-02-10 Thread Tanner Lovelace
On 2/8/06, Mike Jackson <[EMAIL PROTECTED]> wrote: > Yes.. I have used that tool on some other libraries. The problem is > that the path that is stored in the library must be the same length > or LONGER than the path you want to change it to. If you link with "-headerpad_max_install_names" it will

Re: [CMake] Re: [vtkusers] Compilation Problem | WinXP, MSys, MinGW | undefined reference to `vtkDataArrayTemplate::WritePointer(int, int)'

2006-02-10 Thread Brad King
Martin Baumann wrote: I use the MinGW-version available to download. It comes with gcc 3.4.2. Hmmm... I had similar problems with other Utilities, just as you said. With your advice I could make it! Now there are errors linking 'Filtering': Linking CXX shared library ../bin/libvtkFiltering.d

Re: [CMake] Cmake configuration types and install targets

2006-02-10 Thread Brad King
Sylvain PRAT wrote: - how do you force configuration types in a CMakeLists.txt file to debug and release only? I seem to recall that this is not possible. Right? IF(CMAKE_CONFIGURATION_TYPES) SET(CMAKE_CONFIGURATION_TYPES Debug Release) ENDIF(CMAKE_CONFIGURATION_TYPES) - or how to avoid the

Re: [CMake] how to use DEFINED with ENV

2006-02-10 Thread Brad King
Xavier Delannoy wrote: my CMakeLists.txt need an environement variable. I try this, with no success. /tmp> cat CMakeLists.txt IF(DEFINED ENV{TEST}) MESSAGE("test is defined") ELSE(DEFINED ENV{TEST}) MESSAGE("test is not defined") ENDIF(DEFINED ENV{TEST}) I've implemented sup

Re: [CMake] ctest return values

2006-02-10 Thread Brad King
Wheeler, Frederick W (GE, Research) wrote: The old tclsh Dart had the following return values. Does ctest use the same values? I don't see anything about ctest return values on the man page or the cmake wiki. # Dart status for continuous builds: # 0: source changed, submitted ok # 1:

[CMake] SWIG interface file location

2006-02-10 Thread James Bigler
So I'm using SWIG to generate an interface file to python. Can I get the interface file (myfile.py) to be built in the library path? I need two things to run the interface. The myfile.py file and the _myfile.so library with all the c code. myfile.py gets placed in a subdirectory with myfileP

RE: [CMake] How to source a shell script from CMAKE

2006-02-10 Thread Linton, Tom
Thanks for the reply, Filipe but this isn't quite what I'm asking. Yes, I know that I can change the path to the compiler either from the command line or from within CMAKE. But what I want to do is to source a file that sets up various paths and environment variables in addition to the compiler p

Re: [CMake] How to source a shell script from CMAKE

2006-02-10 Thread David Cole
I'm not 100% sure, but I think the best you can do is write a wrapper shell script that first sources the shell script you're interested in and then calls cmake... HTH, David Linton, Tom wrote: Thanks for the reply, Filipe but this isn't quite what I'm asking. Yes, I know that I can change t

Re: [CMake] SWIG interface file location

2006-02-10 Thread Brad King
James Bigler wrote: So I'm using SWIG to generate an interface file to python. Can I get the interface file (myfile.py) to be built in the library path? I need two things to run the interface. The myfile.py file and the _myfile.so library with all the c code. myfile.py gets placed in a subd

Re: [CMake] How to source a shell script from CMAKE

2006-02-10 Thread Brad King
Linton, Tom wrote: But what I want to do is to source a file that sets up various paths and environment variables in addition to the compiler paths. Yes, I could manually do this within CMakeLists.txt but I'd rather source the actual file that is installed in the compiler distribution tree, to

Re: [CMake] SWIG interface file location

2006-02-10 Thread Clinton Stimpson
Date: Fri, 10 Feb 2006 14:53:45 -0700 From: James Bigler <[EMAIL PROTECTED]> Subject: [CMake] SWIG interface file location To: cmake@cmake.org So I'm using SWIG to generate an interface file to python. Can I get the interface file (myfile.py) to be built in the library path? I need two things

Re: [CMake] SWIG interface file location

2006-02-10 Thread Mathieu Malaterre
Brad King wrote: James Bigler wrote: So I'm using SWIG to generate an interface file to python. Can I get the interface file (myfile.py) to be built in the library path? I need two things to run the interface. The myfile.py file and the _myfile.so library with all the c code. myfile.py get