Because the * follows nothing (as indicated by the very first error message given.... always fix the first error first)<br><br><span style="background: yellow none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">RegularExpression::compile():
?+* follows nothing.<br><br></span><div class="gmail_quote">* means &quot;zero or more of the preceding character&quot; in a regular expression. If there is no preceding character it is not a well formed regular expression. (It *is* a file GLOB expression, but you have to use &quot;.*&quot; to match &quot;anything&quot; preceding the Windows in a regex...)<br>
<br><br>HTH,<br>David<br><br><br><br>On Mon, May 5, 2008 at 8:39 PM, Phil Pellouchoud &lt;<a href="mailto:Phil@slacker.com">Phil@slacker.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p style=""><span style="font-size: 10pt;">Why does this:</span></p>

<p style=""><span style="font-size: 10pt;">SET( PLATFORM_FILTER *Windows.* )</span></p>

<p style=""><span style="font-size: 10pt;">&nbsp;</span></p>

<p style=""><span style="font-size: 10pt;">FOREACH(INP ${PLATFORM_FILTER})</span></p>

<p style=""><span style="font-size: 10pt;">&nbsp; MESSAGE( &quot;INP=&quot; ${INP} )</span></p>

<p style=""><span style="font-size: 10pt;">&nbsp; IF(&quot;abc_Windows.cpp&quot; MATCHES
&quot;${INP}&quot; )</span></p>

<p style=""><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp; MESSAGE( &quot;found a match!&quot; )</span></p>

<p style=""><span style="font-size: 10pt;">&nbsp; ENDIF(&quot;abc_Windows.cpp&quot; MATCHES
&quot;${INP}&quot; )</span></p>

<p style=""><span style="font-size: 10pt;">ENDFOREACH(INP ${PLATFORM_FILTER})</span></p>

<p>&nbsp;</p>

<p>Produce this:</p>

<p>S:\software\foo\build&gt; cmake ..</p>

<p>-- Check for working C compiler: cl</p>

<p>-- Check for working C compiler: cl -- works</p>

<p>-- Check size of void*</p>

<p>-- Check size of void* - done</p>

<p>-- Check for working CXX compiler: cl</p>

<p>-- Check for working CXX compiler: cl -- works</p>

<p>INP=*Windows.*</p>

<p><span style="background: yellow none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">RegularExpression::compile():
?+* follows nothing.</span></p>

<p><span style="background: yellow none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">RegularExpression::compile():
Error in compile.</span></p>

<p><span style="background: yellow none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">CMake
Error: Error in cmake code at</span></p>

<p><span style="background: yellow none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">S:/software/data/cmake/allfiles2.cmake:11:</span></p>


<p><span style="background: yellow none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">IF had
incorrect arguments: &quot;abc_Windows.cpp&quot; MATCHES &quot;${INP}&quot;
(Regular expression &quot;*Windows.*&quot; cannot compile).</span></p>

<p><span style="background: yellow none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">Current
CMake stack:</span></p>

<p><span style="background: yellow none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">[2]&nbsp;&nbsp;&nbsp;&nbsp;
S:/software/data/cmake/allfiles2.cmake</span></p>

<p><span style="background: yellow none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">[1]&nbsp;&nbsp;&nbsp;&nbsp;
S:/software/foo/CMakeLists.txt</span></p>

<p>found a match!</p>

<p>-- Configuring done</p>

<p>&nbsp;</p>

<p>S:\software\foo\build&gt;</p>

<p>&nbsp;</p>

<p>I have tried all kinds of variations with regards to using
quotes around different parts, and I can't get it to compile cleanly. </p>

<p>&nbsp;</p><font color="#888888">

<p>-phil</p>

</font></div>

</div>


<br>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>