From 59c61842337e1ea3179a8c79f6c79f07e8f0f5b4 Mon Sep 17 00:00:00 2001 From: Rick V Date: Fri, 1 Feb 2019 20:28:30 -0600 Subject: [PATCH] linker flags have no effect in compilation and will cause -Werror=unused-command-line-option on apple cc --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cbe5d55fb..7ad34a168 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,7 +130,6 @@ if(STATIC_LINK) if(USING_CLANG) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static -Wl,--whole-archive -Wl,--no-whole-archive") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive" ) endif(USING_CLANG) endif(STATIC_LINK)