@@ -52,6 +52,10 @@ sub Run ($)
5252
5353 my $command_name = $self -> {simple } ? " cmake_cmd" : " cmake" ;
5454
55+ main::PrintStatus (
56+ ($self -> {simple } && $options !~ / \W --build\W / ) ? ' Configure' : ' Compile' ,
57+ $command_name );
58+
5559 # Get cmake_var_* Autobuild Variables
5660 my @cmake_vars = ();
5761 my $autobuild_var_cmake_var_re = qr / ^cmake_var_(\w +)$ / ;
@@ -93,7 +97,7 @@ sub Run ($)
9397 else {
9498 print STDERR __FILE__ ,
9599 " : unexpected arg name \" $name \" in $command_name command\n " ;
96- return 0 ;
100+ return { failure => ' fatal ' } ;
97101 }
98102 }
99103
@@ -104,14 +108,17 @@ sub Run ($)
104108 $config_args .= " -G \" $cmake_generator \" " ;
105109 }
106110
111+ my $result = {};
112+
107113 # cmake_cmd commmand
108114 if ($self -> {simple }) {
109- return utility::run_command (" $cmake_command $options " );
115+ utility::run_command (" $cmake_command $options " , $result );
116+ return $result ;
110117 }
111118 elsif (length ($options )) {
112119 print STDERR __FILE__ ,
113120 " : options attribute not allowed for the cmake command\n " ;
114- return 0 ;
121+ return { failure => ' fatal ' } ;
115122 }
116123
117124 # Insert cmake_var_* Autobuild Variables and var_* Arguments
@@ -124,28 +131,28 @@ sub Run ($)
124131
125132 # Recreate Build Directory
126133 if (!utility::remove_tree ($build_dir )) {
127- return 0 ;
134+ return { failure => ' fatal ' } ;
128135 }
129136 if (!mkdir ($build_dir )) {
130137 print STDERR __FILE__ , " : failed to make build directory \" $build_dir \" : $! \n " ;
131- return 0 ;
138+ return { failure => ' fatal ' } ;
132139 }
133140
134141 # Change to Build Directory
135142 my $build_cd = ChangeDir-> new({dir => $build_dir });
136- return 0 unless ($build_cd );
143+ return { failure => ' fatal ' } unless ($build_cd );
137144
138145 # Run Configure CMake Command
139- if (!utility::run_command (" $cmake_command $config_args " )) {
140- return 0 ;
146+ if (!utility::run_command (" $cmake_command $config_args " , $result )) {
147+ return $result ;
141148 }
142149
143150 # Run Build CMake Command
144- if (!utility::run_command (" $cmake_command $build_args " )) {
145- return 0 ;
151+ if (!utility::run_command (" $cmake_command $build_args " , $result )) {
152+ return $result ;
146153 }
147154
148- return 1 ;
155+ return $result ;
149156}
150157
151158# #############################################################################
0 commit comments