[CMake] COMPILE_DEFINITIONS_Debug doesn't work in Windows

Vyacheslav Karamov ubuntulist at yandex.ru
Tue Apr 17 03:42:48 EDT 2012


Hi All!

I need to add some preprocessor definitions to my target.
Here is the code:

if (WIN32)
     set (COMPILE_DEFINITIONS_Debug
     _DEBUG
     USE_MP3READER2
     _EXPORTS
     _USRDLL
     _CRT_SECURE_NO_WARNINGS
     _USE_32BIT_TIME_T
     )

     set (COMPILE_DEFINITIONS_Release
     NDEBUG
     USE_MP3READER2
     _EXPORTS
     _USRDLL
     _CRT_SECURE_NO_WARNINGS
     _USE_32BIT_TIME_T
     )
else(WIN32)

set (COMPILE_DEFINITIONS_Debug
_DEBUG
USE_MP3READER2
)

set (COMPILE_DEFINITIONS_Release
NDEBUG
USE_MP3READER2
)
endif(WIN32)


But when I open Debug configuration of my VS2008 project I see

WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\"

Does someone happen to know how to fix it?


-----
WBR,
Vyacheslav.



More information about the CMake mailing list