diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f0af2d41..4668d4bea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -79,6 +79,8 @@ else() | |||
| 79 | add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D_SCL_SECURE_NO_WARNINGS) | 79 | add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D_SCL_SECURE_NO_WARNINGS) |
| 80 | # Avoid windows.h junk | 80 | # Avoid windows.h junk |
| 81 | add_definitions(/DNOMINMAX) | 81 | add_definitions(/DNOMINMAX) |
| 82 | # Avoid windows.h from including some usually unused libs like winsocks.h, since this might cause some redefinition errors. | ||
| 83 | add_definitions(/DWIN32_LEAN_AND_MEAN) | ||
| 82 | 84 | ||
| 83 | # set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms) | 85 | # set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms) |
| 84 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | 86 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) |
| @@ -92,10 +94,13 @@ else() | |||
| 92 | # /W3 - Level 3 warnings | 94 | # /W3 - Level 3 warnings |
| 93 | # /MP - Multi-threaded compilation | 95 | # /MP - Multi-threaded compilation |
| 94 | # /Zi - Output debugging information | 96 | # /Zi - Output debugging information |
| 95 | # /Zo - enahnced debug info for optimized builds | 97 | # /Zo - enhanced debug info for optimized builds |
| 96 | set(CMAKE_C_FLAGS "/W3 /MP /Zi /Zo" CACHE STRING "" FORCE) | 98 | # /permissive- - enables stricter C++ standards conformance checks |
| 99 | set(CMAKE_C_FLAGS "/W3 /MP /Zi /Zo /permissive-" CACHE STRING "" FORCE) | ||
| 97 | # /EHsc - C++-only exception handling semantics | 100 | # /EHsc - C++-only exception handling semantics |
| 98 | set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} /EHsc" CACHE STRING "" FORCE) | 101 | # /Zc:throwingNew - let codegen assume `operator new` will never return null |
| 102 | # /Zc:inline - let codegen omit inline functions in object files | ||
| 103 | set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} /EHsc /Zc:throwingNew,inline" CACHE STRING "" FORCE) | ||
| 99 | 104 | ||
| 100 | # /MDd - Multi-threaded Debug Runtime DLL | 105 | # /MDd - Multi-threaded Debug Runtime DLL |
| 101 | set(CMAKE_C_FLAGS_DEBUG "/Od /MDd" CACHE STRING "" FORCE) | 106 | set(CMAKE_C_FLAGS_DEBUG "/Od /MDd" CACHE STRING "" FORCE) |