diff --git a/cmake/cpp.cmake b/cmake/cpp.cmake index b099b35ab3..6f5788e851 100644 --- a/cmake/cpp.cmake +++ b/cmake/cpp.cmake @@ -176,6 +176,10 @@ function(ortools_cxx_test) "${multiValueArgs}" ${ARGN} ) + if(NOT BUILD_TESTING) + return() + endif() + if(NOT TEST_NAME) message(FATAL_ERROR "no NAME provided") endif()