Add_StepDependencies_no_target.cmake 622 B

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