Am 2014-02-28 20:28, schrieb Robert Maynard:
* The "COMPILE_DEFINITIONS_<CONFIG>" directory properties and the
  "COMPILE_DEFINITIONS_<CONFIG>" target properties have been
  deprecated.  Instead set the corresponding "COMPILE_DEFINITIONS"
  directory property or "COMPILE_DEFINITIONS" target property and use
  "generator expressions" like "$<CONFIG:...>" to specify per-
  configuration definitions. See policy "CMP0043".

Some notes about this policy:
1. It warns for targets where a something like this was done:
set_property ( DIRECTORY . APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TEST_ON )
   -> Maybe warn just once for the direct appearance of this?

2. The CMP0043 descriptions only mentions target specific solutions.

3. I never liked the set_property ( DIRECTORY... ) solution because there is also and add_definitions() command. In the description of add_definitions(), it is
   mentioned:
"Arguments to add_definitions may use “generator expressions” with the syntax “$<...>”." However, I tried and this results in broken MSVC10 project files as those then contain: <AdditionalOptions> ""$"<"$"<CONFIG:Debug>:-DTEST_ON>" %(AdditionalOptions)</AdditionalOptions>

Regards,

HS


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to