[Cmake-commits] CMake branch, master, updated. v3.12.2-785-g4ca8cb2
Kitware Robot
kwrobot at kitware.com
Tue Oct 2 09:25:17 EDT 2018
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 4ca8cb286815331424bb72cc9b7394ffe728b516 (commit)
via 9682fa79e7f76d11fd2f00f90430e3fc628a1850 (commit)
via 5e61b79b82ec29a33179604d70834017f58afb76 (commit)
via fbd89b6753848f44b6b7179cfc07a619263b070b (commit)
via 94c406eb49c212b50127359c5691b4b9558b49ff (commit)
from 44de3428597671228c95939c4b509ebaa24f00fe (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=4ca8cb286815331424bb72cc9b7394ffe728b516
commit 4ca8cb286815331424bb72cc9b7394ffe728b516
Merge: 9682fa7 94c406e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 2 12:56:25 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Oct 2 08:56:32 2018 -0400
Merge topic 'csharp_versions'
94c406eb49 VS: Update CSharp flag table to support new language versions
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2425
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9682fa79e7f76d11fd2f00f90430e3fc628a1850
commit 9682fa79e7f76d11fd2f00f90430e3fc628a1850
Merge: 44de342 5e61b79
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 2 12:55:08 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Oct 2 08:55:15 2018 -0400
Merge topic 'install-directory-permissions-fix'
5e61b79b82 install: Set permissions on directories created by install(DIRECTORY)
fbd89b6753 Help: Add note about CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2428
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e61b79b82ec29a33179604d70834017f58afb76
commit 5e61b79b82ec29a33179604d70834017f58afb76
Author: Kyle Edwards <kyle.edwards at kitware.com>
AuthorDate: Mon Oct 1 16:13:06 2018 -0400
Commit: Kyle Edwards <kyle.edwards at kitware.com>
CommitDate: Mon Oct 1 16:28:43 2018 -0400
install: Set permissions on directories created by install(DIRECTORY)
The directories that are implicitly created by install(DIRECTORY)
were not having their permissions being set by
CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS. This change refactors
cmFileCopier to take this into account for directory installation.
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 54af2f4..1f76703 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -1275,6 +1275,33 @@ protected:
this->DirPermissions |= mode_world_read;
this->DirPermissions |= mode_world_execute;
}
+
+ bool GetDefaultDirectoryPermissions(mode_t** mode)
+ {
+ // check if default dir creation permissions were set
+ const char* default_dir_install_permissions =
+ this->Makefile->GetDefinition(
+ "CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS");
+ if (default_dir_install_permissions && *default_dir_install_permissions) {
+ std::vector<std::string> items;
+ cmSystemTools::ExpandListArgument(default_dir_install_permissions,
+ items);
+ for (const auto& arg : items) {
+ if (!this->CheckPermissions(arg, **mode)) {
+ std::ostringstream e;
+ e << this->FileCommand->GetError()
+ << " Set with CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS "
+ "variable.";
+ this->FileCommand->SetError(e.str());
+ return false;
+ }
+ }
+ } else {
+ *mode = nullptr;
+ }
+
+ return true;
+ }
};
bool cmFileCopier::Parse(std::vector<std::string> const& args)
@@ -1668,8 +1695,15 @@ bool cmFileCopier::InstallDirectory(const char* source,
this->ReportCopy(destination, TypeDir,
!cmSystemTools::FileIsDirectory(destination));
+ // check if default dir creation permissions were set
+ mode_t default_dir_mode_v = 0;
+ mode_t* default_dir_mode = &default_dir_mode_v;
+ if (!this->GetDefaultDirectoryPermissions(&default_dir_mode)) {
+ return false;
+ }
+
// Make sure the destination directory exists.
- if (!cmSystemTools::MakeDirectory(destination)) {
+ if (!cmSystemTools::MakeDirectory(destination, default_dir_mode)) {
std::ostringstream e;
e << this->Name << " cannot make directory \"" << destination
<< "\": " << cmSystemTools::GetLastSystemError();
@@ -2073,23 +2107,9 @@ bool cmFileInstaller::HandleInstallDestination()
// check if default dir creation permissions were set
mode_t default_dir_mode_v = 0;
- mode_t* default_dir_mode = nullptr;
- const char* default_dir_install_permissions = this->Makefile->GetDefinition(
- "CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS");
- if (default_dir_install_permissions && *default_dir_install_permissions) {
- std::vector<std::string> items;
- cmSystemTools::ExpandListArgument(default_dir_install_permissions, items);
- for (const auto& arg : items) {
- if (!this->CheckPermissions(arg, default_dir_mode_v)) {
- std::ostringstream e;
- e << this->FileCommand->GetError()
- << " Set with CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS variable.";
- this->FileCommand->SetError(e.str());
- return false;
- }
- }
-
- default_dir_mode = &default_dir_mode_v;
+ mode_t* default_dir_mode = &default_dir_mode_v;
+ if (!this->GetDefaultDirectoryPermissions(&default_dir_mode)) {
+ return false;
}
if (this->InstallType != cmInstallType_DIRECTORY) {
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fbd89b6753848f44b6b7179cfc07a619263b070b
commit fbd89b6753848f44b6b7179cfc07a619263b070b
Author: Kyle Edwards <kyle.edwards at kitware.com>
AuthorDate: Mon Oct 1 16:10:33 2018 -0400
Commit: Kyle Edwards <kyle.edwards at kitware.com>
CommitDate: Mon Oct 1 16:10:33 2018 -0400
Help: Add note about CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
diff --git a/Help/command/install.rst b/Help/command/install.rst
index 3a2b4da..08c5718 100644
--- a/Help/command/install.rst
+++ b/Help/command/install.rst
@@ -89,6 +89,13 @@ Command signatures that install files may print messages during
installation. Use the :variable:`CMAKE_INSTALL_MESSAGE` variable
to control which messages are printed.
+Many of the ``install()`` variants implicitly create the directories
+containing the installed files. If
+:variable:`CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS` is set, these
+directories will be created with the permissions specified. Otherwise,
+they will be created according to the uname rules on Unix-like platforms.
+Windows platforms are unaffected.
+
Installing Targets
^^^^^^^^^^^^^^^^^^
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=94c406eb49c212b50127359c5691b4b9558b49ff
commit 94c406eb49c212b50127359c5691b4b9558b49ff
Author: Dean Glazeski <dnglaze at gmail.com>
AuthorDate: Mon Oct 1 04:16:09 2018 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 1 09:25:27 2018 -0400
VS: Update CSharp flag table to support new language versions
This is based off of the latest 15.8.5 release of VS 2017.
CSC version 2.9.0.63208 (958f2354).
diff --git a/Source/cmVS141CSharpFlagTable.h b/Source/cmVS141CSharpFlagTable.h
index 5de9bf3..66c61bd 100644
--- a/Source/cmVS141CSharpFlagTable.h
+++ b/Source/cmVS141CSharpFlagTable.h
@@ -76,7 +76,12 @@ static cmVS7FlagTable cmVS141CSharpFlagTable[] = {
{ "LangVersion", "langversion:4", "", "4", 0 },
{ "LangVersion", "langversion:5", "", "5", 0 },
{ "LangVersion", "langversion:6", "", "6", 0 },
+ { "LangVersion", "langversion:7.0", "", "7.0", 0 },
+ { "LangVersion", "langversion:7.1", "", "7.1", 0 },
+ { "LangVersion", "langversion:7.2", "", "7.2", 0 },
+ { "LangVersion", "langversion:7.3", "", "7.3", 0 },
{ "LangVersion", "langversion:default", "", "default", 0 },
+ { "LangVersion", "langversion:latest", "", "latest", 0 },
{ "DelaySign", "delaysign", "", "true", 0 },
{ "DelaySign", "delaysign-", "", "false", 0 },
-----------------------------------------------------------------------
Summary of changes:
Help/command/install.rst | 7 ++++++
Source/cmFileCommand.cxx | 56 ++++++++++++++++++++++++++++-------------
Source/cmVS141CSharpFlagTable.h | 5 ++++
3 files changed, 50 insertions(+), 18 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list