summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-05 12:57:17 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-05 12:58:29 (GMT)
commit8256ccb78c80bbe50c966ba15b109bfd0f573276 (patch)
tree16f9c25c9ffe60dfdb7d7c246f5b6fa7a224ba68 /Source/cmLocalGenerator.cxx
parent8ab2d7d462a0f812b4ce1c555c6a7cbcea7abfef (diff)
downloadCMake-8256ccb78c80bbe50c966ba15b109bfd0f573276.zip
CMake-8256ccb78c80bbe50c966ba15b109bfd0f573276.tar.gz
CMake-8256ccb78c80bbe50c966ba15b109bfd0f573276.tar.bz2
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.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx7
1 files changed, 7 insertions, 0 deletions
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")