cmake: Fix build when BUILD_TESTING=OFF

This commit is contained in:
Mizux Seiha
2024-10-24 21:39:08 +02:00
parent eaeb85a539
commit 006b260d9e

View File

@@ -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()