@@ -102,6 +102,12 @@ def add_build_args(parser):
102
102
'--ninja-path' ,
103
103
metavar = 'PATH' ,
104
104
help = 'path to the ninja binary to use for building with CMake' )
105
+ parser .add_argument (
106
+ "--dispatch-build-dir" ,
107
+ help = "path to Dispatch build directory" )
108
+ parser .add_argument (
109
+ "--foundation-build-dir" ,
110
+ help = "path to Foundation build directory" )
105
111
parser .add_argument (
106
112
"--llbuild-build-dir" ,
107
113
help = "path to llbuild build directory" )
@@ -155,6 +161,12 @@ def parse_build_args(args):
155
161
"""Parses and cleans arguments necessary for build-related actions."""
156
162
parse_global_args (args )
157
163
164
+ if args .dispatch_build_dir :
165
+ args .dispatch_build_dir = os .path .abspath (args .dispatch_build_dir )
166
+
167
+ if args .foundation_build_dir :
168
+ args .foundation_build_dir = os .path .abspath (args .foundation_build_dir )
169
+
158
170
if args .llbuild_build_dir :
159
171
args .llbuild_build_dir = os .path .abspath (args .llbuild_build_dir )
160
172
@@ -485,6 +497,16 @@ def call_swiftpm(args, cmd, cwd=None):
485
497
# Build-related helper functions
486
498
# -----------------------------------------------------------
487
499
500
+ def get_dispatch_cmake_arg (args ):
501
+ """Returns the CMake argument to the Dispatch configuration to use for bulding SwiftPM."""
502
+ dispatch_dir = os .path .join (args .dispatch_build_dir , "cmake/modules" )
503
+ return "-Ddispatch_DIR=" + dispatch_dir
504
+
505
+ def get_foundation_cmake_arg (args ):
506
+ """Returns the CMake argument to the Foundation configuration to use for bulding SwiftPM."""
507
+ foundation_dir = os .path .join (args .foundation_build_dir , "cmake/modules" )
508
+ return "-DFoundation_DIR=" + foundation_dir
509
+
488
510
def get_llbuild_cmake_arg (args ):
489
511
"""Returns the CMake argument to the LLBuild framework/binary to use for bulding SwiftPM."""
490
512
if args .llbuild_link_framework :
0 commit comments