FindCURL doesn't report an error for non-existing file or mismatched version
I'm having the following problems with CMake 3.7.2 (build from this source) under Ubuntu 16.04, all seemingly due to FindCURL.
- If I pass
-DCURL_LIBRARY=/file/that/does/not/exist.so -DCURL_INCLUDE_DIR=/folder/that/does/not/exists
tocmake
where my project has afind_package(CURL 7.43.0 REQUIRED)
, nothing breaks until I make a target withmake myTarget
(of course, linker can't find the library or required headers are not included). Ideally, I should have at least a warning saying the file doesn't exist. Instead I get
Found CURL: /file/that/does/not/exist.so (Required is at least version "7.43.0")
-
Assuming that the library and include directory supplied exists (as a file and directory) but not
libcurl
in any manner, no error is produced again in the same project above. I practically get the same message as above. -
Assuming that the library and include directory supplied exists and actually
libcurl
but smaller version, only a warning is issued withREQUIRED
option while it should give an error withREQUIRED
and a warning without it.
I have confirmed the same bug in 3.7.1 build from source on MacOS with the same identical project.
Thanks a lot!