summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index d52dfaf..f80b4d9 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -2170,6 +2170,21 @@ bool cmGeneratorTarget::IsImportedSharedLibWithoutSOName(
bool cmGeneratorTarget::HasMacOSXRpathInstallNameDir(
const std::string& config) const
{
+ TargetPtrToBoolMap& cache = this->MacOSXRpathInstallNameDirCache[config];
+ const auto lookup = cache.find(this->Target);
+
+ if (lookup != cache.cend()) {
+ return lookup->second;
+ }
+
+ const bool result = this->DetermineHasMacOSXRpathInstallNameDir(config);
+ cache[this->Target] = result;
+ return result;
+}
+
+bool cmGeneratorTarget::DetermineHasMacOSXRpathInstallNameDir(
+ const std::string& config) const
+{
bool install_name_is_rpath = false;
bool macosx_rpath = false;