diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0cfc29..2df51aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,10 +20,7 @@ jobs: submodules: recursive - name: Run run: | - ./ci.sh -DCMAKE_CXX_FLAGS='-fsanitize=address -fsanitize=undefined -fsanitize-undefined-trap-on-error -coverage' - - name: Paper - run: | - cmake --build ./build -t p2728 + ./ci.sh -DCMAKE_CXX_FLAGS='-fsanitize=address -fsanitize=undefined -fsanitize-undefined-trap-on-error -coverage' -DUTF_VIEW_BUILD_PAPER=ON - name: Coverage run: | lcov --directory ./build --capture --output-file ./build/coverage_all.info diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fb8bf1..9f7755e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,12 @@ cmake_minimum_required(VERSION 3.27) project(utf_view CXX) +option( + UTF_VIEW_BUILD_PAPER + "Enable building paper. Default: OFF. Values: { ON, OFF }." + OFF +) + if (BUILD_TESTING) include(CTest) endif() @@ -29,4 +35,6 @@ endif() add_subdirectory(src/utf_view) -add_subdirectory(paper) +if (UTF_VIEW_BUILD_PAPER) + add_subdirectory(paper) +endif() diff --git a/paper/CMakeLists.txt b/paper/CMakeLists.txt index 09ba6e0..eda95ba 100644 --- a/paper/CMakeLists.txt +++ b/paper/CMakeLists.txt @@ -10,4 +10,4 @@ add_custom_command( COMMAND SRCDIR=${CMAKE_CURRENT_SOURCE_DIR} OUTDIR=${CMAKE_CURRENT_BINARY_DIR} make -C ${CMAKE_CURRENT_SOURCE_DIR}/../deps/wg21 html DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/P2728.md VERBATIM) -add_custom_target(p2728 DEPENDS P2728.html) +add_custom_target(p2728 ALL DEPENDS P2728.html)