On 17.07.2015 15:08, Xi Yang wrote:
I'm trying to use config-specific definitions, but it seems doesn't work in VS2013.

This is the CMakeLists.txt:

cmake_minimum_required(VERSION 3.0)

set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_DEBUG
    FOO
)

set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_RELEASE
    BAR
)

When requiring CMake >= 3.0 those properties are ignored due to policy CMP0043:
    http://www.cmake.org/cmake/help/v3.0/policy/CMP0043.html

The documentation for the policy explains both reasoning for removal of these properties and what new code should do instead.

Nils
-- 

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://public.kitware.com/mailman/listinfo/cmake

Reply via email to