Files
swift-mirror/apinotes/CMakeLists.txt
Jordan Rose ec151ae504 Remove more API notes that are now shipped with the frameworks. (#11408)
No functionality change...if you're on Xcode 9b4 or later.
2017-08-10 15:10:30 -07:00

25 lines
715 B
CMake

set(SWIFT_API_NOTES_INPUTS
Accelerate
Dispatch
ScriptingBridge
os
)
if(NOT DEFINED SWIFT_API_NOTES_PATH)
message(FATAL_ERROR "Define SWIFT_API_NOTES_PATH before including this file")
endif()
foreach(module ${SWIFT_API_NOTES_INPUTS})
if(NOT EXISTS "${SWIFT_API_NOTES_PATH}/${module}.apinotes")
message(SEND_ERROR "Missing apinotes for ${module}")
endif()
endforeach()
file(GLOB SWIFT_API_NOTES_INPUT_FILES "${SWIFT_API_NOTES_PATH}/*.apinotes")
foreach(file ${SWIFT_API_NOTES_INPUT_FILES})
get_filename_component(name "${file}" NAME_WE)
if(NOT "${name}" IN_LIST SWIFT_API_NOTES_INPUTS)
message(SEND_ERROR "Found apinotes for ${name}; please add to CMakeLists.txt")
endif()
endforeach()