Files
CMake/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake
Kasper Laudrup a283e58b51 ExternalProject: Add DOWNLOAD_EXTRACT_TIMESTAMP option and policy
Add the option to keep the current filestamps when extracting an
archive in ExternalProject_Add.

Enabling this option makes the behavior consistent with how
ExternalProject_Add is used when checking out code from revision
control instead of an archive.

Fixes: #22746
2022-05-05 09:01:54 +10:00

17 lines
652 B
CMake

cmake_minimum_required(VERSION ${CMAKE_VERSION})
if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
cmake_policy(SET CMP0114 NEW)
else()
cmake_policy(SET CMP0114 OLD) # Test deprecated behavior.
endif()
cmake_policy(SET CMP0135 NEW)
include(ExternalProject)
ExternalProject_Add(BAR URL https://cmake.org/bar.tar.gz)
ExternalProject_Add(FOO URL https://cmake.org/foo.tar.gz STEP_TARGETS update)
ExternalProject_Add_Step(FOO do_something COMMAND ${CMAKE_COMMAND} -E echo "Doing something")
ExternalProject_Add_Step(FOO do_something_else COMMAND ${CMAKE_COMMAND} -E echo "Doing something else")
ExternalProject_Add_StepTargets(FOO do_something)