Skip to content
Snippets Groups Projects
Commit 2d6ff020 authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Update README accordingly

parent 4491d9c1
Branches
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@ FetchContent_MakeAvailable (IHTACMakeCommon)
init_project ()
option (PROJECT_WITH_UNIT_TESTS "Add unit tests for project" OFF)
project (AwesomeProjectName
LANGUAGES CXX C
VERSION 1.0.0
......@@ -53,6 +55,7 @@ ihta_add_library (
OUT_TEST TEST_TARGET # The name of the unit test target will be stored in `TEST_TARGET`. Useful for adding dependencies to the target. See below.
TEST_SOURCES test/test.cpp # This adds a unit test with the given source files.
TEST_INTERNALS # With this option, the internals of the library can be unit tested as well.
ADD_UNIT_TEST ${PROJECT_WITH_UNIT_TESTS} # This option can enable or disable the unit tests.
)
# Add external library link to library
......@@ -78,7 +81,10 @@ packageProject (
# Needed so the object library knows the location of the generated headers from packageProject.
target_include_directories (${LIB_TARGET} PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/PackageProjectInclude>")
target_include_directories (${TEST_TARGET} PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/PackageProjectInclude>")
if (PROJECT_WITH_UNIT_TESTS)
target_include_directories (${TEST_TARGET} PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/PackageProjectInclude>")
endif ()
build_doc (
ADD_DEV_SECTION OFF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment