summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmCryptoHash.cxx6
-rw-r--r--Source/cmDocumentGeneratorExpressions.h4
-rw-r--r--Source/cmEnableLanguageCommand.h17
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx15
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx3
-rw-r--r--Source/cmStringCommand.cxx20
-rw-r--r--Source/cmSystemTools.cxx5
-rw-r--r--Source/cmSystemTools.h2
9 files changed, 44 insertions, 30 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index b2cf9ed..7393ec2 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8)
set(CMake_VERSION_PATCH 11)
-set(CMake_VERSION_TWEAK 20130613)
+set(CMake_VERSION_TWEAK 20130624)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx
index a1505bd..a4f6ac4 100644
--- a/Source/cmCryptoHash.cxx
+++ b/Source/cmCryptoHash.cxx
@@ -54,8 +54,8 @@ std::string cmCryptoHash::HashFile(const char* file)
this->Initialize();
// Should be efficient enough on most system:
- const int bufferSize = 4096;
- char buffer[bufferSize];
+ cm_sha2_uint64_t buffer[512];
+ char* buffer_c = reinterpret_cast<char*>(buffer);
unsigned char const* buffer_uc =
reinterpret_cast<unsigned char const*>(buffer);
// This copy loop is very sensitive on certain platforms with
@@ -65,7 +65,7 @@ std::string cmCryptoHash::HashFile(const char* file)
// error occurred. Therefore, the loop should be safe everywhere.
while(fin)
{
- fin.read(buffer, bufferSize);
+ fin.read(buffer_c, sizeof(buffer));
if(int gcount = static_cast<int>(fin.gcount()))
{
this->Append(buffer_uc, gcount);
diff --git a/Source/cmDocumentGeneratorExpressions.h b/Source/cmDocumentGeneratorExpressions.h
index a8b3847..12ee9fa 100644
--- a/Source/cmDocumentGeneratorExpressions.h
+++ b/Source/cmDocumentGeneratorExpressions.h
@@ -44,9 +44,9 @@
"used.\n" \
" $<C_COMPILER_ID:comp> = '1' if the CMake-id of the C " \
"compiler matches comp, otherwise '0'.\n" \
- " $<CXX_COMPILER_ID> = The CMake-id of the CXX compiler " \
+ " $<CXX_COMPILER_ID> = The CMake-id of the CXX compiler " \
"used.\n" \
- " $<CXX_COMPILER_ID:comp> = '1' if the CMake-id of the CXX " \
+ " $<CXX_COMPILER_ID:comp> = '1' if the CMake-id of the CXX " \
"compiler matches comp, otherwise '0'.\n" \
" $<TARGET_FILE:tgt> = main file (.exe, .so.1.2, .a)\n" \
" $<TARGET_LINKER_FILE:tgt> = file used to link (.a, .lib, .so)\n" \
diff --git a/Source/cmEnableLanguageCommand.h b/Source/cmEnableLanguageCommand.h
index ee963f9..747448b 100644
--- a/Source/cmEnableLanguageCommand.h
+++ b/Source/cmEnableLanguageCommand.h
@@ -59,18 +59,21 @@ public:
virtual const char* GetFullDocumentation() const
{
return
- " enable_language(languageName [OPTIONAL] )\n"
+ " enable_language(<lang> [OPTIONAL] )\n"
"This command enables support for the named language in CMake. "
"This is the same as the project command but does not create "
"any of the extra variables that are created by the project command. "
"Example languages are CXX, C, Fortran. "
- "If OPTIONAL is used, use the CMAKE_<languageName>_COMPILER_WORKS "
- "variable to check whether the language has been enabled successfully."
"\n"
- "This command must be called on file scope (not inside a function) and "
- "the language enabled can only be used in the calling project or its "
- "subdirectories added by add_subdirectory(). Also note that at present, "
- "the OPTIONAL argument does not work.";
+ "This command must be called in file scope, not in a function call. "
+ "Furthermore, it must be called in the highest directory common to "
+ "all targets using the named language directly for compiling sources "
+ "or indirectly through link dependencies. "
+ "It is simplest to enable all needed languages in the top-level "
+ "directory of a project."
+ "\n"
+ "The OPTIONAL keyword is a placeholder for future implementation "
+ "and does not currently work.";
}
cmTypeMacro(cmEnableLanguageCommand, cmCommand);
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 6b02e15..d80e775 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -554,12 +554,15 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
fileIt != sFiles.end();
++fileIt)
{
- std::string linkName4 = linkName3;
- linkName4 += "/";
- linkName4 +=
- cmSystemTools::GetFilenameName((*fileIt)->GetFullPath());
- this->AppendLinkedResource(fout, linkName4,
- (*fileIt)->GetFullPath(), LinkToFile);
+ std::string fullPath = (*fileIt)->GetFullPath();
+ if (!cmSystemTools::FileIsDirectory(fullPath.c_str()))
+ {
+ std::string linkName4 = linkName3;
+ linkName4 += "/";
+ linkName4 += cmSystemTools::GetFilenameName(fullPath);
+ this->AppendLinkedResource(fout, linkName4,
+ fullPath, LinkToFile);
+ }
}
}
}
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 28f749d..04ade4a 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -266,8 +266,6 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
{
return compilerId ? compilerId : "";
}
- else
- {
cmsys::RegularExpression compilerIdValidator;
compilerIdValidator.compile("^[A-Za-z0-9_]*$");
if (!compilerIdValidator.find(parameters.begin()->c_str()))
@@ -286,7 +284,6 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
return "1";
}
return "0";
- }
}
};
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index 1fbde01..68ba13f 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -534,8 +534,12 @@ void cmStringCommand::ClearMatches(cmMakefile* mf)
{
char name[128];
sprintf(name, "CMAKE_MATCH_%d", i);
- mf->AddDefinition(name, "");
- mf->MarkVariableAsUsed(name);
+ const char* s = mf->GetDefinition(name);
+ if(s && *s != 0)
+ {
+ mf->AddDefinition(name, "");
+ mf->MarkVariableAsUsed(name);
+ }
}
}
@@ -544,10 +548,14 @@ void cmStringCommand::StoreMatches(cmMakefile* mf,cmsys::RegularExpression& re)
{
for (unsigned int i=0; i<10; i++)
{
- char name[128];
- sprintf(name, "CMAKE_MATCH_%d", i);
- mf->AddDefinition(name, re.match(i).c_str());
- mf->MarkVariableAsUsed(name);
+ std::string m = re.match(i);
+ if(m.size() > 0)
+ {
+ char name[128];
+ sprintf(name, "CMAKE_MATCH_%d", i);
+ mf->AddDefinition(name, re.match(i).c_str());
+ mf->MarkVariableAsUsed(name);
+ }
}
}
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 803d0da..21c361d 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2425,7 +2425,10 @@ bool cmSystemTools::GuessLibraryInstallName(std::string const& fullPath,
RunSingleCommand(cmds, &output, 0, 0, OUTPUT_NONE);
std::vector<std::string> strs = cmSystemTools::tokenize(output, "\n");
- if(strs.size() == 2)
+ // otool returns extra lines reporting multiple install names
+ // in case the binary is multi-arch and none of the architectures
+ // is native (e.g. i386;ppc on x86_64)
+ if(strs.size() >= 2)
{
soname = strs[1];
return true;
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index f5be26b..ec53929 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -274,7 +274,7 @@ public:
static bool GetRunCommandOutput() { return s_DisableRunCommandOutput; }
/**
- * Come constants for different file formats.
+ * Some constants for different file formats.
*/
enum FileFormat {
NO_FILE_FORMAT = 0,