fixed: do not enable tensorflow test without tensorflow on the system

tensorflow is too heavy to drag in as a dependency for everyone
This commit is contained in:
Arne Morten Kvarving committed 2025-10-09 15:03:24 +02:00
1 parent 92cf91082b
commit 6049c07c3c
1 file changed
+8 -1
+8 -1
View File
@@ -1,5 +1,11 @@
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/tests/integration/HybridNewton)
execute_process(
COMMAND "${Python3_EXECUTABLE}" -c "import tensorflow"
RESULT_VARIABLE PYTHON_HAS_TENSORFLOW
OUTPUT_QUIET
ERROR_QUIET
)
if(PYTHON_HAS_TENSORFLOW EQUAL 0)
add_test(NAME
HybridNewton
COMMAND
@@ -20,3 +26,4 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.22)
"${modifications}"
)
endif()
endif()