1818
1919
2020class CMakeProduct (product .Product ):
21+ def is_verbose (self ):
22+ return self .args .verbose_build
23+
2124 def build_with_cmake (self , build_targets , build_type , build_args ,
2225 prefer_just_built_toolchain = False ):
2326 assert self .toolchain .cmake is not None
@@ -29,6 +32,12 @@ def build_with_cmake(self, build_targets, build_type, build_args,
2932 cmake_build .append (self .toolchain .distcc_pump )
3033 cmake_build .extend ([self .toolchain .cmake , "--build" ])
3134
35+ # If we are verbose...
36+ if self .is_verbose ():
37+ # And ninja, add a -v.
38+ if self .args .cmake_generator == "Ninja" :
39+ build_args .append ('-v' )
40+
3241 generator_output_path = ""
3342 if self .args .cmake_generator == "Ninja" :
3443 generator_output_path = os .path .join (self .build_dir , "build.ninja" )
@@ -82,6 +91,13 @@ def test_with_cmake(self, executable_target, results_targets,
8291
8392 if self .toolchain .distcc_pump :
8493 cmake_build .append (self .toolchain .distcc_pump )
94+
95+ # If we are verbose...
96+ if self .is_verbose ():
97+ # And ninja, add a -v.
98+ if self .args .cmake_generator == "Ninja" :
99+ build_args .append ('-v' )
100+
85101 cmake_args = [self .toolchain .cmake , "--build" , self .build_dir ,
86102 "--config" , build_type , "--" ]
87103 cmake_build .extend (cmake_args + build_args )
0 commit comments