Skip to content

Commit

Permalink
Don't build docs by default
Browse files Browse the repository at this point in the history
  • Loading branch information
gavv committed Aug 5, 2021
1 parent df7e9fe commit 4703e8a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Build
run: make
- name: Release build
run: make release_build

- name: Debug build
run: make debug_build

- name: Test
run: make test
Expand Down
22 changes: 13 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0.0)

project(aspl CXX)

option(BUILD_DOCUMENTATION "Build Doxygen documentation" OFF)

set(PACKAGE_NAME libASPL)
set(PACKAGE_VERSION 1.0.0)

Expand Down Expand Up @@ -258,15 +260,17 @@ if(BUILD_TESTING)
)
endif(BUILD_TESTING)

find_package(Doxygen)

if(DOXYGEN_FOUND STREQUAL YES)
add_custom_target(doxygen ALL
DEPENDS ${LIB_TARGET}
COMMENT "Generating HTML documentation"
COMMAND cd "${PROJECT_SOURCE_DIR}" && doxygen
)
endif()
if(BUILD_DOCUMENTATION)
find_package(Doxygen)

if(DOXYGEN_FOUND STREQUAL YES)
add_custom_target(doxygen ALL
DEPENDS ${LIB_TARGET}
COMMENT "Generating HTML documentation"
COMMAND cd "${PROJECT_SOURCE_DIR}" && doxygen
)
endif()
endif(BUILD_DOCUMENTATION)

add_custom_target(compile_commands ALL
DEPENDS ${LIB_TARGET}
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ release_build:
debug_build:
mkdir -p build/Debug
cd build/Debug && $(CMAKE) $(CMAKE_ARGS) \
-DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZERS=ON -DBUILD_TESTING=ON ../..
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_SANITIZERS=ON \
-DBUILD_TESTING=ON \
-DBUILD_DOCUMENTATION=ON \
../..
cd build/Debug && make -j$(NUM_CPU)

.PHONY: test
Expand Down
2 changes: 1 addition & 1 deletion example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

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

set(DRIVER_NAME "ASPL_Example")
set(DRIVER_VERSION "1.0.0")
Expand Down

0 comments on commit 4703e8a

Please sign in to comment.