-
Notifications
You must be signed in to change notification settings - Fork 967
Update cmake-presets-vs.md #3447
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
Conversation
Add instructions for configuring clang-cl with the ClangCL toolset configure preset instead of by setting CMAKE_C_COMPILER and CMAKE_CXX_COMPILER in cacheVariables.
@sweemer : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
#label:"aq-pr-triaged" |
@bobbrow Do you have a delegate who can review this change and the related issue #3446? I've let this go too long without a ping. |
I commented on the original issue too, but I don't believe ClangCL is a valid toolset for the Visual Studio generators. @sweemer did using ClangCL as the toolset work for you? If so can you share your VS and CMake versions? |
"CMAKE_BUILD_TYPE": "Debug", | ||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}", | ||
}, | ||
"toolset": "ClangCL", |
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.
This assumes the current generator
supports specifying toolsets (see docs for more info). For the Ninja
generator this preset is invalid.
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.
You're right. I have pushed up a new commit to clarify that not all generators support this preset.
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.
Thanks for updating that. However I don't think ClangCl will be valid until the Visual Studio 16 2019
generator, since LLVM was added in version 16.1. Also I'd be more explicit that this is only for Visual Studio generators. perhaps
if you are using either
Visual Studio 16 2019
orVisual Studio 17 2022
as your generator, you can use thetoolset
property in the configure preset to specify theClangCL
toolset:
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.
Done
@sweemer : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Just copying this over here from the issue: |
@sweemer : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
@corob-msft : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
@sweemer Thanks for the contribution, and for your patience and collaboration. Thanks to @sfreed141 too, for verifying and suggestions. |
Add instructions for configuring clang-cl with the ClangCL toolset configure preset instead of by setting CMAKE_C_COMPILER and CMAKE_CXX_COMPILER in cacheVariables.
Fixes #3446.