diff options
-rw-r--r-- | Modules/CMakeDetermineASM-ATTCompiler.cmake | 2 | ||||
-rw-r--r-- | Modules/CMakeDetermineASMCompiler.cmake | 4 | ||||
-rw-r--r-- | Modules/CMakeDetermineASM_NASMCompiler.cmake | 2 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmCryptoHash.cxx | 6 | ||||
-rw-r--r-- | Source/cmDocumentGeneratorExpressions.h | 4 | ||||
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 15 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 3 | ||||
-rw-r--r-- | Source/cmStringCommand.cxx | 20 | ||||
-rw-r--r-- | Source/cmSystemTools.cxx | 5 | ||||
-rw-r--r-- | Source/cmSystemTools.h | 2 | ||||
-rw-r--r-- | Tests/CMakeLists.txt | 2 |
12 files changed, 39 insertions, 28 deletions
diff --git a/Modules/CMakeDetermineASM-ATTCompiler.cmake b/Modules/CMakeDetermineASM-ATTCompiler.cmake index cec09e9..03c5668 100644 --- a/Modules/CMakeDetermineASM-ATTCompiler.cmake +++ b/Modules/CMakeDetermineASM-ATTCompiler.cmake @@ -15,6 +15,6 @@ # determine the compiler to use for ASM using AT&T syntax, e.g. GNU as set(ASM_DIALECT "-ATT") -set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as) +set(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as) include(CMakeDetermineASMCompiler) set(ASM_DIALECT) diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 3643b17..0fecb5d 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -39,8 +39,8 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER) endif() endif() else() # some specific assembler "dialect" - if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT) - message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT must be preset !") + if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT AND NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST) + message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT or CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST must be preset !") endif() endif() diff --git a/Modules/CMakeDetermineASM_NASMCompiler.cmake b/Modules/CMakeDetermineASM_NASMCompiler.cmake index 50f71dd..5d783b1 100644 --- a/Modules/CMakeDetermineASM_NASMCompiler.cmake +++ b/Modules/CMakeDetermineASM_NASMCompiler.cmake @@ -14,7 +14,7 @@ # Find the nasm assembler. yasm (http://www.tortall.net/projects/yasm/) is nasm compatible -set(CMAKE_ASM_NASM_COMPILER_INIT nasm yasm) +set(CMAKE_ASM_NASM_COMPILER_LIST nasm yasm) if(NOT CMAKE_ASM_NASM_COMPILER) find_program(CMAKE_ASM_NASM_COMPILER nasm diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index d06c9d8..91b2202 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 20130610) +set(CMake_VERSION_TWEAK 20130614) #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/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, diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index b742dad..621c5f4 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1640,7 +1640,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ FAIL_REGULAR_EXPRESSION "CMake Warning .*VariableUnusedViaUnset.CMakeLists.txt:5 \\(set\\):") list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset") - if("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile") + if("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile" AND NOT WIN32) # Ninja does not support ADDITIONAL_MAKE_CLEAN_FILES and therefore fails # this test. (See #13371) # Apparently Visual Studio does not support it either. As the MakeClean |