-
Notifications
You must be signed in to change notification settings - Fork 818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cmake presets #10457
Cmake presets #10457
Conversation
[approve ci autest] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look great.
I suggest adding CMAKE_COMPILE_WARNING_AS_ERROR
to more configurations. Devs find it annoying if they use one of these locally and find in CI that they had some warnings they missed because they weren't treated as errors.
With the inheritance, every preset should have this set to |
Ah, great. Thanks. |
"binaryDir": "${sourceDir}/cmake-build-${presetName}", | ||
"generator": "Ninja", | ||
"cacheVariables": { | ||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
* asf/master: (30 commits) add conveinience function to lookup name->IntType* (apache#10474) cmake: bigobj subdir has executables, not plugins (apache#10481) cmake: compile jsonrpc_protocol with -fPIC (apache#10478) Make sure new metrics are always considered (apache#10445) Refactor and rename restart metrics (apache#10472) Fix the SNI and HOST parsing properly (apache#10480) slice/Data.h: CID 1508924: Uninitialized scalar field (apache#10470) CID 1508882: initialize pointer (apache#10469) CID-1512726: Mute coverity, use explicit check for iterator use past end (apache#10467) Fix Coverity issue in inliner plugin. (apache#10442) Set the proper variable when find_package fails to find the package (apache#10468) CID1508860: double lock confusion (apache#10443) Stop using functions that are unavailable on the latest quiche (apache#10447) Add allow-plain server ports attribute (apache#9574) [Fuzzing] move build.sh in trafficserver (apache#10466) Some sort of "fix" to mute coverity. (apache#10451) CID-1512733: Fix coverity issue (apache#10452) Fix cmake autooptions (apache#10456) Cmake presets (apache#10457) This fixes CID 1518257 (apache#10404) ...
CMakePresets.json will let you configure the project with a known set of options. This can be useful for reproducing builds and should give us more outside control over CI pipeline builds.
To configure with a preset just use the
--preset
option to cmake and provide the name. For example, to buildautests
:You can provide a
CMakeUserPresets.json
file to add additional presets. This file is not to be checked in, and is included in.gitignore
. Here is an example:This is like the
dev
preset, but changes the install prefix and the jemalloc root.This is just to get us started. As we get closer to using cmake, I'm sure we will expand this.