From 42b550f200bf1589dbc24a4fe75476d29f02fd65 Mon Sep 17 00:00:00 2001 From: Richard Cole Date: Sun, 10 Nov 2024 13:30:12 +0000 Subject: [PATCH] if using MSVC, then add /MP flag to speed up builds --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69e32a2d09..db8b694dc9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,6 +91,11 @@ if (QL_USE_STD_CLASSES) set(QL_USE_STD_SHARED_PTR ON) endif() +if (MSVC) + # take advantage of parallel compilation - https://learn.microsoft.com/en-us/cpp/build/reference/mp-build-with-multiple-processes?view=msvc-170 + add_compile_options(-MP) +endif() + # Set the default warning level we use to pass the GitHub workflows if (QL_ENABLE_DEFAULT_WARNING_LEVEL) if (MSVC)