[CMake] Multiple SET_SOURCE_FILES_PROPERTIES on one file

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu May 31 09:12:30 EDT 2007


On 5/31/07, Eric Noulard <eric.noulard at gmail.com> wrote:
> 2007/5/31, Mathieu Malaterre <mathieu.malaterre at gmail.com>:
> Did you try to put the property on the target (and not the source file) ?

No

> ADD_EXECUTABLE(foo_v1 foo.c)
> SET_TARGET_PROPERTIES(foo_v1
>                               PROPERTIES COMPILE_FLAGS "-DVERSION1")
>
> ADD_EXECUTABLE(foo_v2 foo.c)
> SET_TARGET_PROPERTIES(foo_v2
>                               PROPERTIES COMPILE_FLAGS "-DVERSION2")

sweet !!! That works :)

Thanks
-Mathieu


More information about the CMake mailing list