cc-rs
cc-rs copied to clipboard
Explicit method to specify C/C++ standard
It would be nice to specify the standard explicitly as a method on Build, e.g. Build::new().standard("c++14"). This abstracts from difference between GCC/Clang -std= and MSVC /std:. Questions to answer:
- What to do if you pass
gnu14on MSVC: translate to the closestc++14or give an error? - Similarly, MSVC doesn't yet support
/std:c++20and requires/std:c++latestfor C++20 features. Shouldstandard("c++20")test if/std:c++20works and use/std:c++latestif it isn't?