Skip to content

Commit 899e14e

Browse files
authored
fix(cmake): include CPM.make before calling CPMAddPackage (#1064)
1 parent b3afb91 commit 899e14e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ option(ADA_USE_SIMDUTF "Whether to use SIMDUTF for IDNA" OFF)
2525
# projects as submodules or subdirectories (via FetchContent) can lead to
2626
# errors due to CPM, so this is here to support disabling all the testing
2727
# and tooling for ada if one only wishes to use the ada library.
28-
if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
28+
if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS OR ADA_USE_SIMDUTF)
2929
include(cmake/CPM.cmake)
3030
# CPM requires git as an implicit dependency
3131
# We use googletest in the tests
@@ -90,15 +90,15 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
9090
if (ADA_TESTING AND EMSCRIPTEN)
9191
add_subdirectory(tests/wasm)
9292
endif(ADA_TESTING AND EMSCRIPTEN)
93-
endif()
9493

95-
if(ADA_USE_SIMDUTF)
96-
CPMAddPackage(
97-
NAME simdutf
98-
GITHUB_REPOSITORY simdutf/simdutf
99-
VERSION 7.3.2
100-
OPTIONS "SIMDUTF_TESTS OFF" "SIMDUTF_TOOLS OFF"
101-
)
94+
if(ADA_USE_SIMDUTF)
95+
CPMAddPackage(
96+
NAME simdutf
97+
GITHUB_REPOSITORY simdutf/simdutf
98+
VERSION 7.3.2
99+
OPTIONS "SIMDUTF_TESTS OFF" "SIMDUTF_TOOLS OFF"
100+
)
101+
endif()
102102
endif()
103103

104104
add_library(ada::ada ALIAS ada)

0 commit comments

Comments
 (0)