From kwrobot at kitware.com Wed Nov 1 00:05:28 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 Nov 2017 00:05:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc3-210-ga0d00a1 Message-ID: <20171101040528.3E59EFECC0@public.kitware.com> 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 a0d00a17102d2740c1cf4b55fbf37308c7283f20 (commit) from fccbe2d30b15c8e3f389e6cf0284ff7f9daae090 (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=a0d00a17102d2740c1cf4b55fbf37308c7283f20 commit a0d00a17102d2740c1cf4b55fbf37308c7283f20 Author: Kitware Robot AuthorDate: Wed Nov 1 00:01:05 2017 -0400 Commit: Kitware Robot CommitDate: Wed Nov 1 00:01:05 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 8b4adf6..0ecbd07 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20171031) +set(CMake_VERSION_PATCH 20171101) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 1 07:45:09 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 Nov 2017 07:45:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc3-212-g93cd333 Message-ID: <20171101114510.07BD1FCCB4@public.kitware.com> 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 93cd33310351d6e42b5287815b98b841585ac0ca (commit) via f86879a04c4bc940b419a7944077f4b8f1e59e29 (commit) from a0d00a17102d2740c1cf4b55fbf37308c7283f20 (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=93cd33310351d6e42b5287815b98b841585ac0ca commit 93cd33310351d6e42b5287815b98b841585ac0ca Merge: a0d00a1 f86879a Author: Brad King AuthorDate: Wed Nov 1 11:40:30 2017 +0000 Commit: Kitware Robot CommitDate: Wed Nov 1 07:40:35 2017 -0400 Merge topic 'mingw-clang-c-compile-features' f86879a0 Record C compile features flags for MinGW Clang on Windows Acked-by: Kitware Robot Merge-request: !1435 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f86879a04c4bc940b419a7944077f4b8f1e59e29 commit f86879a04c4bc940b419a7944077f4b8f1e59e29 Author: Brad King AuthorDate: Wed Nov 1 06:59:53 2017 -0400 Commit: Brad King CommitDate: Wed Nov 1 07:28:38 2017 -0400 Record C compile features flags for MinGW Clang on Windows This was done for C++ by commit v3.5.0-rc1~69^2 (Record compile features for MinGW Clang on Windows, 2016-01-11). Make the same change for C. The `UNIX` condition on Clang C compiler features was already dropped by refactoring in commit v3.9.0-rc1~17^2~4 (Compilers: Port to use default cmake_record_lang_compile_features macros, 2017-05-10). Our documentation already claims support for this combination. This was simply an oversight when support was added for MinGW Clang C++. Issue: #15897 Issue: #15943 diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake index a5f9d84..a07ae40 100644 --- a/Modules/Compiler/Clang-C.cmake +++ b/Modules/Compiler/Clang-C.cmake @@ -2,7 +2,7 @@ include(Compiler/Clang) __compiler_clang(C) cmake_policy(GET CMP0025 appleClangPolicy) -if(WIN32 OR (APPLE AND NOT appleClangPolicy STREQUAL NEW)) +if(APPLE AND NOT appleClangPolicy STREQUAL NEW) return() endif() ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Clang-C.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 1 08:05:09 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 Nov 2017 08:05:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc3-218-gcdc9c11 Message-ID: <20171101120509.6E136FEC38@public.kitware.com> 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 cdc9c110a5bbe82d761f1a6d58b202a41b245de6 (commit) via 4857aec5d5bdee608d0e4fcf1a921de2a1c1b89c (commit) via ac1d19029119c32c67da555a892e9948b29eb067 (commit) via e4e9ce7cbe9b41dd535d5246153900cb9657c6ba (commit) via 5b9da05b7acc27ce40d27afcda0029284a0a4590 (commit) via 0987a399ec01813e16c0a2c86d481e2b8e2aab25 (commit) from 93cd33310351d6e42b5287815b98b841585ac0ca (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=cdc9c110a5bbe82d761f1a6d58b202a41b245de6 commit cdc9c110a5bbe82d761f1a6d58b202a41b245de6 Merge: 4857aec e4e9ce7 Author: Brad King AuthorDate: Wed Nov 1 12:02:11 2017 +0000 Commit: Kitware Robot CommitDate: Wed Nov 1 08:02:15 2017 -0400 Merge topic '16780-write-single-xcodeproj' e4e9ce7c Xcode: Add option to generate only topmost project file Acked-by: Kitware Robot Merge-request: !1395 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4857aec5d5bdee608d0e4fcf1a921de2a1c1b89c commit 4857aec5d5bdee608d0e4fcf1a921de2a1c1b89c Merge: ac1d190 0987a39 Author: Brad King AuthorDate: Wed Nov 1 12:00:42 2017 +0000 Commit: Kitware Robot CommitDate: Wed Nov 1 08:01:44 2017 -0400 Merge topic 'notes_timestamp' 0987a399 CTest: fix Time formatting in Notes.xml Acked-by: Kitware Robot Merge-request: !1428 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac1d19029119c32c67da555a892e9948b29eb067 commit ac1d19029119c32c67da555a892e9948b29eb067 Merge: 93cd333 5b9da05 Author: Brad King AuthorDate: Wed Nov 1 12:00:19 2017 +0000 Commit: Kitware Robot CommitDate: Wed Nov 1 08:00:45 2017 -0400 Merge topic 'windows-embed-cmake-version' 5b9da05b Windows: Embed version information into CMake binaries Acked-by: Kitware Robot Merge-request: !1412 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4e9ce7cbe9b41dd535d5246153900cb9657c6ba commit e4e9ce7cbe9b41dd535d5246153900cb9657c6ba Author: Gregor Jasny AuthorDate: Thu Oct 19 22:48:13 2017 +0200 Commit: Gregor Jasny CommitDate: Tue Oct 31 17:09:26 2017 +0100 Xcode: Add option to generate only topmost project file Closes #16780 diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index b37d473..0170da1 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -188,6 +188,7 @@ Variables that Change Behavior /variable/CMAKE_USER_MAKE_RULES_OVERRIDE /variable/CMAKE_WARN_DEPRECATED /variable/CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION + /variable/CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY Variables that Describe the System ================================== diff --git a/Help/release/dev/write-single-xcodeproj.rst b/Help/release/dev/write-single-xcodeproj.rst new file mode 100644 index 0000000..d5e9fef --- /dev/null +++ b/Help/release/dev/write-single-xcodeproj.rst @@ -0,0 +1,8 @@ +write-single-xcodeproj +---------------------- + +* The :generator:`Xcode` generator behavior of generating one project + file per :command:`project()` command could now be controlled with the + :variable:`CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY` variable. + This could be useful to speed up the CMake generation step for + large projects and to work-around a bug in the ``ZERO_CHECK`` logic. diff --git a/Help/variable/CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY.rst b/Help/variable/CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY.rst new file mode 100644 index 0000000..ea3e240 --- /dev/null +++ b/Help/variable/CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY.rst @@ -0,0 +1,9 @@ +CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY +------------------------------------------- + +If enabled, the :generator:`Xcode` generator will generate only a +single Xcode project file for the topmost :command:`project()` command +instead of generating one for every ``project()`` command. + +This could be useful to speed up the CMake generation step for +large projects and to work-around a bug in the ``ZERO_CHECK`` logic. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 78943e4..d902ca3 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -388,6 +388,17 @@ void cmGlobalXCodeGenerator::Generate() std::map>::iterator it; for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { cmLocalGenerator* root = it->second[0]; + + bool generateTopLevelProjectOnly = + root->GetMakefile()->IsOn("CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY"); + + if (generateTopLevelProjectOnly) { + cmStateSnapshot snp = root->GetStateSnapshot(); + if (snp.GetBuildsystemDirectoryParent().IsValid()) { + continue; + } + } + this->SetGenerationRoot(root); // now create the project this->OutputXCodeProject(root, it->second); diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 7d436b6..f730b83 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -8,6 +8,7 @@ run_cmake(XcodeFileType) run_cmake(XcodeAttributeLocation) run_cmake(XcodeAttributeGenex) run_cmake(XcodeAttributeGenexError) +run_cmake(XcodeGenerateTopLevelProjectOnly) run_cmake(XcodeObjectNeedsEscape) run_cmake(XcodeObjectNeedsQuote) run_cmake(XcodeOptimizationFlags) diff --git a/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly-check.cmake b/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly-check.cmake new file mode 100644 index 0000000..64654af --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly-check.cmake @@ -0,0 +1,3 @@ +if(EXISTS "${RunCMake_TEST_BINARY_DIR}/subproject/subproject.xcodeproj") + message(SEND_ERROR "Unexpected project file for subproject found.") +endif() diff --git a/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly.cmake b/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly.cmake new file mode 100644 index 0000000..7e53c49 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly.cmake @@ -0,0 +1,3 @@ +set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY TRUE) +project(XcodeGenerateTopLevelProjectOnly NONE) +add_subdirectory(subproject) diff --git a/Tests/RunCMake/XcodeProject/subproject/CMakeLists.txt b/Tests/RunCMake/XcodeProject/subproject/CMakeLists.txt new file mode 100644 index 0000000..20e12b1 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/subproject/CMakeLists.txt @@ -0,0 +1 @@ +project(subproject) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b9da05b7acc27ce40d27afcda0029284a0a4590 commit 5b9da05b7acc27ce40d27afcda0029284a0a4590 Author: Justin Goshi AuthorDate: Wed Oct 25 13:02:32 2017 -0700 Commit: Brad King CommitDate: Tue Oct 31 10:02:25 2017 -0400 Windows: Embed version information into CMake binaries diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index e1c34bf..f15dff8 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1057,6 +1057,19 @@ endif() include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL) include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL) +if(WIN32) + # Add Windows executable version information. + configure_file("CMakeVersion.rc.in" "CMakeVersion.rc" @ONLY) + + # We use a separate object library for this to work around a limitation of + # MinGW's windres tool with spaces in the path to the include directories. + add_library(CMakeVersion OBJECT "${CMAKE_CURRENT_BINARY_DIR}/CMakeVersion.rc") + set_property(TARGET CMakeVersion PROPERTY INCLUDE_DIRECTORIES "") + foreach(_tool ${_tools}) + target_sources(${_tool} PRIVATE $) + endforeach() +endif() + # Install tools foreach(_tool ${_tools}) diff --git a/Source/CMakeVersion.rc.in b/Source/CMakeVersion.rc.in new file mode 100644 index 0000000..f4ca3d5 --- /dev/null +++ b/Source/CMakeVersion.rc.in @@ -0,0 +1,34 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#define VER_FILEVERSION @CMake_VERSION_MAJOR@, at CMake_VERSION_MINOR@, at CMake_VERSION_PATCH@ +#define VER_FILEVERSION_STR "@CMake_VERSION_MAJOR at .@CMake_VERSION_MINOR at .@CMake_VERSION_PATCH@\0" + +#define VER_PRODUCTVERSION @CMake_VERSION_MAJOR@, at CMake_VERSION_MINOR@, at CMake_VERSION_PATCH@ +#define VER_PRODUCTVERSION_STR "@CMake_VERSION@\0" + +VS_VERSION_INFO VERSIONINFO +FILEVERSION VER_FILEVERSION +PRODUCTVERSION VER_PRODUCTVERSION +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "FileVersion", VER_FILEVERSION_STR + VALUE "ProductVersion", VER_PRODUCTVERSION_STR + END + END + + BLOCK "VarFileInfo" + BEGIN + /* The following line should only be modified for localized versions. */ + /* It consists of any number of WORD,WORD pairs, with each pair */ + /* describing a language,codepage combination supported by the file. */ + /* */ + /* For example, a file might have values "0x409,1252" indicating that it */ + /* supports English language (0x409) in the Windows ANSI codepage (1252). */ + + VALUE "Translation", 0x409, 1252 + END +END https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0987a399ec01813e16c0a2c86d481e2b8e2aab25 commit 0987a399ec01813e16c0a2c86d481e2b8e2aab25 Author: Zack Galbreath AuthorDate: Mon Oct 30 13:14:45 2017 -0400 Commit: Zack Galbreath CommitDate: Tue Oct 31 10:00:38 2017 -0400 CTest: fix Time formatting in Notes.xml Notes.xml was reporting its timestamp in E-notation. Here's an example of what this looked like: This format is unsuitable for precisely determining when the Notes file was generated. As a result of this commit, the same field now appears as: diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 4ea1493..37ff901 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -12,6 +12,7 @@ #include "cmsys/String.hxx" #include "cmsys/SystemInformation.hxx" #include +#include #include #include #include @@ -1421,7 +1422,7 @@ int cmCTest::GenerateCTestNotesOutput(cmXMLWriter& xml, std::string note_time = this->CurrentTime(); xml.StartElement("Note"); xml.Attribute("Name", file); - xml.Element("Time", cmSystemTools::GetTime()); + xml.Element("Time", static_cast(cmSystemTools::GetTime())); xml.Element("DateTime", note_time); xml.StartElement("Text"); cmsys::ifstream ifs(file.c_str()); ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 1 + Help/release/dev/write-single-xcodeproj.rst | 8 +++++ ...CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY.rst | 9 ++++++ Source/CMakeLists.txt | 13 ++++++++ Source/CMakeVersion.rc.in | 34 ++++++++++++++++++++ Source/cmCTest.cxx | 3 +- Source/cmGlobalXCodeGenerator.cxx | 11 +++++++ Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 1 + .../XcodeGenerateTopLevelProjectOnly-check.cmake | 3 ++ .../XcodeGenerateTopLevelProjectOnly.cmake | 3 ++ .../XcodeProject/subproject/CMakeLists.txt | 1 + 11 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 Help/release/dev/write-single-xcodeproj.rst create mode 100644 Help/variable/CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY.rst create mode 100644 Source/CMakeVersion.rc.in create mode 100644 Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly-check.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly.cmake create mode 100644 Tests/RunCMake/XcodeProject/subproject/CMakeLists.txt hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 1 08:15:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 Nov 2017 08:15:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc3-228-ga57bad6 Message-ID: <20171101121504.E9677FC793@public.kitware.com> 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 a57bad6c3d0dbc885bb71dfe465d09a380c35960 (commit) via 1c222d85447d6f237c39d7fc3d4d970ea4fa44f1 (commit) via c693db0f62f1a8246458140418398bf76c02e7c4 (commit) via 77e758a3edab6836151d5b1e690096c4f33dbd23 (commit) via 4e46f97c84431e860aab3da78495b6c0e8c37725 (commit) via 8d1341f4ff8b8e61fc1b162c90cf5170ec57ac6f (commit) via 978c98b7bda6286d153c7b942509a92b66cb8fbc (commit) via 1df31aa92a398e0ef02e1ccccd41969a63bad29e (commit) via d3caf941e4940bb133088bea4c790a90e749f8b8 (commit) via 96d20a4de3420fca0e25a67c24e6f7eaead4420d (commit) from cdc9c110a5bbe82d761f1a6d58b202a41b245de6 (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=a57bad6c3d0dbc885bb71dfe465d09a380c35960 commit a57bad6c3d0dbc885bb71dfe465d09a380c35960 Merge: 1c222d8 8d1341f Author: Brad King AuthorDate: Wed Nov 1 08:07:25 2017 -0400 Commit: Brad King CommitDate: Wed Nov 1 08:07:25 2017 -0400 Merge branch 'release-3.10' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c222d85447d6f237c39d7fc3d4d970ea4fa44f1 commit 1c222d85447d6f237c39d7fc3d4d970ea4fa44f1 Merge: 77e758a c693db0 Author: Brad King AuthorDate: Wed Nov 1 08:07:18 2017 -0400 Commit: Brad King CommitDate: Wed Nov 1 08:07:18 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c693db0f62f1a8246458140418398bf76c02e7c4 commit c693db0f62f1a8246458140418398bf76c02e7c4 Merge: ddeabf0 978c98b Author: Brad King AuthorDate: Tue Oct 31 11:48:02 2017 -0400 Commit: Brad King CommitDate: Wed Nov 1 08:06:42 2017 -0400 Merge branch 'backport-3.9-autogen-moc-predefs-no-moc-options' into release-3.9 Merge-request: !1432 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=77e758a3edab6836151d5b1e690096c4f33dbd23 commit 77e758a3edab6836151d5b1e690096c4f33dbd23 Merge: cdc9c11 4e46f97 Author: Brad King AuthorDate: Wed Nov 1 12:05:43 2017 +0000 Commit: Kitware Robot CommitDate: Wed Nov 1 08:05:47 2017 -0400 Merge topic 'autogen-moc-predefs-no-moc-options' 4e46f97c Merge branch 'backport-3.9' into autogen-moc-predefs-no-moc-options 978c98b7 Autogen: Don't add AUTOMOC_MOC_OPTIONS to moc-predefs command d3caf941 Autogen: Tests: Set AUTOMOC_MOC_OPTIONS in a simple test 96d20a4d Autogen: Don't use AUTOMOC_MOC_OPTIONS in moc-predefs command Acked-by: Kitware Robot Acked-by: EoD Merge-request: !1432 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e46f97c84431e860aab3da78495b6c0e8c37725 commit 4e46f97c84431e860aab3da78495b6c0e8c37725 Merge: d3caf94 978c98b Author: Brad King AuthorDate: Wed Nov 1 08:03:55 2017 -0400 Commit: Brad King CommitDate: Wed Nov 1 08:03:55 2017 -0400 Merge branch 'backport-3.9' into autogen-moc-predefs-no-moc-options https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=978c98b7bda6286d153c7b942509a92b66cb8fbc commit 978c98b7bda6286d153c7b942509a92b66cb8fbc Author: Sebastian Holtermann AuthorDate: Tue Oct 31 16:27:38 2017 +0100 Commit: Brad King CommitDate: Tue Oct 31 11:46:15 2017 -0400 Autogen: Don't add AUTOMOC_MOC_OPTIONS to moc-predefs command Issue: #17418 diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index d12d96d..c3ecb51 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1268,9 +1268,6 @@ bool cmQtAutoGenerators::MocGenerateAll( it != this->MocDefinitions.end(); ++it) { cmd.push_back("-D" + (*it)); } - // Add options - cmd.insert(cmd.end(), this->MocOptions.begin(), - this->MocOptions.end()); // Execute command if (!this->RunCommand(cmd, output, false)) { { ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutoGenerators.cxx | 10 +++++++--- Tests/QtAutogen/CMakeLists.txt | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 1 08:15:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 Nov 2017 08:15:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-rc3-36-g8d1341f Message-ID: <20171101121505.0DD1AFC7DC@public.kitware.com> 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, release has been updated via 8d1341f4ff8b8e61fc1b162c90cf5170ec57ac6f (commit) via f86879a04c4bc940b419a7944077f4b8f1e59e29 (commit) via 1df31aa92a398e0ef02e1ccccd41969a63bad29e (commit) via d3caf941e4940bb133088bea4c790a90e749f8b8 (commit) via 96d20a4de3420fca0e25a67c24e6f7eaead4420d (commit) from f49b6871e9f6de4948e8aa34446a1c933ca97935 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Clang-C.cmake | 2 +- Source/cmQtAutoGenerators.cxx | 10 +++++++--- Tests/QtAutogen/CMakeLists.txt | 5 +++++ 3 files changed, 13 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 1 09:35:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 Nov 2017 09:35:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc3-230-g9d742de Message-ID: <20171101133504.8CFD2FE8A3@public.kitware.com> 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 9d742defd925e63eefe37e22f61c22bdec49c044 (commit) via 45da558742bad36be518e8d95dee0d0ec3793a64 (commit) from a57bad6c3d0dbc885bb71dfe465d09a380c35960 (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=9d742defd925e63eefe37e22f61c22bdec49c044 commit 9d742defd925e63eefe37e22f61c22bdec49c044 Merge: a57bad6 45da558 Author: Brad King AuthorDate: Wed Nov 1 09:20:33 2017 -0400 Commit: Brad King CommitDate: Wed Nov 1 09:20:33 2017 -0400 Merge branch 'release-3.10' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 1 09:35:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 Nov 2017 09:35:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-rc3-37-g45da558 Message-ID: <20171101133504.AE020FE8B9@public.kitware.com> 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, release has been updated via 45da558742bad36be518e8d95dee0d0ec3793a64 (commit) from 8d1341f4ff8b8e61fc1b162c90cf5170ec57ac6f (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 1 10:15:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 Nov 2017 10:15:03 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.10.0-rc4, created. v3.10.0-rc4 Message-ID: <20171101141503.26EA0FCC2A@public.kitware.com> 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 annotated tag, v3.10.0-rc4 has been created at 27558d02eb28abf7504e5eabfb2dd5d8afa7749a (tag) tagging 45da558742bad36be518e8d95dee0d0ec3793a64 (commit) replaces v3.10.0-rc3 tagged by Brad King on Wed Nov 1 09:25:35 2017 -0400 - Log ----------------------------------------------------------------- CMake 3.10.0-rc4 -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEExsJlMku+vcNQtRPQLSzvEDSSFoQFAln5y08WHGJyYWQua2lu Z0BraXR3YXJlLmNvbQAKCRAtLO8QNJIWhG9EEACEQDI4dAHahGOwPjlQUIWEK/zQ rSbdS1Q4rAMFNR2tiR269gMePihLkogJeJDOEHaWlgSQz5YhOkMbUsWsZhrWiAeK CSFjy50uaQB9k3yI/iSjDwtI6EmrHVJI4j5UhVph/RR80dHwSN5ZpyG80YzoLyQ8 6IhjrQce0J/gFJLk2GOe4HajAp1xVtz3TmesOI1VMU8ph1oxsJ1MgaCIDLA2QA6R F8N6+1Pi6miUd02n5U5h3ygxJfM+p0g/RPn3vGqDH7r+gmNoPXJU//Jqw9NltoOo 5bHOpC3ETsz0O62wj+p0F2pE8aLlDfwRTgD0EvX0gClxXYR69OjfGaBlavapunqU +wKANgTBGt03ANha+Q409NKE6Kh6gKxaeDXnYyT+tvVDt6JL8Qh3yqeWesAtDiSb 7sq/tXu5DeOoa9c+EqaMaWn1XBBN2cm39B92ODyVmZKIEbqMxSLhaa34dPzQnyVf qRl40BzUn63AX6QA6EPKvo1T24of1vDxwrdkReb3aZn/aaOxIZ4mpw7XL0kIWLp3 Fy3+C+8kvFUMld8stT0AnKWj/i3nJQHC6gDhQimM/8N6yM3EMT3lT8AKr3HtnIhR fazX+VnqsPk45uAljviE+Km05dbur290WxQMJ2Das2VBorVrXgkOQoylFI7VWSvP DbI+IpcCmCcPmRyzVQ== =YsfA -----END PGP SIGNATURE----- Brad King (23): Merge branch 'flang-remove-boundscheck' into release-3.10 Merge branch 'doc-cxx-std-msvc' into release-3.10 Merge branch 'gnuid-cmp54-fix' into release-3.10 Merge branch 'help_parse_arguments' into release-3.10 Merge branch 'FindOpenCL-more-versions' into release-3.10 Merge branch 'findmpi-core-count' into release-3.10 Merge branch 'omp-oacc-werror-return-type' into release-3.10 Clang: Use -TP flag for C++ sources with clang-cl Merge branch 'clang-cl-TP' into release-3.10 CMP0040: Clarify policy warning to match documentation Merge branch 'cmp0040-wording' into release-3.10 cmcmd: Rename loop iteration variable for clarity cmcmd: Convert lint handlers to file-static functions cmcmd: Restore support for running multiple lint tools Merge branch 'autogen-static-library-cycles' into release-3.10 Merge branch 'backport-fix-co-compile' into release-3.10 Merge branch 'cpack-rpm-dist-test-fix' into release-3.10 Merge branch 'autogen-qrc-file-name' into release-3.10 Merge branch 'autogen-change-rcc-config-suffix' into release-3.10 Merge branch 'autogen-moc-predefs-no-moc-options' into release-3.10 Record C compile features flags for MinGW Clang on Windows Merge branch 'mingw-clang-c-compile-features' into release-3.10 CMake 3.10.0-rc4 Christian Pfeiffer (5): Flang: Remove unsupported fbounds-check flag Help: Correct _STANDARD help w.r.t. MSVC GNUInstallDirs: Enable CMP0054 FindMPI: Use physical cores for MPIEXEC_MAX_NUMPROCS Find{OpenMP,OpenACC}: Fix detection with -Werror=return-type Domen Vrankar (1): CPack/RPM: DIST-MONOLITHIC-type subtest fix Henry Schreiner (1): FindOpenCL: Add detection of OpenCL 2.1 and 2.2 Sebastian Holtermann (6): Autogen: Don't add STATIC_LIBRARY cycle targets to the _autogen dependencies Autogen: Tests: Add test for STATIC_LIBRARY cycles Autogen: RCC: Append checksum suffix to wrapped file name Autogen: Make rcc output file suffix static (instead of pseudo-random) Autogen: Don't use AUTOMOC_MOC_OPTIONS in moc-predefs command Autogen: Tests: Set AUTOMOC_MOC_OPTIONS in a simple test Sylvain Joubert (1): Help: Fix cmake_parse_arguments behavior for not found arguments ----------------------------------------------------------------------- hooks/post-receive -- CMake From kwrobot at kitware.com Thu Nov 2 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 2 Nov 2017 00:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-194-gd455a04 Message-ID: <20171102040506.66547FE35E@public.kitware.com> 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 d455a04c53be4e52313185c7322fc9073dc2437f (commit) from 9d742defd925e63eefe37e22f61c22bdec49c044 (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=d455a04c53be4e52313185c7322fc9073dc2437f commit d455a04c53be4e52313185c7322fc9073dc2437f Author: Kitware Robot AuthorDate: Thu Nov 2 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Thu Nov 2 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0ecbd07..e730358 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20171101) +set(CMake_VERSION_PATCH 20171102) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Nov 2 09:45:26 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 2 Nov 2017 09:45:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-201-g817331a Message-ID: <20171102134526.BA729FCD60@public.kitware.com> 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 817331aae8c9f166baa7ada5e015dcb5442c0038 (commit) via 193e40daa5012b13b8de6202a89c24257be327fa (commit) via fdd1e18759070d27e85f1792d85a3aebc71c2f5a (commit) via a0ec14d36361567e374672e0d115e584548702b8 (commit) via 8eb39bf24c9394efe78c6346e6e3f2244254ac97 (commit) via 7576e9f8a30bb50a3157fe5e3ec493be8a9299bc (commit) via 7d3f33e6129232a6814af47a19a72fd500414508 (commit) from d455a04c53be4e52313185c7322fc9073dc2437f (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=817331aae8c9f166baa7ada5e015dcb5442c0038 commit 817331aae8c9f166baa7ada5e015dcb5442c0038 Merge: 193e40d a0ec14d Author: Brad King AuthorDate: Thu Nov 2 13:44:25 2017 +0000 Commit: Kitware Robot CommitDate: Thu Nov 2 09:44:41 2017 -0400 Merge topic 'deprecate-policy-old' a0ec14d3 Add deprecation warnings for policies CMP0054 and below Acked-by: Kitware Robot Reviewed-by: Ben Boeckel Merge-request: !1438 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=193e40daa5012b13b8de6202a89c24257be327fa commit 193e40daa5012b13b8de6202a89c24257be327fa Merge: fdd1e18 7576e9f Author: Brad King AuthorDate: Thu Nov 2 13:42:39 2017 +0000 Commit: Kitware Robot CommitDate: Thu Nov 2 09:43:48 2017 -0400 Merge topic 'update-kwsys' 7576e9f8 Merge branch 'upstream-KWSys' into update-kwsys 7d3f33e6 KWSys 2017-11-01 (6ffca34c) Acked-by: Kitware Robot Merge-request: !1436 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fdd1e18759070d27e85f1792d85a3aebc71c2f5a commit fdd1e18759070d27e85f1792d85a3aebc71c2f5a Merge: d455a04 8eb39bf Author: Brad King AuthorDate: Thu Nov 2 13:42:16 2017 +0000 Commit: Kitware Robot CommitDate: Thu Nov 2 09:42:47 2017 -0400 Merge topic 'doc-cmp0037-update' 8eb39bf2 Help: Document CMP0037 relaxation of test and package targets Acked-by: Kitware Robot Merge-request: !1437 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0ec14d36361567e374672e0d115e584548702b8 commit a0ec14d36361567e374672e0d115e584548702b8 Author: Brad King AuthorDate: Wed Nov 1 10:43:25 2017 -0400 Commit: Brad King CommitDate: Wed Nov 1 11:46:53 2017 -0400 Add deprecation warnings for policies CMP0054 and below The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for some policies to encourage projects to port away from setting policies to OLD. diff --git a/Help/release/dev/deprecate-policy-old.rst b/Help/release/dev/deprecate-policy-old.rst new file mode 100644 index 0000000..bcfa70a --- /dev/null +++ b/Help/release/dev/deprecate-policy-old.rst @@ -0,0 +1,8 @@ +deprecate-policy-old +-------------------- + +* An explicit deprecation diagnostic was added for policies ``CMP0037`` + through ``CMP0054`` (``CMP0036`` and below were already deprecated). + The :manual:`cmake-policies(7)` manual explains that the OLD behaviors + of all policies are deprecated and that projects should port to the + NEW behaviors. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 43c529c..9c8dae3 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4018,7 +4018,7 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id, // Deprecate old policies, especially those that require a lot // of code to maintain the old behavior. - if (status == cmPolicies::OLD && id <= cmPolicies::CMP0036) { + if (status == cmPolicies::OLD && id <= cmPolicies::CMP0054) { this->IssueMessage(cmake::DEPRECATION_WARNING, cmPolicies::GetPolicyDeprecatedWarning(id)); } diff --git a/Tests/RunCMake/CMP0037/CMP0037-OLD-reserved-result.txt b/Tests/RunCMake/CMP0037/CMP0037-OLD-reserved-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0037/CMP0037-OLD-reserved-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0037/CMP0037-OLD-reserved-stderr.txt b/Tests/RunCMake/CMP0037/CMP0037-OLD-reserved-stderr.txt new file mode 100644 index 0000000..de09351 --- /dev/null +++ b/Tests/RunCMake/CMP0037/CMP0037-OLD-reserved-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0037-OLD-reserved.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0037 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0037/CMP0037-OLD-space-result.txt b/Tests/RunCMake/CMP0037/CMP0037-OLD-space-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0037/CMP0037-OLD-space-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0037/CMP0037-OLD-space-stderr.txt b/Tests/RunCMake/CMP0037/CMP0037-OLD-space-stderr.txt new file mode 100644 index 0000000..4d13e59 --- /dev/null +++ b/Tests/RunCMake/CMP0037/CMP0037-OLD-space-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0037-OLD-space.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0037 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0037/OLD-cond-package-stderr.txt b/Tests/RunCMake/CMP0037/OLD-cond-package-stderr.txt new file mode 100644 index 0000000..5a29a49 --- /dev/null +++ b/Tests/RunCMake/CMP0037/OLD-cond-package-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at OLD-cond-package.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0037 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0037/OLD-cond-package_source-stderr.txt b/Tests/RunCMake/CMP0037/OLD-cond-package_source-stderr.txt new file mode 100644 index 0000000..5f72e16 --- /dev/null +++ b/Tests/RunCMake/CMP0037/OLD-cond-package_source-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at OLD-cond-package_source.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0037 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0037/OLD-cond-stderr.txt b/Tests/RunCMake/CMP0037/OLD-cond-stderr.txt new file mode 100644 index 0000000..94e4575 --- /dev/null +++ b/Tests/RunCMake/CMP0037/OLD-cond-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at OLD-cond.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0037 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0037/OLD-cond-test-stderr.txt b/Tests/RunCMake/CMP0037/OLD-cond-test-stderr.txt new file mode 100644 index 0000000..81e10ce --- /dev/null +++ b/Tests/RunCMake/CMP0037/OLD-cond-test-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at OLD-cond-test.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0037 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0038/CMP0038-OLD-result.txt b/Tests/RunCMake/CMP0038/CMP0038-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0038/CMP0038-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0038/CMP0038-OLD-stderr.txt b/Tests/RunCMake/CMP0038/CMP0038-OLD-stderr.txt new file mode 100644 index 0000000..c754128 --- /dev/null +++ b/Tests/RunCMake/CMP0038/CMP0038-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0038-OLD.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0038 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0039/CMP0039-OLD-result.txt b/Tests/RunCMake/CMP0039/CMP0039-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0039/CMP0039-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0039/CMP0039-OLD-stderr.txt b/Tests/RunCMake/CMP0039/CMP0039-OLD-stderr.txt new file mode 100644 index 0000000..d7863fd --- /dev/null +++ b/Tests/RunCMake/CMP0039/CMP0039-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0039-OLD.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0039 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0040/CMP0040-OLD-existing-target-result.txt b/Tests/RunCMake/CMP0040/CMP0040-OLD-existing-target-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0040/CMP0040-OLD-existing-target-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0040/CMP0040-OLD-existing-target-stderr.txt b/Tests/RunCMake/CMP0040/CMP0040-OLD-existing-target-stderr.txt new file mode 100644 index 0000000..f38c03d --- /dev/null +++ b/Tests/RunCMake/CMP0040/CMP0040-OLD-existing-target-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0040-OLD-existing-target.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0040 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0040/CMP0040-OLD-missing-target-result.txt b/Tests/RunCMake/CMP0040/CMP0040-OLD-missing-target-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0040/CMP0040-OLD-missing-target-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0040/CMP0040-OLD-missing-target-stderr.txt b/Tests/RunCMake/CMP0040/CMP0040-OLD-missing-target-stderr.txt new file mode 100644 index 0000000..61f4f03 --- /dev/null +++ b/Tests/RunCMake/CMP0040/CMP0040-OLD-missing-target-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0040-OLD-missing-target.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0040 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0041/CMP0041-OLD-result.txt b/Tests/RunCMake/CMP0041/CMP0041-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0041/CMP0041-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0041/CMP0041-OLD-stderr.txt b/Tests/RunCMake/CMP0041/CMP0041-OLD-stderr.txt new file mode 100644 index 0000000..1b736da --- /dev/null +++ b/Tests/RunCMake/CMP0041/CMP0041-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0041-OLD.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0041 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-result.txt b/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-stderr.txt b/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-stderr.txt new file mode 100644 index 0000000..dbc5167 --- /dev/null +++ b/Tests/RunCMake/CMP0041/CMP0041-tid-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0041-tid-OLD.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0041 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0042/CMP0042-OLD-result.txt b/Tests/RunCMake/CMP0042/CMP0042-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0042/CMP0042-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0042/CMP0042-OLD-stderr.txt b/Tests/RunCMake/CMP0042/CMP0042-OLD-stderr.txt new file mode 100644 index 0000000..9d1488d --- /dev/null +++ b/Tests/RunCMake/CMP0042/CMP0042-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0042-OLD.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0042 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0043/CMP0043-OLD-result.txt b/Tests/RunCMake/CMP0043/CMP0043-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0043/CMP0043-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0043/CMP0043-OLD-stderr.txt b/Tests/RunCMake/CMP0043/CMP0043-OLD-stderr.txt new file mode 100644 index 0000000..ebbb361 --- /dev/null +++ b/Tests/RunCMake/CMP0043/CMP0043-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0043-OLD.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0043 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0045/CMP0045-OLD-result.txt b/Tests/RunCMake/CMP0045/CMP0045-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0045/CMP0045-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0045/CMP0045-OLD-stderr.txt b/Tests/RunCMake/CMP0045/CMP0045-OLD-stderr.txt new file mode 100644 index 0000000..0dac20f --- /dev/null +++ b/Tests/RunCMake/CMP0045/CMP0045-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0045-OLD.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0045 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0046/CMP0046-OLD-existing-dependency-stderr.txt b/Tests/RunCMake/CMP0046/CMP0046-OLD-existing-dependency-stderr.txt new file mode 100644 index 0000000..4444118 --- /dev/null +++ b/Tests/RunCMake/CMP0046/CMP0046-OLD-existing-dependency-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0046-OLD-existing-dependency.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0046 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0046/CMP0046-OLD-missing-dependency-stderr.txt b/Tests/RunCMake/CMP0046/CMP0046-OLD-missing-dependency-stderr.txt new file mode 100644 index 0000000..525954f --- /dev/null +++ b/Tests/RunCMake/CMP0046/CMP0046-OLD-missing-dependency-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0046-OLD-missing-dependency.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0046 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0049/CMP0049-OLD-result.txt b/Tests/RunCMake/CMP0049/CMP0049-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0049/CMP0049-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0049/CMP0049-OLD-stderr.txt b/Tests/RunCMake/CMP0049/CMP0049-OLD-stderr.txt new file mode 100644 index 0000000..b373970 --- /dev/null +++ b/Tests/RunCMake/CMP0049/CMP0049-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0049-OLD.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0049 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0050/CMP0050-OLD-result.txt b/Tests/RunCMake/CMP0050/CMP0050-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0050/CMP0050-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0050/CMP0050-OLD-stderr.txt b/Tests/RunCMake/CMP0050/CMP0050-OLD-stderr.txt new file mode 100644 index 0000000..3e7fa97 --- /dev/null +++ b/Tests/RunCMake/CMP0050/CMP0050-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0050-OLD.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0050 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0051/CMP0051-OLD-result.txt b/Tests/RunCMake/CMP0051/CMP0051-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/CMP0051/CMP0051-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt b/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt index cc17f33..697265e 100644 --- a/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt @@ -1 +1,12 @@ -^Sources: "empty.cpp"$ +^CMake Deprecation Warning at CMP0051-OLD.cmake:2 \(cmake_policy\): + The OLD behavior for policy CMP0051 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +Sources: "empty.cpp"$ diff --git a/Tests/RunCMake/CMP0053/CMP0053-OLD-stderr.txt b/Tests/RunCMake/CMP0053/CMP0053-OLD-stderr.txt index 836b0ff..2a0ddba 100644 --- a/Tests/RunCMake/CMP0053/CMP0053-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0053/CMP0053-OLD-stderr.txt @@ -1,2 +1,13 @@ -^called +^CMake Deprecation Warning at CMP0053-OLD.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0053 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +called --><--$ diff --git a/Tests/RunCMake/CMP0054/CMP0054-OLD-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-OLD-stderr.txt index f5a8fbe..0500280 100644 --- a/Tests/RunCMake/CMP0054/CMP0054-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0054/CMP0054-OLD-stderr.txt @@ -1 +1,10 @@ -$^ +^CMake Deprecation Warning at CMP0054-OLD.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0054/CMP0054-keywords-OLD-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-keywords-OLD-stderr.txt index f5a8fbe..60303cd 100644 --- a/Tests/RunCMake/CMP0054/CMP0054-keywords-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0054/CMP0054-keywords-OLD-stderr.txt @@ -1 +1,10 @@ -$^ +^CMake Deprecation Warning at CMP0054-keywords-OLD.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0054/CMP0054-policy-command-scope-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-policy-command-scope-stderr.txt index f5a8fbe..1b35472 100644 --- a/Tests/RunCMake/CMP0054/CMP0054-policy-command-scope-stderr.txt +++ b/Tests/RunCMake/CMP0054/CMP0054-policy-command-scope-stderr.txt @@ -1 +1,10 @@ -$^ +^CMake Deprecation Warning at CMP0054-policy-command-scope.cmake:25 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0054/CMP0054-policy-foreach-scope-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-policy-foreach-scope-stderr.txt index f5a8fbe..4eac90e 100644 --- a/Tests/RunCMake/CMP0054/CMP0054-policy-foreach-scope-stderr.txt +++ b/Tests/RunCMake/CMP0054/CMP0054-policy-foreach-scope-stderr.txt @@ -1 +1,54 @@ -$^ +^CMake Deprecation Warning at CMP0054-policy-foreach-scope.cmake:14 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at CMP0054-policy-foreach-scope.cmake:14 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at CMP0054-policy-foreach-scope.cmake:27 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at CMP0054-policy-foreach-scope.cmake:48 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at CMP0054-policy-foreach-scope.cmake:48 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0054/CMP0054-policy-nested-if-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-policy-nested-if-stderr.txt index f5a8fbe..a2dd62e 100644 --- a/Tests/RunCMake/CMP0054/CMP0054-policy-nested-if-stderr.txt +++ b/Tests/RunCMake/CMP0054/CMP0054-policy-nested-if-stderr.txt @@ -1 +1,10 @@ -$^ +^CMake Deprecation Warning at CMP0054-policy-nested-if.cmake:23 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/CMP0054/CMP0054-policy-while-scope-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-policy-while-scope-stderr.txt index f5a8fbe..718904d 100644 --- a/Tests/RunCMake/CMP0054/CMP0054-policy-while-scope-stderr.txt +++ b/Tests/RunCMake/CMP0054/CMP0054-policy-while-scope-stderr.txt @@ -1 +1,54 @@ -$^ +^CMake Deprecation Warning at CMP0054-policy-while-scope.cmake:16 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at CMP0054-policy-while-scope.cmake:16 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at CMP0054-policy-while-scope.cmake:37 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at CMP0054-policy-while-scope.cmake:58 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at CMP0054-policy-while-scope.cmake:58 \(cmake_policy\): + The OLD behavior for policy CMP0054 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt new file mode 100644 index 0000000..37747a1 --- /dev/null +++ b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt @@ -0,0 +1,8 @@ +^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): + The OLD behavior for policy CMP0052 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD.$ diff --git a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt new file mode 100644 index 0000000..37747a1 --- /dev/null +++ b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt @@ -0,0 +1,8 @@ +^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): + The OLD behavior for policy CMP0052 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD.$ diff --git a/Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt index acfa30a..0dde1bc 100644 --- a/Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt +++ b/Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt @@ -1 +1,12 @@ -^-->wrong<--$ +^CMake Deprecation Warning at CMP0053-At-OLD.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0053 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +-->wrong<--$ diff --git a/Tests/RunCMake/project/CMP0048-OLD-stderr.txt b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt new file mode 100644 index 0000000..1fa70f8 --- /dev/null +++ b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0048-OLD.cmake:1 \(cmake_policy\): + The OLD behavior for policy CMP0048 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8eb39bf24c9394efe78c6346e6e3f2244254ac97 commit 8eb39bf24c9394efe78c6346e6e3f2244254ac97 Author: Brad King AuthorDate: Wed Nov 1 10:34:42 2017 -0400 Commit: Brad King CommitDate: Wed Nov 1 10:36:21 2017 -0400 Help: Document CMP0037 relaxation of test and package targets Update documentation to account for commit ae5f40696e (CMP0037: Allow test and package targets when features are not enabled, 2017-10-26). Issue: #16062 diff --git a/Help/policy/CMP0037.rst b/Help/policy/CMP0037.rst index 9f8457c..8041960 100644 --- a/Help/policy/CMP0037.rst +++ b/Help/policy/CMP0037.rst @@ -14,7 +14,12 @@ character (_), dot(.), plus(+) and minus(-). As a special case, ALIAS targets and IMPORTED targets may contain two consequtive colons. Target names reserved by one or more CMake generators are not allowed. -Among others these include "all", "help" and "test". +Among others these include "all", "clean", "help", and "install". + +Target names associated with optional features, such as "test" and "package", +may also be reserved. CMake 3.10 and below always reserve them. CMake 3.11 +and above reserve them only when the corresponding feature is enabled +(e.g. by including the :module:`CTest` or :module:`CPack` modules). The OLD behavior for this policy is to allow creating targets with reserved names or which do not match the validity pattern. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7576e9f8a30bb50a3157fe5e3ec493be8a9299bc commit 7576e9f8a30bb50a3157fe5e3ec493be8a9299bc Merge: a57bad6 7d3f33e Author: Brad King AuthorDate: Wed Nov 1 08:38:26 2017 -0400 Commit: Brad King CommitDate: Wed Nov 1 08:38:26 2017 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-11-01 (6ffca34c) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d3f33e6129232a6814af47a19a72fd500414508 commit 7d3f33e6129232a6814af47a19a72fd500414508 Author: KWSys Upstream AuthorDate: Wed Nov 1 07:44:18 2017 -0400 Commit: Brad King CommitDate: Wed Nov 1 08:38:25 2017 -0400 KWSys 2017-11-01 (6ffca34c) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 6ffca34c008f0aac44db0e0c2826673a0e3f6ecf (master). Upstream Shortlog ----------------- Brad King (2): 7a4cca11 Process: Refactor test compile flag addition 90886a99 Process: Fix tests under ubsan Bradley Lowekamp (1): b4507c9c Remove dead code from Configure.h.in Domen Vrankar (1): 9e0b4d1a SystemTools: set default MakeDirectory permissions mode diff --git a/CMakeLists.txt b/CMakeLists.txt index f36f9b6..e4406e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1147,17 +1147,22 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) SET_TESTS_PROPERTIES(kwsys.testProcess-${n} PROPERTIES TIMEOUT 120) ENDFOREACH() + SET(testProcess_COMPILE_FLAGS "") # Some Apple compilers produce bad optimizations in this source. IF(APPLE AND CMAKE_C_COMPILER_ID MATCHES "^(GNU|LLVM)$") - SET_SOURCE_FILES_PROPERTIES(testProcess.c PROPERTIES COMPILE_FLAGS -O0) + STRING(APPEND testProcess_COMPILE_FLAGS " -O0") ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "XL" AND NOT (CMAKE_SYSTEM MATCHES "Linux.*ppc64le" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "13.1.1")) # Tell IBM XL not to warn about our test infinite loop # v13.1.1 and newer on Linux ppc64le is clang based and does not accept # the -qsuppress option - SET_PROPERTY(SOURCE testProcess.c PROPERTY COMPILE_FLAGS -qsuppress=1500-010) + STRING(APPEND testProcess_COMPILE_FLAGS " -qsuppress=1500-010") ENDIF() + IF(CMAKE_C_FLAGS MATCHES "-fsanitize=") + STRING(APPEND testProcess_COMPILE_FLAGS " -DCRASH_USING_ABORT") + ENDIF() + SET_PROPERTY(SOURCE testProcess.c PROPERTY COMPILE_FLAGS "${testProcess_COMPILE_FLAGS}") # Test SharedForward CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/testSharedForward.c.in diff --git a/Configure.h.in b/Configure.h.in index 0afcae7..224047a 100644 --- a/Configure.h.in +++ b/Configure.h.in @@ -62,9 +62,6 @@ !defined(@KWSYS_NAMESPACE at _LFS_NO_DEFINE_FILE_OFFSET_BITS) #define _FILE_OFFSET_BITS 64 #endif -#if 0 && (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS < 64) -#error "_FILE_OFFSET_BITS must be defined to at least 64" -#endif #endif #endif diff --git a/SystemTools.cxx b/SystemTools.cxx index a24a326..72babc3 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -751,15 +751,15 @@ FILE* SystemTools::Fopen(const std::string& file, const char* mode) #endif } -bool SystemTools::MakeDirectory(const char* path) +bool SystemTools::MakeDirectory(const char* path, const mode_t* mode) { if (!path) { return false; } - return SystemTools::MakeDirectory(std::string(path)); + return SystemTools::MakeDirectory(std::string(path), mode); } -bool SystemTools::MakeDirectory(const std::string& path) +bool SystemTools::MakeDirectory(const std::string& path, const mode_t* mode) { if (SystemTools::PathExists(path)) { return SystemTools::FileIsDirectory(path); @@ -774,8 +774,12 @@ bool SystemTools::MakeDirectory(const std::string& path) std::string topdir; while ((pos = dir.find('/', pos)) != std::string::npos) { topdir = dir.substr(0, pos); - Mkdir(topdir); - pos++; + + if (Mkdir(topdir) == 0 && mode != 0) { + SystemTools::SetPermissions(topdir, *mode); + } + + ++pos; } topdir = dir; if (Mkdir(topdir) != 0) { @@ -790,7 +794,10 @@ bool SystemTools::MakeDirectory(const std::string& path) ) { return false; } + } else if (mode != 0) { + SystemTools::SetPermissions(topdir, *mode); } + return true; } diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in index 35bc1b1..3d109a8 100644 --- a/SystemTools.hxx.in +++ b/SystemTools.hxx.in @@ -553,13 +553,20 @@ public: */ static FILE* Fopen(const std::string& file, const char* mode); +/** + * Visual C++ does not define mode_t (note that Borland does, however). + */ +#if defined(_MSC_VER) + typedef unsigned short mode_t; +#endif + /** * Make a new directory if it is not there. This function * can make a full path even if none of the directories existed * prior to calling this function. */ - static bool MakeDirectory(const char* path); - static bool MakeDirectory(const std::string& path); + static bool MakeDirectory(const char* path, const mode_t* mode = 0); + static bool MakeDirectory(const std::string& path, const mode_t* mode = 0); /** * Copy the source file to the destination file only @@ -749,13 +756,6 @@ public: */ static long int CreationTime(const std::string& filename); -/** - * Visual C++ does not define mode_t (note that Borland does, however). - */ -#if defined(_MSC_VER) - typedef unsigned short mode_t; -#endif - /** * Get and set permissions of the file. If honor_umask is set, the umask * is queried and applied to the given permissions. Returns false if diff --git a/testProcess.c b/testProcess.c index cd817d9..4b4978d 100644 --- a/testProcess.c +++ b/testProcess.c @@ -107,6 +107,7 @@ static int test3(int argc, const char* argv[]) static int test4(int argc, const char* argv[]) { +#ifndef CRASH_USING_ABORT /* Prepare a pointer to an invalid address. Don't use null, because dereferencing null is undefined behaviour and compilers are free to do whatever they want. ex: Clang will warn at compile time, or even @@ -114,6 +115,7 @@ static int test4(int argc, const char* argv[]) 'volatile' and a slightly larger address, based on a runtime value. */ volatile int* invalidAddress = 0; invalidAddress += argc ? 1 : 2; +#endif #if defined(_WIN32) /* Avoid error diagnostic popups since we are crashing on purpose. */ @@ -128,9 +130,13 @@ static int test4(int argc, const char* argv[]) fprintf(stderr, "Output before crash on stderr from crash test.\n"); fflush(stdout); fflush(stderr); +#ifdef CRASH_USING_ABORT + abort(); +#else assert(invalidAddress); /* Quiet Clang scan-build. */ /* Provoke deliberate crash by writing to the invalid address. */ *invalidAddress = 0; +#endif fprintf(stdout, "Output after crash on stdout from crash test.\n"); fprintf(stderr, "Output after crash on stderr from crash test.\n"); return 0; @@ -149,7 +155,12 @@ static int test5(int argc, const char* argv[]) fprintf(stderr, "Output on stderr before recursive test.\n"); fflush(stdout); fflush(stderr); - r = runChild(cmd, kwsysProcess_State_Exception, kwsysProcess_Exception_Fault, + r = runChild(cmd, kwsysProcess_State_Exception, +#ifdef CRASH_USING_ABORT + kwsysProcess_Exception_Other, +#else + kwsysProcess_Exception_Fault, +#endif 1, 1, 1, 0, 15, 0, 1, 0, 0, 0); fprintf(stdout, "Output on stdout after recursive test.\n"); fprintf(stderr, "Output on stderr after recursive test.\n"); @@ -628,11 +639,16 @@ int main(int argc, const char* argv[]) kwsysProcess_State_Exception /* Process group test */ }; int exceptions[10] = { - kwsysProcess_Exception_None, kwsysProcess_Exception_None, - kwsysProcess_Exception_None, kwsysProcess_Exception_Fault, - kwsysProcess_Exception_None, kwsysProcess_Exception_None, - kwsysProcess_Exception_None, kwsysProcess_Exception_None, - kwsysProcess_Exception_None, kwsysProcess_Exception_Interrupt + kwsysProcess_Exception_None, kwsysProcess_Exception_None, + kwsysProcess_Exception_None, +#ifdef CRASH_USING_ABORT + kwsysProcess_Exception_Other, +#else + kwsysProcess_Exception_Fault, +#endif + kwsysProcess_Exception_None, kwsysProcess_Exception_None, + kwsysProcess_Exception_None, kwsysProcess_Exception_None, + kwsysProcess_Exception_None, kwsysProcess_Exception_Interrupt }; int values[10] = { 0, 123, 1, 1, 0, 0, 0, 0, 1, 1 }; int shares[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 }; ----------------------------------------------------------------------- Summary of changes: Help/policy/CMP0037.rst | 7 ++- Help/release/dev/deprecate-policy-old.rst | 8 +++ Source/cmMakefile.cxx | 2 +- Source/kwsys/CMakeLists.txt | 9 +++- Source/kwsys/Configure.h.in | 3 -- Source/kwsys/SystemTools.cxx | 17 ++++-- Source/kwsys/SystemTools.hxx.in | 18 +++---- Source/kwsys/testProcess.c | 28 +++++++--- .../CMP0037/CMP0037-OLD-reserved-result.txt | 1 - .../CMP0037/CMP0037-OLD-reserved-stderr.txt | 10 ++++ .../RunCMake/CMP0037/CMP0037-OLD-space-result.txt | 1 - .../RunCMake/CMP0037/CMP0037-OLD-space-stderr.txt | 10 ++++ Tests/RunCMake/CMP0037/OLD-cond-package-stderr.txt | 10 ++++ .../CMP0037/OLD-cond-package_source-stderr.txt | 10 ++++ Tests/RunCMake/CMP0037/OLD-cond-stderr.txt | 10 ++++ Tests/RunCMake/CMP0037/OLD-cond-test-stderr.txt | 10 ++++ Tests/RunCMake/CMP0038/CMP0038-OLD-result.txt | 1 - Tests/RunCMake/CMP0038/CMP0038-OLD-stderr.txt | 10 ++++ Tests/RunCMake/CMP0039/CMP0039-OLD-result.txt | 1 - Tests/RunCMake/CMP0039/CMP0039-OLD-stderr.txt | 10 ++++ .../CMP0040/CMP0040-OLD-existing-target-result.txt | 1 - .../CMP0040/CMP0040-OLD-existing-target-stderr.txt | 10 ++++ .../CMP0040/CMP0040-OLD-missing-target-result.txt | 1 - .../CMP0040/CMP0040-OLD-missing-target-stderr.txt | 10 ++++ Tests/RunCMake/CMP0041/CMP0041-OLD-result.txt | 1 - Tests/RunCMake/CMP0041/CMP0041-OLD-stderr.txt | 10 ++++ Tests/RunCMake/CMP0041/CMP0041-tid-OLD-result.txt | 1 - Tests/RunCMake/CMP0041/CMP0041-tid-OLD-stderr.txt | 10 ++++ Tests/RunCMake/CMP0042/CMP0042-OLD-result.txt | 1 - Tests/RunCMake/CMP0042/CMP0042-OLD-stderr.txt | 10 ++++ Tests/RunCMake/CMP0043/CMP0043-OLD-result.txt | 1 - Tests/RunCMake/CMP0043/CMP0043-OLD-stderr.txt | 10 ++++ Tests/RunCMake/CMP0045/CMP0045-OLD-result.txt | 1 - Tests/RunCMake/CMP0045/CMP0045-OLD-stderr.txt | 10 ++++ .../CMP0046-OLD-existing-dependency-stderr.txt | 10 ++++ .../CMP0046-OLD-missing-dependency-stderr.txt | 10 ++++ Tests/RunCMake/CMP0049/CMP0049-OLD-result.txt | 1 - Tests/RunCMake/CMP0049/CMP0049-OLD-stderr.txt | 10 ++++ Tests/RunCMake/CMP0050/CMP0050-OLD-result.txt | 1 - Tests/RunCMake/CMP0050/CMP0050-OLD-stderr.txt | 10 ++++ Tests/RunCMake/CMP0051/CMP0051-OLD-result.txt | 1 - Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt | 13 ++++- Tests/RunCMake/CMP0053/CMP0053-OLD-stderr.txt | 13 ++++- Tests/RunCMake/CMP0054/CMP0054-OLD-stderr.txt | 11 +++- .../CMP0054/CMP0054-keywords-OLD-stderr.txt | 11 +++- .../CMP0054-policy-command-scope-stderr.txt | 11 +++- .../CMP0054-policy-foreach-scope-stderr.txt | 55 +++++++++++++++++++- .../CMP0054/CMP0054-policy-nested-if-stderr.txt | 11 +++- .../CMP0054/CMP0054-policy-while-scope-stderr.txt | 55 +++++++++++++++++++- .../BinInInstallPrefix-CMP0052-OLD-stderr.txt | 8 +++ .../SrcInInstallPrefix-CMP0052-OLD-stderr.txt | 8 +++ Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt | 13 ++++- Tests/RunCMake/project/CMP0048-OLD-stderr.txt | 10 ++++ 53 files changed, 465 insertions(+), 50 deletions(-) create mode 100644 Help/release/dev/deprecate-policy-old.rst delete mode 100644 Tests/RunCMake/CMP0037/CMP0037-OLD-reserved-result.txt create mode 100644 Tests/RunCMake/CMP0037/CMP0037-OLD-reserved-stderr.txt delete mode 100644 Tests/RunCMake/CMP0037/CMP0037-OLD-space-result.txt create mode 100644 Tests/RunCMake/CMP0037/CMP0037-OLD-space-stderr.txt create mode 100644 Tests/RunCMake/CMP0037/OLD-cond-package-stderr.txt create mode 100644 Tests/RunCMake/CMP0037/OLD-cond-package_source-stderr.txt create mode 100644 Tests/RunCMake/CMP0037/OLD-cond-stderr.txt create mode 100644 Tests/RunCMake/CMP0037/OLD-cond-test-stderr.txt delete mode 100644 Tests/RunCMake/CMP0038/CMP0038-OLD-result.txt create mode 100644 Tests/RunCMake/CMP0038/CMP0038-OLD-stderr.txt delete mode 100644 Tests/RunCMake/CMP0039/CMP0039-OLD-result.txt create mode 100644 Tests/RunCMake/CMP0039/CMP0039-OLD-stderr.txt delete mode 100644 Tests/RunCMake/CMP0040/CMP0040-OLD-existing-target-result.txt create mode 100644 Tests/RunCMake/CMP0040/CMP0040-OLD-existing-target-stderr.txt delete mode 100644 Tests/RunCMake/CMP0040/CMP0040-OLD-missing-target-result.txt create mode 100644 Tests/RunCMake/CMP0040/CMP0040-OLD-missing-target-stderr.txt delete mode 100644 Tests/RunCMake/CMP0041/CMP0041-OLD-result.txt create mode 100644 Tests/RunCMake/CMP0041/CMP0041-OLD-stderr.txt delete mode 100644 Tests/RunCMake/CMP0041/CMP0041-tid-OLD-result.txt create mode 100644 Tests/RunCMake/CMP0041/CMP0041-tid-OLD-stderr.txt delete mode 100644 Tests/RunCMake/CMP0042/CMP0042-OLD-result.txt create mode 100644 Tests/RunCMake/CMP0042/CMP0042-OLD-stderr.txt delete mode 100644 Tests/RunCMake/CMP0043/CMP0043-OLD-result.txt create mode 100644 Tests/RunCMake/CMP0043/CMP0043-OLD-stderr.txt delete mode 100644 Tests/RunCMake/CMP0045/CMP0045-OLD-result.txt create mode 100644 Tests/RunCMake/CMP0045/CMP0045-OLD-stderr.txt create mode 100644 Tests/RunCMake/CMP0046/CMP0046-OLD-existing-dependency-stderr.txt create mode 100644 Tests/RunCMake/CMP0046/CMP0046-OLD-missing-dependency-stderr.txt delete mode 100644 Tests/RunCMake/CMP0049/CMP0049-OLD-result.txt create mode 100644 Tests/RunCMake/CMP0049/CMP0049-OLD-stderr.txt delete mode 100644 Tests/RunCMake/CMP0050/CMP0050-OLD-result.txt create mode 100644 Tests/RunCMake/CMP0050/CMP0050-OLD-stderr.txt delete mode 100644 Tests/RunCMake/CMP0051/CMP0051-OLD-result.txt create mode 100644 Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt create mode 100644 Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt create mode 100644 Tests/RunCMake/project/CMP0048-OLD-stderr.txt hooks/post-receive -- CMake From kwrobot at kitware.com Thu Nov 2 16:35:15 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 2 Nov 2017 16:35:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-203-g1fc31f2 Message-ID: <20171102203515.8B3CBFEAAB@public.kitware.com> 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 1fc31f2f432ea8d0108e9c7d9662b05c391e84d1 (commit) via e26015347a6ae0185ae49b17efa40e6d4731ef16 (commit) from 817331aae8c9f166baa7ada5e015dcb5442c0038 (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=1fc31f2f432ea8d0108e9c7d9662b05c391e84d1 commit 1fc31f2f432ea8d0108e9c7d9662b05c391e84d1 Merge: 817331a e260153 Author: Craig Scott AuthorDate: Thu Nov 2 20:31:34 2017 +0000 Commit: Kitware Robot CommitDate: Thu Nov 2 16:32:05 2017 -0400 Merge topic 'cross_link_CheckLanguage_enable_language' e2601534 Help: enable_language now documents the CheckLanguage module Acked-by: Kitware Robot Merge-request: !1434 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e26015347a6ae0185ae49b17efa40e6d4731ef16 commit e26015347a6ae0185ae49b17efa40e6d4731ef16 Author: Robert Maynard AuthorDate: Tue Oct 31 14:18:22 2017 -0400 Commit: Robert Maynard CommitDate: Tue Oct 31 19:15:49 2017 -0400 Help: enable_language now documents the CheckLanguage module Resolves #17409 diff --git a/Help/command/enable_language.rst b/Help/command/enable_language.rst index 4445561..871ac4e 100644 --- a/Help/command/enable_language.rst +++ b/Help/command/enable_language.rst @@ -19,4 +19,5 @@ indirectly through link dependencies. It is simplest to enable all needed languages in the top-level directory of a project. The ``OPTIONAL`` keyword is a placeholder for future implementation and -does not currently work. +does not currently work. Instead you can use the :module:`CheckLanguage` +module to verify support before enabling. ----------------------------------------------------------------------- Summary of changes: Help/command/enable_language.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Nov 3 00:05:11 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 3 Nov 2017 00:05:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-204-gd802f35 Message-ID: <20171103040511.52F2BFDF29@public.kitware.com> 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 d802f357d79244ed6d1e3e796162730aabb11205 (commit) from 1fc31f2f432ea8d0108e9c7d9662b05c391e84d1 (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=d802f357d79244ed6d1e3e796162730aabb11205 commit d802f357d79244ed6d1e3e796162730aabb11205 Author: Kitware Robot AuthorDate: Fri Nov 3 00:01:12 2017 -0400 Commit: Kitware Robot CommitDate: Fri Nov 3 00:01:12 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e730358..63d6fac 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20171102) +set(CMake_VERSION_PATCH 20171103) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Nov 3 08:55:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 3 Nov 2017 08:55:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-206-g51e0d61 Message-ID: <20171103125504.7F39CFDF4E@public.kitware.com> 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 51e0d611f5732c40bf31662a0ba5e43cca0d40a6 (commit) via ea09ee0cc35440a2005869d4828d8894ab268a28 (commit) from d802f357d79244ed6d1e3e796162730aabb11205 (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=51e0d611f5732c40bf31662a0ba5e43cca0d40a6 commit 51e0d611f5732c40bf31662a0ba5e43cca0d40a6 Merge: d802f35 ea09ee0 Author: Brad King AuthorDate: Fri Nov 3 08:49:47 2017 -0400 Commit: Brad King CommitDate: Fri Nov 3 08:49:47 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea09ee0cc35440a2005869d4828d8894ab268a28 commit ea09ee0cc35440a2005869d4828d8894ab268a28 Author: Brad King AuthorDate: Fri Nov 3 07:47:39 2017 -0400 Commit: Brad King CommitDate: Fri Nov 3 07:47:39 2017 -0400 CMake 3.9.5 diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ecf5116..cf7efe0 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 9) -set(CMake_VERSION_PATCH 4) +set(CMake_VERSION_PATCH 5) #set(CMake_VERSION_RC 0) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Fri Nov 3 09:25:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 3 Nov 2017 09:25:03 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.9.5, created. v3.9.5 Message-ID: <20171103132503.A252BFEAAD@public.kitware.com> 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 annotated tag, v3.9.5 has been created at f953b57ee964dd3a6a9726903e74d6ec4e4e1e78 (tag) tagging ea09ee0cc35440a2005869d4828d8894ab268a28 (commit) replaces v3.9.4 tagged by Brad King on Fri Nov 3 08:48:11 2017 -0400 - Log ----------------------------------------------------------------- CMake 3.9.5 -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEExsJlMku+vcNQtRPQLSzvEDSSFoQFAln8ZYsWHGJyYWQua2lu Z0BraXR3YXJlLmNvbQAKCRAtLO8QNJIWhBzzD/4xOPV+6FeEU0ITmxQ4jFVEv5U6 FlkGaakSONWRcd7z5oIwd7ZK+LgXGj2SxwL8jQ9BL1oIXWWQ+aCGu+Q3uBeJ+EyB p/SXK1eBF+fG2hhvOJI7MgFjd5pElWBJ8jCq7szrgxq85nuHYs+dMUof1v0NTLSV a9vgSN3d9gDiq5/sC0Bs7fAFFfymcJ57+0kB9jSOMK5B4YjtX+xLdtIGK62fecY4 pyEB8ycGTKoz6Jsgudo36QvAmKOShH9dA6rt9DH+jsv+Vg21uXKlFVKNn4L4dM9/ F/+vbk3b9DJZj/H32nF0EnDg8e3wrz9kB2ca9UIo7C6KjwJzu3zQgYDXpfRqpm5M z3gd8WA3vR18XbBauW5ZFTnIdJFdH6soqHshQc9RCEYKd1jKDPn4OkI5su8VMmHV m8BImKWshLDm5MObwQd40XVQRCSXPN2Tg/mfEO7qkpAEXtofBC1gAu3oial5PKMl UiIR1co+RA49moYkWj1BfNwfKBcJw3axiSaOrYtOVjYNq1gi+45/9qWr3C7Fz58e +OVO7tIbH+Vv40w7payl2sjtkT7wI2UQPHJGXc11B1jdoUZLvg2HlsqKNQ3TIF0V qUZoQBCZU7ah1nstfkvCDxcikSh0OKXtLVXUH7Np63JnB/bMFwDlkaH8dcWCP9Md 2tStjxLxcoD8RaNc4w== =XrjQ -----END PGP SIGNATURE----- Brad King (2): Merge branch 'backport-3.9-autogen-moc-predefs-no-moc-options' into release-3.9 CMake 3.9.5 Sebastian Holtermann (1): Autogen: Don't add AUTOMOC_MOC_OPTIONS to moc-predefs command ----------------------------------------------------------------------- hooks/post-receive -- CMake From kwrobot at kitware.com Sat Nov 4 00:05:10 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 4 Nov 2017 00:05:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-207-g277994e Message-ID: <20171104040510.D8AA1FFE17@public.kitware.com> 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 277994eb43b6759dcb1f986b24aca614e5c4b9e0 (commit) from 51e0d611f5732c40bf31662a0ba5e43cca0d40a6 (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=277994eb43b6759dcb1f986b24aca614e5c4b9e0 commit 277994eb43b6759dcb1f986b24aca614e5c4b9e0 Author: Kitware Robot AuthorDate: Sat Nov 4 00:01:12 2017 -0400 Commit: Kitware Robot CommitDate: Sat Nov 4 00:01:12 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 63d6fac..96e8e36 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20171103) +set(CMake_VERSION_PATCH 20171104) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Nov 5 00:05:16 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 5 Nov 2017 00:05:16 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-208-gc2e130e Message-ID: <20171105040519.6EF911022C4@public.kitware.com> 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 c2e130e8f4c09c20fadf67c6c12a3734261c4803 (commit) from 277994eb43b6759dcb1f986b24aca614e5c4b9e0 (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=c2e130e8f4c09c20fadf67c6c12a3734261c4803 commit c2e130e8f4c09c20fadf67c6c12a3734261c4803 Author: Kitware Robot AuthorDate: Sun Nov 5 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Sun Nov 5 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 96e8e36..a74c188 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20171104) +set(CMake_VERSION_PATCH 20171105) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Nov 6 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 6 Nov 2017 00:05:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-209-g3d6e45a Message-ID: <20171106050504.AE850102ADF@public.kitware.com> 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 3d6e45af611983d85b130b4f874d862f7d998013 (commit) from c2e130e8f4c09c20fadf67c6c12a3734261c4803 (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=3d6e45af611983d85b130b4f874d862f7d998013 commit 3d6e45af611983d85b130b4f874d862f7d998013 Author: Kitware Robot AuthorDate: Mon Nov 6 00:01:06 2017 -0500 Commit: Kitware Robot CommitDate: Mon Nov 6 00:01:06 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a74c188..e98e129 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20171105) +set(CMake_VERSION_PATCH 20171106) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Nov 6 09:05:53 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 6 Nov 2017 09:05:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-230-gb104bcf Message-ID: <20171106140553.313CE1029A8@public.kitware.com> 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 b104bcfd98add349f7624887073c79a84ae41c44 (commit) via 62d736f74ad2eaa737d37ba0b30c8a137782537b (commit) via 6a54dbe8caeaaa78a8ac78b282d80128f0201f9a (commit) via bccd442f7183de1da8e97cfd4a4be2d3b21a807c (commit) via 73db89c2c2d997f6e1992dd1eab05e54792bd164 (commit) via 2dabcebf3ce1b331c723055322b3fbe2e8ab482d (commit) via 4c626b7e43c27de0dce4b8af15290cce861f9dc8 (commit) via 4bd5af6302f0b7bafecf9ca7919287fe4d3f09e0 (commit) via 0ce082b7c823c0f88fbb329ca05d69a8f60f3851 (commit) via 36346de4809bf443ca9ca8daea2bdc1af7874b68 (commit) via bbc9c96691c06cdcff0227ad8292e2a2ea60ec00 (commit) via 701a637e4d0294ad76df7c11244c9b9b2e84716d (commit) via 777e87ae00e8920bd6bf971fb40a07e373061500 (commit) via 3048777006e1d10646e7b62f46406859dc4d0812 (commit) via 5464e23ff5e822b8a99a3cd234c54ff4632ccb98 (commit) via f61052ad390773610e14367c14fb53ad2e6b789e (commit) via 39c2feaf8c4dcb9c3a30c68a066fb70e126d7fe6 (commit) via f5d2988ea7cc60778dbaa21860aad264c7aa7a81 (commit) via 2636d86ce2f45f06bdcf4cb60c15df55838a3aa7 (commit) via d46b4ba83532d8954e473a26112288cd8e693775 (commit) via 08dca58358c95a41615150513a006379c4ee7825 (commit) from 3d6e45af611983d85b130b4f874d862f7d998013 (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=b104bcfd98add349f7624887073c79a84ae41c44 commit b104bcfd98add349f7624887073c79a84ae41c44 Merge: 62d736f 777e87a Author: Brad King AuthorDate: Mon Nov 6 14:01:52 2017 +0000 Commit: Kitware Robot CommitDate: Mon Nov 6 09:02:23 2017 -0500 Merge topic 'typos' 777e87ae Fix trivial typos in text Acked-by: Kitware Robot Merge-request: !1442 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62d736f74ad2eaa737d37ba0b30c8a137782537b commit 62d736f74ad2eaa737d37ba0b30c8a137782537b Merge: 6a54dbe 4c626b7 Author: Brad King AuthorDate: Mon Nov 6 13:58:04 2017 +0000 Commit: Kitware Robot CommitDate: Mon Nov 6 09:01:49 2017 -0500 Merge topic 'test-contract-refactor' 4c626b7e Tests: Refactor contract test activation 4bd5af63 Tests: Factor out contract test HOME finding 0ce082b7 Tests: Drop unused contract test environment script 36346de4 Tests: Drop unused contract test bbc9c966 Tests: Honor already-set CTEST_REAL_HOME in case of repeat run Acked-by: Kitware Robot Merge-request: !1444 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a54dbe8caeaaa78a8ac78b282d80128f0201f9a commit 6a54dbe8caeaaa78a8ac78b282d80128f0201f9a Merge: bccd442 701a637 Author: Brad King AuthorDate: Mon Nov 6 13:55:19 2017 +0000 Commit: Kitware Robot CommitDate: Mon Nov 6 09:00:44 2017 -0500 Merge topic 'test-crash-ubsan' 701a637e Tests: Fix CTestTestCrash test under ubsan Acked-by: Kitware Robot Merge-request: !1443 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bccd442f7183de1da8e97cfd4a4be2d3b21a807c commit bccd442f7183de1da8e97cfd4a4be2d3b21a807c Merge: 73db89c f61052a Author: Brad King AuthorDate: Mon Nov 6 13:54:58 2017 +0000 Commit: Kitware Robot CommitDate: Mon Nov 6 08:59:36 2017 -0500 Merge topic 'bzip2-windows' f61052ad FindBZip2: Normalize slashes when legacy BZIP2_LIBRARIES is specified Acked-by: Kitware Robot Merge-request: !1439 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73db89c2c2d997f6e1992dd1eab05e54792bd164 commit 73db89c2c2d997f6e1992dd1eab05e54792bd164 Merge: 2dabceb 39c2fea Author: Brad King AuthorDate: Mon Nov 6 13:56:33 2017 +0000 Commit: Kitware Robot CommitDate: Mon Nov 6 08:58:11 2017 -0500 Merge topic 'server-refactor' 39c2feaf misc: Added utility method to allow working with stacks f5d2988e server: Swapped to cm_thread impl 2636d86c utility: Added minimal std::thread drop-in d46b4ba8 server: Updated server tests to try various communication channels 08dca583 Tests: reworked server tests to allow other operation modes Acked-by: Kitware Robot Merge-request: !1230 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2dabcebf3ce1b331c723055322b3fbe2e8ab482d commit 2dabcebf3ce1b331c723055322b3fbe2e8ab482d Merge: 3d6e45a 3048777 Author: Brad King AuthorDate: Mon Nov 6 13:54:39 2017 +0000 Commit: Kitware Robot CommitDate: Mon Nov 6 08:55:35 2017 -0500 Merge topic 'update-kwsys' 30487770 Merge branch 'upstream-KWSys' into update-kwsys 5464e23f KWSys 2017-11-02 (54f0901a) Acked-by: Kitware Robot Merge-request: !1440 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c626b7e43c27de0dce4b8af15290cce861f9dc8 commit 4c626b7e43c27de0dce4b8af15290cce861f9dc8 Author: Brad King AuthorDate: Mon Oct 30 10:48:05 2017 -0400 Commit: Brad King CommitDate: Fri Nov 3 11:35:06 2017 -0400 Tests: Refactor contract test activation Use separate `CMake_TEST_CONTRACT_` variables for each test. Make the set of possible tests match what is in the source tree. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index bd44b17..5a149c8 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3388,31 +3388,30 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release set_property(TEST CMakeWizardTest PROPERTY PASS_REGULAR_EXPRESSION "The \"cmake -i\" wizard mode is no longer supported.") - # If the cache variable CMAKE_CONTRACT_PROJECTS is set - # then the dashboard will run a contract with CMake test of that - # name. For example CMAKE_CONTRACT_PROJECTS = vtk542 would run - # the vtk542 contract test. - # For each Contract test, the project should provide a directory - # with at least one CMakeLists.txt file that uses ExternalProject - # to download and configure the project. The directory should also - # contain a RunTest.cmake file that has a single set of the format: - # set(project_RUN_TEST testToRun) - # The testToRun should be a test executable that can be run to - # smoke test the build. - foreach(project ${CMAKE_CONTRACT_PROJECTS}) - include(Contracts/${project}/RunTest.cmake) - ADD_TEST_MACRO(Contracts.${project} - ${${project}_RUN_TEST}) - # Contract test timeout in seconds. - # Default to 6 hours. - if(DEFINED ${project}_TEST_TIMEOUT) - set(timeout ${${project}_TEST_TIMEOUT}) - elseif(CMAKE_CONTRACT_TEST_TIMEOUT_DEFAULT) - set(timeout ${CMAKE_CONTRACT_TEST_TIMEOUT_DEFAULT}) - else() - set(timeout 21600) + # Define a set of "contract" tests, each activated by a cache entry + # named "CMake_TEST_CONTRACT_". For each Contract test, + # the project should provide a directory with a CMakeLists.txt file + # that uses ExternalProject to download and configure the project. + # The directory should also contain a Configure.cmake file that + # sets "CMake_TEST_CONTRACT__" variables to configure + # the code below. + foreach(project + Trilinos + VTK + ) + if(CMake_TEST_CONTRACT_${project}) + include(Contracts/${project}/Configure.cmake) + ADD_TEST_MACRO(Contracts.${project} ${CMake_TEST_CONTRACT_${project}_RUN_TEST}) + # The external projects may take a long time to build. + if(DEFINED CMake_TEST_CONTRACT_${project}_TIMEOUT) + set(timeout ${CMake_TEST_CONTRACT_${project}_TIMEOUT}) + elseif(CMake_TEST_CONTRACT_DEFAULT_TIMEOUT) + set(timeout ${CMake_TEST_CONTRACT_DEFAULT_TIMEOUT}) + else() + set(timeout 21600) + endif() + set_property(TEST Contracts.${project} PROPERTY TIMEOUT "${timeout}") endif() - set_tests_properties(Contracts.${project} PROPERTIES TIMEOUT ${timeout}) endforeach() if(TEST_CompileCommandOutput) diff --git a/Tests/Contracts/Trilinos/RunTest.cmake b/Tests/Contracts/Trilinos/Configure.cmake similarity index 78% rename from Tests/Contracts/Trilinos/RunTest.cmake rename to Tests/Contracts/Trilinos/Configure.cmake index d661a4c..d62eb79 100644 --- a/Tests/Contracts/Trilinos/RunTest.cmake +++ b/Tests/Contracts/Trilinos/Configure.cmake @@ -4,4 +4,4 @@ set(dir "${CMAKE_CURRENT_BINARY_DIR}/Contracts/${project}") set(exe "${CMAKE_COMMAND}") set(args -P "${dir}/ValidateBuild.cmake") -set(Trilinos_RUN_TEST ${exe} ${args}) +set(CMake_TEST_CONTRACT_Trilinos_RUN_TEST ${exe} ${args}) diff --git a/Tests/Contracts/VTK/RunTest.cmake b/Tests/Contracts/VTK/Configure.cmake similarity index 65% rename from Tests/Contracts/VTK/RunTest.cmake rename to Tests/Contracts/VTK/Configure.cmake index 65285cf..037d75a 100644 --- a/Tests/Contracts/VTK/RunTest.cmake +++ b/Tests/Contracts/VTK/Configure.cmake @@ -1,3 +1,3 @@ set(exe "$ENV{HOME}/.cmake/Contracts/VTK/VTK-build/bin/vtkCommonCoreCxxTests") set(args otherArrays) -set(VTK_RUN_TEST ${exe} ${args}) +set(CMake_TEST_CONTRACT_VTK_RUN_TEST ${exe} ${args}) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bd5af6302f0b7bafecf9ca7919287fe4d3f09e0 commit 4bd5af6302f0b7bafecf9ca7919287fe4d3f09e0 Author: Brad King AuthorDate: Thu Oct 26 15:43:29 2017 -0400 Commit: Brad King CommitDate: Fri Nov 3 11:35:06 2017 -0400 Tests: Factor out contract test HOME finding diff --git a/Tests/Contracts/Home.cmake b/Tests/Contracts/Home.cmake new file mode 100644 index 0000000..8b05e81 --- /dev/null +++ b/Tests/Contracts/Home.cmake @@ -0,0 +1,19 @@ +# Find a home in which to build. +if(NOT DEFINED HOME) + if(DEFINED ENV{CTEST_REAL_HOME}) + set(HOME "$ENV{CTEST_REAL_HOME}") + else() + set(HOME "$ENV{HOME}") + endif() + + if(NOT HOME AND WIN32) + # Try for USERPROFILE as HOME equivalent: + string(REPLACE "\\" "/" HOME "$ENV{USERPROFILE}") + + # But just use root of SystemDrive if USERPROFILE contains any spaces: + # (Default on XP and earlier...) + if(HOME MATCHES " ") + string(REPLACE "\\" "/" HOME "$ENV{SystemDrive}") + endif() + endif() +endif() diff --git a/Tests/Contracts/Trilinos/CMakeLists.txt b/Tests/Contracts/Trilinos/CMakeLists.txt index 8d74ca5..4d7062b 100644 --- a/Tests/Contracts/Trilinos/CMakeLists.txt +++ b/Tests/Contracts/Trilinos/CMakeLists.txt @@ -6,24 +6,7 @@ include(ExternalProject) include("${CMAKE_CURRENT_SOURCE_DIR}/LocalOverrides.cmake" OPTIONAL) include("${CMAKE_CURRENT_BINARY_DIR}/LocalOverrides.cmake" OPTIONAL) -if(NOT DEFINED HOME) - if(DEFINED ENV{CTEST_REAL_HOME}) - set(HOME "$ENV{CTEST_REAL_HOME}") - else() - set(HOME "$ENV{HOME}") - endif() - - if(NOT HOME AND WIN32) - # Try for USERPROFILE as HOME equivalent: - string(REPLACE "\\" "/" HOME "$ENV{USERPROFILE}") - - # But just use root of SystemDrive if USERPROFILE contains any spaces: - # (Default on XP and earlier...) - if(HOME MATCHES " ") - string(REPLACE "\\" "/" HOME "$ENV{SystemDrive}") - endif() - endif() -endif() +include(${CMAKE_CURRENT_SOURCE_DIR}/../Home.cmake) message(STATUS "HOME='${HOME}'") if(NOT DEFINED url) diff --git a/Tests/Contracts/VTK/CMakeLists.txt b/Tests/Contracts/VTK/CMakeLists.txt index ef19325..c946499 100644 --- a/Tests/Contracts/VTK/CMakeLists.txt +++ b/Tests/Contracts/VTK/CMakeLists.txt @@ -5,24 +5,7 @@ project(VTK) include(ExternalProject) # find "HOME". VTK will be downloaded & built within a subdirectory. -if(NOT DEFINED HOME) - if(DEFINED ENV{CTEST_REAL_HOME}) - set(HOME "$ENV{CTEST_REAL_HOME}") - else() - set(HOME "$ENV{HOME}") - endif() - - if(NOT HOME AND WIN32) - # Try for USERPROFILE as HOME equivalent: - string(REPLACE "\\" "/" HOME "$ENV{USERPROFILE}") - - # But just use root of SystemDrive if USERPROFILE contains any spaces: - # (Default on XP and earlier...) - if(HOME MATCHES " ") - string(REPLACE "\\" "/" HOME "$ENV{SystemDrive}") - endif() - endif() -endif() +include(${CMAKE_CURRENT_SOURCE_DIR}/../Home.cmake) set(base_dir "${HOME}/.cmake/Contracts/VTK") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ce082b7c823c0f88fbb329ca05d69a8f60f3851 commit 0ce082b7c823c0f88fbb329ca05d69a8f60f3851 Author: Brad King AuthorDate: Mon Oct 30 11:41:57 2017 -0400 Commit: Brad King CommitDate: Fri Nov 3 11:32:06 2017 -0400 Tests: Drop unused contract test environment script `Trilinos/EnvScript.cmake` has machine-specific content that has been moved to the respective machines. diff --git a/Tests/Contracts/Trilinos/EnvScript.cmake b/Tests/Contracts/Trilinos/EnvScript.cmake deleted file mode 100644 index dacb704..0000000 --- a/Tests/Contracts/Trilinos/EnvScript.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# Site specific settings: -# -if(CTEST_SITE MATCHES "faraway") - set(CTEST_SITE "faraway.kitware") - set(ENV{CTEST_SITE} "${CTEST_SITE}") -endif() - -if(CTEST_SITE STREQUAL "HUT11") - set(CTEST_SITE "hut11.kitware") - set(ENV{CTEST_SITE} "${CTEST_SITE}") - - set(ENV{CLAPACK_DIR} "C:/T/clapack/b/clapack-prefix/src/clapack-build") -endif() - -if(CTEST_SITE MATCHES "qwghlm") - set(CTEST_SITE "qwghlm.kitware") - set(ENV{CTEST_SITE} "${CTEST_SITE}") - - set(ENV{PATH} "/opt/local/bin:$ENV{PATH}") - set(ENV{CC} "gcc-mp-4.3") - set(ENV{CXX} "g++-mp-4.3") - set(ENV{FC} "gfortran-mp-4.3") -endif() - -# Submit to alternate CDash server: -# -#set(ENV{CTEST_DROP_SITE} "localhost") -#set(ENV{CTEST_DROP_LOCATION} "/CDash/submit.php?project=Trilinos") - -# Limit packages built: -# -set(ENV{Trilinos_PACKAGES} "Teuchos;Kokkos") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=36346de4809bf443ca9ca8daea2bdc1af7874b68 commit 36346de4809bf443ca9ca8daea2bdc1af7874b68 Author: Brad King AuthorDate: Mon Oct 30 10:32:52 2017 -0400 Commit: Brad King CommitDate: Fri Nov 3 11:30:26 2017 -0400 Tests: Drop unused contract test diff --git a/Tests/Contracts/cse-snapshot/CMakeLists.txt b/Tests/Contracts/cse-snapshot/CMakeLists.txt deleted file mode 100644 index 9134210..0000000 --- a/Tests/Contracts/cse-snapshot/CMakeLists.txt +++ /dev/null @@ -1,114 +0,0 @@ -cmake_minimum_required(VERSION 2.8) -project(cse-snapshot) - -include(ExternalProject) - -include("${CMAKE_CURRENT_SOURCE_DIR}/LocalOverrides.cmake" OPTIONAL) -include("${CMAKE_CURRENT_BINARY_DIR}/LocalOverrides.cmake" OPTIONAL) - -if(NOT DEFINED HOME) - if(DEFINED ENV{CTEST_REAL_HOME}) - set(HOME "$ENV{CTEST_REAL_HOME}") - else() - set(HOME "$ENV{HOME}") - endif() -endif() -message(STATUS "HOME='${HOME}'") - -if(NOT DEFINED repo) - set(repo "git://public.kitware.com/cse.git") -endif() -message(STATUS "repo='${repo}'") - -if(NOT DEFINED tag) - set(tag "cc1dcb95439a21ab1d58f444d93481598414196e") -endif() -message(STATUS "tag='${tag}'") - -string(SUBSTRING "${tag}" 0 8 shorttag) - -set(base_dir "${HOME}/.cmake/Contracts/${PROJECT_NAME}/${shorttag}") -set(binary_dir "${base_dir}/build") -set(script_dir "${base_dir}") -set(source_dir "${base_dir}/src") - -if(NOT DEFINED BUILDNAME) - set(BUILDNAME "CMakeContract-${shorttag}") -endif() -message(STATUS "BUILDNAME='${BUILDNAME}'") - -if(NOT DEFINED SITE) - site_name(SITE) -endif() -message(STATUS "SITE='${SITE}'") - -if(NOT DEFINED PROCESSOR_COUNT) - # Unknown: - set(PROCESSOR_COUNT 0) - - # Linux: - set(cpuinfo_file "/proc/cpuinfo") - if(EXISTS "${cpuinfo_file}") - file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$") - list(LENGTH procs PROCESSOR_COUNT) - endif() - - # Mac: - if(APPLE) - find_program(cmd_sysctl "sysctl") - if(cmd_sysctl) - execute_process(COMMAND ${cmd_sysctl} -n hw.ncpu - OUTPUT_VARIABLE PROCESSOR_COUNT - OUTPUT_STRIP_TRAILING_WHITESPACE) - endif() - endif() - - # Windows: - if(WIN32) - set(PROCESSOR_COUNT "$ENV{NUMBER_OF_PROCESSORS}") - endif() -endif() -message(STATUS "PROCESSOR_COUNT='${PROCESSOR_COUNT}'") - -find_package(Git) -if(NOT GIT_EXECUTABLE) - message(FATAL_ERROR "error: could not find git") - # adjust PATH to find git, or set GIT_EXECUTABLE in LocalOverrides.cmake -endif() -message(STATUS "GIT_EXECUTABLE='${GIT_EXECUTABLE}'") - -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/Dashboard.cmake.in" - "${script_dir}/Dashboard.cmake" - @ONLY) - -# Source dir for this project exists outside the CMake build tree because it -# is absolutely huge. -# -if(EXISTS "${source_dir}/.git") - # If it exists already, download is a complete no-op: - ExternalProject_Add(download-${PROJECT_NAME} - DOWNLOAD_COMMAND "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - ) -else() - # If it does not yet exist, download clones the git repository: - ExternalProject_Add(download-${PROJECT_NAME} - SOURCE_DIR "${source_dir}" - GIT_REPOSITORY "${repo}" - GIT_TAG "${tag}" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - ) -endif() - -ExternalProject_Add(build-${PROJECT_NAME} - DOWNLOAD_COMMAND "" - CONFIGURE_COMMAND "" - BUILD_COMMAND ${CMAKE_CTEST_COMMAND} -S "${script_dir}/Dashboard.cmake" - INSTALL_COMMAND "" - DEPENDS download-${PROJECT_NAME} - ) diff --git a/Tests/Contracts/cse-snapshot/Dashboard.cmake.in b/Tests/Contracts/cse-snapshot/Dashboard.cmake.in deleted file mode 100644 index 138eb3f..0000000 --- a/Tests/Contracts/cse-snapshot/Dashboard.cmake.in +++ /dev/null @@ -1,76 +0,0 @@ -# This "ctest -S" script may be configured to drive a nightly dashboard on any -# Linux machine. -# -set(CTEST_BINARY_DIRECTORY "@binary_dir@") -set(CTEST_BUILD_NAME "@BUILDNAME@") -set(CTEST_SITE "@SITE@") -set(CTEST_SOURCE_DIRECTORY "@source_dir@") -set(PROCESSOR_COUNT "@PROCESSOR_COUNT@") - -# Assume a Linux build, with a make that supports -j. Modify this script if -# assumption is ever invalid. -# -if(PROCESSOR_COUNT) - set(CTEST_BUILD_FLAGS "-j${PROCESSOR_COUNT}") -endif() - -set(CTEST_CMAKE_GENERATOR "Unix Makefiles") -set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") - -message("Cleaning binary dir '${CTEST_BINARY_DIRECTORY}'") -ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}") - -# Intentionally no ctest_update step in this script. This script is run as a -# "Contract" test on a CMake dashboard submission using the just-built ctest -# as the driver. The download step in the Contract CMakeLists file takes care -# of setting up the source tree before calling this ctest -S script. The idea -# is that the source tree will be the same every day, so there should not be -# an "update" step for this build. - -message("Configuring CSE in binary dir '${CTEST_BINARY_DIRECTORY}'") -set_property(GLOBAL PROPERTY SubProject "CSE-toplevel") -set_property(GLOBAL PROPERTY Label "CSE-toplevel") - -ctest_start("Experimental") - -set(CSE_TOPLEVEL_OPTIONS - -DEXTERNAL_PROJECT_DASHBOARD_BUILD:BOOL=ON - -DEXTERNAL_PROJECT_TESTS:BOOL=ON - -DCSE_INSTALL_PREFIX:PATH=${CTEST_BINARY_DIRECTORY}/built - -DCSE_SUBSET:STRING=ALL - -DCTEST_SITE:STRING=${CTEST_SITE} -) - -ctest_configure(OPTIONS "${CSE_TOPLEVEL_OPTIONS}") - -# The configure step produces a file listing the CSE packages and dependencies. -# This file also generates Project.xml and stores it in ${PROJECT_XML}. -# -set(subprojects "") -if(EXISTS "${CTEST_BINARY_DIRECTORY}/CSEBuildtimeDepends.cmake") - message("Including CSEBuildtimeDepends.cmake") - include("${CTEST_BINARY_DIRECTORY}/CSEBuildtimeDepends.cmake") - set(subprojects ${CSE_ALL_SORTED}) - message("Submitting Project.xml") - ctest_submit(FILES ${PROJECT_XML}) -endif() - -message("Submitting CSE configure results") -ctest_submit() - -if(subprojects) - message("Building by looping over subprojects...") - foreach(subproject ${subprojects}) - message("########## ${subproject} ##########") - set_property(GLOBAL PROPERTY SubProject "${subproject}") - set_property(GLOBAL PROPERTY Label "${subproject}") - ctest_build(TARGET "${subproject}" APPEND) - message("Submitting ${subproject} build results") - ctest_submit(PARTS build) - endforeach() -else() - message("Building all...") - ctest_build(APPEND) - message("Submitting build results") - ctest_submit(PARTS build) -endif() diff --git a/Tests/Contracts/cse-snapshot/RunTest.cmake b/Tests/Contracts/cse-snapshot/RunTest.cmake deleted file mode 100644 index 7eb6301..0000000 --- a/Tests/Contracts/cse-snapshot/RunTest.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(exe "$ENV{HOME}/.cmake/Contracts/cse-snapshot/510345e4/build/built/Release/git-1.6.5.2/bin/git") -set(args help clone) -set(cse-snapshot_RUN_TEST ${exe} ${args}) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bbc9c96691c06cdcff0227ad8292e2a2ea60ec00 commit bbc9c96691c06cdcff0227ad8292e2a2ea60ec00 Author: Brad King AuthorDate: Thu Nov 2 09:28:14 2017 -0400 Commit: Brad King CommitDate: Fri Nov 3 11:30:21 2017 -0400 Tests: Honor already-set CTEST_REAL_HOME in case of repeat run diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c25fc44..bd44b17 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -31,7 +31,9 @@ if(DEFINED ENV{HOME} AND NOT CTEST_NO_TEST_HOME) set(TEST_HOME_ENV_CODE "# Fake a user home directory to avoid polluting the real one. # But provide original ENV{HOME} value in ENV{CTEST_REAL_HOME} for tests that # need access to the real HOME directory. -set(ENV{CTEST_REAL_HOME} \"\$ENV{HOME}\") +if(NOT DEFINED ENV{CTEST_REAL_HOME}) + set(ENV{CTEST_REAL_HOME} \"\$ENV{HOME}\") +endif() set(ENV{HOME} \"${TEST_HOME}\") ") endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=701a637e4d0294ad76df7c11244c9b9b2e84716d commit 701a637e4d0294ad76df7c11244c9b9b2e84716d Author: Brad King AuthorDate: Fri Nov 3 11:23:33 2017 -0400 Commit: Brad King CommitDate: Fri Nov 3 11:23:33 2017 -0400 Tests: Fix CTestTestCrash test under ubsan UBsan causes our test crash to abort instead. Update our regex to tolerate this. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c25fc44..d2b6969 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2830,7 +2830,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release PASS_REGULAR_EXPRESSION "Failed") else() set_tests_properties(CTestTestCrash PROPERTIES - PASS_REGULAR_EXPRESSION "(Illegal|SegFault)") + PASS_REGULAR_EXPRESSION "(Illegal|SegFault|Child aborted)") endif() configure_file( https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=777e87ae00e8920bd6bf971fb40a07e373061500 commit 777e87ae00e8920bd6bf971fb40a07e373061500 Author: luzpaz AuthorDate: Thu Nov 2 19:14:55 2017 -0400 Commit: Brad King CommitDate: Fri Nov 3 10:25:05 2017 -0400 Fix trivial typos in text Some are user facing. Found using codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt` whereby the whitelist contained: ans dum helpfull emmited emmitted buil iff isnt nto ot pathes substract te todays upto whitespaces diff --git a/Help/command/add_subdirectory.rst b/Help/command/add_subdirectory.rst index e979253..012ded4 100644 --- a/Help/command/add_subdirectory.rst +++ b/Help/command/add_subdirectory.rst @@ -30,7 +30,7 @@ project that is useful but not necessary, such as a set of examples. Typically the subdirectory should contain its own :command:`project` command invocation so that a full build system will be generated in the subdirectory (such as a VS IDE solution file). Note that inter-target -dependencies supercede this exclusion. If a target built by the +dependencies supersede this exclusion. If a target built by the parent project depends on a target in the subdirectory, the dependee target will be included in the parent project build system to satisfy the dependency. diff --git a/Help/command/file.rst b/Help/command/file.rst index 4d4ebb4..5ce86e5 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -110,7 +110,7 @@ regular expressions, but much simpler. If ``RELATIVE`` flag is specified, the results will be returned as relative paths to the given path. The results will be ordered lexicographically. -By default ``GLOB`` lists directories - directories are omited in result if +By default ``GLOB`` lists directories - directories are omitted in result if ``LIST_DIRECTORIES`` is set to false. .. note:: diff --git a/Help/command/install.rst b/Help/command/install.rst index 58438b7..9f9ee13 100644 --- a/Help/command/install.rst +++ b/Help/command/install.rst @@ -346,7 +346,7 @@ specified that does not match that given to the targets associated with included in the export but a target to which it links is not included the behavior is unspecified. -In additon to cmake language files, the ``EXPORT_ANDROID_MK`` option maybe +In addition to cmake language files, the ``EXPORT_ANDROID_MK`` option maybe used to specifiy an export to the android ndk build system. The Android NDK supports the use of prebuilt libraries, both static and shared. This allows cmake to build the libraries of a project and make them available diff --git a/Help/dev/testing.rst b/Help/dev/testing.rst index 731930c..1b29acf 100644 --- a/Help/dev/testing.rst +++ b/Help/dev/testing.rst @@ -16,7 +16,7 @@ welcome to provide testing machines in order to help keep support for their platforms working. The `CMake Dashboard Scripts Repository`_ provides CTest scripts to drive -nightly, continous, and experimental testing of CMake. Use the following +nightly, continuous, and experimental testing of CMake. Use the following commands to set up a new integration testing client: .. code-block:: console diff --git a/Help/release/3.4.rst b/Help/release/3.4.rst index 89c5561..468627e 100644 --- a/Help/release/3.4.rst +++ b/Help/release/3.4.rst @@ -66,7 +66,7 @@ Variables Properties ---------- -* :ref:`Visual Studio Generators` learned to support additonal +* :ref:`Visual Studio Generators` learned to support additional target properties to customize projects for NVIDIA Nsight Tegra Visual Studio Edition: diff --git a/Help/release/3.6.rst b/Help/release/3.6.rst index 144537d..a542b77 100644 --- a/Help/release/3.6.rst +++ b/Help/release/3.6.rst @@ -111,7 +111,7 @@ Modules * The :module:`ExternalProject` module learned to initialize Git submodules recursively and also to initialize new submodules on updates. Use the - ``GIT_SUBMODULES`` option to restrict which submodules are initalized and + ``GIT_SUBMODULES`` option to restrict which submodules are initialized and updated. * The :module:`ExternalProject` module leared the ``DOWNLOAD_NO_EXTRACT 1`` diff --git a/Help/release/3.7.rst b/Help/release/3.7.rst index 4c51af4..d4d374b 100644 --- a/Help/release/3.7.rst +++ b/Help/release/3.7.rst @@ -237,7 +237,7 @@ CPack * The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and :command:`cpack_ifw_configure_component_group` commands gained a new - ``USER_INTERFACES`` option to add a list of additonal pages to the IFW + ``USER_INTERFACES`` option to add a list of additional pages to the IFW installer. * The :module:`CPackRPM` module learned to generate debuginfo diff --git a/Help/variable/LIBRARY_OUTPUT_PATH.rst b/Help/variable/LIBRARY_OUTPUT_PATH.rst index ba02911..bb4328f 100644 --- a/Help/variable/LIBRARY_OUTPUT_PATH.rst +++ b/Help/variable/LIBRARY_OUTPUT_PATH.rst @@ -5,5 +5,5 @@ Old library location variable. The target properties :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY`, :prop_tgt:`LIBRARY_OUTPUT_DIRECTORY`, and :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY` -supercede this variable for a target if they are set. Library targets are +supersede this variable for a target if they are set. Library targets are otherwise placed in this directory. diff --git a/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake b/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake index 04529b1..fccff67 100644 --- a/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake +++ b/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake @@ -31,7 +31,7 @@ function(android_push_test_files_to_device) set(out_var ${out_var} PARENT_SCOPE) if(res_var) string(REGEX REPLACE ";" " " com "${ARGN}") - message(FATAL_ERROR "Error occured during adb command: adb ${com}\nError: ${err_var}.") + message(FATAL_ERROR "Error occurred during adb command: adb ${com}\nError: ${err_var}.") endif() endfunction() diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 90c2a57..f5a8e59 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -154,7 +154,7 @@ # macro. # # Internally, this macro executes :command:`configure_file()` to create the -# resulting version file. Depending on the ``COMPATIBLITY``, either the file +# resulting version file. Depending on the ``COMPATIBILITY``, either the file # ``BasicConfigVersion-SameMajorVersion.cmake.in`` or # ``BasicConfigVersion-AnyNewerVersion.cmake.in`` is used. Please note that # these two files are internal to CMake and you should not call diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index 8d8b070..05a54a0 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -817,7 +817,7 @@ if(CPACK_IFW_INSTALLERBASE_EXECUTABLE AND NOT CPACK_IFW_FRAMEWORK_VERSION_FORCED endif() endif() endforeach() - # Finaly try to get version from executable path + # Finally try to get version from executable path if(NOT CPACK_IFW_FRAMEWORK_VERSION) string(REGEX MATCH "[0-9]+(\\.[0-9]+)*" CPACK_IFW_FRAMEWORK_VERSION "${CPACK_IFW_INSTALLERBASE_EXECUTABLE}") @@ -864,7 +864,7 @@ macro(_cpack_ifw_resolve_script _variable) endif() endmacro() -# Resolve full path to lisense file +# Resolve full path to license file macro(_cpack_ifw_resolve_lisenses _variable) if(${_variable}) set(_ifw_license_file FALSE) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 9f77ec3..c5a27f9 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -545,7 +545,7 @@ # /usr/share/doc # # May be used to exclude path (directories or files) from the auto-generated -# list of paths discovered by CPack RPM. The defaut value contains a +# list of paths discovered by CPack RPM. The default value contains a # reasonable set of values if the variable is not defined by the user. If the # variable is defined by the user then CPackRPM will NOT any of the default # path. If you want to add some path to the default list then you can use @@ -782,7 +782,7 @@ # # .. note:: # -# Each source path prefix is additionaly suffixed by ``src_`` where +# Each source path prefix is additionally suffixed by ``src_`` where # index is index of the path used from :variable:`CPACK_BUILD_SOURCE_DIRS` # variable. This produces ``/src_`` # replacement path. @@ -1985,13 +1985,13 @@ function(cpack_rpm_generate_package) # CPACK_RPM_POST_INSTALL_SCRIPT_FILE (or CPACK_RPM__POST_INSTALL_SCRIPT_FILE) # CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE (or CPACK_RPM__POST_UNINSTALL_SCRIPT_FILE) # May be used to embed a post (un)installation script in the spec file. - # The refered script file(s) will be read and directly + # The referred script file(s) will be read and directly # put after the %post or %postun section # ---------------------------------------------------------------- # CPACK_RPM_PRE_INSTALL_SCRIPT_FILE (or CPACK_RPM__PRE_INSTALL_SCRIPT_FILE) # CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE (or CPACK_RPM__PRE_UNINSTALL_SCRIPT_FILE) # May be used to embed a pre (un)installation script in the spec file. - # The refered script file(s) will be read and directly + # The referred script file(s) will be read and directly # put after the %pre or %preun section foreach(RPM_SCRIPT_FILE_TYPE_ "INSTALL" "UNINSTALL") foreach(RPM_SCRIPT_FILE_TIME_ "PRE" "POST") @@ -2022,7 +2022,7 @@ function(cpack_rpm_generate_package) # CPACK_RPM_CHANGELOG_FILE # May be used to embed a changelog in the spec file. - # The refered file will be read and directly put after the %changelog section + # The referred file will be read and directly put after the %changelog section if(CPACK_RPM_CHANGELOG_FILE) if(EXISTS ${CPACK_RPM_CHANGELOG_FILE}) file(READ ${CPACK_RPM_CHANGELOG_FILE} CPACK_RPM_SPEC_CHANGELOG) @@ -2152,7 +2152,7 @@ function(cpack_rpm_generate_package) string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST) # Transform endline separated - string into CMake List string(REPLACE "\n" ";" CPACK_RPM_INSTALL_FILES_LIST "${CPACK_RPM_INSTALL_FILES_LIST}") - # Remove unecessary quotes + # Remove unnecessary quotes string(REPLACE "\"" "" CPACK_RPM_INSTALL_FILES_LIST "${CPACK_RPM_INSTALL_FILES_LIST}") # Remove ABSOLUTE install file from INSTALL FILE LIST list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST ${CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL}) @@ -2413,7 +2413,7 @@ ${TMP_DEBUGINFO_ADDITIONAL_SOURCES} endif() # Disable debuginfo packages - srpm generates invalid packages due to - # releasing controll to cpack to generate binary packages. + # releasing control to cpack to generate binary packages. # Note however that this doesn't prevent cpack to generate debuginfo # packages when run from srpm with --rebuild. set(TMP_RPM_DISABLE_DEBUGINFO "%define debug_package %{nil}") diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 9370596..a08282e 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -65,7 +65,7 @@ endfunction() include(CTestUseLaunchers) if(BUILD_TESTING) - # Setup some auxilary macros + # Setup some auxiliary macros macro(SET_IF_NOT_SET var val) if(NOT DEFINED "${var}") set("${var}" "${val}") diff --git a/Modules/Compiler/IAR-FindBinUtils.cmake b/Modules/Compiler/IAR-FindBinUtils.cmake index 2b04795..b29ee81 100644 --- a/Modules/Compiler/IAR-FindBinUtils.cmake +++ b/Modules/Compiler/IAR-FindBinUtils.cmake @@ -17,7 +17,7 @@ if("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM") find_program(CMAKE_IAR_ARCHIVE iarchive.exe HINTS ${__iar_hints} DOC "The IAR archiver") - # find auxillary tools + # find auxiliary tools find_program(CMAKE_IAR_ELFTOOL ielftool.exe HINTS ${__iar_hints} DOC "The IAR ELF Tool") find_program(CMAKE_IAR_ELFDUMP ielfdumparm.exe HINTS ${__iar_hints} diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake index 52ebaf2..43243b9 100644 --- a/Modules/Compiler/IAR.cmake +++ b/Modules/Compiler/IAR.cmake @@ -29,7 +29,7 @@ # "Silent" Operation # # this really is different to most programs I know. -# nothing meaningfull from the operation is lost, just some redundant +# nothing meaningful from the operation is lost, just some redundant # code and data size printouts (that can be inspected with common tools). # This module is shared by multiple languages; use include blocker. diff --git a/Modules/Documentation.cmake b/Modules/Documentation.cmake index fc398e6..6e21249 100644 --- a/Modules/Documentation.cmake +++ b/Modules/Documentation.cmake @@ -40,7 +40,7 @@ if (BUILD_DOCUMENTATION) ) # - # The documentation process is controled by a batch file. + # The documentation process is controlled by a batch file. # We will probably need bash to create the custom target # diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 1b93304..fbce235 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -493,7 +493,7 @@ endfunction() by the project when available at buildtime, but it also work without. ``RECOMMENDED`` is similar to ``OPTIONAL``, i.e. the project will build if the package is not present, but the functionality of the resulting - binaries will be severly limited. If a ``REQUIRED`` package is not + binaries will be severely limited. If a ``REQUIRED`` package is not available at buildtime, the project may not even build. This can be combined with the ``FATAL_ON_MISSING_REQUIRED_PACKAGES`` argument for ``feature_summary()``. Last, a ``RUNTIME`` package is a package which is diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index d177e5e..8708938 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -581,7 +581,7 @@ mark_as_advanced( # Makefile and similar generators don't define CMAKE_CONFIGURATION_TYPES, so we # need to add another entry for the CMAKE_BUILD_TYPE. We also need to add the # standerd set of 4 build types (Debug, MinSizeRel, Release, and RelWithDebInfo) -# for completeness. We need run this loop in order to accomodate the addition +# for completeness. We need run this loop in order to accommodate the addition # of extra configuration types. Duplicate entries will be removed by # REMOVE_DUPLICATES. set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo) diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake index f78119d..86051cf 100644 --- a/Modules/FindCUDA/run_nvcc.cmake +++ b/Modules/FindCUDA/run_nvcc.cmake @@ -181,7 +181,7 @@ cuda_execute_process( set(depends_CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}") set(CUDA_VERSION @CUDA_VERSION@) if(CUDA_VERSION VERSION_LESS "3.0") - # Note that this will remove all occurances of -G. + # Note that this will remove all occurrences of -G. list(REMOVE_ITEM depends_CUDA_NVCC_FLAGS "-G") endif() diff --git a/Modules/FindCxxTest.cmake b/Modules/FindCxxTest.cmake index 9ba1ff3..2aa5f6f 100644 --- a/Modules/FindCxxTest.cmake +++ b/Modules/FindCxxTest.cmake @@ -145,7 +145,7 @@ # # Version 1.3 (8/19/10) (CMake 2.8.3) # Included patch by Simone Rossetto to check if either Python or Perl -# are present in the system. Whichever intepreter that is detected +# are present in the system. Whichever interpreter that is detected # is now used to run the test generator program. If both interpreters # are detected, the CXXTEST_USE_PYTHON variable is obeyed. # diff --git a/Modules/FindDCMTK.cmake b/Modules/FindDCMTK.cmake index 0d86e8e..f348d3a 100644 --- a/Modules/FindDCMTK.cmake +++ b/Modules/FindDCMTK.cmake @@ -217,7 +217,7 @@ if(EXISTS ${DCMTK_DIR}/CMakeCache.txt) if(NOT EXISTS ${EXTDCMTK_SOURCE_DIR}) message(FATAL_ERROR "DCMTK build directory references -nonexistant DCMTK source directory ${EXTDCMTK_SOURCE_DIR}") +nonexistent DCMTK source directory ${EXTDCMTK_SOURCE_DIR}") endif() endif() diff --git a/Modules/FindDevIL.cmake b/Modules/FindDevIL.cmake index f6c8e3f..e904a30 100644 --- a/Modules/FindDevIL.cmake +++ b/Modules/FindDevIL.cmake @@ -70,5 +70,5 @@ find_library(ILU_LIBRARIES FIND_PACKAGE_HANDLE_STANDARD_ARGS(DevIL DEFAULT_MSG IL_LIBRARIES ILU_LIBRARIES IL_INCLUDE_DIR) -# provide legacy variable for compatiblity +# provide legacy variable for compatibility set(IL_FOUND ${DevIL_FOUND}) diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake index fef7fb4..3945b78 100644 --- a/Modules/FindFLEX.cmake +++ b/Modules/FindFLEX.cmake @@ -52,7 +52,7 @@ # # # -# Flex scanners oftenly use tokens defined by Bison: the code generated +# Flex scanners often use tokens defined by Bison: the code generated # by Flex depends of the header generated by Bison. This module also # defines a macro: # diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index de20049..012ae22 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -479,7 +479,7 @@ if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE) #if we detect that occurrence clear the suffix if(_suffix AND NOT TARGET ${HDF5_${_lang}_TARGET}${_suffix}) if(NOT TARGET ${HDF5_${_lang}_TARGET}) - #cant find this component with or without the suffix + #can't find this component with or without the suffix #so bail out, and let the following locate HDF5 set(HDF5_FOUND FALSE) break() diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index cebba10..96e3e21 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -25,7 +25,7 @@ # JAVA_INCLUDE_PATH2 = the include path to jni_md.h # JAVA_AWT_INCLUDE_PATH = the include path to jawt.h -# Expand {libarch} occurences to java_libarch subdirectory(-ies) and set ${_var} +# Expand {libarch} occurrences to java_libarch subdirectory(-ies) and set ${_var} macro(java_append_library_directories _var) # Determine java arch-specific library subdir # Mostly based on openjdk/jdk/make/common/shared/Platform.gmk as of openjdk @@ -46,7 +46,7 @@ macro(java_append_library_directories _var) set(_java_libarch "arm" "aarch32") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips") # mips* machines are bi-endian mostly so processor does not tell - # endianess of the underlying system. + # endianness of the underlying system. set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "mips" "mipsel" "mipseb" "mips64" "mips64el" "mipsn32" "mipsn32el") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64le") set(_java_libarch "ppc64" "ppc64le") diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 7d4ed6a..c79642d 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -1198,7 +1198,7 @@ if(_numbers_of_matlab_roots EQUAL 0) # At this point, we have no other choice than trying to find it from PATH. - # If set by the user, this wont change + # If set by the user, this won't change find_program( _matlab_main_tmp NAMES matlab) diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 0187e0d..c358ff1 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -110,7 +110,7 @@ if(WIN32 AND NOT CYGWIN) # * MTd for static-debug # Implementation details: - # We are using the libraries located in the VC subdir instead of the parent directory eventhough : + # We are using the libraries located in the VC subdir instead of the parent directory even though : # libeay32MD.lib is identical to ../libeay32.lib, and # ssleay32MD.lib is identical to ../ssleay32.lib # enable OPENSSL_USE_STATIC_LIBS to use the static libs located in lib/VC/static diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake index b6e24a3..a711493 100644 --- a/Modules/FindTCL.cmake +++ b/Modules/FindTCL.cmake @@ -26,7 +26,7 @@ # # # In an effort to remove some clutter and clear up some issues for -# people who are not necessarily Tcl/Tk gurus/developpers, some +# people who are not necessarily Tcl/Tk gurus/developers, some # variables were moved or removed. Changes compared to CMake 2.4 are: # # :: diff --git a/Modules/FindTclStub.cmake b/Modules/FindTclStub.cmake index 9711bd6..51fc029 100644 --- a/Modules/FindTclStub.cmake +++ b/Modules/FindTclStub.cmake @@ -32,7 +32,7 @@ # # # In an effort to remove some clutter and clear up some issues for -# people who are not necessarily Tcl/Tk gurus/developpers, some +# people who are not necessarily Tcl/Tk gurus/developers, some # variables were moved or removed. Changes compared to CMake 2.4 are: # # :: diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index be84999..e08afe4 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -915,7 +915,7 @@ if (_wx_lib_missing) endif() unset(_wx_lib_missing) -# Check if a specfic version was requested by find_package(). +# Check if a specific version was requested by find_package(). if(wxWidgets_FOUND) find_file(_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} NO_DEFAULT_PATH) dbg_msg("_filename: ${_filename}") diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake index 76eb6be..054a1bf 100644 --- a/Modules/FindwxWindows.cmake +++ b/Modules/FindwxWindows.cmake @@ -390,7 +390,7 @@ if(WIN32_STYLE_FIND) if (NOT WXWINDOWS_USE_SHARED_LIBS) set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} - ## these ones dont seem required, in particular ctl3d32 is not neccesary (Jan Woetzel 07/2003) + ## these ones don't seem required, in particular ctl3d32 is not necessary (Jan Woetzel 07/2003) # ctl3d32 debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_ZLIB} optimized ${WXWINDOWS_STATIC_LIBRARY_ZLIB} debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_REGEX} optimized ${WXWINDOWS_STATIC_LIBRARY_REGEX} @@ -546,7 +546,7 @@ if(WIN32_STYLE_FIND) endif() - ## not neccessary in wxWindows 2.4.1 and 2.6.2 + ## not necessary in wxWindows 2.4.1 and 2.6.2 ## but it may fix a previous bug, see ## http://lists.wxwindows.org/cgi-bin/ezmlm-cgi?8:mss:37574:200305:mpdioeneabobmgjenoap option(WXWINDOWS_SET_DEFINITIONS "Set additional defines for wxWindows" OFF) diff --git a/Modules/ITKCompatibility.cmake b/Modules/ITKCompatibility.cmake index fef0653..7d211b6 100644 --- a/Modules/ITKCompatibility.cmake +++ b/Modules/ITKCompatibility.cmake @@ -2,6 +2,6 @@ # file Copyright.txt or https://cmake.org/licensing for details. -# work around an old bug in ITK prior to verison 3.0 +# work around an old bug in ITK prior to version 3.0 set(TIFF_RIGHT_VERSION 1) diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 0478918..aee4028 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -151,7 +151,7 @@ macro (QT4_GENERATE_MOC infile outfile ) set(moc_target ${ARGV3}) endif() QT4_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} "${moc_flags}" "" "${moc_target}") - set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file + set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # don't run automoc on this file endmacro () diff --git a/Modules/SquishTestScript.cmake b/Modules/SquishTestScript.cmake index cfdfaec..c0e1bea 100644 --- a/Modules/SquishTestScript.cmake +++ b/Modules/SquishTestScript.cmake @@ -34,7 +34,7 @@ message(STATUS "squish_settingsgroup='${squish_settingsgroup}'") message(STATUS "squish_pre_command='${squish_pre_command}'") message(STATUS "squish_post_command='${squish_post_command}'") -# parse enviornment variables +# parse environment variables foreach(i ${squish_env_vars}) message(STATUS "parsing env var key/value pair ${i}") string(REGEX MATCH "([^=]*)=(.*)" squish_env_name ${i}) diff --git a/Modules/UseEcos.cmake b/Modules/UseEcos.cmake index 942bc38..700bfe6 100644 --- a/Modules/UseEcos.cmake +++ b/Modules/UseEcos.cmake @@ -181,7 +181,7 @@ macro(ECOS_ADD_EXECUTABLE _exe_NAME ) #the executable depends on ecos target.ld ECOS_ADD_TARGET_LIB(${ARGN}) -# when using nmake makefiles, the custom buildtype supresses the default cl.exe flags +# when using nmake makefiles, the custom buildtype suppresses the default cl.exe flags # and the rules for creating objects are adjusted for gcc set(CMAKE_BUILD_TYPE CUSTOM_ECOS_BUILD) set(CMAKE_C_COMPILE_OBJECT " -o -c ") diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake index 5e06adc..b5fc236 100644 --- a/Modules/UseJava.cmake +++ b/Modules/UseJava.cmake @@ -286,7 +286,7 @@ # # Example: # create_javadoc(my_example_doc -# PACKAGES com.exmaple.foo com.example.bar +# PACKAGES com.example.foo com.example.bar # SOURCEPATH "${CMAKE_CURRENT_SOURCE_DIR}" # CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH} # WINDOWTITLE "My example" diff --git a/Source/CPack/WiX/cmWIXPatchParser.cxx b/Source/CPack/WiX/cmWIXPatchParser.cxx index e6aeed3..c6ca944 100644 --- a/Source/CPack/WiX/cmWIXPatchParser.cxx +++ b/Source/CPack/WiX/cmWIXPatchParser.cxx @@ -90,7 +90,7 @@ void cmWIXPatchParser::StartFragment(const char** attributes) } } - /* add any additional attributes for the fragement */ + /* add any additional attributes for the fragment */ if (!new_element) { ReportValidationError("No 'Id' specified for 'CPackWixFragment' element"); } else { diff --git a/Source/CPack/bills-comments.txt b/Source/CPack/bills-comments.txt index c3b4ee8..1aaf9af 100644 --- a/Source/CPack/bills-comments.txt +++ b/Source/CPack/bills-comments.txt @@ -31,7 +31,7 @@ cmCPackGenericGenerator::ProcessGenerator // DoPackage cmCPackGenericGenerator::InstallProject is used for both source and binary -packages. It is controled based on values set in CPACK_ variables. +packages. It is controlled based on values set in CPACK_ variables. InstallProject diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index fdd9622..198f6e5 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -81,7 +81,7 @@ cmCTestScriptHandler::cmCTestScriptHandler() this->ScriptStartTime = 0; - // the *60 is becuase the settings are in minutes but GetTime is seconds + // the *60 is because the settings are in minutes but GetTime is seconds this->MinimumInterval = 30 * 60; this->ContinuousDuration = -1; } @@ -830,7 +830,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard() } } - // if all was succesful, delete the backup dirs to free up disk space + // if all was successful, delete the backup dirs to free up disk space if (this->Backup) { cmSystemTools::RemoveADirectory(this->BackupSourceDir); cmSystemTools::RemoveADirectory(this->BackupBinaryDir); diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index e51e168..719688c 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -1521,7 +1521,7 @@ int cmCTestSubmitHandler::ProcessHandler() this->CTest->GetCTestConfiguration("DropLocation"); // change to the build directory so that we can uses a relative path - // on windows since scp dosn't support "c:" a drive in the path + // on windows since scp doesn't support "c:" a drive in the path cmWorkingDirectory workdir(buildDirectory); if (!this->SubmitUsingSCP(this->CTest->GetCTestConfiguration("ScpCommand"), @@ -1540,7 +1540,7 @@ int cmCTestSubmitHandler::ProcessHandler() std::string location = this->CTest->GetCTestConfiguration("DropLocation"); // change to the build directory so that we can uses a relative path - // on windows since scp dosn't support "c:" a drive in the path + // on windows since scp doesn't support "c:" a drive in the path cmWorkingDirectory workdir(buildDirectory); cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Change directory: " << buildDirectory << std::endl, diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 394d20e..620e906 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -39,7 +39,7 @@ public: int ProcessHandler() override; /** - * When both -R and -I are used should te resulting test list be the + * When both -R and -I are used should the resulting test list be the * intersection or the union of the lists. By default it is the * intersection. */ diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx index 9948ede..f965048 100644 --- a/Source/CTest/cmParseGTMCoverage.cxx +++ b/Source/CTest/cmParseGTMCoverage.cxx @@ -93,7 +93,7 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file) // This section accounts for lines that were previously marked // as non-executable code (-1), if the parser comes back with // a non-zero count, increase the count by 1 to push the line - // into the executable code set in addtion to the count found. + // into the executable code set in addition to the count found. if (coverageVector[lineoffset + linenumber] == -1 && count > 0) { coverageVector[lineoffset + linenumber] += count + 1; } else { diff --git a/Source/cmCMakeHostSystemInformationCommand.h b/Source/cmCMakeHostSystemInformationCommand.h index bfff8f1..b871641 100644 --- a/Source/cmCMakeHostSystemInformationCommand.h +++ b/Source/cmCMakeHostSystemInformationCommand.h @@ -20,7 +20,7 @@ class SystemInformation; * \brief Query host system specific information * * cmCMakeHostSystemInformationCommand queries system information of - * the sytem on which CMake runs. + * the system on which CMake runs. */ class cmCMakeHostSystemInformationCommand : public cmCommand { diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index e9e6570..28cba85 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -107,7 +107,7 @@ public: std::set& excludes, std::set& includes); - ///! Save cache for given makefile. Saves to ouput path/CMakeCache.txt + ///! Save cache for given makefile. Saves to output path/CMakeCache.txt bool SaveCache(const std::string& path); ///! Delete the cache given diff --git a/Source/cmConvertMSBuildXMLToJSON.py b/Source/cmConvertMSBuildXMLToJSON.py index 93ab8a8..92569e7 100644 --- a/Source/cmConvertMSBuildXMLToJSON.py +++ b/Source/cmConvertMSBuildXMLToJSON.py @@ -343,7 +343,7 @@ def __with_argument(node, value): def __preprocess_arguments(root): - """Preprocesses occurrances of Argument within the root. + """Preprocesses occurrences of Argument within the root. Argument XML values reference other values within the document by name. The referenced value does not contain a switch. This function will add the diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 7f0cb97..7985d0f 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -591,7 +591,7 @@ void cmExportFileGenerator::ResolveTargetsInGeneratorExpression( std::string::size_type commaPos = input.find(',', nameStartPos); std::string::size_type nextOpenPos = input.find("$<", nameStartPos); if (commaPos == std::string::npos // Implied 'this' target - || closePos == std::string::npos // Imcomplete expression. + || closePos == std::string::npos // Incomplete expression. || closePos < commaPos // Implied 'this' target || nextOpenPos < commaPos) // Non-literal { diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index 8142962..f771150 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -329,7 +329,7 @@ void cmFindCommon::ComputeFinalPaths() std::set ignored; this->GetIgnoredPaths(ignored); - // Combine the seperate path types, filtering out ignores + // Combine the separate path types, filtering out ignores this->SearchPaths.clear(); std::vector& allLabels = this->PathGroupLabelMap[PathGroup::All]; for (PathLabel const& l : allLabels) { diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 5a72655..103dc5f 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -590,7 +590,7 @@ void cmFindPackageCommand::SetModuleVariables(const std::string& components) this->AddFindDefinition(exact, this->VersionExact ? "1" : "0"); } - // Push on to the pacakge stack + // Push on to the package stack this->Makefile->FindPackageModuleStack.push_back(this->Name); } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 11ea46f..eba95f5 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -962,7 +962,7 @@ std::string cmGlobalGenerator::GetLanguageOutputExtension( } } else { // if no language is found then check to see if it is already an - // ouput extension for some language. In that case it should be ignored + // output extension for some language. In that case it should be ignored // and in this map, so it will not be compiled but will just be used. std::string const& ext = source.GetExtension(); if (!ext.empty()) { diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index b1e630e..80aadb9 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -110,7 +110,7 @@ bool cmGlobalKdevelopGenerator::CreateFilelistFile( nullptr)) { files.insert(tmp); tmp = cmSystemTools::GetFilenameName(tmp); - // add all files which dont match the default + // add all files which don't match the default // */CMakeLists.txt;*cmake; to the file pattern if ((tmp != "CMakeLists.txt") && (strstr(tmp.c_str(), ".cmake") == nullptr)) { diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 3b45c90..8a9a3fb 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -222,7 +222,7 @@ void cmGlobalVisualStudio71Generator::WriteProjectConfigurations( } } -// ouput standard header for dsw file +// output standard header for dsw file void cmGlobalVisualStudio71Generator::WriteSLNHeader(std::ostream& fout) { fout << "Microsoft Visual Studio Solution File, Format Version 8.00\n"; diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index cc1d1a2..dee874f 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -146,7 +146,7 @@ bool cmGlobalVisualStudio8Generator::SetGeneratorPlatform(std::string const& p, } } -// ouput standard header for dsw file +// output standard header for dsw file void cmGlobalVisualStudio8Generator::WriteSLNHeader(std::ostream& fout) { fout << "Microsoft Visual Studio Solution File, Format Version 9.00\n"; diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index 4c30607..7bd6cb9 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -77,7 +77,7 @@ static bool StartsWithGeneratorExpression(const std::string& input) // do a lot of cleanup on the arguments because this is one place where folks // sometimes take the output of a program and pass it directly into this // command not thinking that a single argument could be filled with spaces -// and newlines etc liek below: +// and newlines etc like below: // // " /foo/bar // /boo/hoo /dingle/berry " diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9c8dae3..e4ec469 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -599,7 +599,7 @@ void cmMakefile::EnforceDirectoryLevelRules() const << "\"cmake --help-policy CMP0000\"."; switch (this->GetPolicyStatus(cmPolicies::CMP0000)) { case cmPolicies::WARN: - // Warn because the user did not provide a mimimum required + // Warn because the user did not provide a minimum required // version. this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING, msg.str(), this->Backtrace); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 5e7a361..bc8c2d1 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -561,7 +561,7 @@ public: bool atOnly, bool escapeQuotes) const; /** - * Copy file but change lines acording to ConfigureString + * Copy file but change lines according to ConfigureString */ int ConfigureFile(const char* infile, const char* outfile, bool copyonly, bool atOnly, bool escapeQuotes, @@ -800,7 +800,7 @@ public: void RemoveExportBuildFileGeneratorCMP0024(cmExportBuildFileGenerator* gen); void AddExportBuildFileGenerator(cmExportBuildFileGenerator* gen); - // Maintain a stack of pacakge names to determine the depth of find modules + // Maintain a stack of package names to determine the depth of find modules // we are currently being called with std::deque FindPackageModuleStack; diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index 43fb5f5..5a341bd 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -63,7 +63,7 @@ bool cmMessageCommand::InitialPass(std::vector const& args, std::string message = cmJoin(cmMakeRange(i, args.end()), std::string()); if (type != cmake::MESSAGE) { - // we've overriden the message type, above, so display it directly + // we've overridden the message type, above, so display it directly cmMessenger* m = this->Makefile->GetMessenger(); m->DisplayMessage(type, message, this->Makefile->GetBacktrace()); } else { diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index b329d38..28a8df1 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -827,7 +827,7 @@ bool cmQtAutoGenerators::ParseHeaderFile(std::string const& absFilename, bool cmQtAutoGenerators::ParsePostprocess() { bool success = true; - // Read missin dependecies + // Read missing dependencies for (auto& item : this->MocJobsIncluded) { if (!item->DependsValid) { std::string content; @@ -1427,7 +1427,7 @@ bool cmQtAutoGenerators::MocGenerateAll() } } - // Add moc_predefs.h to moc file dependecies + // Add moc_predefs.h to moc file dependencies for (auto const& item : this->MocJobsIncluded) { item->Depends.insert(this->MocPredefsFileAbs); } diff --git a/Source/cmTargetDepend.h b/Source/cmTargetDepend.h index daa902e..b698db6 100644 --- a/Source/cmTargetDepend.h +++ b/Source/cmTargetDepend.h @@ -16,7 +16,7 @@ class cmTargetDepend cmGeneratorTarget const* Target; // The set order depends only on the Target, so we use - // mutable members to acheive a map with set syntax. + // mutable members to achieve a map with set syntax. mutable bool Link; mutable bool Util; diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx index e747adb..f1e9283 100644 --- a/Source/cmTimestamp.cxx +++ b/Source/cmTimestamp.cxx @@ -153,7 +153,7 @@ std::string cmTimestamp::AddTimestampComponent(char flag, if (unixEpoch == -1) { cmSystemTools::Error( "Error generating UNIX epoch in " - "STRING(TIMESTAMP ...). Please, file a bug report aginst CMake"); + "STRING(TIMESTAMP ...). Please, file a bug report against CMake"); return std::string(); } diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx index c04a683..8d4b018 100644 --- a/Source/cmUseMangledMesaCommand.cxx +++ b/Source/cmUseMangledMesaCommand.cxx @@ -13,8 +13,8 @@ bool cmUseMangledMesaCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { // expected two arguments: - // arguement one: the full path to gl_mangle.h - // arguement two : directory for output of edited headers + // argument one: the full path to gl_mangle.h + // argument two : directory for output of edited headers if (args.size() != 2) { this->SetError("called with incorrect number of arguments"); return false; diff --git a/Tests/CFBundleTest/np_macmain.cpp b/Tests/CFBundleTest/np_macmain.cpp index b5a4226..e5fd0d7 100644 --- a/Tests/CFBundleTest/np_macmain.cpp +++ b/Tests/CFBundleTest/np_macmain.cpp @@ -4,7 +4,7 @@ Based on the default np_macmain.cpp from FireBreath http://firebreath.googlecode.com - This file has been stripped to prevent it from accidently + This file has been stripped to prevent it from accidentally doing anything useful. \***********************************************************/ diff --git a/Tests/CTestTestStopTime/GetDate.cmake b/Tests/CTestTestStopTime/GetDate.cmake index 46ab2fb..64a4fb9 100644 --- a/Tests/CTestTestStopTime/GetDate.cmake +++ b/Tests/CTestTestStopTime/GetDate.cmake @@ -68,7 +68,7 @@ macro(GET_DATE) # # Extract six individual components by matching a regex with paren groupings. - # Use the replace functionality and \\1 thru \\6 to extract components. + # Use the replace functionality and \\1 through \\6 to extract components. # set(${GD_PREFIX}REGEX "([^/]+)/([^/]+)/([^ ]+) +([^:]+):([^:]+):([^\\.]+)") diff --git a/Tests/FortranModules/test_preprocess.F90 b/Tests/FortranModules/test_preprocess.F90 index 3a09976..c5a5ec3 100644 --- a/Tests/FortranModules/test_preprocess.F90 +++ b/Tests/FortranModules/test_preprocess.F90 @@ -1,5 +1,5 @@ MODULE Available -! no conent +! no content END MODULE PROGRAM PPTEST diff --git a/Tests/FortranModules/test_preprocess_module.F90 b/Tests/FortranModules/test_preprocess_module.F90 index 5849b62..fdbc051 100644 --- a/Tests/FortranModules/test_preprocess_module.F90 +++ b/Tests/FortranModules/test_preprocess_module.F90 @@ -1,5 +1,5 @@ #ifdef FOO MODULE PPAvailable -! no conent +! no content END MODULE #endif diff --git a/Tests/OutOfSource/CMakeLists.txt b/Tests/OutOfSource/CMakeLists.txt index de1603a..4687882 100644 --- a/Tests/OutOfSource/CMakeLists.txt +++ b/Tests/OutOfSource/CMakeLists.txt @@ -1,4 +1,4 @@ -# a simple test cas +# a simple test case cmake_minimum_required (VERSION 2.6) project (OutOfSource) diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt index cf7c02c..5a95927 100644 --- a/Tests/RunCMake/CPack/README.txt +++ b/Tests/RunCMake/CPack/README.txt @@ -149,7 +149,7 @@ this step and must contain NOTE: This variable should be used only as last resort as it sets generator specific regular expression. EXPECTED_FILE_CONTENT__LIST should be - prefered as it requires a list of expected files and directories that + preferred as it requires a list of expected files and directories that is later changed automatically depending on the generator so expected package content can be written only once per test for all generators. @@ -209,7 +209,7 @@ To add a new generator we must + FILE that will contain the package file for which the package content should be returned. + RESULT_VAR that will tell the function which variable in parent scope - should contain the result (list of pacakge content) + should contain the result (list of package content) - toExpectedContentList: This function should convert an expected package content list into one that is expected for the generator (e.g. rpm packages have install/relocate diff --git a/Tests/RunCMake/message/RunCMakeTest.cmake b/Tests/RunCMake/message/RunCMakeTest.cmake index 2346c86..24dad03 100644 --- a/Tests/RunCMake/message/RunCMakeTest.cmake +++ b/Tests/RunCMake/message/RunCMakeTest.cmake @@ -7,6 +7,6 @@ run_cmake(nomessage-internal-warning) run_cmake(warnmessage) # message command sets fatal occurred flag, so check each type of error -# seperately +# separately run_cmake(errormessage_deprecated) run_cmake(errormessage_dev) diff --git a/Utilities/cmcurl/CMake/Utilities.cmake b/Utilities/cmcurl/CMake/Utilities.cmake index 8b6276d..005b166 100644 --- a/Utilities/cmcurl/CMake/Utilities.cmake +++ b/Utilities/cmcurl/CMake/Utilities.cmake @@ -19,7 +19,7 @@ function(LIST_SPACES_APPEND_ONCE LIST_NAME) set(${LIST_NAME} "${NEW_LIST_SPACE}" PARENT_SCOPE) endfunction() -# Convinience function that does the same as LIST(FIND ...) but with a TRUE/FALSE return value. +# Convenience function that does the same as LIST(FIND ...) but with a TRUE/FALSE return value. # Ex: IN_STR_LIST(MY_LIST "Searched item" WAS_FOUND) function(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL) list(FIND ${LIST_NAME} ${ITEM_SEARCHED} FIND_POS) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3048777006e1d10646e7b62f46406859dc4d0812 commit 3048777006e1d10646e7b62f46406859dc4d0812 Merge: 817331a 5464e23 Author: Brad King AuthorDate: Thu Nov 2 09:48:53 2017 -0400 Commit: Brad King CommitDate: Thu Nov 2 09:48:53 2017 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-11-02 (54f0901a) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5464e23ff5e822b8a99a3cd234c54ff4632ccb98 commit 5464e23ff5e822b8a99a3cd234c54ff4632ccb98 Author: KWSys Upstream AuthorDate: Thu Nov 2 09:44:34 2017 -0400 Commit: Brad King CommitDate: Thu Nov 2 09:48:53 2017 -0400 KWSys 2017-11-02 (54f0901a) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 54f0901ad1a1c545a1360a19b5c521857b5a66ec (master). Upstream Shortlog ----------------- Bryon Bean (1): 8e428c18 Process: Add function to kill process (and children) with pid diff --git a/Process.h.in b/Process.h.in index 237001c..6cb9443 100644 --- a/Process.h.in +++ b/Process.h.in @@ -77,6 +77,7 @@ #define kwsysProcess_WaitForExit kwsys_ns(Process_WaitForExit) #define kwsysProcess_Interrupt kwsys_ns(Process_Interrupt) #define kwsysProcess_Kill kwsys_ns(Process_Kill) +#define kwsysProcess_KillPID kwsys_ns(Process_KillPID) #define kwsysProcess_ResetStartTime kwsys_ns(Process_ResetStartTime) #endif @@ -457,6 +458,13 @@ kwsysEXPORT void kwsysProcess_Interrupt(kwsysProcess* cp); kwsysEXPORT void kwsysProcess_Kill(kwsysProcess* cp); /** + * Same as kwsysProcess_Kill using process ID to locate process to + * terminate. + * @see kwsysProcess_Kill(kwsysProcess* cp) + */ +kwsysEXPORT void kwsysProcess_KillPID(unsigned long); + +/** * Reset the start time of the child process to the current time. */ kwsysEXPORT void kwsysProcess_ResetStartTime(kwsysProcess* cp); diff --git a/ProcessUNIX.c b/ProcessUNIX.c index e62ef34..718a1aa 100644 --- a/ProcessUNIX.c +++ b/ProcessUNIX.c @@ -2485,6 +2485,11 @@ static pid_t kwsysProcessFork(kwsysProcess* cp, #define KWSYSPE_PS_FORMAT "%d %d %*[^\n]\n" #endif +void kwsysProcess_KillPID(unsigned long process_id) +{ + kwsysProcessKill((pid_t)process_id); +} + static void kwsysProcessKill(pid_t process_id) { #if defined(__linux__) || defined(__CYGWIN__) diff --git a/ProcessWin32.c b/ProcessWin32.c index 945fa28..82fdc74 100644 --- a/ProcessWin32.c +++ b/ProcessWin32.c @@ -1466,6 +1466,11 @@ void kwsysProcess_Kill(kwsysProcess* cp) for them to exit. */ } +void kwsysProcess_KillPID(unsigned long process_id) +{ + kwsysProcessKillTree((DWORD)process_id); +} + /* Function executed for each pipe's thread. Argument is a pointer to the kwsysProcessPipeData instance for this thread. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f61052ad390773610e14367c14fb53ad2e6b789e commit f61052ad390773610e14367c14fb53ad2e6b789e Author: Mark Salisbury AuthorDate: Wed Nov 1 17:21:18 2017 -0600 Commit: Mark Salisbury CommitDate: Wed Nov 1 17:21:18 2017 -0600 FindBZip2: Normalize slashes when legacy BZIP2_LIBRARIES is specified On Windows if you specify the library path using a regular Windows path with backslashes, FindBZip2 announces that it found the library, but the value is reported with backslashes instead of forward slashes. This breaks assumptions elsewhere in CMake. Convert slashes explicitly. diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake index d2307f1..0375b09 100644 --- a/Modules/FindBZip2.cmake +++ b/Modules/FindBZip2.cmake @@ -38,6 +38,8 @@ if (NOT BZIP2_LIBRARIES) include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) SELECT_LIBRARY_CONFIGURATIONS(BZIP2) +else () + file(TO_CMAKE_PATH "${BZIP2_LIBRARIES}" BZIP2_LIBRARIES) endif () if (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=39c2feaf8c4dcb9c3a30c68a066fb70e126d7fe6 commit 39c2feaf8c4dcb9c3a30c68a066fb70e126d7fe6 Author: Justin Berger AuthorDate: Sat Jul 22 18:34:33 2017 -0600 Commit: Justin Berger CommitDate: Wed Nov 1 11:32:11 2017 -0600 misc: Added utility method to allow working with stacks diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 8e8a54d..cbcf200 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -438,6 +438,19 @@ void cmListFileBacktrace::PrintCallStack(std::ostream& out) const } } +size_t cmListFileBacktrace::Depth() const +{ + size_t depth = 0; + if (this->Cur == nullptr) { + return 0; + } + + for (Entry* i = this->Cur->Up; i; i = i->Up) { + depth++; + } + return depth; +} + std::ostream& operator<<(std::ostream& os, cmListFileContext const& lfc) { os << lfc.FilePath; diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 349ddef..1f9e374 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -6,6 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include +#include #include #include @@ -138,6 +139,9 @@ public: // Print the call stack below the top of the backtrace. void PrintCallStack(std::ostream& out) const; + // Get the number of 'frames' in this backtrace + size_t Depth() const; + private: struct Entry; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5d2988ea7cc60778dbaa21860aad264c7aa7a81 commit f5d2988ea7cc60778dbaa21860aad264c7aa7a81 Author: Justin Berger AuthorDate: Mon Aug 21 12:22:52 2017 -0600 Commit: Justin Berger CommitDate: Wed Nov 1 11:32:11 2017 -0600 server: Swapped to cm_thread impl diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx index e923c22..9af4c0a 100644 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@ -245,11 +245,10 @@ cmFileMonitor* cmServer::FileMonitor() const void cmServer::WriteJsonObject(const Json::Value& jsonValue, const DebugInfo* debug) const { - uv_rwlock_rdlock(&ConnectionsMutex); + cm::shared_lock lock(ConnectionsMutex); for (auto& connection : this->Connections) { WriteJsonObject(connection.get(), jsonValue, debug); } - uv_rwlock_rdunlock(&ConnectionsMutex); } void cmServer::WriteJsonObject(cmConnection* connection, @@ -456,14 +455,12 @@ bool cmServerBase::Serve(std::string* errorMessage) OnServeStart(); { - uv_rwlock_rdlock(&ConnectionsMutex); + cm::shared_lock lock(ConnectionsMutex); for (auto& connection : Connections) { if (!connection->OnServeStart(errorMessage)) { - uv_rwlock_rdunlock(&ConnectionsMutex); return false; } } - uv_rwlock_rdunlock(&ConnectionsMutex); } if (uv_run(&Loop, UV_RUN_DEFAULT) != 0) { @@ -501,12 +498,11 @@ void cmServerBase::StartShutDown() } { - uv_rwlock_wrlock(&ConnectionsMutex); + cm::unique_lock lock(ConnectionsMutex); for (auto& connection : Connections) { connection->OnConnectionShuttingDown(); } Connections.clear(); - uv_rwlock_wrunlock(&ConnectionsMutex); } uv_walk(&Loop, on_walk_to_shutdown, nullptr); @@ -525,9 +521,6 @@ cmServerBase::cmServerBase(cmConnection* connection) (void)err; assert(err == 0); - err = uv_rwlock_init(&ConnectionsMutex); - assert(err == 0); - AddNewConnection(connection); } @@ -540,14 +533,14 @@ cmServerBase::~cmServerBase() } uv_loop_close(&Loop); - uv_rwlock_destroy(&ConnectionsMutex); } void cmServerBase::AddNewConnection(cmConnection* ownedConnection) { - uv_rwlock_wrlock(&ConnectionsMutex); - Connections.emplace_back(ownedConnection); - uv_rwlock_wrunlock(&ConnectionsMutex); + { + cm::unique_lock lock(ConnectionsMutex); + Connections.emplace_back(ownedConnection); + } ownedConnection->SetServer(this); } @@ -561,11 +554,13 @@ void cmServerBase::OnDisconnect(cmConnection* pConnection) auto pred = [pConnection](const std::unique_ptr& m) { return m.get() == pConnection; }; - uv_rwlock_wrlock(&ConnectionsMutex); - Connections.erase( - std::remove_if(Connections.begin(), Connections.end(), pred), - Connections.end()); - uv_rwlock_wrunlock(&ConnectionsMutex); + { + cm::unique_lock lock(ConnectionsMutex); + Connections.erase( + std::remove_if(Connections.begin(), Connections.end(), pred), + Connections.end()); + } + if (Connections.empty()) { StartShutDown(); } diff --git a/Source/cmServer.h b/Source/cmServer.h index 15fd2ba..6e46f8c 100644 --- a/Source/cmServer.h +++ b/Source/cmServer.h @@ -5,6 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include "cm_jsoncpp_value.h" +#include "cm_thread.hxx" #include "cm_uv.h" #include // IWYU pragma: keep @@ -61,7 +62,7 @@ public: void OnDisconnect(cmConnection* pConnection); protected: - mutable uv_rwlock_t ConnectionsMutex; + mutable cm::shared_mutex ConnectionsMutex; std::vector> Connections; bool ServeThreadRunning = false; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2636d86ce2f45f06bdcf4cb60c15df55838a3aa7 commit 2636d86ce2f45f06bdcf4cb60c15df55838a3aa7 Author: Justin Berger AuthorDate: Mon Aug 21 12:27:10 2017 -0600 Commit: Justin Berger CommitDate: Wed Nov 1 11:32:11 2017 -0600 utility: Added minimal std::thread drop-in diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index e1c34bf..b016f40 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -593,6 +593,7 @@ set(SRCS cm_utf8.c cm_codecvt.hxx cm_codecvt.cxx + cm_thread.hxx ) SET_PROPERTY(SOURCE cmProcessOutput.cxx APPEND PROPERTY COMPILE_DEFINITIONS diff --git a/Source/cm_thread.hxx b/Source/cm_thread.hxx new file mode 100644 index 0000000..b8c25c7 --- /dev/null +++ b/Source/cm_thread.hxx @@ -0,0 +1,78 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef CM_THREAD_HXX +#define CM_THREAD_HXX + +#include "cmConfigure.h" // IWYU pragma: keep +#include "cm_uv.h" + +namespace cm { +class mutex +{ + uv_mutex_t _M_; + +public: + mutex() { uv_mutex_init(&_M_); } + ~mutex() { uv_mutex_destroy(&_M_); } + + void lock() { uv_mutex_lock(&_M_); } + + void unlock() { uv_mutex_unlock(&_M_); } +}; + +template +class lock_guard +{ + T& _mutex; + +public: + lock_guard(T& m) + : _mutex(m) + { + _mutex.lock(); + } + ~lock_guard() { _mutex.unlock(); } +}; + +class shared_mutex +{ + uv_rwlock_t _M_; + +public: + shared_mutex() { uv_rwlock_init(&_M_); } + ~shared_mutex() { uv_rwlock_destroy(&_M_); } + + void lock() { uv_rwlock_wrlock(&_M_); } + + void unlock() { uv_rwlock_wrunlock(&_M_); } + + void lock_shared() { uv_rwlock_rdlock(&_M_); } + + void unlock_shared() { uv_rwlock_rdunlock(&_M_); } +}; + +template +class shared_lock +{ + T& _mutex; + +public: + shared_lock(T& m) + : _mutex(m) + { + _mutex.lock_shared(); + } + ~shared_lock() { _mutex.unlock_shared(); } +}; + +template +class unique_lock : public lock_guard +{ +public: + unique_lock(T& m) + : lock_guard(m) + { + } +}; +} +#endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d46b4ba83532d8954e473a26112288cd8e693775 commit d46b4ba83532d8954e473a26112288cd8e693775 Author: Justin Berger AuthorDate: Sun Sep 3 19:56:01 2017 -0600 Commit: Justin Berger CommitDate: Wed Nov 1 11:30:35 2017 -0600 server: Updated server tests to try various communication channels diff --git a/Tests/Server/cmakelib.py b/Tests/Server/cmakelib.py index aebc84f..39e3618 100644 --- a/Tests/Server/cmakelib.py +++ b/Tests/Server/cmakelib.py @@ -1,5 +1,5 @@ from __future__ import print_function -import sys, subprocess, json, os, select +import sys, subprocess, json, os, select, shutil, time, socket termwidth = 150 @@ -40,25 +40,35 @@ def col_print(title, array): filterPacket = lambda x: x +STDIN = 0 +PIPE = 1 + +communicationMethods = [STDIN] + +if hasattr(socket, 'AF_UNIX'): + communicationMethods.append(PIPE) + def defaultExitWithError(proc): data = "" try: - while select.select([proc.stdout], [], [], 3.)[0]: - data = data + proc.stdout.read(1) + while select.select([proc.outPipe], [], [], 3.)[0]: + data = data + proc.outPipe.read(1) if len(data): print("Rest of raw buffer from server:") printServer(data) except: pass - proc.stdout.close() - proc.stdin.close() + proc.outPipe.close() + proc.inPipe.close() proc.kill() sys.exit(1) exitWithError = lambda proc: defaultExitWithError(proc) +serverTag = "SERVER" + def printServer(*args): - print("SERVER>", *args) + print(serverTag + ">", *args) print() sys.stdout.flush() @@ -71,7 +81,7 @@ def waitForRawMessage(cmakeCommand): stdoutdata = "" payload = "" while not cmakeCommand.poll(): - stdoutdataLine = cmakeCommand.stdout.readline() + stdoutdataLine = cmakeCommand.outPipe.readline() if stdoutdataLine: stdoutdata += stdoutdataLine.decode('utf-8') else: @@ -106,26 +116,51 @@ def writeRawData(cmakeCommand, content): if print_communication: printClient(content, "(Use \\r\\n:", rn, ")") - cmakeCommand.stdin.write(payload.encode('utf-8')) - cmakeCommand.stdin.flush() + cmakeCommand.write(payload.encode('utf-8')) + writeRawData.counter = 0 def writePayload(cmakeCommand, obj): writeRawData(cmakeCommand, json.dumps(obj)) -def initServerProc(cmakeCommand): - cmakeCommand = subprocess.Popen([cmakeCommand, "-E", "server", "--experimental", "--debug"], - stdin=subprocess.PIPE, - stdout=subprocess.PIPE) +def getPipeName(): + return "/tmp/server-test-socket" + +def attachPipe(cmakeCommand, pipeName): + time.sleep(1) + sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + sock.connect(pipeName) + global serverTag + serverTag = "SERVER(PIPE)" + cmakeCommand.outPipe = sock.makefile() + cmakeCommand.inPipe = sock + cmakeCommand.write = cmakeCommand.inPipe.sendall + +def writeAndFlush(pipe, val): + pipe.write(val) + pipe.flush() + +def initServerProc(cmakeCommand, comm): + if comm == PIPE: + pipeName = getPipeName() + cmakeCommand = subprocess.Popen([cmakeCommand, "-E", "server", "--experimental", "--pipe=" + pipeName]) + attachPipe(cmakeCommand, pipeName) + else: + cmakeCommand = subprocess.Popen([cmakeCommand, "-E", "server", "--experimental", "--debug"], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE) + cmakeCommand.outPipe = cmakeCommand.stdout + cmakeCommand.inPipe = cmakeCommand.stdin + cmakeCommand.write = lambda val: writeAndFlush(cmakeCommand.inPipe, val) packet = waitForRawMessage(cmakeCommand) if packet == None: print("Not in server mode") - sys.exit(1) + sys.exit(2) if packet['type'] != 'hello': print("No hello message") - sys.exit(1) + sys.exit(3) return cmakeCommand @@ -159,25 +194,27 @@ def waitForReply(cmakeCommand, originalType, cookie, skipProgress): packet = waitForRawMessage(cmakeCommand) t = packet['type'] if packet['cookie'] != cookie or packet['inReplyTo'] != originalType: - sys.exit(1) + print("cookie or inReplyTo mismatch") + sys.exit(4) if t == 'message' or t == 'progress': if skipProgress: continue if t == 'reply': break - sys.exit(1) + print("Unrecognized message", packet) + sys.exit(5) return packet def waitForError(cmakeCommand, originalType, cookie, message): packet = waitForRawMessage(cmakeCommand) if packet['cookie'] != cookie or packet['type'] != 'error' or packet['inReplyTo'] != originalType or packet['errorMessage'] != message: - sys.exit(1) + sys.exit(6) def waitForProgress(cmakeCommand, originalType, cookie, current, message): packet = waitForRawMessage(cmakeCommand) if packet['cookie'] != cookie or packet['type'] != 'progress' or packet['inReplyTo'] != originalType or packet['progressCurrent'] != current or packet['progressMessage'] != message: - sys.exit(1) + sys.exit(7) def handshake(cmakeCommand, major, minor, source, build, generator, extraGenerator): version = { 'major': major } @@ -202,9 +239,9 @@ def validateGlobalSettings(cmakeCommand, cmakeCommandPath, data): versionString = version['string'] vs = str(version['major']) + '.' + str(version['minor']) + '.' + str(version['patch']) if (versionString != vs and not versionString.startswith(vs + '-')): - sys.exit(1) + sys.exit(8) if (versionString != cmakeVersion): - sys.exit(1) + sys.exit(9) # validate generators: generatorObjects = capabilities['generators'] @@ -237,16 +274,16 @@ def validateGlobalSettings(cmakeCommand, cmakeCommandPath, data): for gen in cmakeGenerators: if (not gen in generators): - sys.exit(1) + sys.exit(10) gen = packet['generator'] if (gen != '' and not (gen in generators)): - sys.exit(1) + sys.exit(11) for i in data: print("Validating", i) if (packet[i] != data[i]): - sys.exit(1) + sys.exit(12) def validateCache(cmakeCommand, data): packet = waitForReply(cmakeCommand, 'cache', '', False) @@ -296,8 +333,8 @@ def handleBasicMessage(proc, obj, debug): def shutdownProc(proc): # Tell the server to exit. - proc.stdin.close() - proc.stdout.close() + proc.inPipe.close() + proc.outPipe.close() # Wait for the server to exit. # If this version of python supports it, terminate the server after a timeout. diff --git a/Tests/Server/server-test.py b/Tests/Server/server-test.py index f3c3fc2..701c6e9 100644 --- a/Tests/Server/server-test.py +++ b/Tests/Server/server-test.py @@ -19,87 +19,87 @@ if os.path.exists(buildDir): cmakelib.filterBase = sourceDir -proc = cmakelib.initServerProc(cmakeCommand) - with open(testFile) as f: testData = json.loads(f.read()) -for obj in testData: - if cmakelib.handleBasicMessage(proc, obj, debug): - pass - elif 'reply' in obj: - data = obj['reply'] - if debug: print("Waiting for reply:", json.dumps(data)) - originalType = "" - cookie = "" - skipProgress = False; - if 'cookie' in data: cookie = data['cookie'] - if 'type' in data: originalType = data['type'] - if 'skipProgress' in data: skipProgress = data['skipProgress'] - cmakelib.waitForReply(proc, originalType, cookie, skipProgress) - elif 'error' in obj: - data = obj['error'] - if debug: print("Waiting for error:", json.dumps(data)) - originalType = "" - cookie = "" - message = "" - if 'cookie' in data: cookie = data['cookie'] - if 'type' in data: originalType = data['type'] - if 'message' in data: message = data['message'] - cmakelib.waitForError(proc, originalType, cookie, message) - elif 'progress' in obj: - data = obj['progress'] - if debug: print("Waiting for progress:", json.dumps(data)) - originalType = '' - cookie = "" - current = 0 - message = "" - if 'cookie' in data: cookie = data['cookie'] - if 'type' in data: originalType = data['type'] - if 'current' in data: current = data['current'] - if 'message' in data: message = data['message'] - cmakelib.waitForProgress(proc, originalType, cookie, current, message) - elif 'handshake' in obj: - data = obj['handshake'] - if debug: print("Doing handshake:", json.dumps(data)) - major = -1 - minor = -1 - generator = cmakeGenerator - extraGenerator = '' - sourceDirectory = sourceDir - buildDirectory = buildDir - if 'major' in data: major = data['major'] - if 'minor' in data: minor = data['minor'] - if 'buildDirectory' in data: buildDirectory = data['buildDirectory'] - if 'sourceDirectory' in data: sourceDirectory = data['sourceDirectory'] - if 'generator' in data: generator = data['generator'] - if 'extraGenerator' in data: extraGenerator = data['extraGenerator'] - if not os.path.isabs(buildDirectory): - buildDirectory = buildDir + "/" + buildDirectory - if sourceDirectory != '' and not os.path.isabs(sourceDirectory): - sourceDirectory = sourceDir + "/" + sourceDirectory - cmakelib.handshake(proc, major, minor, sourceDirectory, buildDirectory, - generator, extraGenerator) - elif 'validateGlobalSettings' in obj: - data = obj['validateGlobalSettings'] - if not 'buildDirectory' in data: data['buildDirectory'] = buildDir - if not 'sourceDirectory' in data: data['sourceDirectory'] = sourceDir - if not 'generator' in data: data['generator'] = cmakeGenerator - if not 'extraGenerator' in data: data['extraGenerator'] = '' - cmakelib.validateGlobalSettings(proc, cmakeCommand, data) - elif 'validateCache' in obj: - data = obj['validateCache'] - if not 'isEmpty' in data: data['isEmpty'] = false - cmakelib.validateCache(proc, data) - elif 'message' in obj: - print("MESSAGE:", obj["message"]) - elif 'reconnect' in obj: - cmakelib.exitProc(proc) - proc = cmakelib.initServerProc(cmakeCommand) - else: - print("Unknown command:", json.dumps(obj)) - sys.exit(2) +for communicationMethod in cmakelib.communicationMethods: + proc = cmakelib.initServerProc(cmakeCommand, communicationMethod) + if proc is None: + continue - print("Completed") + for obj in testData: + if cmakelib.handleBasicMessage(proc, obj, debug): + pass + elif 'reply' in obj: + data = obj['reply'] + if debug: print("Waiting for reply:", json.dumps(data)) + originalType = "" + cookie = "" + skipProgress = False; + if 'cookie' in data: cookie = data['cookie'] + if 'type' in data: originalType = data['type'] + if 'skipProgress' in data: skipProgress = data['skipProgress'] + cmakelib.waitForReply(proc, originalType, cookie, skipProgress) + elif 'error' in obj: + data = obj['error'] + if debug: print("Waiting for error:", json.dumps(data)) + originalType = "" + cookie = "" + message = "" + if 'cookie' in data: cookie = data['cookie'] + if 'type' in data: originalType = data['type'] + if 'message' in data: message = data['message'] + cmakelib.waitForError(proc, originalType, cookie, message) + elif 'progress' in obj: + data = obj['progress'] + if debug: print("Waiting for progress:", json.dumps(data)) + originalType = '' + cookie = "" + current = 0 + message = "" + if 'cookie' in data: cookie = data['cookie'] + if 'type' in data: originalType = data['type'] + if 'current' in data: current = data['current'] + if 'message' in data: message = data['message'] + cmakelib.waitForProgress(proc, originalType, cookie, current, message) + elif 'handshake' in obj: + data = obj['handshake'] + if debug: print("Doing handshake:", json.dumps(data)) + major = -1 + minor = -1 + generator = cmakeGenerator + extraGenerator = '' + sourceDirectory = sourceDir + buildDirectory = buildDir + if 'major' in data: major = data['major'] + if 'minor' in data: minor = data['minor'] + if 'buildDirectory' in data: buildDirectory = data['buildDirectory'] + if 'sourceDirectory' in data: sourceDirectory = data['sourceDirectory'] + if 'generator' in data: generator = data['generator'] + if 'extraGenerator' in data: extraGenerator = data['extraGenerator'] -cmakelib.shutdownProc(proc) + if not os.path.isabs(buildDirectory): + buildDirectory = buildDir + "/" + buildDirectory + if sourceDirectory != '' and not os.path.isabs(sourceDirectory): + sourceDirectory = sourceDir + "/" + sourceDirectory + cmakelib.handshake(proc, major, minor, sourceDirectory, buildDirectory, + generator, extraGenerator) + elif 'validateGlobalSettings' in obj: + data = obj['validateGlobalSettings'] + if not 'buildDirectory' in data: data['buildDirectory'] = buildDir + if not 'sourceDirectory' in data: data['sourceDirectory'] = sourceDir + if not 'generator' in data: data['generator'] = cmakeGenerator + if not 'extraGenerator' in data: data['extraGenerator'] = '' + cmakelib.validateGlobalSettings(proc, cmakeCommand, data) + elif 'validateCache' in obj: + data = obj['validateCache'] + if not 'isEmpty' in data: data['isEmpty'] = false + cmakelib.validateCache(proc, data) + elif 'reconnect' in obj: + cmakelib.exitProc(proc) + proc = cmakelib.initServerProc(cmakeCommand, communicationMethod) + else: + print("Unknown command:", json.dumps(obj)) + sys.exit(2) + cmakelib.shutdownProc(proc) + print("Completed") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=08dca58358c95a41615150513a006379c4ee7825 commit 08dca58358c95a41615150513a006379c4ee7825 Author: Justin Berger AuthorDate: Sun Sep 3 20:09:24 2017 -0600 Commit: Justin Berger CommitDate: Mon Oct 30 10:58:58 2017 -0600 Tests: reworked server tests to allow other operation modes diff --git a/Tests/Server/CMakeLists.txt b/Tests/Server/CMakeLists.txt index 08bef0c..41d1131 100644 --- a/Tests/Server/CMakeLists.txt +++ b/Tests/Server/CMakeLists.txt @@ -3,10 +3,10 @@ project(Server CXX) find_package(PythonInterp REQUIRED) -macro(do_test bsname file) +macro(do_test bsname file type) execute_process(COMMAND ${PYTHON_EXECUTABLE} -B # no .pyc files - "${CMAKE_SOURCE_DIR}/server-test.py" + "${CMAKE_SOURCE_DIR}/${type}-test.py" "${CMAKE_COMMAND}" "${CMAKE_SOURCE_DIR}/${file}" "${CMAKE_SOURCE_DIR}" @@ -20,9 +20,9 @@ macro(do_test bsname file) endif() endmacro() -do_test("test_cache" "tc_cache.json") -do_test("test_handshake" "tc_handshake.json") -do_test("test_globalSettings" "tc_globalSettings.json") -do_test("test_buildsystem1" "tc_buildsystem1.json") +do_test("test_cache" "tc_cache.json" "server") +do_test("test_handshake" "tc_handshake.json" "server") +do_test("test_globalSettings" "tc_globalSettings.json" "server") +do_test("test_buildsystem1" "tc_buildsystem1.json" "server") add_executable(Server empty.cpp) diff --git a/Tests/Server/cmakelib.py b/Tests/Server/cmakelib.py index 2218e02..aebc84f 100644 --- a/Tests/Server/cmakelib.py +++ b/Tests/Server/cmakelib.py @@ -1,5 +1,5 @@ from __future__ import print_function -import sys, subprocess, json +import sys, subprocess, json, os, select termwidth = 150 @@ -38,6 +38,35 @@ def col_print(title, array): for index in range(numRows): print(indent + pad.join(item.ljust(maxitemwidth) for item in array[index::numRows])) +filterPacket = lambda x: x + +def defaultExitWithError(proc): + data = "" + try: + while select.select([proc.stdout], [], [], 3.)[0]: + data = data + proc.stdout.read(1) + if len(data): + print("Rest of raw buffer from server:") + printServer(data) + except: + pass + proc.stdout.close() + proc.stdin.close() + proc.kill() + sys.exit(1) + +exitWithError = lambda proc: defaultExitWithError(proc) + +def printServer(*args): + print("SERVER>", *args) + print() + sys.stdout.flush() + +def printClient(*args): + print("CLIENT>", *args) + print() + sys.stdout.flush() + def waitForRawMessage(cmakeCommand): stdoutdata = "" payload = "" @@ -50,12 +79,16 @@ def waitForRawMessage(cmakeCommand): begin = stdoutdata.find('[== "CMake Server" ==[\n') end = stdoutdata.find(']== "CMake Server" ==]') - if (begin != -1 and end != -1): + if begin != -1 and end != -1: begin += len('[== "CMake Server" ==[\n') payload = stdoutdata[begin:end] - if print_communication: - print("\nSERVER>", json.loads(payload), "\n") - return json.loads(payload) + jsonPayload = json.loads(payload) + filteredPayload = filterPacket(jsonPayload) + if print_communication and filteredPayload: + printServer(filteredPayload) + if filteredPayload is not None or jsonPayload is None: + return jsonPayload + stdoutdata = stdoutdata[(end+len(']== "CMake Server" ==]')):] def writeRawData(cmakeCommand, content): writeRawData.counter += 1 @@ -71,7 +104,8 @@ def writeRawData(cmakeCommand, content): payload = payload.replace('\n', '\r\n') if print_communication: - print("\nCLIENT>", content, "(Use \\r\\n:", rn, ")\n") + printClient(content, "(Use \\r\\n:", rn, ")") + cmakeCommand.stdin.write(payload.encode('utf-8')) cmakeCommand.stdin.flush() writeRawData.counter = 0 @@ -79,7 +113,7 @@ writeRawData.counter = 0 def writePayload(cmakeCommand, obj): writeRawData(cmakeCommand, json.dumps(obj)) -def initProc(cmakeCommand): +def initServerProc(cmakeCommand): cmakeCommand = subprocess.Popen([cmakeCommand, "-E", "server", "--experimental", "--debug"], stdin=subprocess.PIPE, stdout=subprocess.PIPE) @@ -115,7 +149,8 @@ def waitForMessage(cmakeCommand, expected): packet = ordered(waitForRawMessage(cmakeCommand)) if packet != data: - sys.exit(-1) + print ("Received unexpected message; test failed") + exitWithError(cmakeCommand) return packet def waitForReply(cmakeCommand, originalType, cookie, skipProgress): @@ -236,3 +271,43 @@ def validateCache(cmakeCommand, data): if (not hadHomeDir): print('No CMAKE_HOME_DIRECTORY found in cache.') sys.exit(1) + +def handleBasicMessage(proc, obj, debug): + if 'sendRaw' in obj: + data = obj['sendRaw'] + if debug: print("Sending raw:", data) + writeRawData(proc, data) + return True + elif 'send' in obj: + data = obj['send'] + if debug: print("Sending:", json.dumps(data)) + writePayload(proc, data) + return True + elif 'recv' in obj: + data = obj['recv'] + if debug: print("Waiting for:", json.dumps(data)) + waitForMessage(proc, data) + return True + elif 'message' in obj: + print("MESSAGE:", obj["message"]) + sys.stdout.flush() + return True + return False + +def shutdownProc(proc): + # Tell the server to exit. + proc.stdin.close() + proc.stdout.close() + + # Wait for the server to exit. + # If this version of python supports it, terminate the server after a timeout. + try: + proc.wait(timeout=5) + except TypeError: + proc.wait() + except: + proc.terminate() + raise + + print('cmake-server exited: %d' % proc.returncode) + sys.exit(proc.returncode) diff --git a/Tests/Server/server-test.py b/Tests/Server/server-test.py index 9380910..f3c3fc2 100644 --- a/Tests/Server/server-test.py +++ b/Tests/Server/server-test.py @@ -9,7 +9,7 @@ sourceDir = sys.argv[3] buildDir = sys.argv[4] + "/" + os.path.splitext(os.path.basename(testFile))[0] cmakeGenerator = sys.argv[5] -print("Test:", testFile, +print("Server Test:", testFile, "\n-- SourceDir:", sourceDir, "\n-- BuildDir:", buildDir, "\n-- Generator:", cmakeGenerator) @@ -17,24 +17,16 @@ print("Test:", testFile, if os.path.exists(buildDir): shutil.rmtree(buildDir) -proc = cmakelib.initProc(cmakeCommand) +cmakelib.filterBase = sourceDir + +proc = cmakelib.initServerProc(cmakeCommand) with open(testFile) as f: testData = json.loads(f.read()) for obj in testData: - if 'sendRaw' in obj: - data = obj['sendRaw'] - if debug: print("Sending raw:", data) - cmakelib.writeRawData(proc, data) - elif 'send' in obj: - data = obj['send'] - if debug: print("Sending:", json.dumps(data)) - cmakelib.writePayload(proc, data) - elif 'recv' in obj: - data = obj['recv'] - if debug: print("Waiting for:", json.dumps(data)) - cmakelib.waitForMessage(proc, data) + if cmakelib.handleBasicMessage(proc, obj, debug): + pass elif 'reply' in obj: data = obj['reply'] if debug: print("Waiting for reply:", json.dumps(data)) @@ -103,13 +95,11 @@ for obj in testData: print("MESSAGE:", obj["message"]) elif 'reconnect' in obj: cmakelib.exitProc(proc) - proc = cmakelib.initProc(cmakeCommand) + proc = cmakelib.initServerProc(cmakeCommand) else: print("Unknown command:", json.dumps(obj)) sys.exit(2) print("Completed") -cmakelib.exitProc(proc) -print('cmake-server exited: %d' % proc.returncode) -sys.exit(proc.returncode) +cmakelib.shutdownProc(proc) ----------------------------------------------------------------------- Summary of changes: Help/command/add_subdirectory.rst | 2 +- Help/command/file.rst | 2 +- Help/command/install.rst | 2 +- Help/dev/testing.rst | 2 +- Help/release/3.4.rst | 2 +- Help/release/3.6.rst | 2 +- Help/release/3.7.rst | 2 +- Help/variable/LIBRARY_OUTPUT_PATH.rst | 2 +- .../AndroidTestUtilities/PushToAndroidDevice.cmake | 2 +- Modules/CMakePackageConfigHelpers.cmake | 2 +- Modules/CPackIFW.cmake | 4 +- Modules/CPackRPM.cmake | 14 +- Modules/CTest.cmake | 2 +- Modules/Compiler/IAR-FindBinUtils.cmake | 2 +- Modules/Compiler/IAR.cmake | 2 +- Modules/Documentation.cmake | 2 +- Modules/FeatureSummary.cmake | 2 +- Modules/FindBZip2.cmake | 2 + Modules/FindCUDA.cmake | 2 +- Modules/FindCUDA/run_nvcc.cmake | 2 +- Modules/FindCxxTest.cmake | 2 +- Modules/FindDCMTK.cmake | 2 +- Modules/FindDevIL.cmake | 2 +- Modules/FindFLEX.cmake | 2 +- Modules/FindHDF5.cmake | 2 +- Modules/FindJNI.cmake | 4 +- Modules/FindMatlab.cmake | 2 +- Modules/FindOpenSSL.cmake | 2 +- Modules/FindTCL.cmake | 2 +- Modules/FindTclStub.cmake | 2 +- Modules/FindwxWidgets.cmake | 2 +- Modules/FindwxWindows.cmake | 4 +- Modules/ITKCompatibility.cmake | 2 +- Modules/Qt4Macros.cmake | 2 +- Modules/SquishTestScript.cmake | 2 +- Modules/UseEcos.cmake | 2 +- Modules/UseJava.cmake | 2 +- Source/CMakeLists.txt | 1 + Source/CPack/WiX/cmWIXPatchParser.cxx | 2 +- Source/CPack/bills-comments.txt | 2 +- Source/CTest/cmCTestScriptHandler.cxx | 4 +- Source/CTest/cmCTestSubmitHandler.cxx | 4 +- Source/CTest/cmCTestTestHandler.h | 2 +- Source/CTest/cmParseGTMCoverage.cxx | 2 +- Source/cmCMakeHostSystemInformationCommand.h | 2 +- Source/cmCacheManager.h | 2 +- Source/cmConvertMSBuildXMLToJSON.py | 2 +- Source/cmExportFileGenerator.cxx | 2 +- Source/cmFindCommon.cxx | 2 +- Source/cmFindPackageCommand.cxx | 2 +- Source/cmGlobalGenerator.cxx | 2 +- Source/cmGlobalKdevelopGenerator.cxx | 2 +- Source/cmGlobalVisualStudio71Generator.cxx | 2 +- Source/cmGlobalVisualStudio8Generator.cxx | 2 +- Source/cmIncludeDirectoryCommand.cxx | 2 +- Source/cmListFileCache.cxx | 13 ++ Source/cmListFileCache.h | 4 + Source/cmMakefile.cxx | 2 +- Source/cmMakefile.h | 4 +- Source/cmMessageCommand.cxx | 2 +- Source/cmQtAutoGenerators.cxx | 4 +- Source/cmServer.cxx | 33 ++-- Source/cmServer.h | 3 +- Source/cmTargetDepend.h | 2 +- Source/cmTimestamp.cxx | 2 +- Source/cmUseMangledMesaCommand.cxx | 4 +- Source/cm_thread.hxx | 78 +++++++++ Source/kwsys/Process.h.in | 8 + Source/kwsys/ProcessUNIX.c | 5 + Source/kwsys/ProcessWin32.c | 5 + Tests/CFBundleTest/np_macmain.cpp | 2 +- Tests/CMakeLists.txt | 53 +++--- Tests/CTestTestStopTime/GetDate.cmake | 2 +- Tests/Contracts/Home.cmake | 19 +++ Tests/Contracts/Trilinos/CMakeLists.txt | 19 +-- .../Trilinos/{RunTest.cmake => Configure.cmake} | 2 +- Tests/Contracts/Trilinos/EnvScript.cmake | 32 ---- Tests/Contracts/VTK/CMakeLists.txt | 19 +-- .../VTK/{RunTest.cmake => Configure.cmake} | 2 +- Tests/Contracts/cse-snapshot/CMakeLists.txt | 114 ------------- Tests/Contracts/cse-snapshot/Dashboard.cmake.in | 76 --------- Tests/Contracts/cse-snapshot/RunTest.cmake | 3 - Tests/FortranModules/test_preprocess.F90 | 2 +- Tests/FortranModules/test_preprocess_module.F90 | 2 +- Tests/OutOfSource/CMakeLists.txt | 2 +- Tests/RunCMake/CPack/README.txt | 4 +- Tests/RunCMake/message/RunCMakeTest.cmake | 2 +- Tests/Server/CMakeLists.txt | 12 +- Tests/Server/cmakelib.py | 162 +++++++++++++++--- Tests/Server/server-test.py | 172 +++++++++----------- Utilities/cmcurl/CMake/Utilities.cmake | 2 +- 91 files changed, 489 insertions(+), 514 deletions(-) create mode 100644 Source/cm_thread.hxx create mode 100644 Tests/Contracts/Home.cmake rename Tests/Contracts/Trilinos/{RunTest.cmake => Configure.cmake} (78%) delete mode 100644 Tests/Contracts/Trilinos/EnvScript.cmake rename Tests/Contracts/VTK/{RunTest.cmake => Configure.cmake} (65%) delete mode 100644 Tests/Contracts/cse-snapshot/CMakeLists.txt delete mode 100644 Tests/Contracts/cse-snapshot/Dashboard.cmake.in delete mode 100644 Tests/Contracts/cse-snapshot/RunTest.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Tue Nov 7 00:05:18 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 7 Nov 2017 00:05:18 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-231-gc37c477 Message-ID: <20171107050519.466C5102C52@public.kitware.com> 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 c37c4771cb876146ae0d23a2008482d6fcd53e35 (commit) from b104bcfd98add349f7624887073c79a84ae41c44 (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=c37c4771cb876146ae0d23a2008482d6fcd53e35 commit c37c4771cb876146ae0d23a2008482d6fcd53e35 Author: Kitware Robot AuthorDate: Tue Nov 7 00:01:14 2017 -0500 Commit: Kitware Robot CommitDate: Tue Nov 7 00:01:14 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e98e129..c9ec2ee 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20171106) +set(CMake_VERSION_PATCH 20171107) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Nov 7 08:25:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 7 Nov 2017 08:25:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-236-gb5d8610 Message-ID: <20171107132506.6B8F4102876@public.kitware.com> 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 b5d8610430b844231278db9ca3f807e2c433a608 (commit) via 1348f97784e0aaa1c4254011bfc9b6990993ee53 (commit) via d70bdc72ce5f480947077e435433fc6cf524be4d (commit) via 35a52bd1b4d0350d3c7e94611dd90ddb4b123352 (commit) via 335816efad6904fb5c6059a791d7b0eea4882bc0 (commit) from c37c4771cb876146ae0d23a2008482d6fcd53e35 (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=b5d8610430b844231278db9ca3f807e2c433a608 commit b5d8610430b844231278db9ca3f807e2c433a608 Merge: 1348f97 d70bdc7 Author: Brad King AuthorDate: Tue Nov 7 13:21:13 2017 +0000 Commit: Kitware Robot CommitDate: Tue Nov 7 08:21:23 2017 -0500 Merge topic 'findboost-compiler-version' d70bdc72 FindBoost: support more than one number in version components 335816ef FindBoost: use CMake's compiler version rather than querying again Acked-by: Kitware Robot Merge-request: !1441 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1348f97784e0aaa1c4254011bfc9b6990993ee53 commit 1348f97784e0aaa1c4254011bfc9b6990993ee53 Merge: c37c477 35a52bd Author: Brad King AuthorDate: Tue Nov 7 13:18:35 2017 +0000 Commit: Kitware Robot CommitDate: Tue Nov 7 08:18:59 2017 -0500 Merge topic 'server-test-info' 35a52bd1 server: add "ctestInfo" request to get test info Acked-by: Kitware Robot Merge-request: !1414 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d70bdc72ce5f480947077e435433fc6cf524be4d commit d70bdc72ce5f480947077e435433fc6cf524be4d Author: Ben Boeckel AuthorDate: Mon Nov 6 13:26:23 2017 -0500 Commit: Ben Boeckel CommitDate: Mon Nov 6 13:26:23 2017 -0500 FindBoost: support more than one number in version components diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index bf52d29..6f60eeb 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -391,7 +391,7 @@ endmacro() # version with a regex. # function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION) - string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" + string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\1\\2" _boost_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION}) set(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35a52bd1b4d0350d3c7e94611dd90ddb4b123352 commit 35a52bd1b4d0350d3c7e94611dd90ddb4b123352 Author: Justin Goshi AuthorDate: Wed Oct 25 15:00:15 2017 -0700 Commit: Justin Goshi CommitDate: Fri Nov 3 09:39:01 2017 -0700 server: add "ctestInfo" request to get test info diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index 389a6d5..a2fd961 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -628,6 +628,79 @@ CMake will reply:: ]== "CMake Server" ==] +Type "ctestInfo" +^^^^^^^^^^^^^^^^ + +The "ctestInfo" request can be used after a project was "compute"d successfully. + +It will list the complete project test structure as it is known to cmake. + +The reply will contain a key "configurations", which will contain a list of +configuration objects. Configuration objects are used to destinquish between +different configurations the build directory might have enabled. While most +generators only support one configuration, others might support several. + +Each configuration object can have the following keys: + +"name" + contains the name of the configuration. The name may be empty. +"projects" + contains a list of project objects, one for each build project. + +Project objects define one (sub-)project defined in the cmake build system. + +Each project object can have the following keys: + +"name" + contains the (sub-)projects name. +"targets" + contains a list of build system target objects. + +Target objects define individual build targets for a certain configuration. + +Each target object can have the following keys: + +"name" + contains the name of the target. +"type" + defines the type of build of the target. Possible values are + "STATIC_LIBRARY", "MODULE_LIBRARY", "SHARED_LIBRARY", "OBJECT_LIBRARY", + "EXECUTABLE", "UTILITY" and "INTERFACE_LIBRARY". +"fullName" + contains the full name of the build result (incl. extensions, etc.). +"hasEnabledTests" + true if testing is enabled for this target. +"ctestInfo" + contains a list of test objects for this target. + +Each test object can have the following keys: + +"ctestName" + contains the name of the test. +"ctestCommand" + contains the test command. +"properties" + contains a list of test property objects. +"backtrace" + contains a list of backtrace objects that specify where the test was defined. + +Each backtrace object can have the following keys: + +"path" + contains the full path to the file containing the statement. +"line" + contains the line number in the file where the statement was defined. +"name" + contains the name of the statement that added the test. + +Each test property object can have the following keys: + +"key" + contains the test property key. +"value" + contains the test property value. + + Type "cmakeInputs" ^^^^^^^^^^^^^^^^^^ diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 1a088ea..f47c2d4 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -222,7 +222,14 @@ void cmLocalGenerator::TraceDependencies() void cmLocalGenerator::GenerateTestFiles() { + std::string file = this->StateSnapshot.GetDirectory().GetCurrentBinary(); + file += "/"; + file += "CTestTestfile.cmake"; + if (!this->Makefile->IsOn("CMAKE_TESTING_ENABLED")) { + if (cmSystemTools::FileExists(file)) { + cmSystemTools::RemoveFile(file); + } return; } @@ -231,10 +238,6 @@ void cmLocalGenerator::GenerateTestFiles() const std::string& config = this->Makefile->GetConfigurations(configurationTypes, false); - std::string file = this->StateSnapshot.GetDirectory().GetCurrentBinary(); - file += "/"; - file += "CTestTestfile.cmake"; - cmGeneratedFileStream fout(file.c_str()); fout.SetCopyIfDifferent(true); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index b2641d2..90e0a0d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3282,6 +3282,13 @@ cmGlobalGenerator* cmMakefile::GetGlobalGenerator() const return this->GlobalGenerator; } +void cmMakefile::GetTestNames(std::vector& testNames) +{ + for (const auto& iter : Tests) { + testNames.push_back(iter.first); + } +} + #ifdef CMAKE_BUILD_WITH_CMAKE cmVariableWatch* cmMakefile::GetVariableWatch() const { diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 7c6cca5..01a9fb7 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -617,6 +617,11 @@ public: cmGlobalGenerator* GetGlobalGenerator() const; /** + * Get all the test names this makefile knows about + */ + void GetTestNames(std::vector& testNames); + + /** * Get all the source files this makefile knows about */ const std::vector& GetSourceFiles() const diff --git a/Source/cmServerDictionary.h b/Source/cmServerDictionary.h index 03f1cc1..040c1fd 100644 --- a/Source/cmServerDictionary.h +++ b/Source/cmServerDictionary.h @@ -23,6 +23,7 @@ static const std::string kPROGRESS_TYPE = "progress"; static const std::string kREPLY_TYPE = "reply"; static const std::string kSET_GLOBAL_SETTINGS_TYPE = "setGlobalSettings"; static const std::string kSIGNAL_TYPE = "signal"; +static const std::string kCTEST_INFO_TYPE = "ctestInfo"; static const std::string kARTIFACTS_KEY = "artifacts"; static const std::string kBUILD_DIRECTORY_KEY = "buildDirectory"; @@ -90,6 +91,10 @@ static const std::string kWATCHED_DIRECTORIES_KEY = "watchedDirectories"; static const std::string kWATCHED_FILES_KEY = "watchedFiles"; static const std::string kHAS_INSTALL_RULE = "hasInstallRule"; static const std::string kINSTALL_PATHS = "installPaths"; +static const std::string kHAS_ENABLED_TESTS = "hasEnabledTests"; +static const std::string kCTEST_NAME = "ctestName"; +static const std::string kCTEST_COMMAND = "ctestCommand"; +static const std::string kCTEST_INFO = "ctestInfo"; static const std::string kTARGET_CROSS_REFERENCES_KEY = "crossReferences"; static const std::string kLINE_NUMBER_KEY = "line"; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index fc06fed..0cb906b 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -14,6 +14,7 @@ #include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmProperty.h" #include "cmServer.h" #include "cmServerDictionary.h" #include "cmSourceFile.h" @@ -23,6 +24,7 @@ #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" +#include "cmTest.h" #include "cm_uv.h" #include "cmake.h" @@ -479,6 +481,9 @@ const cmServerResponse cmServerProtocol1::Process( if (request.Type == kSET_GLOBAL_SETTINGS_TYPE) { return this->ProcessSetGlobalSettings(request); } + if (request.Type == kCTEST_INFO_TYPE) { + return this->ProcessCTests(request); + } return request.ReportError("Unknown command!"); } @@ -766,6 +771,153 @@ static void DumpBacktraceRange(Json::Value& result, const std::string& type, } } +static Json::Value DumpCTestInfo(const std::string& name, cmTest* testInfo) +{ + Json::Value result = Json::objectValue; + result[kCTEST_NAME] = name; + + // Concat command entries together. After the first should be the arguments + // for the command + std::string command; + for (auto const& cmd : testInfo->GetCommand()) { + command.append(cmd); + command.append(" "); + } + result[kCTEST_COMMAND] = command; + + // Build up the list of properties that may have been specified + Json::Value properties = Json::arrayValue; + for (auto& prop : testInfo->GetProperties()) { + Json::Value entry = Json::objectValue; + entry[kKEY_KEY] = prop.first; + entry[kVALUE_KEY] = prop.second.GetValue(); + properties.append(entry); + } + result[kPROPERTIES_KEY] = properties; + + // Need backtrace to figure out where this test was originally added + result[kBACKTRACE_KEY] = DumpBacktrace(testInfo->GetBacktrace()); + + return result; +} + +static Json::Value DumpCTestTarget(cmGeneratorTarget* target, + const std::string& config) +{ + cmLocalGenerator* lg = target->GetLocalGenerator(); + const cmState* state = lg->GetState(); + + const cmStateEnums::TargetType type = target->GetType(); + const std::string typeName = state->GetTargetTypeName(type); + + Json::Value ttl = Json::arrayValue; + ttl.append("EXECUTABLE"); + ttl.append("STATIC_LIBRARY"); + ttl.append("SHARED_LIBRARY"); + ttl.append("MODULE_LIBRARY"); + ttl.append("OBJECT_LIBRARY"); + ttl.append("UTILITY"); + ttl.append("INTERFACE_LIBRARY"); + + if (!hasString(ttl, typeName) || target->IsImported()) { + return Json::Value(); + } + + Json::Value result = Json::objectValue; + result[kNAME_KEY] = target->GetName(); + result[kTYPE_KEY] = typeName; + + if (type == cmStateEnums::INTERFACE_LIBRARY) { + return result; + } + result[kFULL_NAME_KEY] = target->GetFullName(config); + + if (target->Makefile->IsOn("CMAKE_TESTING_ENABLED")) { + result[kHAS_ENABLED_TESTS] = true; + std::vector CTestNames; + + Json::Value testInfo = Json::arrayValue; + std::vector testNames; + target->Makefile->GetTestNames(testNames); + for (auto& name : testNames) { + auto test = target->Makefile->GetTest(name); + if (test != nullptr) { + testInfo.append(DumpCTestInfo(name, test)); + } + } + result[kCTEST_INFO] = testInfo; + } + + return result; +} + +static Json::Value DumpCTestTargetsList( + const std::vector& generators, const std::string& config) +{ + Json::Value result = Json::arrayValue; + + std::vector targetList; + for (const auto& lgIt : generators) { + auto list = lgIt->GetGeneratorTargets(); + targetList.insert(targetList.end(), list.begin(), list.end()); + } + std::sort(targetList.begin(), targetList.end()); + + for (cmGeneratorTarget* target : targetList) { + Json::Value tmp = DumpCTestTarget(target, config); + if (!tmp.isNull()) { + result.append(tmp); + } + } + + return result; +} + +static Json::Value DumpCTestProjectList(const cmake* cm, + std::string const& config) +{ + Json::Value result = Json::arrayValue; + + auto globalGen = cm->GetGlobalGenerator(); + + for (const auto& projectIt : globalGen->GetProjectMap()) { + Json::Value pObj = Json::objectValue; + pObj[kNAME_KEY] = projectIt.first; + + // All Projects must have at least one local generator + assert(!projectIt.second.empty()); + + // Project structure information: + pObj[kTARGETS_KEY] = DumpCTestTargetsList(projectIt.second, config); + + result.append(pObj); + } + + return result; +} + +static Json::Value DumpCTestConfiguration(const cmake* cm, + const std::string& config) +{ + Json::Value result = Json::objectValue; + result[kNAME_KEY] = config; + + result[kPROJECTS_KEY] = DumpCTestProjectList(cm, config); + + return result; +} + +static Json::Value DumpCTestConfigurationsList(const cmake* cm) +{ + Json::Value result = Json::arrayValue; + + for (const std::string& c : getConfigurations(cm)) { + result.append(DumpCTestConfiguration(cm, c)); + } + + return result; +} + static Json::Value DumpTarget(cmGeneratorTarget* target, const std::string& config) { @@ -1222,6 +1374,19 @@ cmServerResponse cmServerProtocol1::ProcessFileSystemWatchers( return request.Reply(result); } +cmServerResponse cmServerProtocol1::ProcessCTests( + const cmServerRequest& request) +{ + if (this->m_State < STATE_COMPUTED) { + return request.ReportError("This instance was not yet computed."); + } + + Json::Value result = Json::objectValue; + result[kCONFIGURATIONS_KEY] = + DumpCTestConfigurationsList(this->CMakeInstance()); + return request.Reply(result); +} + cmServerProtocol1::GeneratorInformation::GeneratorInformation( const std::string& generatorName, const std::string& extraGeneratorName, const std::string& toolset, const std::string& platform, diff --git a/Source/cmServerProtocol.h b/Source/cmServerProtocol.h index 124ac7f..df71cff 100644 --- a/Source/cmServerProtocol.h +++ b/Source/cmServerProtocol.h @@ -123,6 +123,7 @@ private: cmServerResponse ProcessGlobalSettings(const cmServerRequest& request); cmServerResponse ProcessSetGlobalSettings(const cmServerRequest& request); cmServerResponse ProcessFileSystemWatchers(const cmServerRequest& request); + cmServerResponse ProcessCTests(const cmServerRequest& request); enum State { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=335816efad6904fb5c6059a791d7b0eea4882bc0 commit 335816efad6904fb5c6059a791d7b0eea4882bc0 Author: Ben Boeckel AuthorDate: Thu Nov 2 15:13:47 2017 -0400 Commit: Ben Boeckel CommitDate: Fri Nov 3 11:43:22 2017 -0400 FindBoost: use CMake's compiler version rather than querying again diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 88d14ab..bf52d29 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -391,13 +391,8 @@ endmacro() # version with a regex. # function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION) - - exec_program(${CMAKE_CXX_COMPILER} - ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion - OUTPUT_VARIABLE _boost_COMPILER_VERSION - ) string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" - _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) + _boost_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION}) set(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE) endfunction() ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 73 ++++++++++++++++++ Modules/FindBoost.cmake | 9 +-- Source/cmLocalGenerator.cxx | 11 ++- Source/cmMakefile.cxx | 7 ++ Source/cmMakefile.h | 5 ++ Source/cmServerDictionary.h | 5 ++ Source/cmServerProtocol.cxx | 165 ++++++++++++++++++++++++++++++++++++++++ Source/cmServerProtocol.h | 1 + 8 files changed, 265 insertions(+), 11 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Nov 7 08:35:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 7 Nov 2017 08:35:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-241-ga7347c0 Message-ID: <20171107133508.411F1102C50@public.kitware.com> 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 a7347c022eb67272eea7dca5a58d0b94806b7d95 (commit) via fcb39aaa19360ae9096f2f2567e3afb1630cc370 (commit) via 04937db103541da442a426818c9314a423235858 (commit) via 6e2193a26dd3e73af41a86f672d84144beb5a3c9 (commit) via e673e6f053f7320f78a2ce9ed262f9c11e503998 (commit) from b5d8610430b844231278db9ca3f807e2c433a608 (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=a7347c022eb67272eea7dca5a58d0b94806b7d95 commit a7347c022eb67272eea7dca5a58d0b94806b7d95 Merge: fcb39aa 04937db Author: Brad King AuthorDate: Tue Nov 7 13:24:29 2017 +0000 Commit: Kitware Robot CommitDate: Tue Nov 7 08:31:09 2017 -0500 Merge topic 'csharp-version-english' 04937db1 CSharp: Fix compiler version detection in non-English languages Acked-by: Kitware Robot Merge-request: !1449 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fcb39aaa19360ae9096f2f2567e3afb1630cc370 commit fcb39aaa19360ae9096f2f2567e3afb1630cc370 Merge: b5d8610 6e2193a Author: Brad King AuthorDate: Tue Nov 7 13:21:35 2017 +0000 Commit: Kitware Robot CommitDate: Tue Nov 7 08:25:41 2017 -0500 Merge topic 'update-CheckFortran' 6e2193a2 Tests: Avoid hanging on check for Fortran e673e6f0 Tests: Pass generator instance into check for Fortran Acked-by: Kitware Robot Merge-request: !1454 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=04937db103541da442a426818c9314a423235858 commit 04937db103541da442a426818c9314a423235858 Author: Yoshinori Tahara AuthorDate: Wed Nov 1 20:06:44 2017 +0900 Commit: Brad King CommitDate: Tue Nov 7 08:23:16 2017 -0500 CSharp: Fix compiler version detection in non-English languages When we run `csc.exe /help` we look for "Version" in the output. Explicitly ask for the output in English. Reported-by: guttally at users.noreply.github.com diff --git a/Modules/CMakeDetermineCSharpCompiler.cmake b/Modules/CMakeDetermineCSharpCompiler.cmake index 55b2fb3..eb825a5 100644 --- a/Modules/CMakeDetermineCSharpCompiler.cmake +++ b/Modules/CMakeDetermineCSharpCompiler.cmake @@ -23,7 +23,7 @@ if(NOT CMAKE_CSharp_COMPILER_ID_RUN) include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) CMAKE_DETERMINE_COMPILER_ID(CSharp CSFLAGS CMakeCSharpCompilerId.cs) - execute_process(COMMAND "${CMAKE_CSharp_COMPILER}" "/help" OUTPUT_VARIABLE output) + execute_process(COMMAND "${CMAKE_CSharp_COMPILER}" "/help /preferreduilang:en-US" OUTPUT_VARIABLE output) string(REPLACE "\n" ";" output "${output}") foreach(line ${output}) string(TOUPPER ${line} line) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e2193a26dd3e73af41a86f672d84144beb5a3c9 commit 6e2193a26dd3e73af41a86f672d84144beb5a3c9 Author: Brad King AuthorDate: Mon Nov 6 07:50:08 2017 -0500 Commit: Brad King CommitDate: Mon Nov 6 10:21:11 2017 -0500 Tests: Avoid hanging on check for Fortran Use a timeout when running the check for Fortran in case the tools hang. diff --git a/Tests/CheckFortran.cmake b/Tests/CheckFortran.cmake index 653f521..16a8ed2 100644 --- a/Tests/CheckFortran.cmake +++ b/Tests/CheckFortran.cmake @@ -26,6 +26,7 @@ file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\" -A "${CMAKE_GENERATOR_PLATFORM}" -T "${CMAKE_GENERATOR_TOOLSET}" ${_D_CMAKE_GENERATOR_INSTANCE} + TIMEOUT 60 OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e673e6f053f7320f78a2ce9ed262f9c11e503998 commit e673e6f053f7320f78a2ce9ed262f9c11e503998 Author: Brad King AuthorDate: Mon Nov 6 07:49:17 2017 -0500 Commit: Brad King CommitDate: Mon Nov 6 10:21:11 2017 -0500 Tests: Pass generator instance into check for Fortran Check for a Fortran compiler using the same VS instance that we are testing. diff --git a/Tests/CheckFortran.cmake b/Tests/CheckFortran.cmake index b1652ba..653f521 100644 --- a/Tests/CheckFortran.cmake +++ b/Tests/CheckFortran.cmake @@ -15,11 +15,17 @@ file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\" \"set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 \\\"\${CMAKE_Fortran_COMPILER_SUPPORTS_F90}\\\")\\n\" ) ") + if(CMAKE_GENERATOR_INSTANCE) + set(_D_CMAKE_GENERATOR_INSTANCE "-DCMAKE_GENERATOR_INSTANCE:INTERNAL=${CMAKE_GENERATOR_INSTANCE}") + else() + set(_D_CMAKE_GENERATOR_INSTANCE "") + endif() execute_process( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CheckFortran COMMAND ${CMAKE_COMMAND} . -G ${CMAKE_GENERATOR} -A "${CMAKE_GENERATOR_PLATFORM}" -T "${CMAKE_GENERATOR_TOOLSET}" + ${_D_CMAKE_GENERATOR_INSTANCE} OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result ----------------------------------------------------------------------- Summary of changes: Modules/CMakeDetermineCSharpCompiler.cmake | 2 +- Tests/CheckFortran.cmake | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 8 00:15:59 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 8 Nov 2017 00:15:59 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-242-g2ae7856 Message-ID: <20171108051601.A4B9DFE22A@public.kitware.com> 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 2ae78569b43228026c929f3c1e7627119a091910 (commit) from a7347c022eb67272eea7dca5a58d0b94806b7d95 (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=2ae78569b43228026c929f3c1e7627119a091910 commit 2ae78569b43228026c929f3c1e7627119a091910 Author: Kitware Robot AuthorDate: Wed Nov 8 00:03:44 2017 -0500 Commit: Kitware Robot CommitDate: Wed Nov 8 00:03:44 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c9ec2ee..1ecf55d 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20171107) +set(CMake_VERSION_PATCH 20171108) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 8 08:39:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 8 Nov 2017 08:39:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-244-gbd68d0c Message-ID: <20171108133907.936F6102AFD@public.kitware.com> 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 bd68d0c252f4ebf91d03837e8404b3cb8c4f7465 (commit) via 41aacca7fb61eccf673024180e6020250fb301b2 (commit) from 2ae78569b43228026c929f3c1e7627119a091910 (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=bd68d0c252f4ebf91d03837e8404b3cb8c4f7465 commit bd68d0c252f4ebf91d03837e8404b3cb8c4f7465 Merge: 2ae7856 41aacca Author: Brad King AuthorDate: Wed Nov 8 13:24:43 2017 +0000 Commit: Kitware Robot CommitDate: Wed Nov 8 08:25:16 2017 -0500 Merge topic 'implicit-lib-gcceh' 41aacca7 Restore exclusion of "gcc_eh" from implicit link libraries Acked-by: Kitware Robot Merge-request: !1460 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=41aacca7fb61eccf673024180e6020250fb301b2 commit 41aacca7fb61eccf673024180e6020250fb301b2 Author: Christian Pfeiffer AuthorDate: Tue Nov 7 16:02:47 2017 +0100 Commit: Brad King CommitDate: Wed Nov 8 08:10:52 2017 -0500 Restore exclusion of "gcc_eh" from implicit link libraries Since commit v3.9.0-rc1~148^2 (Do not assume GCC libs are linked by all compilers, 2017-05-05) we no longer filter out all `gcc*` implicit link libraries. This allows mixing of gcc and non-gcc compilers across languages. However, this caused a subtle problem with how GCC makes exception handling symbols available to linked binaries. GCC (at least on MinGW) provides two different libraries with exception handling symbols: * gcc_s: A shared library with -fvisibility=default, used by -shared-libgcc. * gcc_eh: A static library with -fvisibility=hidden, used by -static-libgcc. The C compiler (on MinGW) defaults to -static-libgcc and uses gcc_eh. The C++ compiler defaults to -shared-libgcc and uses gcc_s when linking shared libraries and executables so that exceptions can propagate across shared libraries [1]. When linking a mixed-language binary, the C++ compiler should be used along with its choice of gcc_s. In this case gcc_eh should not be added even though the C compiler implies it because gcc_s supersedes it. Since the above-mentioned change, CMake is adding gcc_eh to C++ link lines that also contain C code on MinGW. This causes both gcc_s and gcc_eh to be used, which is incorrect. We can fix this simply by excluding gcc_eh from the C compiler's implicit link libraries. [1] https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Link-Options.html#Link-Options Fixes: #17436 diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 3b77278..63d18ab 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -142,7 +142,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj # We remove items that are not language-specific. set(implicit_libs "") foreach(lib IN LISTS implicit_libs_tmp) - if("x${lib}" MATCHES "^x(crt.*\\.o|System.*|.*libclang_rt.*|msvcrt.*|libvcruntime.*|libucrt.*|libcmt.*)$") + if("x${lib}" MATCHES "^x(crt.*\\.o|gcc_eh.*|System.*|.*libclang_rt.*|msvcrt.*|libvcruntime.*|libucrt.*|libcmt.*)$") string(APPEND log " remove lib [${lib}]\n") elseif(IS_ABSOLUTE "${lib}") get_filename_component(abs "${lib}" ABSOLUTE) diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in index d7d881e..65487bb 100644 --- a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in +++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in @@ -525,6 +525,27 @@ set(msys_g77_dirs "C:/some-mingw/lib/gcc/mingw32/3.4.5;C:/some-mingw/lib/gcc;/so list(APPEND platforms msys_g77) #----------------------------------------------------------------------------- +# MSYS2 + +# gcc dummy.c -v +set(msys2_gcc_text " C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/collect2.exe -plugin C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/liblto_plugin-0.dll -plugin-opt=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/lto-wrapper.exe -plugin-opt=-fresolution=C:/msys64/tmp/ccikz9Wf.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -m i386pep -Bdynamic C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/crtbegin.o -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0 -LC:/msys64/mingw64/bin/../lib/gcc -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../lib -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../.. C:/msys64/tmp/ccK0dTUv.o -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/crtend.o") +set(msys2_gcc_libs "mingw32;gcc;moldname;mingwex;pthread;advapi32;shell32;user32;kernel32;mingw32;gcc;moldname;mingwex") +set(msys2_gcc_dirs "C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0;C:/msys64/mingw64/lib/gcc;C:/msys64/mingw64/x86_64-w64-mingw32/lib;C:/msys64/mingw64/lib") +list(APPEND platforms msys2_gcc) + +# g++ dummy.cxx -v +set(msys2_g++_text " C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/collect2.exe -plugin C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/liblto_plugin-0.dll -plugin-opt=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/lto-wrapper.exe -plugin-opt=-fresolution=C:/msys64/tmp/ccJQgvbN.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -m i386pep -Bdynamic C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/crtbegin.o -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0 -LC:/msys64/mingw64/bin/../lib/gcc -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../lib -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../.. C:/msys64/tmp/ccqPpuVS.o -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/crtend.o") +set(msys2_g++_libs "stdc++;mingw32;gcc_s;gcc;moldname;mingwex;pthread;advapi32;shell32;user32;kernel32;mingw32;gcc_s;gcc;moldname;mingwex") +set(msys2_g++_dirs "C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0;C:/msys64/mingw64/lib/gcc;C:/msys64/mingw64/x86_64-w64-mingw32/lib;C:/msys64/mingw64/lib") +list(APPEND platforms msys2_g++) + +# gfortran dummy.f90 -v +set(msys2_gfortran_text " C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/collect2.exe -plugin C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/liblto_plugin-0.dll -plugin-opt=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/lto-wrapper.exe -plugin-opt=-fresolution=C:/msys64/tmp/cczOKIDy.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -m i386pep -Bdynamic C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/crtbegin.o -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0 -LC:/msys64/mingw64/bin/../lib/gcc -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../lib -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib -LC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../.. C:/msys64/tmp/ccyXuCgD.o -lgfortran -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/crtend.o") +set(msys2_gfortran_libs "gfortran;mingw32;gcc_s;gcc;moldname;mingwex;quadmath;m;mingw32;gcc_s;gcc;moldname;mingwex;pthread;advapi32;shell32;user32;kernel32;mingw32;gcc_s;gcc;moldname;mingwex") +set(msys2_gfortran_dirs "C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0;C:/msys64/mingw64/lib/gcc;C:/msys64/mingw64/x86_64-w64-mingw32/lib;C:/msys64/mingw64/lib") +list(APPEND platforms msys2_gfortran) + +#----------------------------------------------------------------------------- # MSVC from NVIDIA CUDA set(nvcc_msvc_text [[cuda-fake-ld cl.exe -nologo "tmp/a_dlink.obj" "tmp/CMakeCUDACompilerId.obj" -link -INCREMENTAL:NO "/LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/../lib/x64" cudadevrt.lib cudart_static.lib -Fe"a.exe"]]) @@ -532,7 +553,6 @@ set(nvcc_msvc_libs "cudadevrt.lib;cudart_static.lib") set(nvcc_msvc_dirs "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64") list(APPEND platforms nvcc_msvc) - #----------------------------------------------------------------------------- # PGI on Windows ----------------------------------------------------------------------- Summary of changes: Modules/CMakeParseImplicitLinkInfo.cmake | 2 +- Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 8 08:55:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 8 Nov 2017 08:55:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-246-g7bd4c1c Message-ID: <20171108135504.EEA6E102484@public.kitware.com> 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 7bd4c1c1bbe94c85e4e361ffcafb3c0ec204d8a6 (commit) via f44fb2dd4ce5e47cd0a12d1a25bda40f012d453a (commit) from bd68d0c252f4ebf91d03837e8404b3cb8c4f7465 (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=7bd4c1c1bbe94c85e4e361ffcafb3c0ec204d8a6 commit 7bd4c1c1bbe94c85e4e361ffcafb3c0ec204d8a6 Merge: bd68d0c f44fb2d Author: Brad King AuthorDate: Wed Nov 8 13:51:21 2017 +0000 Commit: Kitware Robot CommitDate: Wed Nov 8 08:52:01 2017 -0500 Merge topic 'FindOpenGL-clarify-libraries' f44fb2dd FindOpenGL: Clarify logic constructing OPENGL_LIBRARIES Acked-by: Kitware Robot Merge-request: !1459 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f44fb2dd4ce5e47cd0a12d1a25bda40f012d453a commit f44fb2dd4ce5e47cd0a12d1a25bda40f012d453a Author: Brad King AuthorDate: Tue Nov 7 07:57:09 2017 -0500 Commit: Brad King CommitDate: Tue Nov 7 09:33:43 2017 -0500 FindOpenGL: Clarify logic constructing OPENGL_LIBRARIES Our comment says the logic matches that for OpenGL::GL. Structure the logic the same way to make this clearer. Issue: #17437 diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 59bee41..8cceabd 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -440,9 +440,10 @@ if(OPENGL_FOUND) endif() # OPENGL_LIBRARIES mirrors OpenGL::GL's logic ... - set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY}) if(TARGET OpenGL::GLX AND TARGET OpenGL::OpenGL) set(OPENGL_LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY}) + else() + set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY}) endif() # ... and also includes GLU, if available. if(TARGET OpenGL::GLU) ----------------------------------------------------------------------- Summary of changes: Modules/FindOpenGL.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 8 09:05:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 8 Nov 2017 09:05:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-255-g3b853ff Message-ID: <20171108140503.CDFE5102B03@public.kitware.com> 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 3b853ffd1605cab8a72a66a6312840644227e1e9 (commit) via 0e3518ac05a24d3a61dc354b41e43999126274dd (commit) via 77b73ff1345977b91915c900a006761fe7c099a6 (commit) via ddf485511bb1d5b9ff6a3c9b00e92707e3a99b1a (commit) via 482f71c491ada6a55348efe0abb6e418df5aa558 (commit) via 575250b6c4223f1b99ddc5e483b6216b07bd796e (commit) via 9a0d3e2ed66b740c3be9b98d4462929aadf40341 (commit) via 6f80b10c8371f7dd19db19bde393981e016a9319 (commit) via f6994f436c1b8922fbe87fbd6f74fd5f1e09ac73 (commit) from 7bd4c1c1bbe94c85e4e361ffcafb3c0ec204d8a6 (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=3b853ffd1605cab8a72a66a6312840644227e1e9 commit 3b853ffd1605cab8a72a66a6312840644227e1e9 Merge: 0e3518a ddf4855 Author: Brad King AuthorDate: Wed Nov 8 09:01:38 2017 -0500 Commit: Brad King CommitDate: Wed Nov 8 09:01:38 2017 -0500 Merge branch 'release-3.10' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e3518ac05a24d3a61dc354b41e43999126274dd commit 0e3518ac05a24d3a61dc354b41e43999126274dd Merge: 77b73ff 482f71c Author: Brad King AuthorDate: Wed Nov 8 09:01:33 2017 -0500 Commit: Brad King CommitDate: Wed Nov 8 09:01:33 2017 -0500 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=77b73ff1345977b91915c900a006761fe7c099a6 commit 77b73ff1345977b91915c900a006761fe7c099a6 Merge: 7bd4c1c f6994f4 Author: Brad King AuthorDate: Wed Nov 8 13:59:28 2017 +0000 Commit: Kitware Robot CommitDate: Wed Nov 8 08:59:52 2017 -0500 Merge topic 'irsl-win2018' f6994f43 IRSL: Add support for the 2018 release on Windows. Acked-by: Kitware Robot Merge-request: !1451 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=482f71c491ada6a55348efe0abb6e418df5aa558 commit 482f71c491ada6a55348efe0abb6e418df5aa558 Merge: ea09ee0 41aacca Author: Brad King AuthorDate: Wed Nov 8 08:11:41 2017 -0500 Commit: Brad King CommitDate: Wed Nov 8 08:11:41 2017 -0500 Merge branch 'implicit-lib-gcceh' into release-3.9 Merge-request: !1460 ----------------------------------------------------------------------- Summary of changes: Modules/InstallRequiredSystemLibraries.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 8 09:05:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 8 Nov 2017 09:05:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-rc4-8-gddf4855 Message-ID: <20171108140504.21FF8102B05@public.kitware.com> 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, release has been updated via ddf485511bb1d5b9ff6a3c9b00e92707e3a99b1a (commit) via 41aacca7fb61eccf673024180e6020250fb301b2 (commit) via 575250b6c4223f1b99ddc5e483b6216b07bd796e (commit) via f44fb2dd4ce5e47cd0a12d1a25bda40f012d453a (commit) via 9a0d3e2ed66b740c3be9b98d4462929aadf40341 (commit) via 04937db103541da442a426818c9314a423235858 (commit) via 6f80b10c8371f7dd19db19bde393981e016a9319 (commit) via f6994f436c1b8922fbe87fbd6f74fd5f1e09ac73 (commit) from 45da558742bad36be518e8d95dee0d0ec3793a64 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/CMakeDetermineCSharpCompiler.cmake | 2 +- Modules/CMakeParseImplicitLinkInfo.cmake | 2 +- Modules/FindOpenGL.cmake | 3 ++- Modules/InstallRequiredSystemLibraries.cmake | 8 +++++--- Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in | 22 +++++++++++++++++++++- 5 files changed, 30 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Nov 8 09:15:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 8 Nov 2017 09:15:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-264-g30fcf13 Message-ID: <20171108141505.E0D49FE4BB@public.kitware.com> 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 30fcf13be6680d6a4eb112f98cc2d99c6881f401 (commit) via 9f30cd13dad63b2a327162285711cd36dcc20b92 (commit) via f8f3338582c863642fef9a31a8d8345cdd78d263 (commit) via 6a3922bebea607dcc23944b1fe79b7b613a893d1 (commit) via 517cfe0b8c327ee4d68de777b812c4854e3d46a8 (commit) via dc059ae70b2ec79bce2b534876a2f4006293d3b6 (commit) via 854e482a59d6696bbb6988a045ac701e26bb038a (commit) via 3c3682289dfe62fa2448e1be7ab714e674b475d8 (commit) via 72d27964b92ddb4d8ee85e32a27d0e56d642ec1c (commit) from 3b853ffd1605cab8a72a66a6312840644227e1e9 (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=30fcf13be6680d6a4eb112f98cc2d99c6881f401 commit 30fcf13be6680d6a4eb112f98cc2d99c6881f401 Merge: 9f30cd1 6a3922b Author: Brad King AuthorDate: Wed Nov 8 14:08:08 2017 +0000 Commit: Kitware Robot CommitDate: Wed Nov 8 09:08:15 2017 -0500 Merge topic 'imported-promotion' 6a3922be Add new target-property `IMPORTED_GLOBAL`. 854e482a cmTarget: Simplified and fixed a string-comparision. Acked-by: Kitware Robot Merge-request: !1254 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f30cd13dad63b2a327162285711cd36dcc20b92 commit 9f30cd13dad63b2a327162285711cd36dcc20b92 Merge: f8f3338 517cfe0 Author: Brad King AuthorDate: Wed Nov 8 14:05:32 2017 +0000 Commit: Kitware Robot CommitDate: Wed Nov 8 09:05:59 2017 -0500 Merge topic 'update-kwsys' 517cfe0b Merge branch 'upstream-KWSys' into update-kwsys dc059ae7 KWSys 2017-11-07 (5249a82d) Acked-by: Kitware Robot Merge-request: !1458 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f8f3338582c863642fef9a31a8d8345cdd78d263 commit f8f3338582c863642fef9a31a8d8345cdd78d263 Merge: 3b853ff 3c36822 Author: Brad King AuthorDate: Wed Nov 8 14:05:01 2017 +0000 Commit: Kitware Robot CommitDate: Wed Nov 8 09:05:13 2017 -0500 Merge topic 'flang-windows' 3c368228 Flang: Add support for compiling sources on Windows 72d27964 Flang: Identify as simulating MSVC on Windows Acked-by: Kitware Robot Merge-request: !1430 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a3922bebea607dcc23944b1fe79b7b613a893d1 commit 6a3922bebea607dcc23944b1fe79b7b613a893d1 Author: Deniz Bahadir AuthorDate: Tue Sep 5 17:32:32 2017 +0200 Commit: Deniz Bahadir CommitDate: Tue Nov 7 15:08:41 2017 +0100 Add new target-property `IMPORTED_GLOBAL`. The purpose of this new `IMPORTED_GLOBAL` target-property is to prolong the lifetime and scope of `IMPORTED` targets in such a way as if they had been created with the keyword `GLOBAL` in the first place. * It can only be set to `TRUE`. That means, a local `IMPORTED` target can be promoted to global scope but a global `IMPORTED` target cannot be degraded to local scope! * Setting it to `TRUE` only succeeds if done from within the same directory in which the `IMPORTED` target was created in the first place. Fixes #17256. diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 13b22f8..2c63c4b 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -184,6 +184,7 @@ Properties on Targets /prop_tgt/HAS_CXX /prop_tgt/IMPLICIT_DEPENDS_INCLUDE_TRANSFORM /prop_tgt/IMPORTED_CONFIGURATIONS + /prop_tgt/IMPORTED_GLOBAL /prop_tgt/IMPORTED_IMPLIB_CONFIG /prop_tgt/IMPORTED_IMPLIB /prop_tgt/IMPORTED_LIBNAME_CONFIG diff --git a/Help/prop_tgt/IMPORTED_GLOBAL.rst b/Help/prop_tgt/IMPORTED_GLOBAL.rst new file mode 100644 index 0000000..1feca04 --- /dev/null +++ b/Help/prop_tgt/IMPORTED_GLOBAL.rst @@ -0,0 +1,22 @@ +IMPORTED_GLOBAL +--------------- + +Indication of whether an :ref:`IMPORTED target ` is +globally visible. + +The boolean value of this property is True for targets created with the +``IMPORTED`` ``GLOBAL`` options to :command:`add_executable()` or +:command:`add_library()`. It is always False for targets built within the +project. + +For targets created with the ``IMPORTED`` option to +:command:`add_executable()` or :command:`add_library()` but without the +additional option ``GLOBAL`` this is False, too. However, setting this +property for such a locally ``IMPORTED`` target to True promotes that +target to global scope. This promotion can only be done in the same +directory where that ``IMPORTED`` target was created in the first place. + +Once an imported target has been made global, it cannot be changed back to +non-global. Therefore, if a project sets this property, it may only +provide a value of True. CMake will issue an error if the project tries to +set the property to a non-True value, even if the value was already False. diff --git a/Help/release/dev/imported-promotion.rst b/Help/release/dev/imported-promotion.rst new file mode 100644 index 0000000..d184178 --- /dev/null +++ b/Help/release/dev/imported-promotion.rst @@ -0,0 +1,15 @@ +imported-promotion +------------------ + +* Added new target-property :prop_tgt:`IMPORTED_GLOBAL` which + indicates if an :ref:`IMPORTED target ` is + globally visible. + It will be set automatically if such an imported target is + created with the ``GLOBAL`` flag. + +* Additionally, it is now also possible to promote a local imported + target to become globally visible by setting its + :prop_tgt:`IMPORTED_GLOBAL` property to `TRUE`. (However, this + promotion can only succeed if it is done from within the same + directory where the imported target was created in the first + place.) Setting it to `FALSE` is not supported! diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 58a10b3..9cf835c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -884,6 +884,13 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; } + if (prop == "IMPORTED_GLOBAL" && !this->IsImported()) { + std::ostringstream e; + e << "IMPORTED_GLOBAL property can't be set on non-imported targets (\"" + << this->Name << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } if (prop == "INCLUDE_DIRECTORIES") { this->Internal->IncludeDirectoriesEntries.clear(); @@ -933,6 +940,19 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) this->Internal->SourceEntries.push_back(value); this->Internal->SourceBacktraces.push_back(lfbt); } + } else if (prop == "IMPORTED_GLOBAL") { + if (!cmSystemTools::IsOn(value)) { + std::ostringstream e; + e << "IMPORTED_GLOBAL property can't be set to FALSE on targets (\"" + << this->Name << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } + /* no need to change anything if value does not change */ + if (!this->ImportedGloballyVisible) { + this->ImportedGloballyVisible = true; + this->GetGlobalGenerator()->IndexTarget(this); + } } else if (cmHasLiteralPrefix(prop, "IMPORTED_LIBNAME") && !this->CheckImportedLibName(prop, value ? value : "")) { /* error was reported by check method */ @@ -977,6 +997,14 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; } + if (prop == "IMPORTED_GLOBAL") { + std::ostringstream e; + e << "IMPORTED_GLOBAL property can't be appended, only set on imported " + "targets (\"" + << this->Name << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } if (prop == "INCLUDE_DIRECTORIES") { if (value && *value) { this->Internal->IncludeDirectoriesEntries.push_back(value); @@ -1143,6 +1171,21 @@ static void cmTargetCheckINTERFACE_LINK_LIBRARIES(const char* value, context->IssueMessage(cmake::FATAL_ERROR, e.str()); } +static void cmTargetCheckIMPORTED_GLOBAL(const cmTarget* target, + cmMakefile* context) +{ + std::vector targets = context->GetOwnedImportedTargets(); + std::vector::const_iterator it = + std::find(targets.begin(), targets.end(), target); + if (it == targets.end()) { + std::ostringstream e; + e << "Attempt to promote imported target \"" << target->GetName() + << "\" to global scope (by setting IMPORTED_GLOBAL) " + "which is not built in this directory."; + context->IssueMessage(cmake::FATAL_ERROR, e.str()); + } +} + void cmTarget::CheckProperty(const std::string& prop, cmMakefile* context) const { @@ -1162,6 +1205,11 @@ void cmTarget::CheckProperty(const std::string& prop, cmTargetCheckINTERFACE_LINK_LIBRARIES(value, context); } } + if (prop == "IMPORTED_GLOBAL") { + if (this->IsImported()) { + cmTargetCheckIMPORTED_GLOBAL(this, context); + } + } } const char* cmTarget::GetComputedProperty( @@ -1182,6 +1230,7 @@ const char* cmTarget::GetProperty(const std::string& prop) const MAKE_STATIC_PROP(COMPILE_OPTIONS); MAKE_STATIC_PROP(COMPILE_DEFINITIONS); MAKE_STATIC_PROP(IMPORTED); + MAKE_STATIC_PROP(IMPORTED_GLOBAL); MAKE_STATIC_PROP(MANUALLY_ADDED_DEPENDENCIES); MAKE_STATIC_PROP(NAME); MAKE_STATIC_PROP(BINARY_DIR); @@ -1196,6 +1245,7 @@ const char* cmTarget::GetProperty(const std::string& prop) const specialProps.insert(propCOMPILE_OPTIONS); specialProps.insert(propCOMPILE_DEFINITIONS); specialProps.insert(propIMPORTED); + specialProps.insert(propIMPORTED_GLOBAL); specialProps.insert(propMANUALLY_ADDED_DEPENDENCIES); specialProps.insert(propNAME); specialProps.insert(propBINARY_DIR); @@ -1264,6 +1314,9 @@ const char* cmTarget::GetProperty(const std::string& prop) const if (prop == propIMPORTED) { return this->IsImported() ? "TRUE" : "FALSE"; } + if (prop == propIMPORTED_GLOBAL) { + return this->IsImportedGloballyVisible() ? "TRUE" : "FALSE"; + } if (prop == propNAME) { return this->GetName().c_str(); } diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx index 1d2520d..ed9026e 100644 --- a/Source/cmTargetPropertyComputer.cxx +++ b/Source/cmTargetPropertyComputer.cxx @@ -57,6 +57,7 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( builtIns.insert("COMPATIBLE_INTERFACE_STRING"); builtIns.insert("EXPORT_NAME"); builtIns.insert("IMPORTED"); + builtIns.insert("IMPORTED_GLOBAL"); builtIns.insert("NAME"); builtIns.insert("TYPE"); } diff --git a/Tests/RunCMake/get_property/target_properties-stderr.txt b/Tests/RunCMake/get_property/target_properties-stderr.txt index 6b3c6ca..df7a2f1 100644 --- a/Tests/RunCMake/get_property/target_properties-stderr.txt +++ b/Tests/RunCMake/get_property/target_properties-stderr.txt @@ -7,4 +7,10 @@ get_property: --><-- get_target_property: -->(.*)/Tests/RunCMake/get_property<-- get_property: -->(.*)/Tests/RunCMake/get_property<-- get_target_property: -->(.*)/Tests/RunCMake/get_property/target_properties-build<-- -get_property: -->(.*)/Tests/RunCMake/get_property/target_properties-build<--$ +get_property: -->(.*)/Tests/RunCMake/get_property/target_properties-build<-- +get_target_property: -->FALSE<-- +get_property: -->FALSE<-- +get_target_property: -->FALSE<-- +get_property: -->FALSE<-- +get_target_property: -->TRUE<-- +get_property: -->TRUE<--$ diff --git a/Tests/RunCMake/get_property/target_properties.cmake b/Tests/RunCMake/get_property/target_properties.cmake index 9ff833a..321d5b5 100644 --- a/Tests/RunCMake/get_property/target_properties.cmake +++ b/Tests/RunCMake/get_property/target_properties.cmake @@ -16,3 +16,10 @@ check_target_property(tgt custom) check_target_property(tgt noexist) check_target_property(tgt SOURCE_DIR) check_target_property(tgt BINARY_DIR) + +add_library(imported_local_tgt SHARED IMPORTED) +add_library(imported_global_tgt SHARED IMPORTED GLOBAL) + +check_target_property(tgt IMPORTED_GLOBAL) +check_target_property(imported_local_tgt IMPORTED_GLOBAL) +check_target_property(imported_global_tgt IMPORTED_GLOBAL) diff --git a/Tests/RunCMake/set_property/IMPORTED_GLOBAL-result.txt b/Tests/RunCMake/set_property/IMPORTED_GLOBAL-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/set_property/IMPORTED_GLOBAL-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt b/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt new file mode 100644 index 0000000..f21b1de --- /dev/null +++ b/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt @@ -0,0 +1,61 @@ +^CMake Error at IMPORTED_GLOBAL.cmake:9 \(set_property\): + IMPORTED_GLOBAL property can't be set to FALSE on targets + \(\"ImportedGlobalTarget\"\) + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error at IMPORTED_GLOBAL.cmake:16 \(set_property\): + IMPORTED_GLOBAL property can't be appended, only set on imported targets + \(\"ImportedGlobalTarget\"\) + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error at IMPORTED_GLOBAL.cmake:26 \(set_property\): + IMPORTED_GLOBAL property can't be set to FALSE on targets + \(\"ImportedLocalTarget\"\) + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error at IMPORTED_GLOBAL.cmake:32 \(set_property\): + IMPORTED_GLOBAL property can't be set on non-imported targets + \(\"NonImportedTarget\"\) + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error at IMPORTED_GLOBAL/CMakeLists.txt:8 \(set_property\): + Attempt to promote imported target \"ImportedLocalTarget2\" to global scope + \(by setting IMPORTED_GLOBAL\) which is not built in this directory. + + +CMake Error in IMPORTED_GLOBAL/CMakeLists.txt: + IMPORTED_GLOBAL property can't be set to FALSE on targets + \(\"ImportedSubdirTarget1\"\) + + + +CMake Error at IMPORTED_GLOBAL.cmake:50 \(set_property\): + Attempt to promote imported target \"ImportedSubdirTarget1\" to global scope + \(by setting IMPORTED_GLOBAL\) which is not built in this directory. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error in IMPORTED_GLOBAL/CMakeLists.txt: + IMPORTED_GLOBAL property can't be set to FALSE on targets + \(\"ImportedSubdirTarget2\"\) + + + +CMake Error at IMPORTED_GLOBAL.cmake:52 \(set_property\): + Attempt to promote imported target \"ImportedSubdirTarget2\" to global scope + \(by setting IMPORTED_GLOBAL\) which is not built in this directory. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stdout.txt b/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stdout.txt new file mode 100644 index 0000000..c5f1d11 --- /dev/null +++ b/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stdout.txt @@ -0,0 +1,17 @@ +-- ImportedGlobalTarget: Target IMPORTED_GLOBAL is 'TRUE' +-- ImportedGlobalTarget: Target IMPORTED_GLOBAL is 'TRUE' +-- ImportedGlobalTarget: Target IMPORTED_GLOBAL is 'TRUE' +-- ImportedGlobalTarget: Target IMPORTED_GLOBAL is 'TRUE' +-- ImportedGlobalTarget: Target IMPORTED_GLOBAL is 'TRUE' +-- ImportedLocalTarget: Target IMPORTED_GLOBAL is 'FALSE' +-- ImportedLocalTarget: Target IMPORTED_GLOBAL is 'TRUE' +-- ImportedLocalTarget: Target IMPORTED_GLOBAL is 'TRUE' +-- ImportedLocalTarget: Target IMPORTED_GLOBAL is 'TRUE' +-- NonImportedTarget: Target IMPORTED_GLOBAL is 'FALSE' +-- NonImportedTarget: Target IMPORTED_GLOBAL is 'FALSE' +-- ImportedLocalTarget2: Target IMPORTED_GLOBAL is 'FALSE' +-- ImportedLocalTarget2: Target IMPORTED_GLOBAL is 'TRUE' +-- ImportedSubdirTarget1: Target IMPORTED_GLOBAL is 'TRUE' +-- ImportedSubdirTarget2: Target IMPORTED_GLOBAL is 'TRUE' +-- ImportedSubdirTarget1: Target IMPORTED_GLOBAL is 'TRUE' +-- ImportedSubdirTarget2: Target IMPORTED_GLOBAL is 'TRUE' diff --git a/Tests/RunCMake/set_property/IMPORTED_GLOBAL.cmake b/Tests/RunCMake/set_property/IMPORTED_GLOBAL.cmake new file mode 100644 index 0000000..08308eb --- /dev/null +++ b/Tests/RunCMake/set_property/IMPORTED_GLOBAL.cmake @@ -0,0 +1,53 @@ +macro(print_property TARGET PROP) + get_property(val TARGET ${TARGET} PROPERTY ${PROP}) + message(STATUS "${TARGET}: Target ${PROP} is '${val}'") +endmacro() + +# Changing property on IMPORTED target created with `GLOBAL` option. +add_library(ImportedGlobalTarget SHARED IMPORTED GLOBAL) +print_property(ImportedGlobalTarget IMPORTED_GLOBAL) +set_property(TARGET ImportedGlobalTarget PROPERTY IMPORTED_GLOBAL FALSE) +print_property(ImportedGlobalTarget IMPORTED_GLOBAL) +set_property(TARGET ImportedGlobalTarget PROPERTY IMPORTED_GLOBAL TRUE) +print_property(ImportedGlobalTarget IMPORTED_GLOBAL) +set_property(TARGET ImportedGlobalTarget PROPERTY IMPORTED_GLOBAL TRUE) +print_property(ImportedGlobalTarget IMPORTED_GLOBAL) +# Appending property is never allowed! +set_property(TARGET ImportedGlobalTarget APPEND PROPERTY IMPORTED_GLOBAL TRUE) +print_property(ImportedGlobalTarget IMPORTED_GLOBAL) + +# Changing property on IMPORTED target created without `GLOBAL` option. +add_library(ImportedLocalTarget SHARED IMPORTED) +print_property(ImportedLocalTarget IMPORTED_GLOBAL) +set_property(TARGET ImportedLocalTarget PROPERTY IMPORTED_GLOBAL TRUE) +print_property(ImportedLocalTarget IMPORTED_GLOBAL) +set_property(TARGET ImportedLocalTarget PROPERTY IMPORTED_GLOBAL TRUE) +print_property(ImportedLocalTarget IMPORTED_GLOBAL) +set_property(TARGET ImportedLocalTarget PROPERTY IMPORTED_GLOBAL FALSE) +print_property(ImportedLocalTarget IMPORTED_GLOBAL) + +# Setting property on non-IMPORTED target is never allowed! +add_library(NonImportedTarget SHARED test.cpp) +print_property(NonImportedTarget IMPORTED_GLOBAL) +set_property(TARGET NonImportedTarget PROPERTY IMPORTED_GLOBAL TRUE) +print_property(NonImportedTarget IMPORTED_GLOBAL) + +# Local IMPORTED targets can only be promoted from same directory! +add_library(ImportedLocalTarget2 SHARED IMPORTED) +print_property(ImportedLocalTarget2 IMPORTED_GLOBAL) +add_subdirectory(IMPORTED_GLOBAL) +# Note: The value should not have changed. However, it does change because the +# check for the same directory comes after it was changed! (At least, that is +# not really bad because the generation will fail due to this error.) +print_property(ImportedLocalTarget2 IMPORTED_GLOBAL) + +# Global IMPORTED targets from subdir are always visible +# no matter how they became global. +print_property(ImportedSubdirTarget1 IMPORTED_GLOBAL) +print_property(ImportedSubdirTarget2 IMPORTED_GLOBAL) + +# Changing property on IMPORTED target from subdir is never possible. +set_property(TARGET ImportedSubdirTarget1 PROPERTY IMPORTED_GLOBAL FALSE) +print_property(ImportedSubdirTarget1 IMPORTED_GLOBAL) +set_property(TARGET ImportedSubdirTarget2 PROPERTY IMPORTED_GLOBAL FALSE) +print_property(ImportedSubdirTarget2 IMPORTED_GLOBAL) diff --git a/Tests/RunCMake/set_property/IMPORTED_GLOBAL/CMakeLists.txt b/Tests/RunCMake/set_property/IMPORTED_GLOBAL/CMakeLists.txt new file mode 100644 index 0000000..468bf78 --- /dev/null +++ b/Tests/RunCMake/set_property/IMPORTED_GLOBAL/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(ImportedSubdirTarget1 SHARED IMPORTED GLOBAL) +add_library(ImportedSubdirTarget2 SHARED IMPORTED) + +# Extend visibility of ImportedSubdirTarget2 to global scope. +set_property(TARGET ImportedSubdirTarget2 PROPERTY IMPORTED_GLOBAL TRUE) + +# Only targets from the same directory can be promoted. +set_property(TARGET ImportedLocalTarget2 PROPERTY IMPORTED_GLOBAL TRUE) diff --git a/Tests/RunCMake/set_property/RunCMakeTest.cmake b/Tests/RunCMake/set_property/RunCMakeTest.cmake index 1ddacee..5b5327d 100644 --- a/Tests/RunCMake/set_property/RunCMakeTest.cmake +++ b/Tests/RunCMake/set_property/RunCMakeTest.cmake @@ -3,6 +3,7 @@ include(RunCMake) run_cmake(COMPILE_DEFINITIONS) run_cmake(COMPILE_FEATURES) run_cmake(COMPILE_OPTIONS) +run_cmake(IMPORTED_GLOBAL) run_cmake(INCLUDE_DIRECTORIES) run_cmake(LINK_LIBRARIES) run_cmake(SOURCES) diff --git a/Tests/RunCMake/set_property/test.cpp b/Tests/RunCMake/set_property/test.cpp new file mode 100644 index 0000000..e69de29 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=517cfe0b8c327ee4d68de777b812c4854e3d46a8 commit 517cfe0b8c327ee4d68de777b812c4854e3d46a8 Merge: c37c477 dc059ae Author: Brad King AuthorDate: Tue Nov 7 08:16:14 2017 -0500 Commit: Brad King CommitDate: Tue Nov 7 08:16:14 2017 -0500 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-11-07 (5249a82d) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc059ae70b2ec79bce2b534876a2f4006293d3b6 commit dc059ae70b2ec79bce2b534876a2f4006293d3b6 Author: KWSys Upstream AuthorDate: Tue Nov 7 08:15:44 2017 -0500 Commit: Brad King CommitDate: Tue Nov 7 08:16:13 2017 -0500 KWSys 2017-11-07 (5249a82d) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 5249a82d5e617a29659e5881d0df65acb3220eab (master). Upstream Shortlog ----------------- Brad King (1): bfdbfe9b Avoid requiring CMake 3.4 string(APPEND) luzpaz (1): 9a1d5901 Fix trivial typos in text diff --git a/CMakeLists.txt b/CMakeLists.txt index e4406e7..51f4088 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1150,17 +1150,17 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) SET(testProcess_COMPILE_FLAGS "") # Some Apple compilers produce bad optimizations in this source. IF(APPLE AND CMAKE_C_COMPILER_ID MATCHES "^(GNU|LLVM)$") - STRING(APPEND testProcess_COMPILE_FLAGS " -O0") + SET(testProcess_COMPILE_FLAGS "${testProcess_COMPILE_FLAGS} -O0") ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "XL" AND NOT (CMAKE_SYSTEM MATCHES "Linux.*ppc64le" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "13.1.1")) # Tell IBM XL not to warn about our test infinite loop # v13.1.1 and newer on Linux ppc64le is clang based and does not accept # the -qsuppress option - STRING(APPEND testProcess_COMPILE_FLAGS " -qsuppress=1500-010") + SET(testProcess_COMPILE_FLAGS "${testProcess_COMPILE_FLAGS} -qsuppress=1500-010") ENDIF() IF(CMAKE_C_FLAGS MATCHES "-fsanitize=") - STRING(APPEND testProcess_COMPILE_FLAGS " -DCRASH_USING_ABORT") + SET(testProcess_COMPILE_FLAGS "${testProcess_COMPILE_FLAGS} -DCRASH_USING_ABORT") ENDIF() SET_PROPERTY(SOURCE testProcess.c PROPERTY COMPILE_FLAGS "${testProcess_COMPILE_FLAGS}") diff --git a/DynamicLoader.hxx.in b/DynamicLoader.hxx.in index 7e71a45..dc34692 100644 --- a/DynamicLoader.hxx.in +++ b/DynamicLoader.hxx.in @@ -35,7 +35,7 @@ namespace @KWSYS_NAMESPACE@ { * or absolute) pathname. Otherwise, the dynamic linker searches for the * library as follows : see ld.so(8) for further details): * Whereas this distinction does not exist on Win32. Therefore ideally you - * should be doing full path to garantee to have a consistent way of dealing + * should be doing full path to guarantee to have a consistent way of dealing * with dynamic loading of shared library. * * \warning the Cygwin implementation do not use the Win32 HMODULE. Put extra @@ -72,7 +72,7 @@ public: static LibraryHandle OpenLibrary(const std::string&); /** Attempt to detach a dynamic library from the - * process. A value of true is returned if it is sucessful. */ + * process. A value of true is returned if it is successful. */ static int CloseLibrary(LibraryHandle); /** Find the address of the symbol in the given library. */ diff --git a/Process.h.in b/Process.h.in index 6cb9443..daf334a 100644 --- a/Process.h.in +++ b/Process.h.in @@ -421,7 +421,7 @@ enum kwsysProcess_Pipes_e /** * Block until the child process terminates or the given timeout - * expires. If no process is running, returns immediatly. The + * expires. If no process is running, returns immediately. The * argument is: * * timeout = Specifies the maximum time this call may block. Upon diff --git a/RegularExpression.hxx.in b/RegularExpression.hxx.in index 606e3da..763fdab 100644 --- a/RegularExpression.hxx.in +++ b/RegularExpression.hxx.in @@ -109,12 +109,12 @@ namespace @KWSYS_NAMESPACE@ { * object as an argument and creates an object initialized with the * information from the given RegularExpression object. * - * The find member function finds the first occurence of the regualr + * The find member function finds the first occurrence of the regular * expression of that object in the string given to find as an argument. Find * returns a boolean, and if true, mutates the private data appropriately. * Find sets pointers to the beginning and end of the thing last found, they * are pointers into the actual string that was searched. The start and end - * member functions return indicies into the searched string that correspond + * member functions return indices into the searched string that correspond * to the beginning and end pointers respectively. The compile member * function takes a char* and puts the compiled version of the char* argument * into the object's private data fields. The == and != operators only check diff --git a/SystemInformation.cxx b/SystemInformation.cxx index 366fe30..ab1f40a 100644 --- a/SystemInformation.cxx +++ b/SystemInformation.cxx @@ -3633,7 +3633,7 @@ SystemInformationImplementation::GetHostMemoryAvailable( // apply resource limits across groups of processes. // this is of use on certain SMP systems (eg. SGI UV) // where the host has a large amount of ram but a given user's - // access to it is severly restricted. The system will + // access to it is severely restricted. The system will // apply a limit across a set of processes. Units are in KiB. if (hostLimitEnvVarName) { const char* hostLimitEnvVarValue = getenv(hostLimitEnvVarName); diff --git a/SystemInformation.hxx.in b/SystemInformation.hxx.in index 516c505..5678e8a 100644 --- a/SystemInformation.hxx.in +++ b/SystemInformation.hxx.in @@ -124,7 +124,7 @@ public: // are the processes comprising an mpi program which is running in // parallel. The amount of memory reported may differ from the host // total if a host wide resource limit is applied. Such reource limits - // are reported to us via an applicaiton specified environment variable. + // are reported to us via an application specified environment variable. LongLong GetHostMemoryAvailable(const char* hostLimitEnvVarName = NULL); // Get total system RAM in units of KiB available to this process. diff --git a/SystemTools.cxx b/SystemTools.cxx index 72babc3..1f7ee10 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -1691,7 +1691,7 @@ bool SystemTools::StringEndsWith(const std::string& str1, const char* str2) : false; } -// Returns a pointer to the last occurence of str2 in str1 +// Returns a pointer to the last occurrence of str2 in str1 const char* SystemTools::FindLastString(const char* str1, const char* str2) { if (!str1 || !str2) { diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in index 3d109a8..8a02b75 100644 --- a/SystemTools.hxx.in +++ b/SystemTools.hxx.in @@ -107,7 +107,7 @@ public: } /** - * Replace replace all occurences of the string in the source string. + * Replace replace all occurrences of the string in the source string. */ static void ReplaceString(std::string& source, const char* replace, const char* with); @@ -175,7 +175,7 @@ public: static bool StringEndsWith(const std::string& str1, const char* str2); /** - * Returns a pointer to the last occurence of str2 in str1 + * Returns a pointer to the last occurrence of str2 in str1 */ static const char* FindLastString(const char* str1, const char* str2); @@ -905,7 +905,7 @@ public: /** * Delay the execution for a specified amount of time specified - * in miliseconds + * in milliseconds */ static void Delay(unsigned int msec); diff --git a/kwsysPlatformTestsCXX.cxx b/kwsysPlatformTestsCXX.cxx index e67d436..f1f9ed3 100644 --- a/kwsysPlatformTestsCXX.cxx +++ b/kwsysPlatformTestsCXX.cxx @@ -281,7 +281,7 @@ int main() #ifdef TEST_KWSYS_CXX_HAS_BACKTRACE #if defined(__PATHSCALE__) || defined(__PATHCC__) || \ (defined(__LSB_VERSION__) && (__LSB_VERSION__ < 41)) -backtrace doesnt work with this compiler or os +backtrace does not work with this compiler or os #endif #if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE) #define _GNU_SOURCE https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=854e482a59d6696bbb6988a045ac701e26bb038a commit 854e482a59d6696bbb6988a045ac701e26bb038a Author: Deniz Bahadir AuthorDate: Fri Nov 3 17:22:12 2017 +0100 Commit: Deniz Bahadir CommitDate: Fri Nov 3 17:22:12 2017 +0100 cmTarget: Simplified and fixed a string-comparision. Before this change, `cmTarget::CheckProperty` accepted several strings as valid properties, including all strings prefixed with "INTERFACE_LINK_LIBRARIES". Now, that particular string is still accepted but other strings prefixed with that string are no longer accepted. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c6cd502..58a10b3 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1157,7 +1157,7 @@ void cmTarget::CheckProperty(const std::string& prop, cmTargetCheckLINK_INTERFACE_LIBRARIES(prop, value, context, true); } } - if (cmHasLiteralPrefix(prop, "INTERFACE_LINK_LIBRARIES")) { + if (prop == "INTERFACE_LINK_LIBRARIES") { if (const char* value = this->GetProperty(prop)) { cmTargetCheckINTERFACE_LINK_LIBRARIES(value, context); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c3682289dfe62fa2448e1be7ab714e674b475d8 commit 3c3682289dfe62fa2448e1be7ab714e674b475d8 Author: Isuru Fernando AuthorDate: Mon Oct 30 19:51:45 2017 -0500 Commit: Brad King CommitDate: Tue Oct 31 08:48:15 2017 -0400 Flang: Add support for compiling sources on Windows Define `CMAKE_Fortran_COMPILE_OBJECT` for Flang on Windows. diff --git a/Modules/Platform/Windows-Flang-Fortran.cmake b/Modules/Platform/Windows-Flang-Fortran.cmake index 9f20e73..a4b1cf1 100644 --- a/Modules/Platform/Windows-Flang-Fortran.cmake +++ b/Modules/Platform/Windows-Flang-Fortran.cmake @@ -1,2 +1,3 @@ include(Platform/Windows-MSVC) __windows_compiler_msvc(Fortran) +set(CMAKE_Fortran_COMPILE_OBJECT " ${_COMPILE_Fortran} -o -c ") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72d27964b92ddb4d8ee85e32a27d0e56d642ec1c commit 72d27964b92ddb4d8ee85e32a27d0e56d642ec1c Author: Isuru Fernando AuthorDate: Mon Oct 30 19:51:23 2017 -0500 Commit: Brad King CommitDate: Tue Oct 31 08:47:06 2017 -0400 Flang: Identify as simulating MSVC on Windows In `CMakeFortranCompilerId.F.in`, take the `_MSC_VER` out of the Intel-specific block so it will trigger for other compilers like Flang. In `Compiler/Clang.cmake`, switch off Fortran too. diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index 49789f1..da3d953 100644 --- a/Modules/CMakeFortranCompilerId.F.in +++ b/Modules/CMakeFortranCompilerId.F.in @@ -2,6 +2,26 @@ #if 0 ! Identify the compiler #endif +#if defined(_MSC_VER) + PRINT *, 'INFO:simulate[MSVC]' +# if _MSC_VER >= 1900 + PRINT *, 'INFO:simulate_version[019.00]' +# elif _MSC_VER >= 1800 + PRINT *, 'INFO:simulate_version[018.00]' +# elif _MSC_VER >= 1700 + PRINT *, 'INFO:simulate_version[017.00]' +# elif _MSC_VER >= 1600 + PRINT *, 'INFO:simulate_version[016.00]' +# elif _MSC_VER >= 1500 + PRINT *, 'INFO:simulate_version[015.00]' +# elif _MSC_VER >= 1400 + PRINT *, 'INFO:simulate_version[014.00]' +# elif _MSC_VER >= 1310 + PRINT *, 'INFO:simulate_version[013.01]' +# else + PRINT *, 'INFO:simulate_version[013.00]' +# endif +#endif #if defined(__INTEL_COMPILER) || defined(__ICC) PRINT *, 'INFO:compiler[Intel]' # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) @@ -14,27 +34,6 @@ # if defined(__INTEL_COMPILER_BUILD_DATE) # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) # endif - -# if defined(_MSC_VER) - PRINT *, 'INFO:simulate[MSVC]' -# if _MSC_VER >= 1900 - PRINT *, 'INFO:simulate_version[019.00]' -# elif _MSC_VER >= 1800 - PRINT *, 'INFO:simulate_version[018.00]' -# elif _MSC_VER >= 1700 - PRINT *, 'INFO:simulate_version[017.00]' -# elif _MSC_VER >= 1600 - PRINT *, 'INFO:simulate_version[016.00]' -# elif _MSC_VER >= 1500 - PRINT *, 'INFO:simulate_version[015.00]' -# elif _MSC_VER >= 1400 - PRINT *, 'INFO:simulate_version[014.00]' -# elif _MSC_VER >= 1310 - PRINT *, 'INFO:simulate_version[013.01]' -# else - PRINT *, 'INFO:simulate_version[013.00]' -# endif -# endif #elif defined(__SUNPRO_F95) PRINT *, 'INFO:compiler[SunPro]' # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F95>>8) diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index 9f5e921..7ce1adb 100644 --- a/Modules/Compiler/Clang.cmake +++ b/Modules/Compiler/Clang.cmake @@ -11,7 +11,8 @@ set(__COMPILER_CLANG 1) include(Compiler/CMakeCommonCompilerMacros) if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC" - OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC" + OR "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC") macro(__compiler_clang lang) endmacro() else() ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/prop_tgt/IMPORTED_GLOBAL.rst | 22 +++++++ Help/release/dev/imported-promotion.rst | 15 +++++ Modules/CMakeFortranCompilerId.F.in | 41 +++++++------ Modules/Compiler/Clang.cmake | 3 +- Modules/Platform/Windows-Flang-Fortran.cmake | 1 + Source/cmTarget.cxx | 55 +++++++++++++++++- Source/cmTargetPropertyComputer.cxx | 1 + Source/kwsys/CMakeLists.txt | 6 +- Source/kwsys/DynamicLoader.hxx.in | 4 +- Source/kwsys/Process.h.in | 2 +- Source/kwsys/RegularExpression.hxx.in | 4 +- Source/kwsys/SystemInformation.cxx | 2 +- Source/kwsys/SystemInformation.hxx.in | 2 +- Source/kwsys/SystemTools.cxx | 2 +- Source/kwsys/SystemTools.hxx.in | 6 +- Source/kwsys/kwsysPlatformTestsCXX.cxx | 2 +- .../get_property/target_properties-stderr.txt | 8 ++- .../RunCMake/get_property/target_properties.cmake | 7 +++ .../IMPORTED_GLOBAL-result.txt} | 0 .../set_property/IMPORTED_GLOBAL-stderr.txt | 61 ++++++++++++++++++++ .../set_property/IMPORTED_GLOBAL-stdout.txt | 17 ++++++ Tests/RunCMake/set_property/IMPORTED_GLOBAL.cmake | 53 +++++++++++++++++ .../set_property/IMPORTED_GLOBAL/CMakeLists.txt | 8 +++ Tests/RunCMake/set_property/RunCMakeTest.cmake | 1 + .../RunCMake/set_property/test.cpp | 0 26 files changed, 285 insertions(+), 39 deletions(-) create mode 100644 Help/prop_tgt/IMPORTED_GLOBAL.rst create mode 100644 Help/release/dev/imported-promotion.rst copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => set_property/IMPORTED_GLOBAL-result.txt} (100%) create mode 100644 Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt create mode 100644 Tests/RunCMake/set_property/IMPORTED_GLOBAL-stdout.txt create mode 100644 Tests/RunCMake/set_property/IMPORTED_GLOBAL.cmake create mode 100644 Tests/RunCMake/set_property/IMPORTED_GLOBAL/CMakeLists.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/set_property/test.cpp (100%) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Nov 9 00:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 9 Nov 2017 00:05:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-265-g1e9304b Message-ID: <20171109050507.E0CC1102BD4@public.kitware.com> 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 1e9304bccb933956f8c8349f2dd89927dd0ec08b (commit) from 30fcf13be6680d6a4eb112f98cc2d99c6881f401 (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=1e9304bccb933956f8c8349f2dd89927dd0ec08b commit 1e9304bccb933956f8c8349f2dd89927dd0ec08b Author: Kitware Robot AuthorDate: Thu Nov 9 00:01:25 2017 -0500 Commit: Kitware Robot CommitDate: Thu Nov 9 00:01:25 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1ecf55d..4c66678 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20171108) +set(CMake_VERSION_PATCH 20171109) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Nov 9 08:15:13 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 9 Nov 2017 08:15:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-267-g43edaee Message-ID: <20171109131514.3B540FE0C1@public.kitware.com> 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 43edaee0ce663e4f1c2cfdfa4742450640a2f6e1 (commit) via 05e9f6ec52a2cb87b529ee41059d809446a8e50d (commit) from 1e9304bccb933956f8c8349f2dd89927dd0ec08b (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=43edaee0ce663e4f1c2cfdfa4742450640a2f6e1 commit 43edaee0ce663e4f1c2cfdfa4742450640a2f6e1 Merge: 1e9304b 05e9f6e Author: Brad King AuthorDate: Thu Nov 9 13:12:59 2017 +0000 Commit: Kitware Robot CommitDate: Thu Nov 9 08:13:07 2017 -0500 Merge topic 'contract-plplot' 05e9f6ec Tests: Add contract test for PLplot Acked-by: Kitware Robot Merge-request: !1452 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05e9f6ec52a2cb87b529ee41059d809446a8e50d commit 05e9f6ec52a2cb87b529ee41059d809446a8e50d Author: Brad King AuthorDate: Mon Nov 6 10:21:54 2017 -0500 Commit: Brad King CommitDate: Wed Nov 8 06:47:26 2017 -0500 Tests: Add contract test for PLplot diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 1c69805..b9558f1 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3396,6 +3396,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release # sets "CMake_TEST_CONTRACT__" variables to configure # the code below. foreach(project + PLplot Trilinos VTK ) diff --git a/Tests/Contracts/PLplot/CMakeLists.txt b/Tests/Contracts/PLplot/CMakeLists.txt new file mode 100644 index 0000000..b87b4c3 --- /dev/null +++ b/Tests/Contracts/PLplot/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.9) +project(PLplotDriver NONE) +include(ExternalProject) +include(${CMAKE_CURRENT_SOURCE_DIR}/../Home.cmake) +set(PLplot_PREFIX "${HOME}/.cmake/Contracts/PLplot") +file(REMOVE_RECURSE "${PLplot_PREFIX}") +separate_arguments(PLplot_CMAKE_ARGS UNIX_COMMAND "${PLplot_CMAKE_FLAGS}") +if(NOT PLplot_GIT_TAG) + set(PLplot_GIT_TAG "plplot-5.13.0") +endif() +ExternalProject_Add(PLplot + GIT_REPOSITORY "https://git.code.sf.net/p/plplot/plplot.git" + GIT_TAG "${PLplot_GIT_TAG}" + PREFIX "${PLplot_PREFIX}" + CMAKE_ARGS + -DCMAKE_INSTALL_PREFIX= + ${PLplot_CMAKE_ARGS} + ) diff --git a/Tests/Contracts/PLplot/Configure.cmake b/Tests/Contracts/PLplot/Configure.cmake new file mode 100644 index 0000000..83591d4 --- /dev/null +++ b/Tests/Contracts/PLplot/Configure.cmake @@ -0,0 +1,4 @@ +set(Contracts.PLplot_BUILD_OPTIONS + -DPLplot_CMAKE_FLAGS=${CMake_TEST_CONTRACT_PLplot_CMAKE_FLAGS} + -DPLplot_GIT_TAG=${CMake_TEST_CONTRACT_PLplot_GIT_TAG} + ) ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 1 + Tests/Contracts/PLplot/CMakeLists.txt | 18 ++++++++++++++++++ Tests/Contracts/PLplot/Configure.cmake | 4 ++++ 3 files changed, 23 insertions(+) create mode 100644 Tests/Contracts/PLplot/CMakeLists.txt create mode 100644 Tests/Contracts/PLplot/Configure.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Thu Nov 9 08:25:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 9 Nov 2017 08:25:02 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-269-g0682e77 Message-ID: <20171109132503.24F3D102B3B@public.kitware.com> 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 0682e77f3b65850d37d8d91533c62b30a348454b (commit) via 27b62fa4c564c1346bae6b957ba5cd6d9d32969c (commit) from 43edaee0ce663e4f1c2cfdfa4742450640a2f6e1 (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=0682e77f3b65850d37d8d91533c62b30a348454b commit 0682e77f3b65850d37d8d91533c62b30a348454b Merge: 43edaee 27b62fa Author: Brad King AuthorDate: Thu Nov 9 13:14:58 2017 +0000 Commit: Kitware Robot CommitDate: Thu Nov 9 08:15:09 2017 -0500 Merge topic 'fortran-flags-docstring' 27b62fa4 Fortran: Use same DOC for flags as other languages Acked-by: Kitware Robot Merge-request: !1463 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27b62fa4c564c1346bae6b957ba5cd6d9d32969c commit 27b62fa4c564c1346bae6b957ba5cd6d9d32969c Author: Christian Pfeiffer AuthorDate: Wed Nov 8 14:50:58 2017 +0100 Commit: Christian Pfeiffer CommitDate: Wed Nov 8 14:50:58 2017 +0100 Fortran: Use same DOC for flags as other languages Currently, only Fortran uses the string "Flags for Fortran compiler", whereas C, CXX, CUDA all use the same, more descriptive string. diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 8005da6..b315d33 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -169,7 +169,7 @@ foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO) endforeach() set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING - "Flags for Fortran compiler.") + "Flags used by the compiler during all build types.") include(CMakeCommonLanguageInclude) ----------------------------------------------------------------------- Summary of changes: Modules/CMakeFortranInformation.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Nov 9 08:35:12 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 9 Nov 2017 08:35:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-278-g4eefad2 Message-ID: <20171109133513.0C85D102C73@public.kitware.com> 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 4eefad236aad84c1f4ca38fcd3533a0ec7401a3b (commit) via a16930167dcec066eb70925b82ecfd27e48d2660 (commit) via 05d8892e6113272c9b9ab73ceb9c8319e6690a25 (commit) via 7e896029cd6bc0a19b7e0ed6fa7b876e0f1764b3 (commit) via a4c829167dc8fa24e151d2afde7896b4588b24ad (commit) via 670ad047b34d983daf1f17f8b32c4abe2b7f22b1 (commit) via deeba85f81bb031384c1c014d7adcb733da491b4 (commit) via 24ca336981696c6f77a4eb965ccc79ad4c98a2c0 (commit) via a6abb6c8b63434d1794a8fd6ae1d5f5fa2dc85f3 (commit) from 0682e77f3b65850d37d8d91533c62b30a348454b (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=4eefad236aad84c1f4ca38fcd3533a0ec7401a3b commit 4eefad236aad84c1f4ca38fcd3533a0ec7401a3b Merge: a169301 24ca336 Author: Brad King AuthorDate: Thu Nov 9 08:31:39 2017 -0500 Commit: Brad King CommitDate: Thu Nov 9 08:31:39 2017 -0500 Merge branch 'release-3.10' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a16930167dcec066eb70925b82ecfd27e48d2660 commit a16930167dcec066eb70925b82ecfd27e48d2660 Merge: 05d8892 a6abb6c Author: Brad King AuthorDate: Thu Nov 9 13:30:15 2017 +0000 Commit: Kitware Robot CommitDate: Thu Nov 9 08:30:19 2017 -0500 Merge topic 'FindHDF5-c-version' a6abb6c8 FindHDF5: Fix H5_VERSION on Patch in C Acked-by: Kitware Robot Merge-request: !1465 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05d8892e6113272c9b9ab73ceb9c8319e6690a25 commit 05d8892e6113272c9b9ab73ceb9c8319e6690a25 Merge: 0682e77 7e89602 Author: Brad King AuthorDate: Thu Nov 9 13:28:23 2017 +0000 Commit: Kitware Robot CommitDate: Thu Nov 9 08:28:28 2017 -0500 Merge topic 'cmake-default-dir-install-permissions' 7e896029 CPack: enable setting default dir creation permissions a4c82916 CPack test: expand output checking fallback 670ad047 Move file/dir permissions code to common file. deeba85f CMake: enable setting default dir creation permissions Acked-by: Kitware Robot Merge-request: !1433 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e896029cd6bc0a19b7e0ed6fa7b876e0f1764b3 commit 7e896029cd6bc0a19b7e0ed6fa7b876e0f1764b3 Author: Domen Vrankar AuthorDate: Wed Nov 8 20:25:29 2017 +0100 Commit: Domen Vrankar CommitDate: Wed Nov 8 20:27:11 2017 +0100 CPack: enable setting default dir creation permissions Introduces CPACK_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable which adds support for functionality introduced by CMAKE_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable. Fixes #17333 # Conflicts: # Help/release/dev/cmake-default-dir-install-permissions.rst diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 7f13046..1927c37 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -530,6 +530,7 @@ Variables for CPack /variable/CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY /variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION /variable/CPACK_INCLUDE_TOPLEVEL_DIRECTORY + /variable/CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS /variable/CPACK_INSTALL_SCRIPT /variable/CPACK_PACKAGING_INSTALL_PREFIX /variable/CPACK_SET_DESTDIR diff --git a/Help/release/dev/cmake-default-dir-install-permissions.rst b/Help/release/dev/cmake-default-dir-install-permissions.rst index 06f89e3..8325fda 100644 --- a/Help/release/dev/cmake-default-dir-install-permissions.rst +++ b/Help/release/dev/cmake-default-dir-install-permissions.rst @@ -5,3 +5,8 @@ cmake-default-dir-install-permissions to enable setting of default permissions for directories created implicitly during installation of files by :command:`install` and :command:`file(INSTALL)`. + +* The :variable:`CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS` variable was added + which serves the same purpose during packaging as the + :variable:`CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS` variable serves during + installation (e.g. ``make install``). diff --git a/Help/variable/CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS.rst b/Help/variable/CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS.rst new file mode 100644 index 0000000..83d5ce7 --- /dev/null +++ b/Help/variable/CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS.rst @@ -0,0 +1,11 @@ +CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS +------------------------------------------- + +Default permissions for implicitly created directories during packaging. + +This variable serves the same purpose during packaging as the +:variable:`CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS` variable +serves during installation (e.g. ``make install``). + +If `include(CPack)` is used then by default this variable is set to the content +of :variable:`CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS`. diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 3915943..ea7dc02 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -384,6 +384,12 @@ _cpack_set_default(CPACK_RESOURCE_FILE_WELCOME _cpack_set_default(CPACK_MODULE_PATH "${CMAKE_MODULE_PATH}") +# Set default directory creation permissions mode +if(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS) + _cpack_set_default(CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS + "${CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS}") +endif() + if(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL) set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) endif() diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index ecb5adb..be75a9f 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -12,6 +12,7 @@ #include "cmCPackComponentGroup.h" #include "cmCPackLog.h" #include "cmCryptoHash.h" +#include "cmFSPermissions.h" #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" @@ -201,6 +202,29 @@ int cmCPackGenerator::InstallProject() cmSystemTools::PutEnv("DESTDIR="); } + // prepare default created directory permissions + mode_t default_dir_mode_v = 0; + mode_t* default_dir_mode = nullptr; + const char* default_dir_install_permissions = + this->GetOption("CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS"); + if (default_dir_install_permissions && *default_dir_install_permissions) { + std::vector items; + cmSystemTools::ExpandListArgument(default_dir_install_permissions, items); + for (const auto& arg : items) { + if (!cmFSPermissions::stringToModeT(arg, default_dir_mode_v)) { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Invalid permission value '" + << arg + << "'." + " CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS " + "value is invalid." + << std::endl); + return 0; + } + } + + default_dir_mode = &default_dir_mode_v; + } + // If the CPackConfig file sets CPACK_INSTALL_COMMANDS then run them // as listed if (!this->InstallProjectViaInstallCommands(setDestDir, @@ -218,15 +242,15 @@ int cmCPackGenerator::InstallProject() // If the CPackConfig file sets CPACK_INSTALLED_DIRECTORIES // then glob it and copy it to CPACK_TEMPORARY_DIRECTORY // This is used in Source packaging - if (!this->InstallProjectViaInstalledDirectories(setDestDir, - tempInstallDirectory)) { + if (!this->InstallProjectViaInstalledDirectories( + setDestDir, tempInstallDirectory, default_dir_mode)) { return 0; } // If the project is a CMAKE project then run pre-install // and then read the cmake_install script to run it - if (!this->InstallProjectViaInstallCMakeProjects(setDestDir, - bareTempInstallDirectory)) { + if (!this->InstallProjectViaInstallCMakeProjects( + setDestDir, bareTempInstallDirectory, default_dir_mode)) { return 0; } @@ -274,7 +298,8 @@ int cmCPackGenerator::InstallProjectViaInstallCommands( } int cmCPackGenerator::InstallProjectViaInstalledDirectories( - bool setDestDir, const std::string& tempInstallDirectory) + bool setDestDir, const std::string& tempInstallDirectory, + const mode_t* default_dir_mode) { (void)setDestDir; (void)tempInstallDirectory; @@ -385,7 +410,8 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( // make sure directory exists for symlink std::string destDir = cmSystemTools::GetFilenamePath(symlinked.second); - if (!destDir.empty() && !cmSystemTools::MakeDirectory(destDir)) { + if (!destDir.empty() && + !cmSystemTools::MakeDirectory(destDir, default_dir_mode)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot create dir: " << destDir << "\nTrying to create symlink: " << symlinked.second << "--> " << symlinked.first @@ -464,7 +490,8 @@ int cmCPackGenerator::InstallProjectViaInstallScript( } int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( - bool setDestDir, const std::string& baseTempInstallDirectory) + bool setDestDir, const std::string& baseTempInstallDirectory, + const mode_t* default_dir_mode) { const char* cmakeProjects = this->GetOption("CPACK_INSTALL_CMAKE_PROJECTS"); const char* cmakeGenerator = this->GetOption("CPACK_CMAKE_GENERATOR"); @@ -631,6 +658,13 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( } } + const char* default_dir_inst_permissions = + this->GetOption("CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS"); + if (default_dir_inst_permissions && *default_dir_inst_permissions) { + mf.AddDefinition("CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS", + default_dir_inst_permissions); + } + if (!setDestDir) { tempInstallDirectory += this->GetPackagingInstallPrefix(); } @@ -690,7 +724,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( cmCPackLogger(cmCPackLog::LOG_DEBUG, "- Creating directory: '" << dir << "'" << std::endl); - if (!cmsys::SystemTools::MakeDirectory(dir.c_str())) { + if (!cmsys::SystemTools::MakeDirectory(dir, default_dir_mode)) { cmCPackLogger( cmCPackLog::LOG_ERROR, "Problem creating temporary directory: " << dir << std::endl); @@ -700,8 +734,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( mf.AddDefinition("CMAKE_INSTALL_PREFIX", tempInstallDirectory.c_str()); - if (!cmsys::SystemTools::MakeDirectory( - tempInstallDirectory.c_str())) { + if (!cmsys::SystemTools::MakeDirectory(tempInstallDirectory, + default_dir_mode)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem creating temporary directory: " << tempInstallDirectory << std::endl); diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index 4e3a6e0..8100b66 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -12,6 +12,7 @@ #include "cmCPackComponentGroup.h" #include "cmSystemTools.h" +#include "cm_sys_stat.h" class cmCPackLog; class cmInstalledFile; @@ -168,9 +169,11 @@ protected: virtual int InstallProjectViaInstallScript( bool setDestDir, const std::string& tempInstallDirectory); virtual int InstallProjectViaInstalledDirectories( - bool setDestDir, const std::string& tempInstallDirectory); + bool setDestDir, const std::string& tempInstallDirectory, + const mode_t* default_dir_mode); virtual int InstallProjectViaInstallCMakeProjects( - bool setDestDir, const std::string& tempInstallDirectory); + bool setDestDir, const std::string& tempInstallDirectory, + const mode_t* default_dir_mode); /** * The various level of support of diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index b00e373..4b7f146 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -7,6 +7,7 @@ include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake") run_cpack_test(CUSTOM_BINARY_SPEC_FILE "RPM" false "MONOLITHIC;COMPONENT") run_cpack_test(CUSTOM_NAMES "RPM;DEB;TGZ" true "COMPONENT") run_cpack_test(DEBUGINFO "RPM" true "COMPONENT") +run_cpack_test_subtests(DEFAULT_PERMISSIONS "CMAKE_var_set;CPACK_var_set;both_set;invalid_CMAKE_var;invalid_CPACK_var" "RPM;DEB" false "MONOLITHIC;COMPONENT") run_cpack_test(DEPENDENCIES "RPM;DEB" true "COMPONENT") run_cpack_test(DIST "RPM" false "MONOLITHIC") run_cpack_test(EMPTY_DIR "RPM;DEB;TGZ" true "MONOLITHIC;COMPONENT") diff --git a/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/ExpectedFiles.cmake new file mode 100644 index 0000000..9b8205b --- /dev/null +++ b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/ExpectedFiles.cmake @@ -0,0 +1,6 @@ +if(${RunCMake_SUBTEST_SUFFIX} MATCHES "invalid_.*_var") + set(EXPECTED_FILES_COUNT "0") +else() + set(EXPECTED_FILES_COUNT "1") + set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +endif() diff --git a/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/VerifyResult.cmake new file mode 100644 index 0000000..16ebcdc --- /dev/null +++ b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/VerifyResult.cmake @@ -0,0 +1,39 @@ +if(NOT ${RunCMake_SUBTEST_SUFFIX} MATCHES "invalid_.*_var") + if(GENERATOR_TYPE STREQUAL "RPM") + function(checkContentPermissions_ FILE REGEX) + execute_process(COMMAND ${RPM_EXECUTABLE} -qp --dump ${FILE} + WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}" + OUTPUT_VARIABLE PERMISSIONS_ + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + if(NOT PERMISSIONS_ MATCHES "${REGEX}") + message(FATAL_ERROR "Permissions in '${FILE}'. Permissions: '${PERMISSIONS_}'") + endif() + endfunction() + + if(${RunCMake_SUBTEST_SUFFIX} MATCHES "CMAKE_var_set") + checkContentPermissions_("${FOUND_FILE_1}" + "/usr/foo .*740 root root.*") + else() + checkContentPermissions_("${FOUND_FILE_1}" + "/usr/foo .*700 root root.*") + endif() + else() # DEB + function(checkContentPermissions_ FILE REGEX) + getPackageContent("${FILE}" PERMISSIONS_) + + if(NOT PERMISSIONS_ MATCHES "${REGEX}") + message(FATAL_ERROR "Permissions in '${FILE}'. Permissions: '${PERMISSIONS_}'") + endif() + endfunction() + + if(${RunCMake_SUBTEST_SUFFIX} MATCHES "CMAKE_var_set") + checkContentPermissions_("${FOUND_FILE_1}" + "drwxr----- root/root .* ./usr/\ndrwxr----- root/root .* ./usr/foo/\n.*") + else() + checkContentPermissions_("${FOUND_FILE_1}" + "drwx------ root/root .* ./usr/\ndrwx------ root/root .* ./usr/foo/\n.*") + endif() + endif() +endif() diff --git a/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/invalid_CMAKE_var-stderr.txt b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/invalid_CMAKE_var-stderr.txt new file mode 100644 index 0000000..541763a --- /dev/null +++ b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/invalid_CMAKE_var-stderr.txt @@ -0,0 +1 @@ +.*CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS value is invalid.* diff --git a/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/invalid_CPACK_var-stderr.txt b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/invalid_CPACK_var-stderr.txt new file mode 100644 index 0000000..541763a --- /dev/null +++ b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/invalid_CPACK_var-stderr.txt @@ -0,0 +1 @@ +.*CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS value is invalid.* diff --git a/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/test.cmake b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/test.cmake new file mode 100644 index 0000000..afe9390 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/test.cmake @@ -0,0 +1,34 @@ +if(${RunCMake_SUBTEST_SUFFIX} MATCHES "CMAKE_var_set" OR + ${RunCMake_SUBTEST_SUFFIX} MATCHES "both_set") + + set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS + OWNER_READ + OWNER_WRITE + OWNER_EXECUTE + GROUP_READ + ) +endif() + +if(${RunCMake_SUBTEST_SUFFIX} MATCHES "invalid_CMAKE_var") + list(APPEND CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS "INVALID") +endif() + +if(${RunCMake_SUBTEST_SUFFIX} MATCHES "CPACK_var_set" OR + ${RunCMake_SUBTEST_SUFFIX} MATCHES "both_set") + + set(CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS + OWNER_READ + OWNER_WRITE + OWNER_EXECUTE + ) +endif() + +if(${RunCMake_SUBTEST_SUFFIX} MATCHES "invalid_CPACK_var") + list(APPEND CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS "INVALID") +endif() + +install(FILES CMakeLists.txt DESTINATION foo COMPONENT test) + +if(PACKAGING_TYPE STREQUAL "COMPONENT") + set(CPACK_COMPONENTS_ALL test) +endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a4c829167dc8fa24e151d2afde7896b4588b24ad commit a4c829167dc8fa24e151d2afde7896b4588b24ad Author: Domen Vrankar AuthorDate: Tue Oct 31 12:19:10 2017 +0100 Commit: Domen Vrankar CommitDate: Wed Nov 8 20:27:11 2017 +0100 CPack test: expand output checking fallback Some tests can have the same output for a certain subtest no matter which packaging generator is used. diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake b/Tests/RunCMake/CPack/CPackTestHelpers.cmake index f883c69..5337b2c 100644 --- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake +++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake @@ -68,6 +68,8 @@ function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX source PACK set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt") elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt) set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt") + elseif(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${SUBTEST_SUFFIX}-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/${SUBTEST_SUFFIX}-std${o}.txt") elseif(EXISTS ${RunCMake_SOURCE_DIR}/${TEST_TYPE}/default_expected_std${o}.txt) set(RunCMake-std${o}-file "${TEST_TYPE}/default_expected_std${o}.txt") endif() diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt index 5a95927..5877f97 100644 --- a/Tests/RunCMake/CPack/README.txt +++ b/Tests/RunCMake/CPack/README.txt @@ -167,6 +167,7 @@ NOTE: For subtests generator name can also be suffixed with subtest name and/or - generator name + packaging type - generator name + subtest name - generator name + - subtest name - default generator File name format: '---std.txt' where can either be 'out' or 'err'. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=670ad047b34d983daf1f17f8b32c4abe2b7f22b1 commit 670ad047b34d983daf1f17f8b32c4abe2b7f22b1 Author: Domen Vrankar AuthorDate: Thu Nov 2 21:42:18 2017 +0100 Commit: Domen Vrankar CommitDate: Wed Nov 8 20:27:11 2017 +0100 Move file/dir permissions code to common file. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index a8d77b2..54e5063 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -216,6 +216,8 @@ set(SRCS cmFileTimeComparison.cxx cmFileTimeComparison.h cmFortranParserImpl.cxx + cmFSPermissions.cxx + cmFSPermissions.h cmGeneratedFileStream.cxx cmGeneratorExpressionContext.cxx cmGeneratorExpressionContext.h diff --git a/Source/cmFSPermissions.cxx b/Source/cmFSPermissions.cxx new file mode 100644 index 0000000..4015a51 --- /dev/null +++ b/Source/cmFSPermissions.cxx @@ -0,0 +1,34 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmFSPermissions.h" + +bool cmFSPermissions::stringToModeT(std::string const& arg, + mode_t& permissions) +{ + if (arg == "OWNER_READ") { + permissions |= mode_owner_read; + } else if (arg == "OWNER_WRITE") { + permissions |= mode_owner_write; + } else if (arg == "OWNER_EXECUTE") { + permissions |= mode_owner_execute; + } else if (arg == "GROUP_READ") { + permissions |= mode_group_read; + } else if (arg == "GROUP_WRITE") { + permissions |= mode_group_write; + } else if (arg == "GROUP_EXECUTE") { + permissions |= mode_group_execute; + } else if (arg == "WORLD_READ") { + permissions |= mode_world_read; + } else if (arg == "WORLD_WRITE") { + permissions |= mode_world_write; + } else if (arg == "WORLD_EXECUTE") { + permissions |= mode_world_execute; + } else if (arg == "SETUID") { + permissions |= mode_setuid; + } else if (arg == "SETGID") { + permissions |= mode_setgid; + } else { + return false; + } + return true; +} diff --git a/Source/cmFSPermissions.h b/Source/cmFSPermissions.h new file mode 100644 index 0000000..7a6e708 --- /dev/null +++ b/Source/cmFSPermissions.h @@ -0,0 +1,45 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cmFSPermissions_h +#define cmFSPermissions_h + +#include "cmConfigure.h" // IWYU pragma: keep + +#include "cm_sys_stat.h" + +#include + +namespace cmFSPermissions { + +// Table of permissions flags. +#if defined(_WIN32) && !defined(__CYGWIN__) +static const mode_t mode_owner_read = S_IREAD; +static const mode_t mode_owner_write = S_IWRITE; +static const mode_t mode_owner_execute = S_IEXEC; +static const mode_t mode_group_read = 040; +static const mode_t mode_group_write = 020; +static const mode_t mode_group_execute = 010; +static const mode_t mode_world_read = 04; +static const mode_t mode_world_write = 02; +static const mode_t mode_world_execute = 01; +static const mode_t mode_setuid = 04000; +static const mode_t mode_setgid = 02000; +#else +static const mode_t mode_owner_read = S_IRUSR; +static const mode_t mode_owner_write = S_IWUSR; +static const mode_t mode_owner_execute = S_IXUSR; +static const mode_t mode_group_read = S_IRGRP; +static const mode_t mode_group_write = S_IWGRP; +static const mode_t mode_group_execute = S_IXGRP; +static const mode_t mode_world_read = S_IROTH; +static const mode_t mode_world_write = S_IWOTH; +static const mode_t mode_world_execute = S_IXOTH; +static const mode_t mode_setuid = S_ISUID; +static const mode_t mode_setgid = S_ISGID; +#endif + +bool stringToModeT(std::string const& arg, mode_t& permissions); + +} // ns + +#endif diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index a9824d7..88185bd 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -20,6 +20,7 @@ #include "cmAlgorithms.h" #include "cmCommandArgumentsHelper.h" #include "cmCryptoHash.h" +#include "cmFSPermissions.h" #include "cmFileLockPool.h" #include "cmFileTimeComparison.h" #include "cmGeneratorExpression.h" @@ -50,32 +51,7 @@ class cmSystemToolsFileTime; -// Table of permissions flags. -#if defined(_WIN32) && !defined(__CYGWIN__) -static mode_t mode_owner_read = S_IREAD; -static mode_t mode_owner_write = S_IWRITE; -static mode_t mode_owner_execute = S_IEXEC; -static mode_t mode_group_read = 040; -static mode_t mode_group_write = 020; -static mode_t mode_group_execute = 010; -static mode_t mode_world_read = 04; -static mode_t mode_world_write = 02; -static mode_t mode_world_execute = 01; -static mode_t mode_setuid = 04000; -static mode_t mode_setgid = 02000; -#else -static mode_t mode_owner_read = S_IRUSR; -static mode_t mode_owner_write = S_IWUSR; -static mode_t mode_owner_execute = S_IXUSR; -static mode_t mode_group_read = S_IRGRP; -static mode_t mode_group_write = S_IWGRP; -static mode_t mode_group_execute = S_IXGRP; -static mode_t mode_world_read = S_IROTH; -static mode_t mode_world_write = S_IWOTH; -static mode_t mode_world_execute = S_IXOTH; -static mode_t mode_setuid = S_ISUID; -static mode_t mode_setgid = S_ISGID; -#endif +using namespace cmFSPermissions; #if defined(_WIN32) // libcurl doesn't support file:// urls for unicode filenames on Windows. @@ -1099,29 +1075,7 @@ protected: // Translate an argument to a permissions bit. bool CheckPermissions(std::string const& arg, mode_t& permissions) { - if (arg == "OWNER_READ") { - permissions |= mode_owner_read; - } else if (arg == "OWNER_WRITE") { - permissions |= mode_owner_write; - } else if (arg == "OWNER_EXECUTE") { - permissions |= mode_owner_execute; - } else if (arg == "GROUP_READ") { - permissions |= mode_group_read; - } else if (arg == "GROUP_WRITE") { - permissions |= mode_group_write; - } else if (arg == "GROUP_EXECUTE") { - permissions |= mode_group_execute; - } else if (arg == "WORLD_READ") { - permissions |= mode_world_read; - } else if (arg == "WORLD_WRITE") { - permissions |= mode_world_write; - } else if (arg == "WORLD_EXECUTE") { - permissions |= mode_world_execute; - } else if (arg == "SETUID") { - permissions |= mode_setuid; - } else if (arg == "SETGID") { - permissions |= mode_setgid; - } else { + if (!cmFSPermissions::stringToModeT(arg, permissions)) { std::ostringstream e; e << this->Name << " given invalid permission \"" << arg << "\"."; this->FileCommand->SetError(e.str()); diff --git a/bootstrap b/bootstrap index 47f7e76..d9e243d 100755 --- a/bootstrap +++ b/bootstrap @@ -311,6 +311,7 @@ CMAKE_CXX_SOURCES="\ cmFindProgramCommand \ cmForEachCommand \ cmFunctionCommand \ + cmFSPermissions \ cmGeneratedFileStream \ cmGeneratorExpression \ cmGeneratorExpressionContext \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=deeba85f81bb031384c1c014d7adcb733da491b4 commit deeba85f81bb031384c1c014d7adcb733da491b4 Author: Domen Vrankar AuthorDate: Mon Oct 30 23:26:20 2017 +0100 Commit: Domen Vrankar CommitDate: Wed Nov 8 20:27:03 2017 +0100 CMake: enable setting default dir creation permissions Introduces CMAKE_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable which enables the user to specify the default permissions for directory creation. This setting is then used to auto set the permissions on directories which are implicitly created by install() and file(INSTALL) commands such as CMAKE_INSTALL_PREFIX directories. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 0170da1..7f13046 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -159,6 +159,7 @@ Variables that Change Behavior /variable/CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE /variable/CMAKE_INCLUDE_PATH /variable/CMAKE_INSTALL_DEFAULT_COMPONENT_NAME + /variable/CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS /variable/CMAKE_INSTALL_MESSAGE /variable/CMAKE_INSTALL_PREFIX /variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT diff --git a/Help/release/dev/cmake-default-dir-install-permissions.rst b/Help/release/dev/cmake-default-dir-install-permissions.rst new file mode 100644 index 0000000..06f89e3 --- /dev/null +++ b/Help/release/dev/cmake-default-dir-install-permissions.rst @@ -0,0 +1,7 @@ +cmake-default-dir-install-permissions +------------------------------------- + +* The :variable:`CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS` variable was added + to enable setting of default permissions for directories created implicitly + during installation of files by :command:`install` and + :command:`file(INSTALL)`. diff --git a/Help/variable/CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS.rst b/Help/variable/CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS.rst new file mode 100644 index 0000000..f994fbe --- /dev/null +++ b/Help/variable/CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS.rst @@ -0,0 +1,29 @@ +CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS +------------------------------------------- + +Default permissions for directories created implicitly during installation +of files by :command:`install` and :command:`file(INSTALL)`. + +If ``make install`` is invoked and directories are implicitly created they +get permissions set by :variable:`CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS` +variable or platform specific default permissions if the variable is not set. + +Implicitly created directories are created if they are not explicitly installed +by :command:`install` command but are needed to install a file on a certain +path. Example of such locations are directories created due to the setting of +:variable:`CMAKE_INSTALL_PREFIX`. + +Expected content of the :variable:`CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS` +variable is a list of permissions that can be used by :command:`install` command +`PERMISSIONS` section. + +Example usage: + +:: + + set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS + OWNER_READ + OWNER_WRITE + OWNER_EXECUTE + GROUP_READ + ) diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 191a666..a9824d7 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2015,9 +2015,30 @@ bool cmFileInstaller::HandleInstallDestination() this->DestDirLength = int(sdestdir.size()); } + // 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 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; + } + if (this->InstallType != cmInstallType_DIRECTORY) { if (!cmSystemTools::FileExists(destination.c_str())) { - if (!cmSystemTools::MakeDirectory(destination.c_str())) { + if (!cmSystemTools::MakeDirectory(destination, default_dir_mode)) { std::string errstring = "cannot create directory: " + destination + ". Maybe need administrative privileges."; this->FileCommand->SetError(errstring); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 55952ef..c8d94c0 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -487,6 +487,20 @@ void cmLocalGenerator::GenerateInstallRules() /* clang-format on */ } + // Write default directory permissions. + if (const char* defaultDirPermissions = this->Makefile->GetDefinition( + "CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS")) { + /* clang-format off */ + fout << + "# Set default install directory permissions.\n" + "if(NOT DEFINED CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS)\n" + " set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS \"" + << defaultDirPermissions << "\")\n" + "endif()\n" + "\n"; + /* clang-format on */ + } + // Ask each install generator to write its code. std::vector const& installers = this->Makefile->GetInstallGenerators(); ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 2 + .../dev/cmake-default-dir-install-permissions.rst | 12 ++++ ...CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS.rst | 29 ++++++++ ...CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS.rst | 11 +++ Modules/CPack.cmake | 6 ++ Modules/FindHDF5.cmake | 2 +- Source/CMakeLists.txt | 2 + Source/CPack/cmCPackGenerator.cxx | 54 +++++++++++--- Source/CPack/cmCPackGenerator.h | 7 +- Source/cmFSPermissions.cxx | 34 +++++++++ Source/cmFSPermissions.h | 45 ++++++++++++ Source/cmFileCommand.cxx | 75 +++++++------------- Source/cmLocalGenerator.cxx | 14 ++++ Tests/RunCMake/CPack/CPackTestHelpers.cmake | 2 + Tests/RunCMake/CPack/README.txt | 1 + Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 + .../ExpectedFiles.cmake | 6 +- .../tests/DEFAULT_PERMISSIONS/VerifyResult.cmake | 39 ++++++++++ .../invalid_CMAKE_var-stderr.txt} | 2 +- .../invalid_CPACK_var-stderr.txt} | 2 +- .../CPack/tests/DEFAULT_PERMISSIONS/test.cmake | 34 +++++++++ bootstrap | 1 + 22 files changed, 313 insertions(+), 68 deletions(-) create mode 100644 Help/release/dev/cmake-default-dir-install-permissions.rst create mode 100644 Help/variable/CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS.rst create mode 100644 Help/variable/CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS.rst create mode 100644 Source/cmFSPermissions.cxx create mode 100644 Source/cmFSPermissions.h copy Tests/RunCMake/CPack/tests/{PACKAGE_CHECKSUM => DEFAULT_PERMISSIONS}/ExpectedFiles.cmake (54%) create mode 100644 Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/VerifyResult.cmake copy Tests/RunCMake/{try_compile/BadSources1.cmake => CPack/tests/DEFAULT_PERMISSIONS/invalid_CMAKE_var-stderr.txt} (71%) copy Tests/RunCMake/{try_compile/BadSources1.cmake => CPack/tests/DEFAULT_PERMISSIONS/invalid_CPACK_var-stderr.txt} (71%) create mode 100644 Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/test.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Thu Nov 9 08:35:13 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 9 Nov 2017 08:35:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-rc4-10-g24ca336 Message-ID: <20171109133513.B5080102C69@public.kitware.com> 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, release has been updated via 24ca336981696c6f77a4eb965ccc79ad4c98a2c0 (commit) via a6abb6c8b63434d1794a8fd6ae1d5f5fa2dc85f3 (commit) from ddf485511bb1d5b9ff6a3c9b00e92707e3a99b1a (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/FindHDF5.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Nov 9 13:25:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 9 Nov 2017 13:25:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-282-gd9bc6fd Message-ID: <20171109182505.9D285102BC2@public.kitware.com> 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 d9bc6fd45191731d707af248fae4958732c2bc94 (commit) via c167a9b18c2fab97d43f401c5da652e76baecaa3 (commit) via 1f15324824dc90180bef1dfdb5fce6ff71c1b40c (commit) via e6b209c870af3b343e9703462777beb24dad55a6 (commit) from 4eefad236aad84c1f4ca38fcd3533a0ec7401a3b (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=d9bc6fd45191731d707af248fae4958732c2bc94 commit d9bc6fd45191731d707af248fae4958732c2bc94 Merge: c167a9b 1f15324 Author: Brad King AuthorDate: Thu Nov 9 13:19:36 2017 -0500 Commit: Brad King CommitDate: Thu Nov 9 13:19:36 2017 -0500 Merge branch 'release-3.10' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c167a9b18c2fab97d43f401c5da652e76baecaa3 commit c167a9b18c2fab97d43f401c5da652e76baecaa3 Merge: 4eefad2 e6b209c Author: Brad King AuthorDate: Thu Nov 9 18:17:30 2017 +0000 Commit: Kitware Robot CommitDate: Thu Nov 9 13:17:41 2017 -0500 Merge topic 'FindOpenGL-no-glvnd-for-GL' e6b209c8 FindOpenGL: Default to non-GLVND libraries for legacy GL Acked-by: Kitware Robot Merge-request: !1466 ----------------------------------------------------------------------- Summary of changes: Modules/FindOpenGL.cmake | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Nov 9 13:25:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 9 Nov 2017 13:25:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-rc4-12-g1f15324 Message-ID: <20171109182505.B4D14102BCC@public.kitware.com> 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, release has been updated via 1f15324824dc90180bef1dfdb5fce6ff71c1b40c (commit) via e6b209c870af3b343e9703462777beb24dad55a6 (commit) from 24ca336981696c6f77a4eb965ccc79ad4c98a2c0 (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/FindOpenGL.cmake | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Nov 10 00:05:14 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 10 Nov 2017 00:05:14 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-283-g6afc841 Message-ID: <20171110050516.2B1DA1028FA@public.kitware.com> 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 6afc841e74cf15bab2bf30966a4ea277d9fff33f (commit) from d9bc6fd45191731d707af248fae4958732c2bc94 (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=6afc841e74cf15bab2bf30966a4ea277d9fff33f commit 6afc841e74cf15bab2bf30966a4ea277d9fff33f Author: Kitware Robot AuthorDate: Fri Nov 10 00:01:14 2017 -0500 Commit: Kitware Robot CommitDate: Fri Nov 10 00:01:14 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 4c66678..d9f6abd 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20171109) +set(CMake_VERSION_PATCH 20171110) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Nov 10 00:25:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 10 Nov 2017 00:25:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-285-g0d7086e Message-ID: <20171110052506.C3736102B04@public.kitware.com> 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 0d7086e3daa67d6679f5ab01d9b187c333cca627 (commit) via b551beb6facee72d1c1af455a9e4e8ecc7be959f (commit) from 6afc841e74cf15bab2bf30966a4ea277d9fff33f (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=0d7086e3daa67d6679f5ab01d9b187c333cca627 commit 0d7086e3daa67d6679f5ab01d9b187c333cca627 Merge: 6afc841 b551beb Author: Craig Scott AuthorDate: Fri Nov 10 05:24:05 2017 +0000 Commit: Kitware Robot CommitDate: Fri Nov 10 00:24:50 2017 -0500 Merge topic 'fetchcontent-support-use-before-project-command' b551beb6 FetchContent: Support use of the module before "project()" command Acked-by: Kitware Robot Merge-request: !1448 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b551beb6facee72d1c1af455a9e4e8ecc7be959f commit b551beb6facee72d1c1af455a9e4e8ecc7be959f Author: Jean-Christophe Fillion-Robin AuthorDate: Tue Nov 7 09:50:02 2017 -0500 Commit: Jean-Christophe Fillion-Robin CommitDate: Tue Nov 7 09:50:02 2017 -0500 FetchContent: Support use of the module before "project()" command Co-authored-by: Craig Scott Co-authored-by: Brad King diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake index 132354f..98cdf6c 100644 --- a/Modules/FetchContent.cmake +++ b/Modules/FetchContent.cmake @@ -754,7 +754,9 @@ function(__FetchContent_directPopulate contentName) list(APPEND generatorOpts "-T${CMAKE_GENERATOR_TOOLSET}") endif() - list(APPEND generatorOpts "-DCMAKE_MAKE_PROGRAM:FILE=${CMAKE_MAKE_PROGRAM}") + if(CMAKE_MAKE_PROGRAM) + list(APPEND generatorOpts "-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}") + endif() else() # Likely we've been invoked via CMake's script mode where no ----------------------------------------------------------------------- Summary of changes: Modules/FetchContent.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Nov 10 07:35:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 10 Nov 2017 07:35:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-290-gc1a55e3 Message-ID: <20171110123508.952D1102ABF@public.kitware.com> 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 c1a55e333f99062530386b51675b9ea3c4bf40c9 (commit) via 6d20c44f3df2b642235b64ba4be789cd9e2b5362 (commit) via 18eae3f04db49608348283b4860e9eede69bf0a8 (commit) via 8bef3e31bddf1ea7ab3fe6a0871e76d52806cfcb (commit) via e8d0b4312e0454ed3a0787acb2ecbef2c3a364a9 (commit) from 0d7086e3daa67d6679f5ab01d9b187c333cca627 (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=c1a55e333f99062530386b51675b9ea3c4bf40c9 commit c1a55e333f99062530386b51675b9ea3c4bf40c9 Merge: 6d20c44 8bef3e3 Author: Brad King AuthorDate: Fri Nov 10 12:34:21 2017 +0000 Commit: Kitware Robot CommitDate: Fri Nov 10 07:34:24 2017 -0500 Merge topic 'update-kwsys' 8bef3e31 Merge branch 'upstream-KWSys' into update-kwsys e8d0b431 KWSys 2017-11-09 (40d7b1bb) Acked-by: Kitware Robot Merge-request: !1467 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d20c44f3df2b642235b64ba4be789cd9e2b5362 commit 6d20c44f3df2b642235b64ba4be789cd9e2b5362 Merge: 0d7086e 18eae3f Author: Brad King AuthorDate: Fri Nov 10 12:31:11 2017 +0000 Commit: Kitware Robot CommitDate: Fri Nov 10 07:31:55 2017 -0500 Merge topic 'windows-mt-update-quiet' 18eae3f0 Windows: Do not report manifest tool update notification as failure Acked-by: Kitware Robot Merge-request: !1470 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=18eae3f04db49608348283b4860e9eede69bf0a8 commit 18eae3f04db49608348283b4860e9eede69bf0a8 Author: Brad King AuthorDate: Thu Nov 9 09:37:53 2017 -0500 Commit: Brad King CommitDate: Thu Nov 9 11:22:00 2017 -0500 Windows: Do not report manifest tool update notification as failure A diagnostic message added in commit v3.10.0-rc1~59^2 (Windows: Improve link-time error messages when rc or mt fail, 2017-09-22) incorrectly reports the `mt /notify_update` special return code as a failure. Fix the logic to consider the special return codes as success. Fixes: #17444 diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index b4772a9..433caef 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1576,9 +1576,11 @@ std::ostream& operator<<(std::ostream& stream, stream.flags(flags); return stream; } + static bool RunCommand(const char* comment, std::vector& command, bool verbose, NumberFormat exitFormat, - int* retCodeOut = nullptr) + int* retCodeOut = nullptr, + bool (*retCodeOkay)(int) = nullptr) { if (verbose) { std::cout << comment << ":\n"; @@ -1588,18 +1590,17 @@ static bool RunCommand(const char* comment, std::vector& command, int retCode = 0; bool commandResult = cmSystemTools::RunSingleCommand( command, &output, &output, &retCode, nullptr, cmSystemTools::OUTPUT_NONE); - bool returnValue; + bool const retCodeSuccess = + retCode == 0 || (retCodeOkay && retCodeOkay(retCode)); + bool const success = commandResult && retCodeSuccess; if (retCodeOut) { - if (!commandResult) { - *retCodeOut = (retCode == 0) ? -1 : retCode; - } else { + if (commandResult || !retCodeOkay) { *retCodeOut = retCode; + } else { + *retCodeOut = -1; } - returnValue = true; // always return true if retCodeOut is requested - } else { - returnValue = commandResult && (retCode == 0); } - if (!commandResult || retCode) { + if (!success) { std::cout << comment << ": command \"" << cmJoin(command, " ") << "\" failed (exit code " << NumberFormatter(exitFormat, retCode) @@ -1612,7 +1613,7 @@ static bool RunCommand(const char* comment, std::vector& command, std::cout << output; } } - return returnValue; + return success; } bool cmVSLink::Parse(std::vector::const_iterator argBeg, @@ -1710,6 +1711,13 @@ int cmVSLink::Link() return LinkNonIncremental(); } +static bool mtRetIsUpdate(int mtRet) +{ + // 'mt /notify_update' returns a special value (differing between + // Windows and POSIX hosts) when it updated the manifest file. + return mtRet == 0x41020001 || mtRet == 0xbb; +} + int cmVSLink::LinkIncremental() { // This follows the steps listed here: @@ -1781,9 +1789,9 @@ int cmVSLink::LinkIncremental() // Run the manifest tool to create the final manifest. int mtRet = this->RunMT("/out:" + this->ManifestFile, true); - // If mt returns 1090650113 (or 187 on a posix host) then it updated the - // manifest file so we need to embed it again. Otherwise we are done. - if (mtRet != 1090650113 && mtRet != 187) { + // If mt returns a special value then it updated the manifest file so + // we need to embed it again. Otherwise we are done. + if (!mtRetIsUpdate(mtRet)) { return mtRet; } @@ -1836,7 +1844,8 @@ int cmVSLink::RunMT(std::string const& out, bool notify) mtCommand.push_back("/notify_update"); } int mtRet = 0; - if (!RunCommand("MT", mtCommand, this->Verbose, FORMAT_HEX, &mtRet)) { + if (!RunCommand("MT", mtCommand, this->Verbose, FORMAT_HEX, &mtRet, + mtRetIsUpdate)) { return -1; } return mtRet; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8bef3e31bddf1ea7ab3fe6a0871e76d52806cfcb commit 8bef3e31bddf1ea7ab3fe6a0871e76d52806cfcb Merge: 4eefad2 e8d0b43 Author: Brad King AuthorDate: Thu Nov 9 08:35:51 2017 -0500 Commit: Brad King CommitDate: Thu Nov 9 08:35:51 2017 -0500 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-11-09 (40d7b1bb) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8d0b4312e0454ed3a0787acb2ecbef2c3a364a9 commit e8d0b4312e0454ed3a0787acb2ecbef2c3a364a9 Author: KWSys Upstream AuthorDate: Thu Nov 9 07:51:32 2017 -0500 Commit: Brad King CommitDate: Thu Nov 9 08:35:50 2017 -0500 KWSys 2017-11-09 (40d7b1bb) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 40d7b1bba6abb1a2aea4c2d46a48968fb31a9d7d (master). Upstream Shortlog ----------------- Clinton Stimpson (1): e9d2b696 SystemTools: Cache only existing path names in GetActualCaseForPath diff --git a/SystemTools.cxx b/SystemTools.cxx index 1f7ee10..50aa857 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include // Work-around CMake dependency scanning limitation. This must @@ -3372,7 +3373,7 @@ std::string SystemTools::RelativePath(const std::string& local, } #ifdef _WIN32 -static std::string GetCasePathName(std::string const& pathIn) +static std::pair GetCasePathName(std::string const& pathIn) { std::string casePath; std::vector path_components; @@ -3381,7 +3382,7 @@ static std::string GetCasePathName(std::string const& pathIn) { // Relative paths cannot be converted. casePath = pathIn; - return casePath; + return std::make_pair(casePath, false); } // Start with root component. @@ -3433,7 +3434,7 @@ static std::string GetCasePathName(std::string const& pathIn) casePath += path_components[idx]; } - return casePath; + return std::make_pair(casePath, converting); } #endif @@ -3448,12 +3449,14 @@ std::string SystemTools::GetActualCaseForPath(const std::string& p) if (i != SystemTools::PathCaseMap->end()) { return i->second; } - std::string casePath = GetCasePathName(p); - if (casePath.size() > MAX_PATH) { - return casePath; + std::pair casePath = GetCasePathName(p); + if (casePath.first.size() > MAX_PATH) { + return casePath.first; } - (*SystemTools::PathCaseMap)[p] = casePath; - return casePath; + if (casePath.second) { + (*SystemTools::PathCaseMap)[p] = casePath.first; + } + return casePath.first; #endif } ----------------------------------------------------------------------- Summary of changes: Source/cmcmd.cxx | 37 +++++++++++++++++++++++-------------- Source/kwsys/SystemTools.cxx | 19 +++++++++++-------- 2 files changed, 34 insertions(+), 22 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Nov 10 07:45:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 10 Nov 2017 07:45:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-292-g9aaf287 Message-ID: <20171110124504.C01ACFE74A@public.kitware.com> 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 9aaf287d634db618c2961a063a3dda36d13d645b (commit) via 9ffb9cb873c08e801abbbc46c9df691d406e43d0 (commit) from c1a55e333f99062530386b51675b9ea3c4bf40c9 (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=9aaf287d634db618c2961a063a3dda36d13d645b commit 9aaf287d634db618c2961a063a3dda36d13d645b Merge: c1a55e3 9ffb9cb Author: Brad King AuthorDate: Fri Nov 10 12:42:44 2017 +0000 Commit: Kitware Robot CommitDate: Fri Nov 10 07:42:48 2017 -0500 Merge topic 'test-CTestTest2-intl' 9ffb9cb8 Tests: In CTestTest2 configure KWSys encoding to match CMake Acked-by: Kitware Robot Merge-request: !1468 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ffb9cb873c08e801abbbc46c9df691d406e43d0 commit 9ffb9cb873c08e801abbbc46c9df691d406e43d0 Author: Brad King AuthorDate: Thu Nov 9 08:01:06 2017 -0500 Commit: Brad King CommitDate: Thu Nov 9 08:35:38 2017 -0500 Tests: In CTestTest2 configure KWSys encoding to match CMake During configuration of KWSys by CMake we write UTF-8 content to a string used by KWSys tests. Tell KWSys to interpret it as UTF-8 instead of the ANSI code page. diff --git a/Tests/CTestTest2/test.cmake.in b/Tests/CTestTest2/test.cmake.in index 825b957..a9bbc52 100644 --- a/Tests/CTestTest2/test.cmake.in +++ b/Tests/CTestTest2/test.cmake.in @@ -34,6 +34,7 @@ CMAKE_C_COMPILER:STRING=@CMAKE_C_COMPILER@ CMAKE_CXX_COMPILER:STRING=@CMAKE_CXX_COMPILER@ CMAKE_C_COMPILER_ARG1:STRING=@CMAKE_C_COMPILER_ARG1@ CMAKE_CXX_COMPILER_ARG1:STRING=@CMAKE_CXX_COMPILER_ARG1@ +KWSYS_ENCODING_DEFAULT_CODEPAGE:STRING=CP_UTF8 # This one is needed for testing advanced ctest features CTEST_TEST_KWSYS:BOOL=ON ----------------------------------------------------------------------- Summary of changes: Tests/CTestTest2/test.cmake.in | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Nov 10 07:55:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 10 Nov 2017 07:55:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-296-g38bb98d Message-ID: <20171110125506.0A3BF102B17@public.kitware.com> 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 38bb98de511e41ae48c6c5193cc0333d54033365 (commit) via 78def0e25749249b500e8093e34df46217c526ef (commit) via 15892aa3c0bd111dde2c15c9c10875d01c8acc2b (commit) via cdf5f34b0c2ce8b984721f13a4dcd598a3d593e3 (commit) from 9aaf287d634db618c2961a063a3dda36d13d645b (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=38bb98de511e41ae48c6c5193cc0333d54033365 commit 38bb98de511e41ae48c6c5193cc0333d54033365 Merge: 78def0e cdf5f34 Author: Brad King AuthorDate: Fri Nov 10 12:51:04 2017 +0000 Commit: Kitware Robot CommitDate: Fri Nov 10 07:51:13 2017 -0500 Merge topic 'cmakeServerRequiredCMakeVersion' cdf5f34b server: return minimum cmake required version for each project Acked-by: Kitware Robot Merge-request: !1462 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78def0e25749249b500e8093e34df46217c526ef commit 78def0e25749249b500e8093e34df46217c526ef Merge: 9aaf287 15892aa Author: Brad King AuthorDate: Fri Nov 10 12:49:52 2017 +0000 Commit: Kitware Robot CommitDate: Fri Nov 10 07:50:00 2017 -0500 Merge topic 'csharp-settings-property' 15892aa3 VS: Fix warnings in generated references to '.settings' files Acked-by: Kitware Robot Merge-request: !1450 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15892aa3c0bd111dde2c15c9c10875d01c8acc2b commit 15892aa3c0bd111dde2c15c9c10875d01c8acc2b Author: Yoshinori Tahara AuthorDate: Fri Nov 3 18:28:15 2017 +0900 Commit: Brad King CommitDate: Thu Nov 9 11:48:38 2017 -0500 VS: Fix warnings in generated references to '.settings' files According to MSDN docs [1], LastGenOutput is just a file name. [1] https://msdn.microsoft.com/en-us/library/bb629388.aspx diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 1aadf67..6486c8b 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1689,12 +1689,8 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) } else if (ext == "natvis") { tool = "Natvis"; } else if (ext == "settings") { - // remove path to current source dir (if files are in current source dir) - if (!sourceLink.empty()) { - settingsLastGenOutput = sourceLink; - } else { - settingsLastGenOutput = sf->GetFullPath(); - } + settingsLastGenOutput = + cmsys::SystemTools::GetFilenameName(sf->GetFullPath()); std::size_t pos = settingsLastGenOutput.find(".settings"); settingsLastGenOutput.replace(pos, 9, ".Designer.cs"); settingsGenerator = "SettingsSingleFileGenerator"; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cdf5f34b0c2ce8b984721f13a4dcd598a3d593e3 commit cdf5f34b0c2ce8b984721f13a4dcd598a3d593e3 Author: Justin Goshi AuthorDate: Tue Nov 7 11:34:31 2017 -0800 Commit: Justin Goshi CommitDate: Tue Nov 7 12:15:57 2017 -0800 server: return minimum cmake required version for each project diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index a2fd961..ee8fada 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -458,6 +458,9 @@ Each project object can have the following keys: "name" contains the (sub-)projects name. +"minimumCMakeVersion" + contains the minimum cmake version allowed for this project, null if the + project doesn't specify one. "hasInstallRule" true if the project contains any install rules, false otherwise. "sourceDirectory" diff --git a/Source/cmServerDictionary.h b/Source/cmServerDictionary.h index 040c1fd..8cd5e14 100644 --- a/Source/cmServerDictionary.h +++ b/Source/cmServerDictionary.h @@ -95,6 +95,7 @@ static const std::string kHAS_ENABLED_TESTS = "hasEnabledTests"; static const std::string kCTEST_NAME = "ctestName"; static const std::string kCTEST_COMMAND = "ctestCommand"; static const std::string kCTEST_INFO = "ctestInfo"; +static const std::string kMINIMUM_CMAKE_VERSION = "minimumCMakeVersion"; static const std::string kTARGET_CROSS_REFERENCES_KEY = "crossReferences"; static const std::string kLINE_NUMBER_KEY = "line"; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 0cb906b..07df488 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -1116,6 +1116,8 @@ static Json::Value DumpProjectList(const cmake* cm, std::string const& config) // Project structure information: const cmMakefile* mf = lg->GetMakefile(); + pObj[kMINIMUM_CMAKE_VERSION] = + mf->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION"); pObj[kHAS_INSTALL_RULE] = mf->GetInstallGenerators().empty() == false; pObj[kSOURCE_DIRECTORY_KEY] = mf->GetCurrentSourceDirectory(); pObj[kBUILD_DIRECTORY_KEY] = mf->GetCurrentBinaryDirectory(); ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 3 +++ Source/cmServerDictionary.h | 1 + Source/cmServerProtocol.cxx | 2 ++ Source/cmVisualStudio10TargetGenerator.cxx | 8 ++------ 4 files changed, 8 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Nov 10 08:15:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 10 Nov 2017 08:15:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-302-g163be87 Message-ID: <20171110131504.84FE2FDD0D@public.kitware.com> 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 163be8714a279aa16e4511d0059e9cd471f0a256 (commit) via 3b272ff8e424b4f3e32fbc541732fdb6798cd978 (commit) via 002d0a1cf96f535066b2e2158b9b5956a16353a7 (commit) via 9d3aa95ca4c20d9eb47e8a588c9279c6f37bb4a9 (commit) via 7904b659ea71fdac47e72edd8309c72b4f7d7e8b (commit) via e80dc2ad7fd8cde15ad62ffd7743eba20fbc8524 (commit) from 38bb98de511e41ae48c6c5193cc0333d54033365 (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=163be8714a279aa16e4511d0059e9cd471f0a256 commit 163be8714a279aa16e4511d0059e9cd471f0a256 Merge: 38bb98d 3b272ff Author: Brad King AuthorDate: Fri Nov 10 13:05:38 2017 +0000 Commit: Kitware Robot CommitDate: Fri Nov 10 08:05:45 2017 -0500 Merge topic 'update-ctest-documentation' 3b272ff8 Help: Add 'Label and Subproject Summary' section to ctest(1) manual 002d0a1c Help: Normalize capitalization of 'CTest' in ctest(1) manual 9d3aa95c Help: Divide ctest(1) manual options into sections 7904b659 Tests: Remove incorrect use of 'test-timeout' option e80dc2ad cmCTest: Remove dead code Acked-by: Kitware Robot Merge-request: !1427 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b272ff8e424b4f3e32fbc541732fdb6798cd978 commit 3b272ff8e424b4f3e32fbc541732fdb6798cd978 Author: Betsy McPhail AuthorDate: Tue Nov 7 14:47:13 2017 -0500 Commit: Brad King CommitDate: Fri Nov 10 07:53:45 2017 -0500 Help: Add 'Label and Subproject Summary' section to ctest(1) manual diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 1166fe6..d9af3bc 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -72,6 +72,10 @@ Options number of jobs. This option can also be set by setting the environment variable ``CTEST_PARALLEL_LEVEL``. + This option can be used with the :prop_test:`PROCESSORS` test property. + + See `Label and Subproject Summary`_. + ``--test-load `` While running tests in parallel (e.g. with ``-j``), try not to start tests when they may cause the CPU load to pass above a given threshold. @@ -252,6 +256,8 @@ Options label associated with the tests run. If there are no labels on the tests, nothing extra is printed. + See `Label and Subproject Summary`_. + ``--no-subproject-summary`` Disable timing summary information for subprojects. @@ -259,6 +265,8 @@ Options subproject associated with the tests run. If there are no subprojects on the tests, nothing extra is printed. + See `Label and Subproject Summary`_. + ``--build-and-test`` See `Build and Test Mode`_. @@ -312,6 +320,21 @@ See `Build and Test Mode`_. .. include:: OPTIONS_HELP.txt +.. _`Label and Subproject Summary`: + +Label and Subproject Summary +============================ + +CTest prints timing summary information for each label and subproject +associated with the tests run. The label time summary will not include labels +that are mapped to subprojects. + +When the :prop_test:`PROCESSORS` test property is set, CTest will display a +weighted test timing result in label and subproject summaries. The wall clock +time for the test run will be multiplied by this property to give a better +idea of how much cpu resource CTest allocated for the test. The time is +reported with `sec*proc` instead of just `sec`. + .. _`Build and Test Mode`: Build and Test Mode @@ -749,7 +772,6 @@ Configuration settings to specify the version control tool include: * `CTest Script`_ variable: :variable:`CTEST_UPDATE_VERSION_ONLY` - Additional configuration settings include: ``NightlyStartTime`` @@ -791,6 +813,7 @@ Configuration settings include: * `CTest Script`_ variable: :variable:`CTEST_LABELS_FOR_SUBPROJECTS` * :module:`CTest` module variable: ``CTEST_LABELS_FOR_SUBPROJECTS`` + See `Label and Subproject Summary`_. .. _`CTest Build Step`: @@ -822,6 +845,8 @@ Configuration settings include: * `CTest Script`_ variable: :variable:`CTEST_LABELS_FOR_SUBPROJECTS` * :module:`CTest` module variable: ``CTEST_LABELS_FOR_SUBPROJECTS`` + See `Label and Subproject Summary`_. + ``MakeCommand`` Command-line to launch the software build process. It will be executed in the location specified by the @@ -865,6 +890,7 @@ Configuration settings include: * `CTest Script`_ variable: :variable:`CTEST_LABELS_FOR_SUBPROJECTS` * :module:`CTest` module variable: ``CTEST_LABELS_FOR_SUBPROJECTS`` + See `Label and Subproject Summary`_. ``TestLoad`` While running tests in parallel (e.g. with ``-j``), try not to start https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=002d0a1cf96f535066b2e2158b9b5956a16353a7 commit 002d0a1cf96f535066b2e2158b9b5956a16353a7 Author: Betsy McPhail AuthorDate: Mon Oct 30 12:46:27 2017 -0400 Commit: Brad King CommitDate: Fri Nov 10 07:53:42 2017 -0500 Help: Normalize capitalization of 'CTest' in ctest(1) manual diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 0a6b1dd..1166fe6 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -61,15 +61,15 @@ Options ``-F`` Enable failover. - This option allows ctest to resume a test set execution that was + This option allows CTest to resume a test set execution that was previously interrupted. If no interruption occurred, the ``-F`` option will have no effect. ``-j , --parallel `` Run the tests in parallel using the given number of jobs. - This option tells ctest to run the tests in parallel using given - number of jobs. This option can also be set by setting the + This option tells CTest to run the tests in parallel using given + number of jobs. This option can also be set by setting the environment variable ``CTEST_PARALLEL_LEVEL``. ``--test-load `` @@ -80,7 +80,7 @@ Options ``TestLoad`` option of the `CTest Test Step`_. ``-Q,--quiet`` - Make ctest quiet. + Make CTest quiet. This option will suppress all the output. The output log file will still be generated if the ``--output-log`` is specified. Options such @@ -90,37 +90,37 @@ Options ``-O , --output-log `` Output to log file. - This option tells ctest to write all its output to a log file. + This option tells CTest to write all its output to a log file. ``-N,--show-only`` Disable actual execution of tests. - This option tells ctest to list the tests that would be run but not + This option tells CTest to list the tests that would be run but not actually run them. Useful in conjunction with the ``-R`` and ``-E`` options. ``-L , --label-regex `` Run tests with labels matching regular expression. - This option tells ctest to run only the tests whose labels match the + This option tells CTest to run only the tests whose labels match the given regular expression. ``-R , --tests-regex `` Run tests matching regular expression. - This option tells ctest to run only the tests whose names match the + This option tells CTest to run only the tests whose names match the given regular expression. ``-E , --exclude-regex `` Exclude tests matching regular expression. - This option tells ctest to NOT run the tests whose names match the + This option tells CTest to NOT run the tests whose names match the given regular expression. ``-LE , --label-exclude `` Exclude tests with labels matching regular expression. - This option tells ctest to NOT run the tests whose labels match the + This option tells CTest to NOT run the tests whose labels match the given regular expression. ``-FA , --fixture-exclude-any `` @@ -143,7 +143,7 @@ Options ``-D , --dashboard `` Execute dashboard test. - This option tells ctest to act as a CDash client and perform a + This option tells CTest to act as a CDash client and perform a dashboard test. All tests are , where Mode can be Experimental, Nightly, and Continuous, and Test can be Start, Update, Configure, Build, Test, Coverage, and Submit. @@ -161,7 +161,7 @@ Options ``-M , --test-model `` Sets the model for a dashboard. - This option tells ctest to act as a CDash client where the ```` + This option tells CTest to act as a CDash client where the ```` can be ``Experimental``, ``Nightly``, and ``Continuous``. Combining ``-M`` and ``-T`` is similar to ``-D``. @@ -170,7 +170,7 @@ Options ``-T , --test-action `` Sets the dashboard action to perform. - This option tells ctest to act as a CDash client and perform some + This option tells CTest to act as a CDash client and perform some action such as ``start``, ``build``, ``test`` etc. See `Dashboard Client Steps`_ for the full list of actions. Combining ``-M`` and ``-T`` is similar to ``-D``. @@ -180,9 +180,9 @@ Options ``-S