Sagnes, Frederic wrote:
Hello,
I'm using the STLport library on several targets on my project, and need to
define the _STLP_DEBUG flag on the debug configuration of each target. I looked
at :
SET_TARGET_PROPERTIES ( PROPERTIES COMPILE_FLAGS -D_STLP_DEBUG )
... but it doesn't seem to be able to specify a switch for a specific
configuration, neither can :
ADD_DEFINITIONS ( -D_STLP_DEBUG )
I hope there is a function that can do that, or a foreach trick.
Set the CMAKE_CXX_FLAGS_DEBUG variable:
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_STLP_DEBUG")
or just put
#if !defined(NDEBUG) && !defined(_STLP_DEBUG)
# define _STLP_DEBUG
#endif
in a top-level header that is included before all STL headers.
-Brad
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake