summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/add_custom_command/GeneratedProperty.cmake
blob: 628134b8b37bfb79b8e5179418f49def6f3e5ef2 (plain)
1
2
3
4
5
6
7
8
9
10
add_custom_command(
  OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/a"
  BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/b"
  COMMAND c
  )
get_source_file_property(GENERATED_A "${CMAKE_CURRENT_BINARY_DIR}/a" GENERATED)
get_source_file_property(GENERATED_B "${CMAKE_CURRENT_BINARY_DIR}/b" GENERATED)
if(NOT GENERATED_A OR NOT GENERATED_B)
  message(FATAL_ERROR "failed")
endif()