summaryrefslogtreecommitdiffstats
path: root/Source/cmIncludeDirectoryCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-08-23 14:21:31 (GMT)
committerKen Martin <ken.martin@kitware.com>2006-08-23 14:21:31 (GMT)
commit94e908ff2d62b199d8eec0448abb94b6f2eaeb36 (patch)
treea78e75c87c97d5980a142632997111f479e479b5 /Source/cmIncludeDirectoryCommand.cxx
parent2994f3a158231bfd740ba45431671b20d8692e6a (diff)
downloadCMake-94e908ff2d62b199d8eec0448abb94b6f2eaeb36.zip
CMake-94e908ff2d62b199d8eec0448abb94b6f2eaeb36.tar.gz
CMake-94e908ff2d62b199d8eec0448abb94b6f2eaeb36.tar.bz2
ENH: fix bad error reporting with not found paths
Diffstat (limited to 'Source/cmIncludeDirectoryCommand.cxx')
-rw-r--r--Source/cmIncludeDirectoryCommand.cxx23
1 files changed, 9 insertions, 14 deletions
diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx
index 39492a6..193b3cc 100644
--- a/Source/cmIncludeDirectoryCommand.cxx
+++ b/Source/cmIncludeDirectoryCommand.cxx
@@ -48,22 +48,17 @@ bool cmIncludeDirectoryCommand
("Empty Include Directory Passed into INCLUDE_DIRECTORIES command.");
}
std::string unixPath = *i;
- cmSystemTools::ConvertToUnixSlashes(unixPath);
- if(!cmSystemTools::FileIsFullPath(unixPath.c_str()))
+ if (!cmSystemTools::IsOff(unixPath.c_str()))
{
- std::string tmp = this->Makefile->GetStartDirectory();
- tmp += "/";
- tmp += unixPath;
- unixPath = tmp;
+ cmSystemTools::ConvertToUnixSlashes(unixPath);
+ if(!cmSystemTools::FileIsFullPath(unixPath.c_str()))
+ {
+ std::string tmp = this->Makefile->GetStartDirectory();
+ tmp += "/";
+ tmp += unixPath;
+ unixPath = tmp;
+ }
}
- /*
- if ( !cmSystemTools::FileExists(unixPath.c_str()) )
- {
- std::string out = "Cannot find directory: " + unixPath;
- this->SetError(out.c_str());
- return false;
- }
- */
this->Makefile->AddIncludeDirectory(unixPath.c_str(), before);
}
return true;