[llvm-dev] wasteful cmake defaults

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Fri Nov 20 12:41:08 PST 2020


Am Fr., 20. Nov. 2020 um 14:05 Uhr schrieb Tom Stellard <tstellar at redhat.com>:
> I don't think having this documented is all that helpful.  I know that
> when I build a new project, if I see it has cmake, I just do cmake -G
> Ninja && ninja and don't bother reading the docs.

Because cmake's empty default for CMAKE_BUILD_TYPE (i.e. not
passinging any optimization flags i.e. use compiler defaults i.e.
unoptimized builds but also without the possibility to debug) is not
helpful for any use case, I habitually also pass
-DCMAKE_BUILD_TYPE=Release (or -DCMAKE_BUILD_TYPE=Debug when e.g. I
want a backtrace) to repositories using cmake. In the same sense I
habitually pass -j<n> to make because I rarely want to use only one
core of my multi-core CPU.

Michael


More information about the llvm-dev mailing list