[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6356-g39805d4

Brad King brad.king at kitware.com
Mon Dec 23 09:58:23 EST 2013


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  39805d402c54eb43810d550ee572684c6f6f4acd (commit)
       via  ce3db3dc71d0efdee336f3d1303737f15e329075 (commit)
      from  f01edb3510b258c5827239bd2bb4cc327751c33f (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=39805d402c54eb43810d550ee572684c6f6f4acd
commit 39805d402c54eb43810d550ee572684c6f6f4acd
Merge: f01edb3 ce3db3d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 23 09:58:21 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Dec 23 09:58:21 2013 -0500

    Merge topic 'fix-compile-OBJECT_DIR' into next
    
    ce3db3d Replace <OBJECT_DIR> rule placeholder consistently (#14667)

diff --cc Source/cmNinjaTargetGenerator.cxx
index e3c058f,40fe67d..87a22e8
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@@ -562,13 -540,11 +562,14 @@@ cmNinjaTargetGenerato
    cmNinjaVars vars;
    vars["FLAGS"] = this->ComputeFlagsForObject(source, language);
    vars["DEFINES"] = this->ComputeDefines(source, language);
 -  vars["DEP_FILE"] = objectFileName + ".d";;
 +  if (needsDepFile(language)) {
 +    vars["DEP_FILE"] =
 +            cmGlobalNinjaGenerator::EncodeDepfileSpace(objectFileName + ".d");
 +  }
    EnsureParentDirectoryExists(objectFileName);
  
-   std::string objectDir = cmSystemTools::GetFilenamePath(objectFileName);
+   std::string objectDir =
+     this->LocalGenerator->GetTargetDirectory(*this->Target);
    vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
                           ConvertToNinjaPath(objectDir.c_str()).c_str(),
                           cmLocalGenerator::SHELL);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce3db3dc71d0efdee336f3d1303737f15e329075
commit ce3db3dc71d0efdee336f3d1303737f15e329075
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 23 09:41:45 2013 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Dec 23 09:53:50 2013 -0500

    Replace <OBJECT_DIR> rule placeholder consistently (#14667)
    
    The <OBJECT_DIR> placeholder is supposed to be the base intermediate
    files directory for the current target.  This is how it gets replaced
    during link line generation.  However, during compile line generation
    we replace it with the directory containing the current object file
    which may be a subdirectory.  Fix replacement of <OBJECT_DIR> in the
    generated compile lines to be the base intermediate files directory.
    
    This was expoxed by commit 42ba1b08 (VS: Separate compiler and linker
    PDB files, 2013-04-05) when we added a "/Fd<OBJECT_DIR>/" flag to the
    MSVC compile line in order to match the VS IDE default compiler program
    database location in the intermediate files directory.  For source files
    in a subdirectory relative to the current target this caused the wrong
    location to be used for the compiler program database.  This becomes
    particularly important when using precompiled headers.
    
    While at it, use the local generator GetTargetDirectory method to
    compute the intermediate filres directory for the current target
    instead of repeating the logic in a few places.

diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index e4219a9..91bf3bd 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -338,13 +338,12 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
   vars.CMTarget = this->Target;
   vars.Language = linkLanguage;
   vars.Objects = buildObjs.c_str();
-  std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash();
-  objdir += this->Target->GetName();
-  objdir += ".dir";
-  objdir = this->Convert(objdir.c_str(),
-                         cmLocalGenerator::START_OUTPUT,
-                         cmLocalGenerator::SHELL);
-  vars.ObjectDir = objdir.c_str();
+  std::string objectDir =
+    this->LocalGenerator->GetTargetDirectory(*this->Target);
+  objectDir = this->Convert(objectDir.c_str(),
+                            cmLocalGenerator::START_OUTPUT,
+                            cmLocalGenerator::SHELL);
+  vars.ObjectDir = objectDir.c_str();
   vars.Target = targetOutPathReal.c_str();
   vars.TargetPDB = targetOutPathPDB.c_str();
 
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index ea9663f..f767645 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -577,13 +577,12 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
   vars.CMTarget = this->Target;
   vars.Language = linkLanguage;
   vars.Objects = buildObjs.c_str();
-  std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash();
-  objdir += this->Target->GetName();
-  objdir += ".dir";
-  objdir = this->Convert(objdir.c_str(),
-                         cmLocalGenerator::START_OUTPUT,
-                         cmLocalGenerator::SHELL);
-  vars.ObjectDir = objdir.c_str();
+  std::string objectDir =
+    this->LocalGenerator->GetTargetDirectory(*this->Target);
+  objectDir = this->Convert(objectDir.c_str(),
+                            cmLocalGenerator::START_OUTPUT,
+                            cmLocalGenerator::SHELL);
+  vars.ObjectDir = objectDir.c_str();
   vars.Target = targetOutPathReal.c_str();
   vars.LinkLibraries = linkLibs.c_str();
   vars.ObjectsQuoted = buildObjs.c_str();
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 0829cab..83a0ef6 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -638,7 +638,8 @@ cmMakefileTargetGenerator
                   cmLocalGenerator::NONE,
                   cmLocalGenerator::SHELL).c_str();
   vars.Object = shellObj.c_str();
-  std::string objectDir = cmSystemTools::GetFilenamePath(obj);
+  std::string objectDir =
+    this->LocalGenerator->GetTargetDirectory(*this->Target);
   objectDir = this->Convert(objectDir.c_str(),
                             cmLocalGenerator::START_OUTPUT,
                             cmLocalGenerator::SHELL);
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 898aa0e..40fe67d 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -543,7 +543,8 @@ cmNinjaTargetGenerator
   vars["DEP_FILE"] = objectFileName + ".d";;
   EnsureParentDirectoryExists(objectFileName);
 
-  std::string objectDir = cmSystemTools::GetFilenamePath(objectFileName);
+  std::string objectDir =
+    this->LocalGenerator->GetTargetDirectory(*this->Target);
   vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
                          ConvertToNinjaPath(objectDir.c_str()).c_str(),
                          cmLocalGenerator::SHELL);

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

Summary of changes:
 Source/cmMakefileExecutableTargetGenerator.cxx |   13 ++++++-------
 Source/cmMakefileLibraryTargetGenerator.cxx    |   13 ++++++-------
 Source/cmMakefileTargetGenerator.cxx           |    3 ++-
 Source/cmNinjaTargetGenerator.cxx              |    3 ++-
 4 files changed, 16 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list