From d9c600c504408c79393b9f5b4e334cecca30e67a Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 16 Sep 2016 09:25:41 -0400 Subject: [PATCH 1/2] cmGlobalGenerator: Fix use of uninitialized value in --find-package mode --- Source/cmGlobalGenerator.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index e85d80e1cf..3d2b60ec92 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -94,6 +94,7 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm) this->TryCompileOuterMakefile = CM_NULLPTR; this->ConfigureDoneCMP0026AndCMP0024 = false; + this->FirstTimeProgress = 0.0f; cm->GetState()->SetMinGWMake(false); cm->GetState()->SetMSYSShell(false); From a098ca0d7ac25455a9a1304ecedb8fd8790c6ca7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 16 Sep 2016 09:49:25 -0400 Subject: [PATCH 2/2] cmake: Fix --find-package mode link line output Refactoring in commit v2.8.10~58^2~2 (Ninja: move -LIBPATH behind -link option, 2012-09-26) added arguments to cmLocalGenerator::GetTargetFlags and updated the call sites. However, in the cmake::FindPackage and cmLocalGenerator::AddBuildTargetRule call sites it added the new arguments in the wrong order. The latter was never used and has been removed. The former remains buggy and prints out compiler flags instead of the link framework/library search paths. Fix its argument order. --- Source/cmake.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 18a78941de..112a5f784c 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -595,8 +595,8 @@ bool cmake::FindPackage(const std::vector& args) gg->CreateGenerationObjects(); cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName()); cmLocalGenerator* lg = gtgt->GetLocalGenerator(); - lg->GetTargetFlags(buildType, linkLibs, frameworkPath, linkPath, flags, - linkFlags, gtgt, false); + lg->GetTargetFlags(buildType, linkLibs, flags, linkFlags, frameworkPath, + linkPath, gtgt, false); linkLibs = frameworkPath + linkPath + linkLibs; printf("%s\n", linkLibs.c_str());