You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2020/10/16 08:17:49 UTC

[GitHub] [qpid-proton] jiridanek commented on pull request #271: PROTON-2170: Respect the BUILD_TESTING option to allow the user to disable tests

jiridanek commented on pull request #271:
URL: https://github.com/apache/qpid-proton/pull/271#issuecomment-709900061


   With this patch, `-DBUILD_TESTING=OFF` is to have implicit effects in CTests, that is, `enable_testing()` is not called, and all `add_test` calls in CMake become noops. (This is because we now don't call `enable_testing()` ourselves and rely on CTest to call it when `BUILD_TESTING=ON`, which is the default.)
   
   Futhermore, when `BUILD_TESTING=OFF`, compilation of test targets is skipped. This is the main goal of this patch.
   
   There is a possible alternative implementation; conditionally set the `EXCLUDE_FROM_ALL` property on the test targets, https://cmake.org/cmake/help/v3.14/prop_tgt/EXCLUDE_FROM_ALL.html, instead of conditionally skipping part of the CMake file with `if`. This is something I did not try.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org