8000 CMake: register enabled self-tests by fhgffy · Pull Request #116 · xiph/ogg · GitHub
[go: up one dir, main page]

Skip to content

CMake: register enabled self-tests - #116

Open
fhgffy wants to merge 1 commit into
xiph:mainfrom
fhgffy:fix/cmake-register-tests
Open

fhgffy wants to merge 1 commit into
xiph:mainfrom
fhgffy:fix/cmake-register-tests

Conversation

@fhgffy
@fhgffy fhgffy commented Oct 5, 2026
Copy link
Copy Markdown

When BUILD_TESTING=ON, a standalone CMake build creates test_bitwise and test_framing, but CTest reports no tests. Both executables pass when run directly. The test registrations need enable_testing() after the CTest module was removed in #85.

This adds enable_testing() inside the existing BUILD_TESTING block, preserving the current opt-in behavior and avoiding the dashboard targets that #85 removed. It also documents the configure option and makes the existing GitHub Actions job enable tests and fail if CTest finds none.

Validation on Linux with GCC 14.2:

  • CMake 3.11.2, 3.31.6, and 4.0.3: both existing self-tests pass for static and shared builds
  • Default and explicit BUILD_TESTING=OFF builds remain library-only
  • Parent add_subdirectory() projects retain inherited normal-variable ON/OFF behavior
  • No Continuous, Experimental, or Nightly targets are added
  • Removing only enable_testing() makes the new CI test command fail with no tests; the old command succeeds without running tests
  • Installed outputs match the baseline byte-for-byte

Windows and macOS were not run locally.

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.

1 participant

0