[Cmake-commits] [cmake-commits] david.cole committed GetPrerequisites.cmake 1.8 1.9

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Sep 28 17:35:43 EDT 2009


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv28697

Modified Files:
	GetPrerequisites.cmake 
Log Message:
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.


Index: GetPrerequisites.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/GetPrerequisites.cmake,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** GetPrerequisites.cmake	28 Sep 2009 15:46:50 -0000	1.8
--- GetPrerequisites.cmake	28 Sep 2009 21:35:40 -0000	1.9
***************
*** 74,87 ****
    string(TOLOWER "${file_full}" file_full_lower)
  
!   # If file name ends in .exe or .dll on Windows, *assume* executable:
    #
    if(WIN32)
!     if("${file_full_lower}" MATCHES "\\.(exe|dll)$")
        set(${result_var} 1 PARENT_SCOPE)
        return()
!     endif("${file_full_lower}" MATCHES "\\.(exe|dll)$")
  
      # 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
      # match will be sufficient...
      #
--- 74,87 ----
    string(TOLOWER "${file_full}" file_full_lower)
  
!   # If file name ends in .exe on Windows, *assume* executable:
    #
    if(WIN32)
!     if("${file_full_lower}" MATCHES "\\.exe$")
        set(${result_var} 1 PARENT_SCOPE)
        return()
!     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 name
      # match will be sufficient...
      #



More information about the Cmake-commits mailing list