mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-03 09:16:30 -04:00
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. (cherry picked from commit 2773a5ed5e75540d43500e054581ea1fab2132ac)
This commit is contained in:
parent
3e69029008
commit
6f74954017
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user