Re: [CMake] IF Matches

2011-03-03 Thread Michael Wild
On 03/03/2011 11:25 AM, Micha Renner wrote: > Hello, > > IF("bgdgbBromNN" MATCHES "Brom") > is true, > but > IF("Brom" MATCHES "bgdgbBromNN") > is false. > > Should be same, or? > > Greetings > > Micha No, the right-hand-side of MATCHES is a regular expression. Michael

[CMake] IF Matches

2011-03-03 Thread Micha Renner
Hello, IF("bgdgbBromNN" MATCHES "Brom") is true, but IF("Brom" MATCHES "bgdgbBromNN") is false. Should be same, or? Greetings Micha ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com

Re: [CMake] if(MATCHES) broken??

2008-12-04 Thread Matthew Woehlke
Bill Hoffman wrote: Matthew Woehlke wrote: ping? I have created a bug report: http://public.kitware.com/Bug/view.php?id=8226 No ETA right now. Ok, thanks. -- Matthew Please do not quote my e-mail address unobfuscated in message bodies. -- Microsoft, electricity, network connectivity. Fo

Re: [CMake] if(MATCHES) broken??

2008-12-04 Thread Bill Hoffman
Matthew Woehlke wrote: ping? I have created a bug report: http://public.kitware.com/Bug/view.php?id=8226 No ETA right now. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] if(MATCHES) broken??

2008-12-04 Thread Matthew Woehlke
Matthew Woehlke wrote: Bill Hoffman wrote: The problem is that if(something MATCHES something) works for either strings or variable names. The way that works is by checking to see if there is a variable defined by the string given to if. Even if that string is in quotes, it can still be trea

Re: [CMake] if(MATCHES) broken??

2008-11-20 Thread Matthew Woehlke
Bill Hoffman wrote: The only work around that I can think of is to change the macro to a function and unset the variable before the test. function(foo bar) set(${bar} ) # unset the variable named "${bar}" if("${bar}" MATCHES "CFLAGS") message(STATUS "CFLAGS matched") elseif("${bar}"

Re: [CMake] if(MATCHES) broken??

2008-11-20 Thread Matthew Woehlke
Bill Hoffman wrote: The problem is that if(something MATCHES something) works for either strings or variable names. The way that works is by checking to see if there is a variable defined by the string given to if. Even if that string is in quotes, it can still be treated like a variable. S

Re: [CMake] if(MATCHES) broken??

2008-11-19 Thread Bill Hoffman
Matthew Woehlke wrote: Can someone explain to me: - why this doesn't work (prints "CFLAGS match broken!!") - if it's supposed to work or if this is a bug - a great work-around to this problem ;-) This is with cmake 2.6.2 macro(foo bar) if("${ba

Re: [CMake] if(MATCHES) broken??

2008-11-19 Thread George Neill
Matthew, On Wed, Nov 19, 2008 at 5:56 PM, Matthew Woehlke <[EMAIL PROTECTED]> wrote: > Can someone explain to me: > - why this doesn't work (prints "CFLAGS match broken!!") > - if it's supposed to work or if this is a bug > - a great work-around to this problem ;-) > > This is with cmake 2.6.2 > >

[CMake] if(MATCHES) broken??

2008-11-19 Thread Matthew Woehlke
Can someone explain to me: - why this doesn't work (prints "CFLAGS match broken!!") - if it's supposed to work or if this is a bug - a great work-around to this problem ;-) This is with cmake 2.6.2 macro(foo bar) if("${bar}" MATCHES "CFLAGS")