mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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.
35 lines
837 B
CMake
35 lines
837 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(swiftParse STATIC
|
|
Confusables.cpp
|
|
Lexer.cpp
|
|
ParseDecl.cpp
|
|
ParsedRawSyntaxNode.cpp
|
|
ParsedRawSyntaxRecorder.cpp
|
|
ParsedTrivia.cpp
|
|
ParseExpr.cpp
|
|
ParseGeneric.cpp
|
|
ParseIfConfig.cpp
|
|
ParsePattern.cpp
|
|
Parser.cpp
|
|
ParseStmt.cpp
|
|
ParseType.cpp
|
|
PersistentParserState.cpp
|
|
Scope.cpp
|
|
SyntaxParsingCache.cpp
|
|
SyntaxParsingContext.cpp
|
|
|
|
GYB_SOURCES
|
|
ParsedSyntaxBuilders.cpp.gyb
|
|
ParsedSyntaxNodes.cpp.gyb
|
|
ParsedSyntaxRecorder.cpp.gyb)
|
|
target_link_libraries(swiftParse PRIVATE
|
|
swiftAST
|
|
swiftSyntax)
|
|
|
|
add_dependencies(swiftParse swift-parse-syntax-generated-headers)
|