From d55227cbbe39db5577f87353d30eb4c77fa45311 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 21 Mar 2017 16:40:29 +0100 Subject: cmake/msvc: need linker static flags --- cmake/msvc.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmake') 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) -- cgit v1.2.3