forked from mindspore-Ecosystem/mindspore
cut down threads num for compiling in windows with msvc
This commit is contained in:
parent
d8c6dd14b4
commit
e37df1f1c8
|
@ -12,7 +12,7 @@ if(MSVC)
|
|||
message("init cxx_flags on windows")
|
||||
cmake_host_system_information(RESULT CPU_CORES QUERY NUMBER_OF_LOGICAL_CORES)
|
||||
message("CPU_CORE number = ${CPU_CORES}")
|
||||
math(EXPR MP_NUM "${CPU_CORES} * 2")
|
||||
math(EXPR MP_NUM "${CPU_CORES}")
|
||||
set(CMAKE_C_FLAGS "/MD /O2 /Ob2 /DNDEBUG /MP${MP_NUM} /EHsc /bigobj")
|
||||
set(CMAKE_C_FLAGS_DEBUG "/MDd /Zi /Ob0 /Od /RTC1 /MP${MP_NUM} /EHsc /bigobj")
|
||||
set(CMAKE_C_FLAGS_RELEASE "/MD /O2 /Ob2 /DNDEBUG /MP${MP_NUM} /EHsc /bigobj")
|
||||
|
|
Loading…
Reference in New Issue