diff options
author | Brad King <brad.king@kitware.com> | 2013-03-28 14:42:42 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-03-28 14:42:42 (GMT) |
commit | 2afcbe3090d73a7d5c81a726cb9be0efaedb858c (patch) | |
tree | d7a04f74cbc389032ded03deef872d945731e7f8 /Source/cmTarget.cxx | |
parent | 1c7833e7ae39f5145ab753492659bb73db5514f6 (diff) | |
parent | 634bb33f3aa3b7f2181a896c025976b52171524a (diff) | |
download | CMake-2afcbe3090d73a7d5c81a726cb9be0efaedb858c.zip CMake-2afcbe3090d73a7d5c81a726cb9be0efaedb858c.tar.gz CMake-2afcbe3090d73a7d5c81a726cb9be0efaedb858c.tar.bz2 |
Merge topic 'error-on-exported-missing-include-dir'
634bb33 Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIES
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); |