mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This allows us to evolve e.g. token kinds and how attributes are modelled independently between SwiftSyntax and the compiler. It also makes it easier to e.g. add an attribute because you don’t need to create PRs for two repositories.
18 lines
599 B
CMake
18 lines
599 B
CMake
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
|
|
set(SWIFT_GYB_FLAGS --line-directive "^\"#line %(line)d \\\"%(file)s\\\"^\"")
|
|
else()
|
|
set(SWIFT_GYB_FLAGS --line-directive "\'#line" "%(line)d" "\"%(file)s\"\'")
|
|
endif()
|
|
|
|
set(generated_include_sources
|
|
Attr.def.gyb
|
|
TokenKinds.def.gyb)
|
|
|
|
add_gyb_target(swift-ast-generated-headers
|
|
"${generated_include_sources}"
|
|
DEPENDS
|
|
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/AttributeKinds.py"
|
|
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/Token.py")
|
|
set_property(TARGET swift-ast-generated-headers
|
|
PROPERTY FOLDER "Miscellaneous")
|