[CMake] cmake 2.6.0, breakages

Bill Hoffman bill.hoffman at kitware.com
Mon May 19 08:29:46 EDT 2008


Christian Ehrlicher wrote:
>> Von: Andreas Pakulat
>> On 19.05.08 02:06:51, Dmitry Marakasov wrote:
>>> * Andreas Pakulat (apaku at gmx.de) wrote:
>>>
> <snip>
>>>>> CMakeFiles/Memonix.dir/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.o
>>>>> gets into project object files (seems like it's because
>>>>> CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp gets into
>> GLOB_RECURSE.
>>>>> That's obviously undesired.
>>>> Right, then don't use GLOB_RECURSE when you use srcdir == builddir. In
>>>> fact, don't use srcdir == builddir unless you have good reasons. Apart
>>>> from that you could as well just list all the files in the project in
>> a
>>>> variable, instead of using GLOB.
>>> Agreed. But I still see it as a bug that cmake uses srcdir ==
>>> builddir AND includes it's own files into glob when doing GLOB.
>> If you think so, you should open a bugreport. 
>>
> And don't forget to open a bugreport for unix 'find' too. It also finds its own sources when doing a 'find /path/to/find/sources -name "*.c" ' ...
> 
> 
> Christian
All joking aside, this is an interesting case of breaking backwards 
compatibility in an unindented unexpected way.  The new compiler check 
code in CMake uses a .cpp, in 2.4 the compiler test code used .cxx.  I 
mean how could that break a project?

That said glob recurse is a bad way to get the list of source files for 
many other reasons.


-Bill


More information about the CMake mailing list