Skip to content

Commit 4703e8a

Browse files
committed
Don't build docs by default
1 parent df7e9fe commit 4703e8a

File tree

4 files changed

+24
-13
lines changed

4 files changed

+24
-13
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ jobs:
2121
- name: Checkout
2222
uses: actions/checkout@v2
2323

24-
- name: Build
25-
run: make
24+
- name: Release build
25+
run: make release_build
26+
27+
- name: Debug build
28+
run: make debug_build
2629

2730
- name: Test
2831
run: make test

CMakeLists.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0.0)
22

33
project(aspl CXX)
44

5+
option(BUILD_DOCUMENTATION "Build Doxygen documentation" OFF)
6+
57
set(PACKAGE_NAME libASPL)
68
set(PACKAGE_VERSION 1.0.0)
79

@@ -258,15 +260,17 @@ if(BUILD_TESTING)
258260
)
259261
endif(BUILD_TESTING)
260262

261-
find_package(Doxygen)
262-
263-
if(DOXYGEN_FOUND STREQUAL YES)
264-
add_custom_target(doxygen ALL
265-
DEPENDS ${LIB_TARGET}
266-
COMMENT "Generating HTML documentation"
267-
COMMAND cd "${PROJECT_SOURCE_DIR}" && doxygen
268-
)
269-
endif()
263+
if(BUILD_DOCUMENTATION)
264+
find_package(Doxygen)
265+
266+
if(DOXYGEN_FOUND STREQUAL YES)
267+
add_custom_target(doxygen ALL
268+
DEPENDS ${LIB_TARGET}
269+
COMMENT "Generating HTML documentation"
270+
COMMAND cd "${PROJECT_SOURCE_DIR}" && doxygen
271+
)
272+
endif()
273+
endif(BUILD_DOCUMENTATION)
270274

271275
add_custom_target(compile_commands ALL
272276
DEPENDS ${LIB_TARGET}

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ release_build:
2020
debug_build:
2121
mkdir -p build/Debug
2222
cd build/Debug && $(CMAKE) $(CMAKE_ARGS) \
23-
-DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZERS=ON -DBUILD_TESTING=ON ../..
23+
-DCMAKE_BUILD_TYPE=Debug \
24+
-DENABLE_SANITIZERS=ON \
25+
-DBUILD_TESTING=ON \
26+
-DBUILD_DOCUMENTATION=ON \
27+
../..
2428
cd build/Debug && make -j$(NUM_CPU)
2529

2630
.PHONY: test

example/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD 17)
77
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
88

99
# set to non-empty string to enable code signing
10-
set(CODESIGN_ID "" CACHE STRING "codesign ID")
10+
set(CODESIGN_ID "" CACHE STRING "Codesign ID")
1111

1212
set(DRIVER_NAME "ASPL_Example")
1313
set(DRIVER_VERSION "1.0.0")

0 commit comments

Comments
 (0)