[CMake] VS2010 solution/project reload

David Cole david.cole at kitware.com
Tue Jan 4 07:27:58 EST 2011


On Tue, Jan 4, 2011 at 6:58 AM, Andrea Galeazzi <Galeazzi at korg.it> wrote:
> I'm currently dealing with a project requiring a lot of dependencies (74),
> so the structure of the CMakeLists.txt is as following:
> project ( Main )
>  add_subdirectory("W:/Lib1"  "${CMAKE_CURRENT_BINARY_DIR}/Lib1")
>  add_subdirectory("W:/Lib2"  "${CMAKE_CURRENT_BINARY_DIR}/Lib2")
>  add_subdirectory("W:/Lib3"  "${CMAKE_CURRENT_BINARY_DIR}/Lib3")
>  ................
>  add_executable( Main ${SOURCES} )
>  target_link_libraries(Main ${LIB_TO_LINK})
>
> When I choose  a VS2010 CMake generates a solution of 77 projects (74 +Main
> + ALL_BUILD + ZERO_CHECK).
> Now if I modify the CMakeLists.txt of one of the subproject and build the
> Main project VS2010 notify that many other project has been modified and
> also the solution. So, for instance, if I add a file to a subproject VS2010
> shows a lot of dialog asking to reload the projects again and that's very
> frustrating!
> My question is: is it a bug or a normal behavior? If the second, how can I
> avoid it?
>
> _______________________________________________
> 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
>

It's listed as a bug in the CMake bug tracker:
http://public.kitware.com/Bug/view.php?id=11258

Also, just yesterday I submitted a bug to Microsoft regarding the
difference in behavior w.r.t. VS2008 and VS2010. We are waiting to see
what they say in that bug report:
https://connect.microsoft.com/VisualStudio/feedback/details/634469/vs-2010-yields-blocking-error-dialog-when-a-macro-tries-to-stop-the-build-vs-2008-did-not

For now the best workaround (that I personally use all the time), is
to exit Visual Studio entirely, run cmake or cmake-gui manually, and
then re-launch Visual Studio. It may sound painful, but really, it's
much more enjoyable than wading through all the reload dialogs...


HTH,
David


More information about the CMake mailing list