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