[CMake] Fwd: cmake is reruning on rebuild

David Cole david.cole at kitware.com
Wed Feb 18 11:18:18 EST 2009


FYI -- conversation continued off list... here's the latest:

---------- Forwarded message ----------
From: David Cole <david.cole at kitware.com>
Date: Wed, Feb 18, 2009 at 11:17 AM
Subject: Re: [CMake] cmake is reruning on rebuild
To: elizabeta petreska <elizabeta.petreska at gmail.com>


Do your other projects use CMake to generate the solution files? If so, then
"Rebuild Solution" should re-run CMake. The only thing that should prevent
it is if somebody sets "CMAKE_SUPPRESS_REGENERATION" in their CMakeLists.txt
file. Maybe the other projects do that...? (But if they do, then changing a
CMakeLists.txt file means you have to manually re-run CMake...)

HTH,
David


On Wed, Feb 18, 2009 at 11:05 AM, elizabeta petreska <
elizabeta.petreska at gmail.com> wrote:

> yes , but in my others projects this is not happening. When I select
> Rebuild cmake is not rerunning anew. it just rebuilds everything anew
> withoyut poping dialogs to me. Why is this?
>
>
> On Wed, Feb 18, 2009 at 4:58 PM, David Cole <david.cole at kitware.com>wrote:
>
>> Just use Build Solution. Rebuild Solution causes *all* build steps
>> everywhere to re-run, even when nothing has changed, including the ones that
>> re-run cmake if a CMakeLists.txt file changes.
>>
>> If you want to start over entirely (effective "Rebuild Solution") then
>> wipe your binary tree entirely, re-run CMake to generate a new solution file
>> and open that solution and do "Build Solution".....
>>
>>
>> (It takes a while to get used to this technique when you first switch from
>> pure Visual Studio based builds (without CMake) ... but eventually, you get
>> used to it.)
>>
>>
>> HTH,
>> David
>>
>>
>> On Wed, Feb 18, 2009 at 10:54 AM, elizabeta petreska <
>> elizabeta.petreska at gmail.com> wrote:
>>
>>> Hello
>>> I have one project say C that is dependent on A ,and A is dependent on B.
>>>
>>> in C.cmakelists.txt I am doing the following :
>>>
>>> add_subdirectory(../A "${CMAKE_BINARY_DIR}")
>>>
>>>
>>> ADD_LIBRARY(C SHARED
>>>   ${C_S_SRCS}
>>> )
>>>
>>> TARGET_LINK_LIBRARIES(C
>>>   A
>>>
>>> )
>>>
>>> in A cmakelists.txt I am doing the follwing :
>>>
>>> add_subdirectory(../B "${CMAKE_BINARY_DIR}")
>>>
>>> ADD_LIBRARY(A STATIC
>>>   ${A_S_SRCS}
>>> )
>>>
>>>
>>> TARGET_LINK_LIBRARIES(A
>>>   B
>>> )
>>>
>>> When I make the C project and select Build Solution everything compiles
>>> and works ok.
>>> but after that when I select Rebuild Solution cmake reruns and
>>> regenerates the solutions and displayy message to me :
>>> something like click yes to reload the solution.
>>>
>>> I don't understand why this is happening cause I do not change anything
>>> in the cmakelist.txt of either A ,B ot C.
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090218/a6161de4/attachment.htm>


More information about the CMake mailing list