浏览代码

Help: Document PDB behavior w.r.t. static libraries explicitly (#14600)

Document PDB_NAME and PDB_OUTPUT_DIRECTORY as applying only to shared
libraries and executables.  Add an explicit note to explain why they
do not work for static libraries.
Brad King 12 年之前
父节点
当前提交
c0897cfad0

+ 6 - 4
Help/prop_tgt/PDB_NAME.rst

@@ -1,11 +1,13 @@
 PDB_NAME
 --------
 
-Output name for MS debug symbols ``.pdb`` file from linker.
+Output name for the MS debug symbol ``.pdb`` file generated by the
+linker for an executable or shared library target.
 
-Set the base name for debug symbols file created for an executable or
-shared library target.  If not set, the logical target name is used by
-default.
+This property specifies the base name for the debug symbols file.
+If not set, the logical target name is used by default.
+
+.. include:: PDB_NOTE.txt
 
 This property is not implemented by the :generator:`Visual Studio 6`
 generator.

+ 2 - 1
Help/prop_tgt/PDB_NAME_CONFIG.rst

@@ -1,7 +1,8 @@
 PDB_NAME_<CONFIG>
 -----------------
 
-Per-configuration name for MS debug symbols ``.pdb`` file.
+Per-configuration output name for the MS debug symbol ``.pdb`` file
+generated by the linker for an executable or shared library target.
 
 This is the configuration-specific version of :prop_tgt:`PDB_NAME`.
 

+ 8 - 0
Help/prop_tgt/PDB_NOTE.txt

@@ -0,0 +1,8 @@
+.. note::
+ This property does not apply to STATIC library targets because no linker
+ is invoked to produce them so they have no linker-generated ``.pdb`` file
+ containing debug symbols.
+
+ The compiler-generated program database files specified by the MSVC
+ ``/Fd`` flag are not the same as linker-generated program database
+ files and so are not influenced by this property.

+ 4 - 1
Help/prop_tgt/PDB_OUTPUT_DIRECTORY.rst

@@ -1,12 +1,15 @@
 PDB_OUTPUT_DIRECTORY
 --------------------
 
-Output directory for MS debug symbols ``.pdb`` file from linker.
+Output directory for the MS debug symbols ``.pdb`` file
+generated by the linker for an executable or shared library target.
 
 This property specifies the directory into which the MS debug symbols
 will be placed by the linker.  This property is initialized by the
 value of the :variable:`CMAKE_PDB_OUTPUT_DIRECTORY` variable if it is
 set when a target is created.
 
+.. include:: PDB_NOTE.txt
+
 This property is not implemented by the :generator:`Visual Studio 6`
 generator.

+ 2 - 1
Help/prop_tgt/PDB_OUTPUT_DIRECTORY_CONFIG.rst

@@ -1,7 +1,8 @@
 PDB_OUTPUT_DIRECTORY_<CONFIG>
 -----------------------------
 
-Per-configuration output directory for MS debug symbols ``.pdb`` files.
+Per-configuration output directory for the MS debug symbol ``.pdb`` file
+generated by the linker for an executable or shared library target.
 
 This is a per-configuration version of :prop_tgt:`PDB_OUTPUT_DIRECTORY`,
 but multi-configuration generators (VS, Xcode) do NOT append a

+ 2 - 1
Help/variable/CMAKE_PDB_OUTPUT_DIRECTORY.rst

@@ -1,7 +1,8 @@
 CMAKE_PDB_OUTPUT_DIRECTORY
 --------------------------
 
-Where to put all the MS debug symbol files from linker.
+Output directory for MS debug symbol ``.pdb`` files generated by the
+linker for executable and shared library targets.
 
 This variable is used to initialize the :prop_tgt:`PDB_OUTPUT_DIRECTORY`
 property on all the targets.  See that target property for additional

+ 2 - 1
Help/variable/CMAKE_PDB_OUTPUT_DIRECTORY_CONFIG.rst

@@ -1,7 +1,8 @@
 CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG>
 -----------------------------------
 
-Per-configuration output directory for MS debug symbols ``.pdb`` files.
+Per-configuration output directory for MS debug symbol ``.pdb`` files
+generated by the linker for executable and shared library targets.
 
 This is a per-configuration version of :variable:`CMAKE_PDB_OUTPUT_DIRECTORY`.
 This variable is used to initialize the