logfault
logfault copied to clipboard
Build tests fails when included in another project with CMake FetchContent
When logfault is included in another project via CMake FetchContent, compilation of general_tests.cpp fails with logfault.h not found
FetchContent_Declare(
logfault
GIT_REPOSITORY https://github.com/jgaa/logfault
)
FetchContent_MakeAvailable(logfault)
target_link_libraries( myProgram PRIVATE logfault )
This is due to the include_directories statement using CMAKE_SOURCE_DIR
rather than PROJECT_SOURCE_DIR
It would also be desirable to add a CMake option to omit building tests.
@craigpepper I merged your PR for this. Thank you!