@@ -93,7 +93,7 @@ sub Run ($)
9393 else {
9494 print STDERR __FILE__ ,
9595 " : unexpected arg name \" $name \" in $command_name command\n " ;
96- return 0 ;
96+ return { failure => ' fatal ' } ;
9797 }
9898 }
9999
@@ -104,14 +104,17 @@ sub Run ($)
104104 $config_args .= " -G \" $cmake_generator \" " ;
105105 }
106106
107+ my $result = {};
108+
107109 # cmake_cmd commmand
108110 if ($self -> {simple }) {
109- return utility::run_command (" $cmake_command $options " );
111+ utility::run_command (" $cmake_command $options " , $result );
112+ return $result ;
110113 }
111114 elsif (length ($options )) {
112115 print STDERR __FILE__ ,
113116 " : options attribute not allowed for the cmake command\n " ;
114- return 0 ;
117+ return { failure => ' fatal ' } ;
115118 }
116119
117120 # Insert cmake_var_* Autobuild Variables and var_* Arguments
@@ -124,28 +127,28 @@ sub Run ($)
124127
125128 # Recreate Build Directory
126129 if (!utility::remove_tree ($build_dir )) {
127- return 0 ;
130+ return { failure => ' fatal ' } ;
128131 }
129132 if (!mkdir ($build_dir )) {
130133 print STDERR __FILE__ , " : failed to make build directory \" $build_dir \" : $! \n " ;
131- return 0 ;
134+ return { failure => ' fatal ' } ;
132135 }
133136
134137 # Change to Build Directory
135138 my $build_cd = ChangeDir-> new({dir => $build_dir });
136- return 0 unless ($build_cd );
139+ return { ' failure ' => ' fatal ' } unless ($build_cd );
137140
138141 # Run Configure CMake Command
139- if (!utility::run_command (" $cmake_command $config_args " )) {
140- return 0 ;
142+ if (!utility::run_command (" $cmake_command $config_args " , $result )) {
143+ return $result ;
141144 }
142145
143146 # Run Build CMake Command
144- if (!utility::run_command (" $cmake_command $build_args " )) {
145- return 0 ;
147+ if (!utility::run_command (" $cmake_command $build_args " , $result )) {
148+ return $result ;
146149 }
147150
148- return 1 ;
151+ return $result ;
149152}
150153
151154# #############################################################################
0 commit comments