如何使用 CMake 编译 C++17 和 C++20
我在我的项目中使用了 C++20 和 boost
。但某些 boost 头文件无法使用 C++20 进行编译,因为它们使用了 is_literal_type 或 C++20 中已删除的其他内容。
那么是否可以使用C++17来编译boost头文件,而使用C++20来编译其他项目文件呢?如果是的话,我应该如何在CMake中配置它?
I've used both C++20 and boost
in my project. But some boost header files can't be compiled with C++20 as they use is_literal_type
or something else that were removed in C++20.
So is it possible to use C++17 to compile the boost header files and use C++20 for other project files? If yes, how should I configure it in CMake?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论