This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via f8133bf98febcd02690548edfbe476aaabdd0623 (commit) via 4a35bd0e69e5cfaf7ca9604c90b609d1d333bb37 (commit) from 2b5ea38ce9a47e5b7ca234d7fda7570e3e8d0d44 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f8133bf98febcd02690548edfbe476aaabdd0623 commit f8133bf98febcd02690548edfbe476aaabdd0623 Merge: 2b5ea38 4a35bd0 Author: Peter Kuemmel <syntheti...@gmx.net> AuthorDate: Fri Aug 17 13:18:46 2012 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Aug 17 13:18:46 2012 -0400 Merge topic 'cmcldeps-needs-cl' into next 4a35bd0 Ninja: don't crash on returned 0 pointer http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4a35bd0e69e5cfaf7ca9604c90b609d1d333bb37 commit 4a35bd0e69e5cfaf7ca9604c90b609d1d333bb37 Author: Peter Kümmel <syntheti...@gmx.net> AuthorDate: Fri Aug 17 16:01:53 2012 +0200 Commit: Peter Kümmel <syntheti...@gmx.net> CommitDate: Fri Aug 17 16:33:59 2012 +0200 Ninja: don't crash on returned 0 pointer diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 793dfa0..b6bdfdc 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -342,26 +342,26 @@ cmNinjaTargetGenerator cmMakefile* mf = this->GetMakefile(); bool useClDeps = false; + std::string clBinary; std::string clDepsBinary; std::string clShowPrefix; if (lang == "C" || lang == "CXX" || lang == "RC") { - const char* depsPtr = mf->GetDefinition("CMAKE_CMCLDEPS_EXECUTABLE"); - const char* showPtr = mf->GetDefinition("CMAKE_CL_SHOWINCLUDE_PREFIX"); - if (depsPtr && showPtr) + clDepsBinary = mf->GetSafeDefinition("CMAKE_CMCLDEPS_EXECUTABLE"); + if (!clDepsBinary.empty() && + !this->GetGlobalGenerator()->GetCMakeInstance()->GetIsInTryCompile()) { - // don't wrap for try_compile, - // TODO but why doesn't it work with cmcldeps? - const std::string projectName = mf->GetProjectName() ? - mf->GetProjectName() : ""; - if (projectName != "CMAKE_TRY_COMPILE" - && (mf->GetDefinition("CMAKE_C_COMPILER") || - mf->GetDefinition("CMAKE_CXX_COMPILER"))) + clShowPrefix = mf->GetSafeDefinition("CMAKE_CL_SHOWINCLUDE_PREFIX"); + clBinary = mf->GetDefinition("CMAKE_C_COMPILER") ? + mf->GetSafeDefinition("CMAKE_C_COMPILER") : + mf->GetSafeDefinition("CMAKE_CXX_COMPILER"); + if (!clBinary.empty() && !clShowPrefix.empty()) { useClDeps = true; - std::string qu = "\""; - clDepsBinary = qu + depsPtr + qu; - clShowPrefix = qu + showPtr + qu; + const std::string quote = " \""; + clBinary = quote + clBinary + "\" "; + clDepsBinary = quote + clDepsBinary + "\" "; + clShowPrefix = quote + clShowPrefix + "\" "; vars.DependencyFile = "$DEP_FILE"; } } @@ -395,17 +395,14 @@ cmNinjaTargetGenerator i != compileCmds.end(); ++i) this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); - std::string cmdLine = - this->GetLocalGenerator()->BuildCommandLine(compileCmds); - + std::string cmdLine; if(useClDeps) { - std::string cl = mf->GetDefinition("CMAKE_C_COMPILER"); - if (cl.empty()) - cl = mf->GetDefinition("CMAKE_CXX_COMPILER"); - cmdLine = clDepsBinary + " " + lang + " $in \"$DEP_FILE\" $out " - + clShowPrefix + " \"" + cl + "\" " + cmdLine; + cmdLine = clDepsBinary + lang + " $in \"$DEP_FILE\" $out " + + clShowPrefix + clBinary; } + cmdLine += this->GetLocalGenerator()->BuildCommandLine(compileCmds); + // Write the rule for compiling file of the given language. cmOStringStream comment; ----------------------------------------------------------------------- Summary of changes: Source/cmNinjaTargetGenerator.cxx | 39 +++++++++++++++++------------------- 1 files changed, 18 insertions(+), 21 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits