Skip to content

Commit af4909c

Browse files
author
Daniel Lemire
committed
speeding up builds
1 parent e7de3ef commit af4909c

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

dependencies/CMakeLists.txt

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ if (NOT CYGWIN)
1414
set(ABSL_USE_GOOGLETEST_HEAD OFF CACHE INTERNAL "")
1515

1616
FetchContent_Declare(abseil
17-
GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git
18-
GIT_TAG "d9e4955") # Abseil LTS branch, January 2025, Patch 1
17+
URL https://github.com/abseil/abseil-cpp/archive/d9e4955.zip
18+
URL_HASH SHA256=b8292600560c7562cd4e96ba397ee205c0450af352061d9303d1e20d15ef8b6b)
1919
FetchContent_GetProperties(abseil)
2020
if(NOT abseil_POPULATED)
2121
set(BUILD_TESTING OFF)
@@ -30,9 +30,8 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
3030

3131
FetchContent_Declare(
3232
doubleconversion
33-
GIT_REPOSITORY https://github.com/google/double-conversion.git
34-
GIT_TAG 101e1ba89dc41ceb75090831da97c43a76cd2906
35-
# GIT_SHALLOW TRUE
33+
URL https://github.com/google/double-conversion/archive/101e1ba89dc41ceb75090831da97c43a76cd2906.zip
34+
URL_HASH SHA256=be99800f12675849023235c77058c3f272cb0222891c9ac17101c2fbeed00c24
3635
)
3736
FetchContent_MakeAvailable(doubleconversion)
3837

@@ -60,7 +59,9 @@ FetchContent_Declare(
6059
GIT_SHALLOW TRUE
6160
)
6261
FetchContent_MakeAvailable(ryu)
62+
6363
set(ryu_SOURCE_DIR ${ryu_SOURCE_DIR} PARENT_SCOPE)
64+
message(STATUS "ryu source directory: ${ryu_SOURCE_DIR}")
6465

6566
FetchContent_Declare(
6667
grisu-exact
@@ -70,6 +71,7 @@ FetchContent_Declare(
7071
)
7172
FetchContent_MakeAvailable(grisu-exact)
7273
set(grisu-exact_SOURCE_DIR ${grisu-exact_SOURCE_DIR} PARENT_SCOPE)
74+
message(STATUS "grisu source directory: ${grisu-exact_SOURCE_DIR}")
7375

7476
FetchContent_Declare(
7577
dragonbox
@@ -78,6 +80,7 @@ FetchContent_Declare(
7880
GIT_SHALLOW TRUE
7981
)
8082
FetchContent_MakeAvailable(dragonbox)
83+
message(STATUS "dragonbox source directory: ${dragonbox_SOURCE_DIR}")
8184

8285
FetchContent_Declare(
8386
dragon4
@@ -90,12 +93,15 @@ if(NOT dragon4)
9093
FetchContent_Populate(dragon4) # Downloads code to ${dragon4_SOURCE_DIR}
9194
endif()
9295
set(dragon4_SOURCE_DIR ${dragon4_SOURCE_DIR} PARENT_SCOPE)
96+
message(STATUS "dragon4 source directory: ${dragon4_SOURCE_DIR}")
97+
9398
add_library(dragon4_lib STATIC
9499
${dragon4_SOURCE_DIR}/Dragon4.cpp
95100
${dragon4_SOURCE_DIR}/DragonMath.cpp
96101
${dragon4_SOURCE_DIR}/PrintFloat.cpp
97102
)
98103
if(MATH_LIBRARY)
104+
message(STATUS "Using math library")
99105
target_link_libraries(dragon4_lib PUBLIC ${MATH_LIBRARY})
100106
endif()
101107
target_include_directories(dragon4_lib PUBLIC
@@ -104,17 +110,19 @@ target_include_directories(dragon4_lib PUBLIC
104110

105111
# Swift code may not build under Windows without extra care.
106112
if(NOT WIN32)
113+
message(STATUS "Grabbing Swift code")
107114
FetchContent_Declare(
108115
swift
109-
GIT_REPOSITORY https://github.com/swiftlang/swift.git
110-
GIT_TAG 6a862d2eb7128ff1f317b07e8ad1a6da939775f3
111-
GIT_SHALLOW TRUE
116+
URL https://github.com/swiftlang/swift/archive/6a862d2eb7128ff1f317b07e8ad1a6da939775f3.tar.gz
117+
URL_HASH SHA256=281673f70a1695ce26f5463ac43842ffdb546d6d888338f488f71015564e51a0
112118
)
113119
FetchContent_GetProperties(swift)
114120
if(NOT swift)
115121
FetchContent_Populate(swift) # Downloads code to ${dragon4_SOURCE_DIR}
116122
endif()
117123
set(swift_SOURCE_DIR ${swift_SOURCE_DIR} PARENT_SCOPE)
124+
message(STATUS "Swift directory: ${swift_SOURCE_DIR}")
125+
118126
add_library(swift_lib STATIC
119127
${swift_SOURCE_DIR}/stdlib/public/runtime/SwiftDtoa.cpp
120128
)
@@ -128,15 +136,16 @@ endif(NOT WIN32)
128136

129137
FetchContent_Declare(
130138
drachennest # for schubfach
131-
GIT_REPOSITORY https://github.com/abolz/Drachennest.git
132-
GIT_TAG e6714a39ad331b4489d0b6aaf3968635bff4eb5e
133-
GIT_SHALLOW TRUE
139+
URL https://github.com/abolz/Drachennest/archive/e6714a39ad331b4489d0b6aaf3968635bff4eb5e.zip
140+
URL_HASH SHA256=6a5526d17b47c8e8c264133d717d99693f01783aa4a50e144d7a0e28363647bb
134141
)
135142
FetchContent_GetProperties(drachennest)
136143
if(NOT drachennest_POPULATED)
137144
FetchContent_Populate(drachennest) # Downloads code to ${drachennest_SOURCE_DIR}
138145
endif()
139146
set(drachennest_SOURCE_DIR/src ${drachennest_SOURCE_DIR}/src PARENT_SCOPE)
147+
message(STATUS "drachennest directory: ${drachennest_SOURCE_DIR}")
148+
140149
add_library(dragon_schubfach_lib STATIC
141150
${drachennest_SOURCE_DIR}/src/dragon4.cc
142151
${drachennest_SOURCE_DIR}/src/schubfach_32.cc

0 commit comments

Comments
 (0)