fix static compile with non gnu compiler

remove adding compiler flags `-static-...` if compiler is not a gnu compiler
This commit is contained in:
psychocrypt
2017-12-21 22:45:39 +01:00
parent e99da8b683
commit 38a320c177
+3 -1
View File
@@ -443,7 +443,9 @@ if(CMAKE_LINK_STATIC)
set(BUILD_SHARED_LIBRARIES OFF)
set(DL_LIB ${CMAKE_DL_LIBS})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(LIBS "-static-libgcc -static-libstdc++ ${LIBS}")
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
set(LIBS "-static-libgcc -static-libstdc++ ${LIBS}")
endif()
endif()
# compile C files