@@ -29,9 +29,8 @@ option(ADA_TESTING "Build tests" OFF)
2929if (ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
3030 include (cmake/CPM.cmake)
3131 # CPM requires git as an implicit dependency
32- find_package (Git QUIET )
3332 # We use googletest in the tests
34- if (Git_FOUND AND ADA_TESTING)
33+ if (ADA_TESTING)
3534 CPMAddPackage(
3635 NAME GTest
3736 GITHUB_REPOSITORY google/googletest
@@ -40,11 +39,11 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
4039 )
4140 endif ()
4241 # We use simdjson in both the benchmarks and tests
43- if (Git_FOUND AND ( ADA_TESTING OR ADA_BENCHMARKS) )
42+ if (ADA_TESTING OR ADA_BENCHMARKS)
4443 CPMAddPackage(
"gh:simdjson/[email protected] " )
4544 endif ()
4645 # We use Google Benchmark, but it does not build under several 32-bit systems.
47- if (Git_FOUND AND ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
46+ if (ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
4847 CPMAddPackage(
4948 NAME benchmark
5049 GITHUB_REPOSITORY google/benchmark
@@ -57,26 +56,18 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
5756 endif ()
5857
5958 if (ADA_TESTING AND NOT EMSCRIPTEN)
60- if (Git_FOUND)
61- set (CTEST_TEST_TIMEOUT 5)
62- message (STATUS "The tests are enabled." )
63- add_subdirectory (tests)
64- else ()
65- message (STATUS "The tests are disabled because git was not found." )
66- endif ()
59+ set (CTEST_TEST_TIMEOUT 5)
60+ message (STATUS "The tests are enabled." )
61+ add_subdirectory (tests)
6762 else ()
6863 if (is_top_project)
6964 message (STATUS "The tests are disabled." )
7065 endif ()
7166 endif (ADA_TESTING AND NOT EMSCRIPTEN)
7267
7368 If (ADA_BENCHMARKS AND NOT EMSCRIPTEN)
74- if (Git_FOUND)
75- message (STATUS "Ada benchmarks enabled." )
76- add_subdirectory (benchmarks)
77- else ()
78- message (STATUS "The benchmarks are disabled because git was not found." )
79- endif ()
69+ message (STATUS "Ada benchmarks enabled." )
70+ add_subdirectory (benchmarks)
8071 else (ADA_BENCHMARKS AND NOT EMSCRIPTEN)
8172 if (is_top_project)
8273 message (STATUS "Ada benchmarks disabled. Set ADA_BENCHMARKS=ON to enable them." )
@@ -106,11 +97,7 @@ if(NOT ADA_COVERAGE AND NOT EMSCRIPTEN)
10697endif ()
10798
10899if (ADA_TOOLS)
109- if (Git_FOUND)
110- add_subdirectory (tools)
111- else ()
112- message (STATUS "The tools are disabled because git was not found." )
113- endif ()
100+ add_subdirectory (tools)
114101endif ()
115102
116103install (
0 commit comments