find_file and NO_DEFAULT_PATH doesn't work on windows
Dear CMake maintainers,
I have got this behaviour, that I think is a bug on Windows 10 64bit :
find_file(
HUNTER_MSVC_VCVARSALL
"vcvarsall.bat"
PATHS
"${_hunter_vcvarsall_path}"
NO_DEFAULT_PATH
)
Where _hunter_vcvarsall_path is : C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build
where indeed there is vcvarsall.bat.
I expect HUNTER_MSVC_VCVARSALL to be equal : C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvarsall.bat
and not HUNTER_MSVC_VCVARSALL-NOT-FOUND
.
Version of CMake : 3.18.4 as well as 3.17. Older versions weren't concerned AFAIK but cannot 100% guarantee it.
Cheers
Edited by Damien Buhl