summaryrefslogtreecommitdiffstats
path: root/Source/cmFindCommon.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-10-29 21:21:20 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-10-31 13:52:11 (GMT)
commitc4373b33b2ad7c6db3b000b0615ed381f05ac5f3 (patch)
tree544c5d58dd31df7f06e85f6d060b87146bfbf5a5 /Source/cmFindCommon.cxx
parentcfb666133378d723a046ab7a4463a590deaa7aee (diff)
downloadCMake-c4373b33b2ad7c6db3b000b0615ed381f05ac5f3.zip
CMake-c4373b33b2ad7c6db3b000b0615ed381f05ac5f3.tar.gz
CMake-c4373b33b2ad7c6db3b000b0615ed381f05ac5f3.tar.bz2
cmTarget: Make GetProperty() const.
This has follow-on effects for other methods and classes. Further work on making the use of const cmTarget pointers common can be done, particularly with a view to generate-time methods.
Diffstat (limited to 'Source/cmFindCommon.cxx')
-rw-r--r--Source/cmFindCommon.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index 7beeda0..97a20ce 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -140,14 +140,25 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths)
}
const char* rootPath =
this->Makefile->GetDefinition("CMAKE_FIND_ROOT_PATH");
- if((rootPath == 0) || (strlen(rootPath) == 0))
+ const char* osxRootPath =
+ this->Makefile->GetDefinition("_CMAKE_OSX_SYSROOT_PATH");
+ const bool noRootPath = !rootPath || !*rootPath;
+ const bool noOSXRootPath = !osxRootPath || !*osxRootPath;
+ if(noRootPath && noOSXRootPath)
{
return;
}
// Construct the list of path roots with no trailing slashes.
std::vector<std::string> roots;
- cmSystemTools::ExpandListArgument(rootPath, roots);
+ if(rootPath)
+ {
+ cmSystemTools::ExpandListArgument(rootPath, roots);
+ }
+ if(osxRootPath)
+ {
+ roots.push_back(osxRootPath);
+ }
for(std::vector<std::string>::iterator ri = roots.begin();
ri != roots.end(); ++ri)
{