summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cmake/msvc.cmake38
1 files changed, 17 insertions, 21 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake
index 50144132..e54cd505 100644
--- a/cmake/msvc.cmake
+++ b/cmake/msvc.cmake
@@ -62,32 +62,28 @@ set(_LDFLAGS_STATIC "-machine:X86 -WX")
set(_LDFLAGS_STATIC_RELEASE "-LTCG:INCREMENTAL")
set(_LDFLAGS_STATIC_DEBUG "")
-foreach(j C CXX)
- foreach(i "" _DEBUG _RELEASE)
- set(CMAKE_${j}_FLAGS${i} "${CMAKE_${j}_FLAGS${i}} ${_${j}FLAGS${i}}")
- endforeach()
- set(CMAKE_${j}_FLAGS "${CMAKE_${j}_FLAGS} ${_${j}FLAGS}")
-endforeach()
-
-foreach(j "" _DEBUG _RELEASE)
- foreach(i MODULE EXE SHARED)
- set(CMAKE_${i}_LINKER_FLAGS${j} "${_LDFLAGS${j}} ${CMAKE_${i}_LINKER_FLAGS${j}}")
- endforeach()
-endforeach()
-
-set(CMAKE_STATIC_LINKER_FLAGS "${_LDFLAGS_STATIC} ${CMAKE_STATIC_LINKER_FLAGS}")
-set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${_LDFLAGS_STATIC_RELEASE} ${CMAKE_STATIC_LINKER_FLAGS_RELEASE}")
-set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${_LDFLAGS_STATIC_DEBUG} ${CMAKE_STATIC_LINKER_FLAGS_DEBUG}")
-
set(CMAKE_RC_FLAGS "-nologo -DWIN32")
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "" FORCE)
set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS_RELEASE " " CACHE STRING "" FORCE)
- set(CMAKE_C_FLAGS_RELEASE " " CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS " " CACHE STRING "" FORCE)
- set(CMAKE_C_FLAGS " " CACHE STRING "" FORCE)
+
+ set(CMAKE_STATIC_LINKER_FLAGS "${_LDFLAGS_STATIC} ${CMAKE_STATIC_LINKER_FLAGS}" CACHE STRING "" FORCE)
+ set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${_LDFLAGS_STATIC_RELEASE} ${CMAKE_STATIC_LINKER_FLAGS_RELEASE}" CACHE STRING "" FORCE)
+ set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${_LDFLAGS_STATIC_DEBUG} ${CMAKE_STATIC_LINKER_FLAGS_DEBUG}" CACHE STRING "" FORCE)
+
+ foreach(j C CXX)
+ foreach(i "" _DEBUG _RELEASE)
+ set(CMAKE_${j}_FLAGS${i} "${_${j}FLAGS${i}}" CACHE STRING "" FORCE)
+ endforeach()
+ set(CMAKE_${j}_FLAGS "${_${j}FLAGS}" CACHE STRING "" FORCE)
+ endforeach()
+
+ foreach(j "" _DEBUG _RELEASE)
+ foreach(i MODULE EXE SHARED)
+ set(CMAKE_${i}_LINKER_FLAGS${j} "${_LDFLAGS${j}}" CACHE STRING "" FORCE)
+ endforeach()
+ endforeach()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/opentrack-policy.cmake")