From a30b84e4cc8fe784d0f6c1c871a0231679f9dd7c Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 31 Mar 2009 10:13:01 -0400 Subject: 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. --- Modules/AddExternalProject.cmake | 16 ++++++---------- 1 file 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() -- cgit v0.12