summaryrefslogtreecommitdiffstats
path: root/Modules/GetPrerequisites.cmake
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-09-28 21:35:40 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-09-28 21:35:40 (GMT)
commitb5265c24751dd89487d71f8cb5e735e7a9eab1f9 (patch)
tree146920487d82fa605c6c5818485852f465923947 /Modules/GetPrerequisites.cmake
parent65a78ec5b81529507bed1375a13fca23bed60be7 (diff)
downloadCMake-b5265c24751dd89487d71f8cb5e735e7a9eab1f9.zip
CMake-b5265c24751dd89487d71f8cb5e735e7a9eab1f9.tar.gz
CMake-b5265c24751dd89487d71f8cb5e735e7a9eab1f9.tar.bz2
Fix issue #9395 - only return true for .exe files on Windows from the is_file_executable function. Makes behavior of this function conceptually consistent with Mac and Linux behavior. Thanks to Clinton Stimpson for the patch.
Diffstat (limited to 'Modules/GetPrerequisites.cmake')
-rw-r--r--Modules/GetPrerequisites.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index b7656a3..67d4a14 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -73,16 +73,16 @@ function(is_file_executable file result_var)
get_filename_component(file_full "${file}" ABSOLUTE)
string(TOLOWER "${file_full}" file_full_lower)
- # If file name ends in .exe or .dll on Windows, *assume* executable:
+ # If file name ends in .exe on Windows, *assume* executable:
#
if(WIN32)
- if("${file_full_lower}" MATCHES "\\.(exe|dll)$")
+ if("${file_full_lower}" MATCHES "\\.exe$")
set(${result_var} 1 PARENT_SCOPE)
return()
- endif("${file_full_lower}" MATCHES "\\.(exe|dll)$")
+ endif("${file_full_lower}" MATCHES "\\.exe$")
# A clause could be added here that uses output or return value of dumpbin
- # to determine ${result_var}. In 99%+? practical cases, the exe|dll name
+ # to determine ${result_var}. In 99%+? practical cases, the exe name
# match will be sufficient...
#
endif(WIN32)