Remi Denis-Courmont wrote:
   Hello,

I am trying to port a project to CMake, but I couldn't find anyway to specify
C preprocessor defines on a per-target (or alternatively, per-source) basis.
The project is compiling the same source files multiple times with different
defines, resulting in different object code... But it seems like
ADD_DEFINITIONS won't support this case.

SET_TARGET_PROPERTIES(mytarget PROPERTIES COMPILE_FLAGS -DMY_TARGET_DEF)

-Brad
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to