summaryrefslogtreecommitdiffstats
path: root/Source/cmCPluginAPI.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-07 18:13:35 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-10-07 18:13:35 (GMT)
commit2b7baed719e4a6eb918ed6f22ee6031a40b7f316 (patch)
treef3c6b31bf958fa7e5bb9216e782a865c9dba2471 /Source/cmCPluginAPI.cxx
parent7ba954925a876f4c753a4296236bc7d2f18eb0b8 (diff)
downloadCMake-2b7baed719e4a6eb918ed6f22ee6031a40b7f316.zip
CMake-2b7baed719e4a6eb918ed6f22ee6031a40b7f316.tar.gz
CMake-2b7baed719e4a6eb918ed6f22ee6031a40b7f316.tar.bz2
cmMakefile: Inline method into only caller
cmMakefile should not have API which is only useful for deprecated systems like cmPluginAPI.
Diffstat (limited to 'Source/cmCPluginAPI.cxx')
-rw-r--r--Source/cmCPluginAPI.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 3a08aea..2498ecb 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -162,7 +162,14 @@ void CCONV cmAddLinkDirectoryForTarget(void* arg, const char* tgt,
const char* d)
{
cmMakefile* mf = static_cast<cmMakefile*>(arg);
- mf->AddLinkDirectoryForTarget(tgt, d);
+ cmTarget* t = mf->FindLocalNonAliasTarget(tgt);
+ if (!t) {
+ cmSystemTools::Error(
+ "Attempt to add link directories to non-existent target: ", tgt,
+ " for directory ", d);
+ return;
+ }
+ t->AddLinkDirectory(d);
}
void CCONV cmAddExecutable(void* arg, const char* exename, int numSrcs,