Merge pull request #1878 from hdf89shfdfs/multi_generator_bug

Fix mulit-configuration bug
This commit is contained in:
Jan Niklas Hasse 2020-11-14 00:03:47 +01:00 committed by GitHub
commit a03dd05def
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,20 +1,18 @@
cmake_minimum_required(VERSION 3.15)
include(CheckIncludeFileCXX)
include(CheckIPOSupported)
project(ninja)
# --- optional link-time optimization
if(CMAKE_BUILD_TYPE MATCHES "Release")
include(CheckIPOSupported)
check_ipo_supported(RESULT lto_supported OUTPUT error)
check_ipo_supported(RESULT lto_supported OUTPUT error)
if(lto_supported)
message(STATUS "IPO / LTO enabled")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
else()
message(STATUS "IPO / LTO not supported: <${error}>")
endif()
if(lto_supported)
message(STATUS "IPO / LTO enabled")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
else()
message(STATUS "IPO / LTO not supported: <${error}>")
endif()
# --- compiler flags