mirror of
https://github.com/GerbilSoft/zlib-ng.git
synced 2025-06-18 19:45:37 -04:00
Fixed content already populated error in CMake scripts. #1327
Should only need to use either FetchContent_MakeAvailable or FetchContent_GetProperties and FetchContent_Populate but not both methods. We use the later for CMake compatibility with lower versions.
This commit is contained in:
parent
89763032d5
commit
ab47c73803
@ -14,11 +14,11 @@ if(NOT benchmark_FOUND)
|
|||||||
set(BENCHMARK_ENABLE_TESTING OFF)
|
set(BENCHMARK_ENABLE_TESTING OFF)
|
||||||
FetchContent_Declare(benchmark
|
FetchContent_Declare(benchmark
|
||||||
GIT_REPOSITORY https://github.com/google/benchmark.git)
|
GIT_REPOSITORY https://github.com/google/benchmark.git)
|
||||||
FetchContent_MakeAvailable(benchmark)
|
|
||||||
FetchContent_GetProperties(benchmark)
|
|
||||||
|
|
||||||
|
FetchContent_GetProperties(benchmark)
|
||||||
if(NOT benchmark_POPULATED)
|
if(NOT benchmark_POPULATED)
|
||||||
FetchContent_Populate(benchmark)
|
FetchContent_Populate(benchmark)
|
||||||
|
add_subdirectory(${benchmark_SOURCE_DIR} ${benchmark_BINARY_DIR})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -55,15 +55,15 @@ if(WITH_BENCHMARK_APPS)
|
|||||||
if(NOT PNG_FOUND)
|
if(NOT PNG_FOUND)
|
||||||
FetchContent_Declare(PNG
|
FetchContent_Declare(PNG
|
||||||
GIT_REPOSITORY https://github.com/glennrp/libpng.git)
|
GIT_REPOSITORY https://github.com/glennrp/libpng.git)
|
||||||
FetchContent_MakeAvailable(PNG)
|
|
||||||
FetchContent_GetProperties(PNG)
|
|
||||||
|
|
||||||
|
FetchContent_GetProperties(PNG)
|
||||||
if(NOT PNG_POPULATED)
|
if(NOT PNG_POPULATED)
|
||||||
FetchContent_Populate(PNG)
|
FetchContent_Populate(PNG)
|
||||||
|
add_subdirectory(${PNG_SOURCE_DIR} ${PNG_BINARY_DIR})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(BENCH_APP_SRCS
|
set(BENCH_APP_SRCS
|
||||||
benchmark_png_encode.cc
|
benchmark_png_encode.cc
|
||||||
benchmark_png_decode.cc
|
benchmark_png_decode.cc
|
||||||
benchmark_main.cc
|
benchmark_main.cc
|
||||||
|
@ -64,9 +64,8 @@ endif()
|
|||||||
FetchContent_Declare(pigz
|
FetchContent_Declare(pigz
|
||||||
GIT_REPOSITORY https://github.com/madler/pigz.git
|
GIT_REPOSITORY https://github.com/madler/pigz.git
|
||||||
GIT_TAG ${PIGZ_TAG})
|
GIT_TAG ${PIGZ_TAG})
|
||||||
FetchContent_MakeAvailable(pigz)
|
|
||||||
FetchContent_GetProperties(pigz)
|
|
||||||
|
|
||||||
|
FetchContent_GetProperties(pigz)
|
||||||
if(NOT pigz_POPULATED)
|
if(NOT pigz_POPULATED)
|
||||||
FetchContent_Populate(pigz)
|
FetchContent_Populate(pigz)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user