xtensor-blas
xtensor-blas copied to clipboard
Improved c++14/17 integration, follows more closely modern cmake
Currently xtensor-blas supports cmake prior to 3.8 by not using target_compile_features
to set the c++14/17 standard. This can be a problem when mixed with projects that do use target_compile_features
to set the standard, because cmake will not match the two choices. Therefore with the current implementation, both flags may be effective at the same time, which can result in compiler options like
cc ... -std=c++17 ... -std=gnu++11 ...
where the later option wins.
If xtensor should continue to support cmake prior to 3.8, then I propose to use target_compile_features
when a sufficiently recent cmake is found. Otherwise I'd recommend to set the minimum cmake to 3.8?