You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/debian/patches/relative_path_fixes2.diff

39 lines
1.1 KiB

Improved error handling for cmLocalGenerator::Convert().
Small inconsistency fix for the previous relative_path_fixes.diff patch.
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2124,25 +2124,17 @@
bool optional)
{
const char* remotePath = this->GetRelativeRootPath(remote);
+
+ // The relative root must have a path (i.e. not FULL or NONE)
+ assert(remotePath != 0);
+
if(local && (!optional || this->UseRelativePaths))
{
std::vector<std::string> components;
std::string result;
- switch(remote)
- {
- case HOME:
- case HOME_OUTPUT:
- case START:
- case START_OUTPUT:
- cmSystemTools::SplitPath(local, components);
- result = this->ConvertToRelativePath(components, remotePath);
- break;
- case FULL:
- result = remotePath;
- break;
- case NONE:
- break;
- }
+
+ cmSystemTools::SplitPath(local, components);
+ result = this->ConvertToRelativePath(components, remotePath);
return this->ConvertToOutputFormat(result.c_str(), output);
}
else