FIND_FILE ... finds nothing?
Given this simple CMake snippet:
CMAKE_MINIMUM_REQUIRED (VERSION 3.2)
SET (filename "bgbuild.exe")
SET (pathname "/usr/local/bgsdk/bin")
FILE (GLOB glob ${pathname}/${filename})
FIND_FILE (find ${filename} PATHS ${pathname})
MESSAGE (STATUS "find: ${find}")
MESSAGE (STATUS "glob: ${glob}")
I expect both FIND_FILE
and FILE(GLOB)
to find the same file.
However, while the GLOB version works as expected, FIND_FILE finds nothing (I tried seeking different files with the same result)
$ cmake --version; cmake .
cmake version 3.6.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- find: find-NOTFOUND
-- glob: /usr/local/bgsdk/bin/bgbuild.exe
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/eblot/tmp
Any clue about what I'm doing wrong ?
Unfortunately, neither --debug-output
nor --trace
gave information about what FIND_FILE is actually executing, so I do not know how to debug this issue