File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -512,10 +512,7 @@ impl Config {
512
512
let cmake_prefix_path = env:: join_paths ( & cmake_prefix_path) . unwrap ( ) ;
513
513
514
514
// Build up the first cmake command to build the build system.
515
- let executable = self
516
- . getenv_target_os ( "CMAKE" )
517
- . unwrap_or ( OsString :: from ( "cmake" ) ) ;
518
- let mut cmd = Command :: new ( & executable) ;
515
+ let mut cmd = self . cmake_configure_command ( ) ;
519
516
520
517
if self . verbose_cmake {
521
518
cmd. arg ( "-Wdev" ) ;
@@ -787,7 +784,7 @@ impl Config {
787
784
}
788
785
789
786
// And build!
790
- let mut cmd = Command :: new ( & executable ) ;
787
+ let mut cmd = self . cmake_build_command ( ) ;
791
788
cmd. current_dir ( & build) ;
792
789
793
790
for & ( ref k, ref v) in c_compiler. env ( ) . iter ( ) . chain ( & self . env ) {
@@ -839,6 +836,19 @@ impl Config {
839
836
return dst;
840
837
}
841
838
839
+ fn cmake_executable ( & mut self ) -> OsString {
840
+ self . getenv_target_os ( "CMAKE" )
841
+ . unwrap_or ( OsString :: from ( "cmake" ) )
842
+ }
843
+
844
+ fn cmake_configure_command ( & mut self ) -> Command {
845
+ Command :: new ( self . cmake_executable ( ) )
846
+ }
847
+
848
+ fn cmake_build_command ( & mut self ) -> Command {
849
+ Command :: new ( self . cmake_executable ( ) )
850
+ }
851
+
842
852
fn getenv_os ( & mut self , v : & str ) -> Option < OsString > {
843
853
if let Some ( val) = self . env_cache . get ( v) {
844
854
return val. clone ( ) ;
You can’t perform that action at this time.
0 commit comments