summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake
blob: 65b72506e56971af929b435f78f5eceb8acda3ce (plain)
1
2
3
4
5
6
7
8
9
add_custom_target(mkdir COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
add_custom_command(
  OUTPUT out.txt
  COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/PrintDir.cmake
  WORKING_DIRECTORY ${CMAKE_CFG_INTDIR}
  )
set_property(SOURCE out.txt PROPERTY SYMBOLIC 1)
add_custom_target(drive ALL DEPENDS out.txt)
add_dependencies(drive mkdir)