Skip to content

cmake configure test only when BUILD_TESTING=ON#78

Merged
Toby Searle (twsearle) merged 2 commits into
developfrom
bugfix/build_testing
Sep 23, 2025
Merged

cmake configure test only when BUILD_TESTING=ON#78
Toby Searle (twsearle) merged 2 commits into
developfrom
bugfix/build_testing

Conversation

@matthewrmshin

Copy link
Copy Markdown
Collaborator

Description

Determine whether to build tests by following the CTest module BUILD_TESTING option.

Impact

Follow the CTest module BUILD_TESTING option.

Checklist

  • I have updated the unit tests to cover the change
  • New functions are documented briefly via Doxygen comments in the code
  • I have linted my code using cpplint
  • I have run the unit tests
  • I have run mo-bundle to check integration with the rest of JEDI and run the unit tests under all environments

Determine whether to build tests by following the CTest module
BUILD_TESTING option.
Comment thread src/CMakeLists.txt Outdated
Reinstate copyright year.

Signed-off-by: Matt Shin <matthew.shin@metoffice.gov.uk>

@twsearle Toby Searle (twsearle) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. Should I wait for you to do a test of this new functionality or are we ready to merge now?

@matthewrmshin

Copy link
Copy Markdown
Collaborator Author

I've done some tests yesterday afternoon using similar branches. Sample outputs here:

@twsearle

Copy link
Copy Markdown
Collaborator

I've done some tests yesterday afternoon using similar branches. Sample outputs here:

* https://cylchub/services/cylc-review/taskjobs/matthew.shin/?suite=mobbm-build-testing%2Fon - `-O ctest`

* https://cylchub/services/cylc-review/taskjobs/matthew.shin/?suite=mobbm-build-testing%2Foff - `-S BUILD_TESTING=false -z TASKS=all_make_mo`

Am I right in thinking that without setting BUILD_TESTING at all it defaults to true? I am unclear on why the CI is still running the tests on this PR.

@matthewrmshin

Copy link
Copy Markdown
Collaborator Author

Yes, BUILD_TESTING=ON is default.

@twsearle Toby Searle (twsearle) merged commit ddaa18d into develop Sep 23, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants