Skip to content

Commit 3137dc8

Browse files
committed
Decouple docs and scoreboard builds from C++ components
Make `-DUSE_DOCS` and `-DUSE_SCOREBOARD` flags non-blocking for the project build
1 parent 5ce7bac commit 3137dc8

5 files changed

Lines changed: 51 additions & 33 deletions

File tree

.github/workflows/pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
python3 scripts/jobs_graph.py --out docs/_static/ci_graph --format svg
5656
- name: Configure project
5757
run: >
58-
cmake -S . -B build -D USE_DOCS=ON
58+
cmake -S . -B build -D USE_DOCS=ON -D PPC_BUILD_COMPONENTS=OFF
5959
- name: Build i18n
6060
run: |
6161
cmake --build build -t docs_gettext -- --quiet
@@ -97,10 +97,10 @@ jobs:
9797
fi
9898
- name: CMake configure
9999
run: |
100-
cmake -S . -B build -DUSE_SCOREBOARD=ON
100+
cmake -S . -B build -DUSE_SCOREBOARD=ON -DPPC_BUILD_COMPONENTS=OFF
101101
- name: CMake build
102102
run: |
103-
cmake --build build --parallel -- --quiet
103+
cmake --build build -t generate_scoreboard -- --quiet
104104
- name: Upload artifact
105105
uses: actions/upload-artifact@v7
106106
with:

CMakeLists.txt

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,58 @@
1-
cmake_minimum_required( VERSION 3.25 )
1+
cmake_minimum_required(VERSION 3.25)
22

33
if(DEFINED CMAKE_OSX_SYSROOT AND NOT EXISTS "${CMAKE_OSX_SYSROOT}")
44
unset(CMAKE_OSX_SYSROOT CACHE)
55
endif()
66

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)
99

10-
############################ Scoreboard #############################
10+
option(PPC_BUILD_COMPONENTS
11+
"Build C++ modules, tasks, tests, and their dependencies" ON)
1112

12-
message( STATUS "PPC step: Setup scoreboard generator" )
13+
# ########################### Scoreboard #############################
14+
15+
message(STATUS "PPC step: Setup scoreboard generator")
1316
include(cmake/scoreboard.cmake)
1417
add_subdirectory(scoreboard)
1518

16-
########################### Documentation ###########################
19+
# ########################## Documentation ###########################
1720

18-
message( STATUS "PPC step: Setup documentation generation" )
21+
message(STATUS "PPC step: Setup documentation generation")
1922
include(cmake/sphinx.cmake)
2023
add_subdirectory(docs)
2124

22-
if( USE_SCOREBOARD OR USE_DOCS )
23-
return()
24-
endif()
25+
if(PPC_BUILD_COMPONENTS)
26+
enable_language(C CXX)
2527

26-
############################ Configures #############################
28+
# ########################### Configures #############################
2729

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)
3335
include(cmake/${dep}.cmake)
34-
endforeach()
36+
endforeach()
3537

36-
################# Parallel programming technologies #################
38+
# ################ Parallel programming technologies #################
3739

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)
4042
include(cmake/${dep}.cmake)
41-
endforeach()
43+
endforeach()
4244

43-
######################### External projects #########################
45+
# ######################## External projects #########################
4446

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)
4850

49-
############################## Modules ##############################
51+
# ############################# Modules ##############################
5052

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()

docs/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ pip install -r docs/requirements.txt
2424
4. Configure the documentation build:
2525

2626
```bash
27-
cmake -S . -B build -DUSE_DOCS=ON
27+
cmake -S . -B build -DUSE_DOCS=ON -DPPC_BUILD_COMPONENTS=OFF
2828
```
2929

30+
Note: `-DPPC_BUILD_COMPONENTS=OFF` could be used to configure documentation without C++ project dependencies
31+
3032
5. Generate API documentation with Doxygen:
3133

3234
```bash

docs/user_guide/build.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Navigate to the project root.
2626

2727
- ``-D USE_FUNC_TESTS=ON`` enable functional tests.
2828
- ``-D USE_PERF_TESTS=ON`` enable performance tests.
29+
- ``-D PPC_BUILD_COMPONENTS=OFF`` skip C++ modules, tasks, tests, and
30+
their dependencies, useful for docs-only or scoreboard-only configurations.
2931
- ``-D PPC_TASKS=all`` builds every task (default). Pass one task or a semicolon list,
3032
for example ``-D PPC_TASKS="example"``, to limit the build.
3133
- ``-D PPC_IMPLEMENTATIONS="seq;omp"`` select implementation folders to

scoreboard/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ python main.py -o output_directory
1414

1515
Generates `output_directory/index.html` with the scoreboard.
1616

17+
To generate it through CMake without C++ project dependencies:
18+
19+
```bash
20+
cmake -S . -B build -DUSE_SCOREBOARD=ON -DPPC_BUILD_COMPONENTS=OFF
21+
cmake --build build -t generate_scoreboard
22+
```
23+
24+
Note: `-DPPC_BUILD_COMPONENTS=OFF` could be used to configure documentation without C++ project dependencies
25+
1726
## Configuration
1827

1928
- `data/points-info.yml` - Task points, deadlines, penalties

0 commit comments

Comments
 (0)