diff options
author | David Cole <david.cole@kitware.com> | 2010-07-23 17:51:37 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2010-07-23 17:51:37 (GMT) |
commit | b62fe1242f7d621d0b68657dfc9fadb1cef7ce6e (patch) | |
tree | aaaa4e772dfe3db2723e0192c1a981ffe307ff1a /Modules | |
parent | 0c084dd899c28c9ff65caacf3f917bcaf1a6726f (diff) | |
download | CMake-b62fe1242f7d621d0b68657dfc9fadb1cef7ce6e.zip CMake-b62fe1242f7d621d0b68657dfc9fadb1cef7ce6e.tar.gz CMake-b62fe1242f7d621d0b68657dfc9fadb1cef7ce6e.tar.bz2 |
ExternalProject: Use $(MAKE) whenever possible.
ExternalProject_Add calls that did not explicitly request a
CMAKE_GENERATOR would not get recursive parallel make behavior.
This commit fixes that issue.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/ExternalProject.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index b74f207..b4359c8 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -563,8 +563,9 @@ function(_ep_get_build_command name step cmd_var) if(cfg_cmd_id STREQUAL "cmake") # CMake project. Select build command based on generator. get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR) - if("${cmake_generator}" MATCHES "Make" AND - "${cmake_generator}" STREQUAL "${CMAKE_GENERATOR}") + if("${CMAKE_GENERATOR}" MATCHES "Make" AND + ("${cmake_generator}" STREQUAL "${CMAKE_GENERATOR}" OR + NOT cmake_generator)) # The project uses the same Makefile generator. Use recursive make. set(cmd "$(MAKE)") if(step STREQUAL "INSTALL") @@ -593,7 +594,8 @@ 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". - set(cmd "make") + # But use "$(MAKE)" to get recursive parallel make. + set(cmd "$(MAKE)") if(step STREQUAL "INSTALL") set(args install) endif() |