diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-19 17:23:12 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-19 17:23:12 +0200 |
commit | 52852e7b95151ded0d3f43e20731efd7a0431a24 (patch) | |
tree | 9fdc3797f2af73ccf42f1d3225c7736f6e2d5723 | |
parent | ec6e34b08a768cc89bce358be5eca13d908344a1 (diff) |
cmake/msvc: new stuff
-rw-r--r-- | cmake/msvc.cmake | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index f5915d99..c0407d27 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -12,11 +12,11 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # oldest CPU supported here is Northwood-based Pentium 4. -sh 20150811 -set(cc "/O2 /O2it /Ob2 /fp:fast /GS- /GF /GL /Gw /Gy /Gm /Zc:inline /Zo /FS /Zc:implicitNoexcept /Zc:threadSafeInit") +set(cc "/O2 /O2it /Ob2 /fp:fast /GS- /GF /GL /Gw /Gy /Gm /Zc:inline /Zo /FS /Zc:threadSafeInit") set(warns_ "") -set(warns-disable 4530 4577 4789 4244 4702) +set(warns-disable 4530 4577 4789 4244 4702 4530 4244) foreach(i ${warns-disable}) set(warns_ "${warns_} /wd${i}") @@ -42,7 +42,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "opentrack") set(cc "${cc} /GR- /arch:SSE2") endif() -set(base-cflags "${warns_} -MT -Zi") +set(base-cflags "${warns_} -MT -Zi -cgthreads8") set(_CFLAGS "${base-cflags}") set(_CXXFLAGS "${base-cflags}") @@ -61,9 +61,9 @@ set(_LDFLAGS_STATIC_DEBUG "") foreach(j C CXX) foreach(i "" _DEBUG _RELEASE) - set(CMAKE_${j}_FLAGS${i} "${_${j}FLAGS${i}} ${CMAKE_${j}_FLAGS${i}}") + set(CMAKE_${j}_FLAGS${i} "${CMAKE_${j}_FLAGS${i}} ${_${j}FLAGS${i}}") endforeach() - set(CMAKE_${j}_FLAGS "${_${j}FLAGS} ${_${j}_WARNS} ${CMAKE_${j}_FLAGS}") + set(CMAKE_${j}_FLAGS "${CMAKE_${j}_FLAGS} ${_${j}FLAGS}") endforeach() foreach(j "" _DEBUG _RELEASE) @@ -82,13 +82,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "RELEASE") endif() -if(CMAKE_PROJECT_NAME STREQUAL "opentrack") - foreach (i CMAKE_CXX_FLAGS CMAKE_C_FLAGS) - string(REGEX MATCH "((^| )[-/][W][0-9]( |\$))" ret "${${i}}") - if(ret STREQUAL "") - set(${i} "-W3 ${${i}}") - endif() - endforeach() -endif() - set(CMAKE_RC_FLAGS "-nologo -DWIN32") + +include("${CMAKE_CURRENT_LIST_DIR}/opentrack-policy.cmake") + |