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})

REMOVE_DEFINITIONS(-DUSE_TRACER)
ADD_LIBRARY(PlatformLib_no_tracing STATIC ${SOURCES})

ADD_DEFINITIONS(-DUSE_TRACER)

With verbose Makefiles I can see that USE_TRACER ist defined for both tragets.


kind regards
Andreas
_______________________________________________
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

Reply via email to