Exclude CUDA 10.2 as well from C++17 compilation
authorSzilárd Páll <pall.szilard@gmail.com>
Sat, 24 Oct 2020 12:05:08 +0000 (12:05 +0000)
committerAndrey Alekseenko <al42and@gmail.com>
Sat, 24 Oct 2020 12:05:08 +0000 (12:05 +0000)
This commit corrects compilation with CUDA 10.2, which does not support
C++17, by changing the condition to pass -std=c++14 to nvcc added by
commit b6172240bfb5daf80d32150924bcdc46a4b07e10.

cmake/gmxManageNvccConfig.cmake

index e0ce2f34815bd28313b0614be805e48c1535e5e0..898246762958ab3b80f0aa5dc749eba9f0a9b0df 100644 (file)
@@ -152,8 +152,8 @@ endif()
 # FindCUDA.cmake is unaware of the mechanism used by cmake to embed
 # the compiler flag for the required C++ standard in the generated
 # build files, so we have to pass it ourselves
-if (CUDA_VERSION VERSION_LESS 10.2)
-    # CUDA doesn't formally support C++17 until version 10.2, so for
+if (CUDA_VERSION VERSION_LESS 11.0)
+    # CUDA doesn't formally support C++17 until version 11.0, so for
     # now host-side code that compiles with CUDA is restricted to
     # C++14. This needs to be expressed formally for older CUDA
     # version.