[CMake] cmake is reruning on rebuild

David Cole david.cole at kitware.com
Wed Feb 18 10:58:42 EST 2009


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/2bd28e54/attachment.htm>


More information about the CMake mailing list