[Cmake] CMakeLists.txt in ALL_BUILD
Brad King
brad . king at kitware . com
Tue, 16 Sep 2003 09:11:36 -0400 (EDT)
On Fri, 12 Sep 2003, Nitin Gupta wrote:
> Hi,
> I am wondering whether we may have toplevel CMakeLists.txt
> as a part of sources in ALL_BUILD. Consider a case where
> the top level CMakeLists.txt of a big project contains only
> PROJECT and SUBDIR(dir1 dir2 ...) command. The dirs fruther
> contain submodules. CMakeSetp.exe is run only once and it
> configures all the modules and submodules. Now there is
> only only one .dsw generated, the one at the toplevel. Since
> the toplevel CMakeLists.txt contain no targets it is not
> dislayed in the source view anywhere.Hence to do modifications
> at toplevel (say for addition of a new module) one has to edit
> is seperatetly from outside of VC++.
>
> I suggest addition of CMakeLists.txt in ALL_BUILD too. Atleast
> when there is no target in a CMakeLists.txt. I tried it by
> commenting *return* from void cmLocalVisualStudio6Generator::
> AddDSPBuildRule when *dspname* is "ALL_BUILD". The top-lev
> CMakeLists.txt shows up with ALL_BUILD.
>
> Hope this does not break anything else! Thoughts?
This is probably a good idea. Please add it to the bug tracker as a
feature request:
http://www . cmake . org/Bug
There is one minor problem, though. Visual Studio 6 does not
detect/reload a .dsw file when it changes as it does for .dsp files. If
re-running cmake on the whole project through this link causes a library
to be added or a dependency between .dsp files to change, that information
will not be reloaded until you manually close the project and re-open it.
-Brad