[CMake] Multiple SET_SOURCE_FILES_PROPERTIES on one file
Mathieu Malaterre
mathieu.malaterre at gmail.com
Thu May 31 05:37:38 EDT 2007
Hello,
I'd like to be able to do something like this in cmake (*):
...
SET_SOURCE_FILES_PROPERTIES(foo.c COMPILE_FLAGS -DVERSION1 )
ADD_EXECUTABLE(foo_v1 foo.c)
SET_SOURCE_FILES_PROPERTIES(foo.c COMPILE_FLAGS -DVERSION2 )
ADD_EXECUTABLE(foo_v2 foo.c)
...
Right now -DVERSION2 is the value used in both case, whereas I would
like to use one define for one target, and the other define for the
other target.
Is there a way to achieve this in CMake ?
Thanks,
Mathieu
(*)
http://gdcm.svn.sourceforge.net/viewvc/gdcm/Sandbox/CMakeBug/3/CMakeLists.txt?view=markup
More information about the CMake
mailing list