From 08fdf6eb84cc8a5b65d84041257c908de5879bf5 Mon Sep 17 00:00:00 2001 From: Richard Cole Date: Thu, 5 Sep 2024 22:28:43 +0100 Subject: [PATCH] enable the /MP MSVC compiler argument for parallel compilation (#1846) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0cd6962..a86a5686 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,7 +147,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) if (MSVC) # Turn compiler warnings up to 11 string(REGEX REPLACE "[-/]W[1-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /MP") add_definitions(-D_CRT_SECURE_NO_WARNINGS) if(BENCHMARK_ENABLE_WERROR)