On Wed, Aug 12, 2020 at 7:50 PM Jeff King <peff@xxxxxxxx> wrote: > > On Wed, Aug 12, 2020 at 03:35:06PM +0200, Johannes Schindelin wrote: > > > > That was my philosophy, too, but it's annoying in the meantime as I get > > > a notification for "your build is broken" every time I run CI. So it > > > becomes a game of chicken over who gets annoyed first. ;) > > > > I am a bit sad to read all this, as I thought that we had reached > > consensus that the `Makefile` _is_ the source of truth. > > > > But then, most of the source files that need to be compiled _are_ parsed > > from the Makefile. > > > > So I wonder what problems you ran into; Maybe we can come up with a > > strategy how to preempt future instances of the same nature? > > There are definitely a lot of lists that are copied from the Makefile > into CMakeLists. For some concrete data, here are the patches I needed > for two of my topics. > > This first one is for a topic that remotes git-remote-testsvn and > associated code. The reason for verbosely specifying the test programs (test-tool, test-fake-ssh,etc) was that test-tool required all the objects specified by TEST_BUILTIN_OBJS, whereas test-fake-ssh requires only test-fake-ssh.o. > This second one is for a topic which moved some credential programs into > builtins (since they link libgit.a and nothing else, there's no reason > for them to take up extra space on disk). Even if we read more lists > from the Makefile, I think these hunks still would have needed to be > modified in CMakeLists because I changed the way they interact with > NO_UNIX_SOCKETS (instead of not building credential-cache in that case, > we get a builtin that says "sorry, this was built with > NO_UNIX_SOCKETS"). > For git programs like git-bugreport, git-imap-send which are specified with PROGRAM_OBJS, we don't know which of them require to be linked with libcurl or libexpat. That was the reason these programs were specified verbosely in the CMakeLists. In the future if a new program would be added we need to add them to the PROGRAMS_BUILT list in CMakeLists as well and link it with its library dependencies. Changing the interaction with NO_UNIX_SOCKETS variable will require a change in the CMakeLists file as well. The CMake script was not intended to be a write once and forget situation, it tries to pull from the Makefile as much as possible. A few changes are needed, which I intend to do. Thank You, Sibi Siddharthan