]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Look for the correct phrase when detecting unsupported GCC color option
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 24 Jul 2020 18:18:22 +0000 (20:18 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 24 Jul 2020 18:18:22 +0000 (20:18 +0200)
The implementation from #596 uses the spelling “command-line” instead of
“command line” (which is what is actually emitted by GCC and specified
in #224).

src/ccache.cpp

index f7f27ef3b09acb5902b46648a45a10bb1427e0a4..fa2c257b8662d6a2e0ecdf6daab7d4dd0955a7aa 100644 (file)
@@ -712,7 +712,7 @@ execute(Context& ctx,
   if (status != 0 && !ctx.diagnostics_color_failed
       && ctx.guessed_compiler == GuessedCompiler::gcc) {
     auto errors = Util::read_file(stderr_path);
-    if (errors.find("unrecognized command-line option") != std::string::npos
+    if (errors.find("unrecognized command line option") != std::string::npos
         && errors.find("-fdiagnostics-color") != std::string::npos) {
       // Old versions of GCC did not support colored diagnostics.
       cc_log("-fdiagnostics-color is unsupported; trying again without it");