diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-25 05:56:26 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-26 11:22:50 +0200 |
commit | 454ba7be3a2b0d86c2bea0845a6e4c009d0675fc (patch) | |
tree | 884f4c21ae3554cb473a59d63155b0578f9f83b5 /cmake | |
parent | 82770ce78c965355d98a0eb4ccbb93793f27c21e (diff) |
cmake: pass _HAS_EXCEPTIONS=0 globally
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/msvc.cmake | 3 | ||||
-rw-r--r-- | cmake/opentrack-platform.cmake | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index f810ac4d..d5b94690 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -18,6 +18,7 @@ set(CMAKE_GENERATOR "Ninja") add_definitions(-diagnostics:caret) #add_compile_options(-Qvec-report:2) #add_compile_options(-d2cgsummary) +add_definitions(-D_HAS_EXCEPTIONS=0) if(CMAKE_PROJECT_NAME STREQUAL "opentrack") include("${CMAKE_CURRENT_LIST_DIR}/opentrack-policy.cmake" NO_POLICY_SCOPE) @@ -46,7 +47,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "QtBase") set(FEATURE_shared ON) endif() -if(CMAKE_PROJECT_NAME STREQUAL "opencv") +if(CMAKE_PROJECT_NAME STREQUAL "OpenCV") set(OPENCV_SKIP_MSVC_EXCEPTIONS_FLAG TRUE) endif() diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake index 23f684f3..f1c8f5b4 100644 --- a/cmake/opentrack-platform.cmake +++ b/cmake/opentrack-platform.cmake @@ -118,8 +118,8 @@ if(MSVC) add_definitions(-D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1) add_definitions(-D_SCL_SECURE_NO_WARNINGS) - add_compile_options(-EHsc) - #add_definitions(-D_HAS_EXCEPTIONS=0) + #add_compile_options(-EHsc) + add_definitions(-D_HAS_EXCEPTIONS=0) add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE) add_definitions(-D_ENABLE_ATOMIC_ALIGNMENT_FIX) |