bneradt opened a new pull request, #13094:
URL: https://github.com/apache/trafficserver/pull/13094

   The `add_catch2_test` macro is only defined inside the
   `if(BUILD_TESTING)` block in `lib/CMakeLists.txt`, and all other
   `CMakeLists.txt` files either guard their test targets with
   `if(BUILD_TESTING)` or live in a subdirectory that is only added
   inside such a guard. `src/proxy/http3/CMakeLists.txt` was the lone
   outlier: it unconditionally defined the `test_http3` and `test_qpack`
   executables and called `add_catch2_test`. As a result, any
   configuration run with `-DBUILD_TESTING=OFF` (for example, the docs
   and non-unit-test build environments that do not need the Catch2 unit
   tests) failed during CMake configuration with
   `Unknown CMake command "add_catch2_test"`.
   
   This wraps the HTTP/3 test executables and their `add_catch2_test`
   registrations in an `if(BUILD_TESTING) ... endif()` block, matching
   the convention used by every other `CMakeLists.txt` in the tree (for
   example, `src/proxy/http2/CMakeLists.txt` and
   `src/proxy/hdrs/CMakeLists.txt`). The `clang_tidy_check(http3)` call
   is intentionally left outside the guard because it operates on the
   always-built `http3` library. Configures now succeed both with
   `-DBUILD_TESTING=OFF` and with `-DBUILD_TESTING=ON` (in which case
   the `test_http3` and `test_qpack` targets continue to be defined as
   before).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to