From 9c7cf5921fff213c76e04ae645ce19c356eb70ff Mon Sep 17 00:00:00 2001 From: Sudara Date: Wed, 31 Jul 2024 15:30:10 +0200 Subject: [PATCH] Use CMAKE_CXX_FLAGS instead of add_compile_options --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b4303fe..4473dab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,8 +41,9 @@ if (MelatoninInspector_IS_TOP_LEVEL) # https://learn.microsoft.com/en-us/cpp/build/reference/mp-build-with-multiple-processes # Needed for ninja to be happy in CI + # Hacky, ideally would be add_compile_options, but that didn't work if (MSVC) - add_compile_options(/MP) + set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} /MP") endif () set_target_properties("${TARGET_NAME}" PROPERTIES COMPILE_WARNING_AS_ERROR ON)