@@ -71,7 +71,13 @@ def build_with_cmake(self, build_targets, build_type, build_args,
71
71
env = env )
72
72
73
73
if not self .args .skip_build or self .product_name () == "llvm" :
74
+ cmake_opts = [self .build_dir , "--config" , build_type ]
75
+
74
76
if self .args .cmake_generator == "Xcode" :
77
+ # CMake automatically adds "--target ALL_BUILD" if we don't
78
+ # pass this.
79
+ cmake_opts += ["--target" , "ZERO_CHECK" ]
80
+
75
81
# Xcode generator uses "ALL_BUILD" instead of "all".
76
82
# Also, xcodebuild uses -target instead of bare names.
77
83
build_targets = build_targets [:]
@@ -82,12 +88,11 @@ def build_with_cmake(self, build_targets, build_type, build_args,
82
88
83
89
# Xcode can't restart itself if it turns out we need to reconfigure.
84
90
# Do an advance build to handle that.
85
- shell .call (["env" ] + cmake_build
86
- + [self .build_dir , "--config" , build_type ])
91
+ shell .call (["env" ] + cmake_build + cmake_opts )
87
92
88
- shell .call ([ "env" ] + cmake_build
89
- + [self . build_dir , "--config" , build_type , "--" ]
90
- + build_args + build_targets )
93
+ shell .call (
94
+ [ "env" ] + cmake_build + cmake_opts + ["--" ] + build_args + build_targets
95
+ )
91
96
92
97
def test_with_cmake (self , executable_target , results_targets ,
93
98
build_type , build_args , test_env = None ):
0 commit comments