From 90dd13ee1bd497d7724c2b1d0fd833d42f7001ad Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 5 Jun 2019 14:48:55 -0700 Subject: Use Modern CMake features instead of CMAKE_CXX_FLAGS (#24861) * Convert C++ standard settings and warning options from CMAKE__FLAGS to Modern CMake isms. * More $ generator expressions instead of CMAKE_CXX_FLAGS. * Use $ for all -fpermissive usage * Fix generator expression that generates multiple flags * Fix invalid use of CMAKE_CXX_FLAGS instead of CMAKE_C_FLAGS. * Treat AppleClang as though it is Clang (match pre-3.0 behavior). * Update our build system to understand that AppleClang is distinct from Clang and remove CMP0025 policy setting. * PR Feedback. --- CMakeLists.txt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ca5a69b544..ab5c441785 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,7 @@ # Verify minimum required version -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5.1) -if(CMAKE_VERSION VERSION_EQUAL 3.0 OR CMAKE_VERSION VERSION_GREATER 3.0) - cmake_policy(SET CMP0042 NEW) -endif() - -if (NOT WIN32) - set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} -std=c++11" CACHE STRING "Flags used by the compiler during all build types.") - set(CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS_INIT} -std=c11" CACHE STRING "Flags used by the compiler during all build types.") -endif() +cmake_policy(SET CMP0042 NEW) # Set the project name project(CoreCLR) -- cgit v1.2.3