Skip to content
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

feat: Add CMake presets #3135

Merged
merged 19 commits into from
Aug 1, 2024
Merged

Conversation

andiwand
Copy link
Contributor

@andiwand andiwand commented Apr 22, 2024

Adds CMake presets (https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) to collect common configuration and build settings.

The current list of presets:

  • common as a base for all the other presets. This enables everything necessary for running the ODD full chain examples with Fatras. It sets the cpp standard to 20, the generator to ninja and enables ccache.
  • dev uses RelWithDebInfo and enables CMAKE_EXPORT_COMPILE_COMMANDS and ACTS_FORCE_ASSERTIONS
  • perf uses Release sets a few compiler flags to keep frame pointers and enables ACTS_BUILD_BENCHMARKS
  • ci-common is the base for all CI presets. It enables the usual flags for what to build in the CI, uses Release, -Werror and enables ACTS_FORCE_ASSERTIONS and ACTS_ENABLE_LOG_FAILURE_THRESHOLD
  • github-ci will not change anything for now
  • gitlab-ci will switch to RelWithDebInfo to allow FPE monitoring

While doing so I also

  • removed the ACTS_BUILD_EVERYTHING CMake variable because the preset can be used to collect the "default" flags
  • removed the ACTS_BUILD_EXAMPLES CMake option for a similar reason. I kept the cmake variable because it is used to toggle things internally in our CMake

@andiwand andiwand added the 🚧 WIP Work-in-progress label Apr 22, 2024
@andiwand andiwand added this to the next milestone Apr 22, 2024
@paulgessinger
Copy link
Member

I also started looking into this. I think for the main file that we ship, we should probably stick roughly to our CI configurations. IIUC cmake uses an additional file CMakeUserPresets.json that gets merged with the CMakePresets.json file.

@github-actions github-actions bot removed the Stale label Jun 21, 2024
@github-actions github-actions bot added the Stale label Jul 21, 2024
@andiwand andiwand force-pushed the feat-cmake-presets branch from b99864b to 444b328 Compare July 28, 2024 08:48
@github-actions github-actions bot added Infrastructure Changes to build tools, continous integration, ... Component - Documentation Affects the documentation labels Jul 28, 2024
@github-actions github-actions bot removed the Stale label Jul 28, 2024
@andiwand andiwand requested a review from paulgessinger July 29, 2024 12:12
paulgessinger
paulgessinger previously approved these changes Jul 30, 2024
CMakePresets.json Outdated Show resolved Hide resolved
.github/workflows/builds.yml Show resolved Hide resolved
CMakePresets.json Outdated Show resolved Hide resolved
@andiwand andiwand marked this pull request as ready for review July 31, 2024 12:30
@andiwand andiwand requested a review from paulgessinger August 1, 2024 09:14
@andiwand
Copy link
Contributor Author

andiwand commented Aug 1, 2024

@paulgessinger this is converging now - do you want to have another look?

@github-actions github-actions bot added Component - Core Affects the Core module Component - Examples Affects the Examples module labels Aug 1, 2024
Copy link
Member

@paulgessinger paulgessinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine overall.

@andiwand andiwand added automerge and removed 🚧 WIP Work-in-progress labels Aug 1, 2024
@kodiakhq kodiakhq bot merged commit 597f09a into acts-project:main Aug 1, 2024
45 checks passed
@github-actions github-actions bot removed the automerge label Aug 1, 2024
Copy link

sonarqubecloud bot commented Aug 1, 2024

@andiwand andiwand deleted the feat-cmake-presets branch August 1, 2024 20:40
@acts-project-service acts-project-service added the Fails Athena tests This PR causes a failure in the Athena tests label Aug 1, 2024
paulgessinger pushed a commit that referenced this pull request Aug 7, 2024
#3135 broke `build_performance`
which was not observed in the PR because this job only runs on the main
branch
@paulgessinger paulgessinger modified the milestones: next, v36.1.0 Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Core Affects the Core module Component - Documentation Affects the documentation Component - Examples Affects the Examples module Fails Athena tests This PR causes a failure in the Athena tests Infrastructure Changes to build tools, continous integration, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants