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

Paul Anton Letnes pa at letnes.com
Tue Jan 13 14:03:17 EST 2015


Just wanted to say that I've seen the same issue on my system:
Visual studio 2013, Win 7 64
Cmake 3.1.0-rc2 
Intel fortran 2015 (used for the fortran bits of a mixed c/c++/fortran solution)

Cheers 
Paul

PS: I envy your email address. 

Sent from my phone

> On 08 Jan 2015, at 18:06, Paul Smith <paul at mad-scientist.net> wrote:
> 
> 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...?
> 
> 
> <0002-cmake-fix-CMakeDetermineCXXCompiler.patch>
> -- 
> 
> 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


More information about the CMake mailing list