Add TD_ENABLE_MULTI_PROCESSOR_COMPILATION option for MSVC.

GitOrigin-RevId: f5500b79eb83a20d7ffc1c73963fa3f29fc90012
This commit is contained in:
levlam 2020-11-01 11:55:51 +03:00
parent 36763888d4
commit d90f271c48

View File

@ -118,6 +118,14 @@ endif()
include(TdSetUpCompiler)
td_set_up_compiler()
if (MSVC)
option(TD_ENABLE_MULTI_PROCESSOR_COMPILATION "Use \"ON\" to enable multi-processor compilation.")
if (TD_ENABLE_MULTI_PROCESSOR_COMPILATION)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
endif()
if (CLANG OR GCC)
if (MEMPROF)
include(CheckCXXCompilerFlag)