[Cmake-commits] CMake branch, next, updated. v2.8.8-3265-g5a7ae88

Brad King brad.king at kitware.com
Wed Jun 20 09:10:12 EDT 2012


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  5a7ae88566f14ea2253c4bcfec57044f45404392 (commit)
       via  2c2fbaf0e5902d62a4321cdac125778a2170ec5d (commit)
      from  ebb3c952db187bfcc061abb7efe5d55fb0fe14ec (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=5a7ae88566f14ea2253c4bcfec57044f45404392
commit 5a7ae88566f14ea2253c4bcfec57044f45404392
Merge: ebb3c95 2c2fbaf
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jun 20 09:10:08 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jun 20 09:10:08 2012 -0400

    Merge topic 'no-source-language-crash' into next
    
    2c2fbaf Do not crash on unknown source language (#13323)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c2fbaf0e5902d62a4321cdac125778a2170ec5d
commit 2c2fbaf0e5902d62a4321cdac125778a2170ec5d
Author:     Mariusz Plucinski <plucinski.mariusz at gmail.com>
AuthorDate: Wed Jun 20 08:02:00 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jun 20 08:59:54 2012 -0400

    Do not crash on unknown source language (#13323)
    
    If a source file extension is not recognized as any language then
    src.GetLanguage() may return NULL.  Check the result before
    dereferencing in cmLocalGenerator::GetObjectFileNameWithoutTarget.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 13ede5d..32cfa68 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2764,10 +2764,13 @@ cmLocalGenerator
     bool replaceExt = this->NeedBackwardsCompatibility(2, 4);
     if(!replaceExt)
       {
-      std::string repVar = "CMAKE_";
-      repVar += source.GetLanguage();
-      repVar += "_OUTPUT_EXTENSION_REPLACE";
-      replaceExt = this->Makefile->IsOn(repVar.c_str());
+      if(const char* lang = source.GetLanguage())
+        {
+        std::string repVar = "CMAKE_";
+        repVar += lang;
+        repVar += "_OUTPUT_EXTENSION_REPLACE";
+        replaceExt = this->Makefile->IsOn(repVar.c_str());
+        }
       }
 
     // Remove the source extension if it is to be replaced.

-----------------------------------------------------------------------

Summary of changes:
 Source/cmLocalGenerator.cxx |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list