> I have problems with ADD_DEFINITIONS : I have two target in my
> CMakeLists which I'd like to have different -D flags. If I add
> ADD_DEFINITIONS, it seems like both targets are affected. How coul I
do
> such thing ?

You have two options.

1) Set target specific definitions using the command
SET_TARGET_PROPERTIES
2) Use the ADD_DEFINITIONS before the first target is declared. After
declaring the target, do a REMOVE_DEFINITIONS passing the same arguments
as passed previously with ADD_DEFINITIONS. Then again ADD_DEFINITIONS
needed for the next target and so on...

The first option is in IMHO a better option in most cases.

Warm regards,
Kishore
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to