diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-07-16 14:34:05 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-07-16 14:34:05 +0200 |
commit | fcc4085f7867fe2976e9e77555de6521bcccef9c (patch) | |
tree | b673923db57c8f893631adca1b8617eea06f540f /cmake | |
parent | 2a4e1bb14a524e765158fd5f53d93e609580265f (diff) |
cmake/msvc: annoy less
Note that .pdb doesn't break with -Oy frame pointer
omission.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/msvc.cmake | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index d1ae654d..0a9caf76 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -12,7 +12,7 @@ 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:threadSafeInit /arch:SSE2 -D_HAS_EXCEPTIONS=0") +set(cc "/O2 /O2it /Oy /Ob2 /fp:fast /GS- /GF /GL /Gw /Gy /Gm /Zc:inline /Zo /FS /Zc:threadSafeInit /arch:SSE2 -D_HAS_EXCEPTIONS=0") set(warns_ "") @@ -76,13 +76,14 @@ 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_BUILD_TYPE_INIT RELEASE) -# for nmake/jom build directories -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "RELEASE") +set(CMAKE_RC_FLAGS "-nologo -DWIN32") + +if(NOT CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "" FORCE) endif() -set(CMAKE_RC_FLAGS "-nologo -DWIN32") +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "" FORCE) +endif() include("${CMAKE_CURRENT_LIST_DIR}/opentrack-policy.cmake") - |