-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
How to build package for mulitple versions of Visual Studio / multiple toolsets? #1207
Comments
The merge request #1098 adds support for pretty much exactly what you want as a side effect to supporting Fortran. You can specify the toolset version via |
Wow, that's great! Could you clarify with an example of compiling a package |
I would suggest to create a triplet (e.g.
and a second one (e.g.
Then you can use
to build boost with both, VS2015 and VS2017. Some additional remarks regarding the pull request: Since the PR is work in progress and tries to solve a more complicated problem (Fortran support) I am not sure when it will be ready to be merged. Maybe it makes sense to extract the changes that allow setting a toolset version explicitly into an other PR which can be merged without that much effect on other parts. @ras0219-msft what do you think? |
I totally agree with splitting the fortran PR into two separate PRs! It has been a bit since I looked at the code changes, but I recall the toolset option support being pretty much good to go. The triplet suggestion is also exactly as I would recommend handling the toolset difference (though the exact syntax would be |
We'll get an explosion of triplets sooner or later ;). Each feature that's added to them doubles the number of potential "triplets". And toolset is binary only atm. |
Yep, there's an explosion of possible triplets. This is just the wonderful/terrible nature of the beast that is C++! However, that doesn't mean we must add all of them by default! It's important to be capable of handling these scenarios, but it's also important to clearly indicate where the path ends and the forest begins! For this specific case, we'll continue with what we do today: pick the latest of VS2015 or VS2017. In some future where there's another abi break, we'll need to add a new set of triplets for that. |
простите, а вынести в командную строку можно данный параметр?
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets>dir LLVM-vs2014 |
@voskrese I'm not totally sure what you mean by that, but many of those toolsets are slightly different MSBuild wrappers around a small set of true compiler versions (which may have different default compiler macros/flags). We've recently added support for specifying compiler flags in the triplet file via 0c70ca2, which may help here. As for using clang, we don't currently support it though we'd be open to PR's that make it work! The trouble would be figuring out how to pipe it through into all the various library buildsystems. Most might react to a CXX environment variable. |
ras0219-msft, спасибо за ответ, я уже понял) только для версии 14 и 15 полностью совместимы
|
I have tried the triplets to install x86 toolset 141 boost libs and I'm not having much success. |
Is it possible to build e.g. boost for multiple toolsets (140 and 141) with vcpkg?
(If 140 and 141 is a bad example because they are compatible, think of 141 and 150)
Perhaps the triplet could be expanded to include toolset as well (with empty toolset => latest being the default)?
The text was updated successfully, but these errors were encountered: