mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-24 14:47:44 -05:00
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:
1 parent
92cf91082b
commit
6049c07c3c
1 file changed
+10
-3
@@ -1,6 +1,12 @@
|
||||
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/tests/integration/HybridNewton)
|
||||
|
||||
add_test(NAME
|
||||
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
|
||||
${Python3_EXECUTABLE}
|
||||
@@ -9,7 +15,7 @@ add_test(NAME
|
||||
WORKING_DIRECTORY
|
||||
${PROJECT_BINARY_DIR}/tests/integration/HybridNewton
|
||||
)
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.22)
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.22)
|
||||
set(modifications
|
||||
"PYTHONPATH=path_list_append:${opm-common_DIR}/python"
|
||||
"PYTHONPATH=path_list_append:${CMAKE_CURRENT_BINARY_DIR}/python"
|
||||
@@ -19,4 +25,5 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.22)
|
||||
ENVIRONMENT_MODIFICATION
|
||||
"${modifications}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
Reference in new issue
Block a user