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, master has been updated via 7574e16096abe57d44cde4e6380a22d940cde98c (commit) via 2bff8513f22ae02d1559851d0eb814083d015a2e (commit) via 9cab31cc79b9c19f2a5121a392a3498d06e25723 (commit) via 2dd2079152ceda32a7e5f330f7182fd658716c41 (commit) via bc34282da63c3f25c17fee73c97fcc46a0a164ca (commit) via 13f020198fe858437f24a3fe0c349a1618e70d7b (commit) via 7814796e0777e5fc767cca453200b9f8107848fe (commit) via 55ad9304ed87f365e69b5dc01d5b07d25aecc9e2 (commit) via 890bae524c6b97d29ffcc3fe5a6a30235d800348 (commit) via 5c171ca898f92e07cb68dd7fa77d0a993b08cc9c (commit) via 9502276f8272cf8ed10ceafe4413b0e24cc6535f (commit) via bee6597ac548e7ddd42cfa972e2a4cefa1ec3e59 (commit) via 706b93fa558c5a2e0e45a7068b5039d1f40fbc90 (commit) from 2a1f6617911da55e6563a775c807270a7f566b18 (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7574e16096abe57d44cde4e6380a22d940cde98c commit 7574e16096abe57d44cde4e6380a22d940cde98c Merge: 2bff851 13f0201 Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Feb 19 07:57:42 2019 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Tue Feb 19 07:57:42 2019 -0500 Merge branch 'release-3.14' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2bff8513f22ae02d1559851d0eb814083d015a2e commit 2bff8513f22ae02d1559851d0eb814083d015a2e Merge: 9cab31c 706b93f Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Feb 19 12:56:20 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Feb 19 07:56:41 2019 -0500 Merge topic 'modernize-for-loops-c-arrays' 706b93fa55 Modernize: C-arrays and loops over them Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !2951 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9cab31cc79b9c19f2a5121a392a3498d06e25723 commit 9cab31cc79b9c19f2a5121a392a3498d06e25723 Merge: 2dd2079 55ad930 Author: Craig Scott <craig.sc...@crascit.com> AuthorDate: Tue Feb 19 12:55:59 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Feb 19 07:56:06 2019 -0500 Merge topic 'readme-msys2' 55ad9304ed README: Explain how to bootstrap via MSYS2 on Windows Acked-by: Kitware Robot <kwro...@kitware.com> Acked-by: Bartosz <gan...@poczta.onet.pl> Merge-request: !2983 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2dd2079152ceda32a7e5f330f7182fd658716c41 commit 2dd2079152ceda32a7e5f330f7182fd658716c41 Merge: bc34282 890bae5 Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Feb 19 12:53:50 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Feb 19 07:54:57 2019 -0500 Merge topic 'fix-legacy-implicit-includes' 890bae524c Do not explicitly report "standard" include directories as implicit 5c171ca898 Restore unconditional use of "standard" include directories 9502276f82 Prefix implicit include directories with sysroot on construction Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !2981 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc34282da63c3f25c17fee73c97fcc46a0a164ca commit bc34282da63c3f25c17fee73c97fcc46a0a164ca Merge: 2a1f661 bee6597 Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Feb 19 12:53:39 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Feb 19 07:53:47 2019 -0500 Merge topic 'FindBoost-layout-tagged' bee6597ac5 FindBoost: Find boost libraries built with --layout=tagged Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !2961 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55ad9304ed87f365e69b5dc01d5b07d25aecc9e2 commit 55ad9304ed87f365e69b5dc01d5b07d25aecc9e2 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Feb 18 10:43:30 2019 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Tue Feb 19 07:10:59 2019 -0500 README: Explain how to bootstrap via MSYS2 on Windows Inspired-by: Bartosz Kosiorek <bartosz.kosio...@tomtom.com> diff --git a/README.rst b/README.rst index 775463e..11bafca 100644 --- a/README.rst +++ b/README.rst @@ -67,11 +67,24 @@ choice. Once this has finished successfully, run ``make`` and Windows ^^^^^^^ -You need to download and install a binary release of CMake in order to build -CMake. You can get these releases from the `CMake Download Page`_. Then -proceed with the instructions below. +There are two ways for building CMake under Windows: + +1. Compile with MSVC from VS 2015 or later. + You need to download and install a binary release of CMake. You can get + these releases from the `CMake Download Page`_. Then proceed with the + instructions below for `Building CMake with CMake`_. + +2. Bootstrap with MinGW under MSYS2. + Download and install `MSYS2`_. Then install the required build tools:: + + $ pacman -S --needed git base-devel mingw-w64-x86_64-gcc + + and bootstrap as above:: + + $ ./bootstrap && make .. _`CMake Download Page`: https://cmake.org/cmake/resources/software.html +.. _`MSYS2`: https://www.msys2.org/ Building CMake with CMake ------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=706b93fa558c5a2e0e45a7068b5039d1f40fbc90 commit 706b93fa558c5a2e0e45a7068b5039d1f40fbc90 Author: Artur Ryt <artur....@gmail.com> AuthorDate: Thu Feb 14 20:39:24 2019 +0100 Commit: Artur Ryt <artur....@gmail.com> CommitDate: Fri Feb 15 23:40:30 2019 +0100 Modernize: C-arrays and loops over them It replaces C arrays with deduced std::initializer_lists or std::array what makes enables for-loop over them. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 11c382f..fa0ffcc 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -7,6 +7,7 @@ #include <algorithm> #include <assert.h> #include <cstring> +#include <initializer_list> #include <iterator> #include <sstream> #include <stdio.h> @@ -2280,10 +2281,9 @@ void cmGlobalGenerator::AddGlobalTarget_Package( return; } - const char* reservedTargets[] = { "package", "PACKAGE" }; - for (const char* const* tn = cm::cbegin(reservedTargets); - tn != cm::cend(reservedTargets); ++tn) { - if (!this->CheckCMP0037(*tn, "when CPack packaging is enabled")) { + static const auto reservedTargets = { "package", "PACKAGE" }; + for (auto const& target : reservedTargets) { + if (!this->CheckCMP0037(target, "when CPack packaging is enabled")) { return; } } @@ -2330,10 +2330,10 @@ void cmGlobalGenerator::AddGlobalTarget_PackageSource( return; } - const char* reservedTargets[] = { "package_source" }; - for (const char* const* tn = cm::cbegin(reservedTargets); - tn != cm::cend(reservedTargets); ++tn) { - if (!this->CheckCMP0037(*tn, "when CPack source packaging is enabled")) { + static const auto reservedTargets = { "package_source" }; + for (auto const& target : reservedTargets) { + if (!this->CheckCMP0037(target, + "when CPack source packaging is enabled")) { return; } } @@ -2360,10 +2360,9 @@ void cmGlobalGenerator::AddGlobalTarget_Test( return; } - const char* reservedTargets[] = { "test", "RUN_TESTS" }; - for (const char* const* tn = cm::cbegin(reservedTargets); - tn != cm::cend(reservedTargets); ++tn) { - if (!this->CheckCMP0037(*tn, "when CTest testing is enabled")) { + static const auto reservedTargets = { "test", "RUN_TESTS" }; + for (auto const& target : reservedTargets) { + if (!this->CheckCMP0037(target, "when CTest testing is enabled")) { return; } } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a2d0efe..e392cff 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -34,6 +34,7 @@ #include "cmsys/RegularExpression.hxx" #include <algorithm> #include <assert.h> +#include <initializer_list> #include <iterator> #include <sstream> #include <stdio.h> @@ -51,25 +52,23 @@ // replaced in the form <var> with GetSafeDefinition(var). // ${LANG} is replaced in the variable first with all enabled // languages. -static const char* ruleReplaceVars[] = { - "CMAKE_${LANG}_COMPILER", - "CMAKE_SHARED_LIBRARY_CREATE_${LANG}_FLAGS", - "CMAKE_SHARED_MODULE_CREATE_${LANG}_FLAGS", - "CMAKE_SHARED_MODULE_${LANG}_FLAGS", - "CMAKE_SHARED_LIBRARY_${LANG}_FLAGS", - "CMAKE_${LANG}_LINK_FLAGS", - "CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG", - "CMAKE_${LANG}_ARCHIVE", - "CMAKE_AR", - "CMAKE_CURRENT_SOURCE_DIR", - "CMAKE_CURRENT_BINARY_DIR", - "CMAKE_RANLIB", - "CMAKE_LINKER", - "CMAKE_MT", - "CMAKE_CUDA_HOST_COMPILER", - "CMAKE_CUDA_HOST_LINK_LAUNCHER", - "CMAKE_CL_SHOWINCLUDES_PREFIX" -}; +static auto ruleReplaceVars = { "CMAKE_${LANG}_COMPILER", + "CMAKE_SHARED_LIBRARY_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_${LANG}_FLAGS", + "CMAKE_SHARED_LIBRARY_${LANG}_FLAGS", + "CMAKE_${LANG}_LINK_FLAGS", + "CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG", + "CMAKE_${LANG}_ARCHIVE", + "CMAKE_AR", + "CMAKE_CURRENT_SOURCE_DIR", + "CMAKE_CURRENT_BINARY_DIR", + "CMAKE_RANLIB", + "CMAKE_LINKER", + "CMAKE_MT", + "CMAKE_CUDA_HOST_COMPILER", + "CMAKE_CUDA_HOST_LINK_LAUNCHER", + "CMAKE_CL_SHOWINCLUDES_PREFIX" }; cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) : cmOutputConverter(makefile->GetStateSnapshot()) @@ -138,15 +137,13 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) this->VariableMappings[compilerOptionSysroot] = this->Makefile->GetSafeDefinition(compilerOptionSysroot); - for (const char* const* replaceIter = cm::cbegin(ruleReplaceVars); - replaceIter != cm::cend(ruleReplaceVars); ++replaceIter) { - std::string actualReplace = *replaceIter; - if (actualReplace.find("${LANG}") != std::string::npos) { - cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); + for (std::string replaceVar : ruleReplaceVars) { + if (replaceVar.find("${LANG}") != std::string::npos) { + cmSystemTools::ReplaceString(replaceVar, "${LANG}", lang); } - this->VariableMappings[actualReplace] = - this->Makefile->GetSafeDefinition(actualReplace); + this->VariableMappings[replaceVar] = + this->Makefile->GetSafeDefinition(replaceVar); } } } diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx index 653caf7..f437138 100644 --- a/Source/cmQtAutoGen.cxx +++ b/Source/cmQtAutoGen.cxx @@ -7,7 +7,7 @@ #include "cmsys/RegularExpression.hxx" #include <algorithm> -#include <iterator> +#include <array> #include <sstream> #include <utility> @@ -137,13 +137,21 @@ std::string cmQtAutoGen::Tools(bool moc, bool uic, bool rcc) std::string cmQtAutoGen::Quoted(std::string const& text) { - static const char* rep[18] = { "\\", "\\\\", "\"", "\\\"", "\a", "\\a", - "\b", "\\b", "\f", "\\f", "\n", "\\n", - "\r", "\\r", "\t", "\\t", "\v", "\\v" }; + const std::array<std::pair<const char*, const char*>, 9> replaces = { + { { "\\", "\\\\" }, + { "\"", "\\\"" }, + { "\a", "\\a" }, + { "\b", "\\b" }, + { "\f", "\\f" }, + { "\n", "\\n" }, + { "\r", "\\r" }, + { "\t", "\\t" }, + { "\v", "\\v" } } + }; std::string res = text; - for (const char* const* it = cm::cbegin(rep); it != cm::cend(rep); it += 2) { - cmSystemTools::ReplaceString(res, *it, *(it + 1)); + for (auto const& pair : replaces) { + cmSystemTools::ReplaceString(res, pair.first, pair.second); } res = '"' + res; res += '"'; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index e871634..d1e4f06 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -5,6 +5,7 @@ #include "cmsys/RegularExpression.hxx" #include <algorithm> #include <assert.h> +#include <initializer_list> #include <iterator> #include <set> #include <sstream> @@ -312,23 +313,23 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, // Setup per-configuration property default values. if (this->GetType() != cmStateEnums::UTILITY) { - const char* configProps[] = { + static const auto configProps = { /* clang-format needs this comment to break after the opening brace */ "ARCHIVE_OUTPUT_DIRECTORY_", "LIBRARY_OUTPUT_DIRECTORY_", "RUNTIME_OUTPUT_DIRECTORY_", "PDB_OUTPUT_DIRECTORY_", "COMPILE_PDB_OUTPUT_DIRECTORY_", "MAP_IMPORTED_CONFIG_", - "INTERPROCEDURAL_OPTIMIZATION_", nullptr + "INTERPROCEDURAL_OPTIMIZATION_" }; for (std::string const& configName : configNames) { std::string configUpper = cmSystemTools::UpperCase(configName); - for (const char** p = configProps; *p; ++p) { + for (auto const& prop : configProps) { // Interface libraries have no output locations, so honor only // the configuration map. if (this->TargetTypeValue == cmStateEnums::INTERFACE_LIBRARY && - strcmp(*p, "MAP_IMPORTED_CONFIG_") != 0) { + strcmp(prop, "MAP_IMPORTED_CONFIG_") != 0) { continue; } - std::string property = *p; + std::string property = prop; property += configUpper; this->SetPropertyDefault(property, nullptr); } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ff6b04b..af3e465 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -99,6 +99,7 @@ #include "cmsys/RegularExpression.hxx" #include <algorithm> #include <cstring> +#include <initializer_list> #include <iostream> #include <iterator> #include <memory> // IWYU pragma: keep @@ -1892,11 +1893,10 @@ bool cmake::LoadCache(const std::string& path, bool internal, std::set<std::string>& includes) { bool result = this->State->LoadCache(path, internal, excludes, includes); - static const char* entries[] = { "CMAKE_CACHE_MAJOR_VERSION", - "CMAKE_CACHE_MINOR_VERSION" }; - for (const char* const* nameIt = cm::cbegin(entries); - nameIt != cm::cend(entries); ++nameIt) { - this->UnwatchUnusedCli(*nameIt); + static const auto entries = { "CMAKE_CACHE_MAJOR_VERSION", + "CMAKE_CACHE_MINOR_VERSION" }; + for (auto const& entry : entries) { + this->UnwatchUnusedCli(entry); } return result; } @@ -1904,13 +1904,12 @@ bool cmake::LoadCache(const std::string& path, bool internal, bool cmake::SaveCache(const std::string& path) { bool result = this->State->SaveCache(path, this->GetMessenger()); - static const char* entries[] = { "CMAKE_CACHE_MAJOR_VERSION", - "CMAKE_CACHE_MINOR_VERSION", - "CMAKE_CACHE_PATCH_VERSION", - "CMAKE_CACHEFILE_DIR" }; - for (const char* const* nameIt = cm::cbegin(entries); - nameIt != cm::cend(entries); ++nameIt) { - this->UnwatchUnusedCli(*nameIt); + static const auto entries = { "CMAKE_CACHE_MAJOR_VERSION", + "CMAKE_CACHE_MINOR_VERSION", + "CMAKE_CACHE_PATCH_VERSION", + "CMAKE_CACHEFILE_DIR" }; + for (auto const& entry : entries) { + this->UnwatchUnusedCli(entry); } return result; } diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 4415ba6..4171624 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -37,6 +37,7 @@ #include "cmsys/Process.h" #include "cmsys/Terminal.h" #include <algorithm> +#include <array> #include <iostream> #include <iterator> #include <memory> // IWYU pragma: keep @@ -350,12 +351,13 @@ struct CoCompiler bool NoOriginalCommand; }; -static CoCompiler CoCompilers[] = { // Table of options and handlers. - { "--cppcheck=", HandleCppCheck, false }, - { "--cpplint=", HandleCppLint, false }, - { "--iwyu=", HandleIWYU, false }, - { "--lwyu=", HandleLWYU, true }, - { "--tidy=", HandleTidy, false } +static const std::array<CoCompiler, 5> CoCompilers = { + { // Table of options and handlers. + { "--cppcheck=", HandleCppCheck, false }, + { "--cpplint=", HandleCppLint, false }, + { "--iwyu=", HandleIWYU, false }, + { "--lwyu=", HandleLWYU, true }, + { "--tidy=", HandleTidy, false } } }; struct CoCompileJob @@ -386,16 +388,15 @@ int cmcmd::HandleCoCompileCommands(std::vector<std::string>& args) doing_options = false; } else if (doing_options) { bool optionFound = false; - for (CoCompiler const* cc = cm::cbegin(CoCompilers); - cc != cm::cend(CoCompilers); ++cc) { - size_t optionLen = strlen(cc->Option); - if (arg.compare(0, optionLen, cc->Option) == 0) { + for (CoCompiler const& cc : CoCompilers) { + size_t optionLen = strlen(cc.Option); + if (arg.compare(0, optionLen, cc.Option) == 0) { optionFound = true; CoCompileJob job; job.Command = arg.substr(optionLen); - job.Handler = cc->Handler; + job.Handler = cc.Handler; jobs.push_back(std::move(job)); - if (cc->NoOriginalCommand) { + if (cc.NoOriginalCommand) { runOriginalCmd = false; } } @@ -419,9 +420,8 @@ int cmcmd::HandleCoCompileCommands(std::vector<std::string>& args) if (jobs.empty()) { std::cerr << "__run_co_compile missing command to run. " "Looking for one or more of the following:\n"; - for (CoCompiler const* cc = cm::cbegin(CoCompilers); - cc != cm::cend(CoCompilers); ++cc) { - std::cerr << cc->Option << "\n"; + for (CoCompiler const& cc : CoCompilers) { + std::cerr << cc.Option << "\n"; } return 1; } ----------------------------------------------------------------------- Summary of changes: Modules/CMakeDetermineCompilerABI.cmake | 6 ++ Modules/FindBoost.cmake | 8 +++ Modules/Platform/UnixPaths.cmake | 14 +++- README.rst | 19 +++++- Source/cmGlobalGenerator.cxx | 23 ++++--- Source/cmLocalGenerator.cxx | 110 +++++++++++++++----------------- Source/cmQtAutoGen.cxx | 20 ++++-- Source/cmTarget.cxx | 11 ++-- Source/cmake.cxx | 23 ++++--- Source/cmcmd.cxx | 30 ++++----- 10 files changed, 148 insertions(+), 116 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits