@@ -29,9 +29,8 @@ option(ADA_TESTING "Build tests" OFF)
29
29
if (ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
30
30
include (cmake/CPM.cmake)
31
31
# CPM requires git as an implicit dependency
32
- find_package (Git QUIET )
33
32
# We use googletest in the tests
34
- if (Git_FOUND AND ADA_TESTING)
33
+ if (ADA_TESTING)
35
34
CPMAddPackage(
36
35
NAME GTest
37
36
GITHUB_REPOSITORY google/googletest
@@ -40,11 +39,11 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
40
39
)
41
40
endif ()
42
41
# 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)
44
43
CPMAddPackage(
"gh:simdjson/[email protected] " )
45
44
endif ()
46
45
# 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))
48
47
CPMAddPackage(
49
48
NAME benchmark
50
49
GITHUB_REPOSITORY google/benchmark
@@ -57,26 +56,18 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
57
56
endif ()
58
57
59
58
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)
67
62
else ()
68
63
if (is_top_project)
69
64
message (STATUS "The tests are disabled." )
70
65
endif ()
71
66
endif (ADA_TESTING AND NOT EMSCRIPTEN)
72
67
73
68
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)
80
71
else (ADA_BENCHMARKS AND NOT EMSCRIPTEN)
81
72
if (is_top_project)
82
73
message (STATUS "Ada benchmarks disabled. Set ADA_BENCHMARKS=ON to enable them." )
@@ -106,11 +97,7 @@ if(NOT ADA_COVERAGE AND NOT EMSCRIPTEN)
106
97
endif ()
107
98
108
99
if (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)
114
101
endif ()
115
102
116
103
install (
0 commit comments