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

[feature]change toolset for clang with visual studio generator #16240

Open
1 task done
peterpuppy opened this issue May 12, 2024 · 2 comments
Open
1 task done

[feature]change toolset for clang with visual studio generator #16240

peterpuppy opened this issue May 12, 2024 · 2 comments

Comments

@peterpuppy
Copy link

peterpuppy commented May 12, 2024

What is your suggestion?

I am using clang, and the generator is visual studio
I checked the source code and found that the toolset is written dead in ClangCL. I have a platform that customizes toolsets, such as PS5Cang
I have checked the source code and it seems that there is no way to modify it, or rather, this value will not be automatically set. I will set it in the custom toolchain file. The current logic will first include the user_toolchain file, and then set CMAKE_GENERATOR_TOOLSET, which will overwrite the toolset I set myself
Found a similar issue

https://github.com/conan-io/conan/issues/14100

here is generated conan toolchain


include("C:/SCE/Prospero/Tools/CMake/PS5.cmake")


########## generic_system block #############
# Definition of system, platform and toolset
#############################################


set(CMAKE_GENERATOR_PLATFORM "x64" CACHE STRING "" FORCE)

message(STATUS "Conan toolchain: CMAKE_GENERATOR_TOOLSET=ClangCL")
set(CMAKE_GENERATOR_TOOLSET "ClangCL" CACHE STRING "" FORCE)

Do you have any good solutions

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded
Copy link
Member

Hi @peterpuppy

Thanks for your feedback.

It is true that at the moment it is not possible to define a custom toolset from configuration. You can definitely do it from recipes, customizing the CMakeToolchain in the generate() method, but not from the profiles.

We will be having a look, we might want to have a more extensible mechanism, not only for the toolset.

@peterpuppy
Copy link
Author

Thanks for reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants