Hi, I need to compile the code twice. Once with -DA and once with -DB My code look like this: add_definitions(-DA) add_library(${mylib_A} SHARED ${myfiles}) remove_definitions(-DA)
add_definitions(-DB) add_library(${lib_B} SHARED ${myfiles}) remove_definitions(-DB) What cmake does is to define A and then remove it, so in compile time, there is now definition of A or B. How do I tell cmake that the remove needs to be in compile time? Regards, Kfir
_______________________________________________ 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