You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
could use cmake's CXX_STANDARD to set the C++ standard #257
xtensor-blas, at least in tests in test/CMakeLists.txt and in benchmark/CMakeLists.txt, sets a default C++ standard together with an option (CPP17/CPP20/CPP23, depending on xtensor-blas version) to set a more recent standard.
When the C++ standard, alternative flags are used to allow for GNU, Intel, PGI, or for MSVC compilers.
But cmake already has a mechanism for managing the C++ standard, with the CXX_STANDARD variable, that can be given a custom value at the cmake command line via CMAKE_CXX_STANDARD (with CMAKE_CXX_STANDARD_REQUIRED=ON if it must be strict).
CXX_STANDARD also has a fallback mechanism (a "decay behavior") to drop back to an older standard if the compiler does not support the given standard. Depending on what xtensor-blas wants by setting the standard, it be made strict by using CXX_STANDARD_REQUIRED=ON if needed.
Using these flags puts the burden of tracking the right flag for each compiler onto cmake, so might allow xtensor-blas to work with more rare compilers.
Activity