Replies: 3 comments 3 replies
-
Simple answer: No. Portfiles should not assume something is injected into |
Beta Was this translation helpful? Give feedback.
-
We accept setting the c/cxx standard as a feature, but enabling this feature must ensure that this setting is passed downstream(user's custom project) and does not cause changes to the c/cxx standard on ports that depend on it. |
Beta Was this translation helpful? Give feedback.
-
I'm about to update mongo-cxx-driver to v3.7.0. AFAIU the current feature design in this port is broken. But what could (be made) work with the update, given upstream's automatic choice: Create a custom triplet with: if(PORT STREQUAL "mongo-cxx-driver")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_STANDARD=17")
endif() (For this port, other |
Beta Was this translation helpful? Give feedback.
-
I want to build libraries with C++17 API.
Some library,
mongo-cxx-driver
for example, can build with C++11 with polyfills or build with C++17 directly without depending on others. We can use definition flag in portfile to choose it.In order to choose, one way is using vcpkg feature (
vcpkg install mongo-cxx-driver[boost]
), this is current implementation on master branch. But for unknown reason feature for C++17 was not included, so I made a PR ( #22781 ) to add one more feature.The problem is the current policy no longer allow using features to choose polyfills ( https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#do-not-use-features-to-control-alternatives-in-published-interfaces ), so my PR was not accepted.
So here is the other way I thought,
For anyone who want to specify C++ language standard, he can create a custom triplet with
Then in library portfile
I am not sure if it is better way? Will it accept into master branch? (So I don't need to write overlay every time)
Beta Was this translation helpful? Give feedback.
All reactions