From 37a2d440c5f809169d096d3be9a2cfbe9ff38209 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Fri, 20 Dec 2024 16:45:03 +0100 Subject: [PATCH] Remove unused Google benchmark dependency Closes #419 See merge request gysela-developpers/gyselalibxx!827 -------------------------------------------- --- .gitmodules | 3 --- CMakeLists.txt | 24 ----------------------- spack.yaml | 1 - toolchains/a100.leonardo.spack/spack.yaml | 1 - vendor/benchmark | 1 - 5 files changed, 30 deletions(-) delete mode 160000 vendor/benchmark diff --git a/.gitmodules b/.gitmodules index 1448dddf9..ae4d62579 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,9 +2,6 @@ path = vendor/googletest url = https://github.com/google/googletest.git branch = master -[submodule "vendor/benchmark"] - path = vendor/benchmark - url = https://github.com/google/benchmark.git [submodule "vendor/kokkos"] path = vendor/kokkos url = https://github.com/kokkos/kokkos.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 207bca12b..630243710 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,6 @@ list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake") set(CMAKE_CXX_STANDARD 17 CACHE INTERNAL "The C++ standard whose features are requested to build this project.") ## List of options -option(GYSELALIBXX_BUILD_BENCHMARKS "Build the benchmarks." OFF) option(GYSELALIBXX_BUILD_DOCUMENTATION "Build the documentation." OFF) option(GYSELALIBXX_BUILD_SIMULATIONS "Build the simulations." ON) option(GYSELALIBXX_BUILD_TESTING "Build the tests." ON) @@ -91,29 +90,6 @@ if("${GYSELALIBXX_INCLUDE_TESTING_DEPENDENCIES}") endif() endif() -## if benchmarks are enabled, use (google) benchmark from `vendor/` -### we use it to write our micro-benchmarks -### this must come after googletest -if("${GYSELALIBXX_BUILD_BENCHMARKS}") - set(GYSELALIBXX_benchmark_DEPENDENCY_POLICY "AUTO" CACHE STRING "Policy to find the `benchmark` package. Options: ${GYSELALIBXX_DEPENDENCY_POLICIES}") - set_property(CACHE GYSELALIBXX_benchmark_DEPENDENCY_POLICY PROPERTY STRINGS ${GYSELALIBXX_DEPENDENCY_POLICIES}) - - if("${GYSELALIBXX_benchmark_DEPENDENCY_POLICY}" STREQUAL "AUTO") - find_package(benchmark "1.6" QUIET) - if(NOT "${benchmark_FOUND}") - option(BENCHMARK_ENABLE_TESTING "Enable testing of the benchmark library." OFF) - option(BENCHMARK_ENABLE_INSTALL "Enable installation of benchmark. (Projects embedding benchmark may want to turn this OFF.)" OFF) - add_subdirectory("vendor/benchmark/" "benchmark") # SYSTEM) - endif() - elseif("${GYSELALIBXX_benchmark_DEPENDENCY_POLICY}" STREQUAL "EMBEDDED") - option(BENCHMARK_ENABLE_TESTING "Enable testing of the benchmark library." OFF) - option(BENCHMARK_ENABLE_INSTALL "Enable installation of benchmark. (Projects embedding benchmark may want to turn this OFF.)" OFF) - add_subdirectory("vendor/benchmark/" "benchmark") # SYSTEM) - elseif("${GYSELALIBXX_benchmark_DEPENDENCY_POLICY}" STREQUAL "INSTALLED") - find_package(benchmark "1.6" REQUIRED) - endif() -endif() - ## Use Kokkos from `vendor/` if("${Kokkos_ENABLE_CUDA}") option(Kokkos_ENABLE_CUDA_CONSTEXPR "Whether to activate experimental relaxed constexpr functions" ON) diff --git a/spack.yaml b/spack.yaml index ecd0d0b62..c6c46c6a6 100644 --- a/spack.yaml +++ b/spack.yaml @@ -3,7 +3,6 @@ spack: unify: when_possible specs: - 'cmake@3.15:' - - 'benchmark' - 'googletest +gmock' - 'fftw ~mpi precision=double' - 'lapack' diff --git a/toolchains/a100.leonardo.spack/spack.yaml b/toolchains/a100.leonardo.spack/spack.yaml index 56a578804..1188afedf 100644 --- a/toolchains/a100.leonardo.spack/spack.yaml +++ b/toolchains/a100.leonardo.spack/spack.yaml @@ -5,7 +5,6 @@ spack: - compilers: - gcc@12 - packages: - - benchmark - cmake@3.22:3 - cuda - eigen diff --git a/vendor/benchmark b/vendor/benchmark deleted file mode 160000 index f91b6b42b..000000000 --- a/vendor/benchmark +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f91b6b42b1b9854772a90ae9501464a161707d1e