summaryrefslogtreecommitdiffstats
path: root/Source/cmFindCommon.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-12 13:44:38 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-07-12 13:44:38 (GMT)
commit0416c94f6415101e93e9dc3f83d666926ee2da16 (patch)
tree3bf49a6bd00fb0868f90c9c5ee520e0648102f49 /Source/cmFindCommon.cxx
parent4dc515f8e16f0a924fb7f941c1cfe704dea9e785 (diff)
downloadCMake-0416c94f6415101e93e9dc3f83d666926ee2da16.zip
CMake-0416c94f6415101e93e9dc3f83d666926ee2da16.tar.gz
CMake-0416c94f6415101e93e9dc3f83d666926ee2da16.tar.bz2
Revert "Use --sysroot when cross compiling."
This reverts commit de4da665d3205afa239749c41513a315c3831f51. This feature is not yet ready for release. It needs to be merged with the CMAKE_OSX_SYSROOT feature.
Diffstat (limited to 'Source/cmFindCommon.cxx')
-rw-r--r--Source/cmFindCommon.cxx24
1 files changed, 4 insertions, 20 deletions
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index 5daa47d..b44864e 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -62,15 +62,10 @@ void cmFindCommon::GenerateDocumentation()
"The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more "
"directories to be prepended to all other search directories. "
"This effectively \"re-roots\" the entire search under given locations. "
- "By default it is empty. "
- "The variable CMAKE_SYSROOT can also be used to specify exactly one "
- "directory to use as a prefix. Setting CMAKE_SYSROOT also has other "
- "effects. See the documentation for that variable for more. "
- "These are especially useful when "
+ "By default it is empty. It is especially useful when "
"cross-compiling to point to the root directory of the "
"target environment and CMake will search there too. By default at first "
- "the CMAKE_SYSROOT directory is searched, then the directories listed in "
- "CMAKE_FIND_ROOT_PATH and then the non-rooted "
+ "the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted "
"directories will be searched. "
"The default behavior can be adjusted by setting "
"CMAKE_FIND_ROOT_PATH_MODE_XXX. This behavior can be manually "
@@ -192,27 +187,16 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths)
{
return;
}
- const char* sysroot =
- this->Makefile->GetDefinition("CMAKE_SYSROOT");
const char* rootPath =
this->Makefile->GetDefinition("CMAKE_FIND_ROOT_PATH");
- const bool noSysroot = !sysroot || !*sysroot;
- const bool noRootPath = !rootPath || !*rootPath;
- if(noSysroot && noRootPath)
+ if((rootPath == 0) || (strlen(rootPath) == 0))
{
return;
}
// Construct the list of path roots with no trailing slashes.
std::vector<std::string> roots;
- if (sysroot)
- {
- roots.push_back(sysroot);
- }
- if (rootPath)
- {
- cmSystemTools::ExpandListArgument(rootPath, roots);
- }
+ cmSystemTools::ExpandListArgument(rootPath, roots);
for(std::vector<std::string>::iterator ri = roots.begin();
ri != roots.end(); ++ri)
{