-
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.
Re-organised the build of the external projects.
Switched all of them to be built using FetchContent instead of using git submodules. Added an external for VecMem directly, so the project would not need to rely on algebra-plugins to get access to that external. Wrote a custom configuration for installing the dfe headers together with the project. Such that it would become possible to export the targets of this project eventually as well. Updated all components to use the externals through their "exported names".
- Loading branch information
Showing
25 changed files
with
387 additions
and
92 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +0,0 @@ | ||
[submodule "extern/googletest"] | ||
path = extern/googletest | ||
url = https://github.com/google/googletest.git | ||
[submodule "extern/benchmark"] | ||
path = extern/benchmark | ||
url = https://github.com/google/benchmark.git | ||
[submodule "extern/dfelibs"] | ||
path = extern/dfelibs | ||
url = https://github.com/acts-project/dfelibs.git | ||
[submodule "extern/matplotplusplus"] | ||
path = extern/matplotplusplus | ||
url = https://github.com/alandefreitas/matplotplusplus.git | ||
[submodule "extern/algebra-plugins"] | ||
path = extern/algebra-plugins | ||
url = https://github.com/acts-project/algebra-plugins.git | ||
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 was deleted.
Oops, something went wrong.
Submodule algebra-plugins
deleted from
8e093e
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Detray library, part of the ACTS project (R&D line) | ||
# | ||
# (c) 2021 CERN for the benefit of the ACTS project | ||
# | ||
# Mozilla Public License Version 2.0 | ||
|
||
# CMake include(s). | ||
cmake_minimum_required( VERSION 3.14 ) | ||
include( FetchContent ) | ||
|
||
# Tell the user what's happening. | ||
message( STATUS "Building Algebra Plugins as part of the Detray project" ) | ||
|
||
# Declare where to get Algebra Plugins from. | ||
FetchContent_Declare( AlgebraPlugins | ||
GIT_REPOSITORY "https://github.com/krasznaa/algebra-plugins.git" | ||
GIT_TAG "e6245fcab63a2f26581fabaf9a31f78a6dd7d3d3" ) | ||
|
||
# Options used in the build of Algebra Plugins. | ||
set( ALGEBRA_PLUGIN_BUILD_TESTING FALSE CACHE BOOL | ||
"Turn off the build of the Algebra Plugins unit tests" ) | ||
set( ALGEBRA_PLUGIN_INCLUDE_ARRAY TRUE CACHE BOOL | ||
"Turn on the build of algebra::array" ) | ||
set( ALGEBRA_PLUGIN_INCLUDE_EIGEN TRUE CACHE BOOL | ||
"Turn on the build of algebra::eigen" ) | ||
set( ALGEBRA_PLUGIN_INCLUDE_VC TRUE CACHE BOOL | ||
"Turn on the build of algebra::vc_array" ) | ||
set( ALGEBRA_PLUGIN_INCLUDE_VECMEM TRUE CACHE BOOL | ||
"Turn on the build of algebra::vecmem_array" ) | ||
|
||
set( ALGEBRA_PLUGIN_SETUP_EIGEN3 TRUE CACHE BOOL | ||
"Have Algebra Plugins set up Eigen3 for itself" ) | ||
set( ALGEBRA_PLUGIN_SETUP_VC TRUE CACHE BOOL | ||
"Have Algebra Plugins set up Vc for itself" ) | ||
set( ALGEBRA_PLUGIN_USE_SYSTEM_VC FALSE CACHE BOOL | ||
"Have Algebra Plugins build Vc itself" ) | ||
set( ALGEBRA_PLUGIN_SETUP_VECMEM FALSE CACHE BOOL | ||
"Do not set up VecMem in Algebra Plugins" ) | ||
set( ALGEBRA_PLUGIN_SETUP_GOOGLETEST FALSE CACHE BOOL | ||
"Do not set up GoogleTest in Algebra Plugins" ) | ||
|
||
# Get it into the current directory. | ||
FetchContent_MakeAvailable( AlgebraPlugins ) |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Build Recipe for Algebra Plugins | ||
|
||
This directory holds a build recipe for the | ||
[algebra-plugins](https://github.com/acts-project/algebra-plugins) project. |
Submodule benchmark
deleted from
bf585a
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Detray library, part of the ACTS project (R&D line) | ||
# | ||
# (c) 2021 CERN for the benefit of the ACTS project | ||
# | ||
# Mozilla Public License Version 2.0 | ||
|
||
# CMake include(s). | ||
cmake_minimum_required( VERSION 3.11 ) | ||
include( FetchContent ) | ||
|
||
# Tell the user what's happening. | ||
message( STATUS "Building Google Benchmark as part of the Detray project" ) | ||
|
||
# Declare where to get Google Benchmark from. | ||
FetchContent_Declare( Benchmark | ||
URL "https://github.com/google/benchmark/archive/refs/tags/v1.6.0.tar.gz" | ||
URL_MD5 "a7cb118b00430e22cb16774a28fce7ec" ) | ||
|
||
# Options used in the build of Google Benchmark. | ||
set( BENCHMARK_ENABLE_TESTING OFF CACHE BOOL | ||
"Turn off the tests in Google Benchmark" ) | ||
|
||
# Get it into the current directory. | ||
FetchContent_Populate( Benchmark ) | ||
add_subdirectory( "${benchmark_SOURCE_DIR}" "${benchmark_BINARY_DIR}" | ||
EXCLUDE_FROM_ALL ) | ||
|
||
# Set up an alias for the Google Benchmark target with the same name that it | ||
# has when we find it pre-installed. | ||
add_library( benchmark::benchmark ALIAS benchmark ) |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Google Benchmark Build Instructions | ||
|
||
This subdirectory holds instructions for building | ||
[benchmark](https://github.com/google/benchmark) as part of this project. | ||
This is meant to come in handy for building the project's benchmarks in | ||
environments which do not provide Google Branchmark themselves. | ||
|
||
Note that since Google Benchmark is only needed for the tests of this project, | ||
which are not installed together with the project, Google Benchmark is not | ||
installed together with the project either. |
Submodule dfelibs
deleted from
28c0ee
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Detray library, part of the ACTS project (R&D line) | ||
# | ||
# (c) 2021 CERN for the benefit of the ACTS project | ||
# | ||
# Mozilla Public License Version 2.0 | ||
|
||
# CMake include(s). | ||
cmake_minimum_required( VERSION 3.11 ) | ||
include( FetchContent ) | ||
|
||
# Tell the user what's happening. | ||
message( STATUS "Building dfelibs as part of the Detray project" ) | ||
|
||
# Declare where to get dfelibs from. | ||
FetchContent_Declare( dfelibs | ||
URL "https://github.com/msmk0/dfelibs/archive/refs/tags/v20200416.tar.gz" | ||
URL_MD5 "d762f22a92d6a1aa6f88b3d48d426bad" ) | ||
|
||
# Get it into the current directory. | ||
FetchContent_Populate( dfelibs ) | ||
|
||
# Set up a proper target and installation for the dfelibs headers. One that | ||
# could be used correctly in the exported target(s) of Detray. | ||
add_library( dfelibs INTERFACE ) | ||
target_include_directories( dfelibs INTERFACE | ||
$<BUILD_INTERFACE:${dfelibs_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> ) | ||
add_library( dfelibs::dfelibs ALIAS dfelibs ) | ||
install( DIRECTORY "${dfelibs_SOURCE_DIR}/dfe" | ||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) | ||
install( TARGETS dfelibs | ||
EXPORT dfelibs-exports ) | ||
|
||
include( CMakePackageConfigHelpers ) | ||
set( CMAKE_INSTALL_CMAKEDIR | ||
"${CMAKE_INSTALL_LIBDIR}/cmake/dfelibs-20200416" ) | ||
install( EXPORT dfelibs-exports | ||
NAMESPACE "dfelibs::" | ||
FILE "dfelibs-config-targets.cmake" | ||
DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" ) | ||
configure_package_config_file( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/dfelibs-config.cmake.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dfelibs-config.cmake" | ||
INSTALL_DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" | ||
PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_CMAKEDIR | ||
NO_CHECK_REQUIRED_COMPONENTS_MACRO ) | ||
write_basic_package_version_file( | ||
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dfelibs-config-version.cmake" | ||
VERSION "20200416" | ||
COMPATIBILITY "AnyNewerVersion" ) | ||
install( FILES | ||
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dfelibs-config.cmake" | ||
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dfelibs-config-version.cmake" | ||
DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" ) |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Build Recipe for dfelibs | ||
|
||
This directory holds a simple build recipe for the | ||
[dfelibs](https://github.com/msmk0/dfelibs) project. |
Oops, something went wrong.