[Cmake-commits] CMake branch, next, updated. v3.0.0-4549-g32adeae

Nils Gladitz nilsgladitz at gmail.com
Mon Jul 28 11:50:13 EDT 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  32adeae6c4c1edae5087c0a7ddb833f65aa79de8 (commit)
       via  c161023ca9fcddbb5ab09d7fc732ecc0c5fdba94 (commit)
      from  df5e2d8d9bd26508d1d3e4fa974928ff16aaf42d (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=32adeae6c4c1edae5087c0a7ddb833f65aa79de8
commit 32adeae6c4c1edae5087c0a7ddb833f65aa79de8
Merge: df5e2d8 c161023
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Mon Jul 28 11:50:13 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 28 11:50:13 2014 -0400

    Merge topic 'pdb-genex' into next
    
    c161023c Genex: Implement generator expressions for target PDB files.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c161023ca9fcddbb5ab09d7fc732ecc0c5fdba94
commit c161023ca9fcddbb5ab09d7fc732ecc0c5fdba94
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Thu Jul 24 22:18:21 2014 +0200
Commit:     Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Mon Jul 28 17:49:54 2014 +0200

    Genex: Implement generator expressions for target PDB files.

diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index bc24798..77259a0 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -148,6 +148,17 @@ than 4.2.0.
   Name of file with soname (.so.3).
 ``$<TARGET_SONAME_FILE_DIR:tgt>``
   Directory of with soname (.so.3).
+``$<TARGET_PDB_FILE:tgt>``
+  Full path to the linker generated program database file (.pdb)
+  where ``tgt`` is the name of a target.
+
+  See also the :prop_tgt:`PDB_NAME` and :prop_tgt:`PDB_OUTPUT_DIRECTORY`
+  target properties and their configuration specific variants
+  :prop_tgt:`PDB_NAME_<CONFIG>` and :prop_tgt:`PDB_OUTPUT_DIRECTORY_<CONFIG>`.
+``$<TARGET_PDB_FILE_NAME:tgt>``
+  Name of the linker generated program database file (.pdb).
+``$<TARGET_PDB_FILE_DIR:tgt>``
+  Directory of the linker generated program database file (.pdb).
 ``$<TARGET_PROPERTY:tgt,prop>``
   Value of the property ``prop`` on the target ``tgt``.
 
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 6f940a6..35df9cd 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -1512,6 +1512,7 @@ static const struct InstallPrefixNode : public cmGeneratorExpressionNode
 class ArtifactNameTag;
 class ArtifactLinkerTag;
 class ArtifactSonameTag;
+class ArtifactPdbTag;
 
 class ArtifactPathTag;
 class ArtifactDirTag;
@@ -1558,6 +1559,41 @@ struct TargetFilesystemArtifactResultCreator<ArtifactSonameTag>
 
 //----------------------------------------------------------------------------
 template<>
+struct TargetFilesystemArtifactResultCreator<ArtifactPdbTag>
+{
+  static std::string Create(cmTarget* target,
+                            cmGeneratorExpressionContext *context,
+                            const GeneratorExpressionContent *content)
+  {
+    if(!target->IsDLLPlatform())
+      {
+      ::reportError(context, content->GetOriginalExpression(),
+                    "TARGET_PDB_FILE is only allowed "
+                    "for DLL target platforms.");
+      return std::string();
+      }
+
+    cmTarget::TargetType targetType = target->GetType();
+
+    if(targetType != cmTarget::SHARED_LIBRARY &&
+       targetType != cmTarget::MODULE_LIBRARY &&
+       targetType != cmTarget::EXECUTABLE)
+      {
+      ::reportError(context, content->GetOriginalExpression(),
+                    "TARGET_PDB_FILE is allowed only for "
+                    "targets with linker created artifacts.");
+      return std::string();
+      }
+
+    std::string result = target->GetPDBDirectory(context->Config);
+    result += "/";
+    result += target->GetPDBName(context->Config);
+    return result;
+  }
+};
+
+//----------------------------------------------------------------------------
+template<>
 struct TargetFilesystemArtifactResultCreator<ArtifactLinkerTag>
 {
   static std::string Create(cmTarget* target,
@@ -1706,6 +1742,9 @@ TargetFilesystemArtifactNodeGroup<ArtifactLinkerTag> targetLinkerNodeGroup;
 static const
 TargetFilesystemArtifactNodeGroup<ArtifactSonameTag> targetSoNameNodeGroup;
 
+static const
+TargetFilesystemArtifactNodeGroup<ArtifactPdbTag> targetPdbNodeGroup;
+
 //----------------------------------------------------------------------------
 static const
 cmGeneratorExpressionNode* GetNode(const std::string &identifier)
@@ -1733,12 +1772,15 @@ cmGeneratorExpressionNode* GetNode(const std::string &identifier)
     nodeMap["TARGET_FILE"] = &targetNodeGroup.File;
     nodeMap["TARGET_LINKER_FILE"] = &targetLinkerNodeGroup.File;
     nodeMap["TARGET_SONAME_FILE"] = &targetSoNameNodeGroup.File;
+    nodeMap["TARGET_PDB_FILE"] = &targetPdbNodeGroup.File;
     nodeMap["TARGET_FILE_NAME"] = &targetNodeGroup.FileName;
     nodeMap["TARGET_LINKER_FILE_NAME"] = &targetLinkerNodeGroup.FileName;
     nodeMap["TARGET_SONAME_FILE_NAME"] = &targetSoNameNodeGroup.FileName;
+    nodeMap["TARGET_PDB_FILE_NAME"] = &targetPdbNodeGroup.FileName;
     nodeMap["TARGET_FILE_DIR"] = &targetNodeGroup.FileDir;
     nodeMap["TARGET_LINKER_FILE_DIR"] = &targetLinkerNodeGroup.FileDir;
     nodeMap["TARGET_SONAME_FILE_DIR"] = &targetSoNameNodeGroup.FileDir;
+    nodeMap["TARGET_PDB_FILE_DIR"] = &targetPdbNodeGroup.FileDir;
     nodeMap["STREQUAL"] = &strEqualNode;
     nodeMap["EQUAL"] = &equalNode;
     nodeMap["LOWER_CASE"] = &lowerCaseNode;

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list