From a10e96b1a3f09c6dcda17bfc127b71edc24ed6ec Mon Sep 17 00:00:00 2001 From: Alexey Andronov Date: Fri, 29 Nov 2019 02:47:07 +0700 Subject: [PATCH] build: add multiprocessor compilation flag to cmake to speedup builds (#793) --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33d641de..9d789022 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,8 @@ set(CMAKE_C_STANDARD 99) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning-option -fcolor-diagnostics -fvisibility-inlines-hidden") +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + ADD_COMPILE_OPTIONS(/MP) endif() # For debugging the release build on linux