[CMake] CMP0054 and CMake Modules

Thomas Nilsson thomas at junovagen.se
Mon Sep 21 03:39:26 EDT 2015


Sorry, this turned out kind of brief, it was posted in context in Nabble.

I'm seeing this on Cygwin.

/Thomas

> thoni56 <mailto:thomas at junovagen.se>
> 21 september 2015 09:37
> I can't find a bug report on this. Is there one?
>
> Surely Cmake distributed modules should not generate this type of 
> warnings.
> Or am I misinterpreting the messages?
>
> I'm encountering numerous such problems/warnings in Cmake distributed
> modules:
>
> CMake Warning (dev) at
> /usr/share/cmake-3.3.1/Modules/CMakeParseImplicitLinkInfo.cmake:58 (if):
> Policy CMP0054 is not set: Only interpret if() arguments as variables or
> keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
> details. Use the cmake_policy command to set the policy and suppress this
> warning.
>
> Quoted variables like "" will no longer be dereferenced when the 
> policy is
> set to NEW. Since the policy is not set the OLD behavior will be used.
> Call Stack (most recent call first):
> /usr/share/cmake-3.3.1/Modules/CMakeDetermineCompilerABI.cmake:80
> (CMAKE_PARSE_IMPLICIT_LINK_INFO)
> /usr/share/cmake-3.3.1/Modules/CMakeTestCXXCompiler.cmake:68
> (CMAKE_DETERMINE_COMPILER_ABI)
> src/CMakeLists.txt:2 (project)
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at
> /usr/share/cmake-3.3.1/Modules/CMakeParseImplicitLinkInfo.cmake:39 (if):
> Policy CMP0054 is not set: Only interpret if() arguments as variables or
> keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
> details. Use the cmake_policy command to set the policy and suppress this
> warning.
>
> Quoted variables like "" will no longer be dereferenced when the 
> policy is
> set to NEW. Since the policy is not set the OLD behavior will be used.
> Call Stack (most recent call first):
> /usr/share/cmake-3.3.1/Modules/CMakeDetermineCompilerABI.cmake:80
> (CMAKE_PARSE_IMPLICIT_LINK_INFO)
> /usr/share/cmake-3.3.1/Modules/CMakeTestCXXCompiler.cmake:68
> (CMAKE_DETERMINE_COMPILER_ABI)
> src/CMakeLists.txt:2 (project)
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at
> /usr/share/cmake-3.3.1/Modules/CMakeParseImplicitLinkInfo.cmake:100
> (elseif):
> Policy CMP0054 is not set: Only interpret if() arguments as variables or
> keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
> details. Use the cmake_policy command to set the policy and suppress this
> warning.
>
> Quoted variables like "" will no longer be dereferenced when the 
> policy is
> set to NEW. Since the policy is not set the OLD behavior will be used.
> Call Stack (most recent call first):
> /usr/share/cmake-3.3.1/Modules/CMakeDetermineCompilerABI.cmake:80
> (CMAKE_PARSE_IMPLICIT_LINK_INFO)
> /usr/share/cmake-3.3.1/Modules/CMakeTestCXXCompiler.cmake:68
> (CMAKE_DETERMINE_COMPILER_ABI)
> src/CMakeLists.txt:2 (project)
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> CMake Warning (dev) at /usr/share/cmake-3.3.1/Modules/CTest.cmake:96 
> (if):
> Policy CMP0054 is not set: Only interpret if() arguments as variables or
> keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
> details. Use the cmake_policy command to set the policy and suppress this
> warning.
>
> Quoted variables like "" will no longer be dereferenced when the 
> policy is
> set to NEW. Since the policy is not set the OLD behavior will be used.
> Call Stack (most recent call first):
> /usr/share/cmake-3.3.1/Modules/CTest.cmake:106 (SET_IF_SET_AND_NOT_SET)
> cmake/Modules/MacroAddUnitTest.cmake:10 (include)
> CMakeLists.txt:64 (include)
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at /usr/share/cmake-3.3.1/Modules/CTest.cmake:251 
> (if):
> Policy CMP0054 is not set: Only interpret if() arguments as variables or
> keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
> details. Use the cmake_policy command to set the policy and suppress this
> warning.
>
> Quoted variables like "" will no longer be dereferenced when the 
> policy is
> set to NEW. Since the policy is not set the OLD behavior will be used.
> Call Stack (most recent call first):
> cmake/Modules/MacroAddUnitTest.cmake:10 (include)
> CMakeLists.txt:64 (include)
> This warning is for project developers. Use -Wno-dev to suppress it.
>
>
>
> --
> View this message in context: 
> http://cmake.3232098.n2.nabble.com/CMP0054-and-CMake-Modules-tp7590137p7591577.html
> Sent from the CMake mailing list archive at Nabble.com.
> Domen Vrankar <mailto:domen.vrankar at gmail.com>
> 26 mars 2015 10:48
>
> ATM each CMake provided module has to set its own policies otherwise
> policies from CMakeLists.txt minimum required version setting are
> used.
> Please file a bug report.
>
> Thanks,
> Domen
> Jörg Kreuzberger <mailto:j.kreuzberger at procitec.de>
> 26 mars 2015 10:29
> Updated to cmake 3.2.1 from 3.0.0 and got several hints due to POLICY 
> CMP0054 (handling of quoted variables)
>
> i set the policy to new and changed my local cmake files.
>
> But i also got a warning from CMake Modules like FindMFC.cmake (Line 39).
>
> do i make something wrong or is this an Error in FindMFC which i have 
> to report?
>
> Can i assume that ALL Modules provided with normal cmake install 
> support this policy with NEW?
> Currently i get no warning from other modules if policy is unset.
> i also assume i can change the policy during cmake processing?
>
> (e.g. set the behaviour to old, include FindMFC.cmake, set the 
> behaviour to new and do the rest of my CMakeLists.txt)
>
> Thanks for any support,
> Joerg
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150921/88a20e3b/attachment-0001.html>


More information about the CMake mailing list