diff options
author | Matt McCormick <matt.mccormick@kitware.com> | 2012-05-21 18:49:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-05-21 22:57:11 (GMT) |
commit | c9097c74b6fdf6b457a0d1fb1c034c3e9d5fd8fe (patch) | |
tree | cdef294b8de255674a3153d4e400ac4d5dfc4065 /Modules/ExternalProject.cmake | |
parent | 4af648041dd1f5589bd117145b091fc088aee56e (diff) | |
download | CMake-c9097c74b6fdf6b457a0d1fb1c034c3e9d5fd8fe.zip CMake-c9097c74b6fdf6b457a0d1fb1c034c3e9d5fd8fe.tar.gz CMake-c9097c74b6fdf6b457a0d1fb1c034c3e9d5fd8fe.tar.bz2 |
ExternalProject: Fix 'make' builds with Ninja (#13159)
Fix the build command when Ninja is the CMake Generator, but the
external project is created for a project that does not use CMake but
does use "make".
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 0353e45..a0a9aea 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -712,8 +712,12 @@ function(_ep_get_build_command name step cmd_var) endif() else() # if(cfg_cmd_id STREQUAL "configure") # Non-CMake project. Guess "make" and "make install" and "make test". - # But use "$(MAKE)" to get recursive parallel make. - set(cmd "$(MAKE)") + if("${CMAKE_GENERATOR}" MATCHES "Makefiles") + # Try to get the parallel arguments + set(cmd "$(MAKE)") + else() + set(cmd "make") + endif() if(step STREQUAL "INSTALL") set(args install) endif() |