summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-03-31 14:13:01 (GMT)
committerBrad King <brad.king@kitware.com>2009-03-31 14:13:01 (GMT)
commita30b84e4cc8fe784d0f6c1c871a0231679f9dd7c (patch)
tree9b3c0e159fbadb6c92551b346c0568743585cd35 /Modules
parent6f4554982dcd43ae7d46254f4d1bc80d46f77597 (diff)
downloadCMake-a30b84e4cc8fe784d0f6c1c871a0231679f9dd7c.zip
CMake-a30b84e4cc8fe784d0f6c1c871a0231679f9dd7c.tar.gz
CMake-a30b84e4cc8fe784d0f6c1c871a0231679f9dd7c.tar.bz2
BUG: Fix AddExternalProject config command id
This fixes the get_configure_command_id function to not mistake CONFIGURE_COMMAND values that run "cmake -P" or "cmake -E" for a CMake project configuration. These values just help run scripts.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/AddExternalProject.cmake16
1 files changed, 6 insertions, 10 deletions
diff --git a/Modules/AddExternalProject.cmake b/Modules/AddExternalProject.cmake
index c96a771..2474de8 100644
--- a/Modules/AddExternalProject.cmake
+++ b/Modules/AddExternalProject.cmake
@@ -86,18 +86,14 @@ function(get_configure_command_id name cfg_cmd_id_var)
set(${cfg_cmd_id_var} "cmake" PARENT_SCOPE)
else()
# Otherwise we have to analyze the value:
- if(cmd MATCHES "/configure$")
+ if(cmd MATCHES "^[^;]*/configure")
+ set(${cfg_cmd_id_var} "configure" PARENT_SCOPE)
+ elseif(cmd MATCHES "^[^;]*/cmake" AND NOT cmd MATCHES ";-[PE];")
+ set(${cfg_cmd_id_var} "cmake" PARENT_SCOPE)
+ elseif(cmd MATCHES "config")
set(${cfg_cmd_id_var} "configure" PARENT_SCOPE)
else()
- if(cmd MATCHES "cmake")
- set(${cfg_cmd_id_var} "cmake" PARENT_SCOPE)
- else()
- if(cmd MATCHES "config")
- set(${cfg_cmd_id_var} "configure" PARENT_SCOPE)
- else()
- set(${cfg_cmd_id_var} "unknown:${cmd}" PARENT_SCOPE)
- endif()
- endif()
+ set(${cfg_cmd_id_var} "unknown:${cmd}" PARENT_SCOPE)
endif()
endif()
endif()