Tutorial by Examples

Required compiler features can be specified on a target using the command target_compile_features: add_library(foo foo.cpp ) target_compile_features(foo PRIVATE # scope of the feature cxx_constexpr # list of features ) The features must be part of CMAKE_C_COMPILE_FE...
Wanted version for C and C++ can be specified globally using respectively variables CMAKE_C_STANDARD (accepted values are 98, 99 and 11) and CMAKE_CXX_STANDARD (accepted values are 98, 11 and 14): set(CMAKE_C_STANDARD 99) set(CMAKE_CXX_STANDARD 11) These will add the needed compile options on t...

Page 1 of 1