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

boost's cmake config files are not compatible with clang-cl #62

Open
Febbe opened this issue Nov 8, 2022 · 4 comments
Open

boost's cmake config files are not compatible with clang-cl #62

Febbe opened this issue Nov 8, 2022 · 4 comments

Comments

@Febbe
Copy link

Febbe commented Nov 8, 2022

On Windows, clang-cl is compatible for compiling and linking against MSVC libraries.
In this case with MSVC compiled boost. Therefore, the cmake-config file should not report "NOTFOUND" if I actually want MSVC compiled boost libraries to be linked. Boost should also generally detect if clang is running in compatibility mode for msvc and simulate a build as with msvc as well.

@mclow mclow transferred this issue from boostorg/boost Nov 15, 2022
@pdimov pdimov transferred this issue from boostorg/cmake Nov 15, 2022
@pdimov
Copy link
Member

pdimov commented Nov 15, 2022

We require an exact toolset match in the general case, even though some toolsets are link-compatible. For example, libraries built with VS2019 can be used from VS2022, but we still require an exact match. The way to link to the libraries you want is by setting the Boost_COMPILER variable to e.g. "vc143", analogously to how FindBoost.cmake works.

@Febbe
Copy link
Author

Febbe commented Nov 16, 2022

FindBoost.cmake is managed by cmake right? Because, they provide the possibility to check against multiple tool chains, when they are provided via Boost_COMPILER. But as soon I specify multiple it tries to use the specified clang15 Toolchain, which does not exist on all build systems. But actually the 143 and 142 targets are available and compatible. So when I specify clang15, clang14, vc143, vc142 it should choose vc143 when it is available and the others are not.

@pdimov
Copy link
Member

pdimov commented Nov 16, 2022

You're right that we don't support multiple toolchains in Boost_COMPILER. We probably should.

@pdimov
Copy link
Member

pdimov commented Nov 16, 2022

Boost_COMPILER can be a list now, at least on the develop branch, via 534727e. I don't know yet if that will go into the 1.81 release, because it's already in beta.

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

No branches or pull requests

2 participants