CMake/Tests/RunCMake/FetchContent/DownloadTwice.cmake
Craig Scott 4370fcf750 FetchContent: Deprecate FetchContent_Populate(depName)
Projects should use FetchContent_MakeAvailable(depName)
instead. Policy CMP0169 provides backward compatibility.
2024-05-29 18:52:24 +10:00

12 lines
225 B
CMake

cmake_policy(SET CMP0169 OLD)
include(FetchContent)
FetchContent_Declare(
t1
DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Download command executed"
)
FetchContent_Populate(t1)
FetchContent_Populate(t1) # Triggers error