xtensor-blas icon indicating copy to clipboard operation
xtensor-blas copied to clipboard

Improved c++14/17 integration, follows more closely modern cmake

Open emmenlau opened this issue 4 years ago • 0 comments

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?

emmenlau avatar Oct 22 '20 07:10 emmenlau