[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5516-g534ca7e

Stephen Kelly steveire at gmail.com
Wed Nov 20 11:09:39 EST 2013


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  534ca7e23e05b341d5695546bf0f11a89e4440e1 (commit)
       via  e0253f7016ec0ccd94be952ec812a18a616dec0e (commit)
       via  26ed7d047620dc9b6acadf3e5ac82fe123aa86a3 (commit)
      from  dadc524debfc785f4ebc96ac9bee338fcaf6bbda (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=534ca7e23e05b341d5695546bf0f11a89e4440e1
commit 534ca7e23e05b341d5695546bf0f11a89e4440e1
Merge: dadc524 e0253f7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Nov 20 11:09:34 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Nov 20 11:09:34 2013 -0500

    Merge topic 'add-cmLiteralNCompare' into next
    
    e0253f7 Rename interface.
    26ed7d0 Use macro literal compare on Borland.

diff --cc Source/cmTarget.cxx
index 083a784,4fa0e75..2ef1790
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@@ -2418,10 -2276,10 +2418,10 @@@ static void cmTargetCheckINTERFACE_LINK
  }
  
  //----------------------------------------------------------------------------
 -void cmTarget::CheckProperty(const char* prop, cmMakefile* context)
 +void cmTarget::CheckProperty(const char* prop, cmMakefile* context) const
  {
    // Certain properties need checking.
-   if(cmLiteralNCompare(prop, "LINK_INTERFACE_LIBRARIES") == 0)
+   if(cmHasLiteralPrefix(prop, "LINK_INTERFACE_LIBRARIES") == 0)
      {
      if(const char* value = this->GetProperty(prop))
        {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0253f7016ec0ccd94be952ec812a18a616dec0e
commit e0253f7016ec0ccd94be952ec812a18a616dec0e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Nov 20 17:07:11 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Nov 20 17:08:54 2013 +0100

    Rename interface.

diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 85d7c2b..f0c8f06 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -763,7 +763,7 @@ void cmCTestBuildHandler::GenerateXMLLaunchedFragment(std::ostream& os,
 bool cmCTestBuildHandler::IsLaunchedErrorFile(const char* fname)
 {
   // error-{hash}.xml
-  return (cmLiteralNCompare(fname, "error-") == 0 &&
+  return (cmHasLiteralPrefix(fname, "error-") == 0 &&
           strcmp(fname+strlen(fname)-4, ".xml") == 0);
 }
 
@@ -771,7 +771,7 @@ bool cmCTestBuildHandler::IsLaunchedErrorFile(const char* fname)
 bool cmCTestBuildHandler::IsLaunchedWarningFile(const char* fname)
 {
   // warning-{hash}.xml
-  return (cmLiteralNCompare(fname, "warning-") == 0 &&
+  return (cmHasLiteralPrefix(fname, "warning-") == 0 &&
           strcmp(fname+strlen(fname)-4, ".xml") == 0);
 }
 
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index 4fe40d3..60fcc13 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -536,11 +536,11 @@ private:
   void DoHeaderLine()
     {
     // Look for header fields that we need.
-    if(cmLiteralNCompare(this->Line.c_str(), "commit ") == 0)
+    if(cmHasLiteralPrefix(this->Line.c_str(), "commit ") == 0)
       {
       this->Rev.Rev = this->Line.c_str()+7;
       }
-    else if(cmLiteralNCompare(this->Line.c_str(), "author ") == 0)
+    else if(cmHasLiteralPrefix(this->Line.c_str(), "author ") == 0)
       {
       Person author;
       this->ParsePerson(this->Line.c_str()+7, author);
@@ -548,7 +548,7 @@ private:
       this->Rev.EMail = author.EMail;
       this->Rev.Date = this->FormatDateTime(author);
       }
-    else if(cmLiteralNCompare(this->Line.c_str(), "committer ") == 0)
+    else if(cmHasLiteralPrefix(this->Line.c_str(), "committer ") == 0)
       {
       Person committer;
       this->ParsePerson(this->Line.c_str()+10, committer);
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 6c77b9f..3ada064 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1131,11 +1131,11 @@ int cmCTest::GetTestModelFromString(const char* str)
     return cmCTest::EXPERIMENTAL;
     }
   std::string rstr = cmSystemTools::LowerCase(str);
-  if ( cmLiteralNCompare(rstr.c_str(), "cont") == 0 )
+  if ( cmHasLiteralPrefix(rstr.c_str(), "cont") == 0 )
     {
     return cmCTest::CONTINUOUS;
     }
-  if ( cmLiteralNCompare(rstr.c_str(), "nigh") == 0 )
+  if ( cmHasLiteralPrefix(rstr.c_str(), "nigh") == 0 )
     {
     return cmCTest::NIGHTLY;
     }
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index fa54077..46ded1c 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -240,7 +240,7 @@ static bool checkInterfaceDirs(const std::string &prepro,
       {
       continue;
       }
-    if (cmLiteralNCompare(li->c_str(), "${_IMPORT_PREFIX}") == 0)
+    if (cmHasLiteralPrefix(li->c_str(), "${_IMPORT_PREFIX}") == 0)
       {
       continue;
       }
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index f55b6bf..7e22530 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -81,10 +81,10 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
     os << "# Compute the installation prefix relative to this file.\n"
        << "get_filename_component(_IMPORT_PREFIX"
        << " \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n";
-    if(cmLiteralNCompare(absDestS.c_str(), "/lib/") == 0 ||
-       cmLiteralNCompare(absDestS.c_str(), "/lib64/") == 0 ||
-       cmLiteralNCompare(absDestS.c_str(), "/usr/lib/") == 0 ||
-       cmLiteralNCompare(absDestS.c_str(), "/usr/lib64/") == 0)
+    if(cmHasLiteralPrefix(absDestS.c_str(), "/lib/") == 0 ||
+       cmHasLiteralPrefix(absDestS.c_str(), "/lib64/") == 0 ||
+       cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib/") == 0 ||
+       cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib64/") == 0)
       {
       // Handle "/usr move" symlinks created by some Linux distros.
       os <<
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index ead940a..cea6b1e 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -173,8 +173,8 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries(const char *tgt)
   return (strcmp(prop, "LINK_LIBRARIES") == 0
        || strcmp(prop, "LINK_INTERFACE_LIBRARIES") == 0
        || strcmp(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES") == 0
-       || cmLiteralNCompare(prop, "LINK_INTERFACE_LIBRARIES_") == 0
-       || cmLiteralNCompare(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES_") == 0)
+       || cmHasLiteralPrefix(prop, "LINK_INTERFACE_LIBRARIES_") == 0
+       || cmHasLiteralPrefix(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES_") == 0)
        || strcmp(prop, "INTERFACE_LINK_LIBRARIES") == 0;
 }
 
@@ -200,7 +200,7 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingCompileDefinitions() const
   const char *prop = this->Property.c_str();
   return (strcmp(prop, "COMPILE_DEFINITIONS") == 0
        || strcmp(prop, "INTERFACE_COMPILE_DEFINITIONS") == 0
-       || cmLiteralNCompare(prop, "COMPILE_DEFINITIONS_") == 0);
+       || cmHasLiteralPrefix(prop, "COMPILE_DEFINITIONS_") == 0);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 35aa381..a9c5c06 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -902,7 +902,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
 
     CM_FOR_EACH_TRANSITIVE_PROPERTY_NAME(POPULATE_INTERFACE_PROPERTY_NAME)
       // Note that the above macro terminates with an else
-    /* else */ if (cmLiteralNCompare(propertyName.c_str(),
+    /* else */ if (cmHasLiteralPrefix(propertyName.c_str(),
                            "COMPILE_DEFINITIONS_") == 0)
       {
       interfacePropertyName = "INTERFACE_COMPILE_DEFINITIONS";
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 0de8dd5..1fb6edc 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -28,7 +28,7 @@ static const char* cmVS10GenName(const char* name, std::string& genName)
     return 0;
     }
   const char* p = name + sizeof(vs10generatorName) - 6;
-  if(cmLiteralNCompare(p, " 2010") == 0)
+  if(cmHasLiteralPrefix(p, " 2010") == 0)
     {
     p += 5;
     }
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
index 40f3d0f..34883ac 100644
--- a/Source/cmGlobalVisualStudio11Generator.cxx
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -23,7 +23,7 @@ static const char* cmVS11GenName(const char* name, std::string& genName)
     return 0;
     }
   const char* p = name + sizeof(vs11generatorName) - 6;
-  if(cmLiteralNCompare(p, " 2012") == 0)
+  if(cmHasLiteralPrefix(p, " 2012") == 0)
     {
     p += 5;
     }
diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx
index d2cd554..872d9d2 100644
--- a/Source/cmGlobalVisualStudio12Generator.cxx
+++ b/Source/cmGlobalVisualStudio12Generator.cxx
@@ -23,7 +23,7 @@ static const char* cmVS12GenName(const char* name, std::string& genName)
     return 0;
     }
   const char* p = name + sizeof(vs12generatorName) - 6;
-  if(cmLiteralNCompare(p, " 2013") == 0)
+  if(cmHasLiteralPrefix(p, " 2013") == 0)
     {
     p += 5;
     }
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx
index 411650c..0b3a080 100644
--- a/Source/cmOutputRequiredFilesCommand.cxx
+++ b/Source/cmOutputRequiredFilesCommand.cxx
@@ -32,7 +32,7 @@ void cmLBDepend::DependWalk(cmDependInformation* info)
   std::string line;
   while(cmSystemTools::GetLineFromStream(fin, line))
     {
-    if(!cmLiteralNCompare(line.c_str(), "#include"))
+    if(!cmHasLiteralPrefix(line.c_str(), "#include"))
       {
       // if it is an include line then create a string class
       std::string currentline = line;
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx
index 7cc8060..e3fbfc1 100644
--- a/Source/cmSetCommand.cxx
+++ b/Source/cmSetCommand.cxx
@@ -23,7 +23,7 @@ bool cmSetCommand
 
   // watch for ENV signatures
   const char* variable = args[0].c_str(); // VAR is always first
-  if (!cmLiteralNCompare(variable, "ENV{") && strlen(variable) > 5)
+  if (!cmHasLiteralPrefix(variable, "ENV{") && strlen(variable) > 5)
     {
     // what is the variable name
     char *varName = new char [strlen(variable)];
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index c35fc99..298d328 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -377,14 +377,14 @@ static thisClass* SafeDownCast(cmObject *c) \
   return 0;\
 }
 
-inline int cmLiteralNCompareImpl(const std::string &str1,
+inline int cmHasLiteralPrefixImpl(const std::string &str1,
                                  const char *str2,
                                  size_t N)
 {
   return strncmp(str1.c_str(), str2, N);
 }
 
-inline int cmLiteralNCompareImpl(const char* str1,
+inline int cmHasLiteralPrefixImpl(const char* str1,
                                  const char *str2,
                                  size_t N)
 {
@@ -399,8 +399,8 @@ inline int cmLiteralNCompareImpl(const char* str1,
 #define cmArraySize(a) (sizeof(a)/sizeof(*a))
 #define cmArrayEnd(a) a + cmArraySize(a)
 
-#define cmLiteralNCompare(STR1, STR2) \
-  cmLiteralNCompareImpl(STR1, "" STR2 "", sizeof(STR2) - 1)
+#define cmHasLiteralPrefix(STR1, STR2) \
+  cmHasLiteralPrefixImpl(STR1, "" STR2 "", sizeof(STR2) - 1)
 
 #else
 
@@ -412,9 +412,9 @@ template<typename T, size_t N>
 size_t cmArraySize(const T (&)[N]) { return N; }
 
 template<typename T, size_t N>
-int cmLiteralNCompare(T str1, const char (&str2)[N])
+int cmHasLiteralPrefix(T str1, const char (&str2)[N])
 {
-  return cmLiteralNCompareImpl(str1, str2, N - 1);
+  return cmHasLiteralPrefixImpl(str1, str2, N - 1);
 }
 
 #endif
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index dda9f51..4fa0e75 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -560,7 +560,7 @@ cmSourceFile* cmTarget::AddSource(const char* s)
 //----------------------------------------------------------------------------
 void cmTarget::ProcessSourceExpression(std::string const& expr)
 {
-  if(cmLiteralNCompare(expr.c_str(), "$<TARGET_OBJECTS:") == 0 &&
+  if(cmHasLiteralPrefix(expr.c_str(), "$<TARGET_OBJECTS:") == 0 &&
      expr[expr.size()-1] == '>')
     {
     std::string objLibName = expr.substr(17, expr.size()-18);
@@ -2199,11 +2199,11 @@ void cmTarget::GetCompileDefinitions(std::vector<std::string> &list,
 void cmTarget::MaybeInvalidatePropertyCache(const char* prop)
 {
   // Wipe out maps caching information affected by this property.
-  if(this->IsImported() && cmLiteralNCompare(prop, "IMPORTED") == 0)
+  if(this->IsImported() && cmHasLiteralPrefix(prop, "IMPORTED") == 0)
     {
     this->Internal->ImportInfoMap.clear();
     }
-  if(!this->IsImported() && cmLiteralNCompare(prop, "LINK_INTERFACE_") == 0)
+  if(!this->IsImported() && cmHasLiteralPrefix(prop, "LINK_INTERFACE_") == 0)
     {
     this->ClearLinkMaps();
     }
@@ -2279,21 +2279,21 @@ static void cmTargetCheckINTERFACE_LINK_LIBRARIES(const char* value,
 void cmTarget::CheckProperty(const char* prop, cmMakefile* context)
 {
   // Certain properties need checking.
-  if(cmLiteralNCompare(prop, "LINK_INTERFACE_LIBRARIES") == 0)
+  if(cmHasLiteralPrefix(prop, "LINK_INTERFACE_LIBRARIES") == 0)
     {
     if(const char* value = this->GetProperty(prop))
       {
       cmTargetCheckLINK_INTERFACE_LIBRARIES(prop, value, context, false);
       }
     }
-  if(cmLiteralNCompare(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES") == 0)
+  if(cmHasLiteralPrefix(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES") == 0)
     {
     if(const char* value = this->GetProperty(prop))
       {
       cmTargetCheckLINK_INTERFACE_LIBRARIES(prop, value, context, true);
       }
     }
-  if(cmLiteralNCompare(prop, "INTERFACE_LINK_LIBRARIES") == 0)
+  if(cmHasLiteralPrefix(prop, "INTERFACE_LINK_LIBRARIES") == 0)
     {
     if(const char* value = this->GetProperty(prop))
       {
@@ -2595,7 +2595,7 @@ const char *cmTarget::GetProperty(const char* prop,
       }
 
     // Support "LOCATION_<CONFIG>".
-    if(cmLiteralNCompare(prop, "LOCATION_") == 0)
+    if(cmHasLiteralPrefix(prop, "LOCATION_") == 0)
       {
       if (!this->HandleLocationPropertyPolicy())
         {
diff --git a/Source/cmTargetCompileDefinitionsCommand.cxx b/Source/cmTargetCompileDefinitionsCommand.cxx
index 29a997b..81e7ac6 100644
--- a/Source/cmTargetCompileDefinitionsCommand.cxx
+++ b/Source/cmTargetCompileDefinitionsCommand.cxx
@@ -44,7 +44,7 @@ std::string cmTargetCompileDefinitionsCommand
   for(std::vector<std::string>::const_iterator it = content.begin();
     it != content.end(); ++it)
     {
-    if (cmLiteralNCompare(it->c_str(), "-D") == 0)
+    if (cmHasLiteralPrefix(it->c_str(), "-D") == 0)
       {
       defs += sep + it->substr(2);
       }
diff --git a/Source/cmUnsetCommand.cxx b/Source/cmUnsetCommand.cxx
index e9fee4f..4c53d0a 100644
--- a/Source/cmUnsetCommand.cxx
+++ b/Source/cmUnsetCommand.cxx
@@ -24,7 +24,7 @@ bool cmUnsetCommand::InitialPass(std::vector<std::string> const& args,
   const char* variable = args[0].c_str();
 
   // unset(ENV{VAR})
-  if (!cmLiteralNCompare(variable, "ENV{") && strlen(variable) > 5)
+  if (!cmHasLiteralPrefix(variable, "ENV{") && strlen(variable) > 5)
     {
     // what is the variable name
     char *envVarName = new char [strlen(variable)];
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 77ff503..08e0b3f 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -273,7 +273,7 @@ int do_cmake(int ac, char** av)
       list_all_cached = true;
       list_help = true;
       }
-    else if (cmLiteralNCompare(av[i], "-P") == 0)
+    else if (cmHasLiteralPrefix(av[i], "-P") == 0)
       {
       if ( i == ac -1 )
         {
@@ -287,7 +287,7 @@ int do_cmake(int ac, char** av)
         args.push_back(av[i]);
         }
       }
-    else if (cmLiteralNCompare(av[i], "--find-package") == 0)
+    else if (cmHasLiteralPrefix(av[i], "--find-package") == 0)
       {
       workingMode = cmake::FIND_PACKAGE_MODE;
       args.push_back(av[i]);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=26ed7d047620dc9b6acadf3e5ac82fe123aa86a3
commit 26ed7d047620dc9b6acadf3e5ac82fe123aa86a3
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Nov 20 17:05:59 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Nov 20 17:05:59 2013 +0100

    Use macro literal compare on Borland.

diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index e9d503a..c35fc99 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -392,7 +392,8 @@ inline int cmLiteralNCompareImpl(const char* str1,
 }
 
 #if defined(_MSC_VER) && _MSC_VER < 1300 \
-  || defined(__GNUC__) && __GNUC__ < 3
+  || defined(__GNUC__) && __GNUC__ < 3 \
+  || defined(__BORLANDC__)
 
 #define cmArrayBegin(a) a
 #define cmArraySize(a) (sizeof(a)/sizeof(*a))

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

Summary of changes:
 Source/CTest/cmCTestBuildHandler.cxx         |    4 ++--
 Source/CTest/cmCTestGIT.cxx                  |    6 +++---
 Source/cmCTest.cxx                           |    4 ++--
 Source/cmExportFileGenerator.cxx             |    2 +-
 Source/cmExportInstallFileGenerator.cxx      |    8 ++++----
 Source/cmGeneratorExpressionDAGChecker.cxx   |    6 +++---
 Source/cmGeneratorExpressionEvaluator.cxx    |    2 +-
 Source/cmGlobalVisualStudio10Generator.cxx   |    2 +-
 Source/cmGlobalVisualStudio11Generator.cxx   |    2 +-
 Source/cmGlobalVisualStudio12Generator.cxx   |    2 +-
 Source/cmOutputRequiredFilesCommand.cxx      |    2 +-
 Source/cmSetCommand.cxx                      |    2 +-
 Source/cmStandardIncludes.h                  |   15 ++++++++-------
 Source/cmTarget.cxx                          |   14 +++++++-------
 Source/cmTargetCompileDefinitionsCommand.cxx |    2 +-
 Source/cmUnsetCommand.cxx                    |    2 +-
 Source/cmakemain.cxx                         |    4 ++--
 17 files changed, 40 insertions(+), 39 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list