On 09/21/2014 02:48 PM, Adam Strzelecki wrote: > FYI unfortunately this solution does not work for CMakeFiles.txt > with cmake_minimum_required(VERSION 2.6.1) or earlier because of > CMP0011 that does implicit PUSH/POP does not work there. So > setting cmake_policy(SET CMP0054 NEW) is internal modules will > cause this policy to be not popped and carried out of the module. > > I do not have any idea how to solve this in some elegant fashion
This is one reason I just fixed the warnings with the "super ugly" approach on some of the other modules. It is a cost we pay upstream to support older clients, but the policy will still allow cleaner code in applications. Or, one could add the explicit PUSH/POP in modules, e.g. cmake_policy(PUSH) cmake_policy(SET CMP0054 NEW) ... module code ... cmake_policy(POP) -Brad -- 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-developers