Closed andrewkcorcoran closed 1 year ago
What about using EXCLUDE_FROM_ALL
with add_subdirectory? https://cmake.org/cmake/help/latest/command/add_subdirectory.html
That might workt for add_subdirectory
but I don't believe it's supported by FetchContent
. Additionally it would result in bread and brecovery no longer being built - which is not ideal as the user most probably wants those available.
@erenon see https://github.com/morganstanley/binlog/pull/151 may solve this issue.
Currently if binlog is integrated into a project using
FetchContent
oradd_subdirectory
the binlog tests are unconditionally built and also added as CMake unit tests. As a result projects using binlog are forced to always run the binlog tests as part of their unit test runs. We should either automatically disable building and adding of tests to CMake when we detect binlog is being included as a dependent project (using the already existing$BINLOG_IS_TOPLEVEL_PROJECT
) or add a CMakeoption
to allow for manually disabling of tests.