[cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty

2014-03-13 Thread Aurélien Gâteau
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

Re: [cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty

2014-03-13 Thread Stephen Kelly
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

Re: [cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty

2014-03-13 Thread Aurélien Gâteau
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

Re: [cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty

2014-03-13 Thread Aurélien Gâteau
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

Re: [cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty

2014-03-13 Thread Stephen Kelly
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

Re: [cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty

2014-03-13 Thread Aurélien Gâteau
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" >

Re: [cmake-developers] [PATCH] Wrap ARGV1 and ARGV2 in quotes to avoid errors when they are empty

2014-03-13 Thread Brad King
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