diff options
author | David Cole <david.cole@kitware.com> | 2008-12-09 20:31:28 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2008-12-09 20:31:28 (GMT) |
commit | 09084d89fb16a7ffc0d8ebf642cd478c51ad65ef (patch) | |
tree | 43cde835dd9a18617874876bbfb3bc5c92f63037 /Modules | |
parent | e51969ac4935999779be2cb8b74a06b218d73dd0 (diff) | |
download | CMake-09084d89fb16a7ffc0d8ebf642cd478c51ad65ef.zip CMake-09084d89fb16a7ffc0d8ebf642cd478c51ad65ef.tar.gz CMake-09084d89fb16a7ffc0d8ebf642cd478c51ad65ef.tar.bz2 |
ENH: Default to the same cmake used for configuring when building and installing. If none specified default to the cmake used to configure the outer/aggregating project.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/AddExternalProject.cmake | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Modules/AddExternalProject.cmake b/Modules/AddExternalProject.cmake index 99b2112..454d2bd 100644 --- a/Modules/AddExternalProject.cmake +++ b/Modules/AddExternalProject.cmake @@ -398,7 +398,12 @@ function(add_external_project_build_command name) if(NOT cmd) set(cmd make) if(cfg_cmd_id STREQUAL "cmake") - set(cmd ${CMAKE_COMMAND}) + get_target_property(cfg_cmd ${name} AEP_CONFIGURE_COMMAND) + if(cfg_cmd) + set(cmd ${cfg_cmd}) + else() + set(cmd ${CMAKE_COMMAND}) + endif() endif() endif() @@ -443,7 +448,12 @@ function(add_external_project_install_command name) if(NOT cmd) set(cmd make) if(cfg_cmd_id STREQUAL "cmake") - set(cmd ${CMAKE_COMMAND}) + get_target_property(cfg_cmd ${name} AEP_CONFIGURE_COMMAND) + if(cfg_cmd) + set(cmd ${cfg_cmd}) + else() + set(cmd ${CMAKE_COMMAND}) + endif() endif() endif() |