From: Uwe Hermann Date: Sun, 1 Apr 2018 17:26:16 +0000 (+0200) Subject: CMakeLists.txt: Set CMake policy CMP0054 to NEW. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2944860fee473b05064c84d3308dffa89c4b0760;p=pulseview.git 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. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 34829809..1e81a60c 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") #===============================================================================