File tree Expand file tree Collapse file tree 1 file changed +21
-13
lines changed Expand file tree Collapse file tree 1 file changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -153,19 +153,27 @@ endif()
153153
154154# Any reatures that link against libpython are disabled if built with tpython=OFF
155155if (tpython AND ROOT_KERAS_FOUND AND BLAS_FOUND)
156- configure_file (generateKerasModels.py generateKerasModels.py COPYONLY )
157- configure_file (scale_by_2_op.hxx scale_by_2_op.hxx COPYONLY )
158-
159- ROOT_ADD_GTEST(TestRModelParserKeras TestRModelParserKeras.C
160- LIBRARIES
161- ROOTTMVASofie
162- Python3::NumPy
163- Python3::Python
164- BLAS::BLAS
165- INCLUDE_DIRS
166- SYSTEM
167- ${CMAKE_CURRENT_BINARY_DIR}
168- )
156+
157+ # TODO: make sure we also support the newest Keras
158+ if (NOT DEFINED ROOT_KERAS_VERSION)
159+ message (WARNING "Keras found, but version unknown — cannot verify compatibility." )
160+ elseif (ROOT_KERAS_VERSION VERSION_LESS "3.12.0" )
161+ configure_file (generateKerasModels.py generateKerasModels.py COPYONLY )
162+ configure_file (scale_by_2_op.hxx scale_by_2_op.hxx COPYONLY )
163+
164+ ROOT_ADD_GTEST(TestRModelParserKeras TestRModelParserKeras.C
165+ LIBRARIES
166+ ROOTTMVASofie
167+ Python3::NumPy
168+ Python3::Python
169+ BLAS::BLAS
170+ INCLUDE_DIRS
171+ SYSTEM
172+ ${CMAKE_CURRENT_BINARY_DIR}
173+ )
174+ else ()
175+ message (WARNING "Keras version ${ROOT_KERAS_VERSION} is too new for the SOFIE Keras parser (>= 3.12.0)" )
176+ endif ()
169177endif ()
170178
171179
You can’t perform that action at this time.
0 commit comments