Re: [CMake] EXECUTE_PROCESS - I can't copy files on Windows

2007-03-21 Thread Vitor Vasconcelos Araujo Silva
Hello Filipe, It was really not necessary. I was getting an errors because my teste.txt file WAS moved. (My mistake, of course). I put the code inside a FOREACH loop and it worked fine. Thanks a lot, Vitor Hi! You need to specify the full path of teste.txt

RE: [CMake] LINK_LIBRARIES() does not respect SUFFIX/PREFIX

2007-03-21 Thread Kishore, Jonnalagadda (IE10)
> > > > My setup: > > > > Project/CMakeLists.txt: > > > > ADD_SUBDIRECTORY(dir) > > LINK_LIBRARIES(mylib) > > > > ADD_EXECUTABLE(myexec main.c) > > > > Project/dir/CMakeLists.txt: > > > > ADD_LIBRARY(mylib lib.c) > > > > SET_TARGET_PROPERTIES(mylib > > PROPERTI

RE: [CMake] Set prefix/suffix globally?

2007-03-21 Thread Kishore, Jonnalagadda (IE10)
> Filipe Sousa wrote: > > Kishore, Jonnalagadda (IE10) wrote: > >> Is it possible to set the prefix and suffix to "lib" and ".a" for all > >> libraries and ".elf" suffix to all executables? > > > > CMAKE_STATIC_LIBRARY_PREFIX > > CMAKE_STATIC_LIBRARY_SUFFIX > > CMAKE_SHARED_LIBRARY_PREFIX > > CMAK

Re: [CMake] Linking Behavior of Static Libraries on Windows

2007-03-21 Thread Ben Ratzlaff
Here is how I got around what you describe. My project sounds pretty similar in how it is set up when building the exe: IF (PLATFORM MATCHES "win32") IF (CMAKE_GENERATOR MATCHES "Visual Studio 8 2005") SET_TARGET_PROPERTIES (${project_exe} PROPERTIES LINK_FLAGS "$(TargetDir)/

Re: [CMake] Linking Behavior of Static Libraries on Windows

2007-03-21 Thread bpwlist
Part of my objection is that I want to limit how many in which libraries I have to distribute. My project looks some thing like this: main_src/ main_exe (depends on main_shared_library) main_shared_library (depends on my_static_library_facade) my_static_library_facade

Re: [CMake] Linking Behavior of Static Libraries on Windows

2007-03-21 Thread Filipe Sousa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: > Hi All, > > I have a static library that I'm trying to compile and link under windows. > It depends on other static libraries. It appears that the default behavior > of cmake is to defer the linking of the dependencies u

[CMake] Linking Behavior of Static Libraries on Windows

2007-03-21 Thread bpwlist
Hi All, I have a static library that I'm trying to compile and link under windows. It depends on other static libraries. It appears that the default behavior of cmake is to defer the linking of the dependencies until they are needed by a dll or executable. There is no way under cmake that I

Re: [CMake] Set prefix/suffix globally?

2007-03-21 Thread Filipe Sousa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Filipe Sousa wrote: > Kishore, Jonnalagadda (IE10) wrote: >> Is it possible to set the prefix and suffix to "lib" and ".a" for all >> libraries and ".elf" suffix to all executables? > > CMAKE_STATIC_LIBRARY_PREFIX > CMAKE_STATIC_LIBRARY_SUFFIX > CMAKE

Re: [CMake] Set prefix/suffix globally?

2007-03-21 Thread Filipe Sousa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kishore, Jonnalagadda (IE10) wrote: > Is it possible to set the prefix and suffix to "lib" and ".a" for all > libraries and ".elf" suffix to all executables? CMAKE_STATIC_LIBRARY_PREFIX CMAKE_STATIC_LIBRARY_SUFFIX CMAKE_SHARED_LIBRARY_PREFIX CMAKE_SHA

Re: [CMake] EXECUTE_PROCESS - I can't copy files on Windows

2007-03-21 Thread Filipe Sousa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! You need to specify the full path of teste.txt EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/teste.txt ${PROJECT_BINARY_DIR}/mytest RESULT_VARIABLE resultado ERROR_VARIABLE erro) This will copy teste.txt

Re: [CMake] EXECUTE_PROCESS - I can't copy files on Windows

2007-03-21 Thread Ben Ratzlaff
Wouldn't it be better to have the compilation destination be where the tests expect? ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Compile .c as c++ - VS2005

2007-03-21 Thread Bill Hoffman
Filipe Sousa wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ben Ratzlaff wrote: I have found that if I rename my .c files to .C then cmake does not emit the XML in the .vsproj to change the build mode. .C is a c++ file name extension. set_source_file_properties(foo.c PROPER

Re: [CMake] EXECUTE_PROCESS - I can't copy files on Windows

2007-03-21 Thread Vitor Vasconcelos Araujo Silva
Shame on me, reply my own post, but I fixed the small error, but I'm still no able to copy files: The code follows: EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy teste.txt mytest RESULT_VARIABLE resultado ERROR_VARIABLE erro ) MESSAGE ("res

Re: [CMake] EXECUTE_PROCESS - I can't copy files on Windows

2007-03-21 Thread Vitor Vasconcelos Araujo Silva
You can convert to native paths with FILE(TO_NATIVE_PATH path result) Thanks Filipe. Much more "cleaner" way. I was using only the Mastering CMake book, but I'm observing a lot of improvements from 2.2 to 2.4 version. Now I'll always look at CMake help. try ${CMAKE_COMMAND} -

RE: [CMake] cmake skips assembly files

2007-03-21 Thread Kishore, Jonnalagadda (IE10)
> > > Assembly files explicitly given as source files for a target are > > > completely ignored. From google searches, it seems to be a known > issue > > > and the solution lies with adding custom commands. > > > > > > I am not familiar with adding custom commands. And thus have > assembly > > > fi

Re: [CMake] CMAKE_INCLUDE_CURRENT_DIR?

2007-03-21 Thread Pascal Fleury
On Tuesday 20 March 2007 21:45:15 Brandon J. Van Every wrote: > Feel free to improve the docs if you have better wordsmithing. It is a > wiki, after all. I haven't had time + brain cells, and I'm no more > responsible for the maintenance of the docs than you or anyone else. I > just try to impro

Re: [CMake] Compile .c as c++ - VS2005

2007-03-21 Thread John Biddiscombe
Is there not a more portable way of doing it. I have some *.c files that I need to compile as C++, but it's annoying to have to IF(WIN32 SET_SOURCE_FILE_PROPERTIES( /TP) IF (GCC) SET_SOURCE_FILE_PROPERTIES( ... (can't remember the switches OTOMH) etc. Is there not another LANGUAGE_CXX or s