Add a few optimizations for G++ in the CMakeLists.txt file

This commit is contained in:
Username404 2021-08-11 22:42:32 +02:00
parent 5c3eecd560
commit d6de61df99
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1

View File

@ -51,7 +51,7 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${MINIMAL_GNU})
message(FATAL_ERROR "G++ ${MINIMAL_GNU} or higher is required.")
endif()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fpredictive-commoning -ftree-partial-pre -fira-loop-pressure -ftree-loop-distribution -floop-interchange -fsplit-paths -fipa-pta -fivopts -s")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fpredictive-commoning -ftree-partial-pre -fira-loop-pressure -ftree-loop-distribution -floop-interchange -fsplit-paths -fgcse-las -fgcse-sm -fipa-pta -fstdarg-opt -fivopts -s")
set(CMAKE_CXX_FLAGS "-fno-use-linker-plugin -fwhole-program ${CMAKE_CXX_FLAGS}")
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${MINIMAL_CLANG})