summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2014-02-02 04:18:04 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2014-02-03 14:04:54 (GMT)
commit028a5285d8ff5053fc96ea9840cb341bdf636e24 (patch)
treebdf44e70945eb207b0f61f38ace628029fed8f5b /Source/cmGlobalVisualStudioGenerator.cxx
parent6385c7151631a4ac72490540fe75cb0b9ebbedf5 (diff)
downloadCMake-028a5285d8ff5053fc96ea9840cb341bdf636e24.zip
CMake-028a5285d8ff5053fc96ea9840cb341bdf636e24.tar.gz
CMake-028a5285d8ff5053fc96ea9840cb341bdf636e24.tar.bz2
OS X: Make sure RPATHs are unique to avoid possible corruption.
When using link_directories() and including CMAKE_CFG_INTDIR, one can end up with duplicate RPATHs in the binary which install_name_tool cannot fix without corrupting the binary. Also, the cmake_install.cmake file has been fixed to correctly handle these generator specific variables.
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 42492e6..0c5f35b 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -902,3 +902,20 @@ cmGlobalVisualStudioGenerator::OrderedTargetDependSet
this->insert(*ti);
}
}
+
+std::string cmGlobalVisualStudioGenerator::ExpandCFGIntDir(
+ const std::string& str,
+ const std::string& config) const
+{
+ std::string replace = GetCMakeCFGIntDir();
+
+ std::string tmp = str;
+ for(std::string::size_type i = tmp.find(replace);
+ i != std::string::npos;
+ i = tmp.find(replace, i))
+ {
+ tmp.replace(i, replace.size(), config);
+ i += config.size();
+ }
+ return tmp;
+}