summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-09-14 17:24:59 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-09-14 17:25:07 (GMT)
commit333804fa0e12c3df9ef16fec163451cffda52df4 (patch)
tree2796ca3a9ec227a70762f9bfbf58da7f0861e1a1 /Source/cmMakefile.cxx
parent88e6e35358f0be59d2ceddb77fcb67091110b56c (diff)
parenta1ad0a699be3a2e9e3a18cc07c3bf069dedcfbfc (diff)
downloadCMake-333804fa0e12c3df9ef16fec163451cffda52df4.zip
CMake-333804fa0e12c3df9ef16fec163451cffda52df4.tar.gz
CMake-333804fa0e12c3df9ef16fec163451cffda52df4.tar.bz2
Merge topic 'out-of-dir-linking'
a1ad0a699b target_link_libraries: Allow use with targets in other directories 9bbae5ae28 cmTarget: Future-proof AddLinkLibrary target lookup scope f9cb6f618a cmExportFileGenerator: Use cmGeneratorTarget::ResolveTargetReference 18441a6269 cmGeneratorTarget: Factor target name resolution out of link item resolution 2f708f5d65 Make internal TARGET_PROPERTY generator expressions more robust 94a75801c8 Android.mk: De-duplicate link libraries logic during export 8a63b23d16 cmGlobalGenerator: Remove unused FindLocalGenerator method Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Patrick Stotko <stotko@cs.uni-bonn.de> Merge-request: !2370
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index dce7bd0..fdcf0a8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -11,6 +11,7 @@
#include <iterator>
#include <memory> // IWYU pragma: keep
#include <sstream>
+#include <stdio.h>
#include <stdlib.h>
#include <utility>
@@ -48,6 +49,11 @@
class cmMessenger;
+cmDirectoryId::cmDirectoryId(std::string s)
+ : String(std::move(s))
+{
+}
+
// default is not to be building executables
cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,
cmStateSnapshot const& snapshot)
@@ -111,6 +117,17 @@ cmMakefile::~cmMakefile()
cmDeleteAll(this->EvaluationFiles);
}
+cmDirectoryId cmMakefile::GetDirectoryId() const
+{
+ // Use the instance pointer value to uniquely identify this directory.
+ // If we ever need to expose this to CMake language code we should
+ // add a read-only property in cmMakefile::GetProperty.
+ char buf[32];
+ sprintf(buf, "<%p>",
+ static_cast<void const*>(this)); // cast avoids format warning
+ return std::string(buf);
+}
+
void cmMakefile::IssueMessage(cmake::MessageType t,
std::string const& text) const
{