From 2f09a4452144b4f9fd09a3dc9b843b15c211555c Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Mon, 1 Mar 2021 12:02:56 +0100 Subject: [PATCH] Don't overwrite the existing flags when a GNU compiler is used. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2893fb7..da039a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ if((${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) OR (${CMAKE_CXX_COMPILER_ID} STREQUAL endif() 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 "-flto -fno-use-linker-plugin -fwhole-program ${CMAKE_CXX_FLAGS}") endif()