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 rename PACKAGE_TESTS to BOUT_TESTS #2347

Merged
merged 2 commits into from
Jun 10, 2021
Merged

Conversation

bendudson
Copy link
Contributor

If including BOUT++ as a dependency, this namespacing makes it easier to select which tests should be run: In some cases (e.g. CI, Github actions) only the tests for the physics model should be run, and not the BOUT++ tests.

@bendudson bendudson added build-system issues with make/configure/... small-change Changes less than 100 lines - should be quick to review labels Jun 9, 2021
If including BOUT++ as a dependency, this namespacing makes it easier
to select which tests should be run: In some cases (e.g. CI, Github
actions) only the tests for the physics model should be run, and not
the BOUT++ tests.
@ZedThree
Copy link
Member

It might also be useful to set the default value like this:

# Are we building BOUT++ directly, or as part of another project
string(COMPARE EQUAL 
  "${PROJECT_NAME}" "${CMAKE_PROJECT_NAME}"
  PROJECT_IS_TOP_LEVEL
)
option(BOUT_TESTS "Build the tests" ${PROJECT_IS_TOP_LEVEL})

ZedThree
ZedThree previously approved these changes Jun 10, 2021
@ZedThree ZedThree merged commit 9f406ce into next Jun 10, 2021
@ZedThree ZedThree deleted the next-cmake-namespace-tests branch June 10, 2021 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-system issues with make/configure/... small-change Changes less than 100 lines - should be quick to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants