CMake - is there a way to check if testing is enabled?

I believe I found a piece of code that did exactly that, but with the documentation that CMake is so poor, I can't find it anymore.

In short: is there something like:

if(testing_enabled) 

      

Can I use CMakeLists in?

+3


source to share


1 answer


I think you are thinking about which is allowed: BUILD_TESTING

include(CTest)

      



and by default ON

.

+3


source







All Articles