Hi, Oscar> at all, it would be great if you reflect your changes on the file list > inside the corresponding CMakeLists.txt when you add, remove or renamea> .cpp file.Isn't is possible for cmake just to glob everything in the corresponding directory? -- WBR, Anton Korobeynikov
"Anton Korobeynikov" <asl at math.spbu.ru> writes:>> at all, it would be great if you reflect your changes on the file list >> inside the corresponding CMakeLists.txt when you add, remove or rename >> a .cpp file. > > Isn't is possible for cmake just to glob everything in the corresponding > directory?Yes, but then the build would not notice a change on the file structure. You'll need to explicitly invoke cmake for being sure that whatever changes were made by the last svn update are reflected on the generated makefiles, which is a bigger incovenience than the occassional modification of the CMakeLists.txt file. I know this is a regression from the current build system, but the amount of work it requires is dwarfed by the savings in global maintenance. -- Oscar
Anton Korobeynikov a écrit :> Hi, Oscar > >> at all, it would be great if you reflect your changes on the file list >> inside the corresponding CMakeLists.txt when you add, remove or rename > a >> .cpp file. > Isn't is possible for cmake just to glob everything in the corresponding > directory? >Hi, It is possible, but it has some drawback. Mainly, it won't check for new file itself and you would have to manually rerun CMake each times you add/remove a file. The current makefile (gnu makefile) list all the files also, isn't it? they don't glob everythings. just my 2cents. Cédric
Cédric Venet <cedric.venet at laposte.net> writes:> It is possible, but it has some drawback. Mainly, it won't check for new > file itself and you would have to manually rerun CMake each times you > add/remove a file.Not only the developer who added/renamed/removed a file, but all the people using the svn sources.> The current makefile (gnu makefile) list all the files also, isn't it? > they don't glob everythings.No. They use some clever mechanism for globbing the sources and adapt to changes automatically. -- Oscar
Óscar Fuentes wrote:> "Anton Korobeynikov" <asl at math.spbu.ru> writes: > > >>> at all, it would be great if you reflect your changes on the file list >>> inside the corresponding CMakeLists.txt when you add, remove or rename >>> a .cpp file. >>> >> Isn't is possible for cmake just to glob everything in the corresponding >> directory? >> > > Yes, but then the build would not notice a change on the file > structure. You'll need to explicitly invoke cmake for being sure that > whatever changes were made by the last svn update are reflected on the > generated makefiles, which is a bigger incovenience than the occassional > modification of the CMakeLists.txt file. >It would be simpler for autoconf builds to have a Perl script that updates the CMakeLists.txt files when necessary. (This doesn't look *that* hard, but I can't say when I'll surface long enough to work on that.) Kenneth