summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-12-19 21:19:24 +0100
committerStanislaw Halik <sthalik@misaki.pl>2021-12-19 21:19:44 +0100
commita5db369ab9ad240189cd12a23df01274d76cde55 (patch)
tree3395be9b154a5c7f35743b17ccb912eb420c3ba9
parentd1b7b1a6bc4185c998996aeb0c8fbb68f2eb9c65 (diff)
cmake/msvc: don't use add_compile_options() in toolchain file
Otherwise it breaks asm build for onnxruntime.
-rw-r--r--cmake/msvc.cmake8
1 files changed, 2 insertions, 6 deletions
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$<$<CONFIG:Debug>: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}")