We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84b9430 commit 6fec908Copy full SHA for 6fec908
CMakeLists.txt
@@ -10,7 +10,18 @@ project(${PROJECT_NAME})
10
11
################################################################################
12
13
-set (CMAKE_CXX_STANDARD 11)
+# specify the C++ standard
14
+set(CMAKE_CXX_STANDARD 11)
15
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
16
+message(STATUS "Using C++11")
17
+
18
+if(MSVC)
19
+ # The /MP flag is available and works as intended with the MSVC compiler
20
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
21
+elseif(CMAKE_BUILD_PARALLEL_LEVEL)
22
+ # Use build system parallelism (e.g., `make -j` or `ninja`)
23
+ set(CMAKE_BUILD_PARALLEL_LEVEL 8) # Example: Use 8 threads
24
+endif()
25
26
27
0 commit comments