From 5301eedbe6dbf28292c0df7a8de3d582d5b70fd2 Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Sat, 1 Jun 2013 11:22:10 +0200 Subject: [PATCH] Disable null conversion warning in CMake. It gives problems when using Clang and boost::shared_ptr when compiling for C++11. The issue can't be fixed since Wesnoth uses C++98. (So we use NULL instead of nullptr.) --- CMakeLists.txt | 7 +++++++ changelog | 1 + 2 files changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 200952d0a73..69547e4ce19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,6 +280,13 @@ check_compiler_has_flag( "-Wno-mismatched-tags" ) +check_compiler_has_flag( + CXX_FLAGS_STRICT_COMPILATION + "-Wnull-conversion" + HAS_COMPILER_FLAG_WNULL_CONVERSION + "-Wno-null-conversion" +) + if(NOT CMAKE_COMPILER_IS_GNUCXX) # Silences warnings about overloaded virtuals. # (GCC doesn't complain Clang does.) diff --git a/changelog b/changelog index 5b3d76f15f0..f0e34652c06 100644 --- a/changelog +++ b/changelog @@ -19,6 +19,7 @@ Version 1.11.4+dev: * Miscellaneous and bug fixes * Added a new playlist FULL_MUSIC_PLAYLIST, which contains all Wesnoth tracks in alphabetical order + * Added -Wno-null-conversion to the CMake pedantic flags. Version 1.11.4: * AI: