cmake target_compile_features examples

Signatures

target_compile_features(<target> <PRIVATE|PUBLIC|INTERFACE> <feature> [...])

Examples

AcademySoftwareFoundation/Imath src/Imath/CMakeLists.txt :83

target_compile_features(${IMATH_LIBRARY}
    PRIVATE cxx_std_${IMATH_CXX_STANDARD}
    INTERFACE cxx_std_11
)

prusa3d/Prusa-Firmware lib/Catch2/src/CMakeLists.txt :421

target_compile_features(Catch2_buildall_interface
      INTERFACE
        cxx_alignas
        cxx_alignof
        cxx_attributes
        cxx_auto_type
        cxx_constexpr
        cxx_defaulted_functions
        cxx_deleted_functions
        cxx_final
        cxx_lambdas
        cxx_noexcept
        cxx_override
        cxx_range_for
        cxx_rvalue_references
        cxx_static_assert
        cxx_strong_enums
        cxx_trailing_return_types
        cxx_unicode_literals
        cxx_user_literals
        cxx_variable_templates
        cxx_variadic_macros
    )

bambulab/BambuStudio src/earcut/CMakeLists.txt :29

target_compile_features(earcut_hpp INTERFACE cxx_std_11)

SoftFever/OrcaSlicer deps_src/fast_float/CMakeLists.txt :15

target_compile_features(fast_float INTERFACE cxx_std_14)

Hork-Engine/Hork-Source ThirdParty/fmt/CMakeLists.txt :50

target_compile_features(fmt-header-only INTERFACE ${FMT_REQUIRED_FEATURES})

RavEngine/RavEngine deps/cmrc/CMakeRC.cmake :392

target_compile_features(cmrc-base INTERFACE cxx_nullptr)

zenustech/zeno projects/CUDA/CMakeLists.txt :185

target_compile_features(zshelper INTERFACE cuda_std_17)

pioneerspacesim/pioneer contrib/fmt/CMakeLists.txt :343

target_compile_features(fmt-header-only INTERFACE cxx_std_11)

PDAL/PDAL cmake/macros.cmake :62

target_compile_features (${_name}
      INTERFACE
        # Enable C++17 standard compliance
        cxx_std_17
    )

alpaka-group/alpaka cmake/alpakaCommon.cmake :151

target_compile_features(alpaka INTERFACE cxx_std_${alpaka_CXX_STANDARD})

eclipse-ecal/ecal contrib/measurement/base/CMakeLists.txt :38

target_compile_features(measurement_base INTERFACE cxx_std_14)

ZDoom/gzdoom libraries/cppdap/third_party/json/CMakeLists.txt :52

target_compile_features(${NLOHMANN_JSON_TARGET_NAME} INTERFACE cxx_range_for)

YWL0720/YOLO_ORB_SLAM3_with_pointcloud_map Thirdparty/Sophus/CMakeLists.txt :87

target_compile_features (sophus INTERFACE
  cxx_auto_type
  cxx_decltype
  cxx_nullptr
  cxx_right_angle_brackets
  cxx_variadic_macros
  cxx_variadic_templates
)

AcademySoftwareFoundation/OpenShadingLanguage src/liboslcomp/CMakeLists.txt :46

target_compile_features (${local_lib}
                         INTERFACE cxx_std_${DOWNSTREAM_CXX_STANDARD})

etternagame/etterna extern/fmt/CMakeLists.txt :214

target_compile_features(fmt INTERFACE ${FMT_REQUIRED_FEATURES})

liminchen/OptCuts ext/libigl/shared/cmake/libigl.cmake :65

target_compile_features(igl_common INTERFACE ${CXX11_FEATURES})

kahypar/mt-kahypar CMakeLists.txt :52

target_compile_features(MtKaHyPar-BuildFlags INTERFACE cxx_std_17)

SCOREC/core apf_cap/CMakeLists.txt :44

target_compile_features(framework_meshing INTERFACE cxx_std_14)

WerWolv/Fenestra lib/third_party/nlohmann_json/CMakeLists.txt :106

target_compile_features(${NLOHMANN_JSON_TARGET_NAME} INTERFACE cxx_range_for)

facebook/folly CMakeLists.txt :483

target_compile_features(folly INTERFACE cxx_generic_lambdas)

gnss-sdr/gnss-sdr src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/FindFILESYSTEM.cmake :236

target_compile_features(std::filesystem INTERFACE cxx_std_17)

ossia/score cmake/ScoreExternalAddon.developer.cmake :198

target_compile_features(score_lib_base INTERFACE "${CXX_VERSION_FLAG}")

OpenKneeboard/OpenKneeboard third-party/cef.cmake :81

target_compile_features(
    Cef::LibCef
    INTERFACE
    cxx_std_17
)

NVIDIA/MatX CMakeLists.txt :126

target_compile_features(matx INTERFACE cxx_std_17 $<BUILD_INTERFACE:cuda_std_17>)

AcademySoftwareFoundation/MaterialX source/PyMaterialX/External/PyBind11/CMakeLists.txt :240

target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
                                                     cxx_right_angle_brackets)

w111liang222/lidar-slam-detection slam/thirdparty/fast_gicp/thirdparty/Sophus/CMakeLists.txt :87

target_compile_features (sophus INTERFACE
  cxx_auto_type
  cxx_decltype
  cxx_nullptr
  cxx_right_angle_brackets
  cxx_variadic_macros
  cxx_variadic_templates
)

DIPlib/diplib dependencies/pybind11/CMakeLists.txt :236

target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
                                                     cxx_right_angle_brackets)

NERSC/timemory cmake/Modules/Packages.cmake :395

target_compile_features(
    timemory-headers
    INTERFACE cxx_std_${CMAKE_CXX_STANDARD}
              cxx_auto_type
              cxx_alias_templates
              cxx_constexpr
              cxx_decltype
              cxx_decltype_auto
              cxx_defaulted_functions
              cxx_delegating_constructors
              cxx_deleted_functions
              cxx_extern_templates
              cxx_generic_lambdas
              cxx_noexcept
              cxx_range_for
              cxx_return_type_deduction
              cxx_rvalue_references
              cxx_thread_local
              cxx_trailing_return_types
              cxx_variadic_macros
              cxx_variadic_templates
              cxx_template_template_parameters)

emsec/hal deps/pybind11/CMakeLists.txt :189

target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
                                                     cxx_right_angle_brackets)

trailofbits/pasta CMakeLists.txt :51

target_compile_features(pasta_cxx_settings INTERFACE cxx_std_20)

apache/trafficserver lib/Catch2/src/CMakeLists.txt :453

target_compile_features(Catch2_buildall_interface INTERFACE cxx_std_14)

STEllAR-GROUP/hpx cmake/HPX_CompilerFlagsTargets.cmake :14

target_compile_features(hpx_public_flags INTERFACE cxx_std_${HPX_CXX_STANDARD})

YosysHQ/nextpnr 3rdparty/pybind11/CMakeLists.txt :237

target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
                                                     cxx_right_angle_brackets)

root-project/root hist/histv7/standalone.cmake :13

target_compile_features(ROOTHist INTERFACE cxx_std_17)

brainflow-dev/brainflow third_party/fmt/CMakeLists.txt :268

target_compile_features(fmt INTERFACE ${FMT_REQUIRED_FEATURES})

CLIUtils/CLI11 book/code/CMakeLists.txt :8

target_compile_features(CLI11::CLI11 INTERFACE cxx_std_11)

alibaba/async_simple CMakeLists.txt :14

target_compile_features(async_simple_header_only INTERFACE cxx_std_20)

google/filament third_party/abseil/CMake/AbseilHelpers.cmake :344

target_compile_features(${_NAME} INTERFACE ${ABSL_INTERNAL_CXX_STD_FEATURE})

percona/percona-xtrabackup extra/abseil/abseil-cpp-20230802.1/CMake/AbseilHelpers.cmake :350

target_compile_features(${_NAME} INTERFACE ${ABSL_INTERNAL_CXX_STD_FEATURE})

NREL/EnergyPlus CMakeLists.txt :33

target_compile_features(project_options INTERFACE cxx_std_17)

mysql/mysql-server extra/abseil/abseil-cpp-20230802.1/CMake/AbseilHelpers.cmake :350

target_compile_features(${_NAME} INTERFACE ${ABSL_INTERNAL_CXX_STD_FEATURE})

robotology/yarp src/libYARP_conf/src/CMakeLists.txt :124

target_compile_features(YARP_conf INTERFACE cxx_std_17)

p-ranav/alpaca CMakeLists.txt :20

target_compile_features(alpaca INTERFACE cxx_std_17)

ebu/ear-production-suite cmake_modules/FindJUCE.cmake :33

target_compile_features(Juce::core INTERFACE cxx_std_14)

AcademySoftwareFoundation/OpenImageIO src/libOpenImageIO/CMakeLists.txt :148

target_compile_features (OpenImageIO
                         INTERFACE cxx_std_${DOWNSTREAM_CXX_STANDARD})

stephenberry/glaze tests/CMakeLists.txt :22

target_compile_features(glz_test_common INTERFACE cxx_std_23)

epoupon/fileshelter cmake/modules/FindFilesystem.cmake :214

target_compile_features(std::filesystem INTERFACE cxx_std_17)

mkiol/dsnote CMakeLists.txt :457

target_compile_features(compiler_flags INTERFACE cxx_std_17)

AshamaneProject/AshamaneCore cmake/macros/ConfigureBaseTargets.cmake :20

target_compile_features(trinity-feature-interface
  INTERFACE
    cxx_alias_templates
    cxx_auto_type
    cxx_constexpr
    cxx_decltype
    cxx_decltype_auto
    cxx_final
    cxx_lambdas
    cxx_generic_lambdas
    cxx_variadic_templates
    cxx_defaulted_functions
    cxx_nullptr
    cxx_trailing_return_types
    cxx_return_type_deduction)

boostorg/asio CMakeLists.txt :73

target_compile_features(boost_asio INTERFACE cxx_std_11)

casadi/casadi CMakeLists.txt :1827

target_compile_features(alpaqa INTERFACE cxx_std_20)

asset-group/5ghoul-5g-nr-attacks libs/pybind11/CMakeLists.txt :198

target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
                                                     cxx_right_angle_brackets)

KiCad/kicad-source-mirror thirdparty/argparse/CMakeLists.txt :26

target_compile_features(argparse INTERFACE cxx_std_17)

sonosaurus/sonobus deps/juce/extras/Build/CMake/JUCEModuleSupport.cmake :324

target_compile_features("${target_name}" INTERFACE cxx_std_17)

fooyin/fooyin cmake/FooyinMacrosInternal.cmake :108

target_compile_features(${private_name} INTERFACE ${FOOYIN_REQUIRED_CXX_FEATURES})

qt/qtbase cmake/QtFlagHandlingHelpers.cmake :379

target_compile_features("${target}" INTERFACE ${cpp_feature})

flux-framework/flux-sched external/catch2/src/CMakeLists.txt :457

target_compile_features(Catch2_buildall_interface
      INTERFACE
        cxx_std_14
    )

KavrakiLab/vamp CMakeLists.txt :59

target_compile_features(vamp_cpp INTERFACE cxx_std_17)

fabianschenk/RESLAM thirdparty/Sophus/CMakeLists.txt :85

target_compile_features (sophus INTERFACE
  cxx_auto_type
  cxx_decltype
  cxx_nullptr
  cxx_right_angle_brackets
  cxx_variadic_macros
  cxx_variadic_templates
)

jingma-git/RealSkel external/libigl/cmake/libigl.cmake :82

target_compile_features(igl_common INTERFACE ${CXX11_FEATURES})

dufernst/LegionCore-7.3.5 cmake/macros/ConfigureBaseTargets.cmake :20

target_compile_features(trinity-feature-interface
  INTERFACE
    cxx_alias_templates
    cxx_auto_type
    cxx_constexpr
    cxx_decltype
    cxx_decltype_auto
    cxx_final
    cxx_lambdas
    cxx_generic_lambdas
    cxx_variadic_templates
    cxx_defaulted_functions
    cxx_nullptr
    cxx_trailing_return_types
    cxx_return_type_deduction)

BehaviorTree/BehaviorTree.CPP 3rdparty/lexy/src/CMakeLists.txt :137

target_compile_features(_lexy_base INTERFACE cxx_std_17)

abeimler/ecs_benchmark src/gaia-ecs/CMakeLists.txt :21

target_compile_features(gaia INTERFACE cxx_std_17)

NauEngine/NauEnginePublic engine/3rdparty_libs/tiny-utf8/CMakeLists.txt :48

target_compile_features(
    ${PROJECT_NAME} 
    INTERFACE 
        cxx_std_11
)

Dreamtowards/Ethertia lib/entt-3.12.2/CMakeLists.txt :113

target_compile_features(EnTT INTERFACE cxx_std_17)

fraillt/bitsery CMakeLists.txt :20

target_compile_features(bitsery INTERFACE
        cxx_auto_type
        cxx_constexpr
        cxx_lambdas
        cxx_nullptr
        cxx_variadic_templates)

Viatorus/emio CMakeLists.txt :32

target_compile_features(emio_emio INTERFACE cxx_std_20)

SpriteOvO/sigmatch CMakeLists.txt :55

target_compile_features(sigmatch INTERFACE cxx_std_20)

InsightSoftwareConsortium/ITK Modules/ThirdParty/KWSys/src/KWSys/CMakeLists.txt :742

target_compile_features(${KWSYS_TARGET_INTERFACE} INTERFACE ${KWSYS_CXX_COMPILE_FEATURES})

ComputationalBiomechanicsLab/opensim-creator third_party/tomlplusplus/CMakeLists.txt :31

target_compile_features(tomlplusplus_tomlplusplus INTERFACE cxx_std_17)

foonathan/lex CMakeLists.txt :45

target_compile_features(foonathan_lex INTERFACE cxx_std_14)

logicalclocks/rondb extra/abseil/abseil-cpp-20230802.1/CMake/AbseilHelpers.cmake :350

target_compile_features(${_NAME} INTERFACE ${ABSL_INTERNAL_CXX_STD_FEATURE})

Warzone2100/warzone2100 3rdparty/json/CMakeLists.txt :47

target_compile_features(${NLOHMANN_JSON_TARGET_NAME} INTERFACE cxx_range_for)

kongaskristjan/fire-hpp CMakeLists.txt :30

target_compile_features(fire-hpp INTERFACE cxx_std_11)

jupp0r/prometheus-cpp util/CMakeLists.txt :5

target_compile_features(util
  INTERFACE
    cxx_std_11
)

Jackarain/proxy third_party/boost/libs/asio/CMakeLists.txt :27

target_compile_features(boost_asio_core INTERFACE cxx_std_11)

ornladios/ADIOS2 bindings/CXX11/CMakeLists.txt :28

target_compile_features(adios2_cxx11 INTERFACE ${ADIOS2_CXX11_FEATURES})

brunoherbelin/vimix cmake/modules/CMakeRC.cmake :411

target_compile_features(cmrc-base INTERFACE cxx_nullptr)

DNedic/lockfree lockfree/CMakeLists.txt :8

target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_11)

fktn-k/fkYAML CMakeLists.txt :65

target_compile_features(
  ${FK_YAML_TARGET_NAME}
  INTERFACE
    cxx_std_11
)

quantumgizmos/ldpc CMakeLists.txt :32

target_compile_features(ldpc INTERFACE cxx_std_20)

PragmaTwice/protopuf CMakeLists.txt :27

target_compile_features(protopuf INTERFACE cxx_std_20)

hanickadot/compile-time-regular-expressions CMakeLists.txt :121

target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_${CTRE_CXX_STANDARD})

halide/Halide tools/CMakeLists.txt :47

target_compile_features(Halide_RunGenMain INTERFACE cxx_std_17)

kpeeters/cadabra2 libs/pybind11/CMakeLists.txt :200

target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
                                                     cxx_right_angle_brackets)

isce-framework/isce3 cxx/isce3/CMakeLists.txt :31

target_compile_features(${LISCE} INTERFACE
    cxx_std_17
    )

QMCPACK/qmcpack external_codes/boost_multi/multi/CMakeLists.txt :30

target_compile_features(boost_multi INTERFACE cxx_std_14)

luxonis/depthai-core CMakeLists.txt :528

target_compile_features(${TARGET_CORE_NAME} INTERFACE cxx_generic_lambdas)

apache/datasketches-cpp CMakeLists.txt :107

target_compile_features(datasketches INTERFACE cxx_std_11)

LMMS/lmms src/3rdparty/hiir/CMakeLists.txt :3

target_compile_features(hiir INTERFACE cxx_std_20)

dfranx/SHADERed libs/json/CMakeLists.txt :52

target_compile_features(${NLOHMANN_JSON_TARGET_NAME} INTERFACE cxx_range_for)

cvet/fonline ThirdParty/unordered_dense/CMakeLists.txt :25

target_compile_features(unordered_dense INTERFACE cxx_std_17)

awa-ai/awadb awadb/db_engine/third_party/libcuckoo/CMakeLists.txt :19

target_compile_features (libcuckoo INTERFACE cxx_constexpr)

lighttransport/tinyusdz src/external/pybind11/CMakeLists.txt :189

target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
                                                     cxx_right_angle_brackets)

MistEO/meojson CMakeLists.txt :34

target_compile_features(meojson INTERFACE cxx_std_17)

axmolengine/axmol 3rdparty/fmt/CMakeLists.txt :379

target_compile_features(fmt-header-only INTERFACE cxx_std_11)

luczeng/HoughRectangle third_party/Catch2/CMakeLists.txt :70

target_compile_features(Catch2
  INTERFACE
    cxx_alignas
    cxx_alignof
    cxx_attributes
    cxx_auto_type
    cxx_constexpr
    cxx_defaulted_functions
    cxx_deleted_functions
    cxx_final
    cxx_lambdas
    cxx_noexcept
    cxx_override
    cxx_range_for
    cxx_rvalue_references
    cxx_static_assert
    cxx_strong_enums
    cxx_trailing_return_types
    cxx_unicode_literals
    cxx_user_literals
    cxx_variadic_macros
)

dealii/dealii module/CMakeLists.txt :355

target_compile_features(${DEAL_II_TARGET_NAME}_module_${build_lowercase}
      INTERFACE cxx_std_${CMAKE_CXX_STANDARD}
      )

nRF24/RF24 CMakeLists.txt :28

target_compile_features(${LibTargetName}_project_options INTERFACE cxx_std_17)

gatecat/nextpnr-xilinx 3rdparty/pybind11/CMakeLists.txt :189

target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
                                                     cxx_right_angle_brackets)