Hi SirAnn,

COMPILE_DEFINITIONS is a directory property, not a variable.
You can retrieve that value using get_directory_property(). For example:

  get_directory_property(defs COMPILE_DEFINITIONS)
  message(STATUS "Compile definitions: ${defs}")

Note that the value of COMPILE_DEFINITIONS is scope dependent, as each
add_subdirectory() creates a new scope.

Hope this helps,
Marcel Loose.

On Tue, 2009-11-17 at 10:40 +0100, "Sören Freudiger" wrote:
> Hi @all
> In our project we are several times adding preprocessor defines via 
> ADD_DEFINITIONS.
> Now I need to get these defines to add them for a ADD_CUSTOM_COMMAND (pre 
> build via swig ).
> 
> The documentations says that these defines are stored in 
>       COMPILE_DEFINITIONS
> but this variable is empty!!!
> 
> Is there any way to obtain the preprocessor defines?
> 
> Best,
> SirAnn
> 

_______________________________________________
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