Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Junczys-Dowmunt <marcinjd@microsoft.com>2018-12-10 06:53:57 +0300
committerMarcin Junczys-Dowmunt <marcinjd@microsoft.com>2018-12-10 06:53:57 +0300
commit36d12cd2855fda44bf5cfc83b778bde8ce76f4f5 (patch)
treef9886b0f7ab30291771983a9898e77662a956b1e
parentde6a9dfd052c212ead67bf1f485394b512879ac5 (diff)
link stdlib statically
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8acd8334..e2372667 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,6 +110,10 @@ set(EXT_LIBS ${EXT_LIBS} ${CMAKE_DL_LIBS})
if(COMPILE_CUDA)
if(USE_STATIC_LIBS)
+ # link statically to stdlib libraries
+ set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
+
+ # look for libraries that have .a suffix
set(_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .lib .a)