From 3d4320c2c9ec1dddeb81bc9f1ea9c6603a1c2525 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Tue, 22 Jul 2025 18:19:25 +0100 Subject: [PATCH] Compile C++ code with /MP on MSVC This reduces the build time from 32.8s to 28.6s for clean builds on my PC. --- cpp/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 704e58ff..5baa8891 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -20,6 +20,10 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) +if(MSVC) + add_compile_options("/MP") +endif() + ############################## # External Projects ##############################