We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ca27a0 commit 653099dCopy full SHA for 653099d
code/CMakeLists.txt
@@ -21,6 +21,14 @@ set(CMAKE_CXX_STANDARD 11)
21
set(CMAKE_CXX_STANDARD_REQUIRED ON)
22
message("-- Setting C++11")
23
24
+if(MSVC)
25
+ # The /MP flag is available and works as intended with the MSVC compiler
26
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
27
+elseif(CMAKE_BUILD_PARALLEL_LEVEL)
28
+ # Use build system parallelism (e.g., `make -j` or `ninja`)
29
+ set(CMAKE_BUILD_PARALLEL_LEVEL 8) # Example: Use 8 threads
30
+endif()
31
+
32
################################################################################
33
34
# Detects whether this is a top-level project
0 commit comments