CMakeLists.txt 687 B

1234567891011121314151617181920
  1. add_executable(alias-test-exe-subdir2 ALIAS test-exe)
  2. add_executable(alias-test-exe-local ALIAS test-exe)
  3. add_library(alias-test-lib-subdir2 ALIAS test-lib)
  4. add_library(alias-test-lib-local ALIAS test-lib)
  5. foreach (item IN ITEMS exe lib)
  6. get_property (aliasedTarget TARGET alias-test-${item}-local PROPERTY ALIASED_TARGET)
  7. if (NOT aliasedTarget STREQUAL "test-${item}")
  8. message (SEND_ERROR "Wrong aliased target '${aliasedTarget}' for ALIAS 'alias-test-${item}-local'.")
  9. endif()
  10. endforeach()
  11. foreach (item IN ITEMS exe lib)
  12. if (TARGET alias-test-${item}-subdir1)
  13. message (SEND_ERROR "ALIAS 'alias-test-${item}-subdir1' unexpectedly defined.")
  14. endif()
  15. endforeach()