diff options
Diffstat (limited to 'cmake/msvc.cmake')
-rw-r--r-- | cmake/msvc.cmake | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index cc524668..6bbcae09 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -53,17 +53,10 @@ set(_CFLAGS_DEBUG "/GS /sdl /Gs /guard:cf -D_ITERATOR_DEBUG_LEVEL=0 -D_HAS_ITERA set(_CXXFLAGS_RELEASE "${cc}") set(_CXXFLAGS_DEBUG "${_CFLAGS_DEBUG}") -set(ldflags-shared-release "/OPT:REF /OPT:ICF=10") -set(ldflags-shared "/DEBUG") - -foreach (i MODULE EXE SHARED) - set(_LDFLAGS_${i} "${ldflags-shared}") - set(_LDFLAGS_${i}_RELEASE "${ldflags-shared-release}") -endforeach() - -set(_LDFLAGS "/WX") -set(_LDFLAGS_RELEASE "/LTCG:INCREMENTAL") +set(_LDFLAGS "/WX /DEBUG") +set(_LDFLAGS_RELEASE "/LTCG:INCREMENTAL /OPT:REF /OPT:ICF=10") set(_LDFLAGS_DEBUG "") +set(_LDFLAGS_STATIC "/WX") foreach(j C CXX) foreach(i "" _DEBUG _RELEASE) @@ -87,6 +80,11 @@ foreach(j "" _DEBUG _RELEASE) endforeach() endforeach() +set(OVERRIDE_LDFLAGS_STATIC "" 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_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "" FORCE) |