From cc4daa9a298adce32a7dad3ed0fa6e1ee3d6677c Mon Sep 17 00:00:00 2001 From: Be Date: Wed, 10 Mar 2021 13:24:59 -0600 Subject: [PATCH] README: explain how to use /Zi with /Fd --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 96694a56c..ac2d66936 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ To use sccache with cmake, provide the following command line arguments to cmake -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ``` -To generate PDB files for debugging with MSVC, only the [`/Z7` option](https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-160) works with sccache; the PDB files generated with the `/Zi` and `/ZI` options cannot be cached. Note that CMake sets `/Zi` by default, so if you use CMake, you will need something like this in your CMakeLists.txt: +To generate PDB files for debugging with MSVC, you can use the [`/Z7` option](https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-160). Alternatively, the `/Zi` option together with `/Fd` can work if `/Fd` names a different PDB file name for each object file created. Note that CMake sets `/Zi` by default, so if you use CMake, you can use `/Z7` by adding code like this in your CMakeLists.txt: ``` if(CMAKE_BUILD_TYPE STREQUAL "Debug")