Skip to content

Commit

Permalink
Add CMake controls
Browse files Browse the repository at this point in the history
  • Loading branch information
rsp4jack committed Jan 31, 2024
1 parent 34b6a26 commit eda4f51
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build-tex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,11 @@ jobs:
- name: Install TeX Live
uses: zauguin/install-texlive@v3
with:
package_file: .github/tl_packages
package_file: .github/tl_packages

- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build -DBUILD_DOCS=ON -DBUILD_PROG=OFF
- name: Build
run: cmake --build ${{github.workspace}}/build
12 changes: 10 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
cmake_minimum_required(VERSION 3.17)

add_subdirectory(群友提交)
add_subdirectory(PDF版题目与答案)
option(BUILD_DOCS "Build TeX docs" OFF)
option(BUILD_PROG "Build programs" ON)

if(BUILD_PROG)
add_subdirectory(群友提交)
endif()

if(BUILD_DOCS)
add_subdirectory(PDF版题目与答案)
endif()

0 comments on commit eda4f51

Please sign in to comment.