File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ if(POLICY CMP0091)
1616 cmake_policy (SET CMP0091 NEW)
1717endif ()
1818
19- project (SwiftDriver LANGUAGES C Swift)
19+ project (SwiftDriver
20+ LANGUAGES C CXX Swift)
2021
2122set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib)
2223set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib)
@@ -34,6 +35,7 @@ set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift)
3435add_compile_options ($<$<COMPILE_LANGUAGE:Swift>:-I$<SEMICOLON>${CMAKE_CURRENT_SOURCE_DIR} /Sources /CSwiftScan/include >)
3536
3637option (BUILD_SHARED_LIBS "Build shared libraries by default" YES )
38+ option (SWIFT_DRIVER_BUILD_TOOLS "Build makeOption" NO )
3739
3840# Toolchain Vended Dependencies
3941find_package (dispatch QUIET )
Original file line number Diff line number Diff line change @@ -13,3 +13,7 @@ add_subdirectory(SwiftDriverExecution)
1313add_subdirectory (swift-build -sdk-interfaces)
1414add_subdirectory (swift-driver)
1515add_subdirectory (swift-help)
16+
17+ if (SWIFT_DRIVER_BUILD_TOOLS)
18+ add_subdirectory (makeOptions)
19+ endif ()
Original file line number Diff line number Diff line change 1+ # This source file is part of the Swift.org open source project
2+ #
3+ # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
4+ # Licensed under Apache License v2.0 with Runtime Library Exception
5+ #
6+ # See http://swift.org/LICENSE.txt for license information
7+ # See http://swift.org/CONTRIBUTORS.txt for Swift project authors
8+
9+ find_package (LLVM CONFIG REQUIRED)
10+ find_package (Clang CONFIG REQUIRED)
11+ find_package (Swift CONFIG REQUIRED)
12+
13+ add_executable (makeOptions
14+ main.cpp
15+ makeOptions.cpp)
16+ set_target_properties (makeOptions PROPERTIES
17+ CXX_STANDARD 17)
18+ target_compile_definitions (makeOptions PRIVATE
19+ LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1)
20+ target_include_directories (makeOptions PRIVATE
21+ ${SWIFT_INCLUDE_DIRS}
22+ ${LLVM_BUILD_BINARY_DIR} /include
23+ ${LLVM_BUILD_MAIN_INCLUDE_DIR} )
You can’t perform that action at this time.
0 commit comments