@@ -307,6 +307,11 @@ endfunction()
307307# OUTPUT_FOLDER OPTIONAL: The folder in which the output files have been placed by PODIO_GENERATE_DATAMODEL. Defaults to ${CMAKE_CURRENT_SOURCE_DIR}
308308#---------------------------------------------------------------------------------------------------
309309function (PODIO_ADD_SIO_IO_BLOCKS CORE_LIB HEADERS SOURCES )
310+ if ((DEFINED PODIO_ENABLE_SIO AND NOT PODIO_ENABLE_SIO) OR (NOT DEFINED PODIO_ENABLE_SIO AND NOT ENABLE_SIO))
311+ message (STATUS "Not adding the SIO Blocks library to the targets because SIO support is not enabled" )
312+ return ()
313+ endif ()
314+
310315 CMAKE_PARSE_ARGUMENTS (ARG "" "OUTPUT_FOLDER" "" ${ARGN} )
311316 IF (NOT ARG_OUTPUT_FOLDER)
312317 SET (ARG_OUTPUT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR } )
@@ -316,11 +321,6 @@ function(PODIO_ADD_SIO_IO_BLOCKS CORE_LIB HEADERS SOURCES)
316321 LIST (FILTER HEADERS INCLUDE REGEX .*SIOBlock.h)
317322 LIST (FILTER SOURCES INCLUDE REGEX .*SIOBlock.cc)
318323
319- IF (NOT HEADERS)
320- MESSAGE (STATUS "Not adding the SIO Blocks library to the targets because the corresponding c++ sources have not been generated" )
321- RETURN ()
322- ENDIF ()
323-
324324 add_library (${CORE_LIB} SioBlocks SHARED ${SOURCES} ${HEADERS} )
325325 target_link_libraries (${CORE_LIB} SioBlocks PUBLIC ${CORE_LIB} podio::podio podio::podioSioIO SIO::sio )
326326 target_include_directories (${CORE_LIB} SioBlocks PUBLIC
@@ -348,9 +348,10 @@ endfunction()
348348# OUTPUT_FOLDER OPTIONAL: The folder in which the output files have been placed by PODIO_GENERATE_DATAMODEL. Defaults to ${CMAKE_CURRENT_SOURCE_DIR}
349349#---------------------------------------------------------------------------------------------------
350350function (PODIO_ADD_ARROW CORE_LIB HEADERS SOURCES )
351- if (NOT ENABLE_ARROW)
352- return ()
353- endif ()
351+ if ((DEFINED PODIO_ENABLE_ARROW AND NOT PODIO_ENABLE_ARROW) OR (NOT DEFINED PODIO_ENABLE_ARROW AND NOT ENABLE_ARROW))
352+ message (STATUS "Not adding the Arrow library to the targets because Arrow support is not enabled" )
353+ return ()
354+ endif ()
354355
355356 cmake_parse_arguments (ARG "" "OUTPUT_FOLDER" "" ${ARGN} )
356357 if (NOT ARG_OUTPUT_FOLDER)
@@ -360,11 +361,6 @@ function(PODIO_ADD_ARROW CORE_LIB HEADERS SOURCES)
360361 # Only get the ArrowMapper handlers
361362 list (FILTER SOURCES INCLUDE REGEX .*ArrowMapper.cc)
362363
363- if (NOT SOURCES)
364- message (STATUS "Not adding the Arrow library to the targets because the corresponding c++ sources have not been generated" )
365- return ()
366- endif ()
367-
368364 add_library (${CORE_LIB} Arrow SHARED ${SOURCES} )
369365 target_link_libraries (${CORE_LIB} Arrow PUBLIC ${CORE_LIB} podio::podio ${PODIO_ARROW_TARGET} )
370366 target_include_directories (${CORE_LIB} Arrow PUBLIC
0 commit comments