[CMake] [3.1.0] [PATCH] CMP0054 in CMakeDetermineCXXCompiler.cmake

Paul Smith paul at mad-scientist.net
Thu Jan 8 12:06:16 EST 2015


Hi all.  I'm testing an upgrade to CMake 3.1.0 (from 2.8.12.2) and
seeing a weird warning, but ONLY on Windows; it works fine on GNU/Linux
and OSX:

  -- The C compiler identification is MSVC 16.0.40219.1
  -- Check for working C compiler using: Visual Studio 10 2010 Win64
  -- Check for working C compiler using: Visual Studio 10 2010 Win64 -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- The CXX compiler identification is MSVC 16.0.40219.1
  CMake Warning (dev) at obj/REPOS/nuo3rdparty/common/cmake/share/cmake-3.1/Modules/CMakeDetermineCXXCompiler.cmake:106 (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 "MSVC" 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):
    CMakeLists.txt:26 (enable_language)
  This warning is for project developers.  Use -Wno-dev to suppress it.

  -- Check for working CXX compiler using: Visual Studio 10 2010 Win64
  -- Check for working CXX compiler using: Visual Studio 10 2010 Win64 -- works

If I apply the attached patch it seems to fix the problem...?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-cmake-fix-CMakeDetermineCXXCompiler.patch
Type: text/x-patch
Size: 824 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150108/1c8b25e9/attachment.bin>


More information about the CMake mailing list