Don't overwrite the existing flags when a GNU compiler is used.
This commit is contained in:
parent
111a4cc798
commit
2f09a44521
|
@ -11,7 +11,7 @@ if((${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) OR (${CMAKE_CXX_COMPILER_ID} STREQUAL
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fira-loop-pressure -ftree-loop-distribution -floop-interchange -ftree-vectorize -fipa-pta -s")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fira-loop-pressure -ftree-loop-distribution -floop-interchange -ftree-vectorize -fipa-pta -s")
|
||||||
set(CMAKE_CXX_FLAGS "-flto -fno-use-linker-plugin -fwhole-program ${CMAKE_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "-flto -fno-use-linker-plugin -fwhole-program ${CMAKE_CXX_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue