Skip to content

Commit abecb2f

Browse files
committed
[utils/build-script] Change '--extra-cmake-vars' to '--extra-cmake-options'.
This is more consistent with the rest of build-script for handling CMake options.
1 parent 9ebc8a3 commit abecb2f

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

utils/build-script

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -701,11 +701,11 @@ the number of parallel build jobs to use""",
701701
action="append", dest="extra_swift_args", default=[])
702702

703703
parser.add_argument(
704-
"--extra-cmake-vars", help=textwrap.dedent("""
705-
Pass through extra variables to CMake in the form of comma separated vars
706-
'CMAKE_VAR1=YES,CMAKE_VAR2=/tmp'. Can be called multiple times to add
707-
multiple such vars."""),
708-
action="append", dest="extra_cmake_vars", default=[])
704+
"--extra-cmake-options", help=textwrap.dedent("""
705+
Pass through extra options to CMake in the form of comma separated options
706+
'-DCMAKE_VAR1=YES,-DCMAKE_VAR2=/tmp'. Can be called multiple times to add
707+
multiple such options."""),
708+
action="append", dest="extra_cmake_options", default=[])
709709

710710
parser.add_argument(
711711
"build_script_impl_args",
@@ -1117,10 +1117,10 @@ the number of parallel build jobs to use""",
11171117

11181118
# If we have extra_cmake_args, combine all of them together and then add
11191119
# them as one command.
1120-
if args.extra_cmake_vars:
1120+
if args.extra_cmake_options:
11211121
build_script_impl_args += [
1122-
"--extra-cmake-vars",
1123-
",".join(args.extra_cmake_vars)]
1122+
"--extra-cmake-options",
1123+
",".join(args.extra_cmake_options)]
11241124

11251125
build_script_impl_args += args.build_script_impl_args
11261126

utils/build-script-impl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ KNOWN_SETTINGS=(
190190
darwin-deployment-version-tvos "9.0" "minimum deployment target version for tvOS"
191191
darwin-deployment-version-watchos "2.0" "minimum deployment target version for watchOS"
192192

193-
extra-cmake-vars "" "Extra variables to pass to CMake for all targets"
193+
extra-cmake-options "" "Extra options to pass to CMake for all targets"
194194
extra-swift-args "" "Extra arguments to pass to swift modules which match regex. Assumed to be a flattened cmake list consisting of [module_regexp, args, module_regexp, args, ...]"
195195
sil-verify-all "0" "If enabled, run the SIL verifier after each transform when building Swift files during this build process"
196196
swift-enable-ast-verifier "1" "If enabled, and the assertions are enabled, the built Swift compiler will run the AST verifier every time it is invoked"
@@ -1198,12 +1198,12 @@ if [[ "${EXPORT_COMPILE_COMMANDS}" ]] ; then
11981198
)
11991199
fi
12001200

1201-
if [[ "${EXTRA_CMAKE_VARS}" ]] ; then
1202-
for cmake_var in $(echo "${EXTRA_CMAKE_VARS}" | tr "," "\n")
1201+
if [[ "${EXTRA_CMAKE_OPTIONS}" ]] ; then
1202+
for cmake_opt in $(echo "${EXTRA_CMAKE_OPTIONS}" | tr "," "\n")
12031203
do
12041204
COMMON_CMAKE_OPTIONS=(
12051205
"${COMMON_CMAKE_OPTIONS[@]}"
1206-
"-D${cmake_var}"
1206+
"${cmake_opt}"
12071207
)
12081208
done
12091209
fi

0 commit comments

Comments
 (0)