summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorpsychocrypt <psychocryptHPC@gmail.com>2017-12-21 22:45:39 +0100
committerpsychocrypt <psychocryptHPC@gmail.com>2017-12-21 22:45:39 +0100
commit38a320c1774fbbfaeea023be6662b3c7501f303c (patch)
tree079bcc2af0d18d0a9e3a84f67c0687fb3b3a75d8 /CMakeLists.txt
parente99da8b68302a310644648e2864903a404fef9fe (diff)
downloadxmr-stak-38a320c1774fbbfaeea023be6662b3c7501f303c.zip
xmr-stak-38a320c1774fbbfaeea023be6662b3c7501f303c.tar.gz
fix static compile with non gnu compiler
remove adding compiler flags `-static-...` if compiler is not a gnu compiler
Diffstat (limited to 'CMakeLists.txt')
-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