Re: [CMake] How to get ADD_DEFINITIONS variable?

2009-11-17 Thread Marcel Loose
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


[CMake] How to get ADD_DEFINITIONS variable?

2009-11-17 Thread Sören Freudiger
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

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
___
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