Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ elseif(${PROJECT_NAME}_BUILD_HEADERS_ONLY)

if(${PROJECT_NAME}_VERBOSE_OUTPUT)
verbose_message("Found the following headers:")
foreach(header IN LIST headers)
foreach(header IN LISTS headers)
verbose_message("* ${header}")
endforeach()
endif()
Expand Down
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
PROJECT_NAME := Project

.PHONY: install coverage test docs help
.DEFAULT_GOAL := help

Expand Down Expand Up @@ -32,21 +34,25 @@ help:

test: ## run tests quickly with ctest
rm -rf build/
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$(INSTALL_LOCATION) -Dmodern-cpp-template_ENABLE_UNIT_TESTING=1 -DCMAKE_BUILD_TYPE="Release"
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$(INSTALL_LOCATION) \
-D$(PROJECT_NAME)_ENABLE_UNIT_TESTING=1 \
-DCMAKE_BUILD_TYPE="Release"
cmake --build build --config Release
cd build/ && ctest -C Release -VV

coverage: ## check code coverage quickly GCC
rm -rf build/
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$(INSTALL_LOCATION) -Dmodern-cpp-template_ENABLE_CODE_COVERAGE=1
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$(INSTALL_LOCATION) \
-D$(PROJECT_NAME)_ENABLE_CODE_COVERAGE=1
cmake --build build --config Release
cd build/ && ctest -C Release -VV
cd .. && (bash -c "find . -type f -name '*.gcno' -exec gcov -pb {} +" || true)
cd build/ && ctest -C Release -VV; \
(bash -c "find . -type f -name '*.gcno' -exec gcov -pb {} +" || true)

docs: ## generate Doxygen HTML documentation, including API docs
rm -rf docs/
rm -rf build/
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$(INSTALL_LOCATION) -DProject_ENABLE_DOXYGEN=1
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$(INSTALL_LOCATION) \
-D$(PROJECT_NAME)_ENABLE_DOXYGEN=1
cmake --build build --config Release
cmake --build build --target doxygen-docs
$(BROWSER) docs/html/index.html
Expand Down