[CMake] CMake rebuilds every time

Arindam Mukherjee arindam.mukerjee at gmail.com
Mon Oct 22 06:38:29 EDT 2012


On Mon, Oct 22, 2012 at 4:06 PM, Arindam Mukherjee
<arindam.mukerjee at gmail.com> wrote:
> I am sorry I missed your response. Here are the details:
>
> 1. I have a shell / batch script which does two things:
>     a. cd build_dir && cmake $SRC_PATH
>     b. make   # On Unix
>
>     On Windows, for step b., we run
>     devenv proj.sln /Build "Release|x86" /out <logfile_path>
>
> Here is the top level CMakeLists.txt:
> http://pastebin.com/QWG4wSuf
>
> Here is a CMakeLists.txt in one of the subdirs:
> http://pastebin.com/QYGCpH7k
>
> These are fairly representative of how the CMakeLists.txt are.

I should have added - we have source files with extension ".C" (i.e.
.C in caps) and these are meant to be C++ sources.

>
> Regards,
> Arindam
>
> On Tue, Oct 16, 2012 at 9:04 PM, David Cole <david.cole at kitware.com> wrote:
>> What does your CMakeLists look like?
>>
>> Only the necessary rebuild steps should be taken on an incremental build.
>>
>> How do you invoke a rebuild? (Just typing 'make' or some other mechanism?)
>>
>>
>> On Mon, Oct 15, 2012 at 6:22 AM, Arindam Mukherjee
>> <arindam.mukerjee at gmail.com> wrote:
>>> Hi,
>>>
>>> I have a cross-platform build setup using cmake 2.8.9 which builds on
>>> 5 different OSs. However it rebuilds every time even when neither the
>>> Makefile timestamps nor the source file timastamps had changed.
>>> Examining the generated Makefiles I can see that all .o, .i and .s
>>> targets have been marked .PHONY. Don't know if this is the reason for
>>> it. How to fix this to not rebuild every time but do incremental
>>> builds?
>>>
>>> Thanks,
>>> Arindam
>>> --
>>>
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list