Skip to content
Snippets Groups Projects
Commit 38a320c1 authored by psychocrypt's avatar psychocrypt
Browse files

fix static compile with non gnu compiler

remove adding compiler flags `-static-...` if compiler is not a gnu compiler
parent e99da8b6
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment