summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCUDACompilerId.cu.in
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2021-05-29 13:54:41 (GMT)
committerRaul Tambre <raul@tambre.ee>2021-09-28 18:24:53 (GMT)
commitfc3a1cbdd81f350b897c6cd06d75e8e228514773 (patch)
tree8d87587807fcfeb6bfb1d506f3e7a3f2441389d9 /Modules/CMakeCUDACompilerId.cu.in
parent2adfd95d793b516fdef2d02a60b9529f525f6374 (diff)
downloadCMake-fc3a1cbdd81f350b897c6cd06d75e8e228514773.zip
CMake-fc3a1cbdd81f350b897c6cd06d75e8e228514773.tar.gz
CMake-fc3a1cbdd81f350b897c6cd06d75e8e228514773.tar.bz2
CompilerID: Compiler extensions default detection
Diffstat (limited to 'Modules/CMakeCUDACompilerId.cu.in')
-rw-r--r--Modules/CMakeCUDACompilerId.cu.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/CMakeCUDACompilerId.cu.in b/Modules/CMakeCUDACompilerId.cu.in
index 96cc8e6..bc685a7 100644
--- a/Modules/CMakeCUDACompilerId.cu.in
+++ b/Modules/CMakeCUDACompilerId.cu.in
@@ -32,6 +32,16 @@ const char* info_language_standard_default = "INFO" ":" "standard_default["
#endif
"]";
+const char* info_language_extensions_default = "INFO" ":" "extensions_default["
+// !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode.
+#if (defined(__clang__) || defined(__GNUC__)) && !defined(__STRICT_ANSI__) && \
+ !defined(_MSC_VER)
+ "ON"
+#else
+ "OFF"
+#endif
+"]";
+
/*--------------------------------------------------------------------------*/
int main(int argc, char* argv[])
@@ -49,6 +59,7 @@ int main(int argc, char* argv[])
require += info_simulate_version[argc];
#endif
require += info_language_standard_default[argc];
+ require += info_language_extensions_default[argc];
(void)argv;
return require;
}