Files
duckstation/CMakeModules/DuckStationCompilerRequirement.cmake
T

23 lines
974 B
CMake

# SPDX-FileCopyrightText: 2019-2026 Connor McLaughlin <[email protected]>
# SPDX-License-Identifier: CC-BY-NC-ND-4.0 + Packaging Restriction
#
# NOTE: In addition to the terms of CC-BY-NC-ND-4.0, you may not use this file to create
# packages or build recipes without explicit permission from the copyright holder.
# Use C++23.
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# C++ feature checks. Some Linux environments are incomplete.
check_cpp_feature("__cpp_structured_bindings" 201606)
check_cpp_feature("__cpp_constinit" 201907)
check_cpp_feature("__cpp_designated_initializers" 201707)
check_cpp_feature("__cpp_using_enum" 201907)
check_cpp_feature("__cpp_lib_bit_cast" 201806)
check_cpp_feature("__cpp_lib_bitops" 201907)
check_cpp_feature("__cpp_lib_int_pow2" 202002)
check_cpp_feature("__cpp_lib_starts_ends_with" 201711)
check_cpp_attribute("likely" 201803)
check_cpp_attribute("unlikely" 201803)
check_cpp_attribute("no_unique_address" 201803)