unknown_imported_target.cmake 450 B

1234567891011
  1. # Test that target_compile_definitions works on UNKNOWN IMPORTED target
  2. add_library(imported UNKNOWN IMPORTED)
  3. target_compile_definitions(imported INTERFACE FOO)
  4. get_target_property(IMPORTED_INTERFACE_CDS imported INTERFACE_COMPILE_DEFINITIONS)
  5. if (NOT FOO IN_LIST IMPORTED_INTERFACE_CDS)
  6. message(
  7. FATAL_ERROR "FOO should be in INTERFACE_COMPILE_DEFINITIONS.\n"
  8. "Actual INTERFACE_COMPILE_DEFINITIONS: " ${IMPORTED_INTERFACE_CDS})
  9. endif()