|
1 | | -cmake_minimum_required( VERSION 3.25 ) |
| 1 | +cmake_minimum_required(VERSION 3.25) |
2 | 2 |
|
3 | 3 | if(DEFINED CMAKE_OSX_SYSROOT AND NOT EXISTS "${CMAKE_OSX_SYSROOT}") |
4 | 4 | unset(CMAKE_OSX_SYSROOT CACHE) |
5 | 5 | endif() |
6 | 6 |
|
7 | | -message( STATUS "Parallel Programming Course (PPC)" ) |
8 | | -project(parallel_programming_course) |
| 7 | +message(STATUS "Parallel Programming Course (PPC)") |
| 8 | +project(parallel_programming_course LANGUAGES NONE) |
9 | 9 |
|
10 | | -############################ Scoreboard ############################# |
| 10 | +option(PPC_BUILD_COMPONENTS |
| 11 | + "Build C++ modules, tasks, tests, and their dependencies" ON) |
11 | 12 |
|
12 | | -message( STATUS "PPC step: Setup scoreboard generator" ) |
| 13 | +# ########################### Scoreboard ############################# |
| 14 | + |
| 15 | +message(STATUS "PPC step: Setup scoreboard generator") |
13 | 16 | include(cmake/scoreboard.cmake) |
14 | 17 | add_subdirectory(scoreboard) |
15 | 18 |
|
16 | | -########################### Documentation ########################### |
| 19 | +# ########################## Documentation ########################### |
17 | 20 |
|
18 | | -message( STATUS "PPC step: Setup documentation generation" ) |
| 21 | +message(STATUS "PPC step: Setup documentation generation") |
19 | 22 | include(cmake/sphinx.cmake) |
20 | 23 | add_subdirectory(docs) |
21 | 24 |
|
22 | | -if( USE_SCOREBOARD OR USE_DOCS ) |
23 | | - return() |
24 | | -endif() |
| 25 | +if(PPC_BUILD_COMPONENTS) |
| 26 | + enable_language(C CXX) |
25 | 27 |
|
26 | | -############################ Configures ############################# |
| 28 | + # ########################### Configures ############################# |
27 | 29 |
|
28 | | -message( STATUS "PPC step: First configures" ) |
29 | | -include(cmake/configure.cmake) |
30 | | -include(cmake/modes.cmake) |
31 | | -include(cmake/sanitizers.cmake) |
32 | | -foreach(dep json libenvpp stb) |
| 30 | + message(STATUS "PPC step: First configures") |
| 31 | + include(cmake/configure.cmake) |
| 32 | + include(cmake/modes.cmake) |
| 33 | + include(cmake/sanitizers.cmake) |
| 34 | + foreach(dep json libenvpp stb) |
33 | 35 | include(cmake/${dep}.cmake) |
34 | | -endforeach() |
| 36 | + endforeach() |
35 | 37 |
|
36 | | -################# Parallel programming technologies ################# |
| 38 | + # ################ Parallel programming technologies ################# |
37 | 39 |
|
38 | | -message( STATUS "PPC step: Setup parallel programming technologies" ) |
39 | | -foreach(dep mpi openmp onetbb) |
| 40 | + message(STATUS "PPC step: Setup parallel programming technologies") |
| 41 | + foreach(dep mpi openmp onetbb) |
40 | 42 | include(cmake/${dep}.cmake) |
41 | | -endforeach() |
| 43 | + endforeach() |
42 | 44 |
|
43 | | -######################### External projects ######################### |
| 45 | + # ######################## External projects ######################### |
44 | 46 |
|
45 | | -message( STATUS "PPC step: Setup external projects" ) |
46 | | -include(cmake/gtest.cmake) |
47 | | -include(cmake/benchmark.cmake) |
| 47 | + message(STATUS "PPC step: Setup external projects") |
| 48 | + include(cmake/gtest.cmake) |
| 49 | + include(cmake/benchmark.cmake) |
48 | 50 |
|
49 | | -############################## Modules ############################## |
| 51 | + # ############################# Modules ############################## |
50 | 52 |
|
51 | | -message( STATUS "PPC step: Setup modules" ) |
52 | | -add_subdirectory(modules) |
53 | | -add_subdirectory(tasks) |
| 53 | + message(STATUS "PPC step: Setup modules") |
| 54 | + add_subdirectory(modules) |
| 55 | + add_subdirectory(tasks) |
| 56 | +else() |
| 57 | + message(STATUS "PPC step: Skipping C++ components") |
| 58 | +endif() |
0 commit comments