diff --git a/.merge-sentinel.yml b/.merge-sentinel.yml index f62cdb682ce..1394407a063 100644 --- a/.merge-sentinel.yml +++ b/.merge-sentinel.yml @@ -14,6 +14,7 @@ rules: required_checks: - Docs / docs - Analysis / build_debug + - SonarCloud Code Analysis required_pattern: - "Builds / *" diff --git a/Core/include/Acts/EventData/TrackStateType.hpp b/Core/include/Acts/EventData/TrackStateType.hpp index e0d048a2e5e..8320c5c950d 100644 --- a/Core/include/Acts/EventData/TrackStateType.hpp +++ b/Core/include/Acts/EventData/TrackStateType.hpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace Acts { @@ -38,7 +39,7 @@ class TrackStateType { public: using raw_type = std::uint64_t; static constexpr std::size_t kRawBits = - std::numeric_limits::type>::digits; + std::numeric_limits>::digits; // Delete default constructor TrackStateType() = delete; @@ -106,7 +107,7 @@ class ConstTrackStateType { public: using raw_type = std::uint64_t; static constexpr std::size_t kRawBits = - std::numeric_limits::type>::digits; + std::numeric_limits>::digits; // Delete default constructor ConstTrackStateType() = delete; diff --git a/Core/include/Acts/Propagator/Propagator.ipp b/Core/include/Acts/Propagator/Propagator.ipp index 8ff4d825047..e3bf84551fa 100644 --- a/Core/include/Acts/Propagator/Propagator.ipp +++ b/Core/include/Acts/Propagator/Propagator.ipp @@ -13,7 +13,7 @@ #include "Acts/Propagator/StandardAborters.hpp" #include "Acts/Propagator/detail/LoopProtection.hpp" -#include +#include namespace Acts::detail { template @@ -113,9 +113,8 @@ auto Acts::Propagator::propagate(const parameters_t& start, -> Result< actor_list_t_result_t> { - static_assert( - std::is_copy_constructible::value, - "return track parameter type must be copy-constructible"); + static_assert(std::copy_constructible, + "return track parameter type must be copy-constructible"); auto state = makeState(start, options); @@ -158,7 +157,7 @@ auto Acts::Propagator::makeState( // Type of track parameters produced by the propagation using ReturnParameterType = StepperCurvilinearTrackParameters; - static_assert(std::is_copy_constructible::value, + static_assert(std::copy_constructible, "return track parameter type must be copy-constructible"); // Expand the abort list with a path aborter @@ -246,7 +245,7 @@ auto Acts::Propagator::makeResult(propagator_state_t state, // Type of track parameters produced by the propagation using ReturnParameterType = StepperCurvilinearTrackParameters; - static_assert(std::is_copy_constructible::value, + static_assert(std::copy_constructible, "return track parameter type must be copy-constructible"); // Type of the full propagation result, including output from actors @@ -291,7 +290,7 @@ auto Acts::Propagator::makeResult( // Type of track parameters produced at the end of the propagation using ReturnParameterType = StepperBoundTrackParameters; - static_assert(std::is_copy_constructible::value, + static_assert(std::copy_constructible, "return track parameter type must be copy-constructible"); // Type of the full propagation result, including output from actors diff --git a/Core/include/Acts/Seeding/detail/CylindricalSpacePointGrid.ipp b/Core/include/Acts/Seeding/detail/CylindricalSpacePointGrid.ipp index af31df18d01..c0fc958623d 100644 --- a/Core/include/Acts/Seeding/detail/CylindricalSpacePointGrid.ipp +++ b/Core/include/Acts/Seeding/detail/CylindricalSpacePointGrid.ipp @@ -6,6 +6,8 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. +#include + template Acts::CylindricalSpacePointGrid Acts::CylindricalSpacePointGridCreator::createGrid( @@ -142,12 +144,12 @@ void Acts::CylindricalSpacePointGridCreator::fillGrid( external_spacepoint_iterator_t spBegin, external_spacepoint_iterator_t spEnd, Acts::Extent& rRangeSPExtent) { using iterated_value_t = - typename std::iterator_traits::value_type; - using iterated_t = typename std::remove_const< - typename std::remove_pointer::type>::type; - static_assert(!std::is_pointer::value, + typename std::iter_value_t; + using iterated_t = typename std::remove_const_t< + typename std::remove_pointer_t>; + static_assert(!std::is_pointer_v, "Iterator must contain pointers to space points"); - static_assert(std::is_same::value, + static_assert(std::same_as, "Iterator does not contain type this class was templated with"); if (!config.isInInternalUnits) { diff --git a/Core/include/Acts/Surfaces/ConvexPolygonBounds.hpp b/Core/include/Acts/Surfaces/ConvexPolygonBounds.hpp index abb46017b02..738e78bd113 100644 --- a/Core/include/Acts/Surfaces/ConvexPolygonBounds.hpp +++ b/Core/include/Acts/Surfaces/ConvexPolygonBounds.hpp @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -54,6 +55,7 @@ class ConvexPolygonBoundsBase : public PlanarBounds { /// @param vertices A collection of vertices. /// throws a logic error if this is not the case template + requires std::same_as static void convex_impl(const coll_t& vertices) noexcept(false); }; diff --git a/Core/include/Acts/Surfaces/ConvexPolygonBounds.ipp b/Core/include/Acts/Surfaces/ConvexPolygonBounds.ipp index 8b731019bf2..39532e08b73 100644 --- a/Core/include/Acts/Surfaces/ConvexPolygonBounds.ipp +++ b/Core/include/Acts/Surfaces/ConvexPolygonBounds.ipp @@ -10,14 +10,13 @@ #include "Acts/Surfaces/detail/BoundaryCheckHelper.hpp" #include "Acts/Utilities/ThrowAssert.hpp" +#include #include template + requires std::same_as void Acts::ConvexPolygonBoundsBase::convex_impl( const coll_t& vertices) noexcept(false) { - static_assert(std::is_same::value, - "Must be collection of Vector2"); - const std::size_t N = vertices.size(); for (std::size_t i = 0; i < N; i++) { std::size_t j = (i + 1) % N; diff --git a/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp b/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp index f09656da679..a031e22ffe2 100644 --- a/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp +++ b/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -357,10 +358,7 @@ class CombinatorialKalmanFilter { const auto& [boundParams, jacobian, pathLength] = boundState; trackStateCandidates.clear(); - if constexpr (std::is_same_v< - typename std::iterator_traits< - source_link_iterator_t>::iterator_category, - std::random_access_iterator_tag>) { + if constexpr (std::ranges::random_access_range) { trackStateCandidates.reserve(std::distance(slBegin, slEnd)); } diff --git a/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp b/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp index 7f96cba0e2e..5b24ceaa40b 100644 --- a/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp +++ b/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp @@ -45,6 +45,7 @@ #include #include #include +#include #include namespace Acts::Experimental { @@ -513,7 +514,7 @@ class Gx2Fitter { /// The navigator has DirectNavigator type or not static constexpr bool isDirectNavigator = - std::is_same::value; + std::is_same_v; public: Gx2Fitter(propagator_t pPropagator, diff --git a/Core/include/Acts/TrackFitting/KalmanFitter.hpp b/Core/include/Acts/TrackFitting/KalmanFitter.hpp index 6f01099cec7..ac7e32cf0b4 100644 --- a/Core/include/Acts/TrackFitting/KalmanFitter.hpp +++ b/Core/include/Acts/TrackFitting/KalmanFitter.hpp @@ -37,6 +37,7 @@ #include #include #include +#include namespace Acts { @@ -264,7 +265,7 @@ class KalmanFitter { /// The navigator has DirectNavigator type or not static constexpr bool isDirectNavigator = - std::is_same::value; + std::is_same_v; public: KalmanFitter(propagator_t pPropagator, diff --git a/Core/include/Acts/Utilities/Concepts.hpp b/Core/include/Acts/Utilities/Concepts.hpp index 61887d0fd99..2fd62995124 100644 --- a/Core/include/Acts/Utilities/Concepts.hpp +++ b/Core/include/Acts/Utilities/Concepts.hpp @@ -20,8 +20,7 @@ concept same_as_any_of = (std::same_as || ...); /// @brief Concept that is equivalent to `is_nothrow_move_constructible`. /// @todo Convert this to a "real" concept. template -concept nothrow_move_constructible = - std::is_nothrow_move_constructible::value; +concept nothrow_move_constructible = std::is_nothrow_move_constructible_v; /// @brief Concept that is true if T is an arithmetic type. template diff --git a/Core/include/Acts/Utilities/FiniteStateMachine.hpp b/Core/include/Acts/Utilities/FiniteStateMachine.hpp index b7c2520f748..1fa1953a3ae 100644 --- a/Core/include/Acts/Utilities/FiniteStateMachine.hpp +++ b/Core/include/Acts/Utilities/FiniteStateMachine.hpp @@ -119,8 +119,7 @@ class FiniteStateMachine { /// Default constructor. The default state is taken to be the first in the /// `States` template arguments FiniteStateMachine() - : m_state(typename std::tuple_element<0, std::tuple>::type{}) { - } + : m_state(typename std::tuple_element_t<0, std::tuple>{}) {} /// Constructor from an explicit state. The FSM is initialized to this state. /// @param state Initial state for the FSM. diff --git a/Core/include/Acts/Utilities/GridBinFinder.ipp b/Core/include/Acts/Utilities/GridBinFinder.ipp index 2e9b792c17a..9c3fd3956ff 100644 --- a/Core/include/Acts/Utilities/GridBinFinder.ipp +++ b/Core/include/Acts/Utilities/GridBinFinder.ipp @@ -6,6 +6,8 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. +#include + template template void Acts::GridBinFinder::storeValue(first_value_t&& fv, @@ -13,13 +15,12 @@ void Acts::GridBinFinder::storeValue(first_value_t&& fv, constexpr std::size_t N = sizeof...(vals); static_assert(N < DIM); /// Check the fist value is reasonable - using decayed_value_t = typename std::decay::type; - if constexpr (std::is_same::value) { + using decayed_value_t = typename std::decay_t; + if constexpr (std::is_same_v) { /// if int -> value is positive assert(fv >= 0); m_values[DIM - N - 1ul] = fv; - } else if constexpr (std::is_same, - decayed_value_t>::value) { + } else if constexpr (std::is_same_v, decayed_value_t>) { m_values[DIM - N - 1ul] = fv; } else { /// If vector of pairs -> also allow for empty vectors @@ -41,12 +42,11 @@ std::array, DIM> Acts::GridBinFinder::getSizePerAxis( for (std::size_t i(0ul); i < DIM; ++i) { output[i] = std::visit( [&locPosition, i](const auto& val) -> std::pair { - using value_t = typename std::decay::type; - if constexpr (std::is_same::value) { + using value_t = typename std::decay_t; + if constexpr (std::is_same_v) { assert(val >= 0); return std::make_pair(-val, val); - } else if constexpr (std::is_same, - value_t>::value) { + } else if constexpr (std::is_same_v, value_t>) { return std::make_pair(-val.first, val.second); } else { assert(locPosition.size() > i); @@ -82,9 +82,9 @@ bool Acts::GridBinFinder::isGridCompatible( std::size_t nBins = nLocBins[i]; bool isCompabile = std::visit( [nBins](const auto& val) -> bool { - using value_t = typename std::decay::type; - if constexpr (std::is_same::value || - std::is_same, value_t>::value) { + using value_t = typename std::decay_t; + if constexpr (std::is_same_v || + std::is_same_v, value_t>) { return true; } else { return val.size() == nBins; diff --git a/Core/include/Acts/Utilities/TransformRange.hpp b/Core/include/Acts/Utilities/TransformRange.hpp index d57b14519c2..d955e6d6a35 100644 --- a/Core/include/Acts/Utilities/TransformRange.hpp +++ b/Core/include/Acts/Utilities/TransformRange.hpp @@ -148,8 +148,7 @@ struct TransformRange { template struct TransformRangeIterator { private: - using internal_value_type = - typename std::iterator_traits::value_type; + using internal_value_type = typename std::iter_value_t; using raw_value_type = std::remove_reference_t()))>; @@ -162,8 +161,7 @@ struct TransformRangeIterator { std::conditional_t, raw_value_type>; - using difference_type = - typename std::iterator_traits::difference_type; + using difference_type = typename std::iter_difference_t; using pointer = std::remove_reference_t*; using reference = value_type&; using iterator_category = std::forward_iterator_tag; diff --git a/Core/include/Acts/Utilities/detail/interpolation_impl.hpp b/Core/include/Acts/Utilities/detail/interpolation_impl.hpp index c1942ae287d..29021ad5bbd 100644 --- a/Core/include/Acts/Utilities/detail/interpolation_impl.hpp +++ b/Core/include/Acts/Utilities/detail/interpolation_impl.hpp @@ -46,14 +46,14 @@ struct can_interpolate { static std::false_type point_type_test(...); static const bool value = - std::is_same(nullptr))>::value && - std::is_same(nullptr))>::value && - std::is_same(nullptr))>::value && - std::is_same(nullptr))>::value; + std::is_same_v(nullptr))> && + std::is_same_v(nullptr))> && + std::is_same_v(nullptr))> && + std::is_same_v(nullptr))>; }; /// @brief concept equivalent to `can_interpolate` diff --git a/Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvInputOutput.hpp b/Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvInputOutput.hpp index fe7756d860a..b0f4f0f16b4 100644 --- a/Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvInputOutput.hpp +++ b/Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvInputOutput.hpp @@ -273,9 +273,8 @@ class NamedTupleDsvWriter { /// Append a record to the file. void append(const NamedTuple& record) { - append_impl(record, - std::make_index_sequence< - std::tuple_size::value>{}); + append_impl(record, std::make_index_sequence< + std::tuple_size_v>{}); } private: @@ -548,8 +547,7 @@ inline bool NamedTupleDsvReader::read( std::to_string(m_reader.num_lines())); } // convert to tuple - parse_record(record, - std::make_index_sequence::value>{}); + parse_record(record, std::make_index_sequence>{}); return true; } @@ -572,7 +570,7 @@ inline bool NamedTupleDsvReader::read( template inline void NamedTupleDsvReader::use_default_columns() { // assume row content is identical in content and order to the tuple - m_num_columns = std::tuple_size::value; + m_num_columns = std::tuple_size_v; for (std::size_t i = 0; i < m_tuple_column_map.size(); ++i) { m_tuple_column_map[i] = i; } diff --git a/Plugins/Json/include/Acts/Plugins/Json/GeometryHierarchyMapJsonConverter.hpp b/Plugins/Json/include/Acts/Plugins/Json/GeometryHierarchyMapJsonConverter.hpp index e4c4ed06fea..f6a5759dfd9 100644 --- a/Plugins/Json/include/Acts/Plugins/Json/GeometryHierarchyMapJsonConverter.hpp +++ b/Plugins/Json/include/Acts/Plugins/Json/GeometryHierarchyMapJsonConverter.hpp @@ -155,7 +155,7 @@ nlohmann::json GeometryHierarchyMapJsonConverter::toJson( for (std::size_t i = 0; i < container.size(); ++i) { auto entry = encodeIdentifier(container.idAt(i)); auto value_json = nlohmann::json(container.valueAt(i)); - if constexpr (!std::is_same::value) { + if constexpr (!std::is_same_v) { decorateJson(decorator, container.valueAt(i), value_json); } entry["value"] = std::move(value_json); diff --git a/Tests/UnitTests/Core/EventData/TrackStatePropMaskTests.cpp b/Tests/UnitTests/Core/EventData/TrackStatePropMaskTests.cpp index 21c8a5e62ea..c1264bec54f 100644 --- a/Tests/UnitTests/Core/EventData/TrackStatePropMaskTests.cpp +++ b/Tests/UnitTests/Core/EventData/TrackStatePropMaskTests.cpp @@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE(BitmaskOperators) { BOOST_CHECK(!ACTS_CHECK_BIT(bs4, PM::Filtered)); auto cnv = [](auto a) -> std::bitset<8> { - return static_cast::type>(a); + return static_cast>(a); }; BOOST_CHECK(cnv(PM::All).all()); // all ones diff --git a/Tests/UnitTests/Core/TrackFitting/Gx2fTests.cpp b/Tests/UnitTests/Core/TrackFitting/Gx2fTests.cpp index 858dedde94f..b187b767c30 100644 --- a/Tests/UnitTests/Core/TrackFitting/Gx2fTests.cpp +++ b/Tests/UnitTests/Core/TrackFitting/Gx2fTests.cpp @@ -14,12 +14,10 @@ #include "Acts/EventData/VectorTrackContainer.hpp" #include "Acts/EventData/detail/TestSourceLink.hpp" #include "Acts/Geometry/CuboidVolumeBuilder.hpp" -#include "Acts/Geometry/Layer.hpp" #include "Acts/Geometry/TrackingGeometry.hpp" #include "Acts/Geometry/TrackingGeometryBuilder.hpp" #include "Acts/MagneticField/ConstantBField.hpp" #include "Acts/Material/HomogeneousSurfaceMaterial.hpp" -#include "Acts/Material/HomogeneousVolumeMaterial.hpp" #include "Acts/Material/MaterialSlab.hpp" #include "Acts/Propagator/EigenStepper.hpp" #include "Acts/Propagator/Navigator.hpp" @@ -210,117 +208,6 @@ std::shared_ptr makeToyDetector( return detector; } -/// @brief Create a simple telescope detector in the Y direction. -/// -/// We cannot reuse the previous detector, since the cuboid volume builder only -/// allows merging of YZ-faces. -/// -/// @param geoCtx -/// @param nSurfaces Number of surfaces -std::shared_ptr makeToyDetectorYdirection( - const Acts::GeometryContext& geoCtx, const std::size_t nSurfaces = 5) { - if (nSurfaces < 1) { - throw std::invalid_argument("At least 1 surfaces needs to be created."); - } - - // Define the dimensions of the square surfaces - const double halfSizeSurface = 1_m; - - // Rotation of the surfaces around the x-axis - const double rotationAngle = M_PI * 0.5; - const Vector3 xPos(1., 0., 0.); - const Vector3 yPos(0., cos(rotationAngle), sin(rotationAngle)); - const Vector3 zPos(0., -sin(rotationAngle), cos(rotationAngle)); - - // Construct builder - CuboidVolumeBuilder cvb; - - // Create configurations for surfaces - std::vector surfaceConfig; - for (std::size_t surfPos = 1; surfPos <= nSurfaces; surfPos++) { - // Position of the surfaces - CuboidVolumeBuilder::SurfaceConfig cfg; - cfg.position = {0., surfPos * UnitConstants::m, 0.}; - - // Rotation of the surfaces - cfg.rotation.col(0) = xPos; - cfg.rotation.col(1) = yPos; - cfg.rotation.col(2) = zPos; - - // Boundaries of the surfaces (shape) - cfg.rBounds = std::make_shared( - RectangleBounds(halfSizeSurface, halfSizeSurface)); - - // Thickness of the detector element - cfg.thickness = 1_um; - - cfg.detElementConstructor = - [](const Transform3& trans, - const std::shared_ptr& bounds, - double thickness) { - return new DetectorElementStub(trans, bounds, thickness); - }; - surfaceConfig.push_back(cfg); - } - - // Build layer configurations - std::vector layerConfig; - for (auto& sCfg : surfaceConfig) { - CuboidVolumeBuilder::LayerConfig cfg; - cfg.surfaceCfg = {sCfg}; - cfg.active = true; - cfg.envelopeX = {-0.1_mm, 0.1_mm}; - cfg.envelopeY = {-0.1_mm, 0.1_mm}; - cfg.envelopeZ = {-0.1_mm, 0.1_mm}; - cfg.binningDimension = Acts::BinningValue::binY; - layerConfig.push_back(cfg); - } - - // Inner Volume - Build volume configuration - CuboidVolumeBuilder::VolumeConfig volumeConfig; - volumeConfig.length = {2 * halfSizeSurface, (nSurfaces + 1) * 1_m, - 2 * halfSizeSurface}; - volumeConfig.position = {0., volumeConfig.length.y() / 2, 0.}; - volumeConfig.layerCfg = layerConfig; - volumeConfig.name = "TestVolume"; - volumeConfig.binningDimension = Acts::BinningValue::binY; - - // This basically adds an empty volume in y-direction - // Second inner Volume - Build volume configuration - CuboidVolumeBuilder::VolumeConfig volumeConfig2; - // volumeConfig2.length = volumeConfig.length; - volumeConfig2.length = {2 * halfSizeSurface, (nSurfaces + 1) * 1_m, - 2 * halfSizeSurface}; - ; - volumeConfig2.position = {volumeConfig2.length.x(), - volumeConfig2.length.y() / 2, 0.}; - volumeConfig2.name = "AdditionalVolume"; - volumeConfig2.binningDimension = Acts::BinningValue::binY; - - // Outer volume - Build TrackingGeometry configuration and fill - CuboidVolumeBuilder::Config config; - config.length = {4 * halfSizeSurface, (nSurfaces + 1) * 1_m, - 2 * halfSizeSurface}; - config.position = {volumeConfig.length.x() / 2, volumeConfig.length.y() / 2, - 0.}; - config.volumeCfg = {volumeConfig, volumeConfig2}; - - cvb.setConfig(config); - - TrackingGeometryBuilder::Config tgbCfg; - - tgbCfg.trackingVolumeBuilders.push_back( - [=](const auto& context, const auto& inner, const auto&) { - return cvb.trackingVolume(context, inner, nullptr); - }); - - TrackingGeometryBuilder tgb(tgbCfg); - - std::unique_ptr detector = - tgb.trackingGeometry(geoCtx); - return detector; -} - struct Detector { // geometry std::shared_ptr geometry; diff --git a/Tests/UnitTests/Core/Utilities/ExtendableTests.cpp b/Tests/UnitTests/Core/Utilities/ExtendableTests.cpp index 4df89af39d2..2543908fd3f 100644 --- a/Tests/UnitTests/Core/Utilities/ExtendableTests.cpp +++ b/Tests/UnitTests/Core/Utilities/ExtendableTests.cpp @@ -33,7 +33,7 @@ BOOST_AUTO_TEST_CASE(Extendable_) { // Test the empty list detail::Extendable<> nullist{}; (void)nullist; - BOOST_CHECK_EQUAL(std::tuple_size>::value, 0u); + BOOST_CHECK_EQUAL(std::tuple_size_v>, 0u); detail::Extendable alist; auto& a0_object = alist.get(); diff --git a/Tests/UnitTests/Core/Utilities/GridTests.cpp b/Tests/UnitTests/Core/Utilities/GridTests.cpp index 3976fc35970..046358da431 100644 --- a/Tests/UnitTests/Core/Utilities/GridTests.cpp +++ b/Tests/UnitTests/Core/Utilities/GridTests.cpp @@ -17,11 +17,11 @@ #include #include +#include #include #include #include #include -#include #include #include @@ -1308,10 +1308,10 @@ BOOST_AUTO_TEST_CASE(grid_type_conversion) { Grid g2(Type, std::move(a), std::move(b)); decltype(g2) g2Copy(g2.axesTuple()); - static_assert(std::is_same::value); + static_assert(std::same_as); auto g2ConvertedInt = g2Copy.convertType(); - static_assert(std::is_same::value); + static_assert(std::same_as); } BOOST_AUTO_TEST_CASE(grid_full_conversion) { diff --git a/thirdparty/Annoy/CMakeLists.txt b/thirdparty/Annoy/CMakeLists.txt index c6b39568e8d..e115758dc46 100644 --- a/thirdparty/Annoy/CMakeLists.txt +++ b/thirdparty/Annoy/CMakeLists.txt @@ -20,11 +20,7 @@ FetchContent_Declare( Annoy ${ACTS_ANNOY_SOURCE} PATCH_COMMAND - "${CMAKE_COMMAND}" -E chdir ${GIT_EXECUTABLE} config - user.name "CI" && "${CMAKE_COMMAND}" -E chdir - ${GIT_EXECUTABLE} config user.email "<>" && "${CMAKE_COMMAND}" -E chdir - ${GIT_EXECUTABLE} am - ${CMAKE_CURRENT_SOURCE_DIR}/0001-Modify-annoy.patch + patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/0001-Modify-annoy.patch ) # Make the fetched content available.