From 5b0d455840b4e11c219ae01fca7275949850f4c6 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 21 Oct 2022 11:49:15 +0200 Subject: cmake/msvc: kill -D_CRT_BUILTIN_OFFSETOF --- cmake/msvc.cmake | 7 ++++--- 1 file 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 -- cgit v1.2.3