FindQt3: Calls to find_ commands missing NAMES/PATHS keywords
I am using the following test project:
cmake_minimum_required( VERSION 3.5.0 )
project( findnemo )
find_file( BAR nemo.h /tmp PATH_SUFFIXES see river pond )
find_file( FOO nemo.h /tmp )
message( "FOO: ${FOO}" )
message( "BAR: ${BAR}" )
CMakeOutput of the file:
$ cmake .
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
FOO: /tmp/nemo.h
BAR: BAR-NOTFOUND
-- Configuring done
-- Generating done
-- Build files have been written to:
The find_file()
documentation clearly states that the subdirectories listed with PATH_SUFFIXES
are "additional", so the base path should be tried too. Yet, only the version without PATH_SUFFIXES
finds the file.
I have observed that behavior on Ubuntu 20.04 and cmake version 3.16.3 (Ubuntu-provided). I have also compiled the latest cmake master branch (cmake version 3.19.20201214-g82b25be8) and it shows the same behavior.