<div class="gmail_quote">On Fri, Sep 17, 2010 at 4:12 AM, Michael Wild <span dir="ltr">&lt;<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On 17. Sep, 2010, at 9:41 , SC wrote:<br>
<br>
&gt; Hi there,<br>
&gt;<br>
&gt; I recently upgraded my dev system from Ubuntu 8.04 to Ubuntu 10.4. This made me change from Cmake 2.4-patch7 to<br>
&gt; Cmake 2.8.0.<br>
&gt;<br>
&gt; Since then, generating a makefile with &quot;Cmake .&quot; in the Simclist library source directory produces the following :<br>
&gt;<br>
&gt; #=============================================================================<br>
&gt; # Target rules for targets named simclist<br>
&gt;<br>
&gt; # Build rule for target.<br>
&gt; simclist: cmake_check_build_system<br>
&gt; $(MAKE) -f CMakeFiles/Makefile2 simclist<br>
&gt; .PHONY : simclist<br>
&gt;<br>
&gt; # fast build rule for target.<br>
&gt; simclist/fast:<br>
&gt; $(MAKE) -f CMakeFiles/simclist.dir/build.make CMakeFiles/simclist.dir/build<br>
&gt; .PHONY : simclist/fast<br>
&gt;<br>
&gt; simclist.o: simclist.c.o<br>
&gt; .PHONY : simclist.o<br>
&gt;<br>
&gt; # target to build an object file<br>
&gt; simclist.c.o:<br>
&gt; $(MAKE) -f CMakeFiles/simclist.dir/build.make CMakeFiles/simclist.dir/simclist.c.o<br>
&gt; .PHONY : simclist.c.o<br>
&gt;<br>
&gt; simclist.i: simclist.c.i<br>
&gt; .PHONY : simclist.i<br>
&gt;<br>
&gt; # target to preprocess a source file<br>
&gt; simclist.c.i:<br>
&gt; $(MAKE) -f CMakeFiles/simclist.dir/build.make CMakeFiles/simclist.dir/simclist.c.i<br>
&gt; .PHONY : simclist.c.i<br>
&gt;<br>
&gt; simclist.s: simclist.c.s<br>
&gt; .PHONY : simclist.s<br>
&gt;<br>
&gt; # target to generate assembly for a file<br>
&gt; simclist.c.s:<br>
&gt; $(MAKE) -f CMakeFiles/simclist.dir/build.make CMakeFiles/simclist.dir/simclist.c.s<br>
&gt; .PHONY : simclist.c.s<br>
&gt;<br>
&gt;<br>
&gt; As you can see, the &quot;.c&quot; extension is added to output files. As a consequence, I generate simclist.c.o where I<br>
&gt; expect simclist.o. I quickly browsed the ChangeLogs of 2.8 and the FAQ but cound find any tip on this.<br>
&gt;<br>
&gt; Is this a known bug or an incompatibility issue, or maybe an issue in the simclist ?<br>
&gt;<br>
&gt; The simclist Cmakelists.txt file is as follows :<br>
&gt;<br>
&gt; cmake_minimum_required(VERSION 2.6)<br>
&gt; PROJECT(simclist)<br>
&gt;<br>
&gt; # simclist options<br>
&gt; OPTION(SIMCLIST_DEBUG<br>
&gt; &quot;Build with debug code and debug symbols enabled&quot;<br>
&gt; OFF)<br>
&gt; OPTION(SIMCLIST_THREADING<br>
&gt; &quot;Build with simclist threading enable&quot;<br>
&gt; OFF)<br>
&gt; OPTION(SIMCLIST_NO_DUMPRESTORE<br>
&gt; &quot;Disable building of dump &amp; restore functionalities&quot;<br>
&gt; OFF)<br>
&gt; OPTION(SIMCLIST_ALLOW_LOCATIONBASED_HASHES<br>
&gt; &quot;Allow list_hash() to work exclusively on memory locations&quot;<br>
&gt; OFF)<br>
&gt;<br>
&gt; # expand selected options<br>
&gt; SET(SIMCCFLAGS &quot;&quot;)<br>
&gt; # build with debug?<br>
&gt; IF(SIMCLIST_DEBUG)<br>
&gt; SET(SIMCCFLAGS &quot;${SIMCCFLAGS} -DSIMCLIST_DEBUG&quot;)<br>
&gt; ENDIF(SIMCLIST_DEBUG)<br>
&gt; # build with threading?<br>
&gt; IF(SIMCLIST_THREADING)<br>
&gt; SET(SIMCCFLAGS &quot;${SIMCCFLAGS} -DSIMCLIST_WITH_THREADS&quot;)<br>
&gt; ENDIF(SIMCLIST_THREADING)<br>
&gt; # build without dump/restore functionalities?<br>
&gt; IF(SIMCLIST_NO_DUMPRESTORE)<br>
&gt; SET(SIMCCFLAGS &quot;${SIMCCFLAGS} -DSIMCLIST_NO_DUMPRESTORE&quot;)<br>
&gt; ENDIF(SIMCLIST_NO_DUMPRESTORE)<br>
&gt; IF(SIMCLIST_ALLOW_LOCATIONBASED_HASHES)<br>
&gt; SET(SIMCCFLAGS &quot;${SIMCCFLAGS} -DSIMCLIST_ALLOW_LOCATIONBASED_HASHES&quot;)<br>
&gt; ENDIF(SIMCLIST_ALLOW_LOCATIONBASED_HASHES)<br>
&gt; SET_SOURCE_FILES_PROPERTIES(simclist.c COMPILE_FLAGS &quot;${SIMCCFLAGS}&quot;)<br>
&gt;<br>
&gt; # main building stuff<br>
&gt; ADD_LIBRARY(simclist SHARED simclist.c)<br>
&gt; SET(CMAKE_C_FLAGS &quot;-O2 -Wall -std=c99&quot;)<br>
&gt;<br>
&gt; Any idea welcomed !<br>
&gt;<br>
&gt; Thank you<br>
&gt;<br>
<br>
<br>
</div></div>No, this is intentional, I suspect to avoid conflicts. There are people doing stuff like<br>
<br>
add_library(foo foo.c foo.cpp foo.f)<br>
<br>
Why is this a problem for you?<br>
<br>
Michael<br>
<font color="#888888"><br>
--<br>
There is always a well-known solution to every human problem -- neat, plausible, and wrong.<br>
H. L. Mencken<br>
<br>
</font><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br><div><br></div><div>Michael&#39;s exactly right. We consider the name and location of the object files to be an implementation detail of CMake (and it&#39;s different on different systems with different compilers....) -- you cannot rely on those details being exactly the same from version to version of CMake. Especially not versions that are spaced *years* apart from each other.</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br></div>