summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorZsolt Parragi <zsolt.parragi@cancellar.hu>2019-05-29 16:03:34 (GMT)
committerZsolt Parragi <zsolt.parragi@cancellar.hu>2019-05-29 16:18:09 (GMT)
commit4fe34b2d29ca67ea91b2545b223dad8abbcad282 (patch)
tree34d99fca6f3ad23737d073c086bc3e702d8176a3 /Source/cmGlobalGenerator.cxx
parent067a4f484b1e2f650918d90051653b5c434c77a2 (diff)
downloadCMake-4fe34b2d29ca67ea91b2545b223dad8abbcad282.zip
CMake-4fe34b2d29ca67ea91b2545b223dad8abbcad282.tar.gz
CMake-4fe34b2d29ca67ea91b2545b223dad8abbcad282.tar.bz2
Fixing warnings generated by clang 8.0 on Windows
* Deprecation removals previously specific to MSVC/Intel now also used by clang * String literals were assigned to non const pointers. These are stored in mutable arrays now * An implicit function pointer to pointer conversion is a Microsoft extension warning is suppressed by an explicit reinterpret_cast * The MSVC specific deprecation macro for jsoncpp was moved after the clang macro to avoid redefinition warnings. This is consistent with how jsoncpp fixed the issue in 36d8cfd7
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3495f2a..26886f5 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -535,11 +535,22 @@ void cmGlobalGenerator::EnableLanguage(
# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# pragma warning(push)
-# pragma warning(disable : 4996)
+# ifdef __INTEL_COMPILER
+# pragma warning(disable : 1478)
+# elif defined __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wdeprecated-declarations"
+# else
+# pragma warning(disable : 4996)
+# endif
# endif
GetVersionExW((OSVERSIONINFOW*)&osviex);
# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
-# pragma warning(pop)
+# ifdef __clang__
+# pragma clang diagnostic pop
+# else
+# pragma warning(pop)
+# endif
# endif
std::ostringstream windowsVersionString;
windowsVersionString << osviex.dwMajorVersion << "."