Skip to content

Commit 887aba2

Browse files
committed
[tmva][sofie] Fix SOFIE tests for nortcxxmodules
1 parent 3fc39bc commit 887aba2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tmva/sofie/test/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ if (NOT ONNX_MODELS_DIR)
1616
set(ONNX_MODELS_DIR input_models)
1717
endif()
1818

19-
#protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS "${SOFIE_PARSERS_DIR}/onnx_proto3")
20-
#set_source_files_properties(${PROTO_SRCS} ${PROTO_HDRS} PROPERTIES GENERATED TRUE)
21-
2219
add_executable(emitFromONNX
2320
EmitFromONNX.cxx
2421
)
@@ -83,8 +80,12 @@ target_compile_options(emitFromROOT PRIVATE -Wno-unused-parameter -Wno-array-bou
8380

8481
# Automatic compilation of headers from root files
8582
add_custom_target(SofieCompileModels_ROOT)
86-
add_dependencies(SofieCompileModels_ROOT emitFromROOT)
87-
83+
# onepcm or modules dependency is needed for using ROOT I/O when converting a model in a ROOT file
84+
if (runtime_cxxmodules)
85+
add_dependencies(SofieCompileModels_ROOT emitFromROOT modules_idx)
86+
else()
87+
add_dependencies(SofieCompileModels_ROOT emitFromROOT onepcm)
88+
endif()
8889
# Finding .onnx files to be parsed and creating the appropriate command
8990
file(GLOB ONNX_FILES "${ONNX_MODELS_DIR}/*.onnx")
9091
foreach(onnx_file ${ONNX_FILES})

0 commit comments

Comments
 (0)