From 2944860fee473b05064c84d3308dffa89c4b0760 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 1 Apr 2018 19:26:16 +0200 Subject: [PATCH] CMakeLists.txt: Set CMake policy CMP0054 to NEW. This prevents the following warnings upon a second cmake run: CMake Warning (dev) at /usr/share/cmake-3.10/Modules/CMakePushCheckState.cmake:65 (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 "HAVE_CXX_ATOMICS_WITHOUT_LIB" 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:123 (cmake_push_check_state) CMakeLists.txt:139 (check_working_cxx_atomics) This warning is for project developers. Use -Wno-dev to suppress it. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3482980..1e81a60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,11 @@ if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() +# Only interpret if() arguments as variables or keywords when unquoted. +if(POLICY CMP0054) + cmake_policy(SET CMP0054 NEW) +endif() + list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake") #=============================================================================== -- 2.30.2