summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8bf8e8c2..10f33bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
OpenPOWER on IntegriCloud