diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-27 00:38:29 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-27 00:38:29 +0200 |
commit | f89ebe19bae7c564f45da087c97057b1744fe7f2 (patch) | |
tree | 5ca8cd002a3f6a34c80b3c5a7d63fd838229971b /cmake/msvc.cmake | |
parent | 92452240fb8fcb1f4dfded0cb2b2bf1ae8c33c79 (diff) |
cmake/msvc: fix accidental cmdline duplication
Diffstat (limited to 'cmake/msvc.cmake')
-rw-r--r-- | cmake/msvc.cmake | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index daad2b74..e2414f15 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -69,37 +69,27 @@ foreach(j C CXX) endforeach() foreach(j "" _DEBUG _RELEASE) - foreach(i MODULE EXE SHARED STATIC) - set(OVERRIDE_LDFLAGS${j} "" CACHE STRING "") - set(CMAKE_${i}_LINKER_FLAGS${j} "${_LDFLAGS${j}} ${_LDFLAGS_${i}} ${_LDFLAGS_${i}${j}} ${OVERRIDE_LDFLAGS${j}}" CACHE STRING "" FORCE) - endforeach() -endforeach() - -foreach(j "" _DEBUG _RELEASE) foreach(i MODULE EXE SHARED) - set(OVERRIDE_LDFLAGS_SHARED${j} "" CACHE STRING "") - set(CMAKE_${i}_LINKER_FLAGS${j} "${_LDFLAGS${j}} ${_LDFLAGS_${i}} ${_LDFLAGS_${i}${j}} ${OVERRIDE_LDFLAGS_SHARED${j}}" CACHE STRING "" FORCE) + set(OVERRIDE_LDFLAGS${j} "" CACHE STRING "") + set(CMAKE_${i}_LINKER_FLAGS${j} "${_LDFLAGS${j}} ${OVERRIDE_LDFLAGS${j}}" CACHE STRING "" FORCE) endforeach() endforeach() set(OVERRIDE_LDFLAGS_STATIC "" CACHE STRING "") set(OVERRIDE_LDFLAGS_STATIC_RELEASE "" CACHE STRING "") +set(OVERRIDE_LDFLAGS_STATIC_DEBUG "" 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 "${_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) +set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${_LDFLAGS_STATIC_DEBUG} ${OVERRIDE_LDFLAGS_STATIC_DEBUG}" CACHE STRING "" FORCE) set(CMAKE_BUILD_TYPE_INIT RELEASE) - # for nmake/jom build directories if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "" FORCE) endif() if(CMAKE_PROJECT_NAME STREQUAL "opentrack") - set(warn-flag-found FALSE) foreach (i CMAKE_CXX_FLAGS CMAKE_C_FLAGS) string(REGEX MATCH "((^| )[-/][W][0-9]( |\$))" ret "${${i}}") if(ret STREQUAL "") |