linker flags have no effect in compilation

and will cause -Werror=unused-command-line-option
on apple cc
This commit is contained in:
Rick V 2019-02-01 20:28:30 -06:00
parent 6d608d292f
commit 59c6184233
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465

View File

@ -130,7 +130,6 @@ if(STATIC_LINK)
if(USING_CLANG) if(USING_CLANG)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
else() 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" ) 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(USING_CLANG)
endif(STATIC_LINK) endif(STATIC_LINK)