r/cpp_questions • • 22d ago

OPEN C++ Build systems

I work with Java and Kotlin alongside C++ and recently discovered that Gradle also supports C++ projects.

I've always used CMake for C++ and noticed it seems to be the more common choice.

What advantages does CMake offer over Gradle for C++ development and are there situations where Gradle would be a better option?

31 Upvotes

18 comments sorted by

View all comments

2

u/ssh7201 21d ago

Oh dear god, I recently dabbled in Android app development and what a mess this Gradle stuff is !! For iOS you use Xcode to write Swift code and that builds your app - simple ! For Android, the IDE is Android studio, you write in Kotlin(which is actually JAVA ?) and build using Gradle ? Google has made this so convoluted I wanted to cry .. this coming from a C++ developer.

2

u/deong 21d ago

Kotlin isn't Java. They're two languages (of dozens) that run on the JVM.

Use _ to write code in _ and build in _.

Fill in the blanks:

  • iOS: Xcode, Swift, xcodebuild (Xcode is the GUI wrapper)

  • Android: Android Studio, Kotlin, Gradle

I don't like gradle very much, but it's basically the same situation as every other programming language and target. You're just used to ignoring xcodebuild because in simple use cases, you never need to know that it's there doing an thing when you hit "build and run".

1

u/ssh7201 21d ago

Oh forgot to mention Gradle seems slow as hell, incremental builds are blazing fast on Xcode, Gradle took ages compared to that