Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup FetchContent docs. #91

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jehelset
Copy link
Contributor

Make sure GIT_TAG is set in FetchContent docs, else will default to master which doesn't exist.

Temporarily disable KUMI_BUILD_TEST. Not sure what the good default is for FetchContent, as I haven't used it much, but currently you might get errors when also building tests due to https://github.com/jfalcou/copacabana/blob/main/copacabana/cmake/make_unit.cmake#L135, see commit message in 612ec00 for details.

Maybe instead of changing the copacabana default (as suggested in the commit message), one could explicitly specify the OPT_RELATIVE in kumi.

`copacabana` defaults to `${CMAKE_SOURCE_DIR}/test` when searching
for source files in `copa_glob_unit`, this will refer to the
top-level directory, ie the users project directory. The paths
of the sources will then be `../path-to-build/_deps/kumi-src/...`
and so on, in addition it might also match sources in the user
project.

Later `copa_make_unit` does `add_executable` with the same sources,
but these sources will be interpreter relative to the source
directory of the target, not `${CMAKE_SOURCE_DIR}/test` and then
no longer refer to an existing file.

Likely `copacabana` should refer to `${PROJECT_SOURCE_DIR}` instead
of `${CMAKE_SOURCE_DIR}` so that it is relative to the root of the
most recently declared projet, ie the one that is calling `copacabana`
functions. Until then disable `KUMI_BUILD_TEST` in the docs.
@jfalcou
Copy link
Owner

jfalcou commented Jul 28, 2024

The OPT_RELATIVE can be fixed from the glob call in KUMI tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants