[Cmake-commits] CMake branch, next, updated. v3.0.0-3850-g44208e0

Brad King brad.king at kitware.com
Mon Jun 23 09:46:12 EDT 2014


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  44208e0bb0b4ddc6caefa4978b4c44aa90932e3d (commit)
       via  c491cb1eb4030d70e7a04bcda5021ebd0e5ca88d (commit)
       via  562d5f576ab31771d2e02258eaad8afdf4d12f00 (commit)
      from  236ce96e840c23b67609824342a7767225163c05 (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=44208e0bb0b4ddc6caefa4978b4c44aa90932e3d
commit 44208e0bb0b4ddc6caefa4978b4c44aa90932e3d
Merge: 236ce96 c491cb1
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 23 09:46:11 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jun 23 09:46:11 2014 -0400

    Merge topic 'stringapi-crash-cleanup' into next
    
    c491cb1e Fix some generator crashes on undefined CMAKE_BUILD_TYPE
    562d5f57 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c491cb1eb4030d70e7a04bcda5021ebd0e5ca88d
commit c491cb1eb4030d70e7a04bcda5021ebd0e5ca88d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 23 09:34:38 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jun 23 09:43:46 2014 -0400

    Fix some generator crashes on undefined CMAKE_BUILD_TYPE
    
    Since commit 84fdc9921 (stringapi: Pass configuration names as strings,
    2014-02-09), it is not safe to use GetDefinition("CMAKE_BUILD_TYPE")
    without checking the return value.  Use GetSafeDefinition instead so
    that a missing definition is treated as an empty string like code paths
    did prior to the above commit.
    
    Reported-by: Richard Wirth <richard at califax.de>

diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 6f76dc4..56a6edb 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -574,7 +574,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
         }
       }
 
-    const char* buildType = makefile->GetDefinition("CMAKE_BUILD_TYPE");
+    std::string buildType = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
     std::string location;
     if ( target->GetType()==cmTarget::OBJECT_LIBRARY)
       {
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index e23551e..1beb3fd 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -968,7 +968,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
         continue;
         }
       std::vector<std::string> includeDirs;
-      const char *config = mf->GetDefinition("CMAKE_BUILD_TYPE");
+      std::string config = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
       (*it)->GetIncludeDirectories(includeDirs, l->second, "C", config);
       this->AppendIncludeDirectories(fout, includeDirs, emmited);
       }
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 8ae1157..abfc3ed 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1861,7 +1861,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
                              ((useWatcomQuote) ? WATCOMQUOTE : SHELL);
   bool escapeAllowMakeVars = !forResponseFile;
   cmOStringStream fout;
-  const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
+  std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
   cmComputeLinkInformation* pcli = tgt.Target->GetLinkInformation(config);
   if(!pcli)
     {

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

Summary of changes:
 Source/CMakeVersion.cmake              |    2 +-
 Source/cmExtraCodeBlocksGenerator.cxx  |    2 +-
 Source/cmExtraEclipseCDT4Generator.cxx |    2 +-
 Source/cmLocalGenerator.cxx            |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list