summaryrefslogtreecommitdiffhomepage
path: root/cmake/msvc.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/msvc.cmake')
-rw-r--r--cmake/msvc.cmake20
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 "")