summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2018-12-12 15:29:50 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2018-12-12 15:29:50 (GMT)
commitc150bf087c9ba3425d91bb1103589a928fc87098 (patch)
tree73c5441b7e420aae66fccd75829e27bbda547b42
parent6a6900f61666977948bffa1409d4633799de323c (diff)
downloadCMake-c150bf087c9ba3425d91bb1103589a928fc87098.zip
CMake-c150bf087c9ba3425d91bb1103589a928fc87098.tar.gz
CMake-c150bf087c9ba3425d91bb1103589a928fc87098.tar.bz2
Server mode: Fix regression of hasInstallRule
The introduction of policy CMP0082, to run subdirectory install rules in the correct order, caused a regression in server mode where any directory with a subdirectory is marked as having an install rule even if no "real" install rules are present. This change fixes this regression for server mode.
-rw-r--r--Source/cmJsonObjects.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmJsonObjects.cxx b/Source/cmJsonObjects.cxx
index bc50f9f..0da6f4f 100644
--- a/Source/cmJsonObjects.cxx
+++ b/Source/cmJsonObjects.cxx
@@ -6,6 +6,7 @@
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmInstallGenerator.h"
+#include "cmInstallSubdirectoryGenerator.h"
#include "cmInstallTargetGenerator.h"
#include "cmJsonObjectDictionary.h"
#include "cmJsonObjects.h"
@@ -640,8 +641,13 @@ static Json::Value DumpProjectList(const cmake* cm, std::string const& config)
// associated generators.
bool hasInstallRule = false;
for (const auto generator : projectIt.second) {
- hasInstallRule =
- generator->GetMakefile()->GetInstallGenerators().empty() == false;
+ for (const auto installGen :
+ generator->GetMakefile()->GetInstallGenerators()) {
+ if (!dynamic_cast<cmInstallSubdirectoryGenerator*>(installGen)) {
+ hasInstallRule = true;
+ break;
+ }
+ }
if (hasInstallRule) {
break;