set(xcProjectFile "${RunCMake_TEST_BINARY_DIR}/InterfaceLibSources.xcodeproj/project.pbxproj")
if(NOT EXISTS "${xcProjectFile}")
  set(RunCMake_TEST_FAILED "Project file ${xcProjectFile} does not exist.")
  return()
endif()

set(found_iface_h 0)
file(STRINGS "${xcProjectFile}" lines)
foreach(line IN LISTS lines)
  if(line MATCHES "PBXFileReference.*explicitFileType.*sourcecode\\.c\\.h.*iface\\.h")
    set(found_iface_h 1)
  endif()
endforeach()
if(NOT found_iface_h)
  set(RunCMake_TEST_FAILED "iface.h not referenced in\n  ${xcProjectFile}")
endif()
