summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2017-01-06 14:18:52 (GMT)
committerBrad King <brad.king@kitware.com>2017-01-09 21:31:11 (GMT)
commit33e628ee809cd1d7ec2a8a0290ac0351fa4d499b (patch)
tree0712361c7940d0c649b856bc7b3277df3725aecb
parent12bea47fa4d47b8e887ddbaf4c4fcc312d3052dc (diff)
downloadCMake-33e628ee809cd1d7ec2a8a0290ac0351fa4d499b.zip
CMake-33e628ee809cd1d7ec2a8a0290ac0351fa4d499b.tar.gz
CMake-33e628ee809cd1d7ec2a8a0290ac0351fa4d499b.tar.bz2
server-mode: Do not crash when running into INTERFACE_LIBRARY
Closes: #16539
-rw-r--r--Source/cmServerProtocol.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index e159c8f..c3bffd6 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -720,12 +720,16 @@ static Json::Value DumpTarget(cmGeneratorTarget* target,
Json::Value result = Json::objectValue;
result[kNAME_KEY] = target->GetName();
-
result[kTYPE_KEY] = typeName;
- result[kFULL_NAME_KEY] = target->GetFullName(config);
result[kSOURCE_DIRECTORY_KEY] = lg->GetCurrentSourceDirectory();
result[kBUILD_DIRECTORY_KEY] = lg->GetCurrentBinaryDirectory();
+ if (type == cmState::INTERFACE_LIBRARY) {
+ return result;
+ }
+
+ result[kFULL_NAME_KEY] = target->GetFullName(config);
+
if (target->HaveWellDefinedOutputFiles()) {
Json::Value artifacts = Json::arrayValue;
artifacts.append(target->GetFullPath(config, false));