The C++ standard a CMakeLists.txt builds with (“c++11”), or None when it names none.

Reads literal values only; comments are ignored, nothing is evaluated. set(CMAKE_CXX_STANDARD 11) and CXX_STANDARD 17 in set_target_properties SET the standard – the lowest is taken: a project that raises it for an option keeps a lower default (spdlog: 20 under SPDLOG_USE_STD_FORMAT, else 11). target_compile_features(... cxx_std_11) is only a FLOOR (simdjson’s own CMakeLists.txt: “a floor, not a ceiling”): it raises the standard, and without a set one the build uses the compiler’s default (compiler_default, e.g. “c++17”; when None the floor itself is returned).

Methods

cmake_cxx_standard

cmake_cxx_standard(cmake_lists_path: str, compiler_default: Optional) -> Optional[str]

The C++ standard a CMakeLists.txt builds with (“c++11”), or None when it names none.

Reads literal values only; comments are ignored, nothing is evaluated. set(CMAKE_CXX_STANDARD 11) and CXX_STANDARD 17 in set_target_properties SET the standard – the lowest is taken: a project that raises it for an option keeps a lower default (spdlog: 20 under SPDLOG_USE_STD_FORMAT, else 11). target_compile_features(... cxx_std_11) is only a FLOOR (simdjson’s own CMakeLists.txt: “a floor, not a ceiling”): it raises the standard, and without a set one the build uses the compiler’s default (compiler_default, e.g. “c++17”; when None the floor itself is returned).

ParameterTypeDescription
cmake_lists_pathstr
compiler_defaultOptional

Generated with Flude

Copyright © 2026