diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2017-01-06 14:18:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-01-09 21:40:46 (GMT) |
commit | c0bd1eb6d0da40d429120e925aa755a1f5a754e8 (patch) | |
tree | 0e9e974140709dd21d8d923a142146bc8197f009 /Source/cmServerProtocol.cxx | |
parent | eee51e24d2290771ad3dded566ef897243f21331 (diff) | |
download | CMake-c0bd1eb6d0da40d429120e925aa755a1f5a754e8.zip CMake-c0bd1eb6d0da40d429120e925aa755a1f5a754e8.tar.gz CMake-c0bd1eb6d0da40d429120e925aa755a1f5a754e8.tar.bz2 |
server-mode: Do not crash when running into INTERFACE_LIBRARY
Closes: #16539
Diffstat (limited to 'Source/cmServerProtocol.cxx')
-rw-r--r-- | Source/cmServerProtocol.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a86236c..334a05a 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -731,12 +731,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 == cmStateEnums::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)); |