Re: [CMake] CMP0026 - Disallow use of the LOCATION target property
On Tuesday, February 24, 2015 20:14:23 Stephen Kelly wrote: Jifeng ZHANG wrote: Any idea when CMake 4.0 is planned to release? So we can get a general idea when the old behavior will stop working. What will you do when it is released and the LOCATION property does stop working for build targets? Whatever it is, any reason not to do it now? Always a good reason not to do it now while it still works is that by not doing it now the saved time can be used to work on other things which really need to be done now, maybe on a deadline. Once it's not working anymore it really needs to be done, and then it will be done. Yes, this postpones a problem into the future, but that's not always a bad thing. Alex -- 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
Re: [CMake] CMP0026 - Disallow use of the LOCATION target property
Thank you Steve and NoRulez. We actually make some manipulations on the string (TEST_PATH) that returned from get_target_property, before we pass it to add_test. So if we directly pass the generator expression, it won't work. We need to change this part obviously. Any idea when CMake 4.0 is planned to release? So we can get a general idea when the old behavior will stop working. Regards, Jifeng -- 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
Re: [CMake] CMP0026 - Disallow use of the LOCATION target property
Jifeng ZHANG wrote: Any idea when CMake 4.0 is planned to release? So we can get a general idea when the old behavior will stop working. What will you do when it is released and the LOCATION property does stop working for build targets? Whatever it is, any reason not to do it now? Thanks, Steve. -- 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
Re: [CMake] CMP0026 - Disallow use of the LOCATION target property
Hi, We had that problem too. Look at the great example from Stephen to my question. His example was great and helped us a lot. Best Regards Am 06.02.2015 um 19:18 schrieb Stephen Kelly steve...@gmail.com: Jifeng ZHANG wrote: Hi, I have a question of policy CMP0026. Our project currently is on CMake 2 and we are planning to move to CMake 3. Lot's of questions on that lately. Someone opened the floodgates it seems :). 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. So my question is, will the support of this kind of usage be dropped in the future releases? Yes. That is the purpose of the policy. Attempting to read the LOCATION will eventually be an error. That is not going to happen before CMake 4.0 though. 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: set (TEST_PATH $TARGET_FILE:${TESTS_PROJECT}) This won't work. You need to use the generator expression instead of a cmake variable. You use the generator expression in place of ${TEST_PATH} in add_custom_command or wherever you use it. Thanks, Steve. -- 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 -- 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
[CMake] CMP0026 - Disallow use of the LOCATION target property
Hi, 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: get_target_property (TEST_PATH ${TESTS_PROJECT} LOCATION_${CMAKE_BUILD_TYPE}) 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: set (TEST_PATH $TARGET_FILE:${TESTS_PROJECT}) But if I want to get LOCATION_${CMAKE_BUILD_TYPE}, how can I do it? Thanks. -- Vänliga hälsningar/Best regards, Jifeng Zhang -- 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
Re: [CMake] CMP0026 - Disallow use of the LOCATION target property
Jifeng ZHANG wrote: Hi, I have a question of policy CMP0026. Our project currently is on CMake 2 and we are planning to move to CMake 3. Lot's of questions on that lately. Someone opened the floodgates it seems :). 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. So my question is, will the support of this kind of usage be dropped in the future releases? Yes. That is the purpose of the policy. Attempting to read the LOCATION will eventually be an error. That is not going to happen before CMake 4.0 though. 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: set (TEST_PATH $TARGET_FILE:${TESTS_PROJECT}) This won't work. You need to use the generator expression instead of a cmake variable. You use the generator expression in place of ${TEST_PATH} in add_custom_command or wherever you use it. Thanks, Steve. -- 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