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

Only build tests when we are the top level project #38

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

purple-lazy
Copy link
Contributor

sanitizers-cmake tests are being run when included as a sub-project.

Change Summary: When sanitizers-cmake is the top level project its tests will run by default. The can be turned off with "-DBUILD_TESTING=OFF". When sanitizers-cmake is not the top level project, its test will not run.

Added change as described in "An Introduction to Modern CMake" to only include tests when we are the top level project, as determined by CMAKE_PROJECT_NAME .

Use of Ctest defines cmake option BUILD_TESTING so users can turn testing on an off (defaults to ON, the same as the current sanitizers-cmake implementation). Note CTest calls enable_testing().

@arsenm arsenm merged commit 0573e2e into arsenm:master Oct 7, 2024
@purple-lazy
Copy link
Contributor Author

Thank you @arsenm

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.

None yet

2 participants