File tree 3 files changed +30
-1
lines changed
3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ if(POLICY CMP0091)
16
16
cmake_policy (SET CMP0091 NEW)
17
17
endif ()
18
18
19
- project (SwiftDriver LANGUAGES C Swift)
19
+ project (SwiftDriver
20
+ LANGUAGES C CXX Swift)
20
21
21
22
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib)
22
23
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib)
@@ -34,6 +35,7 @@ set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift)
34
35
add_compile_options ($<$<COMPILE_LANGUAGE:Swift>:-I$<SEMICOLON>${CMAKE_CURRENT_SOURCE_DIR} /Sources /CSwiftScan/include >)
35
36
36
37
option (BUILD_SHARED_LIBS "Build shared libraries by default" YES )
38
+ option (SWIFT_DRIVER_BUILD_TOOLS "Build makeOption" NO )
37
39
38
40
# Toolchain Vended Dependencies
39
41
find_package (dispatch QUIET )
Original file line number Diff line number Diff line change @@ -13,3 +13,7 @@ add_subdirectory(SwiftDriverExecution)
13
13
add_subdirectory (swift-build -sdk-interfaces)
14
14
add_subdirectory (swift-driver)
15
15
add_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