2009/2/20 Andreas Pokorny <andreas.poko...@gmail.com>: > Hi, > We have a platfrom abstraction layer which uses a trace system. But > one of the trace backends also uses the platform abstraction for > network communication. So we want to build the required platform libs > twice with and without tracing. Now I thought I can do the following > with cmake: > > PROJECT(PaltformLib) > > FILE(GLOB SOURCES .....) > > ADD_DEFINITIONS(-DUSE_TRACER) > ADD_LIBRARY(PlatformLib STATIC ${SOURCES})
May be it would be easier to use the DEFINE_SYMBOL property on the library target? SET_TARGET_PROPERTIES(PlatformLib PROPERTIES DEFINE_SYMBOL USE_TRACER) Then you shouldn't have to ADD_DEFINITIONS and REMOVE_DEFINITIONS? -- Erk _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake