@@ -52,6 +52,10 @@ sub Run ($)
52
52
53
53
my $command_name = $self -> {simple } ? " cmake_cmd" : " cmake" ;
54
54
55
+ main::PrintStatus (
56
+ ($self -> {simple } && $options !~ / \W --build\W / ) ? ' Configure' : ' Compile' ,
57
+ $command_name );
58
+
55
59
# Get cmake_var_* Autobuild Variables
56
60
my @cmake_vars = ();
57
61
my $autobuild_var_cmake_var_re = qr / ^cmake_var_(\w +)$ / ;
@@ -93,7 +97,7 @@ sub Run ($)
93
97
else {
94
98
print STDERR __FILE__ ,
95
99
" : unexpected arg name \" $name \" in $command_name command\n " ;
96
- return 0 ;
100
+ return { failure => ' fatal ' } ;
97
101
}
98
102
}
99
103
@@ -104,14 +108,17 @@ sub Run ($)
104
108
$config_args .= " -G \" $cmake_generator \" " ;
105
109
}
106
110
111
+ my $result = {};
112
+
107
113
# cmake_cmd commmand
108
114
if ($self -> {simple }) {
109
- return utility::run_command (" $cmake_command $options " );
115
+ utility::run_command (" $cmake_command $options " , $result );
116
+ return $result ;
110
117
}
111
118
elsif (length ($options )) {
112
119
print STDERR __FILE__ ,
113
120
" : options attribute not allowed for the cmake command\n " ;
114
- return 0 ;
121
+ return { failure => ' fatal ' } ;
115
122
}
116
123
117
124
# Insert cmake_var_* Autobuild Variables and var_* Arguments
@@ -124,28 +131,28 @@ sub Run ($)
124
131
125
132
# Recreate Build Directory
126
133
if (!utility::remove_tree ($build_dir )) {
127
- return 0 ;
134
+ return { failure => ' fatal ' } ;
128
135
}
129
136
if (!mkdir ($build_dir )) {
130
137
print STDERR __FILE__ , " : failed to make build directory \" $build_dir \" : $! \n " ;
131
- return 0 ;
138
+ return { failure => ' fatal ' } ;
132
139
}
133
140
134
141
# Change to Build Directory
135
142
my $build_cd = ChangeDir-> new({dir => $build_dir });
136
- return 0 unless ($build_cd );
143
+ return { failure => ' fatal ' } unless ($build_cd );
137
144
138
145
# 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 ;
141
148
}
142
149
143
150
# 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 ;
146
153
}
147
154
148
- return 1 ;
155
+ return $result ;
149
156
}
150
157
151
158
# #############################################################################
0 commit comments