-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored detray::io into a single library.
For the moment removed the DETRAY_IO_CSV and DETRAY_IO_JSON cache variables completely. They were not used correctly in every place anyway. So for now the project would always need dfelibs and nlohmann_json to be available. In the move made sure that every I/O header would actually be tested for working by itelf. Which was mistakenly not the case before.
- Loading branch information
Showing
21 changed files
with
81 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,63 @@ | ||
# Detray library, part of the ACTS project (R&D line) | ||
# | ||
# (c) 2021 CERN for the benefit of the ACTS project | ||
# (c) 2021-2023 CERN for the benefit of the ACTS project | ||
# | ||
# Mozilla Public License Version 2.0 | ||
|
||
# Let the user know what's happening. | ||
message(STATUS "Building 'detray::io' component") | ||
|
||
# Create the "main I/O library". | ||
detray_add_library( detray_io io ) | ||
# Set up the core I/O library. | ||
file( GLOB _detray_io_public_headers | ||
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" | ||
"include/detray/io/*.hpp" ) | ||
detray_add_library( detray_io io | ||
${_detray_io_public_headers} ) | ||
target_link_libraries( detray_io INTERFACE | ||
dfelibs::dfelibs nlohmann_json::nlohmann_json vecmem::core detray::core ) | ||
|
||
add_subdirectory ( payload ) | ||
# Set up libraries using particular algebra plugins. | ||
detray_add_library( detray_io_array io_array ) | ||
target_link_libraries( detray_io_array | ||
INTERFACE detray::io detray::algebra_array ) | ||
|
||
# Include all active components. | ||
if( DETRAY_IO_CSV ) | ||
add_subdirectory( csv ) | ||
if( DETRAY_EIGEN_PLUGIN ) | ||
detray_add_library( detray_io_eigen io_eigen ) | ||
target_link_libraries( detray_io_eigen | ||
INTERFACE detray::io detray::algebra_eigen ) | ||
endif() | ||
|
||
if ( DETRAY_IO_JSON ) | ||
add_subdirectory( json ) | ||
endif() | ||
if( DETRAY_SMATRIX_PLUGIN ) | ||
detray_add_library( detray_io_smatrix io_smatrix ) | ||
target_link_libraries( detray_io_smatrix | ||
INTERFACE detray::io detray::algebra_smatrix ) | ||
endif() | ||
|
||
if( DETRAY_VC_PLUGIN ) | ||
detray_add_library( detray_io_vc io_vc ) | ||
target_link_libraries( detray_io_vc | ||
INTERFACE detray::io detray::algebra_vc ) | ||
endif() | ||
|
||
# Test the public headers of the detray I/O libraries. | ||
if( BUILD_TESTING AND DETRAY_BUILD_TESTING ) | ||
string( REPLACE "include/" "" _detray_io_public_headers | ||
"${_detray_io_public_headers}" ) | ||
detray_test_public_headers( detray_io_array | ||
${_detray_io_public_headers} ) | ||
if( DETRAY_EIGEN_PLUGIN ) | ||
detray_test_public_headers( detray_io_eigen | ||
${_detray_io_public_headers} ) | ||
endif() | ||
if( DETRAY_SMATRIX_PLUGIN ) | ||
detray_test_public_headers( detray_io_smatrix | ||
${_detray_io_public_headers} ) | ||
endif() | ||
if( DETRAY_VC_PLUGIN ) | ||
detray_test_public_headers( detray_io_vc | ||
${_detray_io_public_headers} ) | ||
endif() | ||
endif() | ||
|
||
# Clean up. | ||
unset( _detray_io_public_headers ) |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 8 additions & 5 deletions
13
io/json/include/detray/io/json_grids_io.hpp → io/include/detray/io/json_grids_io.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters