Преглед на файлове

Don't suggest `/Zc:__cplusplus` for clang compiler on windows (#328)

This fixes an error when using the clang compiler on windows using
`-std=c++23` (llvm 18).
The error message is not meant for clang and `/Zc:__cplusplus` is
invalid for clang as the compiler properly sets `__cplusplus`.
Sandy преди 1 година
родител
ревизия
8708c9feba
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      include/bx/platform.h

+ 2 - 2
include/bx/platform.h

@@ -453,9 +453,9 @@
 #endif // BX_ARCH_
 #endif // BX_ARCH_
 
 
 #if defined(__cplusplus)
 #if defined(__cplusplus)
-#	if defined(_MSVC_LANG) && _MSVC_LANG != __cplusplus
+#	if BX_COMPILER_MSVC && defined(_MSVC_LANG) && _MSVC_LANG != __cplusplus
 #			error "When using MSVC you must set /Zc:__cplusplus compiler option."
 #			error "When using MSVC you must set /Zc:__cplusplus compiler option."
-#	endif // defined(_MSVC_LANG) && _MSVC_LANG != __cplusplus
+#	endif // BX_COMPILER_MSVC && defined(_MSVC_LANG) && _MSVC_LANG != __cplusplus
 
 
 #	if   __cplusplus < BX_LANGUAGE_CPP17
 #	if   __cplusplus < BX_LANGUAGE_CPP17
 #		error "C++17 standard support is required to build."
 #		error "C++17 standard support is required to build."