I’m attempting to use cmake_path(HAS_FILENAME ) to determine if a file exists within a path. I’m either using it incorrectly or something else is going on because it always return ‘ON’.
Basically, I’m doing this (an example)
set(path "C:/My_Dir/test/my.dll")
cmake_path(HAS_FILENAME path isThere)
message(STATUS "Eval: ${isThere}")
Every run prints “Eval: ON” no matter if that path contains my.dll or not. I’ve even set the path to an empty dir and it still return ON. Also tried setting isThere to false before execution of the cmake_path line and it gets changed to ON
What am I doing wrong?