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

CMake: add subproject detection and fix source location. #11

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

Conversation

no-more-secrets
Copy link

The subproject detection avoids adding things into the build that
are not necessary (i.e., standardese, unit tests) and/or may
cause conflicts (i.e., tests target name) when building as a
submodule in a parent project.

Also change CMAKE_SOURCE_LOCATION --> CMAKE_CURRENT_SOURCE_LOCATION
which is more correct and is needed when the source location is
not the top level folder in the project.

The subproject detection avoids adding things into the build that
are not necessary (i.e., standardese, unit tests) and/or may
cause conflicts (i.e., `tests` target name) when building as a
submodule in a parent project.

Also change CMAKE_SOURCE_LOCATION --> CMAKE_CURRENT_SOURCE_LOCATION
which is more correct and is needed when the source location is
not the top level folder in the project.
Without this then a parent project has to specifically
turn off function_ref testing by setting the appropriate
flag.  This makes testing opt-in when function_ref is
a subproject, and can still be turned on.
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.

1 participant