summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-03-21 08:45:32 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-03-21 08:45:32 +0100
commit7873ba73fbb028aa42b3849d10c2d60de7d00717 (patch)
treed82d13d22a4a47d4b1b7f621df174abfe36f3d2b /cmake
parent8ca6c65aef5dde65ac834be1fb8866e9bf0734db (diff)
cmake/msvc: oh for crying out loud
Diffstat (limited to 'cmake')
-rw-r--r--cmake/msvc.cmake18
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)