MantisBT - CMake
View Issue Details
0015191CMakeCMakepublic2014-10-03 01:062015-04-06 09:07
Yoshisato Yanagisawa 
 
normalminoralways
closedduplicate 
WindowsWindows
 
 
0015191: find_program should search commands in PATHEXT env.
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 [^]
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
No tags attached.
duplicate of 0009879closed Kitware Robot find_program command doesn't take PATHEXT into account 
Issue History
2014-10-03 01:06Yoshisato YanagisawaNew Issue
2014-10-03 08:15Brad KingRelationship addedduplicate of 0009879
2014-10-03 08:15Brad KingNote Added: 0036891
2014-10-03 08:15Brad KingStatusnew => resolved
2014-10-03 08:15Brad KingResolutionopen => duplicate
2015-04-06 09:07Robert MaynardNote Added: 0038412
2015-04-06 09:07Robert MaynardStatusresolved => closed

Notes
(0036891)
Brad King   
2014-10-03 08:15   
Resolving as duplicate of 0009879.
(0038412)
Robert Maynard   
2015-04-06 09:07   
Closing resolved issues that have not been updated in more than 4 months.