summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCUDACompilerId.cu.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-03 16:49:05 (GMT)
committerBrad King <brad.king@kitware.com>2022-02-03 17:06:00 (GMT)
commit4ef6e27cb9c2e005d3d1f26ba6a99d164b1eee9d (patch)
tree864eb5dd4f9d4288a327128ea3ce6de5f8ce288b /Modules/CMakeCUDACompilerId.cu.in
parent17f97143cb0d9d3fdcbc0262342f3cf0c62469e6 (diff)
downloadCMake-4ef6e27cb9c2e005d3d1f26ba6a99d164b1eee9d.zip
CMake-4ef6e27cb9c2e005d3d1f26ba6a99d164b1eee9d.tar.gz
CMake-4ef6e27cb9c2e005d3d1f26ba6a99d164b1eee9d.tar.bz2
CompilerId: Fix default extensions check for Clang targeting MSVC ABI
In commit fc3a1cbdd8 (CompilerID: Compiler extensions default detection, 2021-05-29, v3.22.0-rc1~52^2~2), extensions were assumed to be `OFF` for Clang targeting the MSVC ABI. However, the `clang` and `clang++` tools both seem to have extensions enabled by default even when targeting the MSVC ABI. This can be observed with the `RunCMake.CompileFeatures` test. It fails with the GNU-like `clang/clang++` front-end, but removing the above special case makes it pass. The test passes either way with the MSVC-like `clang-cl` front-end.
Diffstat (limited to 'Modules/CMakeCUDACompilerId.cu.in')
-rw-r--r--Modules/CMakeCUDACompilerId.cu.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/CMakeCUDACompilerId.cu.in b/Modules/CMakeCUDACompilerId.cu.in
index becb9b4..d5a3b03 100644
--- a/Modules/CMakeCUDACompilerId.cu.in
+++ b/Modules/CMakeCUDACompilerId.cu.in
@@ -33,9 +33,8 @@ const char* info_language_standard_default = "INFO" ":" "standard_default["
"]";
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)
+#if (defined(__clang__) || defined(__GNUC__)) && \
+ !defined(__STRICT_ANSI__)
"ON"
#else
"OFF"