From a5db369ab9ad240189cd12a23df01274d76cde55 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 19 Dec 2021 21:19:24 +0100 Subject: cmake/msvc: don't use add_compile_options() in toolchain file Otherwise it breaks asm build for onnxruntime. --- cmake/msvc.cmake | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'cmake') diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index ec6eef31..9a331cb3 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -19,12 +19,9 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_GENERATOR "Ninja") #add_definitions(-D_ITERATOR_DEBUG_LEVEL=0) -add_compile_options(-diagnostics:classic) #add_compile_options(-Qvec-report:2) #add_compile_options(-d2cgsummary) add_definitions(-D_HAS_EXCEPTIONS=0) -add_compile_options(-Zc:preprocessor) -add_compile_options(-wd4117) add_definitions(-D_CRT_USE_BUILTIN_OFFSETOF) if(CMAKE_PROJECT_NAME STREQUAL "opentrack") @@ -65,11 +62,10 @@ endif() set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON) -add_compile_options(-Zi -Zf -Zo -bigobj -cgthreads1 -vd0) add_link_options(-cgthreads:1) -set(_CFLAGS "") -set(_CXXFLAGS "") +set(_CFLAGS "-diagnostics:classic -Zc:preprocessor -wd4117 -Zi -Zf -Zo -bigobj -cgthreads1 -vd0") +set(_CXXFLAGS "${_CFLAGS}") set(_CFLAGS_RELEASE "-O2 -Oit -Oy- -Ob3 -fp:fast -GS- -GF -GL -Gw -Gy -arch:SSE2 -MT") set(_CFLAGS_DEBUG "-guard:cf -MTd -Gs0 -RTCs") set(_CXXFLAGS_RELEASE "${_CFLAGS_RELEASE}") -- cgit v1.2.3