CUDA: Setting CXX_STANDARD breaks CUDA_STANDARD selection via cxx_std_11
- CMake: 3.10.0
- CUDA: 9.0
- OS: Linux Mint 18.0 Cinnamon 64-bit
- GCC: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5)
- Testing project: https://github.com/chaosink/cupix
It seems that the only way to make nvcc use C++11 is setting target_compile_features(t PUBLIC cxx_std_11)
.
However set(CMAKE_CXX_STANDARD 11)
will disable target_compile_features(t PUBLIC cxx_std_11)
and nvcc will not use C++11.
Is that a bug?
set_target_properties(t PROPERTIES CXX_STANDARD 11)
and set_property(TARGET t PROPERTY CXX_STANDARD 11)
have no influence on target_compile_features(t PUBLIC cxx_std_11)
.