Allowed values for CXX_STANDARD and CUDA_STANDARD are inconsistent with reality
CXX_STANDARD
supports 98
, 11
, 14
, 17
and 20
; it doesn't support 03
, which is the first part of this report. 03
should also be supported, even if it's mostly (but not quite) the same language as 98, even if just for the reason that -std=c++03
is a separate option that exists.
CUDA_STANDARD
is a bigger offender though. It follows the same idea of skipping (for whatever reason) C++03... but nvcc
doesn't know what C++98 is, at least as far as -std=XXX
is concerned; it only knows about C++03 and upwards. However, the CMake "way" to set C++03 as the NVCC mode is to set CUDA_STANDARD
to... C++98, which is super wrong (not to mention being confusing, since setting it to 98
passes -std=c++03
to nvcc
; ugh).
My ideal of a solution of this messy situation would be:
- add
03
to the list of allowed values forCXX_STANDARD
; - add
03
to the list of allowed values forCUDA_STANDARD
; - deprecate and eventually remove
98
from the list of allowed values forCUDA_STANDARD
.