From 555bda4e436435c37690aa5f31f4d254793d5b4e Mon Sep 17 00:00:00 2001 From: David Cole Date: Thu, 14 Jun 2012 13:39:39 -0400 Subject: [PATCH] Ninja: Restructure code to work with the Borland compilers Should fix the Borland dashboard errors. --- Source/cmNinjaNormalTargetGenerator.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 22f77f031c..2dcfcb353a 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -391,12 +391,18 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() // Compute architecture specific link flags. Yes, these go into a different // variable for executables, probably due to a mistake made when duplicating // code between the Makefile executable and library generators. - locGtor->AddArchitectureFlags(targetType == cmTarget::EXECUTABLE + std::string flags = (targetType == cmTarget::EXECUTABLE ? vars["FLAGS"] - : vars["ARCH_FLAGS"], + : vars["ARCH_FLAGS"]); + locGtor->AddArchitectureFlags(flags, this->GetTarget(), this->TargetLinkLanguage, this->GetConfigName()); + if (targetType == cmTarget::EXECUTABLE) { + vars["FLAGS"] = flags; + } else { + vars["ARCH_FLAGS"] = flags; + } if (this->GetTarget()->HasSOName(this->GetConfigName())) { vars["SONAME_FLAG"] = this->GetMakefile()->GetSONameFlag(this->TargetLinkLanguage);