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

Catch.cmake: Remove redundant CTEST_FILE param #2936

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

hkaelber
Copy link
Contributor

The CTEST_FILE argument was set twice. Although this still worked correctly the 2nd time setting it to empty is not required.

Thx to @craigscott-crascit for spotting this: aad926b#r149159698

hkaelber referenced this pull request Nov 19, 2024
Introducing a new DISCOVERY_MODE mode option, which provides greater
control over when catch_discover_tests perforsm test discovery.

It has two supported modes:
* POST_BUILD: The default behavior, which adds a POST_BUILD command
  to perform test discovery after the test has been built as was
  always done so far.

* PRE_TEST: New mode, which delays test discovery until test execution.
  The generated include file generates the appropriate CTest files at
  runtime and regenerates the CTest files when the executable is
  updated.
  This mode can be used in build-environments that don't allow for
  executing the linked binaries at build-time (like in a
  cross-compilation environment).

DISCOVERY_MODE can be controlled in two ways:
1. Setting the DISCOVERY_MODE when calling catch_discover_tests.

2. Setting the global CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE prior
   to calling gtest_discover_tests.

Closes #2493
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.99%. Comparing base (506276c) to head (98e7f85).
Report is 1 commits behind head on devel.

Additional details and impacted files
@@           Coverage Diff           @@
##            devel    #2936   +/-   ##
=======================================
  Coverage   90.99%   90.99%           
=======================================
  Files         198      198           
  Lines        8597     8597           
=======================================
  Hits         7822     7822           
  Misses        775      775           
---- 🚨 Try these New Features:

@horenmar horenmar added the Extras Touches utility scripts outside of Catch2 proper, e.g. CMake integration. label Nov 22, 2024
@horenmar horenmar merged commit 0321d2f into catchorg:devel Nov 22, 2024
77 checks passed
@horenmar
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Extras Touches utility scripts outside of Catch2 proper, e.g. CMake integration.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants