[CMake] Fwd: Bug ? Or I'm doing something wrong ?

David Cole david.cole at kitware.com
Mon Mar 22 11:51:51 EDT 2010


Never use "rebuild all" with a cmake generated *.sln file... Just use "Build
Solution"...


On Mon, Mar 22, 2010 at 9:41 AM, John Drescher <drescherjm at gmail.com> wrote:

> On Mon, Mar 22, 2010 at 9:32 AM, Benoit Thomas
> <benoit.thomas at gameloft.com> wrote:
> > Yes that's what I mean, cmake re-runs from the root directory of the
> > project, for every target in my project.
> >
> > Which means when I do a rebuild all in visual studio, every target in my
> > project re-runs the root CMakeLists.txt, which re-build the whole visual
> > studio solution. On my quad core, this means 8 cmake run at the same
> time,
> > and they all do the same job.
> >
> I do not have this on my i7. CMake 2.8.1 appears to be single threaded.
> >
> > Currently, when I generate a Visual Studio project from cmake, I have to
> > manually delete all CMakeLists.txt from every target in order to be able
> to
> > use the rebuild all in Visual Stduio.
> >
> I definitely do not have that.
> >
> > So, I was looking for an option to disable it, or override this behavior.
> >
> > I hope this explain it better (I'm still new to cmake).
> >
> > Thank you,
> > Ben.
> >
> > On 2010-03-22 04:52, David Cole wrote:
> >
> > On Fri, Mar 19, 2010 at 5:28 PM, Benoit Thomas <
> benoit.thomas at gameloft.com>
> > wrote:
> >>
> >> Hello,
> >>
> >> I have the following directory structure
> >>
> >>    root
> >>      |--- project A
> >>      |--- project B
> >>
> >> Project A & B both have their cmakelists.txt file
> >>
>
> I use this and do not see the effect you are describing.
>
> >> Root has a cmakelists.txt file which does add_subdirectory for project A
> >> and B
> >>
> >> When I generate the tree in visual studio, I have a solution with both
> >> projects; and both project A & B have their corresponding cmakelists.txt
> >> added to the project.
> >>
> >> However, the command line for the custom build steps on those files
> refer
> >> to root/cmakelists.txt and not project A or B/cmakelists.txt
> >>
> >> My problem come when I do a rebuild all, both project A & B tries to
> >> rebuild both projects and it creates other problems; I have to manually
> run
> >> cmake root in command prompt before continuing the build.
> >>
> >> My real project is far bigger than what I explain here, but I do not
> know
> >> what I'm doing wrong. Can I override this custom build step ? Or can I
> >> simply disable it ?
> >>
> >> Thank you,
> >> Ben.
> >>
> >
> > Regardless of which CMakeLists.txt file you edit, cmake always re-runs
> from
> > the root directory of the project. Is that what you mean?
> > Or are you running some custom build steps using add_custom_command that
> are
> > behaving differently than you expect?
> >
> > HTH,
> > David
> >
> >
> > _______________________________________________
> > 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
> >
>
>
>
> --
> John M. Drescher
>
>
>
> --
> John M. Drescher
> _______________________________________________
> 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/20100322/47ea9013/attachment.htm>


More information about the CMake mailing list