summaryrefslogtreecommitdiffstats
path: root/Modules/GetPrerequisites.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-09-08 15:23:01 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-09-08 15:23:01 (GMT)
commit43837fb3e115c621af89c7d7d9d1df884e9c50d4 (patch)
treed820e0ce4ba4c9147127e9acfe4f05a596dd896e /Modules/GetPrerequisites.cmake
parentd8bfafeff8087c90010053ba37b4072f23f36508 (diff)
downloadCMake-43837fb3e115c621af89c7d7d9d1df884e9c50d4.zip
CMake-43837fb3e115c621af89c7d7d9d1df884e9c50d4.tar.gz
CMake-43837fb3e115c621af89c7d7d9d1df884e9c50d4.tar.bz2
ENH: do not add the same thing to the PATH again and again
Diffstat (limited to 'Modules/GetPrerequisites.cmake')
-rw-r--r--Modules/GetPrerequisites.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 86aac1d..68b17bc 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -377,7 +377,6 @@ endfunction(gp_resolve_item)
#
function(get_prerequisites target prerequisites_var exclude_system recurse exepath dirs)
set(verbose 0)
-
set(eol_char "E")
if(NOT IS_ABSOLUTE "${target}")
@@ -461,7 +460,10 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
get_filename_component(gp_cmd_dir "${gp_cmd}" PATH)
get_filename_component(gp_cmd_dlls_dir "${gp_cmd_dir}/../../Common7/IDE" ABSOLUTE)
if(EXISTS "${gp_cmd_dlls_dir}")
- set(ENV{PATH} "$ENV{PATH};${gp_cmd_dlls_dir}")
+ # only add to the path if it is not already in the path
+ if(NOT "$ENV{PATH}" MATCHES "${gp_cmd_dlls_dir}")
+ set(ENV{PATH} "$ENV{PATH};${gp_cmd_dlls_dir}")
+ endif(NOT "$ENV{PATH}" MATCHES "${gp_cmd_dlls_dir}")
endif(EXISTS "${gp_cmd_dlls_dir}")
endif("${gp_tool}" STREQUAL "dumpbin")
#