diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-21 16:40:29 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-21 16:57:07 +0100 |
commit | d55227cbbe39db5577f87353d30eb4c77fa45311 (patch) | |
tree | be51b4aac8732bd5ed981ac12318d13e65831ac6 | |
parent | 939e82305e6d654a4dec2dafe471c42b2d07e540 (diff) |
cmake/msvc: need linker static flags
-rw-r--r-- | cmake/msvc.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index 3009c14f..daad2b74 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -56,7 +56,9 @@ set(_CXXFLAGS_DEBUG "${_CFLAGS_DEBUG}") set(_LDFLAGS "/WX /DEBUG") set(_LDFLAGS_RELEASE "/LTCG:INCREMENTAL /OPT:REF /OPT:ICF=10") set(_LDFLAGS_DEBUG "") + set(_LDFLAGS_STATIC "/WX") +set(_LDFLAGS_STATIC_RELEASE "/LTCG:INCREMENTAL") foreach(j C CXX) foreach(i "" _DEBUG _RELEASE) @@ -81,9 +83,10 @@ foreach(j "" _DEBUG _RELEASE) endforeach() set(OVERRIDE_LDFLAGS_STATIC "" CACHE STRING "") +set(OVERRIDE_LDFLAGS_STATIC_RELEASE "" CACHE STRING "") set(CMAKE_STATIC_LINKER_FLAGS "${_LDFLAGS_STATIC} ${OVERRIDE_LDFLAGS_STATIC}" CACHE STRING "" FORCE) set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "" CACHE STRING "" FORCE) -set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "" CACHE STRING "" FORCE) +set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${_LDFLAGS_STATIC_RELEASE} ${OVERRIDE_LDFLAGS_STATIC_RELEASE}" CACHE STRING "" FORCE) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "" FORCE) |