summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-12-22 17:56:12 +0000
committerGitHub <noreply@github.com>2017-12-22 17:56:12 +0000
commit8f8907254707c6d8bfcb970c130b9be302e27d2d (patch)
tree03bf6c871834e72cb44562decddb8679a492d9ae
parentbbba9467ad77f160295e3e38a91727952c66aa7d (diff)
parent38a320c1774fbbfaeea023be6662b3c7501f303c (diff)
downloadxmr-stak-8f8907254707c6d8bfcb970c130b9be302e27d2d.zip
xmr-stak-8f8907254707c6d8bfcb970c130b9be302e27d2d.tar.gz
Merge pull request #652 from psychocrypt/fix-staticCompileNonGcc
fix static compile with non gnu compiler
-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