]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
doc: Tweak manual and comments related to /showIncludes
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 12 Oct 2022 18:35:42 +0000 (20:35 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 16 Oct 2022 08:50:09 +0000 (10:50 +0200)
doc/MANUAL.adoc
src/ArgsInfo.hpp
src/ccache.cpp
src/core/ShowIncludesParser.cpp

index e2ebf4084e224a8a5b2475fc95690aec3425eeaa..66750eeb28a138365709adaecd7bb8b1956e2f35 100644 (file)
@@ -812,8 +812,8 @@ file in `/etc/rsyslog.d`:
 *msvc_dep_prefix* (*CCACHE_MSVC_DEP_PREFIX*)::
 
     This option specifies the prefix of included files output for MSVC compiler.
-    The default prefix is "Note: including file:", which is the output for English,
-    but if you use a localized compiler, this should be set accordingly.
+    The default prefix is "`Note: including file:`". If you use a localized
+    compiler, this should be set accordingly.
 
 [#config_namespace]
 *namespace* (*CCACHE_NAMESPACE*)::
@@ -1556,7 +1556,7 @@ The direct mode will be disabled if any of the following holds:
 If the depend mode is enabled, ccache will not use the preprocessor at all. The
 hash used to identify results in the cache will be based on the direct mode
 hash described above plus information about include files read from the
-dependency list generated by MSVC with /showIncludes, or the dependency file
+dependency list generated by MSVC with `/showIncludes`, or the dependency file
 generated by other compilers with `-MD` or `-MMD`.
 
 Advantages:
@@ -1573,9 +1573,9 @@ Disadvantages:
   setup where ccache will fall back to the preprocessor mode, which is tolerant
   to some types of changes of compiler options and source code changes.
 * If -MD is used, the manifest entries will include system header files as
-  well, thus slowing down cache hits slightly, just as using -MD slows down
-  make. This is also the case for MSVC with /showIncludes.
-* If -MMD is used, the manifest entries will not include system header files,
+  well, thus slowing down cache hits slightly, just as using `-MD` slows down
+  make. This is also the case for MSVC with `/showIncludes`.
+* If `-MMD` is used, the manifest entries will not include system header files,
   which means ccache will ignore changes in them.
 
 The depend mode will be disabled if any of the following holds:
@@ -1583,7 +1583,7 @@ The depend mode will be disabled if any of the following holds:
 * <<config_depend_mode,*depend_mode*>> is false.
 * <<config_run_second_cpp,*run_second_cpp*>> is false.
 * The compiler is not generating dependencies using `-MD` or `-MMD` (for MSVC,
-  /showIncludes is added automatically if not specified by the user).
+  `/showIncludes` is added automatically if not specified by the user).
 
 
 == Handling of newly created header files
index ce96ceed232d7c38fe72d1f465f23ebfbf2bf548..b131f42d81dcecd4b52fafff3dbc47b074e60521 100644 (file)
@@ -75,7 +75,7 @@ struct ArgsInfo
   // Is the compiler being asked to output dependencies?
   bool generating_dependencies = false;
 
-  // Is the compiler being asked to output includes (MSVC -showIncludes)?
+  // Is the compiler being asked to output includes (MSVC /showIncludes)?
   bool generating_includes = false;
 
   // The dependency target in the dependency file (the object file unless
index 5b8ce65663e8a1462f4ff619f6709f1c886b3e84..f3333365bd739761e0774e27a58f4d142f21dcc0 100644 (file)
@@ -693,7 +693,7 @@ struct DoExecuteResult
   util::Bytes stderr_data;
 };
 
-// Extract the used includes from -showIncludes output in stdout. Note that we
+// Extract the used includes from /showIncludes output in stdout. Note that we
 // cannot distinguish system headers from other includes here.
 static std::optional<Digest>
 result_key_from_includes(Context& ctx, Hash& hash, std::string_view stdout_data)
index ca1b764c2b3fed61fc432748538715e44dd24c29..f05521eb95dd43799be5fb69cca661dca9684950 100644 (file)
@@ -27,9 +27,9 @@ namespace core::ShowIncludesParser {
 std::vector<std::string_view>
 tokenize(std::string_view file_content, std::string_view prefix)
 {
-  // -showIncludes output is written to stdout together with other messages.
-  // Every line of it is '<prefix> <spaces> <file>', prefix is 'Note: including
-  // file:' in English but can be localized.
+  // /showIncludes output is written to stdout together with other messages.
+  // Every line of it is "<prefix> <spaces> <file>" where the prefix is "Note:
+  // including file:" in English but can be localized.
 
   std::vector<std::string_view> result;
   // This will split at each \r or \n, but that simply means there will be empty