Cmake set std version10/7/2023 Note 1: OSL expects CMAKE_CXX_STANDARD ( with a default to 14) and manually set the std version set (CSTD_FLAGS "-std=c++$ or some target properties. Both provide a way to compile in C++XX but still impose limitations to the library itself. That's two different aspects, one sets the C++ version of the library (cap the OpenColorIO target to C++11 feature set only), and one sets the compilation (11, 14, or 17). CMAKECXXSTANDARD:STRING: Sets the C++ standard to conform. I wouldn't set the CMAKE_CXX_STANDARD bits in the CMake files at all, just in CI. For full documentation, consult the CMake manual, or execute cmake -help-variable VARIABLENAME. So I think the target_compile_features(OpenColorIO PUBLIC cxx_std_11) is the correct a sufficient code mostly. Each exercise in this step will start with some background information. As these concepts are introduced, we will work through three exercises and create a simple CMake project. Today's situation is then to support C++ 11, 14, and 17 for all supported platforms / compilers and C++20 is not currently in the requirements. Syntax /std:c++14 /std:c++17 /std:c++20 /std:c++latest /std:c11 /std:c17 Remarks The /std options are available in Visual Studio 2017 and later. Step 1: A Basic Starting Point Where do I start with CMake This step will provide an introduction to some of CMake's basic syntax, commands, and variables. But there is currently no policies around the deprecation. The goal is to ease the integration in DCCs. On the other hand, the VFX Reference platform guides all the open source projects part of this ecosystem around various aspect of the builds. That could increase the challenge to contribute/maintain the library which imposes to be careful around what is officially supported. Officially supporting a C++ version means to enhance the CI build system to validate all the supported C++ version on all officially supported platform / compilers. The library does not officially support C++20 so, the cmake forbids it instead of having issues from contributors. The project will not compile with a C++20-capable compiler, it's looks like an unnecessary limitation, a minimum standard seems more future-proof than a hardcoded list of standards Thanks, once again I learned something on that topic.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |