Add two optimization flags for the GNU compiler
This commit is contained in:
parent
8c63f1ae8b
commit
9a1ea05e83
|
@ -50,7 +50,7 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${MINIMAL_GNU})
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${MINIMAL_GNU})
|
||||||
message(FATAL_ERROR "G++ ${MINIMAL_GNU} or higher is required.")
|
message(FATAL_ERROR "G++ ${MINIMAL_GNU} or higher is required.")
|
||||||
endif()
|
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 -fgcse-las -fgcse-sm -fipa-pta -fstdarg-opt -fivopts -s")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fsched-pressure -flive-range-shrinkage -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}")
|
set(CMAKE_CXX_FLAGS "-fno-use-linker-plugin -fwhole-program ${CMAKE_CXX_FLAGS}")
|
||||||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
|
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${MINIMAL_CLANG})
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${MINIMAL_CLANG})
|
||||||
|
|
Loading…
Reference in New Issue