CMake replacing Autotools?
Christoph Grüninger
foss at grueninger.de
Thu Mar 18 23:00:41 UTC 2021
Hi Magnus,
for sure, I am going to do CMake cheerleading.
I think OpenJDK would profit from a change to CMake:
1. Less tools required for building: CMake + gmake/Ninja/msbuild/Xcode
instead of Autotools and all the related Linux/Unix tools, that are
somewhat alien to Windows and OS X. Visual Studio even provides its own
CMake.
2. More choices to actually build the project: Use integrated build
tools of IDEs (Visual Studio, Xcode) or use Ninja, which is faster than
gmake
3. Today, from what I hear, more people are familiar with CMake compared
to Autotools. This argument can be applied to how familiar user are
building OpenJDK and to how familiar potential contributors are. And I
know, you developers know your code base :-)
4. CMake is better supported by IDEs like Visual Studio, Qt Creator,
KDevelop.
5. A lot of code bases were ported to CMake like KDE, Qt, or LLVM. Their
arguments apply here, too. Also their trade-offs between investment and
benefit.
> At various times, I have dreamed of replacing the configure script with
> something that is more modern and easy to maintain than this bash/m4
> mix. We have a very well-defined API for the configure script: the user
> calls "bash configure" in the root directory of the project, with a set
> of --options, and as a result we create a spec.gmk file that defines the
> configuration. This could easily be replicated in another system. But if
> I were to rewrite this from scratch, I'd rather write the whole
> configure logic in Java (apart from some thin shell script logic needed
> to find the boot jdk), rather than trying to shoehorn in our build model
> in CMake.
I understand your temptation, but writing and maintaining all the
configure/find logic and quirks will be a burden. I'd try to reduce the
build system code to a minimum and rely on a third-party solution to do
as much as possible for me.
Bye
Christoph
--
Als wär es nix, leb' ich von [IT] und mach' nur, was ich lieb'
Lebe wie im Paradies, womit hab' ich das verdient?
Die Wahrheit ist: Hab' ich nicht, ich bin nur reicher beschenkt
Als jemand in einem armen Land mit dem gleichen Talent
[frei nach Tua von Die Orsons - Oioioiropa]
More information about the build-dev
mailing list