[cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-12 Thread Jiri Malak
Hi, I enclosed patch for removing placeholder "x" from STREQUAL operands. It does comparision transparent. Regards Jiri>From e2a1f5490002c3479a1e637ae584d7c23a08561d Mon Sep 17 00:00:00 2001 From: Jiri Malak Date: Sun, 13 Apr 2014 06:55:17 +0200 Subject: [PATCH] remove "x" placeholder from STRE

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-13 Thread Rolf Eike Beer
Am Sonntag, 13. April 2014, 07:05:27 schrieb Jiri Malak: > Hi, > > I enclosed patch for removing placeholder "x" from STREQUAL operands. > It does comparision transparent. I very much would like to see that, but there is a problem: CMake may interpret the operands of STREQUAL both as text and as

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-13 Thread Jiri Malak
>> I enclosed patch for removing placeholder "x" from STREQUAL operands. >> It does comparision transparent. > > I very much would like to see that, but there is a problem: CMake may > interpret the operands of STREQUAL both as text and as variable name. > > So this does what you expect for the mom

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-13 Thread Rolf Eike Beer
Am Sonntag, 13. April 2014, 09:59:03 schrieb Jiri Malak: > >> I enclosed patch for removing placeholder "x" from STREQUAL operands. > >> It does comparision transparent. > > > > I very much would like to see that, but there is a problem: CMake may > > interpret the operands of STREQUAL both as tex

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-13 Thread Jiri Malak
> Am Sonntag, 13. April 2014, 09:59:03 schrieb Jiri Malak: >> >> I enclosed patch for removing placeholder "x" from STREQUAL operands. >> >> It does comparision transparent. >> > >> > I very much would like to see that, but there is a problem: CMake may >> > interpret the operands of STREQUAL both

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-14 Thread David Cole
> Hmm.. > It is a little bit confusing for newcommers that you can not do > simple comparision for text word > if some variable with this name exists. Oh, it's confusing and confounding to old-timers, too... :-) -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FA

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-17 Thread Matthew Woehlke
On 2014-04-13 03:37, Rolf Eike Beer wrote: Sadly the expression is even expanded when it is quoted as long as it is a valid variable name. So what you could do is: replace the "x" by a simple space and then quote the match string, because " Linux" is no valid variable name. set(" Linux" Windows

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-17 Thread Ben Boeckel
On Thu, Apr 17, 2014 at 17:17:21 -0400, Matthew Woehlke wrote: > set(" Linux" Windows) # succeeds Even better: set(" Linux" Windows) > Alas, the only character that may not appear in a variable name is > '\0'. (And even that is more due to use of raw char* with no length > than intent, I

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-18 Thread Rolf Eike Beer
Matthew Woehlke wrote: > On 2014-04-13 03:37, Rolf Eike Beer wrote: > > Sadly the expression is even expanded when it is quoted as long as it is a > > valid variable name. So what you could do is: replace the "x" by a simple > > space and then quote the match string, because " Linux" is no valid >

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-18 Thread Brad King
On 04/18/2014 03:07 AM, Rolf Eike Beer wrote: > what about nuking at least all > control characters and whitespace from variable names in 3.1? I don't think > that anyone has used them on purpose, and accidentially using them will only > cause trouble. If we're going to change this I don't want

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-18 Thread Rolf Eike Beer
Brad King wrote: > On 04/18/2014 03:07 AM, Rolf Eike Beer wrote: > > what about nuking at least all > > control characters and whitespace from variable names in 3.1? I don't > > think > > that anyone has used them on purpose, and accidentially using them will > > only cause trouble. > > If we're g

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-18 Thread Brad King
On 04/18/2014 08:58 AM, Rolf Eike Beer wrote: > To forbid whitespace and control characters in variable names can IMHO only > be good. Some people use arbitrary variable names as a way to do key/value tables. In such cases it is intentional to use arbitrary characters in variable names even thoug

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-18 Thread Matthew Woehlke
On 2014-04-17 22:23, Ben Boeckel wrote: On Thu, Apr 17, 2014 at 17:17:21 -0400, Matthew Woehlke wrote: Alas, the only character that may not appear in a variable name is '\0'. (And even that is more due to use of raw char* with no length than intent, I bet.) Actually, it's all std::string now,

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-18 Thread Ben Boeckel
On Fri, Apr 18, 2014 at 10:06:36 -0400, Matthew Woehlke wrote: > Where a variable is created (e.g. the SET command), presumably. Internally-created variables would then be missed. string(TOUPPER "mystr" "varname with spaces") > I don't think the performance hit should be so bad if only write

Re: [cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

2014-04-23 Thread Matthew Woehlke
On 2014-04-18 09:07, Brad King wrote: On 04/18/2014 08:58 AM, Rolf Eike Beer wrote: To forbid whitespace and control characters in variable names can IMHO only be good. Some people use arbitrary variable names as a way to do key/value tables. In such cases it is intentional to use arbitrary c