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

Include CTest for BUILD_TESTING option #1819

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

scpeters
Copy link
Collaborator

The recent release of dartsim 6.14.0 is failing to build in homebrew-core due to an issue with fetching GoogleTest (see Homebrew/homebrew-core#175563 (comment)). My first thought to work around this was to build the homebrew formula with -DBUILD_TESTING=OFF, but that option is neither defined nor used to disable test compilation. This includes CTest to define the option and adds logic to skip building tests when BUILD_TESTING is false.

We could separately try to find the googletest homebrew formula instead of using FetchContent if desired, but I think BUILD_TESTING is a useful option anyway, so I would start with this.

Before creating a pull request

  • Document new methods and classes
  • Format new code files using ClangFormat by running make format
  • Build with -DDART_TREAT_WARNINGS_AS_ERRORS=ON and resolve all the compile warnings

Before merging a pull request

  • Set version target by selecting a milestone on the right side
  • Summarize this change in CHANGELOG.md
  • Add unit test(s) for this change
  • Add Python bindings for new methods and classes

Allows skipping tests with -DBUILD_TESTING=OFF
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.56%. Comparing base (47666d6) to head (b816c68).
Report is 19 commits behind head on release-6.14.

Additional details and impacted files
@@              Coverage Diff              @@
##           release-6.14    #1819   +/-   ##
=============================================
  Coverage         61.56%   61.56%           
=============================================
  Files               490      490           
  Lines             46021    46021           
=============================================
  Hits              28334    28334           
  Misses            17687    17687           

@jslee02 jslee02 added this to the DART 6.14.1 milestone Jun 26, 2024
@jslee02
Copy link
Member

jslee02 commented Jun 26, 2024

Good to know that Homebrew doesn't allow using FetchContent. Thanks!

CMakeLists.txt Outdated Show resolved Hide resolved
Co-authored-by: Jeongseok (JS) Lee <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
@jslee02 jslee02 merged commit 760c54f into release-6.14 Jun 26, 2024
26 of 27 checks passed
@jslee02 jslee02 deleted the scpeters/build_testing_option branch June 26, 2024 15:14
henriquealrs pushed a commit to henriquealrs/dart that referenced this pull request Jul 13, 2024
Signed-off-by: Steve Peters <[email protected]>
Co-authored-by: Jeongseok (JS) Lee <[email protected]>
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