-
Notifications
You must be signed in to change notification settings - Fork 267
Add CMakePresets.json #3284
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
Add CMakePresets.json #3284
Conversation
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.
Pull request overview
This PR modernizes the CMake configuration by migrating from shell script-based settings to CMakePresets.json, a standard CMake feature for managing build configurations. The changes maintain backward compatibility with the existing shell script while providing a cleaner, more maintainable approach.
Key Changes:
- Introduced CMakePresets.json with predefined configurations for different AMD GPU targets (gfx908, gfx90a, gfx942, gfx950)
- Updated the minimum CMake version requirement from 3.14 to 3.21 to support CMake presets
- Modified Jenkinsfile to use the new preset-based configuration approach
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| CMakePresets.json | New file defining build presets for development builds across different GPU targets with shared base configuration |
| script/cmake-ck-dev.sh | Simplified to invoke cmake with the dev preset instead of manually specifying all configuration flags |
| Jenkinsfile | Updated two test pipeline stages to use preset-based cmake commands instead of the shell script |
| CMakeLists.txt | Bumped minimum CMake version from 3.14 to 3.21 to support CMakePresets.json |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
016be77 to
cd6efd4
Compare
Proposed changes
Move settings in script/cmake-ck-dev.sh to CMakePresets.json, which is a modern and more common way to do this thing. script/cmake-ck-dev.sh is kept currently for compatibility.
Some examples of using presets
cmake .. --preset dev-gfx950(use the preset for gfx950)cmake .. --preset dev -DGPU_TARGETS=gfx950(command line options can overwrite settings in the preset)cmake .. -GNinja --preset dev-gfx950 -DCK_CXX_STANDARD=17(compile with c++17)cmake .. --preset dev-gfx950 -GNinja -DBUILD_DEV=OFF(disable-Werror)Checklist
Please put an
xinto the boxes that apply. You can also fill these out after creating the PR. If you're not sure, please don't hesitate to ask.clang-formaton all changed files