diff options
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 52a2732..66c22b1 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2842,6 +2842,20 @@ static void processIncludeDirectories(cmTarget *tgt, return; } + if (!cmSystemTools::FileIsFullPath(li->c_str())) + { + if (!(*it)->TargetName.empty()) + { + cmOStringStream e; + e << "Target \"" << (*it)->TargetName << "\" contains relative " + "path in its INTERFACE_INCLUDE_DIRECTORIES:\n" + " \"" << *li << "\" "; + tgt->GetMakefile()->IssueMessage(cmake::FATAL_ERROR, + e.str().c_str()); + return; + } + } + if (testIsOff && !cmSystemTools::IsOff(li->c_str())) { cmSystemTools::ConvertToUnixSlashes(*li); |