[cmake-developers] [CMake 0015191]: find_program should search commands in PATHEXT env.

Mantis Bug Tracker mantis at public.kitware.com
Fri Oct 3 01:06:09 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=15191 
====================================================================== 
Reported By:                Yoshisato Yanagisawa
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15191
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-10-03 01:06 EDT
Last Modified:              2014-10-03 01:06 EDT
====================================================================== 
Summary:                    find_program should search commands in PATHEXT env.
Description: 
find_program (http://www.cmake.org/cmake/help/v3.0/command/find_program.html)
expected to find an executable that has an extension listed in PATHEXT on
Windows.  However, it only tries .com and .exe.
http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/kwsys/SystemTools.cxx;h=b1221e3a8f7fee97bca54a002590198e5fb0183f;hb=HEAD#l2785


Steps to Reproduce: 
1. put foo.bat in the PATH.

2. put CMakeLists.txt like:
cmake_minimum_required (VERSION 2.8.11)
project (HELLO)

find_program(Foo foo PATHS)
if (NOT Foo)
  message (FATAL_ERROR "Foo not found")
endif()
message("Foo ${Foo}")

3. cmake
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-10-03 01:06 Yoshisato YanagisawaNew Issue                                  
 
======================================================================




More information about the cmake-developers mailing list