mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This avoids us having to pattern match every source file which should help speed up the CMake generation. A secondary optimization is possible with CMake 3.14 which has the ability to remove the last extension component without having to resort to regular expressions. It also helps easily identify the GYB'ed sources.
21 lines
519 B
CMake
21 lines
519 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()
|
|
|
|
add_swift_host_library(swiftSyntax STATIC
|
|
RawSyntax.cpp
|
|
Syntax.cpp
|
|
SyntaxData.cpp
|
|
UnknownSyntax.cpp
|
|
|
|
GYB_SOURCES
|
|
SyntaxNodes.cpp.gyb
|
|
SyntaxBuilders.cpp.gyb
|
|
SyntaxKind.cpp.gyb
|
|
SyntaxFactory.cpp.gyb
|
|
SyntaxVisitor.cpp.gyb
|
|
Trivia.cpp.gyb
|
|
SyntaxSerialization.cpp.gyb)
|