From 2773a5ed5e75540d43500e054581ea1fab2132ac Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Mon, 29 May 2017 18:48:48 +0300 Subject: [PATCH] cmake: set CMP0054 to NEW to avoid variables over expansion (since cmake 3.8) ==> win: CMake Warning (dev) at CMakeLists.txt:782 (elseif): ==> win: Policy CMP0054 is not set: Only interpret if() arguments as variables or ==> win: keywords when unquoted. Run "cmake --help-policy CMP0054" for policy ==> win: details. Use the cmake_policy command to set the policy and suppress this ==> win: warning. ==> win: ==> win: Quoted variables like "MSVC" will no longer be dereferenced when the policy ==> win: is set to NEW. Since the policy is not set the OLD behavior will be used. ==> win: This warning is for project developers. Use -Wno-dev to suppress it. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd64b445..227f7ae5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ if (APPLE) else() cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR) endif() +cmake_policy(SET CMP0054 NEW) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release @@ -776,8 +777,8 @@ source_group("Source Extra" FILES ${SRC_EXTRA}) include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include) if ((CMAKE_COMPILER_IS_GNUCC) OR - (${CMAKE_C_COMPILER_ID} STREQUAL "Clang") OR - (${CMAKE_C_COMPILER_ID} STREQUAL "AppleClang")) + ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR + ("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")) set(EVENT_SHARED_FLAGS -fvisibility=hidden) elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "SunPro") set(EVENT_SHARED_FLAGS -xldscope=hidden) -- 2.40.0