summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2020-03-03 11:10:02 +0100
committerGitHub <noreply@github.com>2020-03-03 11:10:02 +0100
commit1f3cc7b7207309c441ce5bf120b57081bbea0c18 (patch)
treee0adf4f79c3c93bd95dc3d44fae48a487461a1c1
parent2ca4c711f77d9cb95e3698de70d07823f4baa256 (diff)
parentea16698e0a0a95105b8bcd7aec23b27eafa92b65 (diff)
downloadninja-1f3cc7b7207309c441ce5bf120b57081bbea0c18.tar.gz
Merge pull request #1742 from scivision/cmake
CMake: modernize
-rw-r--r--CMakeLists.txt6
1 files changed, 2 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2285357..f5a588c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,7 @@
cmake_minimum_required(VERSION 3.15)
-cmake_policy(SET CMP0091 NEW)
project(ninja)
if(CMAKE_BUILD_TYPE MATCHES "Release")
- cmake_policy(SET CMP0069 NEW)
include(CheckIPOSupported)
check_ipo_supported(RESULT lto_supported OUTPUT error)
@@ -17,9 +15,9 @@ endif()
if(MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /GR- /Zc:__cplusplus")
+ string(APPEND CMAKE_CXX_FLAGS " /W4 /GR- /Zc:__cplusplus")
else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fdiagnostics-color")
+ string(APPEND CMAKE_CXX_FLAGS " -Wno-deprecated -fdiagnostics-color")
endif()
find_program(RE2C re2c)