[Cmake-commits] CMake branch, next, updated. v3.0.0-rc6-3553-g54d35d4
Brad King
brad.king at kitware.com
Thu Jun 5 09:08:15 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 54d35d4588f5784b20610b4c175cd3dd40dbf12b (commit)
via 8256ccb78c80bbe50c966ba15b109bfd0f573276 (commit)
from 9484d015efb372894044df4195a8404fa4795bc8 (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=54d35d4588f5784b20610b4c175cd3dd40dbf12b
commit 54d35d4588f5784b20610b4c175cd3dd40dbf12b
Merge: 9484d01 8256ccb
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 5 09:08:12 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jun 5 09:08:12 2014 -0400
Merge topic 'compile-OBJECT_FILE_DIR' into next
8256ccb7 Add OBJECT_FILE_DIR rule placeholder for compilation lines
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8256ccb78c80bbe50c966ba15b109bfd0f573276
commit 8256ccb78c80bbe50c966ba15b109bfd0f573276
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 5 08:57:17 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Jun 5 08:58:29 2014 -0400
Add OBJECT_FILE_DIR rule placeholder for compilation lines
Some compilers do not offer an option to specify the path to the object
file, but rather only to the directory in which to place the object
file. See issue 14876 for some examples. Add a new OBJECT_FILE_DIR
placeholder to specify the directory containing the object file for the
current compilation. This may differ from the main target OBJECT_DIR
when the object corresponds to a source in a subdirectory.
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 543d58d..c8c8c79 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -875,6 +875,13 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
return replaceValues.ObjectDir;
}
}
+ if(replaceValues.ObjectFileDir)
+ {
+ if(variable == "OBJECT_FILE_DIR")
+ {
+ return replaceValues.ObjectFileDir;
+ }
+ }
if(replaceValues.Objects)
{
if(variable == "OBJECTS")
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 32da21b..ad73073 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -269,6 +269,7 @@ public:
const char* Output;
const char* Object;
const char* ObjectDir;
+ const char* ObjectFileDir;
const char* Flags;
const char* ObjectsQuoted;
const char* SONameFlag;
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index a08d731..85017ad 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -684,6 +684,11 @@ cmMakefileTargetGenerator
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::SHELL);
vars.ObjectDir = objectDir.c_str();
+ std::string objectFileDir = cmSystemTools::GetFilenamePath(obj);
+ objectFileDir = this->Convert(objectFileDir,
+ cmLocalGenerator::START_OUTPUT,
+ cmLocalGenerator::SHELL);
+ vars.ObjectFileDir = objectFileDir.c_str();
vars.Flags = flags.c_str();
std::string definesString = "$(";
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index c3b4c75..24689fb 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -385,6 +385,7 @@ cmNinjaTargetGenerator
vars.TargetPDB = "$TARGET_PDB";
vars.TargetCompilePDB = "$TARGET_COMPILE_PDB";
vars.ObjectDir = "$OBJECT_DIR";
+ vars.ObjectFileDir = "$OBJECT_FILE_DIR";
cmMakefile* mf = this->GetMakefile();
@@ -623,6 +624,10 @@ cmNinjaTargetGenerator
vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
ConvertToNinjaPath(objectDir.c_str()),
cmLocalGenerator::SHELL);
+ std::string objectFileDir = cmSystemTools::GetFilenamePath(objectFileName);
+ vars["OBJECT_FILE_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
+ ConvertToNinjaPath(objectFileDir.c_str()),
+ cmLocalGenerator::SHELL);
this->addPoolNinjaVariable("JOB_POOL_COMPILE", this->GetTarget(), vars);
@@ -651,6 +656,7 @@ cmNinjaTargetGenerator
compileObjectVars.Source = escapedSourceFileName.c_str();
compileObjectVars.Object = objectFileName.c_str();
compileObjectVars.ObjectDir = objectDir.c_str();
+ compileObjectVars.ObjectFileDir = objectFileDir.c_str();
compileObjectVars.Flags = vars["FLAGS"].c_str();
compileObjectVars.Defines = vars["DEFINES"].c_str();
-----------------------------------------------------------------------
Summary of changes:
Source/cmLocalGenerator.cxx | 7 +++++++
Source/cmLocalGenerator.h | 1 +
Source/cmMakefileTargetGenerator.cxx | 5 +++++
Source/cmNinjaTargetGenerator.cxx | 6 ++++++
4 files changed, 19 insertions(+)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list