Skip to content

Commit a7b9a75

Browse files
committed
download FastFloat if it was not found
1 parent 80f60f4 commit a7b9a75

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,16 @@ include(GNUInstallDirs)
2121
set(CMAKE_CXX_STANDARD 11)
2222
set(CMAKE_CXX_STANDARD_REQUIRED True)
2323

24-
find_package(FastFloat REQUIRED)
24+
find_package(FastFloat QUIET)
25+
if (NOT ${FastFloat_FOUND})
26+
include(FetchContent)
27+
FetchContent_Declare(
28+
FastFloat
29+
GIT_REPOSITORY https://github.com/fastfloat/fast_float.git
30+
GIT_TAG 1ea4f27b2aeee2859a1354a3c24cff52a116cad1
31+
)
32+
FetchContent_MakeAvailable(FastFloat)
33+
endif()
2534

2635
set(GCC_COMPILE_FLAGS "-Wextra -Wall -Wfloat-equal -Wundef -Wshadow \
2736
-Wpointer-arith -Wcast-align -Wstrict-prototypes -Wwrite-strings \

0 commit comments

Comments
 (0)