I have a question of policy CMP0026. Our project currently is on CMake
2 and we are planning to move to CMake 3.

When we run CMake3.1.1, we get get a few warnings due to the policy
CMP0026, "Disallow use of the LOCATION target property". Even though
with those warnings, our cmake scripts still work fine and we are
getting the property correctly.

One example is like this:

So my question is, will the support of this kind of usage be dropped
in the future releases? I understand the LOCATION property is not
fully determined until geenrate-time, however, since it works in our
case, can we rely on this behavior or we should consider it will
change in the coming 3.x releases?

If we migrate away from get_target_property, "$<TARGET_FILE> generator
expression" is suggested from CMake3.1.1's documentation. So to get
the LOCATION of ${TEST_PROJECT}, I can use:

But if I want to get LOCATION_${CMAKE_BUILD_TYPE}, how can I do it?

Vänliga hälsningar/Best regards,
Jifeng Zhang

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 

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 

Follow this link to subscribe/unsubscribe:

Reply via email to