From df6b077625f86e4ec0d534f6cd88f8610c5b8f8a Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 29 Jun 2020 16:45:43 -0400 Subject: cmake: Remove broken '--warn-unused-vars' option This option has been broken since commit b9f9915516 (cmMakefile: Remove VarUsageStack., 2015-05-17, v3.3.0-rc1~52^2). That commit removed the check that an initialized variable has actually been used and caused the option to warn on every variable ever set. This was not caught by the test suite because the test for the feature only checked that warnings appear when needed and not that they do not appear when not needed. The option was never very practical to use. Remove it to avoid the runtime cost of usage tracking and checks for every variable (which we were doing even when the option was not used). --- Source/cmDefinitions.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'Source/cmDefinitions.h') diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index 0e38fb1af2..d57750a072 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -48,9 +48,6 @@ public: /** Unset a definition. */ void Unset(const std::string& key); - /** List of unused keys. */ - std::vector UnusedKeys() const; - private: /** String with existence boolean. */ struct Def @@ -62,7 +59,6 @@ private: { } cm::String Value; - bool Used = false; }; static Def NoDef; -- cgit v1.2.1