Skip to content

Commit 6499c7b

Browse files
committed
[tmva][sofie] Don't run TestSofieModels test if onnx not found
1 parent e2a3801 commit 6499c7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tmva/sofie/test/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ endif()
118118
# gtest
119119
# Look for needed python modules
120120
find_python_module(torch QUIET)
121-
if(PY_TORCH_FOUND)
121+
find_python_module(onnx QUIET)
122+
123+
if(PY_TORCH_FOUND AND PY_ONNX_FOUND)
122124
configure_file(Conv1dModelGenerator.py Conv1dModelGenerator.py COPYONLY)
123125
configure_file(Conv2dModelGenerator.py Conv2dModelGenerator.py COPYONLY)
124126
configure_file(Conv3dModelGenerator.py Conv3dModelGenerator.py COPYONLY)

0 commit comments

Comments
 (0)