-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Would be great if this was usable as a git-submodule or via CMakes ExternalProject or FetchContent.
This requires
- a proper target name, e.g. tcspan
- a namespaced alias for that target, e.g. tc::span
- being able to exclude tests
For the latter I'd suggest to remove the enable_testing and use:
if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
include(CTest)
endif()
if(BUILD_TESTING)
add_subdirectory(test)
endif()
This include adds an option BUILD_TESTING with default ON and enable_testing call if the current project is not the super project (aka cmake was called for another folder and this folder was added via add_subdirectory)
PS: CMAKE_CURRENT_SOURCE_DIR as used is not required and can be omitted.
DarkWingMcQuack
Metadata
Metadata
Assignees
Labels
No labels