diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-21 11:49:15 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-21 11:49:55 +0200 |
commit | 5b0d455840b4e11c219ae01fca7275949850f4c6 (patch) | |
tree | 8d4a134f5863fdfd643be8b36ab7596dbdb3a4f8 | |
parent | 872738d19c4b4c867d71d653dcdff0191ce92fce (diff) |
cmake/msvc: kill -D_CRT_BUILTIN_OFFSETOF
-rw-r--r-- | cmake/msvc.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index 8156c1af..301d1e68 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -14,6 +14,10 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/opentrack-policy.cmake") include("${CMAKE_CURRENT_LIST_DIR}/opentrack-policy.cmake" NO_POLICY_SCOPE) endif() +set(CMAKE_C_COMPILER_INIT cl.exe) +set(CMAKE_CXX_COMPILER_INIT cl.exe) +set(CMAKE_ASM_NASM_COMPILER_INIT nasm.exe) + # search for programs in the host directories SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # don't poison with system compile-time data @@ -26,9 +30,6 @@ set(CMAKE_GENERATOR "Ninja") #add_compile_options(-Qvec-report:2) #add_compile_options(-d2cgsummary) add_definitions(-D_HAS_EXCEPTIONS=0) -if(NOT CMAKE_PROJECT_NAME STREQUAL "OpenCV") - add_definitions(-D_CRT_USE_BUILTIN_OFFSETOF) -endif() if(DEFINED CMAKE_TOOLCHAIN_FILE) # ignore cmake warning: Manually-specified variable not used by the project |