Warning, /acts/Examples/Io/Parquet/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # The parquet sources use arrow APIs directly. We compile them as an OBJECT
0002 # library and donate the .o files into libActsPluginArrow via
0003 # target_sources(... $<TARGET_OBJECTS:...>). No libActsExamplesIoParquet.so
0004 # is produced; Acts::ExamplesIoParquet becomes an INTERFACE alias that
0005 # forwards to Acts::PluginArrow.
0006 #
0007 # This layout is independent of ACTS_ARROW_ISOLATED — the OBJECT absorption
0008 # is how we keep all arrow-touching code in one .dylib regardless of whether
0009 # arrow is statically or dynamically linked. Only the visibility settings on
0010 # the OBJECT compile and the linkage of arrow itself change with the toggle.
0011 add_library(
0012 ActsExamplesIoParquet_obj
0013 OBJECT
0014 src/ParquetReader.cpp
0015 src/ParquetWriter.cpp
0016 src/ArrowInputConverter.cpp
0017 )
0018
0019 target_include_directories(
0020 ActsExamplesIoParquet_obj
0021 PRIVATE
0022 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
0023 # Acts::PluginArrow's includes via genex, NOT target_link_libraries,
0024 # because a link-level dep would create a cycle: ActsPluginArrow
0025 # absorbs this OBJECT lib's .o files.
0026 $<TARGET_PROPERTY:Acts::PluginArrow,INTERFACE_INCLUDE_DIRECTORIES>
0027 )
0028
0029 # Arrow/parquet headers come via the ArrowLinkage/ParquetLinkage aliases
0030 # (defined in Plugins/Arrow/CMakeLists.txt). OBJECT libs don't actually link
0031 # — target_link_libraries here just propagates INTERFACE_INCLUDE_DIRECTORIES
0032 # to the compile step.
0033 target_link_libraries(
0034 ActsExamplesIoParquet_obj
0035 PRIVATE
0036 Acts::ExamplesFramework
0037 Acts::ArrowLinkage
0038 Acts::ParquetLinkage
0039 Acts::DatasetLinkage
0040 )
0041
0042 set_target_properties(
0043 ActsExamplesIoParquet_obj
0044 PROPERTIES POSITION_INDEPENDENT_CODE ON
0045 )
0046 if(ACTS_ARROW_ISOLATED)
0047 set_target_properties(
0048 ActsExamplesIoParquet_obj
0049 PROPERTIES CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN YES
0050 )
0051 endif()
0052
0053 target_sources(
0054 ActsPluginArrow
0055 PRIVATE $<TARGET_OBJECTS:ActsExamplesIoParquet_obj>
0056 )
0057 # Donating object files doesn't transfer their link deps; propagate the
0058 # non-arrow link requirements of the donated TUs onto libActsPluginArrow.
0059 target_link_libraries(ActsPluginArrow PRIVATE Acts::ExamplesFramework)
0060
0061 # ActsPluginArrow now links ActsExamplesFramework privately, so CMake's
0062 # install(EXPORT ActsPluginArrowTargets) requires ActsExamplesFramework to
0063 # be in the same export set (otherwise: "target ... not in any export set").
0064 # Add it so the export resolves.
0065 install(TARGETS ActsExamplesFramework EXPORT ActsPluginArrowTargets)
0066
0067 # Preserve the Acts::ExamplesIoParquet target for downstream consumers: an
0068 # INTERFACE alias forwarding to libActsPluginArrow, plus the header include
0069 # directory so downstream code can still #include headers from here.
0070 acts_add_library(ExamplesIoParquet INTERFACE)
0071 target_include_directories(
0072 ActsExamplesIoParquet
0073 INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
0074 )
0075 target_link_libraries(
0076 ActsExamplesIoParquet
0077 INTERFACE Acts::PluginArrow Acts::ExamplesFramework
0078 )
0079
0080 acts_compile_headers(ExamplesIoParquet GLOB include/ActsExamples/**/*.hpp)