[CMake] ADD_DEFINITION for just one executable, one specific config

Stefanos Carlström stefanos.carlstrom at gmail.com
Thu Oct 26 02:58:40 EDT 2006


How do I do to add a definition for just one of the executables in a
CMakeLists.txt-file and
only for one of its configs?

I want to define DEBUG for foo.exe but not for bar.exe, and I want DEBUG
only to be set for
the Debug configuration of that executable.

I use Visual Studio 2005 and my CMakeLists.txt looks essentially like this:

Project(Foobar C CXX)

add_executable(foo foo.c)
add_executable(bar bar.c)

Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20061026/f075aefe/attachment.html


More information about the CMake mailing list