From f89ebe19bae7c564f45da087c97057b1744fe7f2 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 27 Mar 2017 00:38:29 +0200 Subject: cmake/msvc: fix accidental cmdline duplication --- cmake/msvc.cmake | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'cmake') diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index daad2b74..e2414f15 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -68,38 +68,28 @@ foreach(j C CXX) set(CMAKE_${j}_FLAGS "${_${j}FLAGS} ${_${j}_WARNS} ${OVERRIDE_${j}_FLAGS}" CACHE STRING "" FORCE) 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 "") -- cgit v1.2.3