From b7b8331d686d87769c7aac60bb41585eb4fb54c2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 13 Jan 2020 11:42:32 -0500 Subject: Xcode: Drop hard-coded default warning flags like -Wmost The `-Wmost` flag was added by commit 97a51d2172 (ENH: add more xcode stuff, 2005-01-27, v2.4.0~2396), along with a couple others, as part of very early work on the Xcode generator. I suspect that the flags were part of Xcode's project creation wizard. However, they are not appropriate for CMake-based projects because we already have our own mechanisms for specifying flags desired by the project or user. Simply drop the flags. Fixes: #13516 --- Help/release/dev/xcode-default-warnings.rst | 5 +++++ Source/cmGlobalXCodeGenerator.cxx | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 Help/release/dev/xcode-default-warnings.rst diff --git a/Help/release/dev/xcode-default-warnings.rst b/Help/release/dev/xcode-default-warnings.rst new file mode 100644 index 0000000..a9a2e49 --- /dev/null +++ b/Help/release/dev/xcode-default-warnings.rst @@ -0,0 +1,5 @@ +xcode-default-warnings +---------------------- + +* The :generator:`Xcode` generator no longer hard-codes ``-Wmost``, + ``-Wno-four-char-constants``, and ``-Wno-unknown-pragmas`` warning flags. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 607b2b3..f887284 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2357,9 +2357,6 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, buildSettings->AddAttribute("SECTORDER_FLAGS", this->CreateString("")); buildSettings->AddAttribute("USE_HEADERMAP", this->CreateString("NO")); cmXCodeObject* group = this->CreateObject(cmXCodeObject::OBJECT_LIST); - group->AddObject(this->CreateString("-Wmost")); - group->AddObject(this->CreateString("-Wno-four-char-constants")); - group->AddObject(this->CreateString("-Wno-unknown-pragmas")); group->AddObject(this->CreateString("$(inherited)")); buildSettings->AddAttribute("WARNING_CFLAGS", group); -- cgit v0.12