[Cmake-commits] CMake branch, next, updated. v2.8.12.2-1700-gce4c196

Brad King brad.king at kitware.com
Mon Feb 24 13:42:55 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  ce4c19614b115cbae3dd3122daec471874d458b6 (commit)
       via  09abe9a47dbcc8a4af2ff6a88c9ec4443b548391 (commit)
      from  ae30fae9bcadf6dea52000b2544eb22c5b5aee82 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce4c19614b115cbae3dd3122daec471874d458b6
commit ce4c19614b115cbae3dd3122daec471874d458b6
Merge: ae30fae 09abe9a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 24 13:42:53 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 24 13:42:53 2014 -0500

    Merge topic 'msvc-compiler-pdb-files' into next
    
    09abe9a4 Revert topic 'msvc-compiler-pdb-files'


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09abe9a47dbcc8a4af2ff6a88c9ec4443b548391
commit 09abe9a47dbcc8a4af2ff6a88c9ec4443b548391
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 24 13:43:11 2014 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Feb 24 13:43:11 2014 -0500

    Revert topic 'msvc-compiler-pdb-files'
    
    It will be revised and rebased to fix test failures.

diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 6ea5839..d315fcb 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -100,10 +100,6 @@ Properties on Targets
    /prop_tgt/COMPILE_DEFINITIONS
    /prop_tgt/COMPILE_FLAGS
    /prop_tgt/COMPILE_OPTIONS
-   /prop_tgt/COMPILE_PDB_NAME
-   /prop_tgt/COMPILE_PDB_NAME_CONFIG
-   /prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY
-   /prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG
    /prop_tgt/CONFIG_OUTPUT_NAME
    /prop_tgt/CONFIG_POSTFIX
    /prop_tgt/DEBUG_POSTFIX
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 5f2ba28..c4ae193 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -198,8 +198,6 @@ Variables that Control the Build
    /variable/CMAKE_AUTOUIC
    /variable/CMAKE_AUTOUIC_OPTIONS
    /variable/CMAKE_BUILD_WITH_INSTALL_RPATH
-   /variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY
-   /variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG
    /variable/CMAKE_CONFIG_POSTFIX
    /variable/CMAKE_DEBUG_POSTFIX
    /variable/CMAKE_EXE_LINKER_FLAGS_CONFIG
diff --git a/Help/prop_tgt/COMPILE_PDB_NAME.rst b/Help/prop_tgt/COMPILE_PDB_NAME.rst
deleted file mode 100644
index 24a9f62..0000000
--- a/Help/prop_tgt/COMPILE_PDB_NAME.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-COMPILE_PDB_NAME
-----------------
-
-Output name for the MS debug symbol ``.pdb`` file generated by the
-compiler while building source files.
-
-This property specifies the base name for the debug symbols file.
-If not set, the default is unspecified.
-
-.. |PDB_XXX| replace:: :prop_tgt:`PDB_NAME`
-.. include:: COMPILE_PDB_NOTE.txt
diff --git a/Help/prop_tgt/COMPILE_PDB_NAME_CONFIG.rst b/Help/prop_tgt/COMPILE_PDB_NAME_CONFIG.rst
deleted file mode 100644
index e4077f5..0000000
--- a/Help/prop_tgt/COMPILE_PDB_NAME_CONFIG.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-COMPILE_PDB_NAME_<CONFIG>
--------------------------
-
-Per-configuration output name for the MS debug symbol ``.pdb`` file
-generated by the compiler while building source files.
-
-This is the configuration-specific version of :prop_tgt:`COMPILE_PDB_NAME`.
-
-.. |PDB_XXX| replace:: :prop_tgt:`PDB_NAME_<CONFIG>`
-.. include:: COMPILE_PDB_NOTE.txt
diff --git a/Help/prop_tgt/COMPILE_PDB_NOTE.txt b/Help/prop_tgt/COMPILE_PDB_NOTE.txt
deleted file mode 100644
index 5941d72..0000000
--- a/Help/prop_tgt/COMPILE_PDB_NOTE.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-.. note::
- The compiler-generated program database files are specified by the
- ``/Fd`` compiler flag and are not the same as linker-generated
- program database files specified by the ``/pdb`` linker flag.
- Use the |PDB_XXX| property to specify the latter.
-
- This property is not implemented by the :generator:`Visual Studio 6`
- generator.
diff --git a/Help/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY.rst b/Help/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY.rst
deleted file mode 100644
index 34f49be..0000000
--- a/Help/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-COMPILE_PDB_OUTPUT_DIRECTORY
-----------------------------
-
-Output directory for the MS debug symbol ``.pdb`` file
-generated by the compiler while building source files.
-
-This property specifies the directory into which the MS debug symbols
-will be placed by the compiler.  This property is initialized by the
-value of the :variable:`CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY` variable
-if it is set when a target is created.
-
-.. |PDB_XXX| replace:: :prop_tgt:`PDB_OUTPUT_DIRECTORY`
-.. include:: COMPILE_PDB_NOTE.txt
diff --git a/Help/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.rst b/Help/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.rst
deleted file mode 100644
index 52ef013..0000000
--- a/Help/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>
--------------------------------------
-
-Per-configuration output directory for the MS debug symbol ``.pdb`` file
-generated by the compiler while building source files.
-
-This is a per-configuration version of
-:prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY`,
-but multi-configuration generators (VS, Xcode) do NOT append a
-per-configuration subdirectory to the specified directory.  This
-property is initialized by the value of the
-:variable:`CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>` variable
-if it is set when a target is created.
-
-.. |PDB_XXX| replace:: :prop_tgt:`PDB_OUTPUT_DIRECTORY_<CONFIG>`
-.. include:: COMPILE_PDB_NOTE.txt
diff --git a/Help/prop_tgt/PDB_NAME.rst b/Help/prop_tgt/PDB_NAME.rst
index 479dec3..e8fc3be 100644
--- a/Help/prop_tgt/PDB_NAME.rst
+++ b/Help/prop_tgt/PDB_NAME.rst
@@ -7,5 +7,7 @@ linker for an executable or shared library target.
 This property specifies the base name for the debug symbols file.
 If not set, the logical target name is used by default.
 
-.. |COMPILE_PDB_XXX| replace:: :prop_tgt:`COMPILE_PDB_NAME`
 .. include:: PDB_NOTE.txt
+
+This property is not implemented by the :generator:`Visual Studio 6`
+generator.
diff --git a/Help/prop_tgt/PDB_NAME_CONFIG.rst b/Help/prop_tgt/PDB_NAME_CONFIG.rst
index cb3121c..c846b57 100644
--- a/Help/prop_tgt/PDB_NAME_CONFIG.rst
+++ b/Help/prop_tgt/PDB_NAME_CONFIG.rst
@@ -6,5 +6,5 @@ generated by the linker for an executable or shared library target.
 
 This is the configuration-specific version of :prop_tgt:`PDB_NAME`.
 
-.. |COMPILE_PDB_XXX| replace:: :prop_tgt:`COMPILE_PDB_NAME_<CONFIG>`
-.. include:: PDB_NOTE.txt
+This property is not implemented by the :generator:`Visual Studio 6`
+generator.
diff --git a/Help/prop_tgt/PDB_NOTE.txt b/Help/prop_tgt/PDB_NOTE.txt
index f90ea81..e55aba2 100644
--- a/Help/prop_tgt/PDB_NOTE.txt
+++ b/Help/prop_tgt/PDB_NOTE.txt
@@ -3,10 +3,6 @@
  is invoked to produce them so they have no linker-generated ``.pdb`` file
  containing debug symbols.
 
- The linker-generated program database files are specified by the
- ``/pdb`` linker flag and are not the same as compiler-generated
- program database files specified by the ``/Fd`` compiler flag.
- Use the |COMPILE_PDB_XXX| property to specify the latter.
-
- This property is not implemented by the :generator:`Visual Studio 6`
- generator.
+ 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.
diff --git a/Help/prop_tgt/PDB_OUTPUT_DIRECTORY.rst b/Help/prop_tgt/PDB_OUTPUT_DIRECTORY.rst
index 730cf57..9a863a1 100644
--- a/Help/prop_tgt/PDB_OUTPUT_DIRECTORY.rst
+++ b/Help/prop_tgt/PDB_OUTPUT_DIRECTORY.rst
@@ -9,5 +9,7 @@ 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.
 
-.. |COMPILE_PDB_XXX| replace:: :prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY`
 .. include:: PDB_NOTE.txt
+
+This property is not implemented by the :generator:`Visual Studio 6`
+generator.
diff --git a/Help/prop_tgt/PDB_OUTPUT_DIRECTORY_CONFIG.rst b/Help/prop_tgt/PDB_OUTPUT_DIRECTORY_CONFIG.rst
index 6037fa0..caec2de 100644
--- a/Help/prop_tgt/PDB_OUTPUT_DIRECTORY_CONFIG.rst
+++ b/Help/prop_tgt/PDB_OUTPUT_DIRECTORY_CONFIG.rst
@@ -11,5 +11,5 @@ property is initialized by the value of the
 :variable:`CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG>` variable if it is
 set when a target is created.
 
-.. |COMPILE_PDB_XXX| replace:: :prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>`
-.. include:: PDB_NOTE.txt
+This property is not implemented by the :generator:`Visual Studio 6`
+generator.
diff --git a/Help/release/dev/msvc-compiler-pdb-files.rst b/Help/release/dev/msvc-compiler-pdb-files.rst
deleted file mode 100644
index d06d202..0000000
--- a/Help/release/dev/msvc-compiler-pdb-files.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-msvc-compiler-pdb-files
------------------------
-
-* New :prop_tgt:`COMPILE_PDB_NAME` and
-  :prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY` target properties
-  were introduced to specify the MSVC compiler program database
-  file location (``cl /Fd``).  This complements the existing
-  :prop_tgt:`PDB_NAME` and :prop_tgt:`PDB_OUTPUT_DIRECTORY`
-  target properties that specify the linker program database
-  file location (``link /pdb``).
diff --git a/Help/variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY.rst b/Help/variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY.rst
deleted file mode 100644
index ea33c7d..0000000
--- a/Help/variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY
-----------------------------------
-
-Output directory for MS debug symbol ``.pdb`` files
-generated by the compiler while building source files.
-
-This variable is used to initialize the
-:prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY` property on all the targets.
diff --git a/Help/variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.rst b/Help/variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.rst
deleted file mode 100644
index fdeb9ab..0000000
--- a/Help/variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>
--------------------------------------------
-
-Per-configuration output directory for MS debug symbol ``.pdb`` files
-generated by the compiler while building source files.
-
-This is a per-configuration version of
-:variable:`CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY`.
-This variable is used to initialize the
-:prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>`
-property on all the targets.
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 5732170..e29aaf4 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -241,7 +241,7 @@ macro(__windows_compiler_msvc lang)
   set(CMAKE_${lang}_CREATE_STATIC_LIBRARY  "<CMAKE_LINKER> /lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
 
   set(CMAKE_${lang}_COMPILE_OBJECT
-    "<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /Fo<OBJECT> /Fd<TARGET_COMPILE_PDB>${_FS_${lang}} -c <SOURCE>${CMAKE_END_TEMP_FILE}")
+    "<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /Fo<OBJECT> /Fd<OBJECT_DIR>/${_FS_${lang}} -c <SOURCE>${CMAKE_END_TEMP_FILE}")
   set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE
     "<CMAKE_${lang}_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> -E <SOURCE>${CMAKE_END_TEMP_FILE}")
   set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 4266dd0..aca195c 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -901,13 +901,6 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
       return replaceValues.TargetPDB;
       }
     }
-  if(replaceValues.TargetCompilePDB)
-    {
-    if(variable == "TARGET_COMPILE_PDB")
-      {
-      return replaceValues.TargetCompilePDB;
-      }
-    }
   if(replaceValues.DependencyFile )
     {
     if(variable == "DEP_FILE")
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 0f7fd25..9764813 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -245,7 +245,6 @@ public:
       }
     cmTarget* CMTarget;
     const char* TargetPDB;
-    const char* TargetCompilePDB;
     const char* TargetVersionMajor;
     const char* TargetVersionMinor;
     const char* Language;
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index ce24d8d..212b06b 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -660,7 +660,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
   switch(target.GetType())
     {
     case cmTarget::OBJECT_LIBRARY:
-      targetBuilds = false; // no manifest tool for object library
+      targetBuilds = false; // TODO: PDB for object library?
     case cmTarget::STATIC_LIBRARY:
       projectType = "typeStaticLibrary";
       configType = "4";
@@ -846,17 +846,6 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
   targetOptions.OutputFlagMap(fout, "\t\t\t\t");
   targetOptions.OutputPreprocessorDefinitions(fout, "\t\t\t\t", "\n", "CXX");
   fout << "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n";
-  if(target.GetType() <= cmTarget::OBJECT_LIBRARY)
-    {
-    // Specify the compiler program database file if configured.
-    std::string pdb = target.GetCompilePDBPath(configName);
-    if(!pdb.empty())
-      {
-      fout <<  "\t\t\t\tProgramDataBaseFileName=\""
-           << this->ConvertToXMLOutputPathSingle(pdb.c_str())
-           << "\"\n";
-      }
-    }
   fout << "/>\n";  // end of <Tool Name=VCCLCompilerTool
   tool = "VCCustomBuildTool";
   if(this->FortranProject)
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 03fdda2..69b8092 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -129,11 +129,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
       }
     }
 
-  std::string compilePdbOutputPath =
-    this->Target->GetCompilePDBDirectory(this->ConfigName);
-  cmSystemTools::MakeDirectory(compilePdbOutputPath.c_str());
-
-  std::string pdbOutputPath = this->Target->GetPDBDirectory(this->ConfigName);
+  std::string pdbOutputPath = this->Target->GetPDBDirectory();
   cmSystemTools::MakeDirectory(pdbOutputPath.c_str());
   pdbOutputPath += "/";
 
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 807aca8..d6a0cd4 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -321,11 +321,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
       }
     }
 
-  std::string compilePdbOutputPath =
-    this->Target->GetCompilePDBDirectory(this->ConfigName);
-  cmSystemTools::MakeDirectory(compilePdbOutputPath.c_str());
-
-  std::string pdbOutputPath = this->Target->GetPDBDirectory(this->ConfigName);
+  std::string pdbOutputPath = this->Target->GetPDBDirectory();
   cmSystemTools::MakeDirectory(pdbOutputPath.c_str());
   pdbOutputPath += "/";
 
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index c6ade7f..c3ca85d 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -624,11 +624,9 @@ cmMakefileTargetGenerator
 
   std::string targetOutPathReal;
   std::string targetOutPathPDB;
-  std::string targetOutPathCompilePDB;
   {
   std::string targetFullPathReal;
   std::string targetFullPathPDB;
-  std::string targetFullPathCompilePDB;
   if(this->Target->GetType() == cmTarget::EXECUTABLE ||
      this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
      this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
@@ -640,26 +638,12 @@ cmMakefileTargetGenerator
     targetFullPathPDB += "/";
     targetFullPathPDB += this->Target->GetPDBName(this->ConfigName);
     }
-  if(this->Target->GetType() <= cmTarget::OBJECT_LIBRARY)
-    {
-    targetFullPathCompilePDB =
-      this->Target->GetCompilePDBPath(this->ConfigName);
-    if(targetFullPathCompilePDB.empty())
-      {
-      targetFullPathCompilePDB = this->Target->GetSupportDirectory() + "/";
-      }
-    }
-
   targetOutPathReal = this->Convert(targetFullPathReal.c_str(),
                                     cmLocalGenerator::START_OUTPUT,
                                     cmLocalGenerator::SHELL);
   targetOutPathPDB =
     this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::NONE,
                   cmLocalGenerator::SHELL);
-  targetOutPathCompilePDB =
-    this->Convert(targetFullPathCompilePDB.c_str(),
-                  cmLocalGenerator::START_OUTPUT,
-                  cmLocalGenerator::SHELL);
   }
   cmLocalGenerator::RuleVariables vars;
   vars.RuleLauncher = "RULE_LAUNCH_COMPILE";
@@ -667,7 +651,6 @@ cmMakefileTargetGenerator
   vars.Language = lang;
   vars.Target = targetOutPathReal.c_str();
   vars.TargetPDB = targetOutPathPDB.c_str();
-  vars.TargetCompilePDB = targetOutPathCompilePDB.c_str();
   vars.Source = sourceFile.c_str();
   std::string shellObj =
     this->Convert(obj.c_str(),
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index eaeddef..900af8d 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -320,7 +320,6 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
       mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID"))
     {
     std::string pdbPath;
-    std::string compilePdbPath;
     if(this->Target->GetType() == cmTarget::EXECUTABLE ||
        this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
        this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
@@ -330,25 +329,11 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
       pdbPath += "/";
       pdbPath += this->Target->GetPDBName(this->GetConfigName());
       }
-    if(this->Target->GetType() <= cmTarget::OBJECT_LIBRARY)
-      {
-      compilePdbPath = this->Target->GetCompilePDBPath(this->GetConfigName());
-      if(compilePdbPath.empty())
-        {
-        compilePdbPath = this->Target->GetSupportDirectory() + "/";
-        }
-      }
 
     vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
                           ConvertToNinjaPath(pdbPath.c_str()).c_str(),
                           cmLocalGenerator::SHELL);
-    vars["TARGET_COMPILE_PDB"] =
-      this->GetLocalGenerator()->ConvertToOutputFormat(
-        ConvertToNinjaPath(compilePdbPath.c_str()).c_str(),
-        cmLocalGenerator::SHELL);
-
     EnsureParentDirectoryExists(pdbPath);
-    EnsureParentDirectoryExists(compilePdbPath);
     return true;
     }
   return false;
@@ -377,7 +362,6 @@ cmNinjaTargetGenerator
   vars.Object = "$out";
   vars.Defines = "$DEFINES";
   vars.TargetPDB = "$TARGET_PDB";
-  vars.TargetCompilePDB = "$TARGET_COMPILE_PDB";
   vars.ObjectDir = "$OBJECT_DIR";
 
   cmMakefile* mf = this->GetMakefile();
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a1271e7..db34bd8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -59,7 +59,6 @@ struct cmTarget::OutputInfo
   std::string OutDir;
   std::string ImpDir;
   std::string PdbDir;
-  std::string CompilePdbDir;
 };
 
 //----------------------------------------------------------------------------
@@ -268,7 +267,6 @@ void cmTarget::SetMakefile(cmMakefile* mf)
     this->SetPropertyDefault("LIBRARY_OUTPUT_DIRECTORY", 0);
     this->SetPropertyDefault("RUNTIME_OUTPUT_DIRECTORY", 0);
     this->SetPropertyDefault("PDB_OUTPUT_DIRECTORY", 0);
-    this->SetPropertyDefault("COMPILE_PDB_OUTPUT_DIRECTORY", 0);
     this->SetPropertyDefault("Fortran_FORMAT", 0);
     this->SetPropertyDefault("Fortran_MODULE_DIRECTORY", 0);
     this->SetPropertyDefault("GNUtoMS", 0);
@@ -297,7 +295,6 @@ void cmTarget::SetMakefile(cmMakefile* mf)
     "LIBRARY_OUTPUT_DIRECTORY_",
     "RUNTIME_OUTPUT_DIRECTORY_",
     "PDB_OUTPUT_DIRECTORY_",
-    "COMPILE_PDB_OUTPUT_DIRECTORY_",
     "MAP_IMPORTED_CONFIG_",
     0};
   for(std::vector<std::string>::iterator ci = configNames.begin();
@@ -2470,11 +2467,10 @@ cmTarget::OutputInfo const* cmTarget::GetOutputInfo(const char* config) const
     OutputInfo info;
     this->ComputeOutputDir(config, false, info.OutDir);
     this->ComputeOutputDir(config, true, info.ImpDir);
-    if(!this->ComputePDBOutputDir("PDB", config, info.PdbDir))
+    if(!this->ComputePDBOutputDir(config, info.PdbDir))
       {
       info.PdbDir = info.OutDir;
       }
-    this->ComputePDBOutputDir("COMPILE_PDB", config, info.CompilePdbDir);
     OutputInfoMapType::value_type entry(config_upper, info);
     i = this->Internal->OutputInfoMap.insert(entry).first;
     }
@@ -2511,16 +2507,6 @@ std::string cmTarget::GetPDBDirectory(const char* config) const
 }
 
 //----------------------------------------------------------------------------
-std::string cmTarget::GetCompilePDBDirectory(const char* config) const
-{
-  if(OutputInfo const* info = this->GetOutputInfo(config))
-    {
-    return info->CompilePdbDir;
-    }
-  return "";
-}
-
-//----------------------------------------------------------------------------
 const char* cmTarget::GetLocation(const char* config) const
 {
   if (this->IsImported())
@@ -3181,49 +3167,6 @@ std::string cmTarget::GetPDBName(const char* config) const
 }
 
 //----------------------------------------------------------------------------
-std::string cmTarget::GetCompilePDBName(const char* config) const
-{
-  std::string prefix;
-  std::string base;
-  std::string suffix;
-  this->GetFullNameInternal(config, false, prefix, base, suffix);
-
-  // Check for a per-configuration output directory target property.
-  std::string configUpper = cmSystemTools::UpperCase(config? config : "");
-  std::string configProp = "COMPILE_PDB_NAME_";
-  configProp += configUpper;
-  const char* config_name = this->GetProperty(configProp.c_str());
-  if(config_name && *config_name)
-    {
-    return prefix + config_name + ".pdb";
-    }
-
-  const char* name = this->GetProperty("COMPILE_PDB_NAME");
-  if(name && *name)
-    {
-    return prefix + name + ".pdb";
-    }
-
-  return "";
-}
-
-//----------------------------------------------------------------------------
-std::string cmTarget::GetCompilePDBPath(const char* config) const
-{
-  std::string dir = this->GetCompilePDBDirectory(config);
-  std::string name = this->GetCompilePDBName(config);
-  if(dir.empty() && !name.empty())
-    {
-    dir = this->GetPDBDirectory(config);
-    }
-  if(!dir.empty())
-    {
-    dir += "/";
-    }
-  return dir + name;
-}
-
-//----------------------------------------------------------------------------
 bool cmTarget::HasSOName(const char* config) const
 {
   // soname is supported only for shared libraries and modules,
@@ -4168,13 +4111,13 @@ bool cmTarget::ComputeOutputDir(const char* config,
 }
 
 //----------------------------------------------------------------------------
-bool cmTarget::ComputePDBOutputDir(const char* kind, const char* config,
-                                   std::string& out) const
+bool cmTarget::ComputePDBOutputDir(const char* config, std::string& out) const
 {
   // Look for a target property defining the target output directory
   // based on the target type.
+  std::string targetTypeName = "PDB";
   const char* propertyName = 0;
-  std::string propertyNameStr = kind;
+  std::string propertyNameStr = targetTypeName;
   if(!propertyNameStr.empty())
     {
     propertyNameStr += "_OUTPUT_DIRECTORY";
@@ -4184,7 +4127,7 @@ bool cmTarget::ComputePDBOutputDir(const char* kind, const char* config,
   // Check for a per-configuration output directory target property.
   std::string configUpper = cmSystemTools::UpperCase(config? config : "");
   const char* configProp = 0;
-  std::string configPropStr = kind;
+  std::string configPropStr = targetTypeName;
   if(!configPropStr.empty())
     {
     configPropStr += "_OUTPUT_DIRECTORY_";
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 319d8d8..271824b 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -340,13 +340,7 @@ public:
       If the configuration name is given then the generator will add its
       subdirectory for that configuration.  Otherwise just the canonical
       pdb output directory is given.  */
-  std::string GetPDBDirectory(const char* config) const;
-
-  /** Get the directory in which to place the target compiler .pdb file.
-      If the configuration name is given then the generator will add its
-      subdirectory for that configuration.  Otherwise just the canonical
-      compiler pdb output directory is given.  */
-  std::string GetCompilePDBDirectory(const char* config = 0) const;
+  std::string GetPDBDirectory(const char* config = 0) const;
 
   /** Get the location of the target in the build tree for the given
       configuration.  This location is suitable for use as the LOCATION
@@ -381,13 +375,7 @@ public:
                              const char* config=0, bool implib = false) const;
 
   /** Get the name of the pdb file for the target.  */
-  std::string GetPDBName(const char* config) const;
-
-  /** Get the name of the compiler pdb file for the target.  */
-  std::string GetCompilePDBName(const char* config=0) const;
-
-  /** Get the path for the MSVC /Fd option for this target.  */
-  std::string GetCompilePDBPath(const char* config=0) const;
+  std::string GetPDBName(const char* config=0) const;
 
   /** Whether this library has soname enabled and platform supports it.  */
   bool HasSOName(const char* config) const;
@@ -722,8 +710,7 @@ private:
   OutputInfo const* GetOutputInfo(const char* config) const;
   bool
   ComputeOutputDir(const char* config, bool implib, std::string& out) const;
-  bool ComputePDBOutputDir(const char* kind, const char* config,
-                           std::string& out) const;
+  bool ComputePDBOutputDir(const char* config, std::string& out) const;
 
   // Cache import information from properties for each configuration.
   struct ImportInfo;
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index b1f0974..ed7e243 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1427,17 +1427,6 @@ void cmVisualStudio10TargetGenerator::WriteClOptions(
   clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, "      ",
                                           "\n", "CXX");
   this->WriteString("<ObjectFileName>$(IntDir)</ObjectFileName>\n", 3);
-
-  // Specify the compiler program database file if configured.
-  std::string pdb = this->Target->GetCompilePDBPath(configName.c_str());
-  if(!pdb.empty())
-    {
-    this->ConvertToWindowsSlash(pdb);
-    this->WriteString("<ProgramDataBaseFileName>", 3);
-    *this->BuildFileStream << cmVS10EscapeXML(pdb)
-                           << "</ProgramDataBaseFileName>\n";
-    }
-
   this->WriteString("</ClCompile>\n", 2);
 }
 
diff --git a/Tests/PDBDirectoryAndName/CMakeLists.txt b/Tests/PDBDirectoryAndName/CMakeLists.txt
index cd9546b..28e46b1 100644
--- a/Tests/PDBDirectoryAndName/CMakeLists.txt
+++ b/Tests/PDBDirectoryAndName/CMakeLists.txt
@@ -17,10 +17,12 @@ list(APPEND my_targets mylibA)
 
 add_library(mylibB STATIC mylibB.c)
 set_target_properties(mylibB PROPERTIES
-    COMPILE_PDB_NAME "mylibB_Special"
-    COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mylibB_PDB"
+    PDB_NAME "mylibB_Special"
+    PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mylibB_PDB"
 )
-list(APPEND my_targets mylibB)
+# TODO: The only .pdb available for a static library is that generated
+# by the compiler /Fd option which is not the same as the linker /pdb.
+# list(APPEND my_targets mylibB)
 
 add_library(mylibC SHARED mylibC.c)
 set_target_properties(mylibC PROPERTIES
@@ -30,9 +32,10 @@ list(APPEND my_targets mylibC)
 
 add_library(mylibD STATIC mylibD.c)
 set_target_properties(mylibD PROPERTIES
-    COMPILE_PDB_NAME "mylibD_Special"
+    PDB_NAME "mylibD_Special"
 )
-list(APPEND my_targets mylibD)
+# TODO: See comment for mylibB.
+# list(APPEND my_targets mylibD)
 
 add_executable(myexe myexe.c)
 set_target_properties(myexe PROPERTIES
@@ -63,12 +66,6 @@ set(pdbs "")
 foreach(t ${my_targets})
   get_property(pdb_name TARGET ${t} PROPERTY PDB_NAME)
   get_property(pdb_dir TARGET ${t} PROPERTY PDB_OUTPUT_DIRECTORY)
-  if(NOT pdb_name)
-    get_property(pdb_name TARGET ${t} PROPERTY COMPILE_PDB_NAME)
-  endif()
-  if(NOT pdb_dir)
-    get_property(pdb_dir TARGET ${t} PROPERTY COMPILE_PDB_OUTPUT_DIRECTORY)
-  endif()
   if(NOT pdb_dir)
     set(pdb_dir ${CMAKE_CURRENT_BINARY_DIR})
   endif()

-----------------------------------------------------------------------

Summary of changes:
 Help/manual/cmake-properties.7.rst                 |    4 --
 Help/manual/cmake-variables.7.rst                  |    2 -
 Help/prop_tgt/COMPILE_PDB_NAME.rst                 |   11 ----
 Help/prop_tgt/COMPILE_PDB_NAME_CONFIG.rst          |   10 ---
 Help/prop_tgt/COMPILE_PDB_NOTE.txt                 |    8 ---
 Help/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY.rst     |   13 ----
 .../COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.rst        |   16 -----
 Help/prop_tgt/PDB_NAME.rst                         |    4 +-
 Help/prop_tgt/PDB_NAME_CONFIG.rst                  |    4 +-
 Help/prop_tgt/PDB_NOTE.txt                         |   10 +--
 Help/prop_tgt/PDB_OUTPUT_DIRECTORY.rst             |    4 +-
 Help/prop_tgt/PDB_OUTPUT_DIRECTORY_CONFIG.rst      |    4 +-
 Help/release/dev/msvc-compiler-pdb-files.rst       |   10 ---
 .../CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY.rst         |    8 ---
 .../CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.rst  |   11 ----
 Modules/Platform/Windows-MSVC.cmake                |    2 +-
 Source/cmLocalGenerator.cxx                        |    7 --
 Source/cmLocalGenerator.h                          |    1 -
 Source/cmLocalVisualStudio7Generator.cxx           |   13 +---
 Source/cmMakefileExecutableTargetGenerator.cxx     |    6 +-
 Source/cmMakefileLibraryTargetGenerator.cxx        |    6 +-
 Source/cmMakefileTargetGenerator.cxx               |   17 -----
 Source/cmNinjaTargetGenerator.cxx                  |   16 -----
 Source/cmTarget.cxx                                |   67 ++------------------
 Source/cmTarget.h                                  |   19 +-----
 Source/cmVisualStudio10TargetGenerator.cxx         |   11 ----
 Tests/PDBDirectoryAndName/CMakeLists.txt           |   19 +++---
 27 files changed, 33 insertions(+), 270 deletions(-)
 delete mode 100644 Help/prop_tgt/COMPILE_PDB_NAME.rst
 delete mode 100644 Help/prop_tgt/COMPILE_PDB_NAME_CONFIG.rst
 delete mode 100644 Help/prop_tgt/COMPILE_PDB_NOTE.txt
 delete mode 100644 Help/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY.rst
 delete mode 100644 Help/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.rst
 delete mode 100644 Help/release/dev/msvc-compiler-pdb-files.rst
 delete mode 100644 Help/variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY.rst
 delete mode 100644 Help/variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list