[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] globs case sensitivity depends on platform
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2016-01-28 19:28:11
Message-ID: CAExHGmTma8p5qkKKTMUmYoA=fQ1ojLrVgXnnScqsh++Tt=qtBw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Jan,

On Thu, Jan 28, 2016 at 4:52 PM, =F0=9F=90=8B Jan Hegewald <jan.hegewald@aw=
i.de>
wrote:

> Hi Andreas,
>
> > On 28.01.2016, at 16:43, Andreas Pakulat <apaku@gmx.de> wrote:
> >
> > Hi Jan,
> >
> > On Thu, Jan 28, 2016 at 2:35 PM, =F0=9F=90=8B Jan Hegewald <jan.hegewal=
d@awi.de>
> wrote:
> > Hi Nils,
> >
> > > On 28.01.2016, at 13:39, Nils Gladitz <nilsgladitz@gmail.com> wrote:
> > >
> > > You might already be aware but CMake discourages using GLOB for sourc=
e
> files
> >
> > yes, I read the docs before posting (:
> > Avoiding glob would be a workaround to my problem. But anyway I think
> that glob is broken if it produces different results on different platfor=
ms.
> >
> > I can't find any docs on cmake.org about what a globbing-expression is
> exactly, but the docs for file(glob) at least don't say anything about th=
is
> function producing the same results on different platforms. In fact I'd b=
e
> surprised if the behavior of the file(glob) function is different than
> using the same wildcards with ls/dir on a terminal.
>
> the cmake glob is different from the results of a terminal ls


On the Mac apparently (based on your first mail)

> The only bug that I can see from your description is that the behavior is
> inconsistent with different types of FS on OSX, that is definetly not
> matching above mentioned expectation.
>
> Maybe I was unclear about this, but cmake glob ignores the case regardles=
s
> of the FS being case sensitive or not.
>

Now that contradicts your initial mail, you said there that on OSX you get
F* and f* files for a case-insensitive filesystem, but on Linux you get
only F*. But you also said that a case-sensitive filesystem on OSX still
gives you F* and f* files, which in my eyes is a bug in the implementation.

I also just checked the CMake sources quickly and it seems that the
glob-support is completely 'inhouse', meaning it does not call out to
platform-specific functions (I guess that would explain the discrepancy on
OSX).

So I guess asking for the same behavior across platforms is just as
reasonable (given the logics are fully under CMake's control) as asking for
it to reflect what a ls/dir would do on the corresponding platform.

I think a bugreport is the correct next step, even if it merely leads to a
clarification of the behavior in the documentation.

Andreas

[Attachment #5 (text/html)]

<div dir="ltr">Hi Jan,<div class="gmail_extra"><br><div class="gmail_quote">On Thu, \
Jan 28, 2016 at 4:52 PM, 🐋 Jan Hegewald <span dir="ltr">&lt;<a \
href="mailto:jan.hegewald@awi.de" target="_blank">jan.hegewald@awi.de</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">Hi Andreas,<br> <span class=""><br>
&gt; On 28.01.2016, at 16:43, Andreas Pakulat &lt;<a \
href="mailto:apaku@gmx.de">apaku@gmx.de</a>&gt; wrote:<br> &gt;<br>
&gt; Hi Jan,<br>
&gt;<br>
&gt; On Thu, Jan 28, 2016 at 2:35 PM, 🐋 Jan Hegewald &lt;<a \
href="mailto:jan.hegewald@awi.de">jan.hegewald@awi.de</a>&gt; wrote:<br> &gt; Hi \
Nils,<br> &gt;<br>
&gt; &gt; On 28.01.2016, at 13:39, Nils Gladitz &lt;<a \
href="mailto:nilsgladitz@gmail.com">nilsgladitz@gmail.com</a>&gt; wrote:<br> &gt; \
&gt;<br> &gt; &gt; You might already be aware but CMake discourages using GLOB for \
source files<br> &gt;<br>
&gt; yes, I read the docs before posting (:<br>
&gt; Avoiding glob would be a workaround to my problem. But anyway I think that glob \
is broken if it produces different results on different platforms.<br> &gt;<br>
&gt; I can&#39;t find any docs on <a href="http://cmake.org" rel="noreferrer" \
target="_blank">cmake.org</a> about what a globbing-expression is exactly, but the \
docs for file(glob) at least don&#39;t say anything about this function producing the \
same results on different platforms. In fact I&#39;d be surprised if the behavior of \
the file(glob) function is different than using the same wildcards with ls/dir on a \
terminal.<br> <br>
</span>the cmake glob is different from the results of a terminal \
ls</blockquote><div><br></div><div>On the Mac apparently (based on your first \
mail)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""> &gt; The only bug \
that I can see from your description is that the behavior is inconsistent with \
different types of FS on OSX, that is definetly not matching above mentioned \
expectation.<br> <br>
</span>Maybe I was unclear about this, but cmake glob ignores the case regardless of \
the FS being case sensitive or not.<br></blockquote><div><br></div><div>Now that \
contradicts your initial mail, you said there that on OSX you get F* and f* files for \
a case-insensitive filesystem, but on Linux you get only F*. But you also said that a \
case-sensitive filesystem on OSX still gives you F* and f* files, which in my eyes is \
a bug in the implementation.</div><div><br></div><div>I also just checked the CMake \
sources quickly and it seems that the glob-support is completely &#39;inhouse&#39;, \
meaning it does not call out to platform-specific functions (I guess that would \
explain the discrepancy on OSX).<br></div><div><br></div><div>So I guess asking for \
the same behavior across platforms is just as reasonable (given the logics are fully \
under CMake&#39;s control) as asking for it to reflect what a ls/dir would do on the \
corresponding platform.</div><div><br></div><div>I think a bugreport is the correct \
next step, even if it merely leads to a clarification of the behavior in the \
documentation.</div><div><br></div><div>Andreas</div></div></div></div>



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic