Files
swift-mirror/SwiftCompilerSources/Sources/_RegexParser/CMakeLists.txt
Rintaro Ishizaki 9f4ce612a2 [SwiftCompilerModules] Link lib_InternalSwiftSyntaxParser to libswift
To use _RegexParser from SwiftSyntax.

* Create 'libswiftCompilerModules_SwiftSyntax.a' which is a subset of
  'libswiftCompilerModules.a'
* Link 'lib_InternalSwiftSyntaxParser' to
  'libswiftCompilerModules_SwiftSyntax.a'
* Factor out swift runtime linking logic in CMake so that dynamic
  libraries can link to Swift runtime, in addition to executables
* Link 'lib_InternalSwiftSyntaxParser' to swift runtime
2022-06-02 12:23:03 -07:00

22 lines
907 B
CMake

# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors
file(GLOB_RECURSE _LIBSWIFT_REGEX_PARSER_SOURCES
"${EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR}/Sources/_RegexParser/*.swift")
set(LIBSWIFT_REGEX_PARSER_SOURCES)
foreach(source ${_LIBSWIFT_REGEX_PARSER_SOURCES})
file(TO_CMAKE_PATH "${source}" source)
list(APPEND LIBSWIFT_REGEX_PARSER_SOURCES ${source})
endforeach()
message(STATUS "Using Experimental String Processing library for libswift _RegexParser (${EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR}).")
add_swift_compiler_module(_CompilerRegexParser
ADD_TO_SYNTAXPARSE
SOURCES
"${LIBSWIFT_REGEX_PARSER_SOURCES}")