When find_dependency is called like this:
find_dependency(Foo "")
CMake fails with:
CMake Error at
/home/aurelien/opt/kf5/share/cmake-3.0/Modules/CMakeFindDependencyMacro.cmake:34
(if):
if given arguments:
"STREQUAL" "EXACT"
Unknown arguments specified
Attached patch fixes
Aurélien Gâteau wrote:
> Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty
The user code has an error and your patch silently hides it.
How is that an improvement?
Thanks,
Steve.
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
ht
Stephen Kelly wrote:
> Aurélien Gâteau wrote:
>
>> Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty
>
> The user code has an error and your patch silently hides it.
>
> How is that an improvement?
Thank you for your kind words.
Here is an updated patch.
Aurélien>From d20383
Aurélien Gâteau wrote:
> Stephen Kelly wrote:
>
>> Aurélien Gâteau wrote:
>>
>>> Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty
>>
>> The user code has an error and your patch silently hides it.
>>
>> How is that an improvement?
>
> Thank you for your kind words.
>
> Here
Aurélien Gâteau wrote:
>> Here is an updated patch.
Hi,
Without your patch with this code:
find_dependency(Foo "")
I get:
CMake Error at .*/Modules/CMakeFindDependencyMacro.cmake:34 (if):
if given arguments:
"STREQUAL" "EXACT"
Unknown arguments specified
Call Stack (most recen
Stephen Kelly wrote:
> Aurélien Gâteau wrote:
>
>>> Here is an updated patch.
>
> Hi,
>
> Without your patch with this code:
>
> find_dependency(Foo "")
>
> I get:
>
> CMake Error at .*/Modules/CMakeFindDependencyMacro.cmake:34 (if):
>if given arguments:
>
> "STREQUAL" "EXACT"
>
On 03/13/2014 08:20 AM, Aurélien Gâteau wrote:
> Actually previous patch was still wrong, since some versions may evaluate to
> 0. Testing with STREQUAL is safer I think.
Applied, thanks:
find_dependency: Give more helpful message if VERSION is empty
http://cmake.org/gitweb?p=cmake.git;a=commi