No subject


Mon Dec 15 09:51:36 EST 2008


<div class=3D"im"><br>
file(GLOB_RECURSE sources &quot;*.{h,cpp}&quot;)<br>
<br>
</div>James<br>
<br>
On Sun, Mar 29, 2009 at 2:21 AM, Carlson Daniel<br>
<div><div></div><div class=3D"h5">&lt;<a href=3D"mailto:daniel.c.carlson at gm=
ail.com">daniel.c.carlson at gmail.com</a>&gt; wrote:<br>
&gt; Ok, I thought that Cmake supported the standard regular expression use=
d by<br>
&gt; most GNU projects. The |-sign is an or-operator so the standard regula=
r<br>
&gt; expression for this would be:<br>
&gt;<br>
&gt; ^.*\.(h|hpp|ipp)$<br>
&gt;<br>
&gt; but now I realize that global expression and regular expression is not=
 the<br>
&gt; same thing... Sorry for that!<br>
&gt;<br>
&gt; 2009/3/29 Robert Dailey &lt;<a href=3D"mailto:rcdailey at gmail.com">rcda=
iley at gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; I would prefer it just work. For large directory hierarchies, runn=
ing the<br>
&gt;&gt; glob twice is severely inefficient.<br>
&gt;&gt; Thanks for the link to the documentation. Can anyone figure out a =
way to<br>
&gt;&gt; glob for H, HPP, and IPP files in a single glob operation? Is it e=
ven<br>
&gt;&gt; possible? I&#39;d be really disappointed it it wasn&#39;t.<br>
&gt;&gt;<br>
&gt;&gt; On Sat, Mar 28, 2009 at 11:14 PM, James Bigler &lt;<a href=3D"mail=
to:jamesbigler at gmail.com">jamesbigler at gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The regular expression syntax is documented under the &#39;str=
ing&#39; command<br>
&gt;&gt;&gt; in the help files. =A0There&#39;s also a wiki entry:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; <a href=3D"http://vtk.org/Wiki/CMake_FAQ#Which_regular_express=
ions_are_supported_by_CMake.3F" target=3D"_blank">http://vtk.org/Wiki/CMake=
_FAQ#Which_regular_expressions_are_supported_by_CMake.3F</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I couldn&#39;t get file(GLOB_RECURSE sources &quot;*.(h|cpp)&q=
uot;) to work. =A0&quot;*.h&quot;<br>
&gt;&gt;&gt; would catch all the h files, &quot;*.cpp&quot; would catch all=
 the cpp files,<br>
&gt;&gt;&gt; but the expression above didn&#39;t catch both.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Robert, if the regular expression doesn&#39;t work for you, yo=
u could<br>
&gt;&gt;&gt; always just run the command twice and concatenate the results:=
<br>
&gt;&gt;&gt; file(GLOB_RECURSE h_files &quot;*.h&quot;)<br>
&gt;&gt;&gt; file(GLOB_RECURSE hpp_ipp_files &quot;*.[hi]pp&quot;)<br>
&gt;&gt;&gt; set(files &quot;${h_files}&quot; &quot;${hpp_ipp_files}&quot;)=
<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; James<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Sat, Mar 28, 2009 at 6:09 PM, Robert Dailey &lt;<a href=3D"=
mailto:rcdailey at gmail.com">rcdailey at gmail.com</a>&gt;<br>
&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt; &gt; Thank you.<br>
&gt;&gt;&gt; &gt; For future reference, is the glob syntax for CMake docume=
nted anywhere?<br>
&gt;&gt;&gt; &gt; If<br>
&gt;&gt;&gt; &gt; it is, I have not been able to find it. Thanks again!<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; On Sat, Mar 28, 2009 at 4:51 PM, Carlson Daniel<br>
&gt;&gt;&gt; &gt; &lt;<a href=3D"mailto:daniel.c.carlson at gmail.com">daniel.=
c.carlson at gmail.com</a>&gt;<br>
&gt;&gt;&gt; &gt; wrote:<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; try:<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; *.(h|hpp|ipp)<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; 2009/3/28 Robert Dailey &lt;<a href=3D"mailto:rcdaile=
y at gmail.com">rcdailey at gmail.com</a>&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; Can I get some help with this? Sorry to rush, but=
 I&#39;m a bit blocked.<br>
&gt;&gt;&gt; &gt;&gt;&gt; I<br>
&gt;&gt;&gt; &gt;&gt;&gt; know some of you may be tempted to ask my why I&#=
39;m doing this and<br>
&gt;&gt;&gt; &gt;&gt;&gt; possibly<br>
&gt;&gt;&gt; &gt;&gt;&gt; even try to change my mind, but with all do respe=
ct, I don&#39;t plan to<br>
&gt;&gt;&gt; &gt;&gt;&gt; avoid<br>
&gt;&gt;&gt; &gt;&gt;&gt; globbing :)<br>
&gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; On Fri, Mar 27, 2009 at 7:07 PM, Robert Dailey &l=
t;<a href=3D"mailto:rcdailey at gmail.com">rcdailey at gmail.com</a>&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt; I need to create a glob expression (For file(=
 GLOB_RECURSE ) ) that<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt; will<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt; find files with the following extensions:<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt; *.h<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt; *.hpp<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt; *.ipp<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt; How can I format my glob expression to do thi=
s? I know for HPP and<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt; IPP<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt; files, my glob expression would be:<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt; *.[hi]pp<br>
&gt;&gt;&gt; &gt;&gt;&gt;&gt; However, this ignores all H files.<br>
&gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; _______________________________________________<b=
r>
&gt;&gt;&gt; &gt;&gt;&gt; Powered by <a href=3D"http://www.kitware.com" tar=
get=3D"_blank">www.kitware.com</a><br>
&gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt;&gt; &gt;&gt;&gt; <a href=3D"http://www.kitware.com/opensource/open=
source.html" target=3D"_blank">http://www.kitware.com/opensource/opensource=
.html</a><br>
&gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; Please keep messages on-topic and check the CMake=
 FAQ at:<br>
&gt;&gt;&gt; &gt;&gt;&gt; <a href=3D"http://www.cmake.org/Wiki/CMake_FAQ" t=
arget=3D"_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt;&gt; &gt;&gt;&gt; <a href=3D"http://www.cmake.org/mailman/listinfo/=
cmake" target=3D"_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br=
>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt;&gt; &gt; Powered by <a href=3D"http://www.kitware.com" target=3D"_=
blank">www.kitware.com</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt;&gt; &gt; <a href=3D"http://www.kitware.com/opensource/opensource.h=
tml" target=3D"_blank">http://www.kitware.com/opensource/opensource.html</a=
><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Please keep messages on-topic and check the CMake FAQ at:=
<br>
&gt;&gt;&gt; &gt; <a href=3D"http://www.cmake.org/Wiki/CMake_FAQ" target=3D=
"_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt;&gt; &gt; <a href=3D"http://www.cmake.org/mailman/listinfo/cmake" t=
arget=3D"_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Powered by <a href=3D"http://www.kitware.com" target=3D"_blank=
">www.kitware.com</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt;&gt; <a href=3D"http://www.kitware.com/opensource/opensource.html" =
target=3D"_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt;&gt;&gt; <a href=3D"http://www.cmake.org/Wiki/CMake_FAQ" target=3D"_bla=
nk">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt;&gt; <a href=3D"http://www.cmake.org/mailman/listinfo/cmake" target=
=3D"_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">ww=
w.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href=3D"http://www.kitware.com/opensource/opensource.html" targ=
et=3D"_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt;&gt; <a href=3D"http://www.cmake.org/Wiki/CMake_FAQ" target=3D"_blank">=
http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href=3D"http://www.cmake.org/mailman/listinfo/cmake" target=3D"=
_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.kitware=
.com</a><br>
<br>
Visit other Kitware open-source projects at <a href=3D"http://www.kitware.c=
om/opensource/opensource.html" target=3D"_blank">http://www.kitware.com/ope=
nsource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href=3D"http:/=
/www.cmake.org/Wiki/CMake_FAQ" target=3D"_blank">http://www.cmake.org/Wiki/=
CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"http://www.cmake.org/mailman/listinfo/cmake" target=3D"_blank">h=
ttp://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>

--0016364ec868ef76ff04664864f3--


More information about the CMake mailing list