From kwrobot at kitware.com Sat Jul 1 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 1 Jul 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-208-g0dddf85 Message-ID: <20170701040504.E2889FAAC0@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 0dddf85b6d47c38aed2c139209be0d4cb1e2f9f8 (commit) from c705f0af63e2e438d0c6de2400cd90a005576125 (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=0dddf85b6d47c38aed2c139209be0d4cb1e2f9f8 commit 0dddf85b6d47c38aed2c139209be0d4cb1e2f9f8 Author: Kitware Robot AuthorDate: Sat Jul 1 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Sat Jul 1 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 182bc31..d2352cd 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 20170630) +set(CMake_VERSION_PATCH 20170701) #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 Jul 2 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 2 Jul 2017 00:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-209-g43fc13f Message-ID: <20170702040505.52ED0FACFE@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 43fc13f8258251ca946cd07abd1cf32e5725722e (commit) from 0dddf85b6d47c38aed2c139209be0d4cb1e2f9f8 (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=43fc13f8258251ca946cd07abd1cf32e5725722e commit 43fc13f8258251ca946cd07abd1cf32e5725722e Author: Kitware Robot AuthorDate: Sun Jul 2 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Sun Jul 2 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index d2352cd..9b0bbc4 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 20170701) +set(CMake_VERSION_PATCH 20170702) #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 Jul 3 00:05:11 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 3 Jul 2017 00:05:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-210-gec64410 Message-ID: <20170703040512.442F1FAD29@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 ec6441007849806ffae30a7268baa335f093202e (commit) from 43fc13f8258251ca946cd07abd1cf32e5725722e (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=ec6441007849806ffae30a7268baa335f093202e commit ec6441007849806ffae30a7268baa335f093202e Author: Kitware Robot AuthorDate: Mon Jul 3 00:01:08 2017 -0400 Commit: Kitware Robot CommitDate: Mon Jul 3 00:01:08 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 9b0bbc4..35a6ee0 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 20170702) +set(CMake_VERSION_PATCH 20170703) #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 Jul 4 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 4 Jul 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-211-g74112c8 Message-ID: <20170704040504.69A79FABAF@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 74112c8da16ea5f2a4940d196d178da684626f92 (commit) from ec6441007849806ffae30a7268baa335f093202e (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=74112c8da16ea5f2a4940d196d178da684626f92 commit 74112c8da16ea5f2a4940d196d178da684626f92 Author: Kitware Robot AuthorDate: Tue Jul 4 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Tue Jul 4 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 35a6ee0..5677a32 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 20170703) +set(CMake_VERSION_PATCH 20170704) #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 Jul 5 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 5 Jul 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-212-gcdb43f1 Message-ID: <20170705040504.6FBC7FADD6@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 cdb43f1c887a0695468c18968943680435c7e625 (commit) from 74112c8da16ea5f2a4940d196d178da684626f92 (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=cdb43f1c887a0695468c18968943680435c7e625 commit cdb43f1c887a0695468c18968943680435c7e625 Author: Kitware Robot AuthorDate: Wed Jul 5 00:01:08 2017 -0400 Commit: Kitware Robot CommitDate: Wed Jul 5 00:01:08 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 5677a32..7421ef9 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 20170704) +set(CMake_VERSION_PATCH 20170705) #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 Jul 5 10:15:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 5 Jul 2017 10:15:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-216-gf973d49 Message-ID: <20170705141506.941E1FA972@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 f973d49ab9d4c59b93f6dac812a94bb130200836 (commit) via a57b3537504c055dbd72673816a672982cc3592d (commit) via 83d8aceeb35d2a378777a35fea1fb7d7c2d76362 (commit) via 82a5c2c6a56af5e51c5ec8ac30fda5e145087489 (commit) from cdb43f1c887a0695468c18968943680435c7e625 (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=f973d49ab9d4c59b93f6dac812a94bb130200836 commit f973d49ab9d4c59b93f6dac812a94bb130200836 Merge: a57b353 82a5c2c Author: Brad King AuthorDate: Wed Jul 5 14:11:11 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jul 5 10:11:21 2017 -0400 Merge topic 'vs-link-guard-cf' 82a5c2c6 VS: Fix support for '/guard:cf' linker flag Acked-by: Kitware Robot Merge-request: !1018 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a57b3537504c055dbd72673816a672982cc3592d commit a57b3537504c055dbd72673816a672982cc3592d Merge: cdb43f1 83d8ace Author: Brad King AuthorDate: Wed Jul 5 14:10:52 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jul 5 10:11:00 2017 -0400 Merge topic 'autogen-header-skip' 83d8acee Autogen: Check .moc header name against SKIP list Acked-by: Kitware Robot Merge-request: !1017 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=83d8aceeb35d2a378777a35fea1fb7d7c2d76362 commit 83d8aceeb35d2a378777a35fea1fb7d7c2d76362 Author: Sebastian Holtermann AuthorDate: Fri Jun 30 13:26:18 2017 +0200 Commit: Brad King CommitDate: Fri Jun 30 12:53:24 2017 -0400 Autogen: Check .moc header name against SKIP list When encountering an #include "FOO.moc" statement where FOO.hpp was chosen over FOO.cpp as the moc source, the FOO.hpp name was not checked against the moc SKIP list. diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 27e4928..6d3305b 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1003,7 +1003,7 @@ bool cmQtAutoGenerators::MocParseSourceContent( // In relaxed mode try to find a header instead but issue a warning const std::string headerToMoc = this->MocFindHeader(scannedFileAbsPath, incSubDir + incBasename); - if (!headerToMoc.empty()) { + if (!headerToMoc.empty() && !this->MocSkip(headerToMoc)) { // This is for KDE4 compatibility: fileToMoc = headerToMoc; if (!requiresMoc && (incBasename == scannedFileBasename)) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82a5c2c6a56af5e51c5ec8ac30fda5e145087489 commit 82a5c2c6a56af5e51c5ec8ac30fda5e145087489 Author: Olender, Sebastian D AuthorDate: Fri Jun 30 16:06:44 2017 +0200 Commit: Brad King CommitDate: Fri Jun 30 10:57:40 2017 -0400 VS: Fix support for '/guard:cf' linker flag Although `$(VCTargetsPath)/1033/link.xml` for v140 and v141 toolsets contains an entry for `LinkControlFlowGuard`, it does not work when used in a `.vcxproj` file. Drop our link flag table entries for these toolsets so that the flag will be passed via `AdditionalOptions`. diff --git a/Source/cmVS140LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h index ceb1d78..b9a4dc3 100644 --- a/Source/cmVS140LinkFlagTable.h +++ b/Source/cmVS140LinkFlagTable.h @@ -134,9 +134,6 @@ static cmVS7FlagTable cmVS140LinkFlagTable[] = { { "CLRSupportLastError", "CLRSupportLastError:SYSTEMDLL", "System Dlls Only", "SystemDlls", 0 }, - { "LinkControlFlowGuard", "guard:cf", "Enable Security Check with Guard", - "Guard", 0 }, - // Bool Properties { "LinkIncremental", "INCREMENTAL:NO", "", "false", 0 }, { "LinkIncremental", "INCREMENTAL", "", "true", 0 }, diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h index d7faf81..8f0f1f4 100644 --- a/Source/cmVS141LinkFlagTable.h +++ b/Source/cmVS141LinkFlagTable.h @@ -135,9 +135,6 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = { { "CLRSupportLastError", "CLRSupportLastError:SYSTEMDLL", "System Dlls Only", "SystemDlls", 0 }, - { "LinkControlFlowGuard", "guard:cf", "Enable Security Check with Guard", - "Guard", 0 }, - // Bool Properties { "LinkIncremental", "INCREMENTAL:NO", "", "false", 0 }, { "LinkIncremental", "INCREMENTAL", "", "true", 0 }, ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutoGenerators.cxx | 2 +- Source/cmVS140LinkFlagTable.h | 3 --- Source/cmVS141LinkFlagTable.h | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jul 5 10:35:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 5 Jul 2017 10:35:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-219-g295d9bf Message-ID: <20170705143503.12220FAEA5@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 295d9bf2bd795da551d5ac266c53eeac2de45a71 (commit) via ef31812ede6ca1eafd8723e8478e533deadfc4f0 (commit) via 2086003145b92b2f7b7d364aa0bba69c55997b73 (commit) from f973d49ab9d4c59b93f6dac812a94bb130200836 (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=295d9bf2bd795da551d5ac266c53eeac2de45a71 commit 295d9bf2bd795da551d5ac266c53eeac2de45a71 Merge: f973d49 ef31812 Author: Brad King AuthorDate: Wed Jul 5 10:28:38 2017 -0400 Commit: Brad King CommitDate: Wed Jul 5 10:28:38 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jul 5 10:35:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 5 Jul 2017 10:35:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc5-15-gef31812 Message-ID: <20170705143503.2AA80FAEA7@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 ef31812ede6ca1eafd8723e8478e533deadfc4f0 (commit) via 83d8aceeb35d2a378777a35fea1fb7d7c2d76362 (commit) via 2086003145b92b2f7b7d364aa0bba69c55997b73 (commit) via 82a5c2c6a56af5e51c5ec8ac30fda5e145087489 (commit) from d3234a8a48bbb24eff6bb1a0b1750d18c3417792 (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/cmQtAutoGenerators.cxx | 2 +- Source/cmVS140LinkFlagTable.h | 3 --- Source/cmVS141LinkFlagTable.h | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jul 5 13:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 5 Jul 2017 13:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-221-g1c73f35 Message-ID: <20170705170504.1A691FAD77@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 1c73f354a36211771539bf396875bcbade8a383f (commit) via 16d495253b45ae802ac0d78bc33f6caaa5285370 (commit) from 295d9bf2bd795da551d5ac266c53eeac2de45a71 (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=1c73f354a36211771539bf396875bcbade8a383f commit 1c73f354a36211771539bf396875bcbade8a383f Merge: 295d9bf 16d4952 Author: Brad King AuthorDate: Wed Jul 5 16:56:52 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jul 5 12:56:55 2017 -0400 Merge topic 'clang-format-missing' 16d49525 clang-format.bash: Fix error message when clang-format is not found Acked-by: Kitware Robot Merge-request: !1029 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16d495253b45ae802ac0d78bc33f6caaa5285370 commit 16d495253b45ae802ac0d78bc33f6caaa5285370 Author: Brad King AuthorDate: Wed Jul 5 12:55:03 2017 -0400 Commit: Brad King CommitDate: Wed Jul 5 12:55:03 2017 -0400 clang-format.bash: Fix error message when clang-format is not found Do not refer to a variable we just determined is empty to get the name of the tool for the error message. Just hard-code the name. diff --git a/Utilities/Scripts/clang-format.bash b/Utilities/Scripts/clang-format.bash index edcda77..428a9e4 100755 --- a/Utilities/Scripts/clang-format.bash +++ b/Utilities/Scripts/clang-format.bash @@ -92,7 +92,7 @@ fi # Verify that we have a tool. if ! type -p "$clang_format" >/dev/null; then - echo "Unable to locate '$clang_format'" + echo "Unable to locate a 'clang-format' tool." exit 1 fi ----------------------------------------------------------------------- Summary of changes: Utilities/Scripts/clang-format.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jul 6 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 6 Jul 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-222-g8bc93cd Message-ID: <20170706040504.50667FADAA@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 8bc93cdd797e6396040bd00eee877734af0d3759 (commit) from 1c73f354a36211771539bf396875bcbade8a383f (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=8bc93cdd797e6396040bd00eee877734af0d3759 commit 8bc93cdd797e6396040bd00eee877734af0d3759 Author: Kitware Robot AuthorDate: Thu Jul 6 00:01:05 2017 -0400 Commit: Kitware Robot CommitDate: Thu Jul 6 00:01:05 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7421ef9..14c604f 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 20170705) +set(CMake_VERSION_PATCH 20170706) #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 Jul 6 10:15:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 6 Jul 2017 10:15:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-226-gecadc14 Message-ID: <20170706141509.81C10FA790@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 ecadc1495b9c2e5ff5bbf265cb232f3acf1c2800 (commit) via 3572548eb37509db2801e8ae57f7874af3089f46 (commit) via cf9a994d9a53db02d8ddaa2bf3f9da0bc8f6f19b (commit) via 251bcbed721c86886b5b51f97f30228e249a0d63 (commit) from 8bc93cdd797e6396040bd00eee877734af0d3759 (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=ecadc1495b9c2e5ff5bbf265cb232f3acf1c2800 commit ecadc1495b9c2e5ff5bbf265cb232f3acf1c2800 Merge: 3572548 cf9a994 Author: Brad King AuthorDate: Thu Jul 6 10:13:51 2017 -0400 Commit: Brad King CommitDate: Thu Jul 6 10:13:51 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3572548eb37509db2801e8ae57f7874af3089f46 commit 3572548eb37509db2801e8ae57f7874af3089f46 Merge: 8bc93cd 251bcbe Author: Brad King AuthorDate: Thu Jul 6 14:13:07 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 6 10:13:25 2017 -0400 Merge topic 'autogen_p' 251bcbed Autogen: Continue search for FOO_p.h when FOO.h was found Acked-by: Kitware Robot Merge-request: !1022 ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutoGenerators.cxx | 1 - 1 file changed, 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jul 6 10:15:09 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 6 Jul 2017 10:15:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc5-17-gcf9a994 Message-ID: <20170706141510.5D951FA776@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 cf9a994d9a53db02d8ddaa2bf3f9da0bc8f6f19b (commit) via 251bcbed721c86886b5b51f97f30228e249a0d63 (commit) from ef31812ede6ca1eafd8723e8478e533deadfc4f0 (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/cmQtAutoGenerators.cxx | 1 - 1 file changed, 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jul 7 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 7 Jul 2017 00:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-227-g17115f0 Message-ID: <20170707040505.D6DA1FAD61@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 17115f0a5b594e76d6e3fa2df1361224e57ddf0f (commit) from ecadc1495b9c2e5ff5bbf265cb232f3acf1c2800 (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=17115f0a5b594e76d6e3fa2df1361224e57ddf0f commit 17115f0a5b594e76d6e3fa2df1361224e57ddf0f Author: Kitware Robot AuthorDate: Fri Jul 7 00:01:07 2017 -0400 Commit: Kitware Robot CommitDate: Fri Jul 7 00:01:07 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 14c604f..7495ba5 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 20170706) +set(CMake_VERSION_PATCH 20170707) #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 Jul 7 08:45:18 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 7 Jul 2017 08:45:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-243-g2ef3527 Message-ID: <20170707124518.9795AFA103@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 2ef3527dfe03ac6e5f5c49d13d99b2304381b0a8 (commit) via 364496e4d284c64c81c622f7ffb3674b9a83507f (commit) via 1ff7cd1fe7cdd408d55827bdc10058167a09cf45 (commit) via d2617a28eb9f489d87be88851a313c58d5eaf027 (commit) via a951eb2cb4b354e521bc6b93c7980e7f22ab1174 (commit) via 658ecc1a7cab54aeb738a00e7fee24aa4bd18adb (commit) via 796b8fcb14072bef72fe324015c0a62e2006b0db (commit) via 6c80e958cad73105c44e6b725a8ed7394e04290d (commit) via d1713d8bc580cdfad39b088285afcb92dea417de (commit) via d8e6cd9ed8bfee9073cff26cb654bc01e653b0b9 (commit) via 0b1a2876c817a00daf7027570b1976a9e15ff654 (commit) via fea7d69ddeedd72f6a1f8cec5a011696dec832db (commit) via d2a8b5cea6baa0508f9935ac2327fcf63f52c21a (commit) via a2112257df2f255d8aa3584af468b7d30ff90e8c (commit) via 8cd28bb0e54f962ab2b189f1b7196c2b014129a7 (commit) via 0fc2d78ee97cb0ba73040be353bdedd4fc03c2b9 (commit) from 17115f0a5b594e76d6e3fa2df1361224e57ddf0f (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=2ef3527dfe03ac6e5f5c49d13d99b2304381b0a8 commit 2ef3527dfe03ac6e5f5c49d13d99b2304381b0a8 Merge: 364496e 658ecc1 Author: Brad King AuthorDate: Fri Jul 7 08:43:39 2017 -0400 Commit: Brad King CommitDate: Fri Jul 7 08:43:39 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=364496e4d284c64c81c622f7ffb3674b9a83507f commit 364496e4d284c64c81c622f7ffb3674b9a83507f Merge: 1ff7cd1 6c80e95 Author: Brad King AuthorDate: Fri Jul 7 12:42:33 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jul 7 08:42:41 2017 -0400 Merge topic 'add-missing-fallthrough' 6c80e958 cmCTest: Add missing switch case fallthrough markup Acked-by: Kitware Robot Merge-request: !1027 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ff7cd1fe7cdd408d55827bdc10058167a09cf45 commit 1ff7cd1fe7cdd408d55827bdc10058167a09cf45 Merge: d2617a2 d8e6cd9 Author: Brad King AuthorDate: Fri Jul 7 12:42:16 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jul 7 08:42:22 2017 -0400 Merge topic 'iar_improved' d8e6cd9e IAR: Improve support for IAR ARM Compiler 0b1a2876 Add a CMAKE__COMPILER_ARCHITECTURE_ID variable fea7d69d Store CMAKE_ASM_COMPILER_VERSION persistently d2a8b5ce CMakeDetermineASMCompiler: Fix small copy-paste mistake a2112257 Add infrastructure to use language extensions without any standard 8cd28bb0 cmLocalGenerator: Switch order of _{EXTENSIONS,STANDARD} check 0fc2d78e cmLocalGenerator: Simplify logic for language standard or extension flag Acked-by: Kitware Robot Merge-request: !991 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2617a28eb9f489d87be88851a313c58d5eaf027 commit d2617a28eb9f489d87be88851a313c58d5eaf027 Merge: a951eb2 d1713d8 Author: Brad King AuthorDate: Fri Jul 7 12:41:17 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jul 7 08:41:30 2017 -0400 Merge topic 'connect_disablePCH_with_cl_option' d1713d8b VS: connect /Y- compiler option with "Not Using Precompiled Headers" Acked-by: Kitware Robot Merge-request: !1026 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a951eb2cb4b354e521bc6b93c7980e7f22ab1174 commit a951eb2cb4b354e521bc6b93c7980e7f22ab1174 Merge: 17115f0 796b8fc Author: Brad King AuthorDate: Fri Jul 7 12:40:54 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jul 7 08:41:04 2017 -0400 Merge topic 'FindDoxygen-create-output-dir' 796b8fcb FindDoxygen: Create DOXYGEN_OUTPUT_DIRECTORY if it doesn't exist Acked-by: Kitware Robot Reviewed-by: Craig Scott Merge-request: !1019 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c80e958cad73105c44e6b725a8ed7394e04290d commit 6c80e958cad73105c44e6b725a8ed7394e04290d Author: Brad King AuthorDate: Wed Jul 5 11:36:56 2017 -0400 Commit: Brad King CommitDate: Wed Jul 5 11:48:47 2017 -0400 cmCTest: Add missing switch case fallthrough markup Without this, GCC 7 warns. Reported-by: Rolf Eike Beer diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index e260556..6078256 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -190,7 +190,8 @@ int cmCTest::HTTPRequest(std::string url, HTTPMethod method, ::curl_easy_setopt(curl, CURLOPT_PUT, 1); file = cmsys::SystemTools::Fopen(putFile, "rb"); ::curl_easy_setopt(curl, CURLOPT_INFILE, file); - // fall through to append GET fields + // fall through to append GET fields + CM_FALLTHROUGH; case cmCTest::HTTP_GET: if (!fields.empty()) { url += "?" + fields; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1713d8bc580cdfad39b088285afcb92dea417de commit d1713d8bc580cdfad39b088285afcb92dea417de Author: Olender, Sebastian D AuthorDate: Wed Jul 5 10:58:04 2017 +0200 Commit: Olender, Sebastian D CommitDate: Wed Jul 5 10:58:04 2017 +0200 VS: connect /Y- compiler option with "Not Using Precompiled Headers" The change allows to selectively disable PrecompiledHeaders. Despite the `$(VCTargetsPath)/1033/cl.xml` contains an empty value for switch, for effectively turn off setting need to use /Y- option as described on msdn: https://msdn.microsoft.com/en-us/library/1hy7a92h.aspx diff --git a/Source/cmVS10CLFlagTable.h b/Source/cmVS10CLFlagTable.h index dbd760e..df4d58c 100644 --- a/Source/cmVS10CLFlagTable.h +++ b/Source/cmVS10CLFlagTable.h @@ -70,7 +70,8 @@ static cmVS7FlagTable cmVS10CLFlagTable[] = { cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, { "PrecompiledHeader", "Yu", "Use", "Use", cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, - { "PrecompiledHeader", "", "Not Using Precompiled Headers", "NotUsing", 0 }, + { "PrecompiledHeader", "Y-", "Not Using Precompiled Headers", "NotUsing", + 0 }, { "AssemblerOutput", "", "No Listing", "NoListing", 0 }, { "AssemblerOutput", "FA", "Assembly-Only Listing", "AssemblyCode", 0 }, diff --git a/Source/cmVS11CLFlagTable.h b/Source/cmVS11CLFlagTable.h index 7531709..d156938 100644 --- a/Source/cmVS11CLFlagTable.h +++ b/Source/cmVS11CLFlagTable.h @@ -74,7 +74,8 @@ static cmVS7FlagTable cmVS11CLFlagTable[] = { cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, { "PrecompiledHeader", "Yu", "Use", "Use", cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, - { "PrecompiledHeader", "", "Not Using Precompiled Headers", "NotUsing", 0 }, + { "PrecompiledHeader", "Y-", "Not Using Precompiled Headers", "NotUsing", + 0 }, { "AssemblerOutput", "", "No Listing", "NoListing", 0 }, { "AssemblerOutput", "FA", "Assembly-Only Listing", "AssemblyCode", 0 }, diff --git a/Source/cmVS12CLFlagTable.h b/Source/cmVS12CLFlagTable.h index 9515c91..a4f2518 100644 --- a/Source/cmVS12CLFlagTable.h +++ b/Source/cmVS12CLFlagTable.h @@ -78,7 +78,8 @@ static cmVS7FlagTable cmVS12CLFlagTable[] = { cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, { "PrecompiledHeader", "Yu", "Use", "Use", cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, - { "PrecompiledHeader", "", "Not Using Precompiled Headers", "NotUsing", 0 }, + { "PrecompiledHeader", "Y-", "Not Using Precompiled Headers", "NotUsing", + 0 }, { "AssemblerOutput", "", "No Listing", "NoListing", 0 }, { "AssemblerOutput", "FA", "Assembly-Only Listing", "AssemblyCode", 0 }, diff --git a/Source/cmVS140CLFlagTable.h b/Source/cmVS140CLFlagTable.h index 60b4379..2b89042 100644 --- a/Source/cmVS140CLFlagTable.h +++ b/Source/cmVS140CLFlagTable.h @@ -80,7 +80,8 @@ static cmVS7FlagTable cmVS140CLFlagTable[] = { cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, { "PrecompiledHeader", "Yu", "Use", "Use", cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, - { "PrecompiledHeader", "", "Not Using Precompiled Headers", "NotUsing", 0 }, + { "PrecompiledHeader", "Y-", "Not Using Precompiled Headers", "NotUsing", + 0 }, { "AssemblerOutput", "", "No Listing", "NoListing", 0 }, { "AssemblerOutput", "FA", "Assembly-Only Listing", "AssemblyCode", 0 }, diff --git a/Source/cmVS141CLFlagTable.h b/Source/cmVS141CLFlagTable.h index f751fc8..e8b8f5c 100644 --- a/Source/cmVS141CLFlagTable.h +++ b/Source/cmVS141CLFlagTable.h @@ -87,7 +87,8 @@ static cmVS7FlagTable cmVS141CLFlagTable[] = { cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, { "PrecompiledHeader", "Yu", "Use", "Use", cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, - { "PrecompiledHeader", "", "Not Using Precompiled Headers", "NotUsing", 0 }, + { "PrecompiledHeader", "Y-", "Not Using Precompiled Headers", "NotUsing", + 0 }, { "AssemblerOutput", "", "No Listing", "NoListing", 0 }, { "AssemblerOutput", "FA", "Assembly-Only Listing", "AssemblyCode", 0 }, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8e6cd9ed8bfee9073cff26cb654bc01e653b0b9 commit d8e6cd9ed8bfee9073cff26cb654bc01e653b0b9 Author: Norbert Lange AuthorDate: Thu Jun 15 14:50:22 2017 +0200 Commit: Brad King CommitDate: Thu Jun 29 13:25:58 2017 -0400 IAR: Improve support for IAR ARM Compiler Make the implementation for this compiler more complete. IAR has multiple C++ modes, historically they were reduced c++ versions for embedded that gradually improved to the full standard (which can be reduced again by e.g. disabling rtti and exceptions). The new implementation picks the best available, but the c++ mode can also be overridden by defining `CMAKE_IAR_CXX_FLAG`. Add C/C++ standard flags so that all modes up to and including the last supported standard are defined. Fixes: #16826 diff --git a/Help/release/dev/iar.rst b/Help/release/dev/iar.rst new file mode 100644 index 0000000..c6678eb --- /dev/null +++ b/Help/release/dev/iar.rst @@ -0,0 +1,4 @@ +iar +--- + +* Support for the IAR ARM Compiler was improved. diff --git a/Help/variable/CMAKE_LANG_COMPILER_ID.rst b/Help/variable/CMAKE_LANG_COMPILER_ID.rst index 0fab10c..5204044 100644 --- a/Help/variable/CMAKE_LANG_COMPILER_ID.rst +++ b/Help/variable/CMAKE_LANG_COMPILER_ID.rst @@ -20,6 +20,7 @@ include: G95 = G95 Fortran (g95.org) GNU = GNU Compiler Collection (gcc.gnu.org) HP = Hewlett-Packard Compiler (hp.com) + IAR = IAR Systems (iar.com) Intel = Intel Compiler (intel.com) MIPSpro = SGI MIPSpro (sgi.com) MSVC = Microsoft Visual Studio (microsoft.com) diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index b4779bf..d031421 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -103,8 +103,23 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) include(CMakeDetermineCompilerId) set(userflags) CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT} "${userflags}") + if("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}" STREQUAL "IAR") + # primary necessary to detect architecture, so the right archiver and linker can be picked + # eg. IAR Assembler V8.10.1.12857/W32 for ARM + # Cut out identification first, newline handling is a pain + string(REGEX MATCH "IAR Assembler[^\r\n]*" _compileid "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_OUTPUT}") + if("${_compileid}" MATCHES "V([0-9]+\\.[0-9]+\\.[0-9]+)") + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_VERSION ${CMAKE_MATCH_1}) + endif() + if("${_compileid}" MATCHES "for[ ]+([A-Za-z0-9]+)") + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID ${CMAKE_MATCH_1}) + endif() + endif() + unset(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_OUTPUT) + unset(_compileid) endif() + if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) if(CMAKE_ASM${ASM_DIALECT}_COMPILER_VERSION) set(_version " ${CMAKE_ASM${ASM_DIALECT}_COMPILER_VERSION}") @@ -149,6 +164,9 @@ endif () include(CMakeFindBinUtils) +set(_CMAKE_PROCESSING_LANGUAGE "ASM") +include(Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-FindBinUtils OPTIONAL) +unset(_CMAKE_PROCESSING_LANGUAGE) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM${ASM_DIALECT}") diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 612dbb4..8c33eb6 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -73,6 +73,9 @@ else() set(CMAKE_CXX_COMPILER_ID_TEST_FLAGS # Try compiling to an object file only. "-c" + # IAR does not detect language automatically + "--c++" + "--ec++" ) endif() diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 59aac5c..8d4e6aa 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -678,6 +678,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang userflags) "Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" " "matched \"${regex}\":\n${output}") set(CMAKE_${lang}_COMPILER_ID "${vendor}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_ID_OUTPUT "${output}" PARENT_SCOPE) break() else() if("${result}" MATCHES "timeout") diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in index 47eb00a..c7065b2 100644 --- a/Modules/CMakePlatformId.h.in +++ b/Modules/CMakePlatformId.h.in @@ -144,6 +144,16 @@ # define ARCHITECTURE_ID "" # endif +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif #else # define ARCHITECTURE_ID #endif diff --git a/Modules/Compiler/IAR-ASM.cmake b/Modules/Compiler/IAR-ASM.cmake index 844c30e..651bc3a 100644 --- a/Modules/Compiler/IAR-ASM.cmake +++ b/Modules/Compiler/IAR-ASM.cmake @@ -2,13 +2,20 @@ include(Compiler/IAR) -set(CMAKE_ASM_COMPILE_OBJECT " -o ") - -if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM") +if("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM") +set(CMAKE_ASM_COMPILE_OBJECT " -S -o ") + __compiler_iar_ARM(ASM) set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa) -endif() + string(APPEND CMAKE_ASM_FLAGS_INIT " ") + string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -r") + string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -DNDEBUG") + string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -DNDEBUG") + string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -r -DNDEBUG") -if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR") +elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR") + set(CMAKE_ASM_COMPILE_OBJECT " -S -o ") + __compiler_iar_AVR(ASM) set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s90;asm;msa) + endif() diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake index f65b0c7..48a9a16 100644 --- a/Modules/Compiler/IAR-C.cmake +++ b/Modules/Compiler/IAR-C.cmake @@ -1,25 +1,29 @@ # This file is processed when the IAR compiler is used for a C file - include(Compiler/IAR) - -set(CMAKE_C_COMPILE_OBJECT " -o ") -set(CMAKE_C_CREATE_PREPROCESSED_SOURCE " --preprocess=cnl ") -set(CMAKE_C_CREATE_ASSEMBLY_SOURCE " -lAH -o .dummy") - -set(CMAKE_C_RESPONSE_FILE_LINK_FLAG "-f ") -set(CMAKE_DEPFILE_FLAGS_C "--dependencies=ns ") +include(Compiler/CMakeCommonCompilerMacros) # The toolchains for ARM and AVR are quite different: -if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM") - - set(CMAKE_C_LINK_EXECUTABLE " -o ") - set(CMAKE_C_CREATE_STATIC_LIBRARY " --create ") - -endif() +if("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM") + set(CMAKE_C90_STANDARD_COMPILE_OPTION "") + set(CMAKE_C90_EXTENSION_COMPILE_OPTION -e) + + if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.10) + set(CMAKE_C90_STANDARD_COMPILE_OPTION --c89) + set(CMAKE_C90_EXTENSION_COMPILE_OPTION --c89 -e) + set(CMAKE_C99_STANDARD_COMPILE_OPTION "") + set(CMAKE_C99_EXTENSION_COMPILE_OPTION -e) + endif() + if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.10) + set(CMAKE_C11_STANDARD_COMPILE_OPTION "") + set(CMAKE_C11_EXTENSION_COMPILE_OPTION -e) + endif() + __compiler_iar_ARM(C) + __compiler_check_default_language_standard(C 1.10 90 6.10 99 8.10 11) -if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR") +elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR") + __compiler_iar_AVR(C) set(CMAKE_C_OUTPUT_EXTENSION ".r90") if(NOT CMAKE_C_LINK_FLAGS) @@ -29,9 +33,8 @@ if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR") set(CMAKE_C_LINK_EXECUTABLE " -o ") set(CMAKE_C_CREATE_STATIC_LIBRARY " -o ") + # add the target specific include directory: + get_filename_component(_compilerDir "${CMAKE_C_COMPILER}" PATH) + get_filename_component(_compilerDir "${_compilerDir}" PATH) + include_directories("${_compilerDir}/inc" ) endif() - -# add the target specific include directory: -get_filename_component(_compilerDir "${CMAKE_C_COMPILER}" PATH) -get_filename_component(_compilerDir "${_compilerDir}" PATH) -include_directories("${_compilerDir}/inc" ) diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake index f49968e..7a6ba2b 100644 --- a/Modules/Compiler/IAR-CXX.cmake +++ b/Modules/Compiler/IAR-CXX.cmake @@ -1,24 +1,39 @@ # This file is processed when the IAR compiler is used for a C++ file include(Compiler/IAR) +include(Compiler/CMakeCommonCompilerMacros) + +if("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM") + # "(extended) embedded C++" Mode + # old version: --ec++ or --eec++ + # since 8.10: --c++ --no_exceptions --no_rtti + # + # --c++ is full C++ and supported since 6.10 + if(NOT CMAKE_IAR_CXX_FLAG) + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.10) + set(CMAKE_IAR_CXX_FLAG --c++) + else() + set(CMAKE_IAR_CXX_FLAG --eec++) + endif() + endif() -set(CMAKE_CXX_COMPILE_OBJECT " -o ") - -set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " --preprocess=cnl ") -set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -lAH -o .dummy") - -set(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "-f ") -set(CMAKE_DEPFILE_FLAGS_CXX "--dependencies=ns ") - -if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM") + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION -e) - set(CMAKE_CXX_LINK_EXECUTABLE " -o ") - set(CMAKE_CXX_CREATE_STATIC_LIBRARY " --create ") - -endif() + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.10) + set(CMAKE_CXX03_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX03_EXTENSION_COMPILE_OPTION -e) + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION -e) + set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION -e) + endif() + __compiler_iar_ARM(CXX) + __compiler_check_default_language_standard(CXX 6.10 98 8.10 14) -if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR") +elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR") + __compiler_iar_AVR(CXX) set(CMAKE_CXX_OUTPUT_EXTENSION ".r90") if(NOT CMAKE_CXX_LINK_FLAGS) set(CMAKE_CXX_LINK_FLAGS "-Fmotorola") @@ -27,9 +42,8 @@ if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR") set(CMAKE_CXX_LINK_EXECUTABLE " -o ") set(CMAKE_CXX_CREATE_STATIC_LIBRARY " -o ") + # add the target specific include directory: + get_filename_component(_compilerDir "${CMAKE_C_COMPILER}" PATH) + get_filename_component(_compilerDir "${_compilerDir}" PATH) + include_directories("${_compilerDir}/inc") endif() - -# add the target specific include directory: -get_filename_component(_compilerDir "${CMAKE_C_COMPILER}" PATH) -get_filename_component(_compilerDir "${_compilerDir}" PATH) -include_directories("${_compilerDir}/inc") diff --git a/Modules/Compiler/IAR-DetermineCompiler.cmake b/Modules/Compiler/IAR-DetermineCompiler.cmake index c39810a..4ef587b 100644 --- a/Modules/Compiler/IAR-DetermineCompiler.cmake +++ b/Modules/Compiler/IAR-DetermineCompiler.cmake @@ -1,4 +1,18 @@ - # IAR Systems compiler for embedded systems. # http://www.iar.com -set(_compiler_id_pp_test "defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC)") +# http://supp.iar.com/FilesPublic/UPDINFO/004916/arm/doc/EWARM_DevelopmentGuide.ENU.pdf +# +# __IAR_SYSTEMS_ICC__ An integer that identifies the IAR compiler platform. The current value is 8. Note that +# the number could be higher in a future version of the product +# __ICCARM__ An integer that is set to 1 when the code is compiled with the IAR C/C++ Compiler for ARM +# __VER__ An integer that identifies the version number of the IAR compiler in use. For example, +# version 5.11.3 is returned as 5011003. + +set(_compiler_id_pp_test "defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)") + +set(_compiler_id_version_compute " +# if defined(__VER__) +# define @PREFIX at COMPILER_VERSION_MAJOR @MACRO_DEC@((__VER__) / 1000000) +# define @PREFIX at COMPILER_VERSION_MINOR @MACRO_DEC@(((__VER__) / 1000) % 1000) +# define @PREFIX at COMPILER_VERSION_PATCH @MACRO_DEC@((__VER__) % 1000) +# endif") diff --git a/Modules/Compiler/IAR-FindBinUtils.cmake b/Modules/Compiler/IAR-FindBinUtils.cmake new file mode 100644 index 0000000..2b04795 --- /dev/null +++ b/Modules/Compiler/IAR-FindBinUtils.cmake @@ -0,0 +1,54 @@ +if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL "") + message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set") +endif() + +# Try to find tools in the same directory as Clang itself +get_filename_component(__iar_hint_1 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" REALPATH) +get_filename_component(__iar_hint_1 "${__iar_hint_1}" DIRECTORY) + +get_filename_component(__iar_hint_2 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" DIRECTORY) + +set(__iar_hints "${__iar_hint_1}" "${__iar_hint_2}") + +if("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM") + # could allow using normal binutils ar, since objects are normal ELF files? + find_program(CMAKE_IAR_LINKARM ilinkarm.exe HINTS ${__iar_hints} + DOC "The IAR ARM linker") + find_program(CMAKE_IAR_ARCHIVE iarchive.exe HINTS ${__iar_hints} + DOC "The IAR archiver") + + # find auxillary 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} + DOC "The IAR ELF Dumper") + find_program(CMAKE_IAR_OBJMANIP iobjmanip.exe HINTS ${__iar_hints} + DOC "The IAR ELF Object Tool") + find_program(CMAKE_IAR_SYMEXPORT isymexport.exe HINTS ${__iar_hints} + DOC "The IAR Absolute Symbol Exporter") + mark_as_advanced(CMAKE_IAR_LINKARM CMAKE_IAR_ARCHIVE CMAKE_IAR_ELFTOOL CMAKE_IAR_ELFDUMP CMAKE_IAR_OBJMANIP CMAKE_IAR_SYMEXPORT) + + set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_CUSTOM_CODE +"set(CMAKE_IAR_LINKARM \"${CMAKE_IAR_LINKARM}\") +set(CMAKE_IAR_ARCHIVE \"${CMAKE_IAR_ARCHIVE}\") +set(CMAKE_IAR_ELFTOOL \"${CMAKE_IAR_ELFTOOL}\") +set(CMAKE_IAR_ELFDUMP \"${CMAKE_IAR_ELFDUMP}\") +set(CMAKE_IAR_OBJMANIP \"${CMAKE_IAR_OBJMANIP}\") +set(CMAKE_IAR_LINKARM \"${CMAKE_IAR_LINKARM}\") +") + + +elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR") + + # For AVR and AVR32, IAR uses the "xlink" linker and the "xar" archiver: + find_program(CMAKE_IAR_LINKER xlink.exe HINTS ${__iar_hints} + DOC "The IAR AVR linker") + find_program(CMAKE_IAR_AR xar.exe HINTS ${__iar_hints} + DOC "The IAR archiver") + mark_as_advanced(CMAKE_IAR_LINKER CMAKE_IAR_AR) + + set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_CUSTOM_CODE +"set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\") +set(CMAKE_IAR_AR \"${CMAKE_IAR_AR}\") +") +endif() diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake index 8c45276..52ebaf2 100644 --- a/Modules/Compiler/IAR.cmake +++ b/Modules/Compiler/IAR.cmake @@ -2,46 +2,75 @@ # Documentation can be downloaded here: http://www.iar.com/website1/1.0.1.0/675/1/ # The initial feature request is here: https://gitlab.kitware.com/cmake/cmake/issues/10176 # It also contains additional links and information. +# See USER GUIDES -> C/C++ Development Guide and ReleaseNotes for: +# version 6.30.8: http://supp.iar.com/FilesPublic/UPDINFO/006607/arm/doc/infocenter/index.ENU.html +# version 7.60.1: http://supp.iar.com/FilesPublic/UPDINFO/011006/arm/doc/infocenter/index.ENU.html +# version 8.10.1: http://netstorage.iar.com/SuppDB/Public/UPDINFO/011854/arm/doc/infocenter/index.ENU.html -if(_IAR_CMAKE_LOADED) +# C/C++ Standard versions +# +# IAR typically only supports one C and C++ Standard version, +# the exception is C89 which is always supported and can be selected +# if its not the default +# +# C++ is trickier, there were historically 3 switches, +# and some IAR versions support multiple of those. +# they are --eec++, --ec++ and --c++ and where used to +# enable various language features like exceptions +# +# recent versions only have --c++ for full support +# but can choose to disable features with further arguments +# +# C/C++ Standard compliance +# +# IAR has 3 modes: default, strict and extended +# the extended mode is needed for popular libraries like CMSIS +# +# "Silent" Operation +# +# this really is different to most programs I know. +# nothing meaningfull 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. +if(_IARARM_CMAKE_LOADED) return() endif() -set(_IAR_CMAKE_LOADED TRUE) +set(_IARARM_CMAKE_LOADED 1) +macro(__compiler_iar_ARM lang) + set(CMAKE_EXECUTABLE_SUFFIX ".elf") + if (${lang} STREQUAL "C" OR ${lang} STREQUAL "CXX") -get_filename_component(_CMAKE_C_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH) -get_filename_component(_CMAKE_CXX_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH) -get_filename_component(_CMAKE_ASM_TOOLCHAIN_LOCATION "${CMAKE_ASM_COMPILER}" PATH) + set(CMAKE_${lang}_COMPILE_OBJECT " ${CMAKE_IAR_${lang}_FLAG} --silent -o ") + set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " ${CMAKE_IAR_${lang}_FLAG} --silent --preprocess=cnl ") + set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " ${CMAKE_IAR_${lang}_FLAG} --silent -lAH -o .dummy") + set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-f ") + set(CMAKE_DEPFILE_FLAGS_${lang} "--dependencies=ns ") -if("${CMAKE_C_COMPILER}" MATCHES "arm" OR "${CMAKE_CXX_COMPILER}" MATCHES "arm" OR "${CMAKE_ASM_COMPILER}" MATCHES "arm") - set(CMAKE_EXECUTABLE_SUFFIX ".elf") + string(APPEND CMAKE_${lang}_FLAGS_INIT " ") + string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -r") + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Ohz -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -Oh -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -Oh -r -DNDEBUG") + endif() - # For arm, IAR uses the "ilinkarm" linker and "iarchive" archiver: - find_program(CMAKE_IAR_LINKER ilinkarm HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}") - find_program(CMAKE_IAR_AR iarchive HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}" ) + set(CMAKE_${lang}_LINK_EXECUTABLE "\"${CMAKE_IAR_LINKARM}\" --silent -o ") + set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "\"${CMAKE_IAR_ARCHIVE}\" --create ") + set(CMAKE_${lang}_ARCHIVE_CREATE "\"${CMAKE_IAR_ARCHIVE}\" --create ") + set(CMAKE_${lang}_ARCHIVE_APPEND "\"${CMAKE_IAR_ARCHIVE}\" --replace ") + set(CMAKE_${lang}_ARCHIVE_FINISH "") - set(IAR_TARGET_ARCHITECTURE "ARM" CACHE STRING "IAR compiler target architecture") -endif() + set(CMAKE_LINKER "${CMAKE_IAR_LINKARM}" CACHE FILEPATH "The IAR linker" FORCE) + set(CMAKE_AR "${CMAKE_IAR_ARCHIVE}" CACHE FILEPATH "The IAR archiver" FORCE) +endmacro() -if("${CMAKE_C_COMPILER}" MATCHES "avr" OR "${CMAKE_CXX_COMPILER}" MATCHES "avr" OR "${CMAKE_ASM_COMPILER}" MATCHES "avr") +macro(__compiler_iar_AVR lang) set(CMAKE_EXECUTABLE_SUFFIX ".bin") - # For AVR and AVR32, IAR uses the "xlink" linker and the "xar" archiver: - find_program(CMAKE_IAR_LINKER xlink HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}" ) - find_program(CMAKE_IAR_AR xar HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" "${_CMAKE_ASM_TOOLCHAIN_LOCATION}" ) - - set(IAR_TARGET_ARCHITECTURE "AVR" CACHE STRING "IAR compiler target architecture") - set(CMAKE_LIBRARY_PATH_FLAG "-I") -endif() - -if(NOT IAR_TARGET_ARCHITECTURE) - message(FATAL_ERROR "The IAR compiler for this architecture is not yet supported " - "by CMake. Please go to https://gitlab.kitware.com/cmake/cmake/issues " - "and enter a feature request there.") -endif() - -set(CMAKE_LINKER "${CMAKE_IAR_LINKER}" CACHE FILEPATH "The IAR linker" FORCE) -set(CMAKE_AR "${CMAKE_IAR_AR}" CACHE FILEPATH "The IAR archiver" FORCE) + set(CMAKE_LINKER "${CMAKE_IAR_LINKER}" CACHE FILEPATH "The IAR linker" FORCE) + set(CMAKE_AR "${CMAKE_IAR_AR}" CACHE FILEPATH "The IAR archiver" FORCE) +endmacro() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b1a2876c817a00daf7027570b1976a9e15ff654 commit 0b1a2876c817a00daf7027570b1976a9e15ff654 Author: Norbert Lange AuthorDate: Tue Jun 27 22:52:22 2017 +0200 Commit: Brad King CommitDate: Thu Jun 29 13:25:57 2017 -0400 Add a CMAKE__COMPILER_ARCHITECTURE_ID variable Compilers such as MSVC and IAR may have variants that target different architectures. We have been using a `MSVC__ARCHITECTURE_ID` variable to hold this information for MSVC. Add an alternative with a more general name (later we can port MSVC to it too). This additional information may be needed to generate proper invocations of the compiler based on its architecture variant. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 1a2726d..f889980 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -386,6 +386,7 @@ Variables for Languages /variable/CMAKE_LANG_ARCHIVE_FINISH /variable/CMAKE_LANG_COMPILER /variable/CMAKE_LANG_COMPILER_ABI + /variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID /variable/CMAKE_LANG_COMPILER_EXTERNAL_TOOLCHAIN /variable/CMAKE_LANG_COMPILER_ID /variable/CMAKE_LANG_COMPILER_LOADED diff --git a/Help/variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID.rst b/Help/variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID.rst new file mode 100644 index 0000000..054c648 --- /dev/null +++ b/Help/variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID.rst @@ -0,0 +1,8 @@ +CMAKE__COMPILER_ARCHITECTURE_ID +------------------------------------- + +An internal variable subject to change. + +This is used to identify the variant of a compiler based on its target +architecture. For some compilers this is needed to determine the correct +usage. diff --git a/Modules/CMakeASMCompiler.cmake.in b/Modules/CMakeASMCompiler.cmake.in index 2decc32..a6465f6 100644 --- a/Modules/CMakeASMCompiler.cmake.in +++ b/Modules/CMakeASMCompiler.cmake.in @@ -9,6 +9,7 @@ set(CMAKE_ASM at ASM_DIALECT@_COMPILER_LOADED 1) set(CMAKE_ASM at ASM_DIALECT@_COMPILER_ID "@_CMAKE_ASM_COMPILER_ID@") set(CMAKE_ASM at ASM_DIALECT@_COMPILER_VERSION "@_CMAKE_ASM_COMPILER_VERSION@") set(CMAKE_ASM at ASM_DIALECT@_COMPILER_ENV_VAR "@_CMAKE_ASM_COMPILER_ENV_VAR@") + at _SET_CMAKE_ASM_COMPILER_ARCHITECTURE_ID@ set(CMAKE_ASM at ASM_DIALECT@_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) set(CMAKE_ASM at ASM_DIALECT@_LINKER_PREFERENCE 0) diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in index 974a579..92259dd 100644 --- a/Modules/CMakeCCompiler.cmake.in +++ b/Modules/CMakeCCompiler.cmake.in @@ -12,6 +12,7 @@ set(CMAKE_C11_COMPILE_FEATURES "@CMAKE_C11_COMPILE_FEATURES@") set(CMAKE_C_PLATFORM_ID "@CMAKE_C_PLATFORM_ID@") set(CMAKE_C_SIMULATE_ID "@CMAKE_C_SIMULATE_ID@") set(CMAKE_C_SIMULATE_VERSION "@CMAKE_C_SIMULATE_VERSION@") + at _SET_CMAKE_C_COMPILER_ARCHITECTURE_ID@ @SET_MSVC_C_ARCHITECTURE_ID@ @SET_CMAKE_XCODE_CURRENT_ARCH@ set(CMAKE_AR "@CMAKE_AR@") diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in index fda7950..47fc624 100644 --- a/Modules/CMakeCXXCompiler.cmake.in +++ b/Modules/CMakeCXXCompiler.cmake.in @@ -13,6 +13,7 @@ set(CMAKE_CXX17_COMPILE_FEATURES "@CMAKE_CXX17_COMPILE_FEATURES@") set(CMAKE_CXX_PLATFORM_ID "@CMAKE_CXX_PLATFORM_ID@") set(CMAKE_CXX_SIMULATE_ID "@CMAKE_CXX_SIMULATE_ID@") set(CMAKE_CXX_SIMULATE_VERSION "@CMAKE_CXX_SIMULATE_VERSION@") + at _SET_CMAKE_CXX_COMPILER_ARCHITECTURE_ID@ @SET_MSVC_CXX_ARCHITECTURE_ID@ @SET_CMAKE_XCODE_CURRENT_ARCH@ set(CMAKE_AR "@CMAKE_AR@") diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 1ed4e20..b4779bf 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -170,6 +170,13 @@ foreach(_var set(_CMAKE_ASM_${_var} "${CMAKE_ASM${ASM_DIALECT}_${_var}}") endforeach() +if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID) + set(_SET_CMAKE_ASM_COMPILER_ARCHITECTURE_ID + "set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID})") +else() + set(_SET_CMAKE_ASM_COMPILER_ARCHITECTURE_ID "") +endif() + # configure variables set in this file for fast reload later on configure_file(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in ${CMAKE_PLATFORM_INFO_DIR}/CMakeASM${ASM_DIALECT}Compiler.cmake @ONLY) diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index 3caccde..fcbda20 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -170,6 +170,13 @@ set(_CMAKE_PROCESSING_LANGUAGE "C") include(Compiler/${CMAKE_C_COMPILER_ID}-FindBinUtils OPTIONAL) unset(_CMAKE_PROCESSING_LANGUAGE) +if(CMAKE_C_COMPILER_ARCHITECTURE_ID) + set(_SET_CMAKE_C_COMPILER_ARCHITECTURE_ID + "set(CMAKE_C_COMPILER_ARCHITECTURE_ID ${CMAKE_C_COMPILER_ARCHITECTURE_ID})") +else() + set(_SET_CMAKE_C_COMPILER_ARCHITECTURE_ID "") +endif() + if(MSVC_C_ARCHITECTURE_ID) set(SET_MSVC_C_ARCHITECTURE_ID "set(MSVC_C_ARCHITECTURE_ID ${MSVC_C_ARCHITECTURE_ID})") diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 9150962..612dbb4 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -165,6 +165,13 @@ set(_CMAKE_PROCESSING_LANGUAGE "CXX") include(Compiler/${CMAKE_CXX_COMPILER_ID}-FindBinUtils OPTIONAL) unset(_CMAKE_PROCESSING_LANGUAGE) +if(CMAKE_CXX_COMPILER_ARCHITECTURE_ID) + set(_SET_CMAKE_CXX_COMPILER_ARCHITECTURE_ID + "set(CMAKE_CXX_COMPILER_ARCHITECTURE_ID ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID})") +else() + set(_SET_CMAKE_CXX_COMPILER_ARCHITECTURE_ID "") +endif() + if(MSVC_CXX_ARCHITECTURE_ID) set(SET_MSVC_CXX_ARCHITECTURE_ID "set(MSVC_CXX_ARCHITECTURE_ID ${MSVC_CXX_ARCHITECTURE_ID})") diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index eeb806f..59aac5c 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -102,6 +102,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE) set(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID "${CMAKE_${lang}_COMPILER_ARCHITECTURE_ID}" PARENT_SCOPE) set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_XCODE_CURRENT_ARCH "${CMAKE_${lang}_XCODE_CURRENT_ARCH}" PARENT_SCOPE) @@ -576,6 +577,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) if(COMPILER_ID AND NOT COMPILER_ID_TWICE) set(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}") set(CMAKE_${lang}_PLATFORM_ID "${PLATFORM_ID}") + set(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID "${ARCHITECTURE_ID}") set(MSVC_${lang}_ARCHITECTURE_ID "${ARCHITECTURE_ID}") set(CMAKE_${lang}_COMPILER_VERSION "${COMPILER_VERSION}") set(CMAKE_${lang}_SIMULATE_ID "${SIMULATE_ID}") @@ -625,6 +627,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) # Return the information extracted. set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE) set(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID "${CMAKE_${lang}_COMPILER_ARCHITECTURE_ID}" PARENT_SCOPE) set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index d5220b4..5559640 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -261,6 +261,13 @@ set(_CMAKE_PROCESSING_LANGUAGE "Fortran") include(Compiler/${CMAKE_Fortran_COMPILER_ID}-FindBinUtils OPTIONAL) unset(_CMAKE_PROCESSING_LANGUAGE) +if(CMAKE_Fortran_COMPILER_ARCHITECTURE_ID) + set(_SET_CMAKE_Fortran_COMPILER_ARCHITECTURE_ID + "set(CMAKE_Fortran_COMPILER_ARCHITECTURE_ID ${CMAKE_Fortran_COMPILER_ARCHITECTURE_ID})") +else() + set(_SET_CMAKE_Fortran_COMPILER_ARCHITECTURE_ID "") +endif() + if(MSVC_Fortran_ARCHITECTURE_ID) set(SET_MSVC_Fortran_ARCHITECTURE_ID "set(MSVC_Fortran_ARCHITECTURE_ID ${MSVC_Fortran_ARCHITECTURE_ID})") diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in index d521190..2e34cbb 100644 --- a/Modules/CMakeFortranCompiler.cmake.in +++ b/Modules/CMakeFortranCompiler.cmake.in @@ -6,6 +6,7 @@ set(CMAKE_Fortran_COMPILER_WRAPPER "@CMAKE_Fortran_COMPILER_WRAPPER@") set(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@") set(CMAKE_Fortran_SIMULATE_ID "@CMAKE_Fortran_SIMULATE_ID@") set(CMAKE_Fortran_SIMULATE_VERSION "@CMAKE_Fortran_SIMULATE_VERSION@") + at _SET_CMAKE_Fortran_COMPILER_ARCHITECTURE_ID@ @SET_MSVC_Fortran_ARCHITECTURE_ID@ set(CMAKE_AR "@CMAKE_AR@") set(CMAKE_Fortran_COMPILER_AR "@CMAKE_Fortran_COMPILER_AR@") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fea7d69ddeedd72f6a1f8cec5a011696dec832db commit fea7d69ddeedd72f6a1f8cec5a011696dec832db Author: Norbert Lange AuthorDate: Tue Jun 27 22:50:04 2017 +0200 Commit: Brad King CommitDate: Thu Jun 29 13:25:57 2017 -0400 Store CMAKE_ASM_COMPILER_VERSION persistently We already do this for other languages like C and CXX. diff --git a/Modules/CMakeASMCompiler.cmake.in b/Modules/CMakeASMCompiler.cmake.in index 7b94d0f..2decc32 100644 --- a/Modules/CMakeASMCompiler.cmake.in +++ b/Modules/CMakeASMCompiler.cmake.in @@ -7,8 +7,10 @@ set(CMAKE_ASM at ASM_DIALECT@_COMPILER_RANLIB "@_CMAKE_ASM_COMPILER_RANLIB@") set(CMAKE_LINKER "@CMAKE_LINKER@") set(CMAKE_ASM at ASM_DIALECT@_COMPILER_LOADED 1) set(CMAKE_ASM at ASM_DIALECT@_COMPILER_ID "@_CMAKE_ASM_COMPILER_ID@") +set(CMAKE_ASM at ASM_DIALECT@_COMPILER_VERSION "@_CMAKE_ASM_COMPILER_VERSION@") set(CMAKE_ASM at ASM_DIALECT@_COMPILER_ENV_VAR "@_CMAKE_ASM_COMPILER_ENV_VAR@") set(CMAKE_ASM at ASM_DIALECT@_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) set(CMAKE_ASM at ASM_DIALECT@_LINKER_PREFERENCE 0) + at CMAKE_ASM_COMPILER_CUSTOM_CODE@ diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 34154b4..1ed4e20 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -106,7 +106,13 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) endif() if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) - message(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}") + if(CMAKE_ASM${ASM_DIALECT}_COMPILER_VERSION) + set(_version " ${CMAKE_ASM${ASM_DIALECT}_COMPILER_VERSION}") + else() + set(_version "") + endif() + message(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}${_version}") + unset(_version) else() message(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown") endif() @@ -152,20 +158,30 @@ else() message(STATUS "Didn't find assembler") endif() - -set(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}") -set(_CMAKE_ASM_COMPILER_ID "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}") -set(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}") -set(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}") -set(_CMAKE_ASM_COMPILER_AR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_AR}") -set(_CMAKE_ASM_COMPILER_RANLIB "${CMAKE_ASM${ASM_DIALECT}_COMPILER_RANLIB}") +foreach(_var + COMPILER + COMPILER_ID + COMPILER_ARG1 + COMPILER_ENV_VAR + COMPILER_AR + COMPILER_RANLIB + COMPILER_VERSION + ) + set(_CMAKE_ASM_${_var} "${CMAKE_ASM${ASM_DIALECT}_${_var}}") +endforeach() # configure variables set in this file for fast reload later on configure_file(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in ${CMAKE_PLATFORM_INFO_DIR}/CMakeASM${ASM_DIALECT}Compiler.cmake @ONLY) -set(_CMAKE_ASM_COMPILER) -set(_CMAKE_ASM_COMPILER_ARG1) -set(_CMAKE_ASM_COMPILER_ENV_VAR) -set(_CMAKE_ASM_COMPILER_AR) -set(_CMAKE_ASM_COMPILER_RANLIB) +foreach(_var + COMPILER + COMPILER_ID + COMPILER_ARG1 + COMPILER_ENV_VAR + COMPILER_AR + COMPILER_RANLIB + COMPILER_VERSION + ) + unset(_CMAKE_ASM_${_var}) +endforeach() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2a8b5cea6baa0508f9935ac2327fcf63f52c21a commit d2a8b5cea6baa0508f9935ac2327fcf63f52c21a Author: Norbert Lange AuthorDate: Thu Jun 15 14:49:28 2017 +0200 Commit: Brad King CommitDate: Thu Jun 29 13:25:57 2017 -0400 CMakeDetermineASMCompiler: Fix small copy-paste mistake GNU is not a vendor of IAR. diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 87c6b28..34154b4 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -84,7 +84,7 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI "-h") set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI "Texas Instruments") - list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU IAR) + list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS IAR) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_IAR ) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_IAR "IAR Assembler") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2112257df2f255d8aa3584af468b7d30ff90e8c commit a2112257df2f255d8aa3584af468b7d30ff90e8c Author: Brad King AuthorDate: Thu Jun 29 13:18:33 2017 -0400 Commit: Brad King CommitDate: Thu Jun 29 13:25:19 2017 -0400 Add infrastructure to use language extensions without any standard When `_STANDARD` is not set we will not add any language standard flags. If `_EXTENSIONS` is not OFF then our default is supposed to be ON. In order to support compilers that do not enable their extensions by default, check a `CMAKE__EXTENSION_COMPILE_OPTION` variable for an extensions flag to use without any language standard. Suggested-by: Norbert Lange diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 54e76b2..28ed325 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1498,6 +1498,16 @@ void cmLocalGenerator::AddCompilerRequirementFlag( std::string stdProp = lang + "_STANDARD"; const char* standardProp = target->GetProperty(stdProp); if (!standardProp) { + if (ext) { + // No language standard is specified and extensions are not disabled. + // Check if this compiler needs a flag to enable extensions. + std::string const option_flag = + "CMAKE_" + lang + "_EXTENSION_COMPILE_OPTION"; + if (const char* opt = + target->Target->GetMakefile()->GetDefinition(option_flag)) { + this->AppendFlagEscape(flags, opt); + } + } return; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8cd28bb0e54f962ab2b189f1b7196c2b014129a7 commit 8cd28bb0e54f962ab2b189f1b7196c2b014129a7 Author: Brad King AuthorDate: Thu Jun 29 13:16:45 2017 -0400 Commit: Brad King CommitDate: Thu Jun 29 13:22:32 2017 -0400 cmLocalGenerator: Switch order of _{EXTENSIONS,STANDARD} check diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f2c4644..54e76b2 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1488,11 +1488,6 @@ void cmLocalGenerator::AddCompilerRequirementFlag( // This compiler has no notion of language standard levels. return; } - std::string stdProp = lang + "_STANDARD"; - const char* standardProp = target->GetProperty(stdProp); - if (!standardProp) { - return; - } std::string extProp = lang + "_EXTENSIONS"; bool ext = true; if (const char* extPropValue = target->GetProperty(extProp)) { @@ -1500,6 +1495,11 @@ void cmLocalGenerator::AddCompilerRequirementFlag( ext = false; } } + std::string stdProp = lang + "_STANDARD"; + const char* standardProp = target->GetProperty(stdProp); + if (!standardProp) { + return; + } std::string const type = ext ? "EXTENSION" : "STANDARD"; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0fc2d78ee97cb0ba73040be353bdedd4fc03c2b9 commit 0fc2d78ee97cb0ba73040be353bdedd4fc03c2b9 Author: Brad King AuthorDate: Thu Jun 29 13:14:53 2017 -0400 Commit: Brad King CommitDate: Thu Jun 29 13:22:32 2017 -0400 cmLocalGenerator: Simplify logic for language standard or extension flag diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 8e00303..f2c4644 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1494,15 +1494,15 @@ void cmLocalGenerator::AddCompilerRequirementFlag( return; } std::string extProp = lang + "_EXTENSIONS"; - std::string type = "EXTENSION"; bool ext = true; if (const char* extPropValue = target->GetProperty(extProp)) { if (cmSystemTools::IsOff(extPropValue)) { ext = false; - type = "STANDARD"; } } + std::string const type = ext ? "EXTENSION" : "STANDARD"; + if (target->GetPropertyAsBool(lang + "_STANDARD_REQUIRED")) { std::string option_flag = "CMAKE_" + lang + standardProp + "_" + type + "_COMPILE_OPTION"; ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 1 + Help/release/dev/iar.rst | 4 + .../CMAKE_LANG_COMPILER_ARCHITECTURE_ID.rst | 8 ++ Help/variable/CMAKE_LANG_COMPILER_ID.rst | 1 + Modules/CMakeASMCompiler.cmake.in | 3 + Modules/CMakeCCompiler.cmake.in | 1 + Modules/CMakeCXXCompiler.cmake.in | 1 + Modules/CMakeDetermineASMCompiler.cmake | 69 ++++++++++++---- Modules/CMakeDetermineCCompiler.cmake | 7 ++ Modules/CMakeDetermineCXXCompiler.cmake | 10 +++ Modules/CMakeDetermineCompilerId.cmake | 4 + Modules/CMakeDetermineFortranCompiler.cmake | 7 ++ Modules/CMakeFortranCompiler.cmake.in | 1 + Modules/CMakePlatformId.h.in | 10 +++ Modules/Compiler/IAR-ASM.cmake | 17 ++-- Modules/Compiler/IAR-C.cmake | 43 +++++----- Modules/Compiler/IAR-CXX.cmake | 52 +++++++----- Modules/Compiler/IAR-DetermineCompiler.cmake | 18 +++- Modules/Compiler/IAR-FindBinUtils.cmake | 54 ++++++++++++ Modules/Compiler/IAR.cmake | 87 +++++++++++++------- Modules/FindDoxygen.cmake | 14 +++- Source/cmCTest.cxx | 3 +- Source/cmLocalGenerator.cxx | 24 ++++-- Source/cmVS10CLFlagTable.h | 3 +- Source/cmVS11CLFlagTable.h | 3 +- Source/cmVS12CLFlagTable.h | 3 +- Source/cmVS140CLFlagTable.h | 3 +- Source/cmVS141CLFlagTable.h | 3 +- 28 files changed, 349 insertions(+), 105 deletions(-) create mode 100644 Help/release/dev/iar.rst create mode 100644 Help/variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID.rst create mode 100644 Modules/Compiler/IAR-FindBinUtils.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jul 7 08:45:18 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 7 Jul 2017 08:45:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc5-19-g658ecc1 Message-ID: <20170707124518.B314EFA0EF@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 658ecc1a7cab54aeb738a00e7fee24aa4bd18adb (commit) via 796b8fcb14072bef72fe324015c0a62e2006b0db (commit) from cf9a994d9a53db02d8ddaa2bf3f9da0bc8f6f19b (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/FindDoxygen.cmake | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Jul 8 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 8 Jul 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-244-g0ba4a4c Message-ID: <20170708040504.57382FAD93@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 0ba4a4c36fd8da36b3f4691ea74dab6fc6372704 (commit) from 2ef3527dfe03ac6e5f5c49d13d99b2304381b0a8 (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=0ba4a4c36fd8da36b3f4691ea74dab6fc6372704 commit 0ba4a4c36fd8da36b3f4691ea74dab6fc6372704 Author: Kitware Robot AuthorDate: Sat Jul 8 00:01:05 2017 -0400 Commit: Kitware Robot CommitDate: Sat Jul 8 00:01:05 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7495ba5..a0f8e56 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 20170707) +set(CMake_VERSION_PATCH 20170708) #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 Jul 9 00:05:13 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 9 Jul 2017 00:05:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-245-ge09252f Message-ID: <20170709040514.09D6BFB270@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 e09252f5d220965b07069fc00edf8658fc8198f1 (commit) from 0ba4a4c36fd8da36b3f4691ea74dab6fc6372704 (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=e09252f5d220965b07069fc00edf8658fc8198f1 commit e09252f5d220965b07069fc00edf8658fc8198f1 Author: Kitware Robot AuthorDate: Sun Jul 9 00:01:09 2017 -0400 Commit: Kitware Robot CommitDate: Sun Jul 9 00:01:09 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a0f8e56..a4f9ed9 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 20170708) +set(CMake_VERSION_PATCH 20170709) #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 Jul 10 00:05:14 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 10 Jul 2017 00:05:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-246-gfc58819 Message-ID: <20170710040514.89878FADDD@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 fc58819150a126d87bf17ad812bb6f62f28ae42b (commit) from e09252f5d220965b07069fc00edf8658fc8198f1 (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=fc58819150a126d87bf17ad812bb6f62f28ae42b commit fc58819150a126d87bf17ad812bb6f62f28ae42b Author: Kitware Robot AuthorDate: Mon Jul 10 00:01:09 2017 -0400 Commit: Kitware Robot CommitDate: Mon Jul 10 00:01:09 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a4f9ed9..2d86e33 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 20170709) +set(CMake_VERSION_PATCH 20170710) #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 Jul 10 10:25:11 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 10 Jul 2017 10:25:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-255-g1fda77d Message-ID: <20170710142511.64E69FAD78@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 1fda77d45565c3a819e6149597c3a194d9ccd0bb (commit) via 41be8a739e862995e56aad33e2383c2278a91b77 (commit) via 4bf96ed9b01a31e0c91e101b913fa5eb64b99432 (commit) via 9eaf0fea2824b2e0b767915dec25deed9552905a (commit) via 9b9a57e16b22769b612d4bbe45e9b7cb936be690 (commit) via 916b7d519557d4d11e73e66c3e9c95cdacb655ba (commit) via e7730d78b44ca90aa8ee6d1f34495cd416888bce (commit) via 9a34e95a41fff294a7fcd452cb3e78fd4ff021aa (commit) via 58f47448210bf3fd3121bf91f74eb893ba9d034c (commit) from fc58819150a126d87bf17ad812bb6f62f28ae42b (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=1fda77d45565c3a819e6149597c3a194d9ccd0bb commit 1fda77d45565c3a819e6149597c3a194d9ccd0bb Merge: 41be8a7 9b9a57e Author: Brad King AuthorDate: Mon Jul 10 10:23:56 2017 -0400 Commit: Brad King CommitDate: Mon Jul 10 10:23:56 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=41be8a739e862995e56aad33e2383c2278a91b77 commit 41be8a739e862995e56aad33e2383c2278a91b77 Merge: 4bf96ed 9a34e95 Author: Brad King AuthorDate: Mon Jul 10 14:21:47 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jul 10 10:22:00 2017 -0400 Merge topic 'autogen-no-generated-files' 9a34e95a Autogen: Skip generated files for compatibility with CMake 3.8 Acked-by: Kitware Robot Merge-request: !1033 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bf96ed9b01a31e0c91e101b913fa5eb64b99432 commit 4bf96ed9b01a31e0c91e101b913fa5eb64b99432 Merge: 9eaf0fe e7730d7 Author: Brad King AuthorDate: Mon Jul 10 14:21:12 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jul 10 10:21:23 2017 -0400 Merge topic 'find_package-restore-considered-configs' e7730d78 find_package: Restore longer message when config files were considered Acked-by: Kitware Robot Merge-request: !1032 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9eaf0fea2824b2e0b767915dec25deed9552905a commit 9eaf0fea2824b2e0b767915dec25deed9552905a Merge: fc58819 58f4744 Author: Brad King AuthorDate: Mon Jul 10 14:20:26 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jul 10 10:21:00 2017 -0400 Merge topic 'indented_cmakedefine' 58f47448 configure_file: Add support for indented cmakedefine Acked-by: Kitware Robot Merge-request: !1024 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=58f47448210bf3fd3121bf91f74eb893ba9d034c commit 58f47448210bf3fd3121bf91f74eb893ba9d034c Author: Sylvain Joubert AuthorDate: Tue Jul 4 12:00:02 2017 +0200 Commit: Sylvain Joubert CommitDate: Tue Jul 4 12:00:02 2017 +0200 configure_file: Add support for indented cmakedefine Optional spaces and/or tabs are now understood between the '#' character and the 'cmakedefine'/'cmakedefine01' words. This indentation is preserved in the output lines. Fixes: #13037 diff --git a/Help/command/configure_file.rst b/Help/command/configure_file.rst index 4304f09..75ec441 100644 --- a/Help/command/configure_file.rst +++ b/Help/command/configure_file.rst @@ -30,6 +30,18 @@ a false constant by the :command:`if` command. The "..." content on the line after the variable name, if any, is processed as above. Input file lines of the form ``#cmakedefine01 VAR`` will be replaced with either ``#define VAR 1`` or ``#define VAR 0`` similarly. +The result lines (with the exception of the ``#undef`` comments) can be +indented using spaces and/or tabs between the ``#`` character +and the ``cmakedefine`` or ``cmakedefine01`` words. This whitespace +indentation will be preserved in the output lines:: + + # cmakedefine VAR + # cmakedefine01 VAR + +will be replaced, if ``VAR`` is defined, with:: + + # define VAR + # define VAR 1 If the input file is modified the build system will re-run CMake to re-configure the file and generate the build system again. diff --git a/Help/release/dev/indented_cmakedefine.rst b/Help/release/dev/indented_cmakedefine.rst new file mode 100644 index 0000000..fd28b25 --- /dev/null +++ b/Help/release/dev/indented_cmakedefine.rst @@ -0,0 +1,7 @@ +indented_cmakedefine +-------------------- + +* The :command:`configure_file` command learned to support indented + ``# cmakedefine`` and ``# cmakedefine01``. Spaces and/or tabs between + the ``#`` character and the ``cmakedefine``/``cmakedefine01`` words + are now understood and preserved in the output. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 4a0cab3..195cd6b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -66,8 +66,8 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, this->DefineFlags = " "; - this->cmDefineRegex.compile("#cmakedefine[ \t]+([A-Za-z_0-9]*)"); - this->cmDefine01Regex.compile("#cmakedefine01[ \t]+([A-Za-z_0-9]*)"); + this->cmDefineRegex.compile("#([ \t]*)cmakedefine[ \t]+([A-Za-z_0-9]*)"); + this->cmDefine01Regex.compile("#([ \t]*)cmakedefine01[ \t]+([A-Za-z_0-9]*)"); this->cmAtVarRegex.compile("(@[A-Za-z_0-9/.+-]+@)"); this->cmNamedCurly.compile("^[A-Za-z0-9/_.+-]+{"); @@ -3433,18 +3433,22 @@ void cmMakefile::ConfigureString(const std::string& input, std::string& output, // Replace #cmakedefine instances. if (this->cmDefineRegex.find(line)) { - const char* def = this->GetDefinition(this->cmDefineRegex.match(1)); + const char* def = this->GetDefinition(this->cmDefineRegex.match(2)); if (!cmSystemTools::IsOff(def)) { - cmSystemTools::ReplaceString(line, "#cmakedefine", "#define"); + const std::string indentation = this->cmDefineRegex.match(1); + cmSystemTools::ReplaceString(line, "#" + indentation + "cmakedefine", + "#" + indentation + "define"); output += line; } else { output += "/* #undef "; - output += this->cmDefineRegex.match(1); + output += this->cmDefineRegex.match(2); output += " */"; } } else if (this->cmDefine01Regex.find(line)) { - const char* def = this->GetDefinition(this->cmDefine01Regex.match(1)); - cmSystemTools::ReplaceString(line, "#cmakedefine01", "#define"); + const std::string indentation = this->cmDefine01Regex.match(1); + const char* def = this->GetDefinition(this->cmDefine01Regex.match(2)); + cmSystemTools::ReplaceString(line, "#" + indentation + "cmakedefine01", + "#" + indentation + "define"); output += line; if (!cmSystemTools::IsOff(def)) { output += " 1"; diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index 075faa7..8537cd9 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -356,6 +356,8 @@ endwhile() set(SHOULD_BE_ZERO ) set(SHOULD_BE_ONE 1) +set(SHOULD_BE_ZERO_AND_INDENTED ) +set(SHOULD_BE_ONE_AND_INDENTED 1) # test elseif functionality, the mess below tries to catch problem # of clauses being executed early or late etc diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx index 3b09229..ca39870 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -261,6 +261,12 @@ int main() cmPassed("ONE_VAR is defined."); #endif +#ifndef ONE_VAR_AND_INDENTED + cmFailed("cmakedefine is broken, ONE_VAR_AND_INDENTED is not defined."); +#else + cmPassed("ONE_VAR_AND_INDENTED is defined."); +#endif + #ifndef ONE_VAR_IS_DEFINED cmFailed("cmakedefine, SET or VARIABLE_REQUIRES is broken, " "ONE_VAR_IS_DEFINED is not defined."); @@ -274,6 +280,12 @@ int main() cmPassed("ZERO_VAR is not defined."); #endif +#ifdef ZERO_VAR_AND_INDENTED + cmFailed("cmakedefine is broken, ZERO_VAR_AND_INDENTED is defined."); +#else + cmPassed("ZERO_VAR_AND_INDENTED is not defined."); +#endif + #ifndef STRING_VAR cmFailed("the CONFIGURE_FILE command is broken, STRING_VAR is not defined."); #else @@ -1030,6 +1042,16 @@ int main() } else { cmFailed("cmakedefine01 is not working for 1"); } + if (SHOULD_BE_ZERO_AND_INDENTED == 0) { + cmPassed("cmakedefine01 is working for 0 and indented"); + } else { + cmFailed("cmakedefine01 is not working for 0 and indented"); + } + if (SHOULD_BE_ONE_AND_INDENTED == 1) { + cmPassed("cmakedefine01 is working for 1 and indented"); + } else { + cmFailed("cmakedefine01 is not working for 1 and indented"); + } #ifdef FORCE_TEST cmFailed("CMake SET CACHE FORCE"); #else diff --git a/Tests/Complex/VarTests.cmake b/Tests/Complex/VarTests.cmake index 8be59be..9761986 100644 --- a/Tests/Complex/VarTests.cmake +++ b/Tests/Complex/VarTests.cmake @@ -2,6 +2,7 @@ # Test SET # set (ZERO_VAR 0) +set (ZERO_VAR_AND_INDENTED 0) set (ZERO_VAR2 0) if(ZERO_VAR) @@ -11,6 +12,7 @@ else() endif() set(ONE_VAR 1) +set(ONE_VAR_AND_INDENTED 1) set(ONE_VAR2 1) set(STRING_VAR "CMake is great" CACHE STRING "test a cache variable") diff --git a/Tests/Complex/cmTestConfigure.h.in b/Tests/Complex/cmTestConfigure.h.in index d7424b1..72317bc 100644 --- a/Tests/Complex/cmTestConfigure.h.in +++ b/Tests/Complex/cmTestConfigure.h.in @@ -1,8 +1,10 @@ // Test SET, VARIABLE_REQUIRES #cmakedefine ONE_VAR +# cmakedefine ONE_VAR_AND_INDENTED #cmakedefine ONE_VAR_IS_DEFINED #cmakedefine ZERO_VAR +# cmakedefine ZERO_VAR_AND_INDENTED #define STRING_VAR "${STRING_VAR}" @@ -32,6 +34,8 @@ #cmakedefine01 SHOULD_BE_ZERO #cmakedefine01 SHOULD_BE_ONE +# cmakedefine01 SHOULD_BE_ZERO_AND_INDENTED +# cmakedefine01 SHOULD_BE_ONE_AND_INDENTED // Needed to check for files #define BINARY_DIR "${Complex_BINARY_DIR}" diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index 1b833b2..4cd0bae 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -313,6 +313,8 @@ endwhile() set(SHOULD_BE_ZERO ) set(SHOULD_BE_ONE 1) +set(SHOULD_BE_ZERO_AND_INDENTED ) +set(SHOULD_BE_ONE_AND_INDENTED 1) # test elseif functionality, the mess below tries to catch problem # of clauses being executed early or late etc diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index 9e4eaad..9b94962 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -261,6 +261,12 @@ int main() cmPassed("ONE_VAR is defined."); #endif +#ifndef ONE_VAR_AND_INDENTED + cmFailed("cmakedefine is broken, ONE_VAR_AND_INDENTED is not defined."); +#else + cmPassed("ONE_VAR_AND_INDENTED is defined."); +#endif + #ifndef ONE_VAR_IS_DEFINED cmFailed("cmakedefine, SET or VARIABLE_REQUIRES is broken, " "ONE_VAR_IS_DEFINED is not defined."); @@ -274,6 +280,12 @@ int main() cmPassed("ZERO_VAR is not defined."); #endif +#ifdef ZERO_VAR_AND_INDENTED + cmFailed("cmakedefine is broken, ZERO_VAR_AND_INDENTED is defined."); +#else + cmPassed("ZERO_VAR_AND_INDENTED is not defined."); +#endif + #ifndef STRING_VAR cmFailed("the CONFIGURE_FILE command is broken, STRING_VAR is not defined."); #else @@ -1030,6 +1042,16 @@ int main() } else { cmFailed("cmakedefine01 is not working for 1"); } + if (SHOULD_BE_ZERO_AND_INDENTED == 0) { + cmPassed("cmakedefine01 is working for 0 and indented"); + } else { + cmFailed("cmakedefine01 is not working for 0 and indented"); + } + if (SHOULD_BE_ONE_AND_INDENTED == 1) { + cmPassed("cmakedefine01 is working for 1 and indented"); + } else { + cmFailed("cmakedefine01 is not working for 1 and indented"); + } #ifdef FORCE_TEST cmFailed("CMake SET CACHE FORCE"); #else diff --git a/Tests/ComplexOneConfig/VarTests.cmake b/Tests/ComplexOneConfig/VarTests.cmake index 7dd8519..42afd19 100644 --- a/Tests/ComplexOneConfig/VarTests.cmake +++ b/Tests/ComplexOneConfig/VarTests.cmake @@ -2,6 +2,7 @@ # Test SET # set (ZERO_VAR 0) +set (ZERO_VAR_AND_INDENTED 0) set (ZERO_VAR2 0) if(ZERO_VAR) @@ -11,6 +12,7 @@ else() endif() set(ONE_VAR 1) +set(ONE_VAR_AND_INDENTED 1) set(ONE_VAR2 1) set(STRING_VAR "CMake is great" CACHE STRING "test a cache variable") diff --git a/Tests/ComplexOneConfig/cmTestConfigure.h.in b/Tests/ComplexOneConfig/cmTestConfigure.h.in index d7424b1..72317bc 100644 --- a/Tests/ComplexOneConfig/cmTestConfigure.h.in +++ b/Tests/ComplexOneConfig/cmTestConfigure.h.in @@ -1,8 +1,10 @@ // Test SET, VARIABLE_REQUIRES #cmakedefine ONE_VAR +# cmakedefine ONE_VAR_AND_INDENTED #cmakedefine ONE_VAR_IS_DEFINED #cmakedefine ZERO_VAR +# cmakedefine ZERO_VAR_AND_INDENTED #define STRING_VAR "${STRING_VAR}" @@ -32,6 +34,8 @@ #cmakedefine01 SHOULD_BE_ZERO #cmakedefine01 SHOULD_BE_ONE +# cmakedefine01 SHOULD_BE_ZERO_AND_INDENTED +# cmakedefine01 SHOULD_BE_ONE_AND_INDENTED // Needed to check for files #define BINARY_DIR "${Complex_BINARY_DIR}" ----------------------------------------------------------------------- Summary of changes: Help/command/configure_file.rst | 12 +++++++++++ Help/release/dev/indented_cmakedefine.rst | 7 +++++++ Source/cmFindPackageCommand.cxx | 3 ++- Source/cmMakefile.cxx | 18 +++++++++------- Source/cmQtAutoGeneratorInitializer.cxx | 7 +++++++ Tests/Complex/CMakeLists.txt | 2 ++ Tests/Complex/Executable/complex.cxx | 22 ++++++++++++++++++++ Tests/Complex/VarTests.cmake | 2 ++ Tests/Complex/cmTestConfigure.h.in | 4 ++++ Tests/ComplexOneConfig/CMakeLists.txt | 2 ++ Tests/ComplexOneConfig/Executable/complex.cxx | 22 ++++++++++++++++++++ Tests/ComplexOneConfig/VarTests.cmake | 2 ++ Tests/ComplexOneConfig/cmTestConfigure.h.in | 4 ++++ Tests/QtAutogen/mocDepends/CMakeLists.txt | 2 ++ Tests/QtAutogen/mocRerun/CMakeLists.txt | 1 + Tests/RunCMake/find_package/RunCMakeTest.cmake | 2 ++ .../RunCMake/find_package/SetFoundFALSE-stderr.txt | 9 ++++++++ .../RunCMake/find_package/SetFoundFALSE-stdout.txt | 1 - .../VersionedA-1/VersionedAConfig.cmake | 0 .../VersionedA-1/VersionedAConfigVersion.cmake | 4 ++++ .../VersionedA-2/VersionedAConfig.cmake | 0 .../VersionedA-2/VersionedAConfigVersion.cmake} | 3 +-- .../RunCMake/find_package/WrongVersion-stderr.txt | 11 ++++++++++ Tests/RunCMake/find_package/WrongVersion.cmake | 2 ++ .../find_package/WrongVersionConfig-stderr.txt | 11 ++++++++++ .../RunCMake/find_package/WrongVersionConfig.cmake | 2 ++ 26 files changed, 144 insertions(+), 11 deletions(-) create mode 100644 Help/release/dev/indented_cmakedefine.rst create mode 100644 Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt delete mode 100644 Tests/RunCMake/find_package/SetFoundFALSE-stdout.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/VersionedA-1/VersionedAConfig.cmake (100%) create mode 100644 Tests/RunCMake/find_package/VersionedA-1/VersionedAConfigVersion.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/VersionedA-2/VersionedAConfig.cmake (100%) copy Tests/{FindPackageTest/lib/zot-2.0/zot-config-version.cmake => RunCMake/find_package/VersionedA-2/VersionedAConfigVersion.cmake} (77%) create mode 100644 Tests/RunCMake/find_package/WrongVersion-stderr.txt create mode 100644 Tests/RunCMake/find_package/WrongVersion.cmake create mode 100644 Tests/RunCMake/find_package/WrongVersionConfig-stderr.txt create mode 100644 Tests/RunCMake/find_package/WrongVersionConfig.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jul 10 10:25:11 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 10 Jul 2017 10:25:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc5-23-g9b9a57e Message-ID: <20170710142511.DCEF9FAD79@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 9b9a57e16b22769b612d4bbe45e9b7cb936be690 (commit) via 916b7d519557d4d11e73e66c3e9c95cdacb655ba (commit) via e7730d78b44ca90aa8ee6d1f34495cd416888bce (commit) via 9a34e95a41fff294a7fcd452cb3e78fd4ff021aa (commit) from 658ecc1a7cab54aeb738a00e7fee24aa4bd18adb (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/cmFindPackageCommand.cxx | 3 ++- Source/cmQtAutoGeneratorInitializer.cxx | 7 +++++++ Tests/QtAutogen/mocDepends/CMakeLists.txt | 2 ++ Tests/QtAutogen/mocRerun/CMakeLists.txt | 1 + Tests/RunCMake/find_package/RunCMakeTest.cmake | 2 ++ Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt | 9 +++++++++ Tests/RunCMake/find_package/SetFoundFALSE-stdout.txt | 1 - .../find_package/VersionedA-1/VersionedAConfig.cmake | 0 .../find_package/VersionedA-1/VersionedAConfigVersion.cmake | 4 ++++ .../find_package/VersionedA-2/VersionedAConfig.cmake | 0 .../VersionedA-2/VersionedAConfigVersion.cmake} | 3 +-- Tests/RunCMake/find_package/WrongVersion-stderr.txt | 11 +++++++++++ Tests/RunCMake/find_package/WrongVersion.cmake | 2 ++ Tests/RunCMake/find_package/WrongVersionConfig-stderr.txt | 11 +++++++++++ Tests/RunCMake/find_package/WrongVersionConfig.cmake | 2 ++ 15 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt delete mode 100644 Tests/RunCMake/find_package/SetFoundFALSE-stdout.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/VersionedA-1/VersionedAConfig.cmake (100%) create mode 100644 Tests/RunCMake/find_package/VersionedA-1/VersionedAConfigVersion.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/VersionedA-2/VersionedAConfig.cmake (100%) copy Tests/{FindPackageTest/lib/zot-2.0/zot-config-version.cmake => RunCMake/find_package/VersionedA-2/VersionedAConfigVersion.cmake} (77%) create mode 100644 Tests/RunCMake/find_package/WrongVersion-stderr.txt create mode 100644 Tests/RunCMake/find_package/WrongVersion.cmake create mode 100644 Tests/RunCMake/find_package/WrongVersionConfig-stderr.txt create mode 100644 Tests/RunCMake/find_package/WrongVersionConfig.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jul 11 00:05:09 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 11 Jul 2017 00:05:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-256-ge1476f9 Message-ID: <20170711040509.F3BB4FAE29@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 e1476f96189fd361045d68fca60978106d8ee6e1 (commit) from 1fda77d45565c3a819e6149597c3a194d9ccd0bb (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=e1476f96189fd361045d68fca60978106d8ee6e1 commit e1476f96189fd361045d68fca60978106d8ee6e1 Author: Kitware Robot AuthorDate: Tue Jul 11 00:01:08 2017 -0400 Commit: Kitware Robot CommitDate: Tue Jul 11 00:01:08 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 2d86e33..0a8e870 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 20170710) +set(CMake_VERSION_PATCH 20170711) #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 Jul 11 07:35:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 11 Jul 2017 07:35:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-261-g8d5ec21 Message-ID: <20170711113507.87748FAD2B@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 8d5ec219288b05379f19a23a0a0b4c8b76a17712 (commit) via 8f63f3495d30c38a953ac234f5d34578f7668b70 (commit) via 3cf267cfbf740e8c8dc28f132fff5042c7201d3d (commit) via 6848ff4ce54bedd5d0ef909f2bc08ab99dc0a513 (commit) via 6f131f49eee26dc5c342274f919e0ca1636182e5 (commit) from e1476f96189fd361045d68fca60978106d8ee6e1 (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=8d5ec219288b05379f19a23a0a0b4c8b76a17712 commit 8d5ec219288b05379f19a23a0a0b4c8b76a17712 Merge: 8f63f34 3cf267c Author: Brad King AuthorDate: Tue Jul 11 11:34:54 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jul 11 07:34:58 2017 -0400 Merge topic 'FindPkgConfig-rerun' 3cf267cf FindPkgConfig: do not always rerun pkg_check_modules() with 2 arguments Acked-by: Kitware Robot Merge-request: !1036 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f63f3495d30c38a953ac234f5d34578f7668b70 commit 8f63f3495d30c38a953ac234f5d34578f7668b70 Merge: e1476f9 6848ff4 Author: Brad King AuthorDate: Tue Jul 11 11:34:17 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jul 11 07:34:23 2017 -0400 Merge topic 'FindHDF5-windows' 6848ff4c FindHDF5: Define H5_BUILT_AS_DYNAMIC_LIB when using Windows DLLs 6f131f49 FindHDF5: Add support for HDF5_USE_STATIC_LIBRARIES on Windows Acked-by: Kitware Robot Merge-request: !1023 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3cf267cfbf740e8c8dc28f132fff5042c7201d3d commit 3cf267cfbf740e8c8dc28f132fff5042c7201d3d Author: Rolf Eike Beer AuthorDate: Fri Jul 7 22:38:52 2017 +0200 Commit: Brad King CommitDate: Mon Jul 10 11:16:51 2017 -0400 FindPkgConfig: do not always rerun pkg_check_modules() with 2 arguments Since commit v3.8.0-rc1~47^2 (FindPkgConfig: Recheck pkg-config on parameter change, 2017-01-17) calling `pkg_check_modules` always re-runs. The problem is that if there are only 2 arguments passed to `pkg_check_modules```, then `_module0` will be set and `ARGN` will be empty. When this is written to cache it will be stored as just the value of `_module0` without any semicolon, so on the next run this doesn't match the expected value and the search is rerun. Revise the logic to handle the case of empty `ARGN` separately. Fixes: #17003 diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index a5357fa..8ac1691 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -584,7 +584,9 @@ endmacro() macro(pkg_check_modules _prefix _module0) _pkgconfig_parse_options(_pkg_modules _pkg_is_required _pkg_is_silent _no_cmake_path _no_cmake_environment_path _imp_target "${_module0}" ${ARGN}) # check cached value - if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND OR NOT "${__pkg_config_arguments_${_prefix}}" STREQUAL "${_module0};${ARGN}") + if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND OR + (NOT "${ARGN}" STREQUAL "" AND NOT "${__pkg_config_arguments_${_prefix}}" STREQUAL "${_module0};${ARGN}") OR + ( "${ARGN}" STREQUAL "" AND NOT "${__pkg_config_arguments_${_prefix}}" STREQUAL "${_module0}")) _pkg_check_modules_internal("${_pkg_is_required}" "${_pkg_is_silent}" ${_no_cmake_path} ${_no_cmake_environment_path} ${_imp_target} "${_prefix}" ${_pkg_modules}) _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6848ff4ce54bedd5d0ef909f2bc08ab99dc0a513 commit 6848ff4ce54bedd5d0ef909f2bc08ab99dc0a513 Author: Kris Thielemans AuthorDate: Mon Jul 3 01:40:41 2017 +0100 Commit: Brad King CommitDate: Fri Jul 7 08:58:57 2017 -0400 FindHDF5: Define H5_BUILT_AS_DYNAMIC_LIB when using Windows DLLs When searching for shared libraries on Windows, add H5_BUILT_AS_DYNAMIC_LIB to HDF5_DEFINITIONS so that the header file knows how to dllimport the symbols. diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index acf7cd4..48d5de4 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -733,6 +733,9 @@ if( NOT HDF5_FOUND ) else() set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared) set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared) + if(WIN32) + list(APPEND HDF5_DEFINITIONS "-DH5_BUILT_AS_DYNAMIC_LIB") + endif() endif() find_library(HDF5_${LIB}_LIBRARY_DEBUG NAMES ${THIS_LIBRARY_SEARCH_DEBUG} @@ -794,6 +797,7 @@ if( NOT HDF5_FOUND ) set(HDF5_HL_FOUND True) endif() + _HDF5_remove_duplicates_from_beginning(HDF5_DEFINITIONS) _HDF5_remove_duplicates_from_beginning(HDF5_INCLUDE_DIRS) _HDF5_remove_duplicates_from_beginning(HDF5_LIBRARIES) _HDF5_remove_duplicates_from_beginning(HDF5_HL_LIBRARIES) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f131f49eee26dc5c342274f919e0ca1636182e5 commit 6f131f49eee26dc5c342274f919e0ca1636182e5 Author: Kris Thielemans AuthorDate: Mon Jul 3 01:38:55 2017 +0100 Commit: Brad King CommitDate: Fri Jul 7 08:58:37 2017 -0400 FindHDF5: Add support for HDF5_USE_STATIC_LIBRARIES on Windows Also add the `_D` suffix for debug libraries. diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 2d9d2a2..acf7cd4 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -23,7 +23,7 @@ # Fortran_HL. If the COMPONENTS argument is not given, the module will # attempt to find only the C bindings. # -# On UNIX systems, this module will read the variable +# This module will read the variable # HDF5_USE_STATIC_LIBRARIES to determine whether or not to prefer a # static link to a dynamic link for HDF5 and all of it's dependencies. # To use this feature, make sure that the HDF5_USE_STATIC_LIBRARIES @@ -551,8 +551,12 @@ if(NOT HDF5_FOUND) if("x${L}" MATCHES "hdf5") # hdf5 library set(_HDF5_SEARCH_OPTS_LOCAL ${_HDF5_SEARCH_OPTS}) - if(UNIX AND HDF5_USE_STATIC_LIBRARIES) - set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a) + if(HDF5_USE_STATIC_LIBRARIES) + if(WIN32) + set(_HDF5_SEARCH_NAMES_LOCAL lib${L}) + else() + set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a) + endif() endif() else() # external library @@ -579,8 +583,12 @@ if(NOT HDF5_FOUND) if("x${L}" MATCHES "hdf5") # hdf5 library set(_HDF5_SEARCH_OPTS_LOCAL ${_HDF5_SEARCH_OPTS}) - if(UNIX AND HDF5_USE_STATIC_LIBRARIES) - set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a) + if(HDF5_USE_STATIC_LIBRARIES) + if(WIN32) + set(_HDF5_SEARCH_NAMES_LOCAL lib${L}) + else() + set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a) + endif() endif() else() # external library @@ -712,18 +720,18 @@ if( NOT HDF5_FOUND ) # find the HDF5 libraries foreach(LIB IN LISTS HDF5_${__lang}_LIBRARY_NAMES) - if(UNIX AND HDF5_USE_STATIC_LIBRARIES) + if(HDF5_USE_STATIC_LIBRARIES) # According to bug 1643 on the CMake bug tracker, this is the # preferred method for searching for a static library. # See https://gitlab.kitware.com/cmake/cmake/issues/1643. We search # first for the full static library name, but fall back to a # generic search on the name if the static search fails. set( THIS_LIBRARY_SEARCH_DEBUG - lib${LIB}d.a lib${LIB}_debug.a ${LIB}d ${LIB}_debug - lib${LIB}d-static.a lib${LIB}_debug-static.a ${LIB}d-static ${LIB}_debug-static ) - set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB} lib${LIB}-static.a ${LIB}-static) + lib${LIB}d.a lib${LIB}_debug.a lib${LIB}d lib${LIB}_D lib${LIB}_debug + lib${LIB}d-static.a lib${LIB}_debug-static.a ${LIB}d-static ${LIB}_D-static ${LIB}_debug-static ) + set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a lib${LIB} lib${LIB}-static.a ${LIB}-static) else() - set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_debug ${LIB}d-shared ${LIB}_debug-shared) + set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared) set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared) endif() find_library(HDF5_${LIB}_LIBRARY_DEBUG @@ -749,18 +757,18 @@ if( NOT HDF5_FOUND ) if(FIND_HL) foreach(LIB IN LISTS HDF5_${__lang}_HL_LIBRARY_NAMES) - if(UNIX AND HDF5_USE_STATIC_LIBRARIES) + if(HDF5_USE_STATIC_LIBRARIES) # According to bug 1643 on the CMake bug tracker, this is the # preferred method for searching for a static library. # See https://gitlab.kitware.com/cmake/cmake/issues/1643. We search # first for the full static library name, but fall back to a # generic search on the name if the static search fails. set( THIS_LIBRARY_SEARCH_DEBUG - lib${LIB}d.a lib${LIB}_debug.a ${LIB}d ${LIB}_debug - lib${LIB}d-static.a lib${LIB}_debug-static.a ${LIB}d-static ${LIB}_debug-static ) - set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB} lib${LIB}-static.a ${LIB}-static) + lib${LIB}d.a lib${LIB}_debug.a lib${LIB}d lib${LIB}_D lib${LIB}_debug + lib${LIB}d-static.a lib${LIB}_debug-static.a lib${LIB}d-static lib${LIB}_D-static lib${LIB}_debug-static ) + set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB} lib${LIB}-static.a lib${LIB}-static) else() - set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_debug ${LIB}d-shared ${LIB}_debug-shared) + set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared) set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared) endif() find_library(HDF5_${LIB}_LIBRARY_DEBUG ----------------------------------------------------------------------- Summary of changes: Modules/FindHDF5.cmake | 42 +++++++++++++++++++++++++++--------------- Modules/FindPkgConfig.cmake | 4 +++- 2 files changed, 30 insertions(+), 16 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jul 11 07:45:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 11 Jul 2017 07:45:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-274-g107a92e Message-ID: <20170711114505.715B2FA6BF@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 107a92ea9a784d283b8d6d35a8c9bd93db8cd06d (commit) via 79e72f4b7c18cdb758e945daff0f9d201625c8f6 (commit) via de72d5dda6909093eb3fb6f8c0d53633e5bd9fdf (commit) via 970569a941a3259f5303a5090ed7bca7bb6e6d7e (commit) via a49b235db9036d5ec8c8535d2074c136eeb13254 (commit) via 59e52b30416b3c1731ec56207baad2ef0295580b (commit) via dd69dea3e7456cf8ea7e5d60362f6f8aa7aafa48 (commit) via 2644e4c9fcc747d750d6a522d2b4029b172902c3 (commit) via f7f721d40ae81b7c13afea3aa777b6be66af372c (commit) via ecac50e133c339e4b4611631333f0f07e438c99d (commit) via efaf987ad1569d5329fc60f5e1f47f3e8809bb69 (commit) via c7d81e16cb0f2023098ca64e33a4408b8ba80287 (commit) via 6b2bf5756bd01a955606f1963ad44bfde21f173f (commit) from 8d5ec219288b05379f19a23a0a0b4c8b76a17712 (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=107a92ea9a784d283b8d6d35a8c9bd93db8cd06d commit 107a92ea9a784d283b8d6d35a8c9bd93db8cd06d Merge: 79e72f4 dd69dea Author: Brad King AuthorDate: Tue Jul 11 07:42:09 2017 -0400 Commit: Brad King CommitDate: Tue Jul 11 07:42:09 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=79e72f4b7c18cdb758e945daff0f9d201625c8f6 commit 79e72f4b7c18cdb758e945daff0f9d201625c8f6 Merge: de72d5d 6b2bf57 Author: Brad King AuthorDate: Tue Jul 11 11:39:11 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jul 11 07:39:15 2017 -0400 Merge topic 'FindMFC-try-static' 6b2bf575 FindMFC: Check for static MFC variant Acked-by: Kitware Robot Merge-request: !1034 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de72d5dda6909093eb3fb6f8c0d53633e5bd9fdf commit de72d5dda6909093eb3fb6f8c0d53633e5bd9fdf Merge: 970569a efaf987 Author: Brad King AuthorDate: Tue Jul 11 11:38:50 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jul 11 07:38:54 2017 -0400 Merge topic 'file-LOCK-windows-message' efaf987a cmFileLockResult: Avoid allocation for Windows error message Acked-by: Kitware Robot Merge-request: !1035 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=970569a941a3259f5303a5090ed7bca7bb6e6d7e commit 970569a941a3259f5303a5090ed7bca7bb6e6d7e Merge: a49b235 2644e4c Author: Brad King AuthorDate: Tue Jul 11 11:37:13 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jul 11 07:37:42 2017 -0400 Merge topic 'vs-2017-choose-via-environment' 2644e4c9 VS: Choose VS 2017 instance via environment variable Acked-by: Kitware Robot Merge-request: !1030 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a49b235db9036d5ec8c8535d2074c136eeb13254 commit a49b235db9036d5ec8c8535d2074c136eeb13254 Merge: 59e52b3 ecac50e Author: Brad King AuthorDate: Tue Jul 11 11:35:26 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jul 11 07:35:56 2017 -0400 Merge topic 'autogen_skip_included' ecac50e1 Autogen: Skip included files on demand Acked-by: Kitware Robot Merge-request: !1039 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=59e52b30416b3c1731ec56207baad2ef0295580b commit 59e52b30416b3c1731ec56207baad2ef0295580b Merge: 8d5ec21 c7d81e1 Author: Brad King AuthorDate: Tue Jul 11 11:35:08 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jul 11 07:35:27 2017 -0400 Merge topic 'doc_configure_file' c7d81e16 Help: Explicitly state that some file generations are lazy Acked-by: Kitware Robot Merge-request: !1025 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efaf987ad1569d5329fc60f5e1f47f3e8809bb69 commit efaf987ad1569d5329fc60f5e1f47f3e8809bb69 Author: Iyyappa Murugandi AuthorDate: Thu May 4 15:07:45 2017 -0700 Commit: Brad King CommitDate: Fri Jul 7 14:04:20 2017 -0400 cmFileLockResult: Avoid allocation for Windows error message diff --git a/Source/cmFileLockResult.cxx b/Source/cmFileLockResult.cxx index a040705..9ca5d8a 100644 --- a/Source/cmFileLockResult.cxx +++ b/Source/cmFileLockResult.cxx @@ -5,6 +5,7 @@ #include #include +#define WINMSG_BUF_LEN (1024) cmFileLockResult cmFileLockResult::MakeOk() { return cmFileLockResult(OK, 0); @@ -53,18 +54,12 @@ std::string cmFileLockResult::GetOutputMessage() const case SYSTEM: #if defined(_WIN32) { - char* errorText = NULL; - - // http://stackoverflow.com/a/455533/2288008 - DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS; - ::FormatMessageA(flags, NULL, this->ErrorValue, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPSTR)&errorText, 0, NULL); - - if (errorText != NULL) { - const std::string message = errorText; - ::LocalFree(errorText); + char winmsg[WINMSG_BUF_LEN]; + DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS; + if (FormatMessageA(flags, NULL, this->ErrorValue, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)winmsg, WINMSG_BUF_LEN, NULL)) { + const std::string message = winmsg; return message; } else { return "Internal error (FormatMessageA failed)"; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c7d81e16cb0f2023098ca64e33a4408b8ba80287 commit c7d81e16cb0f2023098ca64e33a4408b8ba80287 Author: Sylvain Joubert AuthorDate: Tue Jul 4 13:10:19 2017 +0200 Commit: Sylvain Joubert CommitDate: Fri Jul 7 15:46:35 2017 +0200 Help: Explicitly state that some file generations are lazy Fixes: #16856 diff --git a/Help/command/configure_file.rst b/Help/command/configure_file.rst index 4304f09..6c60303 100644 --- a/Help/command/configure_file.rst +++ b/Help/command/configure_file.rst @@ -33,6 +33,8 @@ either ``#define VAR 1`` or ``#define VAR 0`` similarly. If the input file is modified the build system will re-run CMake to re-configure the file and generate the build system again. +The generated file is modified and its timestamp updated on subsequent +cmake runs only if its content is changed. The arguments are: diff --git a/Help/command/file.rst b/Help/command/file.rst index 7afb715..97466ff 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -306,8 +306,8 @@ from the input content to produce the output content. The options are: Exactly one ``CONTENT`` or ``INPUT`` option must be given. A specific ``OUTPUT`` file may be named by at most one invocation of ``file(GENERATE)``. -Generated files are modified on subsequent cmake runs only if their content -is changed. +Generated files are modified and their timestamp updated on subsequent cmake +runs only if their content is changed. Note also that ``file(GENERATE)`` does not create the output file until the generation phase. The output file will not yet have been written when the https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b2bf5756bd01a955606f1963ad44bfde21f173f commit 6b2bf5756bd01a955606f1963ad44bfde21f173f Author: Rich Chiodo AuthorDate: Thu Dec 15 12:22:14 2016 -0800 Commit: Brad King CommitDate: Thu Jul 6 11:28:20 2017 -0400 FindMFC: Check for static MFC variant Some CMake applications can set /MT without setting CMAKE_MFC_FLAG. This change lets FindMFC work in those situations. diff --git a/Modules/FindMFC.cmake b/Modules/FindMFC.cmake index 5c2dbbf..3baaf32 100644 --- a/Modules/FindMFC.cmake +++ b/Modules/FindMFC.cmake @@ -31,6 +31,7 @@ if(MFC_ATTEMPT_TRY_COMPILE) configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx) message(STATUS "Looking for MFC") + # Try both shared and static as the root project may have set the /MT flag try_compile(MFC_HAVE_MFC ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx @@ -38,6 +39,16 @@ if(MFC_ATTEMPT_TRY_COMPILE) -DCMAKE_MFC_FLAG:STRING=2 -DCOMPILE_DEFINITIONS:STRING=-D_AFXDLL OUTPUT_VARIABLE OUTPUT) + if(NOT MFC_HAVE_MFC) + configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx) + try_compile(MFC_HAVE_MFC + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx + CMAKE_FLAGS + -DCMAKE_MFC_FLAG:STRING=1 + OUTPUT_VARIABLE OUTPUT) + endif() if(MFC_HAVE_MFC) message(STATUS "Looking for MFC - found") set(MFC_HAVE_MFC 1 CACHE INTERNAL "Have MFC?") diff --git a/Tests/MFC/CMakeLists.txt.in b/Tests/MFC/CMakeLists.txt.in index e6bfabd..bf98e91 100644 --- a/Tests/MFC/CMakeLists.txt.in +++ b/Tests/MFC/CMakeLists.txt.in @@ -45,6 +45,11 @@ set(files set(CMAKE_MFC_FLAG "@CMAKE_MFC_FLAG_VALUE@") +FIND_PACKAGE(MFC) +IF (NOT MFC_FOUND) + MESSAGE(FATAL_ERROR "MFC Could not be found during the MFC test") +ENDIF() + if("${CMAKE_MFC_FLAG}" STREQUAL "1") msvc_link_to_static_crt() else() ----------------------------------------------------------------------- Summary of changes: Help/command/configure_file.rst | 2 + Help/command/file.rst | 4 +- Help/generator/Visual Studio 15 2017.rst | 12 ++++++ Modules/FindMFC.cmake | 11 ++++++ Source/cmFileLockResult.cxx | 19 ++++------ Source/cmQtAutoGenerators.cxx | 61 ++++++++++++++++-------------- Source/cmVSSetupHelper.cxx | 28 ++++++++++++++ Tests/MFC/CMakeLists.txt.in | 5 +++ 8 files changed, 100 insertions(+), 42 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jul 11 07:45:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 11 Jul 2017 07:45:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc5-27-gdd69dea Message-ID: <20170711114505.A060CFA6E1@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 dd69dea3e7456cf8ea7e5d60362f6f8aa7aafa48 (commit) via 2644e4c9fcc747d750d6a522d2b4029b172902c3 (commit) via f7f721d40ae81b7c13afea3aa777b6be66af372c (commit) via ecac50e133c339e4b4611631333f0f07e438c99d (commit) from 9b9a57e16b22769b612d4bbe45e9b7cb936be690 (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: Help/generator/Visual Studio 15 2017.rst | 12 ++++++ Source/cmQtAutoGenerators.cxx | 61 ++++++++++++++++-------------- Source/cmVSSetupHelper.cxx | 28 ++++++++++++++ 3 files changed, 73 insertions(+), 28 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jul 12 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 12 Jul 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-275-gfadcfd4 Message-ID: <20170712040504.9E220FAE54@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 fadcfd4b89aa36cfd9842ef2798ca7dffabb0ade (commit) from 107a92ea9a784d283b8d6d35a8c9bd93db8cd06d (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=fadcfd4b89aa36cfd9842ef2798ca7dffabb0ade commit fadcfd4b89aa36cfd9842ef2798ca7dffabb0ade Author: Kitware Robot AuthorDate: Wed Jul 12 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Wed Jul 12 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0a8e870..e6c3a5b 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 20170711) +set(CMake_VERSION_PATCH 20170712) #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 Jul 12 09:05:09 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 12 Jul 2017 09:05:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-285-ge63472a Message-ID: <20170712130509.2F7EEFAE0D@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 e63472abc597e87ea7e8ded6551cfe968db69095 (commit) via ff9321a18a94080e9b43800627cfcec02dad286f (commit) via 083a5cad0e7ad238005e2236364590e0eb1fb2dd (commit) via 702083384143c762b6cfcf936f81cc26321a62fd (commit) via e0fb3f314f0dcd2aa0ad2fd97fe3637f18747439 (commit) via 5cf9c3d0cc654ba1a84f8bd65edbd09945c909a4 (commit) via 80b905f8826cc8c281bdc9bfd600e22dcc759dbc (commit) via 1ae1b880a8e3297daf7f2c02ff2cb07e51bbe4a1 (commit) via cca8454ee5006e622c551630011f63f87a5c9748 (commit) via 3250b9a122a19a840f63868a244832c24528d54a (commit) from fadcfd4b89aa36cfd9842ef2798ca7dffabb0ade (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=e63472abc597e87ea7e8ded6551cfe968db69095 commit e63472abc597e87ea7e8ded6551cfe968db69095 Merge: ff9321a e0fb3f3 Author: Brad King AuthorDate: Wed Jul 12 13:00:38 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jul 12 09:00:43 2017 -0400 Merge topic 'android-fix-c++_shared' e0fb3f31 Android: Link to android_support with c++_shared Acked-by: Kitware Robot Merge-request: !1048 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff9321a18a94080e9b43800627cfcec02dad286f commit ff9321a18a94080e9b43800627cfcec02dad286f Merge: 083a5ca 5cf9c3d Author: Brad King AuthorDate: Wed Jul 12 12:59:16 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jul 12 08:59:26 2017 -0400 Merge topic 'vs-2017-sln-guid' 5cf9c3d0 VS: Add SolutionGuid to generated .sln files Acked-by: Kitware Robot Merge-request: !1042 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=083a5cad0e7ad238005e2236364590e0eb1fb2dd commit 083a5cad0e7ad238005e2236364590e0eb1fb2dd Merge: 7020833 80b905f Author: Brad King AuthorDate: Wed Jul 12 12:58:15 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jul 12 08:59:07 2017 -0400 Merge topic 'find_package-root-prefix-path-suffixes' 80b905f8 find_*: Honor PATH_SUFFIXES in PackageName_ROOT paths 1ae1b880 cmFindCommon: Drop unused FilterPaths method cca8454e cmFindCommon: Fix typo in PackageName_ROOT path label Acked-by: Kitware Robot Acked-by: Chuck Atkins Merge-request: !1044 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=702083384143c762b6cfcf936f81cc26321a62fd commit 702083384143c762b6cfcf936f81cc26321a62fd Merge: fadcfd4 3250b9a Author: Brad King AuthorDate: Wed Jul 12 12:57:59 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jul 12 08:58:36 2017 -0400 Merge topic 'bindexplib-revert-consts' 3250b9a1 bindexplib: Revert support for constants symbols Acked-by: Kitware Robot Merge-request: !1041 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0fb3f314f0dcd2aa0ad2fd97fe3637f18747439 commit e0fb3f314f0dcd2aa0ad2fd97fe3637f18747439 Author: Brad King AuthorDate: Wed Jul 12 08:29:08 2017 -0400 Commit: Brad King CommitDate: Wed Jul 12 08:39:42 2017 -0400 Android: Link to android_support with c++_shared The NDK has done this in `build/core/definitions.mk` since r13 (r12 and below do so only for c++_static). diff --git a/Modules/Platform/Android/ndk-stl-c++_shared.cmake b/Modules/Platform/Android/ndk-stl-c++_shared.cmake index f585adb..3389408 100644 --- a/Modules/Platform/Android/ndk-stl-c++_shared.cmake +++ b/Modules/Platform/Android/ndk-stl-c++_shared.cmake @@ -1,4 +1,5 @@ include(Platform/Android/ndk-stl-c++) macro(__android_stl lang) __android_stl_cxx(${lang} libc++_shared.so) + __android_stl_lib(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/libandroid_support.a" 0) endmacro() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cf9c3d0cc654ba1a84f8bd65edbd09945c909a4 commit 5cf9c3d0cc654ba1a84f8bd65edbd09945c909a4 Author: Brad King AuthorDate: Mon Jul 10 16:37:31 2017 -0400 Commit: Brad King CommitDate: Tue Jul 11 10:41:28 2017 -0400 VS: Add SolutionGuid to generated .sln files Visual Studio 2017 Update 3 adds a SolutionGuid to its `.sln` files. Fixes: #17041 diff --git a/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst b/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst index dcd2a4e..a316abe 100644 --- a/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst +++ b/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst @@ -26,4 +26,6 @@ and ExtensibilityAddIns by default. If you set the corresponding property, it will override the default section. For example, setting VS_GLOBAL_SECTION_POST_ExtensibilityGlobals will override the default contents of the ExtensibilityGlobals section, while keeping -ExtensibilityAddIns on its default. +ExtensibilityAddIns on its default. However, CMake will always +add a ``SolutionGuid`` to the ``ExtensibilityGlobals`` section +if it is not specified explicitly. diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index f067d8f..b155f5b 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -520,6 +520,7 @@ std::string cmGlobalVisualStudio7Generator::ConvertToSolutionPath( void cmGlobalVisualStudio7Generator::WriteSLNGlobalSections( std::ostream& fout, cmLocalGenerator* root) { + std::string const guid = this->GetGUID(root->GetProjectName() + ".sln"); bool extensibilityGlobalsOverridden = false; bool extensibilityAddInsOverridden = false; const std::vector propKeys = @@ -538,11 +539,14 @@ void cmGlobalVisualStudio7Generator::WriteSLNGlobalSections( } else continue; if (!name.empty()) { - if (name == "ExtensibilityGlobals" && sectionType == "postSolution") + bool addGuid = false; + if (name == "ExtensibilityGlobals" && sectionType == "postSolution") { + addGuid = true; extensibilityGlobalsOverridden = true; - else if (name == "ExtensibilityAddIns" && - sectionType == "postSolution") + } else if (name == "ExtensibilityAddIns" && + sectionType == "postSolution") { extensibilityAddInsOverridden = true; + } fout << "\tGlobalSection(" << name << ") = " << sectionType << "\n"; std::vector keyValuePairs; cmSystemTools::ExpandListArgument( @@ -557,15 +561,23 @@ void cmGlobalVisualStudio7Generator::WriteSLNGlobalSections( const std::string value = cmSystemTools::TrimWhitespace(itPair->substr(posEqual + 1)); fout << "\t\t" << key << " = " << value << "\n"; + if (key == "SolutionGuid") { + addGuid = false; + } } } + if (addGuid) { + fout << "\t\tSolutionGuid = {" << guid << "}\n"; + } fout << "\tEndGlobalSection\n"; } } } - if (!extensibilityGlobalsOverridden) + if (!extensibilityGlobalsOverridden) { fout << "\tGlobalSection(ExtensibilityGlobals) = postSolution\n" + << "\t\tSolutionGuid = {" << guid << "}\n" << "\tEndGlobalSection\n"; + } if (!extensibilityAddInsOverridden) fout << "\tGlobalSection(ExtensibilityAddIns) = postSolution\n" << "\tEndGlobalSection\n"; diff --git a/Tests/RunCMake/VSSolution/MorePost-check.cmake b/Tests/RunCMake/VSSolution/MorePost-check.cmake index 0f7e370..d239b28 100644 --- a/Tests/RunCMake/VSSolution/MorePost-check.cmake +++ b/Tests/RunCMake/VSSolution/MorePost-check.cmake @@ -1,5 +1,5 @@ parseGlobalSections(pre post MorePost) testGlobalSection(post TestSec2 Key1=Value1 "Key2=Value with spaces") testGlobalSection(post TestSec4 Key6=Value1 "Key7=Value with spaces" Key8=ValueWithoutSpaces) -testGlobalSection(post ExtensibilityGlobals) +testGlobalSection(post ExtensibilityGlobals "SolutionGuid={00000000-0000-0000-0000-000000000000}") testGlobalSection(post ExtensibilityAddIns) diff --git a/Tests/RunCMake/VSSolution/MorePre-check.cmake b/Tests/RunCMake/VSSolution/MorePre-check.cmake index 45e7419..89b3c7e 100644 --- a/Tests/RunCMake/VSSolution/MorePre-check.cmake +++ b/Tests/RunCMake/VSSolution/MorePre-check.cmake @@ -1,5 +1,5 @@ parseGlobalSections(pre post MorePre) testGlobalSection(pre TestSec1 Key1=Value1 "Key2=Value with spaces") testGlobalSection(pre TestSec3 Key3=Value1 "Key4=Value with spaces" Key5=ValueWithoutSpaces) -testGlobalSection(post ExtensibilityGlobals) +testGlobalSection(post ExtensibilityGlobals "SolutionGuid={00000000-0000-0000-0000-000000000000}") testGlobalSection(post ExtensibilityAddIns) diff --git a/Tests/RunCMake/VSSolution/OnePost-check.cmake b/Tests/RunCMake/VSSolution/OnePost-check.cmake index 6af5156..f7d3712 100644 --- a/Tests/RunCMake/VSSolution/OnePost-check.cmake +++ b/Tests/RunCMake/VSSolution/OnePost-check.cmake @@ -1,4 +1,4 @@ parseGlobalSections(pre post OnePost) testGlobalSection(post TestSec2 Key1=Value1 "Key2=Value with spaces") -testGlobalSection(post ExtensibilityGlobals) +testGlobalSection(post ExtensibilityGlobals "SolutionGuid={00000000-0000-0000-0000-000000000000}") testGlobalSection(post ExtensibilityAddIns) diff --git a/Tests/RunCMake/VSSolution/OnePre-check.cmake b/Tests/RunCMake/VSSolution/OnePre-check.cmake index 70b18b2..c5db139 100644 --- a/Tests/RunCMake/VSSolution/OnePre-check.cmake +++ b/Tests/RunCMake/VSSolution/OnePre-check.cmake @@ -1,4 +1,4 @@ parseGlobalSections(pre post OnePre) testGlobalSection(pre TestSec1 Key1=Value1 "Key2=Value with spaces") -testGlobalSection(post ExtensibilityGlobals) +testGlobalSection(post ExtensibilityGlobals "SolutionGuid={00000000-0000-0000-0000-000000000000}") testGlobalSection(post ExtensibilityAddIns) diff --git a/Tests/RunCMake/VSSolution/Override1-check.cmake b/Tests/RunCMake/VSSolution/Override1-check.cmake index a19e2e1..5905204 100644 --- a/Tests/RunCMake/VSSolution/Override1-check.cmake +++ b/Tests/RunCMake/VSSolution/Override1-check.cmake @@ -1,4 +1,4 @@ parseGlobalSections(pre post Override1) testGlobalSection(post TestSec Key2=Value2 Key3=Value3) -testGlobalSection(post ExtensibilityGlobals Key1=Value1) +testGlobalSection(post ExtensibilityGlobals Key1=Value1 "SolutionGuid={00000000-0000-0000-0000-000000000000}") testGlobalSection(post ExtensibilityAddIns) diff --git a/Tests/RunCMake/VSSolution/Override2-check.cmake b/Tests/RunCMake/VSSolution/Override2-check.cmake index d9656e1..c981ec0 100644 --- a/Tests/RunCMake/VSSolution/Override2-check.cmake +++ b/Tests/RunCMake/VSSolution/Override2-check.cmake @@ -1,4 +1,4 @@ parseGlobalSections(pre post Override2) testGlobalSection(pre TestSec Key2=Value2 Key3=Value3) -testGlobalSection(post ExtensibilityGlobals) +testGlobalSection(post ExtensibilityGlobals "SolutionGuid={00000000-0000-0000-0000-000000000000}") testGlobalSection(post ExtensibilityAddIns Key1=Value1) diff --git a/Tests/RunCMake/VSSolution/Override3-check.cmake b/Tests/RunCMake/VSSolution/Override3-check.cmake new file mode 100644 index 0000000..baee9ed --- /dev/null +++ b/Tests/RunCMake/VSSolution/Override3-check.cmake @@ -0,0 +1,3 @@ +parseGlobalSections(pre post Override3) +testGlobalSection(post ExtensibilityGlobals Key1=Value1 "SolutionGuid={custom-guid}") +testGlobalSection(post ExtensibilityAddIns) diff --git a/Tests/RunCMake/VSSolution/Override3.cmake b/Tests/RunCMake/VSSolution/Override3.cmake new file mode 100644 index 0000000..a59ce19 --- /dev/null +++ b/Tests/RunCMake/VSSolution/Override3.cmake @@ -0,0 +1,4 @@ +set_property(DIRECTORY PROPERTY VS_GLOBAL_SECTION_POST_ExtensibilityGlobals + Key1=Value1 + SolutionGuid={custom-guid} + ) diff --git a/Tests/RunCMake/VSSolution/PrePost-check.cmake b/Tests/RunCMake/VSSolution/PrePost-check.cmake index 322a689..957c964 100644 --- a/Tests/RunCMake/VSSolution/PrePost-check.cmake +++ b/Tests/RunCMake/VSSolution/PrePost-check.cmake @@ -2,5 +2,5 @@ parseGlobalSections(pre post PrePost) testGlobalSection(post Postsec Key1=Value2) testGlobalSection(pre Presec Key1=Value1 "Key2=Value with some spaces") testGlobalSection(post Emptysec) -testGlobalSection(post ExtensibilityGlobals) +testGlobalSection(post ExtensibilityGlobals "SolutionGuid={00000000-0000-0000-0000-000000000000}") testGlobalSection(post ExtensibilityAddIns) diff --git a/Tests/RunCMake/VSSolution/RunCMakeTest.cmake b/Tests/RunCMake/VSSolution/RunCMakeTest.cmake index 3a04db4..c25833d 100644 --- a/Tests/RunCMake/VSSolution/RunCMakeTest.cmake +++ b/Tests/RunCMake/VSSolution/RunCMakeTest.cmake @@ -8,6 +8,7 @@ run_cmake(MorePost) run_cmake(PrePost) run_cmake(Override1) run_cmake(Override2) +run_cmake(Override3) run_cmake(StartupProject) run_cmake(StartupProjectMissing) run_cmake(AddPackageToDefault) diff --git a/Tests/RunCMake/VSSolution/solution_parsing.cmake b/Tests/RunCMake/VSSolution/solution_parsing.cmake index 4e5bb59..4b27550 100644 --- a/Tests/RunCMake/VSSolution/solution_parsing.cmake +++ b/Tests/RunCMake/VSSolution/solution_parsing.cmake @@ -44,6 +44,9 @@ macro(parseGlobalSections arg_out_pre arg_out_post testName) endif() string(STRIP "${CMAKE_MATCH_1}" key) string(STRIP "${CMAKE_MATCH_2}" value) + if(key STREQUAL "SolutionGuid" AND value MATCHES "^{[0-9A-F-]+}$") + set(value "{00000000-0000-0000-0000-000000000000}") + endif() list(APPEND ${out_${sectionType}}_${sectionName} "${key}=${value}") endif() endforeach() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80b905f8826cc8c281bdc9bfd600e22dcc759dbc commit 80b905f8826cc8c281bdc9bfd600e22dcc759dbc Author: Brad King AuthorDate: Tue Jul 11 08:50:24 2017 -0400 Commit: Brad King CommitDate: Tue Jul 11 09:11:19 2017 -0400 find_*: Honor PATH_SUFFIXES in PackageName_ROOT paths This was accidentally forgotten in commit v3.9.0-rc1~71^2~2 (find_*: Add a new PackageRoot search path group, 2017-05-03). Fixes: #17052 diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 581c401..e378208 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -216,6 +216,8 @@ void cmFindBase::FillPackageRootPath() paths.AddCMakePrefixPath(varName); paths.AddEnvPrefixPath(varName); } + + paths.AddSuffixes(this->SearchPathSuffixes); } void cmFindBase::FillCMakeVariablePath() diff --git a/Tests/RunCMake/find_package/PackageRoot-stderr.txt b/Tests/RunCMake/find_package/PackageRoot-stderr.txt index 07b27bd..409fa89 100644 --- a/Tests/RunCMake/find_package/PackageRoot-stderr.txt +++ b/Tests/RunCMake/find_package/PackageRoot-stderr.txt @@ -1,7 +1,9 @@ Foo_ROOT : ENV{Foo_ROOT} : FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND +FOO_TEST_FILE_ZOT :FOO_TEST_FILE_ZOT-NOTFOUND FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND +FOO_TEST_PATH_ZOT :FOO_TEST_PATH_ZOT-NOTFOUND FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND Foo_ROOT : @@ -13,15 +15,19 @@ FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND BAR_TEST_FILE_BAR :BAR_TEST_FILE_BAR-NOTFOUND +BAR_TEST_FILE_ZOT :BAR_TEST_FILE_ZOT-NOTFOUND BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND BAR_TEST_PATH_BAR :BAR_TEST_PATH_BAR-NOTFOUND +BAR_TEST_PATH_ZOT :BAR_TEST_PATH_ZOT-NOTFOUND BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND BAR_TEST_PROG_BAR :BAR_TEST_PROG_BAR-NOTFOUND Foo_ROOT :.*/PackageRoot/foo/cmake_root ENV{Foo_ROOT} : FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root @@ -33,15 +39,19 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe Foo_ROOT : ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe Foo_ROOT : @@ -53,15 +63,19 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/foo/env_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/foo/env_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/foo/env_root/bin/bar.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root @@ -73,15 +87,19 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/foo/cmake_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/foo/cmake_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/foo/cmake_root/bin/bar.exe Foo_ROOT : ENV{Foo_ROOT} : FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND Foo_ROOT : @@ -93,15 +111,19 @@ FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe Foo_ROOT : ENV{Foo_ROOT} : FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND Foo_ROOT : @@ -113,15 +135,19 @@ FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe Foo_ROOT : ENV{Foo_ROOT} : FOO_TEST_FILE_FOO :FOO_TEST_FILE_FOO-NOTFOUND +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND Foo_ROOT : @@ -133,15 +159,19 @@ FOO_TEST_PATH_FOO :FOO_TEST_PATH_FOO-NOTFOUND FOO_TEST_PROG_FOO :FOO_TEST_PROG_FOO-NOTFOUND BAR_TEST_FILE_FOO :BAR_TEST_FILE_FOO-NOTFOUND BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :BAR_TEST_PATH_FOO-NOTFOUND BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :BAR_TEST_PROG_FOO-NOTFOUND BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root ENV{Foo_ROOT} : FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root @@ -153,15 +183,19 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe Foo_ROOT : ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe Foo_ROOT : @@ -173,15 +207,19 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root @@ -193,15 +231,19 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root ENV{Foo_ROOT} : FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root @@ -213,15 +255,19 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe Foo_ROOT : ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe Foo_ROOT : @@ -233,15 +279,19 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root @@ -253,15 +303,19 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/bar/env_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/bar/env_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/bar/env_root/bin/bar.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root ENV{Foo_ROOT} : FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root @@ -273,15 +327,19 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe Foo_ROOT : ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root FOO_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe Foo_ROOT : @@ -293,15 +351,19 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/env_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/env_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/env_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root ENV{Foo_ROOT} :.*/PackageRoot/foo/env_root FOO_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h +FOO_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include +FOO_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe Foo_ROOT :.*/PackageRoot/foo/cmake_root @@ -313,7 +375,9 @@ FOO_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include FOO_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_FILE_FOO :.*/PackageRoot/foo/cmake_root/include/foo.h BAR_TEST_FILE_BAR :.*/PackageRoot/bar/cmake_root/include/bar.h +BAR_TEST_FILE_ZOT :.*/PackageRoot/foo/cmake_root/include/zot/zot.h BAR_TEST_PATH_FOO :.*/PackageRoot/foo/cmake_root/include BAR_TEST_PATH_BAR :.*/PackageRoot/bar/cmake_root/include +BAR_TEST_PATH_ZOT :.*/PackageRoot/foo/cmake_root/include/zot BAR_TEST_PROG_FOO :.*/PackageRoot/foo/cmake_root/bin/foo.exe BAR_TEST_PROG_BAR :.*/PackageRoot/bar/cmake_root/bin/bar.exe diff --git a/Tests/RunCMake/find_package/PackageRoot.cmake b/Tests/RunCMake/find_package/PackageRoot.cmake index d9f41f8..421c243 100644 --- a/Tests/RunCMake/find_package/PackageRoot.cmake +++ b/Tests/RunCMake/find_package/PackageRoot.cmake @@ -37,7 +37,9 @@ macro(RunPackageRootTest) message("Foo_ROOT :${Foo_ROOT}") message("ENV{Foo_ROOT} :$ENV{Foo_ROOT}") message("FOO_TEST_FILE_FOO :${FOO_TEST_FILE_FOO}") + message("FOO_TEST_FILE_ZOT :${FOO_TEST_FILE_ZOT}") message("FOO_TEST_PATH_FOO :${FOO_TEST_PATH_FOO}") + message("FOO_TEST_PATH_ZOT :${FOO_TEST_PATH_ZOT}") message("FOO_TEST_PROG_FOO :${FOO_TEST_PROG_FOO}") CleanUpPackageRootTest() message("") @@ -57,8 +59,10 @@ macro(RunPackageRootTest) message("FOO_TEST_PROG_FOO :${FOO_TEST_PROG_FOO}") message("BAR_TEST_FILE_FOO :${BAR_TEST_FILE_FOO}") message("BAR_TEST_FILE_BAR :${BAR_TEST_FILE_BAR}") + message("BAR_TEST_FILE_ZOT :${BAR_TEST_FILE_ZOT}") message("BAR_TEST_PATH_FOO :${BAR_TEST_PATH_FOO}") message("BAR_TEST_PATH_BAR :${BAR_TEST_PATH_BAR}") + message("BAR_TEST_PATH_ZOT :${BAR_TEST_PATH_ZOT}") message("BAR_TEST_PROG_FOO :${BAR_TEST_PROG_FOO}") message("BAR_TEST_PROG_BAR :${BAR_TEST_PROG_BAR}") CleanUpPackageRootTest() diff --git a/Tests/RunCMake/find_package/PackageRoot/FindBar.cmake b/Tests/RunCMake/find_package/PackageRoot/FindBar.cmake index eefa49c..72774a7 100644 --- a/Tests/RunCMake/find_package/PackageRoot/FindBar.cmake +++ b/Tests/RunCMake/find_package/PackageRoot/FindBar.cmake @@ -1,6 +1,8 @@ find_file(BAR_TEST_FILE_FOO foo.h) find_file(BAR_TEST_FILE_BAR bar.h) +find_file(BAR_TEST_FILE_ZOT zot.h PATH_SUFFIXES zot) find_path(BAR_TEST_PATH_FOO foo.h) find_path(BAR_TEST_PATH_BAR bar.h) +find_path(BAR_TEST_PATH_ZOT zot.h PATH_SUFFIXES zot) find_program(BAR_TEST_PROG_FOO foo.exe) find_program(BAR_TEST_PROG_BAR bar.exe) diff --git a/Tests/RunCMake/find_package/PackageRoot/FindFoo.cmake b/Tests/RunCMake/find_package/PackageRoot/FindFoo.cmake index cb62390..e160a1d 100644 --- a/Tests/RunCMake/find_package/PackageRoot/FindFoo.cmake +++ b/Tests/RunCMake/find_package/PackageRoot/FindFoo.cmake @@ -1,5 +1,7 @@ find_file(FOO_TEST_FILE_FOO foo.h) +find_file(FOO_TEST_FILE_ZOT zot.h PATH_SUFFIXES zot) find_path(FOO_TEST_PATH_FOO foo.h) +find_path(FOO_TEST_PATH_ZOT zot.h PATH_SUFFIXES zot) find_program(FOO_TEST_PROG_FOO foo.exe) if ("Bar" IN_LIST Foo_FIND_COMPONENTS) diff --git a/Tests/RunCMake/find_package/PackageRoot/bar/cmake_root/include/zot/zot.h b/Tests/RunCMake/find_package/PackageRoot/bar/cmake_root/include/zot/zot.h new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/find_package/PackageRoot/bar/env_root/include/zot/zot.h b/Tests/RunCMake/find_package/PackageRoot/bar/env_root/include/zot/zot.h new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/find_package/PackageRoot/foo/cmake_root/include/zot/zot.h b/Tests/RunCMake/find_package/PackageRoot/foo/cmake_root/include/zot/zot.h new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/find_package/PackageRoot/foo/env_root/include/zot/zot.h b/Tests/RunCMake/find_package/PackageRoot/foo/env_root/include/zot/zot.h new file mode 100644 index 0000000..e69de29 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ae1b880a8e3297daf7f2c02ff2cb07e51bbe4a1 commit 1ae1b880a8e3297daf7f2c02ff2cb07e51bbe4a1 Author: Brad King AuthorDate: Tue Jul 11 08:43:48 2017 -0400 Commit: Brad King CommitDate: Tue Jul 11 09:11:19 2017 -0400 cmFindCommon: Drop unused FilterPaths method The method has not been used since commit v3.2.0-rc1~400^2~1 (Encapsulate search path manipulation functions into a seperate class, 2014-10-15). diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index 8c5686e..fd0e317 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -231,18 +231,6 @@ void cmFindCommon::RerootPaths(std::vector& paths) } } -void cmFindCommon::FilterPaths(const std::vector& inPaths, - const std::set& ignore, - std::vector& outPaths) -{ - for (std::vector::const_iterator i = inPaths.begin(); - i != inPaths.end(); ++i) { - if (ignore.count(*i) == 0) { - outPaths.push_back(*i); - } - } -} - void cmFindCommon::GetIgnoredPaths(std::vector& ignore) { // null-terminated list of paths. diff --git a/Source/cmFindCommon.h b/Source/cmFindCommon.h index 2eed47b..7954267 100644 --- a/Source/cmFindCommon.h +++ b/Source/cmFindCommon.h @@ -81,11 +81,6 @@ protected: void GetIgnoredPaths(std::vector& ignore); void GetIgnoredPaths(std::set& ignore); - /** Remove paths in the ignore set from the supplied vector. */ - void FilterPaths(const std::vector& inPaths, - const std::set& ignore, - std::vector& outPaths); - /** Compute final search path list (reroot + trailing slash). */ void ComputeFinalPaths(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cca8454ee5006e622c551630011f63f87a5c9748 commit cca8454ee5006e622c551630011f63f87a5c9748 Author: Brad King AuthorDate: Tue Jul 11 08:15:21 2017 -0400 Commit: Brad King CommitDate: Tue Jul 11 09:11:19 2017 -0400 cmFindCommon: Fix typo in PackageName_ROOT path label diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index 103e692..8c5686e 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -11,7 +11,7 @@ cmFindCommon::PathGroup cmFindCommon::PathGroup::All("ALL"); cmFindCommon::PathLabel cmFindCommon::PathLabel::PackageRoot( - "PacakgeName_ROOT"); + "PackageName_ROOT"); cmFindCommon::PathLabel cmFindCommon::PathLabel::CMake("CMAKE"); cmFindCommon::PathLabel cmFindCommon::PathLabel::CMakeEnvironment( "CMAKE_ENVIRONMENT"); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3250b9a122a19a840f63868a244832c24528d54a commit 3250b9a122a19a840f63868a244832c24528d54a Author: Brad King AuthorDate: Mon Jul 10 13:11:42 2017 -0400 Commit: Brad King CommitDate: Mon Jul 10 14:54:07 2017 -0400 bindexplib: Revert support for constants symbols Revert the main logic change of commit v3.9.0-rc1~192^2 (bindexplib: fix constants symbols export, 2017-04-26) and its test case. Unfortunately some constants may be provided by multiple object files with different `@...` suffixes, leading to ambiguous references. Revert support pending further investigation. Fixes: #17045 diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx index cd1fb8a..e96226a 100644 --- a/Source/bindexplib.cxx +++ b/Source/bindexplib.cxx @@ -242,24 +242,26 @@ public: // Check whether it is "Scalar deleting destructor" and "Vector // deleting destructor" - // if scalarPrefix and vectorPrefix are not found then print the - // symbol + // if scalarPrefix and vectorPrefix are not found then print + // the symbol const char* scalarPrefix = "??_G"; const char* vectorPrefix = "??_E"; + // The original code had a check for + // symbol.find("real@") == std::string::npos) + // but this disallows member functions with the name "real". if (symbol.compare(0, 4, scalarPrefix) && symbol.compare(0, 4, vectorPrefix)) { SectChar = this->SectionHeaders[pSymbolTable->SectionNumber - 1] .Characteristics; - // skip symbols containing a dot if (symbol.find('.') == std::string::npos) { - if (SectChar & IMAGE_SCN_MEM_EXECUTE) { - this->Symbols.insert(symbol); - } else if (SectChar & IMAGE_SCN_MEM_READ) { - // skip __real@ and __xmm@ - if (symbol.find("_real") == std::string::npos && - symbol.find("_xmm") == std::string::npos) { - this->DataSymbols.insert(symbol); + if (!pSymbolTable->Type && (SectChar & IMAGE_SCN_MEM_WRITE)) { + // Read only (i.e. constants) must be excluded + this->DataSymbols.insert(symbol); + } else { + if (pSymbolTable->Type || !(SectChar & IMAGE_SCN_MEM_READ) || + (SectChar & IMAGE_SCN_MEM_EXECUTE)) { + this->Symbols.insert(symbol); } } } diff --git a/Tests/RunCMake/AutoExportDll/foo.c b/Tests/RunCMake/AutoExportDll/foo.c index e70fbb5..4b1318b 100644 --- a/Tests/RunCMake/AutoExportDll/foo.c +++ b/Tests/RunCMake/AutoExportDll/foo.c @@ -13,5 +13,3 @@ int bar() { return 5; } - -const char testconst[] = "testconst"; diff --git a/Tests/RunCMake/AutoExportDll/say.cxx b/Tests/RunCMake/AutoExportDll/say.cxx index eb9c0ff..51060e8 100644 --- a/Tests/RunCMake/AutoExportDll/say.cxx +++ b/Tests/RunCMake/AutoExportDll/say.cxx @@ -13,14 +13,6 @@ int WINAPI foo(); int bar(); int objlib(); void justnop(); - -// test const export -#ifdef _WIN32 -// data symbols must be explicitly imported -__declspec(dllimport) extern const char testconst[]; -#else -extern const char testconst[]; -#endif } // test c++ functions @@ -51,8 +43,6 @@ int main() bar(); objlib(); printf("\n"); - printf("%s", testconst); - printf("\n"); #ifdef HAS_JUSTNOP justnop(); #endif ----------------------------------------------------------------------- Summary of changes: Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst | 4 +- Modules/Platform/Android/ndk-stl-c++_shared.cmake | 1 + Source/bindexplib.cxx | 22 ++++--- Source/cmFindBase.cxx | 2 + Source/cmFindCommon.cxx | 14 +---- Source/cmFindCommon.h | 5 -- Source/cmGlobalVisualStudio7Generator.cxx | 20 ++++-- Tests/RunCMake/AutoExportDll/foo.c | 2 - Tests/RunCMake/AutoExportDll/say.cxx | 10 --- Tests/RunCMake/VSSolution/MorePost-check.cmake | 2 +- Tests/RunCMake/VSSolution/MorePre-check.cmake | 2 +- Tests/RunCMake/VSSolution/OnePost-check.cmake | 2 +- Tests/RunCMake/VSSolution/OnePre-check.cmake | 2 +- Tests/RunCMake/VSSolution/Override1-check.cmake | 2 +- Tests/RunCMake/VSSolution/Override2-check.cmake | 2 +- Tests/RunCMake/VSSolution/Override3-check.cmake | 3 + Tests/RunCMake/VSSolution/Override3.cmake | 4 ++ Tests/RunCMake/VSSolution/PrePost-check.cmake | 2 +- Tests/RunCMake/VSSolution/RunCMakeTest.cmake | 1 + Tests/RunCMake/VSSolution/solution_parsing.cmake | 3 + Tests/RunCMake/find_package/PackageRoot-stderr.txt | 64 ++++++++++++++++++++ Tests/RunCMake/find_package/PackageRoot.cmake | 4 ++ .../find_package/PackageRoot/FindBar.cmake | 2 + .../find_package/PackageRoot/FindFoo.cmake | 2 + .../PackageRoot/bar/cmake_root/include/zot/zot.h | 0 .../PackageRoot/bar/env_root/include/zot/zot.h | 0 .../PackageRoot/foo/cmake_root/include/zot/zot.h | 0 .../PackageRoot/foo/env_root/include/zot/zot.h | 0 28 files changed, 125 insertions(+), 52 deletions(-) create mode 100644 Tests/RunCMake/VSSolution/Override3-check.cmake create mode 100644 Tests/RunCMake/VSSolution/Override3.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/bar/cmake_root/include/zot/zot.h (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/bar/env_root/include/zot/zot.h (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/cmake_root/include/zot/zot.h (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/env_root/include/zot/zot.h (100%) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jul 12 09:25:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 12 Jul 2017 09:25:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-290-g5b67090 Message-ID: <20170712132502.4CAA8FA929@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 5b67090d9f4201b145c9a9e99239c147d5e319c6 (commit) via e8e38aea260a2dec1e5d95e42a09c21149fab9c9 (commit) via c42c039d324b4c56a9c550d158b6e085259c87aa (commit) via 7638c6ea8de9029ac0dd1743a55a9e211fa53744 (commit) via 6fba4ec0f55ffec4ee6939b3eca0eac47ca4a02f (commit) from e63472abc597e87ea7e8ded6551cfe968db69095 (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=5b67090d9f4201b145c9a9e99239c147d5e319c6 commit 5b67090d9f4201b145c9a9e99239c147d5e319c6 Merge: e63472a e8e38ae Author: Brad King AuthorDate: Wed Jul 12 09:19:25 2017 -0400 Commit: Brad King CommitDate: Wed Jul 12 09:19:25 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jul 12 09:25:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 12 Jul 2017 09:25:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc5-37-ge8e38ae Message-ID: <20170712132502.A15FCFA99B@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 e8e38aea260a2dec1e5d95e42a09c21149fab9c9 (commit) via e0fb3f314f0dcd2aa0ad2fd97fe3637f18747439 (commit) via c42c039d324b4c56a9c550d158b6e085259c87aa (commit) via 5cf9c3d0cc654ba1a84f8bd65edbd09945c909a4 (commit) via 7638c6ea8de9029ac0dd1743a55a9e211fa53744 (commit) via 80b905f8826cc8c281bdc9bfd600e22dcc759dbc (commit) via 1ae1b880a8e3297daf7f2c02ff2cb07e51bbe4a1 (commit) via cca8454ee5006e622c551630011f63f87a5c9748 (commit) via 6fba4ec0f55ffec4ee6939b3eca0eac47ca4a02f (commit) via 3250b9a122a19a840f63868a244832c24528d54a (commit) from dd69dea3e7456cf8ea7e5d60362f6f8aa7aafa48 (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: Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst | 4 +- Modules/Platform/Android/ndk-stl-c++_shared.cmake | 1 + Source/bindexplib.cxx | 22 ++++--- Source/cmFindBase.cxx | 2 + Source/cmFindCommon.cxx | 14 +---- Source/cmFindCommon.h | 5 -- Source/cmGlobalVisualStudio7Generator.cxx | 20 ++++-- Tests/RunCMake/AutoExportDll/foo.c | 2 - Tests/RunCMake/AutoExportDll/say.cxx | 10 --- Tests/RunCMake/VSSolution/MorePost-check.cmake | 2 +- Tests/RunCMake/VSSolution/MorePre-check.cmake | 2 +- Tests/RunCMake/VSSolution/OnePost-check.cmake | 2 +- Tests/RunCMake/VSSolution/OnePre-check.cmake | 2 +- Tests/RunCMake/VSSolution/Override1-check.cmake | 2 +- Tests/RunCMake/VSSolution/Override2-check.cmake | 2 +- Tests/RunCMake/VSSolution/Override3-check.cmake | 3 + Tests/RunCMake/VSSolution/Override3.cmake | 4 ++ Tests/RunCMake/VSSolution/PrePost-check.cmake | 2 +- Tests/RunCMake/VSSolution/RunCMakeTest.cmake | 1 + Tests/RunCMake/VSSolution/solution_parsing.cmake | 3 + Tests/RunCMake/find_package/PackageRoot-stderr.txt | 64 ++++++++++++++++++++ Tests/RunCMake/find_package/PackageRoot.cmake | 4 ++ .../find_package/PackageRoot/FindBar.cmake | 2 + .../find_package/PackageRoot/FindFoo.cmake | 2 + .../PackageRoot/bar/cmake_root/include/zot/zot.h | 0 .../PackageRoot/bar/env_root/include/zot/zot.h | 0 .../PackageRoot/foo/cmake_root/include/zot/zot.h | 0 .../PackageRoot/foo/env_root/include/zot/zot.h | 0 28 files changed, 125 insertions(+), 52 deletions(-) create mode 100644 Tests/RunCMake/VSSolution/Override3-check.cmake create mode 100644 Tests/RunCMake/VSSolution/Override3.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/bar/cmake_root/include/zot/zot.h (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/bar/env_root/include/zot/zot.h (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/cmake_root/include/zot/zot.h (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/env_root/include/zot/zot.h (100%) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jul 12 10:35:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 12 Jul 2017 10:35:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-292-gca7f6c3 Message-ID: <20170712143503.3AD2AFADA2@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 ca7f6c3451c649c80a7f6f81f2c70fa9a718f990 (commit) via 25b72e9097260d1faf254155a1199886c808a58f (commit) from 5b67090d9f4201b145c9a9e99239c147d5e319c6 (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=ca7f6c3451c649c80a7f6f81f2c70fa9a718f990 commit ca7f6c3451c649c80a7f6f81f2c70fa9a718f990 Merge: 5b67090 25b72e9 Author: Brad King AuthorDate: Wed Jul 12 10:27:25 2017 -0400 Commit: Brad King CommitDate: Wed Jul 12 10:27:25 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jul 12 10:35:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 12 Jul 2017 10:35:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc5-38-g25b72e9 Message-ID: <20170712143503.53346FADB8@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 25b72e9097260d1faf254155a1199886c808a58f (commit) from e8e38aea260a2dec1e5d95e42a09c21149fab9c9 (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 Jul 12 10:45:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 12 Jul 2017 10:45:02 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.9.0-rc6, created. v3.9.0-rc6 Message-ID: <20170712144502.0EA30FA38B@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.0-rc6 has been created at 99f361ba9b956aca09aba9b42bef11582ce2e8ef (tag) tagging 25b72e9097260d1faf254155a1199886c808a58f (commit) replaces v3.9.0-rc5 tagged by Brad King on Wed Jul 12 10:29:02 2017 -0400 - Log ----------------------------------------------------------------- CMake 3.9.0-rc6 -----BEGIN PGP SIGNATURE----- iQJKBAABCAA0FiEExsJlMku+vcNQtRPQLSzvEDSSFoQFAllmMi4WHGJyYWQua2lu Z0BraXR3YXJlLmNvbQAKCRAtLO8QNJIWhIXJD/0aKH/KzJETSQ9J2GvNQS4h7WoO MwtWwO6mR+O01CKUpQ1A2V4mLWUu0lgZFxSoDJ1I3eGycF6UsNYKSaHFcnaPjmIl kz8pGVEmdFAi314LjBKhKW4FykPYa4lTDmlgrtParziCLFMbFNIq27rJUECvN+uz NDxNZnriA9FMB5XbnEjzy1bNmP7Kwp4TFxdShaawK4kbq2gWrD4YTbR4s9tM58sk 7YbD4V/RGL37znAGMSPw8M3YgRn6Lr1rJL4yakxJpJDw2QT0NyMNFIKvNS1wNztt Ahl7B/K25dCWUeiuIjDtyiCZ6ake7hoqMHZGW1PxNV7Dtw2m29NwroAqD3WodzCE McX3T+Sk3RpkDm3fh0z9s62QR4ZlxsNVCphdklNgv8APYHYbToMkD9uDNXt7KK3o /HRA+CBY1RyZOGlHDbmhXrW5gW08e2INiS5MZuzn+qo08gQtNtY5sT9sSbif+uFL VZ+xI1Fv+tvSOgkpEYyDGhJ+G16Tp/WVGHThLC3wQ+LKUOdBaOOHw/j7G6hmB2CL k3di3ZpWdkuFnK6rxNzIxSzkwa8alb1oLsD9I7T7NaoQHcZ+pd6H0G8/PNum8XC0 L9G0VcmG0HPM003gvBegciC7ojkFTtWrpqMiSHDy7FEuTMbriRimp7plyr0SlKj8 a8BlBrEexdFmykicXQ== =SxSD -----END PGP SIGNATURE----- Brad King (27): Merge branch 'curl-haiku' into release-3.9 VS: Fix GenerateDebugInformation values for v140 and v141 toolsets Merge branch 'vs-link-debug-flags' into release-3.9 Merge branch 'xcode-cross-sdk-object-libraries' into release-3.9 Merge branch 'FindDoxygen-project-in-subdir' into release-3.9 Merge branch 'vs-link-guard-cf' into release-3.9 Merge branch 'autogen-header-skip' into release-3.9 Merge branch 'autogen_p' into release-3.9 Merge branch 'FindDoxygen-create-output-dir' into release-3.9 Autogen: Skip generated files for compatibility with CMake 3.8 find_package: Restore longer message when config files were considered Merge branch 'find_package-restore-considered-configs' into release-3.9 Merge branch 'autogen-no-generated-files' into release-3.9 Merge branch 'autogen_skip_included' into release-3.9 VS: Choose VS 2017 instance via environment variable Merge branch 'vs-2017-choose-via-environment' into release-3.9 bindexplib: Revert support for constants symbols Merge branch 'bindexplib-revert-consts' into release-3.9 cmFindCommon: Fix typo in PackageName_ROOT path label cmFindCommon: Drop unused FilterPaths method find_*: Honor PATH_SUFFIXES in PackageName_ROOT paths Merge branch 'find_package-root-prefix-path-suffixes' into release-3.9 VS: Add SolutionGuid to generated .sln files Merge branch 'vs-2017-sln-guid' into release-3.9 Android: Link to android_support with c++_shared Merge branch 'android-fix-c++_shared' into release-3.9 CMake 3.9.0-rc6 Gregor Jasny (1): Xcode: Use correct Object Library paths for cross-SDK builds Ian Hojnicki (3): VS: Split link flag table between v140 and v141 toolsets VS: Fix GenerateDebugInformation flag map text for v141 toolsets VS: Add v140 and v141 flag table entries for /DEBUG:NONE and /DEBUG:FULL J?r?me Duval (1): curl: Fix build on Haiku Olender, Sebastian D (1): VS: Fix support for '/guard:cf' linker flag Robert Dailey (2): FindDoxygen: Use a stable reference to the location of global resources FindDoxygen: Create DOXYGEN_OUTPUT_DIRECTORY if it doesn't exist Sebastian Holtermann (3): Autogen: Check .moc header name against SKIP list Autogen: Continue search for FOO_p.h when FOO.h was found Autogen: Skip included files on demand ----------------------------------------------------------------------- hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jul 12 13:45:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 12 Jul 2017 13:45:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-257-g75cbc56 Message-ID: <20170712174504.1D7FFF9F62@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 75cbc5611d1d3b1726d5d0712f2ef564ea75d9dd (commit) via 23fb573c5f8d49bcf748cc8d30bce94dfeb5b2e6 (commit) via 627422d9de2de41c90d4168b5ff97a074e7232ae (commit) from ca7f6c3451c649c80a7f6f81f2c70fa9a718f990 (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=75cbc5611d1d3b1726d5d0712f2ef564ea75d9dd commit 75cbc5611d1d3b1726d5d0712f2ef564ea75d9dd Merge: ca7f6c3 23fb573 Author: Brad King AuthorDate: Wed Jul 12 13:38:02 2017 -0400 Commit: Brad King CommitDate: Wed Jul 12 13:38:02 2017 -0400 Merge branch 'release-3.8' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23fb573c5f8d49bcf748cc8d30bce94dfeb5b2e6 commit 23fb573c5f8d49bcf748cc8d30bce94dfeb5b2e6 Merge: 0d5a225 627422d Author: Brad King AuthorDate: Wed Jul 12 13:37:54 2017 -0400 Commit: Brad King CommitDate: Wed Jul 12 13:37:54 2017 -0400 Merge branch 'backport-ep-log-no-extract-fix' into release-3.8 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=627422d9de2de41c90d4168b5ff97a074e7232ae commit 627422d9de2de41c90d4168b5ff97a074e7232ae Author: Ben Boeckel AuthorDate: Mon Feb 27 11:30:13 2017 -0500 Commit: Ben Boeckel CommitDate: Wed Jul 12 11:33:07 2017 -0400 ExternalProject: only append `COMMAND` if actually adding a command Fixes #17046. (cherry picked from commit 99d6de6c1a5871ba03fa008c984cd5408940c3cd) diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index b42d2dd..34dc98c 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1990,11 +1990,10 @@ function(_ep_add_download_command name) set(comment "Performing download step (${steps}) for '${name}'") _ep_write_verifyfile_script("${stamp_dir}/verify-${name}.cmake" "${file}" "${hash}") endif() - list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/verify-${name}.cmake - COMMAND) + list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/verify-${name}.cmake) if (NOT no_extract) _ep_write_extractfile_script("${stamp_dir}/extract-${name}.cmake" "${name}" "${file}" "${source_dir}") - list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/extract-${name}.cmake) + list(APPEND cmd COMMAND ${CMAKE_COMMAND} -P ${stamp_dir}/extract-${name}.cmake) else () set_property(TARGET ${name} PROPERTY _EP_DOWNLOADED_FILE ${file}) endif () diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index 72c20eb..6b73563 100644 --- a/Tests/ExternalProject/CMakeLists.txt +++ b/Tests/ExternalProject/CMakeLists.txt @@ -90,6 +90,16 @@ ExternalProject_Add(${proj} ) set_property(TARGET ${proj} PROPERTY FOLDER "") +set(proj NoExtractLogDownload) +ExternalProject_Add(${proj} + URL ${CMAKE_CURRENT_SOURCE_DIR}/gitrepo.tgz + DOWNLOAD_NO_EXTRACT 1 + LOG_DOWNLOAD 1 + BUILD_COMMAND "" + CONFIGURE_COMMAND "" + INSTALL_COMMAND "" +) + # CVS-based tests: # ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jul 13 00:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 13 Jul 2017 00:05:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-258-g3d209ac Message-ID: <20170713040507.8EEFBFAD0F@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 3d209acc1fdb96a213fba0442af7c2719e4d2a36 (commit) from 75cbc5611d1d3b1726d5d0712f2ef564ea75d9dd (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=3d209acc1fdb96a213fba0442af7c2719e4d2a36 commit 3d209acc1fdb96a213fba0442af7c2719e4d2a36 Author: Kitware Robot AuthorDate: Thu Jul 13 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Thu Jul 13 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e6c3a5b..6a45aec 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 20170712) +set(CMake_VERSION_PATCH 20170713) #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 Jul 13 07:45:27 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 13 Jul 2017 07:45:27 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-263-ge5c762d Message-ID: <20170713114540.6B80CFAA46@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 e5c762d32d8a1329aac66a66eaf634a009cb288b (commit) via c8f4cf0821d86e705d255dcd03fa28e9558df83d (commit) via 0c5723821542a43fa211c73abc08e59e2fd395e2 (commit) via 2c82d9c81f869303d3202501665acd91311d7714 (commit) via 4db32275149e2a68c74d2abf5158ee29976b7300 (commit) from 3d209acc1fdb96a213fba0442af7c2719e4d2a36 (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=e5c762d32d8a1329aac66a66eaf634a009cb288b commit e5c762d32d8a1329aac66a66eaf634a009cb288b Merge: c8f4cf0 0c57238 Author: Brad King AuthorDate: Thu Jul 13 11:42:56 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 13 07:44:11 2017 -0400 Merge topic 'server-target-backtraces' 0c572382 server: Report backtraces in codemodel response 4db32275 server: Rename cmServerProtocol1_0 to cmServerProtocol1 Acked-by: Kitware Robot Merge-request: !992 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8f4cf0821d86e705d255dcd03fa28e9558df83d commit c8f4cf0821d86e705d255dcd03fa28e9558df83d Merge: 3d209ac 2c82d9c Author: Brad King AuthorDate: Thu Jul 13 11:42:31 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 13 07:42:42 2017 -0400 Merge topic 'source-group-regex-tweaks' 2c82d9c8 Add more extensions to Resources source group by default Acked-by: Kitware Robot Merge-request: !1028 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c5723821542a43fa211c73abc08e59e2fd395e2 commit 0c5723821542a43fa211c73abc08e59e2fd395e2 Author: Ivan Shcherbakov AuthorDate: Tue Jun 20 14:13:01 2017 -0700 Commit: Brad King CommitDate: Tue Jul 11 07:50:22 2017 -0400 server: Report backtraces in codemodel response Report the source locations (e.g. in `CMakeLists.txt`) for all targets and target-related statements. This allows IDEs to locate the statements and automatically edit them when the user adds or removes files or changes target properties via GUI. Increment the protocol minor version number to tell clients that the new information is available. diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index 9520cc1..211ebe4 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -496,6 +496,9 @@ Each target object can have the following keys: with the sysroot path. "fileGroups" contains the source files making up the target. +"crossReferences" + contains the location of the target in the corresponding CMakeLists.txt + file and the locations of the related statements like "target_link_libraries" FileGroups are used to group sources using similar settings together. @@ -521,6 +524,16 @@ Each fileGroup object may contain the following keys: All file paths in the fileGroup are either absolute or relative to the sourceDirectory of the target. +CrossReferences object is used to report the location of the target (including +the entire call stack if the target is defined in a function) and the related +"target_link_libraries", "target_include_directories", "target_compile_definitions" +and "target_compile_options" statements. + +See the example below for details on the internal format of the "crossReferences" object. +Line numbers stated in the "backtrace" entries are 1-based. The last entry of a backtrace +is a special entry with missing "line" and "name" fields that specifies the initial +CMakeLists.txt file. + Example:: [== "CMake Server" ==[ @@ -557,7 +570,34 @@ CMake will reply:: "linkerLanguage": "C", "name": "cmForm", "sourceDirectory": "/home/code/src/cmake/Source/CursesDialog/form", - "type": "STATIC_LIBRARY" + "type": "STATIC_LIBRARY", + "crossReferences": { + "backtrace": [ + { + "line": 7, + "name": "add_executable", + "path": "C:/full/path/CMakeLists.txt" + }, + { + "path": "c:/full/path/CMakeLists.txt" + } + ], + "relatedStatements": [ + { + "backtrace": [ + { + "line": 8, + "name": "target_link_libraries", + "path": "c:/full/path/CMakeLists.txt" + }, + { + "path": "c:/full/path/CMakeLists.txt" + } + ], + "type": "target_link_libraries" + } + ] + } } ] }, diff --git a/Source/cmServerDictionary.h b/Source/cmServerDictionary.h index e6a7ae6..405ff6b 100644 --- a/Source/cmServerDictionary.h +++ b/Source/cmServerDictionary.h @@ -89,6 +89,11 @@ static const std::string kWARN_UNUSED_KEY = "warnUnused"; static const std::string kWATCHED_DIRECTORIES_KEY = "watchedDirectories"; static const std::string kWATCHED_FILES_KEY = "watchedFiles"; +static const std::string kTARGET_CROSS_REFERENCES_KEY = "crossReferences"; +static const std::string kLINE_NUMBER_KEY = "line"; +static const std::string kBACKTRACE_KEY = "backtrace"; +static const std::string kRELATED_STATEMENTS_KEY = "relatedStatements"; + static const std::string kSTART_MAGIC = "[== \"CMake Server\" ==["; static const std::string kEND_MAGIC = "]== \"CMake Server\" ==]"; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 54ee109..21b69cf 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -2,12 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmServerProtocol.h" +#include "cmAlgorithms.h" #include "cmExternalMakefileProjectGenerator.h" #include "cmFileMonitor.h" #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLinkLineComputer.h" +#include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmServer.h" @@ -18,6 +20,7 @@ #include "cmStateSnapshot.h" #include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cm_uv.h" #include "cmake.h" @@ -249,7 +252,7 @@ bool cmServerProtocol::DoActivate(const cmServerRequest& /*request*/, std::pair cmServerProtocol1::ProtocolVersion() const { - return std::make_pair(1, 0); + return std::make_pair(1, 1); } static void setErrorMessage(std::string* errorMessage, const std::string& text) @@ -729,6 +732,37 @@ static Json::Value DumpSourceFilesList( return result; } +static Json::Value DumpBacktrace(const cmListFileBacktrace& backtrace) +{ + Json::Value result = Json::arrayValue; + + cmListFileBacktrace backtraceCopy = backtrace; + while (!backtraceCopy.Top().FilePath.empty()) { + Json::Value entry = Json::objectValue; + entry[kPATH_KEY] = backtraceCopy.Top().FilePath; + if (backtraceCopy.Top().Line) { + entry[kLINE_NUMBER_KEY] = (int)backtraceCopy.Top().Line; + } + if (!backtraceCopy.Top().Name.empty()) { + entry[kNAME_KEY] = backtraceCopy.Top().Name; + } + result.append(std::move(entry)); + backtraceCopy = backtraceCopy.Pop(); + } + return result; +} + +static void DumpBacktraceRange(Json::Value& result, const std::string& type, + const cmBacktraceRange& range) +{ + for (const auto& bt : range) { + Json::Value obj = Json::objectValue; + obj[kTYPE_KEY] = type; + obj[kBACKTRACE_KEY] = DumpBacktrace(bt); + result.append(obj); + } +} + static Json::Value DumpTarget(cmGeneratorTarget* target, const std::string& config) { @@ -763,6 +797,22 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, result[kFULL_NAME_KEY] = target->GetFullName(config); + Json::Value crossRefs = Json::objectValue; + crossRefs[kBACKTRACE_KEY] = DumpBacktrace(target->Target->GetBacktrace()); + + Json::Value statements = Json::arrayValue; + DumpBacktraceRange(statements, "target_compile_definitions", + target->Target->GetCompileDefinitionsBacktraces()); + DumpBacktraceRange(statements, "target_include_directories", + target->Target->GetIncludeDirectoriesBacktraces()); + DumpBacktraceRange(statements, "target_compile_options", + target->Target->GetCompileOptionsBacktraces()); + DumpBacktraceRange(statements, "target_link_libraries", + target->Target->GetLinkImplementationBacktraces()); + + crossRefs[kRELATED_STATEMENTS_KEY] = std::move(statements); + result[kTARGET_CROSS_REFERENCES_KEY] = std::move(crossRefs); + if (target->HaveWellDefinedOutputFiles()) { Json::Value artifacts = Json::arrayValue; artifacts.append( https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c82d9c81f869303d3202501665acd91311d7714 commit 2c82d9c81f869303d3202501665acd91311d7714 Author: UfoXp AuthorDate: Wed Jul 5 18:36:30 2017 +0200 Commit: Brad King CommitDate: Mon Jul 10 11:33:56 2017 -0400 Add more extensions to Resources source group by default Extend the Resources group regex to match pdf, png, jpeg, jpg, storyboards, and xcassets. This cleans up more complex Xcode projects a lot. While at it, factor the regular expressions for both "Resources" and "Source Files" into macros. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 4a0cab3..caf8993 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -87,12 +87,10 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, #if defined(CMAKE_BUILD_WITH_CMAKE) this->AddSourceGroup("", "^.*$"); - this->AddSourceGroup("Source Files", - "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp" - "|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$"); + this->AddSourceGroup("Source Files", CM_SOURCE_REGEX); this->AddSourceGroup("Header Files", CM_HEADER_REGEX); this->AddSourceGroup("CMake Rules", "\\.rule$"); - this->AddSourceGroup("Resources", "\\.plist$"); + this->AddSourceGroup("Resources", CM_RESOURCE_REGEX); this->AddSourceGroup("Object Files", "\\.(lo|o|obj)$"); this->ObjectLibrariesSourceGroupIndex = this->SourceGroups.size(); diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index 0be659c..e739d18 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -120,4 +120,10 @@ private: // TODO: Factor out into platform information modules. #define CM_HEADER_REGEX "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$" +#define CM_SOURCE_REGEX \ + "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp|ftn|m|mm|rc|def|r|odl|idl|hpj" \ + "|bat)$" + +#define CM_RESOURCE_REGEX "\\.(pdf|plist|png|jpeg|jpg|storyboard|xcassets)$" + #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4db32275149e2a68c74d2abf5158ee29976b7300 commit 4db32275149e2a68c74d2abf5158ee29976b7300 Author: Ivan Shcherbakov AuthorDate: Wed Jul 5 21:24:29 2017 -0700 Commit: Brad King CommitDate: Thu Jul 6 11:03:14 2017 -0400 server: Rename cmServerProtocol1_0 to cmServerProtocol1 It will serve additional minor versions. Suggested-by: Tobias Hunger diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx index 7fc6ed7..5283dfc 100644 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@ -36,7 +36,7 @@ cmServer::cmServer(cmServerConnection* conn, bool supportExperimental) { this->Connection->SetServer(this); // Register supported protocols: - this->RegisterProtocol(new cmServerProtocol1_0); + this->RegisterProtocol(new cmServerProtocol1); } cmServer::~cmServer() diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index defba77..54ee109 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -247,7 +247,7 @@ bool cmServerProtocol::DoActivate(const cmServerRequest& /*request*/, return true; } -std::pair cmServerProtocol1_0::ProtocolVersion() const +std::pair cmServerProtocol1::ProtocolVersion() const { return std::make_pair(1, 0); } @@ -297,8 +297,8 @@ static bool testValue(cmState* state, const std::string& key, return true; } -bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, - std::string* errorMessage) +bool cmServerProtocol1::DoActivate(const cmServerRequest& request, + std::string* errorMessage) { std::string sourceDirectory = request.Data[kSOURCE_DIRECTORY_KEY].asString(); const std::string buildDirectory = @@ -417,8 +417,8 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, return true; } -void cmServerProtocol1_0::HandleCMakeFileChanges(const std::string& path, - int event, int status) +void cmServerProtocol1::HandleCMakeFileChanges(const std::string& path, + int event, int status) { assert(status == 0); static_cast(status); @@ -441,7 +441,7 @@ void cmServerProtocol1_0::HandleCMakeFileChanges(const std::string& path, SendSignal(kFILE_CHANGE_SIGNAL, obj); } -const cmServerResponse cmServerProtocol1_0::Process( +const cmServerResponse cmServerProtocol1::Process( const cmServerRequest& request) { assert(this->m_State >= STATE_ACTIVE); @@ -474,12 +474,12 @@ const cmServerResponse cmServerProtocol1_0::Process( return request.ReportError("Unknown command!"); } -bool cmServerProtocol1_0::IsExperimental() const +bool cmServerProtocol1::IsExperimental() const { return true; } -cmServerResponse cmServerProtocol1_0::ProcessCache( +cmServerResponse cmServerProtocol1::ProcessCache( const cmServerRequest& request) { if (this->m_State < STATE_CONFIGURED) { @@ -528,7 +528,7 @@ cmServerResponse cmServerProtocol1_0::ProcessCache( return request.Reply(result); } -cmServerResponse cmServerProtocol1_0::ProcessCMakeInputs( +cmServerResponse cmServerProtocol1::ProcessCMakeInputs( const cmServerRequest& request) { if (this->m_State < STATE_CONFIGURED) { @@ -915,7 +915,7 @@ static Json::Value DumpConfigurationsList(const cmake* cm) return result; } -cmServerResponse cmServerProtocol1_0::ProcessCodeModel( +cmServerResponse cmServerProtocol1::ProcessCodeModel( const cmServerRequest& request) { if (this->m_State != STATE_COMPUTED) { @@ -927,7 +927,7 @@ cmServerResponse cmServerProtocol1_0::ProcessCodeModel( return request.Reply(result); } -cmServerResponse cmServerProtocol1_0::ProcessCompute( +cmServerResponse cmServerProtocol1::ProcessCompute( const cmServerRequest& request) { if (this->m_State > STATE_CONFIGURED) { @@ -947,7 +947,7 @@ cmServerResponse cmServerProtocol1_0::ProcessCompute( return request.Reply(Json::Value()); } -cmServerResponse cmServerProtocol1_0::ProcessConfigure( +cmServerResponse cmServerProtocol1::ProcessConfigure( const cmServerRequest& request) { if (this->m_State == STATE_INACTIVE) { @@ -1053,7 +1053,7 @@ cmServerResponse cmServerProtocol1_0::ProcessConfigure( return request.Reply(Json::Value()); } -cmServerResponse cmServerProtocol1_0::ProcessGlobalSettings( +cmServerResponse cmServerProtocol1::ProcessGlobalSettings( const cmServerRequest& request) { cmake* cm = this->CMakeInstance(); @@ -1089,7 +1089,7 @@ static void setBool(const cmServerRequest& request, const std::string& key, setter(request.Data[key].asBool()); } -cmServerResponse cmServerProtocol1_0::ProcessSetGlobalSettings( +cmServerResponse cmServerProtocol1::ProcessSetGlobalSettings( const cmServerRequest& request) { const std::vector boolValues = { @@ -1121,7 +1121,7 @@ cmServerResponse cmServerProtocol1_0::ProcessSetGlobalSettings( return request.Reply(Json::Value()); } -cmServerResponse cmServerProtocol1_0::ProcessFileSystemWatchers( +cmServerResponse cmServerProtocol1::ProcessFileSystemWatchers( const cmServerRequest& request) { const cmFileMonitor* const fm = FileMonitor(); @@ -1140,7 +1140,7 @@ cmServerResponse cmServerProtocol1_0::ProcessFileSystemWatchers( return request.Reply(result); } -cmServerProtocol1_0::GeneratorInformation::GeneratorInformation( +cmServerProtocol1::GeneratorInformation::GeneratorInformation( const std::string& generatorName, const std::string& extraGeneratorName, const std::string& toolset, const std::string& platform, const std::string& sourceDirectory, const std::string& buildDirectory) @@ -1153,7 +1153,7 @@ cmServerProtocol1_0::GeneratorInformation::GeneratorInformation( { } -void cmServerProtocol1_0::GeneratorInformation::SetupGenerator( +void cmServerProtocol1::GeneratorInformation::SetupGenerator( cmake* cm, std::string* errorMessage) { const std::string fullGeneratorName = diff --git a/Source/cmServerProtocol.h b/Source/cmServerProtocol.h index 83b3d58..4e57bb6 100644 --- a/Source/cmServerProtocol.h +++ b/Source/cmServerProtocol.h @@ -98,7 +98,7 @@ private: friend class cmServer; }; -class cmServerProtocol1_0 : public cmServerProtocol +class cmServerProtocol1 : public cmServerProtocol { public: std::pair ProtocolVersion() const override; ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 42 +++++++++++++++++++- Source/cmMakefile.cxx | 6 +-- Source/cmServer.cxx | 2 +- Source/cmServerDictionary.h | 5 +++ Source/cmServerProtocol.cxx | 86 +++++++++++++++++++++++++++++++--------- Source/cmServerProtocol.h | 2 +- Source/cmSourceFile.h | 6 +++ 7 files changed, 124 insertions(+), 25 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jul 13 07:56:01 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 13 Jul 2017 07:56:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-278-ga4a39a4 Message-ID: <20170713115602.7183FFADF0@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 a4a39a46c34c1227be999eb10dd39ddeb70ada7b (commit) via 47d9772618bd44a9816731cec25255c3d64b0084 (commit) via 0f158272d6ad0f681495482530b37d307676a157 (commit) via f5be951117711a3965db0f9cd59a2913efacece7 (commit) via 37915a69304d0de36e15b024380a7ddabeb0d821 (commit) via c281acf80768c56bbe12a9f017a856d8e966f084 (commit) via 0c650f39659a62c03012ec07dc32effd3bfba6e8 (commit) via 117033c1d97456833e49336f6f3ebda5de3a5cbd (commit) via ed5bde30f70a7da8cc95e600195b58e0d936e38d (commit) via 376dc3eb2218c64db50ae53c04376dfb42c538ba (commit) via a70d8e93e82e1a8fa37b4c9c0b23210d5031fd75 (commit) via 47b3a57c9bc5c7db608bc3b59b139a902535255f (commit) via d385962419ea3109dd21093c2368379f5fb51722 (commit) via d08ec4d25a8113388092bf342002f3859f6b8de4 (commit) via 4ef0eedb496cd60a9fa9c9f51e02e167c8a1e64a (commit) from e5c762d32d8a1329aac66a66eaf634a009cb288b (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=a4a39a46c34c1227be999eb10dd39ddeb70ada7b commit a4a39a46c34c1227be999eb10dd39ddeb70ada7b Merge: 47d9772 c281acf Author: Brad King AuthorDate: Thu Jul 13 11:51:11 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 13 07:52:09 2017 -0400 Merge topic 'FindProtobuf-protoc-target' c281acf8 FindProtobuf: add target for protoc Acked-by: Kitware Robot Merge-request: !1045 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47d9772618bd44a9816731cec25255c3d64b0084 commit 47d9772618bd44a9816731cec25255c3d64b0084 Merge: 0f15827 0c650f3 Author: Brad King AuthorDate: Thu Jul 13 11:50:43 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 13 07:51:05 2017 -0400 Merge topic 'better-exception-reporting' 0c650f39 CTest: Report more detail about system exceptions in tests Acked-by: Kitware Robot Merge-request: !1046 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f158272d6ad0f681495482530b37d307676a157 commit 0f158272d6ad0f681495482530b37d307676a157 Merge: f5be951 117033c Author: Brad King AuthorDate: Thu Jul 13 11:46:16 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 13 07:46:47 2017 -0400 Merge topic 'test_include_files' 117033c1 Add TEST_INCLUDE_DIR[S] unit test ed5bde30 Add TEST_INCLUDE_FILES Acked-by: Kitware Robot Merge-request: !1031 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5be951117711a3965db0f9cd59a2913efacece7 commit f5be951117711a3965db0f9cd59a2913efacece7 Merge: 37915a6 376dc3e Author: Brad King AuthorDate: Thu Jul 13 11:45:54 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 13 07:46:09 2017 -0400 Merge topic 'labels-for-subprojects' 376dc3eb Help: Add notes for topic 'labels_for_subprojects' a70d8e93 Add tests for new directory labels and labels-for-subprojects features 47b3a57c Display subproject timing summary d3859624 Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variable d08ec4d2 Add CTEST_LABELS_FOR_SUBPROJECTS as a CTest module and script variable Acked-by: Kitware Robot Merge-request: !1004 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=37915a69304d0de36e15b024380a7ddabeb0d821 commit 37915a69304d0de36e15b024380a7ddabeb0d821 Merge: e5c762d 4ef0eed Author: Brad King AuthorDate: Thu Jul 13 11:43:22 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 13 07:45:11 2017 -0400 Merge topic 'ninja-dyndep-response-file' 4ef0eedb Ninja: always use response file for cmake_ninja_dyndep Acked-by: Kitware Robot Merge-request: !1038 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c281acf80768c56bbe12a9f017a856d8e966f084 commit c281acf80768c56bbe12a9f017a856d8e966f084 Author: Andr? Apitzsch AuthorDate: Tue Jul 11 15:20:36 2017 +0200 Commit: Brad King CommitDate: Wed Jul 12 13:48:22 2017 -0400 FindProtobuf: add target for protoc diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index 33262f3..90f7a2e 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -48,6 +48,8 @@ # The protobuf lite library. # ``protobuf::libprotoc`` # The protoc library. +# ``protobuf::protoc`` +# The protoc compiler. # # The following cache variables are also available to set or use: # @@ -172,9 +174,9 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc" "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h" - COMMAND ${Protobuf_PROTOC_EXECUTABLE} + COMMAND protobuf::protoc ARGS "--cpp_out=${DLL_EXPORT_DECL}${CMAKE_CURRENT_BINARY_DIR}" ${_protobuf_include_path} ${ABS_FIL} - DEPENDS ${ABS_FIL} ${Protobuf_PROTOC_EXECUTABLE} + DEPENDS ${ABS_FIL} protobuf::protoc COMMENT "Running C++ protocol buffer compiler on ${FIL}" VERBATIM ) endforeach() @@ -232,8 +234,8 @@ function(PROTOBUF_GENERATE_PYTHON SRCS) list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py") add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py" - COMMAND ${Protobuf_PROTOC_EXECUTABLE} --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL} - DEPENDS ${ABS_FIL} ${Protobuf_PROTOC_EXECUTABLE} + COMMAND protobuf::protoc --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL} + DEPENDS ${ABS_FIL} protobuf::protoc COMMENT "Running Python protocol buffer compiler on ${FIL}" VERBATIM ) endforeach() @@ -501,6 +503,16 @@ if(Protobuf_INCLUDE_DIR) endif() endif() endif() + + if(Protobuf_PROTOC_EXECUTABLE) + if(NOT TARGET protobuf::protoc) + add_executable(protobuf::protoc IMPORTED) + if(EXISTS "${Protobuf_PROTOC_EXECUTABLE}") + set_target_properties(protobuf::protoc PROPERTIES + IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}") + endif() + endif() + endif() endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) diff --git a/Tests/FindProtobuf/Test/CMakeLists.txt b/Tests/FindProtobuf/Test/CMakeLists.txt index 8b6e38a..10ce976 100644 --- a/Tests/FindProtobuf/Test/CMakeLists.txt +++ b/Tests/FindProtobuf/Test/CMakeLists.txt @@ -30,3 +30,5 @@ add_executable(test_var_protoc main-protoc.cxx) target_include_directories(test_var_protoc PRIVATE ${Protobuf_INCLUDE_DIRS}) target_link_libraries(test_var_protoc PRIVATE ${Protobuf_PROTOC_LIBRARIES}) add_test(NAME test_var_protoc COMMAND test_var_protoc) + +add_test(NAME test_tgt_protoc_version COMMAND protobuf::protoc --version) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c650f39659a62c03012ec07dc32effd3bfba6e8 commit 0c650f39659a62c03012ec07dc32effd3bfba6e8 Author: Bill Hoffman AuthorDate: Tue Jul 11 11:22:45 2017 -0400 Commit: Brad King CommitDate: Wed Jul 12 13:29:21 2017 -0400 CTest: Report more detail about system exceptions in tests This passes the system exception string up to CDash and to the command line instead of just printing "other". diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 0c4269e..9274c01 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -237,6 +237,8 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) } else if (res == cmsysProcess_State_Exception) { outputTestErrorsToConsole = this->CTest->OutputTestOutputOnTestFailure; cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Exception: "); + this->TestResult.ExceptionStatus = + this->TestProcess->GetExitExceptionString(); switch (this->TestProcess->GetExitException()) { case cmsysProcess_Exception_Fault: cmCTestLog(this->CTest, HANDLER_OUTPUT, "SegFault"); @@ -255,7 +257,8 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) this->TestResult.Status = cmCTestTestHandler::NUMERICAL; break; default: - cmCTestLog(this->CTest, HANDLER_OUTPUT, "Other"); + cmCTestLog(this->CTest, HANDLER_OUTPUT, + this->TestResult.ExceptionStatus); this->TestResult.Status = cmCTestTestHandler::OTHER_FAULT; } } else if ("Disabled" == this->TestResult.CompletionStatus) { diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 674be60..4229da1 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1,12 +1,10 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestTestHandler.h" - -#include "cmsys/Base64.h" -#include "cmsys/Directory.hxx" -#include "cmsys/FStream.hxx" -#include "cmsys/RegularExpression.hxx" #include +#include +#include +#include #include #include #include @@ -33,6 +31,7 @@ #include "cm_auto_ptr.hxx" #include "cm_utf8.h" #include "cmake.h" +#include "cmsys/FStream.hxx" class cmExecutionStatus; @@ -549,10 +548,10 @@ int cmCTestTestHandler::ProcessHandler() !cmHasLiteralPrefix(ftit->CompletionStatus, "SKIP_RETURN_CODE=") && ftit->CompletionStatus != "Disabled") { ofs << ftit->TestCount << ":" << ftit->Name << std::endl; - cmCTestLog( - this->CTest, HANDLER_OUTPUT, "\t" - << std::setw(3) << ftit->TestCount << " - " << ftit->Name << " (" - << this->GetTestStatus(ftit->Status) << ")" << std::endl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t" + << std::setw(3) << ftit->TestCount << " - " + << ftit->Name << " (" << this->GetTestStatus(&*ftit) + << ")" << std::endl); } } } @@ -1299,7 +1298,7 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) xml.StartElement("NamedMeasurement"); xml.Attribute("type", "text/string"); xml.Attribute("name", "Exit Code"); - xml.Element("Value", this->GetTestStatus(result->Status)); + xml.Element("Value", this->GetTestStatus(result)); xml.EndElement(); // NamedMeasurement xml.StartElement("NamedMeasurement"); @@ -1693,17 +1692,20 @@ void cmCTestTestHandler::UseExcludeRegExp() this->UseExcludeRegExpFirst = !this->UseIncludeRegExpFlag; } -const char* cmCTestTestHandler::GetTestStatus(int status) +const char* cmCTestTestHandler::GetTestStatus(const cmCTestTestResult* result) { static const char* statuses[] = { "Not Run", "Timeout", "SEGFAULT", "ILLEGAL", "INTERRUPT", "NUMERICAL", "OTHER_FAULT", "Failed", "BAD_COMMAND", "Completed" }; - + int status = result->Status; if (status < cmCTestTestHandler::NOT_RUN || status > cmCTestTestHandler::COMPLETED) { return "No Status"; } + if (status == cmCTestTestHandler::OTHER_FAULT) { + return result->ExceptionStatus.c_str(); + } return statuses[status]; } diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 0edcb14..c46c511 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -144,6 +144,7 @@ public: double ExecutionTime; int ReturnValue; int Status; + std::string ExceptionStatus; bool CompressOutput; std::string CompletionStatus; std::string Output; @@ -262,7 +263,7 @@ private: */ std::string FindTheExecutable(const char* exe); - const char* GetTestStatus(int status); + const char* GetTestStatus(const cmCTestTestResult*); void ExpandTestsToRunInformation(size_t numPossibleTests); void ExpandTestsToRunInformationForRerunFailed(); diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index f4ec6da..9680a69 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -240,3 +240,8 @@ int cmProcess::GetExitException() { return cmsysProcess_GetExitException(this->Process); } + +std::string cmProcess::GetExitExceptionString() +{ + return cmsysProcess_GetExceptionString(this->Process); +} diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h index 86e905a..dfb02fe 100644 --- a/Source/CTest/cmProcess.h +++ b/Source/CTest/cmProcess.h @@ -38,6 +38,7 @@ public: int GetExitValue() { return this->ExitValue; } double GetTotalTime() { return this->TotalTime; } int GetExitException(); + std::string GetExitExceptionString(); /** * Read one line of output but block for no more than timeout. * Returns: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=117033c1d97456833e49336f6f3ebda5de3a5cbd commit 117033c1d97456833e49336f6f3ebda5de3a5cbd Author: Matthew Woehlke AuthorDate: Mon Jul 10 12:09:24 2017 -0400 Commit: Matthew Woehlke CommitDate: Wed Jul 12 13:28:21 2017 -0400 Add TEST_INCLUDE_DIR[S] unit test Add a unit test for the TEST_INCLUDE_DIR and (new) TEST_INCLUDE_DIRS directory properties. diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 246138b..3531adc 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -223,6 +223,7 @@ add_RunCMake_test(return) add_RunCMake_test(separate_arguments) add_RunCMake_test(set_property) add_RunCMake_test(string) +add_RunCMake_test(test_include_dirs) foreach(var CMAKE_C_COMPILER_ID CMAKE_C_COMPILER_VERSION diff --git a/Tests/RunCMake/test_include_dirs/CMakeLists.txt b/Tests/RunCMake/test_include_dirs/CMakeLists.txt new file mode 100644 index 0000000..dc92486 --- /dev/null +++ b/Tests/RunCMake/test_include_dirs/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.6) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/test_include_dirs/RunCMakeTest.cmake b/Tests/RunCMake/test_include_dirs/RunCMakeTest.cmake new file mode 100644 index 0000000..d1633e4 --- /dev/null +++ b/Tests/RunCMake/test_include_dirs/RunCMakeTest.cmake @@ -0,0 +1,17 @@ +include(RunCMake) + +function(run_TID) + # Use a single build tree for a few tests without cleaning. + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TID-build) + set(RunCMake_TEST_NO_CLEAN 1) + if(RunCMake_GENERATOR MATCHES "Make|Ninja") + set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug) + endif() + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + run_cmake(TID) + run_cmake_command(TID-build ${CMAKE_COMMAND} --build . --config Debug) + run_cmake_command(TID-test ${CMAKE_CTEST_COMMAND} -C Debug) +endfunction() + +run_TID() diff --git a/Tests/RunCMake/test_include_dirs/TID-test-stdout.txt b/Tests/RunCMake/test_include_dirs/TID-test-stdout.txt new file mode 100644 index 0000000..19bf051 --- /dev/null +++ b/Tests/RunCMake/test_include_dirs/TID-test-stdout.txt @@ -0,0 +1,17 @@ +Test project .* + Start 1: house\.dog +1/6 Test #1: house\.dog \.+ +Passed +[0-9.]+ sec + Start 2: house\.cat +2/6 Test #2: house\.cat \.+ +Passed +[0-9.]+ sec + Start 3: farm\.cow +3/6 Test #3: farm\.cow \.+ +Passed +[0-9.]+ sec + Start 4: farm\.pig +4/6 Test #4: farm\.pig \.+ +Passed +[0-9.]+ sec + Start 5: zoo\.fox +5/6 Test #5: zoo\.fox \.+ +Passed +[0-9.]+ sec + Start 6: zoo\.emu +6/6 Test #6: zoo\.emu \.+ +Passed +[0-9.]+ sec + +100% tests passed, 0 tests failed out of 6 + +Total Test time \(real\) = +[0-9.]+ sec diff --git a/Tests/RunCMake/test_include_dirs/TID.cmake b/Tests/RunCMake/test_include_dirs/TID.cmake new file mode 100644 index 0000000..1e74f90 --- /dev/null +++ b/Tests/RunCMake/test_include_dirs/TID.cmake @@ -0,0 +1,29 @@ +project(test_include_dirs) +include(CTest) + +enable_testing() + +add_executable(dummy dummy.cpp) + +function(generate_tests NAME) + set(ctest_file "${CMAKE_CURRENT_BINARY_DIR}/${NAME}_tests.cmake") + add_custom_command( + OUTPUT "${ctest_file}" + COMMAND "${CMAKE_COMMAND}" + -D "TEST_EXECUTABLE=$" + -D "TEST_SUITE=${NAME}" + -D "TEST_NAMES=${ARGN}" + -D "CTEST_FILE=${ctest_file}" + -P "${CMAKE_CURRENT_SOURCE_DIR}/add-tests.cmake" + VERBATIM + ) + add_custom_target(${NAME}_tests ALL DEPENDS "${ctest_file}") +endfunction() + +generate_tests(house dog cat) +generate_tests(farm cow pig) +generate_tests(zoo fox emu) + +set_property(DIRECTORY PROPERTY TEST_INCLUDE_FILE "house_tests.cmake") +set_property(DIRECTORY APPEND PROPERTY TEST_INCLUDE_FILES "farm_tests.cmake") +set_property(DIRECTORY APPEND PROPERTY TEST_INCLUDE_FILES "zoo_tests.cmake") diff --git a/Tests/RunCMake/test_include_dirs/add-tests.cmake b/Tests/RunCMake/test_include_dirs/add-tests.cmake new file mode 100644 index 0000000..e74665a --- /dev/null +++ b/Tests/RunCMake/test_include_dirs/add-tests.cmake @@ -0,0 +1,8 @@ +set(script) + +foreach(TEST_NAME ${TEST_NAMES}) + set(script "${script}add_test(\"${TEST_SUITE}.${TEST_NAME}\"") + set(script "${script} \"${TEST_EXECUTABLE}\")\n") +endforeach() + +file(WRITE "${CTEST_FILE}" "${script}") diff --git a/Tests/RunCMake/test_include_dirs/dummy.cpp b/Tests/RunCMake/test_include_dirs/dummy.cpp new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/RunCMake/test_include_dirs/dummy.cpp @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed5bde30f70a7da8cc95e600195b58e0d936e38d commit ed5bde30f70a7da8cc95e600195b58e0d936e38d Author: Matthew Woehlke AuthorDate: Fri Jul 7 11:20:08 2017 -0400 Commit: Matthew Woehlke CommitDate: Wed Jul 12 13:28:21 2017 -0400 Add TEST_INCLUDE_FILES Add new directory property TEST_INCLUDE_FILES. This supersedes TEST_INCLUDE_FILE, though the latter is of course retained for compatibility. Basically, this is a list rather than a single file. This allows the feature to be used by generic utilities without conflicting with local use. diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 94ab70c..be7f772 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -83,7 +83,7 @@ Properties on Directories /prop_dir/RULE_LAUNCH_LINK /prop_dir/SOURCE_DIR /prop_dir/SUBDIRECTORIES - /prop_dir/TEST_INCLUDE_FILE + /prop_dir/TEST_INCLUDE_FILES /prop_dir/VARIABLES /prop_dir/VS_GLOBAL_SECTION_POST_section /prop_dir/VS_GLOBAL_SECTION_PRE_section @@ -435,6 +435,7 @@ Deprecated Properties on Directories :maxdepth: 1 /prop_dir/COMPILE_DEFINITIONS_CONFIG + /prop_dir/TEST_INCLUDE_FILE Deprecated Properties on Targets diff --git a/Help/prop_dir/TEST_INCLUDE_FILE.rst b/Help/prop_dir/TEST_INCLUDE_FILE.rst index e477951..31b2382 100644 --- a/Help/prop_dir/TEST_INCLUDE_FILE.rst +++ b/Help/prop_dir/TEST_INCLUDE_FILE.rst @@ -1,7 +1,9 @@ TEST_INCLUDE_FILE ----------------- +Deprecated. Use :prop_dir:`TEST_INCLUDE_FILES` instead. + A cmake file that will be included when ctest is run. -If you specify TEST_INCLUDE_FILE, that file will be included and +If you specify ``TEST_INCLUDE_FILE``, that file will be included and processed when ctest is run on the directory. diff --git a/Help/prop_dir/TEST_INCLUDE_FILES.rst b/Help/prop_dir/TEST_INCLUDE_FILES.rst new file mode 100644 index 0000000..c3e4602 --- /dev/null +++ b/Help/prop_dir/TEST_INCLUDE_FILES.rst @@ -0,0 +1,7 @@ +TEST_INCLUDE_FILES +------------------ + +A list of cmake files that will be included when ctest is run. + +If you specify ``TEST_INCLUDE_FILES``, those files will be included and +processed when ctest is run on the directory. diff --git a/Help/release/dev/test_include_files.rst b/Help/release/dev/test_include_files.rst new file mode 100644 index 0000000..b75dd0d --- /dev/null +++ b/Help/release/dev/test_include_files.rst @@ -0,0 +1,7 @@ +test_include_files +------------------ + +* A :prop_dir:`TEST_INCLUDE_FILES` directory property was added to + list any number of files to be included when running tests with + :manual:`ctest(1)`. This generalizes the :prop_dir:`TEST_INCLUDE_FILE` + property. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 8e00303..96d8707 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -259,6 +259,17 @@ void cmLocalGenerator::GenerateTestFiles() fout << "include(\"" << testIncludeFile << "\")" << std::endl; } + const char* testIncludeFiles = + this->Makefile->GetProperty("TEST_INCLUDE_FILES"); + if (testIncludeFiles) { + std::vector includesList; + cmSystemTools::ExpandListArgument(testIncludeFiles, includesList); + for (std::vector::const_iterator i = includesList.begin(); + i != includesList.end(); ++i) { + fout << "include(\"" << *i << "\")" << std::endl; + } + } + // Ask each test generator to write its code. std::vector const& testers = this->Makefile->GetTestGenerators(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=376dc3eb2218c64db50ae53c04376dfb42c538ba commit 376dc3eb2218c64db50ae53c04376dfb42c538ba Author: Betsy McPhail AuthorDate: Fri Jun 30 11:35:04 2017 -0400 Commit: Brad King CommitDate: Mon Jul 10 16:25:19 2017 -0400 Help: Add notes for topic 'labels_for_subprojects' diff --git a/Help/release/dev/labels_for_subprojects.rst b/Help/release/dev/labels_for_subprojects.rst new file mode 100644 index 0000000..7344502 --- /dev/null +++ b/Help/release/dev/labels_for_subprojects.rst @@ -0,0 +1,14 @@ +labels_for_subprojects +---------------------- + +* A :variable:`CTEST_LABELS_FOR_SUBPROJECTS` CTest module variable and CTest + script variable was added to specify a list of labels that should be treated + as subprojects by CDash. To use this value in both the CTest module and the + ctest command line `Dashboard Client` mode (e.g. ctest -S) set it in the + CTestConfig.cmake config file. + +* A :prop_dir:`LABELS` directory property was added to specify labels + for all targets and tests in a directory. + +* A :variable:`CMAKE_DIRECTORY_LABELS` variable was added to specify + labels for all tests in a directory. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a70d8e93e82e1a8fa37b4c9c0b23210d5031fd75 commit a70d8e93e82e1a8fa37b4c9c0b23210d5031fd75 Author: Betsy McPhail AuthorDate: Fri Jun 30 12:15:30 2017 -0400 Commit: Brad King CommitDate: Mon Jul 10 16:25:19 2017 -0400 Add tests for new directory labels and labels-for-subprojects features diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 246138b..e15dd6c 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -348,6 +348,7 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") list(APPEND CompilerLauncher_ARGS -DCMake_TEST_CUDA=${CMake_TEST_CUDA}) endif() add_RunCMake_test(CompilerLauncher) + add_RunCMake_test(ctest_labels_for_subprojects) endif() add_RunCMake_test_group(CPack "DEB;RPM;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ") diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CMakeLists.txt.in b/Tests/RunCMake/ctest_labels_for_subprojects/CMakeLists.txt.in new file mode 100644 index 0000000..30dd37e --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CMakeLists.txt.in @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.9) + at CASE_CMAKELISTS_PREFIX_CODE@ +project(CTestLabelsForSubprojects at CASE_NAME@ NONE) +include(CTest) + at CASE_CMAKELISTS_SUFFIX_CODE@ diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in new file mode 100644 index 0000000..1e1905b --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in @@ -0,0 +1,2 @@ +set(CTEST_PROJECT_NAME "CTestLabelsForSubprojects at CASE_NAME@") + at CTEST_EXTRA_CONFIG@ diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-check.cmake b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-check.cmake new file mode 100644 index 0000000..ea05851 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-check.cmake @@ -0,0 +1,36 @@ +set(EXPERIMENTAL_FEATURE_REGEX ".*.*") +set(PRODUCTION_CODE_REGEX ".*.*") +set(SUBPROJECTS_REGEX "${EXPERIMENTAL_FEATURE_REGEX}.*${PRODUCTION_CODE_REGEX}") + +file(GLOB configure_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Configure.xml") +if(configure_xml_file) + file(READ "${configure_xml_file}" configure_xml) + if(NOT configure_xml MATCHES "${SUBPROJECTS_REGEX}.*") + set(RunCMake_TEST_FAILED "Configure.xml does not contain the expected list of subprojects") + endif() +else() + set(RunCMake_TEST_FAILED "Configure.xml not found") +endif() + +file(GLOB build_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Build.xml") +if(build_xml_file) + file(READ "${build_xml_file}" build_xml) + set(BUILD_WARNING_REGEX ".*.*.*") + if(NOT build_xml MATCHES "${SUBPROJECTS_REGEX}.*.*${BUILD_ERROR_REGEX}.*") + set(RunCMake_TEST_FAILED "Build.xml does not contain the expected list of subprojects and labels") + endif() +else() + set(RunCMake_TEST_FAILED "Build.xml not found") +endif() + +file(GLOB test_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Test.xml") +if(test_xml_file) + file(READ "${test_xml_file}" test_xml) + set(TEST_FAILED_REGEX ".*.*.*.*") + set(TEST_PASSED_REGEX ".*.*.*") + if(NOT test_xml MATCHES "${SUBPROJECTS_REGEX}.*.*${TEST_FAILED_REGEX}.*${TEST_PASSED_REGEX}.*${TEST_NOTRUN_REGEX}.*") + set(RunCMake_TEST_FAILED "Test.xml does not contain the expected list of subprojects and labels") + endif() +else() + set(RunCMake_TEST_FAILED "${CTEST_BINARY_DIRECTORY}/Testing/*/Test.xml not found") +endif() diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt new file mode 100644 index 0000000..ae00e51 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt @@ -0,0 +1,7 @@ +17% tests passed, 5 tests failed out of 6 ++ +Subproject Time Summary: +MyExperimentalFeature += +[0-9.]+ sec \(5 tests\) +MyProductionCode += +[0-9.]+ sec \(1 test\) ++ +Total Test time \(real\) = +[0-9.]+ sec diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-check.cmake b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-check.cmake new file mode 100644 index 0000000..ea05851 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-check.cmake @@ -0,0 +1,36 @@ +set(EXPERIMENTAL_FEATURE_REGEX ".*.*") +set(PRODUCTION_CODE_REGEX ".*.*") +set(SUBPROJECTS_REGEX "${EXPERIMENTAL_FEATURE_REGEX}.*${PRODUCTION_CODE_REGEX}") + +file(GLOB configure_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Configure.xml") +if(configure_xml_file) + file(READ "${configure_xml_file}" configure_xml) + if(NOT configure_xml MATCHES "${SUBPROJECTS_REGEX}.*") + set(RunCMake_TEST_FAILED "Configure.xml does not contain the expected list of subprojects") + endif() +else() + set(RunCMake_TEST_FAILED "Configure.xml not found") +endif() + +file(GLOB build_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Build.xml") +if(build_xml_file) + file(READ "${build_xml_file}" build_xml) + set(BUILD_WARNING_REGEX ".*.*.*") + if(NOT build_xml MATCHES "${SUBPROJECTS_REGEX}.*.*${BUILD_ERROR_REGEX}.*") + set(RunCMake_TEST_FAILED "Build.xml does not contain the expected list of subprojects and labels") + endif() +else() + set(RunCMake_TEST_FAILED "Build.xml not found") +endif() + +file(GLOB test_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Test.xml") +if(test_xml_file) + file(READ "${test_xml_file}" test_xml) + set(TEST_FAILED_REGEX ".*.*.*.*") + set(TEST_PASSED_REGEX ".*.*.*") + if(NOT test_xml MATCHES "${SUBPROJECTS_REGEX}.*.*${TEST_FAILED_REGEX}.*${TEST_PASSED_REGEX}.*${TEST_NOTRUN_REGEX}.*") + set(RunCMake_TEST_FAILED "Test.xml does not contain the expected list of subprojects and labels") + endif() +else() + set(RunCMake_TEST_FAILED "${CTEST_BINARY_DIRECTORY}/Testing/*/Test.xml not found") +endif() diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt new file mode 100644 index 0000000..ae00e51 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt @@ -0,0 +1,7 @@ +17% tests passed, 5 tests failed out of 6 ++ +Subproject Time Summary: +MyExperimentalFeature += +[0-9.]+ sec \(5 tests\) +MyProductionCode += +[0-9.]+ sec \(1 test\) ++ +Total Test time \(real\) = +[0-9.]+ sec diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-check.cmake b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-check.cmake new file mode 100644 index 0000000..7beefba --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-check.cmake @@ -0,0 +1,34 @@ +set(THIRD_PARTY_REGEX ".*.*") +set(SUBPROJECTS_REGEX "${THIRD_PARTY_REGEX}") + +file(GLOB configure_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Configure.xml") +if(configure_xml_file) + file(READ "${configure_xml_file}" configure_xml) + if(NOT configure_xml MATCHES "${SUBPROJECTS_REGEX}.*") + set(RunCMake_TEST_FAILED "Configure.xml does not contain the expected list of subprojects") + endif() +else() + set(RunCMake_TEST_FAILED "Configure.xml not found") +endif() + +file(GLOB build_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Build.xml") +if(build_xml_file) + file(READ "${build_xml_file}" build_xml) + set(BUILD_ERROR_REGEX ".*.*.*.*") + if(NOT build_xml MATCHES "${SUBPROJECTS_REGEX}.*.*${BUILD_ERROR_REGEX}.*") + set(RunCMake_TEST_FAILED "Build.xml does not contain the expected list of subprojects and labels") + endif() +else() + set(RunCMake_TEST_FAILED "Build.xml not found") +endif() + +file(GLOB test_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Test.xml") +if(test_xml_file) + file(READ "${test_xml_file}" test_xml) + set(TEST_NOTRUN_REGEX ".*.*.*.*") + if(NOT test_xml MATCHES "${SUBPROJECTS_REGEX}.*.*${TEST_FAILED_REGEX}.*${TEST_PASSED_REGEX}.*${TEST_NOTRUN_REGEX}.*") + set(RunCMake_TEST_FAILED "Test.xml does not contain the expected list of subprojects and labels") + endif() +else() + set(RunCMake_TEST_FAILED "${CTEST_BINARY_DIRECTORY}/Testing/*/Test.xml not found") +endif() diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-result.txt b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stderr.txt b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stderr.txt new file mode 100644 index 0000000..38566fb --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stderr.txt @@ -0,0 +1 @@ +Unable to find executable:.*MyThirdPartyDependency/src/thirdparty diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt new file mode 100644 index 0000000..a78a99a --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt @@ -0,0 +1,6 @@ +0% tests passed, 1 tests failed out of 1 ++ +Subproject Time Summary: +MyThirdPartyDependency += +[0-9.]+ sec \(1 test\) ++ +Total Test time \(real\) = +[0-9.]+ sec diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-result.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-result.txt new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-result.txt @@ -0,0 +1 @@ +8 diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-stderr.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-stderr.txt new file mode 100644 index 0000000..ba4235d --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-stderr.txt @@ -0,0 +1 @@ +Errors while running CTest diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-stdout.txt new file mode 100644 index 0000000..b5d76a9 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-stdout.txt @@ -0,0 +1,6 @@ +50% tests passed, 1 tests failed out of 2 ++ +Subproject Time Summary: +MySubproject += +[0-9.]+ sec \(2 tests\) ++ +Total Test time \(real\) = +[0-9.]+ sec diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-result.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-result.txt new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-result.txt @@ -0,0 +1 @@ +8 diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stderr.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stderr.txt new file mode 100644 index 0000000..ba4235d --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stderr.txt @@ -0,0 +1 @@ +Errors while running CTest diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt new file mode 100644 index 0000000..01851fd --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt @@ -0,0 +1,6 @@ +67% tests passed, 1 tests failed out of 3 ++ +Subproject Time Summary: +MySubproject += +[0-9.]+ sec \(2 tests\) ++ +Total Test time \(real\) = +[0-9.]+ sec diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-result.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-result.txt new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-result.txt @@ -0,0 +1 @@ +8 diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stderr.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stderr.txt new file mode 100644 index 0000000..ba4235d --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stderr.txt @@ -0,0 +1 @@ +Errors while running CTest diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt new file mode 100644 index 0000000..0209bfe --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt @@ -0,0 +1,7 @@ +67% tests passed, 1 tests failed out of 3 ++ +Label Time Summary: +MySubproject += +[0-9.]+ sec \(2 tests\) +NotASubproject += +[0-9.]+ sec \(1 test\) ++ +Total Test time \(real\) = +[0-9.]+ sec diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-result.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-result.txt new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-result.txt @@ -0,0 +1 @@ +8 diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-stderr.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-stderr.txt new file mode 100644 index 0000000..ba4235d --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-stderr.txt @@ -0,0 +1 @@ +Errors while running CTest diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-stdout.txt b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-stdout.txt new file mode 100644 index 0000000..b5d76a9 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-stdout.txt @@ -0,0 +1,6 @@ +50% tests passed, 1 tests failed out of 2 ++ +Subproject Time Summary: +MySubproject += +[0-9.]+ sec \(2 tests\) ++ +Total Test time \(real\) = +[0-9.]+ sec diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/MyExperimentalFeature/CMakeLists.txt b/Tests/RunCMake/ctest_labels_for_subprojects/MyExperimentalFeature/CMakeLists.txt new file mode 100644 index 0000000..cc07a07 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/MyExperimentalFeature/CMakeLists.txt @@ -0,0 +1,33 @@ +project(MyExperimentalFeature) +cmake_minimum_required(VERSION 3.8) + +include(CTest) + +set(CMAKE_DIRECTORY_LABELS "MyExperimentalFeature;NotASubproject") + +add_executable(testapp experimental.c) + +add_test(experimentalFail1 testapp 5) +set_tests_properties (experimentalFail1 + PROPERTIES PASS_REGULAR_EXPRESSION "Test!" + ) + +add_test(experimentalFail2 testapp -5) +set_tests_properties (experimentalFail2 + PROPERTIES PASS_REGULAR_EXPRESSION "Test!" + ) + +add_test(experimentalFail3 testapp -5) +set_tests_properties (experimentalFail3 + PROPERTIES PASS_REGULAR_EXPRESSION "Test!" + ) + +add_test(experimentalFail4 testapp -5) +set_tests_properties (experimentalFail4 + PROPERTIES PASS_REGULAR_EXPRESSION "Test!" + ) + +add_test(experimentalFail5 testapp -5) +set_tests_properties (experimentalFail5 + PROPERTIES PASS_REGULAR_EXPRESSION "Test!" + ) diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/MyExperimentalFeature/experimental.c b/Tests/RunCMake/ctest_labels_for_subprojects/MyExperimentalFeature/experimental.c new file mode 100644 index 0000000..7cb11ae --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/MyExperimentalFeature/experimental.c @@ -0,0 +1,16 @@ +#include + +int main(void) +{ + int i = 0; + if (i > 0) { + printf("This doesn't happen.\n"); + printf("Neither does this.\n"); + } + i = i + 1; + if (i > 0) { + printf("This does happen.\n"); + } + + return 0; +} diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/MyProductionCode/CMakeLists.txt b/Tests/RunCMake/ctest_labels_for_subprojects/MyProductionCode/CMakeLists.txt new file mode 100644 index 0000000..c2ee673 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/MyProductionCode/CMakeLists.txt @@ -0,0 +1,12 @@ +project(MyProductionCode) +cmake_minimum_required(VERSION 3.8) + +include(CTest) + +add_executable(production production.c) +add_test(NAME production COMMAND production) + +set_property(TARGET production PROPERTY LABELS MyProductionCode) +set_property(TEST production PROPERTY LABELS MyProductionCode) + +set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY LABELS "NotASubproject") diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/MyProductionCode/production.c b/Tests/RunCMake/ctest_labels_for_subprojects/MyProductionCode/production.c new file mode 100644 index 0000000..54dc2be --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/MyProductionCode/production.c @@ -0,0 +1,16 @@ +#include + +int main(void) +{ + int j = 0; + if (j > 0) { + printf("This doesn't happen.\n"); + printf("Neither does this.\n"); + } + j = j + 1; + if (j > 0) { + printf("This does happen.\n"); + } + + return 0; +} diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/CMakeLists.txt b/Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/CMakeLists.txt new file mode 100644 index 0000000..d5b9c2f --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/CMakeLists.txt @@ -0,0 +1,7 @@ +project(MyThirdPartyDependency) +cmake_minimum_required(VERSION 3.8) + +include(CTest) + +set_directory_properties(PROPERTIES LABELS "NotASubproject;MyThirdPartyDependency") +add_subdirectory(src) diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/src/CMakeLists.txt b/Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/src/CMakeLists.txt new file mode 100644 index 0000000..dc6cb2a --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/src/CMakeLists.txt @@ -0,0 +1,10 @@ +project(MyThirdPartyDependency) +cmake_minimum_required(VERSION 3.8) + +include(CTest) + +add_executable(thirdparty thirdparty.c) +add_test(NAME thirdparty COMMAND thirdparty) + +set_property(TARGET thirdparty PROPERTY LABELS NotASubproject) +set_property(TEST thirdparty PROPERTY LABELS NotASubproject) diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/src/thirdparty.c b/Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/src/thirdparty.c new file mode 100644 index 0000000..babe82d --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/src/thirdparty.c @@ -0,0 +1,14 @@ +#include + +int main(void) +{ + printf(This function has an error!\n"); + n = 5; + return 0; +} + +int notcalled() +{ + printf(This function doesn't get called.\n"); + return 0; +} diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/RunCMakeTest.cmake b/Tests/RunCMake/ctest_labels_for_subprojects/RunCMakeTest.cmake new file mode 100644 index 0000000..dbe7bf8 --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/RunCMakeTest.cmake @@ -0,0 +1,185 @@ +include(RunCTest) + + +# 1. Specify subprojects in the CTest script +function(run_CTestScriptVariable) + set(CTEST_EXTRA_CONFIG "set(CTEST_USE_LAUNCHERS 1)") + set(CASE_TEST_PREFIX_CODE [[ +file(COPY "${CTEST_RUNCMAKE_SOURCE_DIRECTORY}/MyProductionCode" + DESTINATION ${CTEST_SOURCE_DIRECTORY}) +file(COPY "${CTEST_RUNCMAKE_SOURCE_DIRECTORY}/MyExperimentalFeature" + DESTINATION ${CTEST_SOURCE_DIRECTORY}) + +set(CTEST_LABELS_FOR_SUBPROJECTS "MyProductionCode;MyExperimentalFeature") + ]]) + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +add_subdirectory(MyExperimentalFeature) +add_subdirectory(MyProductionCode) + ]]) + + run_ctest(CTestScriptVariable) + + unset(CTEST_EXTRA_CONFIG) + unset(CASE_TEST_PREFIX_CODE) + unset(CASE_CMAKELISTS_SUFFIX_CODE) +endfunction() +run_CTestScriptVariable() + +# 2. Specify subprojects via a CTest script variable on the command line e.g. +# ctest -S test.cmake -DCTEST_LABELS_FOR_SUBPROJECTS:STRING="MySubproject" +# Note: This test includes a failing build +function(run_CTestScriptVariableCommandLine) + set(CTEST_EXTRA_CONFIG "set(CTEST_USE_LAUNCHERS 1)") + set(CASE_TEST_PREFIX_CODE [[ +file(COPY "${CTEST_RUNCMAKE_SOURCE_DIRECTORY}/MyThirdPartyDependency" + DESTINATION ${CTEST_SOURCE_DIRECTORY}) + ]]) + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +add_subdirectory(MyThirdPartyDependency) + ]]) + + run_ctest(CTestScriptVariableCommandLine "-DCTEST_LABELS_FOR_SUBPROJECTS:STRING=MyThirdPartyDependency") + + unset(CTEST_EXTRA_CONFIG) + unset(CASE_TEST_PREFIX_CODE) + unset(CASE_CMAKELISTS_SUFFIX_CODE) +endfunction() +run_CTestScriptVariableCommandLine() + +# 3. Set subprojects via a CTest module variable on the command line +# (will populate DartConfiguration.tcl) +function(run_ModuleVariableCommandLine) + set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/ModuleVariableCommandLine") + set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/ModuleVariableCommandLine-build") + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_SOURCE_DIR}") + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +set(someFile "${CMAKE_CURRENT_SOURCE_DIR}/test.cmake") +add_test(NAME SuccessfulTest COMMAND "${CMAKE_COMMAND}" --version) +set_property(TEST SuccessfulTest PROPERTY LABELS MySubproject) +add_test(NAME FailingTest + COMMAND ${CMAKE_COMMAND} -E compare_files "${someFile}" "${someFile}xxx") +set_property(TEST FailingTest PROPERTY LABELS MySubproject) + ]]) + configure_file(${RunCMake_SOURCE_DIR}/CMakeLists.txt.in + ${RunCMake_TEST_SOURCE_DIR}/CMakeLists.txt @ONLY) + + set(RunCMake_TEST_OPTIONS "-DCTEST_LABELS_FOR_SUBPROJECTS:STRING=MySubproject") + run_cmake(ModuleVariableCommandLine-cmake) + unset(RunCMake_TEST_OPTIONS) + run_cmake_command(ModuleVariableCommandLine ${CMAKE_CTEST_COMMAND} -C Debug -V) + + unset(RunCMake_TEST_SOURCE_DIR) + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + unset(CASE_CMAKELISTS_SUFFIX_CODE) +endfunction() +run_ModuleVariableCommandLine() + +# 4. Set subprojects via a CTest module variable in CMakeLists.txt +# (will populate DartConfiguration.tcl) +function(run_ModuleVariableCMakeLists) + set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/ModuleVariableCMakeLists") + set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/ModuleVariableCMakeLists-build") + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_SOURCE_DIR}") + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + + set(CASE_CMAKELISTS_PREFIX_CODE [[ +set(CTEST_LABELS_FOR_SUBPROJECTS MySubproject) +]]) + + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +set(someFile "${CMAKE_CURRENT_SOURCE_DIR}/test.cmake") +add_test(NAME SuccessfulTest COMMAND "${CMAKE_COMMAND}" --version) +set_property(TEST SuccessfulTest PROPERTY LABELS MySubproject) +add_test(NAME FailingTest + COMMAND ${CMAKE_COMMAND} -E compare_files "${someFile}" "${someFile}xxx") +set_property(TEST FailingTest PROPERTY LABELS MySubproject) + ]]) + configure_file(${RunCMake_SOURCE_DIR}/CMakeLists.txt.in + ${RunCMake_TEST_SOURCE_DIR}/CMakeLists.txt @ONLY) + + run_cmake(ModuleVariableCMakeLists-cmake) + run_cmake_command(ModuleVariableCMakeLists ${CMAKE_CTEST_COMMAND} -C Debug -V) + + unset(RunCMake_TEST_SOURCE_DIR) + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + unset(CASE_CMAKELISTS_SUFFIX_CODE) + unset(CASE_CMAKELISTS_SUFFIX_CODE) +endfunction() +run_ModuleVariableCMakeLists() + +# The remaining tests set subprojects in CTestConfig.cmake. Settings in this +# config file are shared by both the CTest module and the ctest command line +# `Dashboard Client` mode (e.g. ctest -S). + +function(run_ModuleVariableCTestConfig CASE_NAME) + set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/${CASE_NAME}") + set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${CASE_NAME}-build") + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_SOURCE_DIR}") + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + + set(CTEST_EXTRA_CONFIG "set(CTEST_LABELS_FOR_SUBPROJECTS \"MySubproject\")") + configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in + ${RunCMake_TEST_SOURCE_DIR}/CTestConfig.cmake @ONLY) + + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +set(someFile "${CMAKE_CURRENT_SOURCE_DIR}/test.cmake") +add_test(NAME SuccessfulTest COMMAND "${CMAKE_COMMAND}" --version) +set_property(TEST SuccessfulTest PROPERTY LABELS MySubproject) +add_test(NAME FailingTest + COMMAND ${CMAKE_COMMAND} -E compare_files "${someFile}" "${someFile}xxx") +set_property(TEST FailingTest PROPERTY LABELS MySubproject) +add_test(NAME AnotherSuccessfulTest COMMAND "${CMAKE_COMMAND}" --version) +set_property(TEST AnotherSuccessfulTest PROPERTY LABELS NotASubproject) + ]]) + configure_file(${RunCMake_SOURCE_DIR}/CMakeLists.txt.in + ${RunCMake_TEST_SOURCE_DIR}/CMakeLists.txt @ONLY) + + run_cmake(${CASE_NAME}-cmake) + run_cmake_command(${CASE_NAME} ${CMAKE_CTEST_COMMAND} -C Debug -V ${ARGN}) + + unset(RunCMake_TEST_SOURCE_DIR) + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + unset(CTEST_EXTRA_CONFIG) + unset(CASE_CMAKELISTS_SUFFIX_CODE) +endfunction() + +# 5. Check that the Subproject timing Summary is printed +run_ModuleVariableCTestConfig(ModuleVariableCTestConfig) + +# 6. Use --no-subproject-summary to disable the Subproject timing summary. +run_ModuleVariableCTestConfig(ModuleVariableCTestConfigNoSummary --no-subproject-summary) + +# 7. Verify that subprojects are sent to CDash when running a CTest script +function(run_CTestConfigCTestScript) + set(CTEST_EXTRA_CONFIG [[ +set(CTEST_USE_LAUNCHERS 1) +set(CTEST_LABELS_FOR_SUBPROJECTS "MyProductionCode;MyExperimentalFeature") + ]]) + set(CASE_TEST_PREFIX_CODE [[ +file(COPY "${CTEST_RUNCMAKE_SOURCE_DIRECTORY}/MyProductionCode" + DESTINATION ${CTEST_SOURCE_DIRECTORY}) +file(COPY "${CTEST_RUNCMAKE_SOURCE_DIRECTORY}/MyExperimentalFeature" + DESTINATION ${CTEST_SOURCE_DIRECTORY}) + ]]) + set(CASE_CMAKELISTS_SUFFIX_CODE [[ +add_subdirectory(MyExperimentalFeature) +add_subdirectory(MyProductionCode) + ]]) + run_ctest(CTestConfigCTestScript) + + unset(CTEST_EXTRA_CONFIG) + unset(CASE_TEST_PREFIX_CODE) + unset(CASE_CMAKELISTS_SUFFIX_CODE) +endfunction() +run_CTestConfigCTestScript() diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/test.cmake.in b/Tests/RunCMake/ctest_labels_for_subprojects/test.cmake.in new file mode 100644 index 0000000..8cec08d --- /dev/null +++ b/Tests/RunCMake/ctest_labels_for_subprojects/test.cmake.in @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.7) + +# Settings: + +set(CTEST_SITE "test-site") +set(CTEST_BUILD_NAME "test-build-name") +set(CTEST_SOURCE_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@") +set(CTEST_BINARY_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME at -build") +set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@") +set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") +set(CTEST_RUNCMAKE_SOURCE_DIRECTORY "@RunCMake_SOURCE_DIR@") + + at CASE_TEST_PREFIX_CODE@ + +set(ctest_test_args "@CASE_CTEST_TEST_ARGS@") +ctest_start(Experimental) +ctest_configure() +ctest_build() +ctest_test(${ctest_test_args}) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47b3a57c9bc5c7db608bc3b59b139a902535255f commit 47b3a57c9bc5c7db608bc3b59b139a902535255f Author: Betsy McPhail AuthorDate: Fri Jun 23 13:03:05 2017 -0400 Commit: Brad King CommitDate: Mon Jul 10 16:25:18 2017 -0400 Display subproject timing summary Use the '--no-subproject-summary' option to disable timing summary. diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 16529e2..03466ce 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -250,6 +250,13 @@ Options label associated with the tests run. If there are no labels on the tests, nothing extra is printed. + ``--no-subproject-summary`` + Disable timing summary information for subprojects. + + This option tells ctest not to print summary information for each + subproject associated with the tests run. If there are no subprojects on the + tests, nothing extra is printed. + ``--build-and-test `` Configure, build and run a test. diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index b0e799c..63d696f 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -536,9 +536,14 @@ int cmCTestTestHandler::ProcessHandler() << static_cast(percent + .5f) << "% tests passed, " << failed.size() << " tests failed out of " << total << std::endl); - if (this->CTest->GetLabelSummary()) { + + if (!this->CTest->GetLabelsForSubprojects().empty() && + this->CTest->GetSubprojectSummary()) { + this->PrintSubprojectSummary(); + } else if (this->CTest->GetLabelSummary()) { this->PrintLabelSummary(); } + char realBuf[1024]; sprintf(realBuf, "%6.2f sec", (double)(clock_finish - clock_start)); cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, @@ -688,6 +693,84 @@ void cmCTestTestHandler::PrintLabelSummary() } } +void cmCTestTestHandler::PrintSubprojectSummary() +{ + std::vector subprojects = + this->CTest->GetLabelsForSubprojects(); + + cmCTestTestHandler::ListOfTests::iterator it = this->TestList.begin(); + std::map labelTimes; + std::map labelCounts; + std::set labels; + // initialize maps + std::string::size_type maxlen = 0; + for (; it != this->TestList.end(); ++it) { + cmCTestTestProperties& p = *it; + for (std::vector::iterator l = p.Labels.begin(); + l != p.Labels.end(); ++l) { + std::vector::iterator subproject = + std::find(subprojects.begin(), subprojects.end(), *l); + if (subproject != subprojects.end()) { + if ((*l).size() > maxlen) { + maxlen = (*l).size(); + } + labels.insert(*l); + labelTimes[*l] = 0; + labelCounts[*l] = 0; + } + } + } + cmCTestTestHandler::TestResultsVector::iterator ri = + this->TestResults.begin(); + // fill maps + for (; ri != this->TestResults.end(); ++ri) { + cmCTestTestResult& result = *ri; + cmCTestTestProperties& p = *result.Properties; + for (std::vector::iterator l = p.Labels.begin(); + l != p.Labels.end(); ++l) { + std::vector::iterator subproject = + std::find(subprojects.begin(), subprojects.end(), *l); + if (subproject != subprojects.end()) { + labelTimes[*l] += result.ExecutionTime; + ++labelCounts[*l]; + } + } + } + // now print times + if (!labels.empty()) { + cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, + "\nSubproject Time Summary:", this->Quiet); + } + for (std::set::const_iterator i = labels.begin(); + i != labels.end(); ++i) { + std::string label = *i; + label.resize(maxlen + 3, ' '); + + char buf[1024]; + sprintf(buf, "%6.2f sec", labelTimes[*i]); + + std::ostringstream labelCountStr; + labelCountStr << "(" << labelCounts[*i] << " test"; + if (labelCounts[*i] > 1) { + labelCountStr << "s"; + } + labelCountStr << ")"; + + cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n" + << label << " = " << buf << " " + << labelCountStr.str(), + this->Quiet); + if (this->LogFile) { + *this->LogFile << "\n" << *i << " = " << buf << "\n"; + } + } + if (!labels.empty()) { + if (this->LogFile) { + *this->LogFile << "\n"; + } + cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n", this->Quiet); + } +} void cmCTestTestHandler::CheckLabelFilterInclude(cmCTestTestProperties& it) { // if not using Labels to filter then return diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index a623984..b82e382 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -232,6 +232,8 @@ private: virtual void GenerateDartOutput(cmXMLWriter& xml); void PrintLabelSummary(); + void PrintSubprojectSummary(); + /** * Run the tests for a directory and any subdirectories */ diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 1eedaf1..dfd7d6b 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -253,6 +253,7 @@ std::string cmCTest::DecodeURL(const std::string& in) cmCTest::cmCTest() { this->LabelSummary = true; + this->SubprojectSummary = true; this->ParallelLevel = 1; this->ParallelLevelSetInCli = false; this->TestLoad = 0; @@ -1794,6 +1795,9 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, if (this->CheckArgument(arg, "--no-label-summary")) { this->LabelSummary = false; } + if (this->CheckArgument(arg, "--no-subproject-summary")) { + this->SubprojectSummary = false; + } if (this->CheckArgument(arg, "-Q", "--quiet")) { this->Quiet = true; } diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 190269a..0d2a903 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -438,7 +438,9 @@ public: this->StreamErr = err; } void AddSiteProperties(cmXMLWriter& xml); + bool GetLabelSummary() { return this->LabelSummary; } + bool GetSubprojectSummary() { return this->SubprojectSummary; } std::string GetCostDataFile(); @@ -467,6 +469,7 @@ private: bool ExtraVerbose; bool ProduceXML; bool LabelSummary; + bool SubprojectSummary; bool UseHTTP10; bool PrintLabels; bool Failover; diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 84e815d..8f9e676 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -83,6 +83,8 @@ static const char* cmDocumentationOptions[][2] = { { "--max-width ", "Set the max width for a test name to output" }, { "--interactive-debug-mode [0|1]", "Set the interactive mode to 0 or 1." }, { "--no-label-summary", "Disable timing summary information for labels." }, + { "--no-subproject-summary", "Disable timing summary information for " + "subprojects." }, { "--build-and-test", "Configure, build and run a test." }, { "--build-target", "Specify a specific target to build." }, { "--build-nocmake", "Run the build without running cmake first." }, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d385962419ea3109dd21093c2368379f5fb51722 commit d385962419ea3109dd21093c2368379f5fb51722 Author: Betsy McPhail AuthorDate: Fri Jun 23 12:12:00 2017 -0400 Commit: Brad King CommitDate: Mon Jul 10 16:25:18 2017 -0400 Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variable The specified LABELS will be passed down to subdirectories as well as any targets or tests in the directory. diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim index 15dd30a..b06fa42 100644 --- a/Auxiliary/vim/syntax/cmake.vim +++ b/Auxiliary/vim/syntax/cmake.vim @@ -31,9 +31,8 @@ syn region cmakeEnvironment start="$ENV{" end="}" contained oneline contains=cma syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeArguments,cmakeTodo syn case match - syn keyword cmakeProperty contained - \ ABSTRACT ADDITIONAL_MAKE_CLEAN_FILES ADVANCED ALIASED_TARGET ALLOW_DUPLICATE_CUSTOM_TARGETS ANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_API ANDROID_API_MIN ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES ANDROID_GUI ANDROID_JAR_DEPENDENCIES ANDROID_JAR_DIRECTORIES ANDROID_JAVA_SOURCE_DIR ANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES ANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH ANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE ARCHIVE_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY_DEBUG ARCHIVE_OUTPUT_DIRECTORY_RELEASE ARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_DEBUG ARCHIVE_OUTPUT_NAME_RELEASE ATTACHED_FILES ATTACHED_FILES_ON_FAIL AUTOGEN_TARGETS_FOLDER AUTOGEN_TARGET_DEPENDS AUTOMOC AUTOMOC_MOC_OPTIONS AUTOMOC_TARGETS_FOLDER AUTORCC AUTORCC_OPTIONS AUTOUIC AUTOUIC_OPTIONS BINARY_DIR BUILD_WITH_INSTALL_RPATH BUNDLE BUNDLE_EXTENSION CACHE_VARIABLES CLEAN_NO_CUSTOM CMAKE_CONFIGURE_DEPENDS CMAKE_CXX_KNOWN_FEATURES CMAKE_C_KNOWN_FEATURES COMPATIBLE_INTERFACE_BOOL COMPATIBLE_INTERFACE_NUMBER_MAX COMPATIBLE_INTERFACE_NUMBER_MIN COMPATIBLE_INTERFACE_STRING COMPILE_DEFINITIONS COMPILE_DEFINITIONS_DEBUG COMPILE_DEFINITIONS_RELEASE COMPILE_FEATURES COMPILE_FLAGS COMPILE_OPTIONS COMPILE_PDB_NAME COMPILE_PDB_NAME_DEBUG COMPILE_PDB_NAME_RELEASE COMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE COST CPACK_DESKTOP_SHORTCUTS CPACK_NEVER_OVERWRITE CPACK_PERMANENT CPACK_STARTUP_SHORTCUTS CPACK_START_MENU_SHORTCUTS CPACK_WIX_ACL CROSSCOMPILING_EMULATOR CXX_EXTENSIONS CXX_STANDARD CXX_STANDARD_REQUIRED C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED DEBUG_CONFIGURATIONS DEBUG_POSTFIX DEFINE_SYMBOL DEFINITIONS DEPENDS DISABLED_FEATURES ECLIPSE_EXTRA_NATURES ENABLED_FEATURES ENABLED_LANGUAGES ENABLE_EXPORTS ENVIRONMENT EXCLUDE_FROM_ALL EXCLUDE_FROM_DEFAULT_BUILD EXCLUDE_FROM_DEFAULT_BUILD_DEBUG EXCLUDE_FROM_DEFAULT_BUILD_RELEASE EXPORT_NAME EXTERNAL_OBJECT EchoString FAIL_REGULAR_EXPRESSION FIND_LIBRARY_USE_LIB64_PATHS FIND_LIBRARY_USE_OPENBSD_VERSIONING FOLDER FRAMEWORK FRAMEWORK_VERSION Fortran_FORMAT Fortran_MODULE_DIRECTORY GENERATED GENERATOR_FILE_NAME GLOBAL_DEPENDS_DEBUG_MODE GLOBAL_DEPENDS_NO_CYCLES GNUtoMS HAS_CXX HEADER_FILE_ONLY HELPSTRING IMPLICIT_DEPENDS_INCLUDE_TRANSFORM IMPORTED IMPORTED_CONFIGURATIONS IMPORTED_IMPLIB IMPORTED_IMPLIB_DEBUG IMPORTED_IMPLIB_RELEASE IMPORTED_LINK_DEPENDENT_LIBRARIES IMPORTED_LINK_DEPENDENT_LIBRARIES_DEBUG IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE IMPORTED_LINK_INTERFACE_LANGUAGES IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE IMPORTED_LINK_INTERFACE_LIBRARIES IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE IMPORTED_LINK_INTERFACE_MULTIPLICITY IMPORTED_LINK_INTERFACE_MULTIPLICITY_DEBUG IMPORTED_LINK_INTERFACE_MULTIPLICITY_RELEASE IMPORTED_LOCATION IMPORTED_LOCATION_DEBUG IMPORTED_LOCATION_RELEASE IMPORTED_NO_SONAME IMPORTED_NO_SONAME_DEBUG IMPORTED_NO_SONAME_RELEASE IMPORTED_SONAME IMPORTED_SONAME_DEBUG IMPORTED_SONAME_RELEASE IMPORT_PREFIX IMPORT_SUFFIX INCLUDE_DIRECTORIES INCLUDE_REGULAR_EXPRESSION INSTALL_NAME_DIR INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH INTERFACE_AUTOUIC_OPTIONS INTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_FEATURES INTERFACE_COMPILE_OPTIONS INTERFACE_INCLUDE_DIRECTORIES INTERFACE_LINK_LIBRARIES INTERFACE_POSITION_INDEPENDENT_CODE INTERFACE_SOURCES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES INTERPROCEDURAL_OPTIMIZATION INTERPROCEDURAL_OPTIMIZATION_DEBUG INTERPROCEDURAL_OPTIMIZATION_RELEASE IN_TRY_COMPILE JOB_POOLS JOB_POOL_COMPILE JOB_POOL_LINK KEEP_EXTENSION LABELS LANGUAGE LIBRARY_OUTPUT_DIRECTORY LIBRARY_OUTPUT_DIRECTORY_DEBUG LIBRARY_OUTPUT_DIRECTORY_RELEASE LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_DEBUG LIBRARY_OUTPUT_NAME_RELEASE LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED LINK_DIRECTORIES LINK_FLAGS LINK_FLAGS_DEBUG LINK_FLAGS_RELEASE LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_DEBUG LINK_INTERFACE_LIBRARIES_RELEASE LINK_INTERFACE_MULTIPLICITY LINK_INTERFACE_MULTIPLICITY_DEBUG LINK_INTERFACE_MULTIPLICITY_RELEASE LINK_LIBRARIES LINK_SEARCH_END_STATIC LINK_SEARCH_START_STATIC LISTFILE_STACK LOCATION LOCATION_DEBUG LOCATION_RELEASE MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST MACOSX_PACKAGE_LOCATION MACOSX_RPATH MACROS MAP_IMPORTED_CONFIG_DEBUG MAP_IMPORTED_CONFIG_RELEASE MEASUREMENT MODIFIED NAME NO_SONAME NO_SYSTEM_FROM_IMPORTED OBJECT_DEPENDS OBJECT_OUTPUTS OSX_ARCHITECTURES OSX_ARCHITECTURES_DEBUG OSX_ARCHITECTURES_RELEASE OUTPUT_NAME OUTPUT_NAME_DEBUG OUTPUT_NAME_RELEASE PACKAGES_FOUND PACKAGES_NOT_FOUND PARENT_DIRECTORY PASS_REGULAR_EXPRESSION PDB_NAME PDB_NAME_DEBUG PDB_NAME_RELEASE PDB_OUTPUT_DIRECTORY PDB_OUTPUT_DIRECTORY_DEBUG PDB_OUTPUT_DIRECTORY_RELEASE POSITION_INDEPENDENT_CODE POST_INSTALL_SCRIPT PREDEFINED_TARGETS_FOLDER PREFIX PRE_INSTALL_SCRIPT PRIVATE_HEADER PROCESSORS PROJECT_LABEL PUBLIC_HEADER REPORT_UNDEFINED_PROPERTIES REQUIRED_FILES RESOURCE RESOURCE_LOCK RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK RULE_MESSAGES RUNTIME_OUTPUT_DIRECTORY RUNTIME_OUTPUT_DIRECTORY_DEBUG RUNTIME_OUTPUT_DIRECTORY_RELEASE RUNTIME_OUTPUT_NAME RUNTIME_OUTPUT_NAME_DEBUG RUNTIME_OUTPUT_NAME_RELEASE RUN_SERIAL SKIP_BUILD_RPATH SKIP_RETURN_CODE SOURCES SOURCE_DIR SOVERSION STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_DEBUG STATIC_LIBRARY_FLAGS_RELEASE STRINGS SUFFIX SYMBOLIC TARGET_ARCHIVES_MAY_BE_SHARED_LIBS TARGET_MESSAGES TARGET_SUPPORTS_SHARED_LIBS TEST_INCLUDE_FILE TIMEOUT TYPE USE_FOLDERS VALUE VARIABLES VERSION VISIBILITY_INLINES_HIDDEN VS_DEPLOYMENT_CONTENT VS_DEPLOYMENT_LOCATION VS_DESKTOP_EXTENSIONS_VERSION VS_DOTNET_REFERENCES VS_DOTNET_TARGET_FRAMEWORK_VERSION VS_GLOBAL_KEYWORD VS_GLOBAL_PROJECT_TYPES VS_GLOBAL_ROOTNAMESPACE VS_IOT_EXTENSIONS_VERSION VS_IOT_STARTUP_TASK VS_KEYWORD VS_MOBILE_EXTENSIONS_VERSION VS_SCC_AUXPATH VS_SCC_LOCALPATH VS_SCC_PROJECTNAME VS_SCC_PROVIDER VS_SHADER_ENTRYPOINT VS_SHADER_FLAGS VS_SHADER_MODEL VS_SHADER_TYPE VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION VS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES VS_XAML_TYPE WILL_FAIL WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS WORKING_DIRECTORY WRAP_EXCLUDE XCODE_EXPLICIT_FILE_TYPE XCODE_LAST_KNOWN_FILE_TYPE XCTEST + \ ABSTRACT ADDITIONAL_MAKE_CLEAN_FILES ADVANCED ALIASED_TARGET ALLOW_DUPLICATE_CUSTOM_TARGETS ANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_API ANDROID_API_MIN ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES ANDROID_GUI ANDROID_JAR_DEPENDENCIES ANDROID_JAR_DIRECTORIES ANDROID_JAVA_SOURCE_DIR ANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES ANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH ANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE ARCHIVE_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY_DEBUG ARCHIVE_OUTPUT_DIRECTORY_RELEASE ARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_DEBUG ARCHIVE_OUTPUT_NAME_RELEASE ATTACHED_FILES ATTACHED_FILES_ON_FAIL AUTOGEN_TARGETS_FOLDER AUTOGEN_TARGET_DEPENDS AUTOMOC AUTOMOC_MOC_OPTIONS AUTOMOC_TARGETS_FOLDER AUTORCC AUTORCC_OPTIONS AUTOUIC AUTOUIC_OPTIONS BINARY_DIR BUILD_WITH_INSTALL_RPATH BUNDLE BUNDLE_EXTENSION CACHE_VARIABLES CLEAN_NO_CUSTOM CMAKE_CONFIGURE_DEPENDS CMAKE_CXX_KNOWN_FEATURES CMAKE_C_KNOWN_FEATURES CMAKE_DIRECTORY_LABELS COMPATIBLE_INTERFACE_BOOL COMPATIBLE_INTERFACE_NUMBER_MAX COMPATIBLE_INTERFACE_NUMBER_MIN COMPATIBLE_INTERFACE_STRING COMPILE_DEFINITIONS COMPILE_DEFINITIONS_DEBUG COMPILE_DEFINITIONS_RELEASE COMPILE_FEATURES COMPILE_FLAGS COMPILE_OPTIONS COMPILE_PDB_NAME COMPILE_PDB_NAME_DEBUG COMPILE_PDB_NAME_RELEASE COMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE COST CPACK_DESKTOP_SHORTCUTS CPACK_NEVER_OVERWRITE CPACK_PERMANENT CPACK_STARTUP_SHORTCUTS CPACK_START_MENU_SHORTCUTS CPACK_WIX_ACL CROSSCOMPILING_EMULATOR CXX_EXTENSIONS CXX_STANDARD CXX_STANDARD_REQUIRED C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED DEBUG_CONFIGURATIONS DEBUG_POSTFIX DEFINE_SYMBOL DEFINITIONS DEPENDS DISABLED_FEATURES ECLIPSE_EXTRA_NATURES ENABLED_FEATURES ENABLED_LANGUAGES ENABLE_EXPORTS ENVIRONMENT EXCLUDE_FROM_ALL EXCLUDE_FROM_DEFAULT_BUILD EXCLUDE_FROM_DEFAULT_BUILD_DEBUG EXCLUDE_FROM_DEFAULT_BUILD_RELEASE EXPORT_NAME EXTERNAL_OBJECT EchoString FAIL_REGULAR_EXPRESSION FIND_LIBRARY_USE_LIB64_PATHS FIND_LIBRARY_USE_OPENBSD_VERSIONING FOLDER FRAMEWORK FRAMEWORK_VERSION Fortran_FORMAT Fortran_MODULE_DIRECTORY GENERATED GENERATOR_FILE_NAME GLOBAL_DEPENDS_DEBUG_MODE GLOBAL_DEPENDS_NO_CYCLES GNUtoMS HAS_CXX HEADER_FILE_ONLY HELPSTRING IMPLICIT_DEPENDS_INCLUDE_TRANSFORM IMPORTED IMPORTED_CONFIGURATIONS IMPORTED_IMPLIB IMPORTED_IMPLIB_DEBUG IMPORTED_IMPLIB_RELEASE IMPORTED_LINK_DEPENDENT_LIBRARIES IMPORTED_LINK_DEPENDENT_LIBRARIES_DEBUG IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE IMPORTED_LINK_INTERFACE_LANGUAGES IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE IMPORTED_LINK_INTERFACE_LIBRARIES IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE IMPORTED_LINK_INTERFACE_MULTIPLICITY IMPORTED_LINK_INTERFACE_MULTIPLICITY_DEBUG IMPORTED_LINK_INTERFACE_MULTIPLICITY_RELEASE IMPORTED_LOCATION IMPORTED_LOCATION_DEBUG IMPORTED_LOCATION_RELEASE IMPORTED_NO_SONAME IMPORTED_NO_SONAME_DEBUG IMPORTED_NO_SONAME_RELEASE IMPORTED_SONAME IMPORTED_SONAME_DEBUG IMPORTED_SONAME_RELEASE IMPORT_PREFIX IMPORT_SUFFIX INCLUDE_DIRECTORIES INCLUDE_REGULAR_EXPRESSION INSTALL_NAME_DIR INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH INTERFACE_AUTOUIC_OPTIONS INTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_FEATURES INTERFACE_COMPILE_OPTIONS INTERFACE_INCLUDE_DIRECTORIES INTERFACE_LINK_LIBRARIES INTERFACE_POSITION_INDEPENDENT_CODE INTERFACE_SOURCES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES INTERPROCEDURAL_OPTIMIZATION INTERPROCEDURAL_OPTIMIZATION_DEBUG INTERPROCEDURAL_OPTIMIZATION_RELEASE IN_TRY_COMPILE JOB_POOLS JOB_POOL_COMPILE JOB_POOL_LINK KEEP_EXTENSION LABELS LANGUAGE LIBRARY_OUTPUT_DIRECTORY LIBRARY_OUTPUT_DIRECTORY_DEBUG LIBRARY_OUTPUT_DIRECTORY_RELEASE LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_DEBUG LIBRARY_OUTPUT_NAME_RELEASE LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED LINK_DIRECTORIES LINK_FLAGS LINK_FLAGS_DEBUG LINK_FLAGS_RELEASE LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_DEBUG LINK_INTERFACE_LIBRARIES_RELEASE LINK_INTERFACE_MULTIPLICITY LINK_INTERFACE_MULTIPLICITY_DEBUG LINK_INTERFACE_MULTIPLICITY_RELEASE LINK_LIBRARIES LINK_SEARCH_END_STATIC LINK_SEARCH_START_STATIC LISTFILE_STACK LOCATION LOCATION_DEBUG LOCATION_RELEASE MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST MACOSX_PACKAGE_LOCATION MACOSX_RPATH MACROS MAP_IMPORTED_CONFIG_DEBUG MAP_IMPORTED_CONFIG_RELEASE MEASUREMENT MODIFIED NAME NO_SONAME NO_SYSTEM_FROM_IMPORTED OBJECT_DEPENDS OBJECT_OUTPUTS OSX_ARCHITECTURES OSX_ARCHITECTURES_DEBUG OSX_ARCHITECTURES_RELEASE OUTPUT_NAME OUTPUT_NAME_DEBUG OUTPUT_NAME_RELEASE PACKAGES_FOUND PACKAGES_NOT_FOUND PARENT_DIRECTORY PASS_REGULAR_EXPRESSION PDB_NAME PDB_NAME_DEBUG PDB_NAME_RELEASE PDB_OUTPUT_DIRECTORY PDB_OUTPUT_DIRECTORY_DEBUG PDB_OUTPUT_DIRECTORY_RELEASE POSITION_INDEPENDENT_CODE POST_INSTALL_SCRIPT PREDEFINED_TARGETS_FOLDER PREFIX PRE_INSTALL_SCRIPT PRIVATE_HEADER PROCESSORS PROJECT_LABEL PUBLIC_HEADER REPORT_UNDEFINED_PROPERTIES REQUIRED_FILES RESOURCE RESOURCE_LOCK RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK RULE_MESSAGES RUNTIME_OUTPUT_DIRECTORY RUNTIME_OUTPUT_DIRECTORY_DEBUG RUNTIME_OUTPUT_DIRECTORY_RELEASE RUNTIME_OUTPUT_NAME RUNTIME_OUTPUT_NAME_DEBUG RUNTIME_OUTPUT_NAME_RELEASE RUN_SERIAL SKIP_BUILD_RPATH SKIP_RETURN_CODE SOURCES SOURCE_DIR SOVERSION STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_DEBUG STATIC_LIBRARY_FLAGS_RELEASE STRINGS SUFFIX SYMBOLIC TARGET_ARCHIVES_MAY_BE_SHARED_LIBS TARGET_MESSAGES TARGET_SUPPORTS_SHARED_LIBS TEST_INCLUDE_FILE TIMEOUT TYPE USE_FOLDERS VALUE VARIABLES VERSION VISIBILITY_INLINES_HIDDEN VS_DEPLOYMENT_CONTENT VS_DEPLOYMENT_LOCATION VS_DESKTOP_EXTENSIONS_VERSION VS_DOTNET_REFERENCES VS_DOTNET_TARGET_FRAMEWORK_VERSION VS_GLOBAL_KEYWORD VS_GLOBAL_PROJECT_TYPES VS_GLOBAL_ROOTNAMESPACE VS_IOT_EXTENSIONS_VERSION VS_IOT_STARTUP_TASK VS_KEYWORD VS_MOBILE_EXTENSIONS_VERSION VS_SCC_AUXPATH VS_SCC_LOCALPATH VS_SCC_PROJECTNAME VS_SCC_PROVIDER VS_SHADER_ENTRYPOINT VS_SHADER_FLAGS VS_SHADER_MODEL VS_SHADER_TYPE VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION VS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES VS_XAML_TYPE WILL_FAIL WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS WORKING_DIRECTORY WRAP_EXCLUDE XCODE_EXPLICIT_FILE_TYPE XCODE_LAST_KNOWN_FILE_TYPE XCTEST syn keyword cmakeVariable contained \ ANDROID APPLE BORLAND BUILD_SHARED_LIBS CMAKE_ABSOLUTE_DESTINATION_FILES CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS CMAKE_ANDROID_API CMAKE_ANDROID_API_MIN CMAKE_ANDROID_ARCH CMAKE_ANDROID_ARCH_ABI CMAKE_ANDROID_ARM_MODE CMAKE_ANDROID_ARM_NEON CMAKE_ANDROID_ASSETS_DIRECTORIES CMAKE_ANDROID_GUI CMAKE_ANDROID_JAR_DEPENDENCIES CMAKE_ANDROID_JAR_DIRECTORIES CMAKE_ANDROID_JAVA_SOURCE_DIR CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES CMAKE_ANDROID_NDK CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION CMAKE_ANDROID_PROCESS_MAX CMAKE_ANDROID_PROGUARD CMAKE_ANDROID_PROGUARD_CONFIG_PATH CMAKE_ANDROID_SECURE_PROPS_PATH CMAKE_ANDROID_SKIP_ANT_STEP CMAKE_ANDROID_STANDALONE_TOOLCHAIN CMAKE_ANDROID_STL_TYPE CMAKE_APPBUNDLE_PATH CMAKE_AR CMAKE_ARCHIVE_OUTPUT_DIRECTORY CMAKE_ARGC CMAKE_ARGV0 CMAKE_AUTOMOC CMAKE_AUTOMOC_DEPEND_FILTERS CMAKE_AUTOMOC_MOC_OPTIONS CMAKE_AUTOMOC_RELAXED_MODE CMAKE_AUTORCC CMAKE_AUTORCC_OPTIONS CMAKE_AUTOUIC CMAKE_AUTOUIC_OPTIONS CMAKE_AUTOUIC_SEARCH_PATHS CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BINARY_DIR CMAKE_BUILD_RPATH CMAKE_BUILD_TOOL CMAKE_BUILD_TYPE CMAKE_BUILD_WITH_INSTALL_NAME_DIR CMAKE_BUILD_WITH_INSTALL_RPATH CMAKE_CACHEFILE_DIR CMAKE_CACHE_MAJOR_VERSION CMAKE_CACHE_MINOR_VERSION CMAKE_CACHE_PATCH_VERSION CMAKE_CFG_INTDIR CMAKE_CL_64 CMAKE_CODELITE_USE_TARGETS CMAKE_COLOR_MAKEFILE CMAKE_COMMAND CMAKE_COMPILER_2005 CMAKE_COMPILER_IS_GNUCC CMAKE_COMPILER_IS_GNUCXX CMAKE_COMPILER_IS_GNUG77 CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY CMAKE_CONFIGURATION_TYPES CMAKE_CROSSCOMPILING CMAKE_CROSSCOMPILING_EMULATOR CMAKE_CTEST_COMMAND CMAKE_CUDA_EXTENSIONS CMAKE_CUDA_STANDARD CMAKE_CUDA_STANDARD_REQUIRED CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES CMAKE_CURRENT_BINARY_DIR CMAKE_CURRENT_LIST_DIR CMAKE_CURRENT_LIST_FILE CMAKE_CURRENT_LIST_LINE CMAKE_CURRENT_SOURCE_DIR CMAKE_CXX_COMPILE_FEATURES CMAKE_CXX_EXTENSIONS CMAKE_CXX_STANDARD CMAKE_CXX_STANDARD_REQUIRED CMAKE_C_COMPILE_FEATURES CMAKE_C_EXTENSIONS CMAKE_C_STANDARD CMAKE_C_STANDARD_REQUIRED CMAKE_DEBUG_POSTFIX CMAKE_DEBUG_TARGET_PROPERTIES CMAKE_DEPENDS_IN_PROJECT_ONLY CMAKE_DL_LIBS CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT CMAKE_ECLIPSE_MAKE_ARGUMENTS CMAKE_ECLIPSE_VERSION CMAKE_EDIT_COMMAND CMAKE_ENABLE_EXPORTS CMAKE_ERROR_DEPRECATED CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION CMAKE_EXECUTABLE_SUFFIX CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS_INIT CMAKE_EXPORT_COMPILE_COMMANDS CMAKE_EXPORT_NO_PACKAGE_REGISTRY CMAKE_EXTRA_GENERATOR CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES CMAKE_FIND_APPBUNDLE CMAKE_FIND_FRAMEWORK CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX CMAKE_FIND_LIBRARY_PREFIXES CMAKE_FIND_LIBRARY_SUFFIXES CMAKE_FIND_NO_INSTALL_PREFIX CMAKE_FIND_PACKAGE_NAME CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY CMAKE_FIND_PACKAGE_SORT_DIRECTION CMAKE_FIND_PACKAGE_SORT_ORDER CMAKE_FIND_PACKAGE_WARN_NO_MODULE CMAKE_FIND_ROOT_PATH CMAKE_FIND_ROOT_PATH_MODE_INCLUDE CMAKE_FIND_ROOT_PATH_MODE_LIBRARY CMAKE_FIND_ROOT_PATH_MODE_PACKAGE CMAKE_FIND_ROOT_PATH_MODE_PROGRAM CMAKE_FRAMEWORK_PATH CMAKE_Fortran_FORMAT CMAKE_Fortran_MODDIR_DEFAULT CMAKE_Fortran_MODDIR_FLAG CMAKE_Fortran_MODOUT_FLAG CMAKE_Fortran_MODULE_DIRECTORY CMAKE_GENERATOR CMAKE_GENERATOR_PLATFORM CMAKE_GENERATOR_TOOLSET CMAKE_GNUtoMS CMAKE_HOME_DIRECTORY CMAKE_HOST_APPLE CMAKE_HOST_SOLARIS CMAKE_HOST_SYSTEM CMAKE_HOST_SYSTEM_NAME CMAKE_HOST_SYSTEM_PROCESSOR CMAKE_HOST_SYSTEM_VERSION CMAKE_HOST_UNIX CMAKE_HOST_WIN32 CMAKE_IGNORE_PATH CMAKE_IMPORT_LIBRARY_PREFIX CMAKE_IMPORT_LIBRARY_SUFFIX CMAKE_INCLUDE_CURRENT_DIR CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE CMAKE_INCLUDE_DIRECTORIES_BEFORE CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE CMAKE_INCLUDE_PATH CMAKE_INSTALL_DEFAULT_COMPONENT_NAME CMAKE_INSTALL_MESSAGE CMAKE_INSTALL_NAME_DIR CMAKE_INSTALL_PREFIX CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT CMAKE_INSTALL_RPATH CMAKE_INSTALL_RPATH_USE_LINK_PATH CMAKE_INTERNAL_PLATFORM_ABI CMAKE_INTERPROCEDURAL_OPTIMIZATION CMAKE_IOS_INSTALL_COMBINED CMAKE_JOB_POOL_COMPILE CMAKE_JOB_POOL_LINK CMAKE_LIBRARY_ARCHITECTURE CMAKE_LIBRARY_ARCHITECTURE_REGEX CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_LIBRARY_PATH CMAKE_LIBRARY_PATH_FLAG CMAKE_LINK_DEF_FILE_FLAG CMAKE_LINK_DEPENDS_NO_SHARED CMAKE_LINK_INTERFACE_LIBRARIES CMAKE_LINK_LIBRARY_FILE_FLAG CMAKE_LINK_LIBRARY_FLAG CMAKE_LINK_LIBRARY_SUFFIX CMAKE_LINK_SEARCH_END_STATIC CMAKE_LINK_SEARCH_START_STATIC CMAKE_LINK_WHAT_YOU_USE CMAKE_MACOSX_BUNDLE CMAKE_MACOSX_RPATH CMAKE_MAJOR_VERSION CMAKE_MAKE_PROGRAM CMAKE_MATCH_COUNT CMAKE_MFC_FLAG CMAKE_MINIMUM_REQUIRED_VERSION CMAKE_MINOR_VERSION CMAKE_MODULE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS_INIT CMAKE_MODULE_PATH CMAKE_NINJA_OUTPUT_PATH_PREFIX CMAKE_NOT_USING_CONFIG_FLAGS CMAKE_NO_BUILTIN_CHRPATH CMAKE_NO_SYSTEM_FROM_IMPORTED CMAKE_OBJECT_PATH_MAX CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CMAKE_PARENT_LIST_FILE CMAKE_PATCH_VERSION CMAKE_PDB_OUTPUT_DIRECTORY CMAKE_POSITION_INDEPENDENT_CODE CMAKE_PREFIX_PATH CMAKE_PROGRAM_PATH CMAKE_PROJECT_DESCRIPTION CMAKE_PROJECT_NAME CMAKE_RANLIB CMAKE_ROOT CMAKE_RUNTIME_OUTPUT_DIRECTORY CMAKE_SCRIPT_MODE_FILE CMAKE_SHARED_LIBRARY_PREFIX CMAKE_SHARED_LIBRARY_SUFFIX CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS_INIT CMAKE_SHARED_MODULE_PREFIX CMAKE_SHARED_MODULE_SUFFIX CMAKE_SIZEOF_VOID_P CMAKE_SKIP_BUILD_RPATH CMAKE_SKIP_INSTALL_ALL_DEPENDENCY CMAKE_SKIP_INSTALL_RPATH CMAKE_SKIP_INSTALL_RULES CMAKE_SKIP_RPATH CMAKE_SOURCE_DIR CMAKE_STAGING_PREFIX CMAKE_STATIC_LIBRARY_PREFIX CMAKE_STATIC_LIBRARY_SUFFIX CMAKE_STATIC_LINKER_FLAGS CMAKE_STATIC_LINKER_FLAGS_INIT CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE CMAKE_SYSROOT CMAKE_SYSTEM CMAKE_SYSTEM_APPBUNDLE_PATH CMAKE_SYSTEM_FRAMEWORK_PATH CMAKE_SYSTEM_IGNORE_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_LIBRARY_PATH CMAKE_SYSTEM_NAME CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_PROCESSOR CMAKE_SYSTEM_PROGRAM_PATH CMAKE_SYSTEM_VERSION CMAKE_Swift_LANGUAGE_VERSION CMAKE_TOOLCHAIN_FILE CMAKE_TRY_COMPILE_CONFIGURATION CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CMAKE_TRY_COMPILE_TARGET_TYPE CMAKE_TWEAK_VERSION CMAKE_USER_MAKE_RULES_OVERRIDE CMAKE_USE_RELATIVE_PATHS CMAKE_VERBOSE_MAKEFILE CMAKE_VERSION CMAKE_VISIBILITY_INLINES_HIDDEN CMAKE_VS_DEVENV_COMMAND CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD CMAKE_VS_INTEL_Fortran_PROJECT_VERSION CMAKE_VS_MSBUILD_COMMAND CMAKE_VS_NsightTegra_VERSION CMAKE_VS_PLATFORM_NAME CMAKE_VS_PLATFORM_TOOLSET CMAKE_VS_PLATFORM_TOOLSET_CUDA CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION CMAKE_WARN_DEPRECATED CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION CMAKE_WIN32_EXECUTABLE CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS CMAKE_XCODE_GENERATE_SCHEME CMAKE_XCODE_PLATFORM_TOOLSET CPACK_ABSOLUTE_DESTINATION_FILES CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION CPACK_INCLUDE_TOPLEVEL_DIRECTORY CPACK_INSTALL_SCRIPT CPACK_PACKAGING_INSTALL_PREFIX CPACK_SET_DESTDIR CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION CTEST_BINARY_DIRECTORY CTEST_BUILD_COMMAND CTEST_BUILD_NAME CTEST_BZR_COMMAND CTEST_BZR_UPDATE_OPTIONS CTEST_CHANGE_ID CTEST_CHECKOUT_COMMAND CTEST_CONFIGURATION_TYPE CTEST_CONFIGURE_COMMAND CTEST_COVERAGE_COMMAND CTEST_COVERAGE_EXTRA_FLAGS CTEST_CURL_OPTIONS CTEST_CUSTOM_COVERAGE_EXCLUDE CTEST_CUSTOM_ERROR_EXCEPTION CTEST_CUSTOM_ERROR_MATCH CTEST_CUSTOM_ERROR_POST_CONTEXT CTEST_CUSTOM_ERROR_PRE_CONTEXT CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE CTEST_CUSTOM_MEMCHECK_IGNORE CTEST_CUSTOM_POST_MEMCHECK CTEST_CUSTOM_POST_TEST CTEST_CUSTOM_PRE_MEMCHECK CTEST_CUSTOM_PRE_TEST CTEST_CUSTOM_TEST_IGNORE CTEST_CUSTOM_WARNING_EXCEPTION CTEST_CUSTOM_WARNING_MATCH CTEST_CVS_CHECKOUT CTEST_CVS_COMMAND CTEST_CVS_UPDATE_OPTIONS CTEST_DROP_LOCATION CTEST_DROP_METHOD CTEST_DROP_SITE CTEST_DROP_SITE_CDASH CTEST_DROP_SITE_PASSWORD CTEST_DROP_SITE_USER CTEST_EXTRA_COVERAGE_GLOB CTEST_GIT_COMMAND CTEST_GIT_INIT_SUBMODULES CTEST_GIT_UPDATE_CUSTOM CTEST_GIT_UPDATE_OPTIONS CTEST_HG_COMMAND CTEST_HG_UPDATE_OPTIONS CTEST_LABELS_FOR_SUBPROJECTS CTEST_MEMORYCHECK_COMMAND CTEST_MEMORYCHECK_COMMAND_OPTIONS CTEST_MEMORYCHECK_SANITIZER_OPTIONS CTEST_MEMORYCHECK_SUPPRESSIONS_FILE CTEST_MEMORYCHECK_TYPE CTEST_NIGHTLY_START_TIME CTEST_P4_CLIENT CTEST_P4_COMMAND CTEST_P4_OPTIONS CTEST_P4_UPDATE_OPTIONS CTEST_SCP_COMMAND CTEST_SITE CTEST_SOURCE_DIRECTORY CTEST_SVN_COMMAND CTEST_SVN_OPTIONS CTEST_SVN_UPDATE_OPTIONS CTEST_TEST_LOAD CTEST_TEST_TIMEOUT CTEST_TRIGGER_SITE CTEST_UPDATE_COMMAND CTEST_UPDATE_OPTIONS CTEST_UPDATE_VERSION_ONLY CTEST_USE_LAUNCHERS CYGWIN ENV EXECUTABLE_OUTPUT_PATH GHS-MULTI LIBRARY_OUTPUT_PATH MINGW MSVC MSVC10 MSVC11 MSVC12 MSVC14 MSVC60 MSVC70 MSVC71 MSVC80 MSVC90 MSVC_IDE MSVC_VERSION PROJECT_BINARY_DIR PROJECT_DESCRIPTION PROJECT_NAME PROJECT_SOURCE_DIR PROJECT_VERSION PROJECT_VERSION_MAJOR PROJECT_VERSION_MINOR PROJECT_VERSION_PATCH PROJECT_VERSION_TWEAK UNIX WIN32 WINCE WINDOWS_PHONE WINDOWS_STORE XCODE XCODE_VERSION diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 94ab70c..5e40fe8 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -74,6 +74,7 @@ Properties on Directories /prop_dir/INCLUDE_REGULAR_EXPRESSION /prop_dir/INTERPROCEDURAL_OPTIMIZATION_CONFIG /prop_dir/INTERPROCEDURAL_OPTIMIZATION + /prop_dir/LABELS /prop_dir/LINK_DIRECTORIES /prop_dir/LISTFILE_STACK /prop_dir/MACROS diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 54b8beb..c05acfb 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -32,6 +32,7 @@ Variables that Provide Information /variable/CMAKE_CURRENT_LIST_FILE /variable/CMAKE_CURRENT_LIST_LINE /variable/CMAKE_CURRENT_SOURCE_DIR + /variable/CMAKE_DIRECTORY_LABELS /variable/CMAKE_DL_LIBS /variable/CMAKE_EDIT_COMMAND /variable/CMAKE_EXECUTABLE_SUFFIX diff --git a/Help/prop_dir/LABELS.rst b/Help/prop_dir/LABELS.rst new file mode 100644 index 0000000..de27d90 --- /dev/null +++ b/Help/prop_dir/LABELS.rst @@ -0,0 +1,13 @@ +LABELS +------ + +Specify a list of text labels associated with a directory and all of its +subdirectories. This is equivalent to setting the :prop_tgt:`LABELS` target +property and the :prop_test:`LABELS` test property on all targets and tests in +the current directory and subdirectories. Note: Launchers must enabled to +propagate labels to targets. + +The :variable:`CMAKE_DIRECTORY_LABELS` variable can be used to initialize this +property. + +The list is reported in dashboard submissions. diff --git a/Help/variable/CMAKE_DIRECTORY_LABELS.rst b/Help/variable/CMAKE_DIRECTORY_LABELS.rst new file mode 100644 index 0000000..2a6c410 --- /dev/null +++ b/Help/variable/CMAKE_DIRECTORY_LABELS.rst @@ -0,0 +1,6 @@ +CMAKE_DIRECTORY_LABELS +----------------------- + +Specify labels for the current directory. + +This is used to initialize the :prop_dir:`LABELS` directory property. diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index cce1516..b0e799c 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -238,6 +238,36 @@ bool cmCTestSetTestsPropertiesCommand::InitialPass( return this->TestHandler->SetTestsProperties(args); } +class cmCTestSetDirectoryPropertiesCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + cmCommand* Clone() CM_OVERRIDE + { + cmCTestSetDirectoryPropertiesCommand* c = + new cmCTestSetDirectoryPropertiesCommand; + c->TestHandler = this->TestHandler; + return c; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + bool InitialPass(std::vector const& /*unused*/, + cmExecutionStatus& /*unused*/) CM_OVERRIDE; + + cmCTestTestHandler* TestHandler; +}; + +bool cmCTestSetDirectoryPropertiesCommand::InitialPass( + std::vector const& args, cmExecutionStatus&) +{ + return this->TestHandler->SetDirectoryProperties(args); +} + // get the next number in a string with numbers separated by , // pos is the start of the search and pos2 is the end of the search // pos becomes pos2 after a call to GetNextNumber. @@ -1661,6 +1691,12 @@ void cmCTestTestHandler::GetListOfTests() newCom4->TestHandler = this; cm.GetState()->AddBuiltinCommand("set_tests_properties", newCom4); + // Add handler for SET_DIRECTORY_PROPERTIES + cmCTestSetDirectoryPropertiesCommand* newCom5 = + new cmCTestSetDirectoryPropertiesCommand; + newCom5->TestHandler = this; + cm.GetState()->AddBuiltinCommand("set_directory_properties", newCom5); + const char* testFilename; if (cmSystemTools::FileExists("CTestTestfile.cmake")) { // does the CTestTestfile.cmake exist ? @@ -2172,7 +2208,16 @@ bool cmCTestTestHandler::SetTestsProperties( cmSystemTools::ExpandListArgument(val, rtit->Environment); } if (key == "LABELS") { - cmSystemTools::ExpandListArgument(val, rtit->Labels); + std::vector Labels; + cmSystemTools::ExpandListArgument(val, Labels); + rtit->Labels.insert(rtit->Labels.end(), Labels.begin(), + Labels.end()); + // sort the array + std::sort(rtit->Labels.begin(), rtit->Labels.end()); + // remove duplicates + std::vector::iterator new_end = + std::unique(rtit->Labels.begin(), rtit->Labels.end()); + rtit->Labels.erase(new_end, rtit->Labels.end()); } if (key == "MEASUREMENT") { size_t pos = val.find_first_of('='); @@ -2225,6 +2270,54 @@ bool cmCTestTestHandler::SetTestsProperties( return true; } +bool cmCTestTestHandler::SetDirectoryProperties( + const std::vector& args) +{ + std::vector::const_iterator it; + std::vector tests; + bool found = false; + for (it = args.begin(); it != args.end(); ++it) { + if (*it == "PROPERTIES") { + found = true; + break; + } + tests.push_back(*it); + } + + if (!found) { + return false; + } + ++it; // skip PROPERTIES + for (; it != args.end(); ++it) { + std::string key = *it; + ++it; + if (it == args.end()) { + break; + } + std::string val = *it; + cmCTestTestHandler::ListOfTests::iterator rtit; + for (rtit = this->TestList.begin(); rtit != this->TestList.end(); ++rtit) { + std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); + if (cwd == rtit->Directory) { + if (key == "LABELS") { + std::vector DirectoryLabels; + cmSystemTools::ExpandListArgument(val, DirectoryLabels); + rtit->Labels.insert(rtit->Labels.end(), DirectoryLabels.begin(), + DirectoryLabels.end()); + + // sort the array + std::sort(rtit->Labels.begin(), rtit->Labels.end()); + // remove duplicates + std::vector::iterator new_end = + std::unique(rtit->Labels.begin(), rtit->Labels.end()); + rtit->Labels.erase(new_end, rtit->Labels.end()); + } + } + } + } + return true; +} + bool cmCTestTestHandler::AddTest(const std::vector& args) { const std::string& testname = args[0]; diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 0edcb14..a623984 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -90,6 +90,11 @@ public: */ bool SetTestsProperties(const std::vector& args); + /** + * Set directory properties + */ + bool SetDirectoryProperties(const std::vector& args); + void Initialize() CM_OVERRIDE; // NOTE: This struct is Saved/Restored diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx index 485dd50..61239a9 100644 --- a/Source/cmCommands.cxx +++ b/Source/cmCommands.cxx @@ -147,8 +147,6 @@ void GetScriptingCommands(cmState* state) state->AddBuiltinCommand("separate_arguments", new cmSeparateArgumentsCommand); state->AddBuiltinCommand("set", new cmSetCommand); - state->AddBuiltinCommand("set_directory_properties", - new cmSetDirectoryPropertiesCommand); state->AddBuiltinCommand("set_property", new cmSetPropertyCommand); state->AddBuiltinCommand("site_name", new cmSiteNameCommand); state->AddBuiltinCommand("string", new cmStringCommand); @@ -231,6 +229,8 @@ void GetProjectCommands(cmState* state) state->AddBuiltinCommand("install_targets", new cmInstallTargetsCommand); state->AddBuiltinCommand("link_directories", new cmLinkDirectoriesCommand); state->AddBuiltinCommand("project", new cmProjectCommand); + state->AddBuiltinCommand("set_directory_properties", + new cmSetDirectoryPropertiesCommand); state->AddBuiltinCommand("set_source_files_properties", new cmSetSourceFilesPropertiesCommand); state->AddBuiltinCommand("set_target_properties", diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 37a2759..c8b13ad 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2811,7 +2811,12 @@ void cmGlobalGenerator::WriteSummary(cmGeneratorTarget* target) #ifdef CMAKE_BUILD_WITH_CMAKE // Check whether labels are enabled for this target. - if (const char* value = target->GetProperty("LABELS")) { + const char* targetLabels = target->GetProperty("LABELS"); + const char* directoryLabels = + target->Target->GetMakefile()->GetProperty("LABELS"); + const char* cmakeDirectoryLabels = + target->Target->GetMakefile()->GetDefinition("CMAKE_DIRECTORY_LABELS"); + if (targetLabels || directoryLabels || cmakeDirectoryLabels) { Json::Value lj_root(Json::objectValue); Json::Value& lj_target = lj_root["target"] = Json::objectValue; lj_target["name"] = target->GetName(); @@ -2821,19 +2826,53 @@ void cmGlobalGenerator::WriteSummary(cmGeneratorTarget* target) cmSystemTools::MakeDirectory(dir.c_str()); cmGeneratedFileStream fout(file.c_str()); + std::vector labels; + // List the target-wide labels. All sources in the target get // these labels. - std::vector labels; - cmSystemTools::ExpandListArgument(value, labels); - if (!labels.empty()) { - fout << "# Target labels\n"; - for (std::vector::const_iterator li = labels.begin(); - li != labels.end(); ++li) { - fout << " " << *li << "\n"; - lj_target_labels.append(*li); + if (targetLabels) { + cmSystemTools::ExpandListArgument(targetLabels, labels); + if (!labels.empty()) { + fout << "# Target labels\n"; + for (std::vector::const_iterator li = labels.begin(); + li != labels.end(); ++li) { + fout << " " << *li << "\n"; + lj_target_labels.append(*li); + } } } + // List directory labels + std::vector directoryLabelsList; + std::vector cmakeDirectoryLabelsList; + + if (directoryLabels) { + cmSystemTools::ExpandListArgument(directoryLabels, directoryLabelsList); + } + + if (cmakeDirectoryLabels) { + cmSystemTools::ExpandListArgument(cmakeDirectoryLabels, + cmakeDirectoryLabelsList); + } + + if (!directoryLabelsList.empty() || !cmakeDirectoryLabelsList.empty()) { + fout << "# Directory labels\n"; + } + + for (std::vector::const_iterator li = + directoryLabelsList.begin(); + li != directoryLabelsList.end(); ++li) { + fout << " " << *li << "\n"; + lj_target_labels.append(*li); + } + + for (std::vector::const_iterator li = + cmakeDirectoryLabelsList.begin(); + li != cmakeDirectoryLabelsList.end(); ++li) { + fout << " " << *li << "\n"; + lj_target_labels.append(*li); + } + // List the source files with any per-source labels. fout << "# Source files and their labels\n"; std::vector sources; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9049a42..be5b206 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -277,6 +277,25 @@ void cmLocalGenerator::GenerateTestFiles() outP = cmOutputConverter::EscapeForCMake(outP); fout << "subdirs(" << outP << ")" << std::endl; } + + // Add directory labels property + const char* directoryLabels = + this->Makefile->GetDefinition("CMAKE_DIRECTORY_LABELS"); + const char* labels = this->Makefile->GetProperty("LABELS"); + + if (labels || directoryLabels) { + fout << "set_directory_properties(PROPERTIES LABELS "; + if (labels) { + fout << cmOutputConverter::EscapeForCMake(labels); + } + if (labels && directoryLabels) { + fout << ";"; + } + if (directoryLabels) { + fout << cmOutputConverter::EscapeForCMake(directoryLabels); + } + fout << ")" << std::endl; + } } void cmLocalGenerator::CreateEvaluationFileOutputs(std::string const& config) @@ -327,6 +346,7 @@ void cmLocalGenerator::GenerateInstallRules() { // Compute the install prefix. const char* prefix = this->Makefile->GetDefinition("CMAKE_INSTALL_PREFIX"); + #if defined(_WIN32) && !defined(__CYGWIN__) std::string prefix_win32; if (!prefix) { diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 4a0cab3..8da1e44 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1237,6 +1237,9 @@ void cmMakefile::InitializeFromParent(cmMakefile* parent) } } + // labels + this->SetProperty("LABELS", parent->GetProperty("LABELS")); + // link libraries this->SetProperty("LINK_LIBRARIES", parent->GetProperty("LINK_LIBRARIES")); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d08ec4d25a8113388092bf342002f3859f6b8de4 commit d08ec4d25a8113388092bf342002f3859f6b8de4 Author: Betsy McPhail AuthorDate: Tue Jun 27 15:23:18 2017 -0400 Commit: Brad King CommitDate: Mon Jul 10 16:25:18 2017 -0400 Add CTEST_LABELS_FOR_SUBPROJECTS as a CTest module and script variable Use this variable to specify a list of labels that will be reported to CDash as subprojects. diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim index d7542b5..15dd30a 100644 --- a/Auxiliary/vim/syntax/cmake.vim +++ b/Auxiliary/vim/syntax/cmake.vim @@ -36,7 +36,7 @@ syn keyword cmakeProperty contained \ ABSTRACT ADDITIONAL_MAKE_CLEAN_FILES ADVANCED ALIASED_TARGET ALLOW_DUPLICATE_CUSTOM_TARGETS ANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_API ANDROID_API_MIN ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES ANDROID_GUI ANDROID_JAR_DEPENDENCIES ANDROID_JAR_DIRECTORIES ANDROID_JAVA_SOURCE_DIR ANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES ANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH ANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE ARCHIVE_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY_DEBUG ARCHIVE_OUTPUT_DIRECTORY_RELEASE ARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_DEBUG ARCHIVE_OUTPUT_NAME_RELEASE ATTACHED_FILES ATTACHED_FILES_ON_FAIL AUTOGEN_TARGETS_FOLDER AUTOGEN_TARGET_DEPENDS AUTOMOC AUTOMOC_MOC_OPTIONS AUTOMOC_TARGETS_FOLDER AUTORCC AUTORCC_OPTIONS AUTOUIC AUTOUIC_OPTIONS BINARY_DIR BUILD_WITH_INSTALL_RPATH BUNDLE BUNDLE_EXTENSION CACHE_VARIABLES CLEAN_NO_CUSTOM CMAKE_CONFIGURE_DEPENDS CMAKE_CXX_KNOWN_FEATURES CMAKE_C_KNOWN_FEATURES COMPATIBLE_INTERFACE_BOOL COMPATIBLE_INTERFACE_NUMBER_MAX COMPATIBLE_INTERFACE_NUMBER_MIN COMPATIBLE_INTERFACE_STRING COMPILE_DEFINITIONS COMPILE_DEFINITIONS_DEBUG COMPILE_DEFINITIONS_RELEASE COMPILE_FEATURES COMPILE_FLAGS COMPILE_OPTIONS COMPILE_PDB_NAME COMPILE_PDB_NAME_DEBUG COMPILE_PDB_NAME_RELEASE COMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE COST CPACK_DESKTOP_SHORTCUTS CPACK_NEVER_OVERWRITE CPACK_PERMANENT CPACK_STARTUP_SHORTCUTS CPACK_START_MENU_SHORTCUTS CPACK_WIX_ACL CROSSCOMPILING_EMULATOR CXX_EXTENSIONS CXX_STANDARD CXX_STANDARD_REQUIRED C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED DEBUG_CONFIGURATIONS DEBUG_POSTFIX DEFINE_SYMBOL DEFINITIONS DEPENDS DISABLED_FEATURES ECLIPSE_EXTRA_NATURES ENABLED_FEATURES ENABLED_LANGUAGES ENABLE_EXPORTS ENVIRONMENT EXCLUDE_FROM_ALL EXCLUDE_FROM_DEFAULT_BUILD EXCLUDE_FROM_DEFAULT_BUILD_DEBUG EXCLUDE_FROM_DEFAULT_BUILD_RELEASE EXPORT_NAME EXTERNAL_OBJECT EchoString FAIL_REGULAR_EXPRESSION FIND_LIBRARY_USE_LIB64_PATHS FIND_LIBRARY_USE_OPENBSD_VERSIONING FOLDER FRAMEWORK FRAMEWORK_VERSION Fortran_FORMAT Fortran_MODULE_DIRECTORY GENERATED GENERATOR_FILE_NAME GLOBAL_DEPENDS_DEBUG_MODE GLOBAL_DEPENDS_NO_CYCLES GNUtoMS HAS_CXX HEADER_FILE_ONLY HELPSTRING IMPLICIT_DEPENDS_INCLUDE_TRANSFORM IMPORTED IMPORTED_CONFIGURATIONS IMPORTED_IMPLIB IMPORTED_IMPLIB_DEBUG IMPORTED_IMPLIB_RELEASE IMPORTED_LINK_DEPENDENT_LIBRARIES IMPORTED_LINK_DEPENDENT_LIBRARIES_DEBUG IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE IMPORTED_LINK_INTERFACE_LANGUAGES IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE IMPORTED_LINK_INTERFACE_LIBRARIES IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE IMPORTED_LINK_INTERFACE_MULTIPLICITY IMPORTED_LINK_INTERFACE_MULTIPLICITY_DEBUG IMPORTED_LINK_INTERFACE_MULTIPLICITY_RELEASE IMPORTED_LOCATION IMPORTED_LOCATION_DEBUG IMPORTED_LOCATION_RELEASE IMPORTED_NO_SONAME IMPORTED_NO_SONAME_DEBUG IMPORTED_NO_SONAME_RELEASE IMPORTED_SONAME IMPORTED_SONAME_DEBUG IMPORTED_SONAME_RELEASE IMPORT_PREFIX IMPORT_SUFFIX INCLUDE_DIRECTORIES INCLUDE_REGULAR_EXPRESSION INSTALL_NAME_DIR INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH INTERFACE_AUTOUIC_OPTIONS INTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_FEATURES INTERFACE_COMPILE_OPTIONS INTERFACE_INCLUDE_DIRECTORIES INTERFACE_LINK_LIBRARIES INTERFACE_POSITION_INDEPENDENT_CODE INTERFACE_SOURCES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES INTERPROCEDURAL_OPTIMIZATION INTERPROCEDURAL_OPTIMIZATION_DEBUG INTERPROCEDURAL_OPTIMIZATION_RELEASE IN_TRY_COMPILE JOB_POOLS JOB_POOL_COMPILE JOB_POOL_LINK KEEP_EXTENSION LABELS LANGUAGE LIBRARY_OUTPUT_DIRECTORY LIBRARY_OUTPUT_DIRECTORY_DEBUG LIBRARY_OUTPUT_DIRECTORY_RELEASE LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_DEBUG LIBRARY_OUTPUT_NAME_RELEASE LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED LINK_DIRECTORIES LINK_FLAGS LINK_FLAGS_DEBUG LINK_FLAGS_RELEASE LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_DEBUG LINK_INTERFACE_LIBRARIES_RELEASE LINK_INTERFACE_MULTIPLICITY LINK_INTERFACE_MULTIPLICITY_DEBUG LINK_INTERFACE_MULTIPLICITY_RELEASE LINK_LIBRARIES LINK_SEARCH_END_STATIC LINK_SEARCH_START_STATIC LISTFILE_STACK LOCATION LOCATION_DEBUG LOCATION_RELEASE MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST MACOSX_PACKAGE_LOCATION MACOSX_RPATH MACROS MAP_IMPORTED_CONFIG_DEBUG MAP_IMPORTED_CONFIG_RELEASE MEASUREMENT MODIFIED NAME NO_SONAME NO_SYSTEM_FROM_IMPORTED OBJECT_DEPENDS OBJECT_OUTPUTS OSX_ARCHITECTURES OSX_ARCHITECTURES_DEBUG OSX_ARCHITECTURES_RELEASE OUTPUT_NAME OUTPUT_NAME_DEBUG OUTPUT_NAME_RELEASE PACKAGES_FOUND PACKAGES_NOT_FOUND PARENT_DIRECTORY PASS_REGULAR_EXPRESSION PDB_NAME PDB_NAME_DEBUG PDB_NAME_RELEASE PDB_OUTPUT_DIRECTORY PDB_OUTPUT_DIRECTORY_DEBUG PDB_OUTPUT_DIRECTORY_RELEASE POSITION_INDEPENDENT_CODE POST_INSTALL_SCRIPT PREDEFINED_TARGETS_FOLDER PREFIX PRE_INSTALL_SCRIPT PRIVATE_HEADER PROCESSORS PROJECT_LABEL PUBLIC_HEADER REPORT_UNDEFINED_PROPERTIES REQUIRED_FILES RESOURCE RESOURCE_LOCK RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK RULE_MESSAGES RUNTIME_OUTPUT_DIRECTORY RUNTIME_OUTPUT_DIRECTORY_DEBUG RUNTIME_OUTPUT_DIRECTORY_RELEASE RUNTIME_OUTPUT_NAME RUNTIME_OUTPUT_NAME_DEBUG RUNTIME_OUTPUT_NAME_RELEASE RUN_SERIAL SKIP_BUILD_RPATH SKIP_RETURN_CODE SOURCES SOURCE_DIR SOVERSION STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_DEBUG STATIC_LIBRARY_FLAGS_RELEASE STRINGS SUFFIX SYMBOLIC TARGET_ARCHIVES_MAY_BE_SHARED_LIBS TARGET_MESSAGES TARGET_SUPPORTS_SHARED_LIBS TEST_INCLUDE_FILE TIMEOUT TYPE USE_FOLDERS VALUE VARIABLES VERSION VISIBILITY_INLINES_HIDDEN VS_DEPLOYMENT_CONTENT VS_DEPLOYMENT_LOCATION VS_DESKTOP_EXTENSIONS_VERSION VS_DOTNET_REFERENCES VS_DOTNET_TARGET_FRAMEWORK_VERSION VS_GLOBAL_KEYWORD VS_GLOBAL_PROJECT_TYPES VS_GLOBAL_ROOTNAMESPACE VS_IOT_EXTENSIONS_VERSION VS_IOT_STARTUP_TASK VS_KEYWORD VS_MOBILE_EXTENSIONS_VERSION VS_SCC_AUXPATH VS_SCC_LOCALPATH VS_SCC_PROJECTNAME VS_SCC_PROVIDER VS_SHADER_ENTRYPOINT VS_SHADER_FLAGS VS_SHADER_MODEL VS_SHADER_TYPE VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION VS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES VS_XAML_TYPE WILL_FAIL WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS WORKING_DIRECTORY WRAP_EXCLUDE XCODE_EXPLICIT_FILE_TYPE XCODE_LAST_KNOWN_FILE_TYPE XCTEST syn keyword cmakeVariable contained - \ ANDROID APPLE BORLAND BUILD_SHARED_LIBS CMAKE_ABSOLUTE_DESTINATION_FILES CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS CMAKE_ANDROID_API CMAKE_ANDROID_API_MIN CMAKE_ANDROID_ARCH CMAKE_ANDROID_ARCH_ABI CMAKE_ANDROID_ARM_MODE CMAKE_ANDROID_ARM_NEON CMAKE_ANDROID_ASSETS_DIRECTORIES CMAKE_ANDROID_GUI CMAKE_ANDROID_JAR_DEPENDENCIES CMAKE_ANDROID_JAR_DIRECTORIES CMAKE_ANDROID_JAVA_SOURCE_DIR CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES CMAKE_ANDROID_NDK CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION CMAKE_ANDROID_PROCESS_MAX CMAKE_ANDROID_PROGUARD CMAKE_ANDROID_PROGUARD_CONFIG_PATH CMAKE_ANDROID_SECURE_PROPS_PATH CMAKE_ANDROID_SKIP_ANT_STEP CMAKE_ANDROID_STANDALONE_TOOLCHAIN CMAKE_ANDROID_STL_TYPE CMAKE_APPBUNDLE_PATH CMAKE_AR CMAKE_ARCHIVE_OUTPUT_DIRECTORY CMAKE_ARGC CMAKE_ARGV0 CMAKE_AUTOMOC CMAKE_AUTOMOC_DEPEND_FILTERS CMAKE_AUTOMOC_MOC_OPTIONS CMAKE_AUTOMOC_RELAXED_MODE CMAKE_AUTORCC CMAKE_AUTORCC_OPTIONS CMAKE_AUTOUIC CMAKE_AUTOUIC_OPTIONS CMAKE_AUTOUIC_SEARCH_PATHS CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BINARY_DIR CMAKE_BUILD_RPATH CMAKE_BUILD_TOOL CMAKE_BUILD_TYPE CMAKE_BUILD_WITH_INSTALL_NAME_DIR CMAKE_BUILD_WITH_INSTALL_RPATH CMAKE_CACHEFILE_DIR CMAKE_CACHE_MAJOR_VERSION CMAKE_CACHE_MINOR_VERSION CMAKE_CACHE_PATCH_VERSION CMAKE_CFG_INTDIR CMAKE_CL_64 CMAKE_CODELITE_USE_TARGETS CMAKE_COLOR_MAKEFILE CMAKE_COMMAND CMAKE_COMPILER_2005 CMAKE_COMPILER_IS_GNUCC CMAKE_COMPILER_IS_GNUCXX CMAKE_COMPILER_IS_GNUG77 CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY CMAKE_CONFIGURATION_TYPES CMAKE_CROSSCOMPILING CMAKE_CROSSCOMPILING_EMULATOR CMAKE_CTEST_COMMAND CMAKE_CUDA_EXTENSIONS CMAKE_CUDA_STANDARD CMAKE_CUDA_STANDARD_REQUIRED CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES CMAKE_CURRENT_BINARY_DIR CMAKE_CURRENT_LIST_DIR CMAKE_CURRENT_LIST_FILE CMAKE_CURRENT_LIST_LINE CMAKE_CURRENT_SOURCE_DIR CMAKE_CXX_COMPILE_FEATURES CMAKE_CXX_EXTENSIONS CMAKE_CXX_STANDARD CMAKE_CXX_STANDARD_REQUIRED CMAKE_C_COMPILE_FEATURES CMAKE_C_EXTENSIONS CMAKE_C_STANDARD CMAKE_C_STANDARD_REQUIRED CMAKE_DEBUG_POSTFIX CMAKE_DEBUG_TARGET_PROPERTIES CMAKE_DEPENDS_IN_PROJECT_ONLY CMAKE_DL_LIBS CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT CMAKE_ECLIPSE_MAKE_ARGUMENTS CMAKE_ECLIPSE_VERSION CMAKE_EDIT_COMMAND CMAKE_ENABLE_EXPORTS CMAKE_ERROR_DEPRECATED CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION CMAKE_EXECUTABLE_SUFFIX CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS_INIT CMAKE_EXPORT_COMPILE_COMMANDS CMAKE_EXPORT_NO_PACKAGE_REGISTRY CMAKE_EXTRA_GENERATOR CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES CMAKE_FIND_APPBUNDLE CMAKE_FIND_FRAMEWORK CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX CMAKE_FIND_LIBRARY_PREFIXES CMAKE_FIND_LIBRARY_SUFFIXES CMAKE_FIND_NO_INSTALL_PREFIX CMAKE_FIND_PACKAGE_NAME CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY CMAKE_FIND_PACKAGE_SORT_DIRECTION CMAKE_FIND_PACKAGE_SORT_ORDER CMAKE_FIND_PACKAGE_WARN_NO_MODULE CMAKE_FIND_ROOT_PATH CMAKE_FIND_ROOT_PATH_MODE_INCLUDE CMAKE_FIND_ROOT_PATH_MODE_LIBRARY CMAKE_FIND_ROOT_PATH_MODE_PACKAGE CMAKE_FIND_ROOT_PATH_MODE_PROGRAM CMAKE_FRAMEWORK_PATH CMAKE_Fortran_FORMAT CMAKE_Fortran_MODDIR_DEFAULT CMAKE_Fortran_MODDIR_FLAG CMAKE_Fortran_MODOUT_FLAG CMAKE_Fortran_MODULE_DIRECTORY CMAKE_GENERATOR CMAKE_GENERATOR_PLATFORM CMAKE_GENERATOR_TOOLSET CMAKE_GNUtoMS CMAKE_HOME_DIRECTORY CMAKE_HOST_APPLE CMAKE_HOST_SOLARIS CMAKE_HOST_SYSTEM CMAKE_HOST_SYSTEM_NAME CMAKE_HOST_SYSTEM_PROCESSOR CMAKE_HOST_SYSTEM_VERSION CMAKE_HOST_UNIX CMAKE_HOST_WIN32 CMAKE_IGNORE_PATH CMAKE_IMPORT_LIBRARY_PREFIX CMAKE_IMPORT_LIBRARY_SUFFIX CMAKE_INCLUDE_CURRENT_DIR CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE CMAKE_INCLUDE_DIRECTORIES_BEFORE CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE CMAKE_INCLUDE_PATH CMAKE_INSTALL_DEFAULT_COMPONENT_NAME CMAKE_INSTALL_MESSAGE CMAKE_INSTALL_NAME_DIR CMAKE_INSTALL_PREFIX CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT CMAKE_INSTALL_RPATH CMAKE_INSTALL_RPATH_USE_LINK_PATH CMAKE_INTERNAL_PLATFORM_ABI CMAKE_INTERPROCEDURAL_OPTIMIZATION CMAKE_IOS_INSTALL_COMBINED CMAKE_JOB_POOL_COMPILE CMAKE_JOB_POOL_LINK CMAKE_LIBRARY_ARCHITECTURE CMAKE_LIBRARY_ARCHITECTURE_REGEX CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_LIBRARY_PATH CMAKE_LIBRARY_PATH_FLAG CMAKE_LINK_DEF_FILE_FLAG CMAKE_LINK_DEPENDS_NO_SHARED CMAKE_LINK_INTERFACE_LIBRARIES CMAKE_LINK_LIBRARY_FILE_FLAG CMAKE_LINK_LIBRARY_FLAG CMAKE_LINK_LIBRARY_SUFFIX CMAKE_LINK_SEARCH_END_STATIC CMAKE_LINK_SEARCH_START_STATIC CMAKE_LINK_WHAT_YOU_USE CMAKE_MACOSX_BUNDLE CMAKE_MACOSX_RPATH CMAKE_MAJOR_VERSION CMAKE_MAKE_PROGRAM CMAKE_MATCH_COUNT CMAKE_MFC_FLAG CMAKE_MINIMUM_REQUIRED_VERSION CMAKE_MINOR_VERSION CMAKE_MODULE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS_INIT CMAKE_MODULE_PATH CMAKE_NINJA_OUTPUT_PATH_PREFIX CMAKE_NOT_USING_CONFIG_FLAGS CMAKE_NO_BUILTIN_CHRPATH CMAKE_NO_SYSTEM_FROM_IMPORTED CMAKE_OBJECT_PATH_MAX CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CMAKE_PARENT_LIST_FILE CMAKE_PATCH_VERSION CMAKE_PDB_OUTPUT_DIRECTORY CMAKE_POSITION_INDEPENDENT_CODE CMAKE_PREFIX_PATH CMAKE_PROGRAM_PATH CMAKE_PROJECT_DESCRIPTION CMAKE_PROJECT_NAME CMAKE_RANLIB CMAKE_ROOT CMAKE_RUNTIME_OUTPUT_DIRECTORY CMAKE_SCRIPT_MODE_FILE CMAKE_SHARED_LIBRARY_PREFIX CMAKE_SHARED_LIBRARY_SUFFIX CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS_INIT CMAKE_SHARED_MODULE_PREFIX CMAKE_SHARED_MODULE_SUFFIX CMAKE_SIZEOF_VOID_P CMAKE_SKIP_BUILD_RPATH CMAKE_SKIP_INSTALL_ALL_DEPENDENCY CMAKE_SKIP_INSTALL_RPATH CMAKE_SKIP_INSTALL_RULES CMAKE_SKIP_RPATH CMAKE_SOURCE_DIR CMAKE_STAGING_PREFIX CMAKE_STATIC_LIBRARY_PREFIX CMAKE_STATIC_LIBRARY_SUFFIX CMAKE_STATIC_LINKER_FLAGS CMAKE_STATIC_LINKER_FLAGS_INIT CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE CMAKE_SYSROOT CMAKE_SYSTEM CMAKE_SYSTEM_APPBUNDLE_PATH CMAKE_SYSTEM_FRAMEWORK_PATH CMAKE_SYSTEM_IGNORE_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_LIBRARY_PATH CMAKE_SYSTEM_NAME CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_PROCESSOR CMAKE_SYSTEM_PROGRAM_PATH CMAKE_SYSTEM_VERSION CMAKE_Swift_LANGUAGE_VERSION CMAKE_TOOLCHAIN_FILE CMAKE_TRY_COMPILE_CONFIGURATION CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CMAKE_TRY_COMPILE_TARGET_TYPE CMAKE_TWEAK_VERSION CMAKE_USER_MAKE_RULES_OVERRIDE CMAKE_USE_RELATIVE_PATHS CMAKE_VERBOSE_MAKEFILE CMAKE_VERSION CMAKE_VISIBILITY_INLINES_HIDDEN CMAKE_VS_DEVENV_COMMAND CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD CMAKE_VS_INTEL_Fortran_PROJECT_VERSION CMAKE_VS_MSBUILD_COMMAND CMAKE_VS_NsightTegra_VERSION CMAKE_VS_PLATFORM_NAME CMAKE_VS_PLATFORM_TOOLSET CMAKE_VS_PLATFORM_TOOLSET_CUDA CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION CMAKE_WARN_DEPRECATED CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION CMAKE_WIN32_EXECUTABLE CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS CMAKE_XCODE_GENERATE_SCHEME CMAKE_XCODE_PLATFORM_TOOLSET CPACK_ABSOLUTE_DESTINATION_FILES CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION CPACK_INCLUDE_TOPLEVEL_DIRECTORY CPACK_INSTALL_SCRIPT CPACK_PACKAGING_INSTALL_PREFIX CPACK_SET_DESTDIR CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION CTEST_BINARY_DIRECTORY CTEST_BUILD_COMMAND CTEST_BUILD_NAME CTEST_BZR_COMMAND CTEST_BZR_UPDATE_OPTIONS CTEST_CHANGE_ID CTEST_CHECKOUT_COMMAND CTEST_CONFIGURATION_TYPE CTEST_CONFIGURE_COMMAND CTEST_COVERAGE_COMMAND CTEST_COVERAGE_EXTRA_FLAGS CTEST_CURL_OPTIONS CTEST_CUSTOM_COVERAGE_EXCLUDE CTEST_CUSTOM_ERROR_EXCEPTION CTEST_CUSTOM_ERROR_MATCH CTEST_CUSTOM_ERROR_POST_CONTEXT CTEST_CUSTOM_ERROR_PRE_CONTEXT CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE CTEST_CUSTOM_MEMCHECK_IGNORE CTEST_CUSTOM_POST_MEMCHECK CTEST_CUSTOM_POST_TEST CTEST_CUSTOM_PRE_MEMCHECK CTEST_CUSTOM_PRE_TEST CTEST_CUSTOM_TEST_IGNORE CTEST_CUSTOM_WARNING_EXCEPTION CTEST_CUSTOM_WARNING_MATCH CTEST_CVS_CHECKOUT CTEST_CVS_COMMAND CTEST_CVS_UPDATE_OPTIONS CTEST_DROP_LOCATION CTEST_DROP_METHOD CTEST_DROP_SITE CTEST_DROP_SITE_CDASH CTEST_DROP_SITE_PASSWORD CTEST_DROP_SITE_USER CTEST_EXTRA_COVERAGE_GLOB CTEST_GIT_COMMAND CTEST_GIT_INIT_SUBMODULES CTEST_GIT_UPDATE_CUSTOM CTEST_GIT_UPDATE_OPTIONS CTEST_HG_COMMAND CTEST_HG_UPDATE_OPTIONS CTEST_MEMORYCHECK_COMMAND CTEST_MEMORYCHECK_COMMAND_OPTIONS CTEST_MEMORYCHECK_SANITIZER_OPTIONS CTEST_MEMORYCHECK_SUPPRESSIONS_FILE CTEST_MEMORYCHECK_TYPE CTEST_NIGHTLY_START_TIME CTEST_P4_CLIENT CTEST_P4_COMMAND CTEST_P4_OPTIONS CTEST_P4_UPDATE_OPTIONS CTEST_SCP_COMMAND CTEST_SITE CTEST_SOURCE_DIRECTORY CTEST_SVN_COMMAND CTEST_SVN_OPTIONS CTEST_SVN_UPDATE_OPTIONS CTEST_TEST_LOAD CTEST_TEST_TIMEOUT CTEST_TRIGGER_SITE CTEST_UPDATE_COMMAND CTEST_UPDATE_OPTIONS CTEST_UPDATE_VERSION_ONLY CTEST_USE_LAUNCHERS CYGWIN ENV EXECUTABLE_OUTPUT_PATH GHS-MULTI LIBRARY_OUTPUT_PATH MINGW MSVC MSVC10 MSVC11 MSVC12 MSVC14 MSVC60 MSVC70 MSVC71 MSVC80 MSVC90 MSVC_IDE MSVC_VERSION PROJECT_BINARY_DIR PROJECT_DESCRIPTION PROJECT_NAME PROJECT_SOURCE_DIR PROJECT_VERSION PROJECT_VERSION_MAJOR PROJECT_VERSION_MINOR PROJECT_VERSION_PATCH PROJECT_VERSION_TWEAK UNIX WIN32 WINCE WINDOWS_PHONE WINDOWS_STORE XCODE XCODE_VERSION + \ ANDROID APPLE BORLAND BUILD_SHARED_LIBS CMAKE_ABSOLUTE_DESTINATION_FILES CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS CMAKE_ANDROID_API CMAKE_ANDROID_API_MIN CMAKE_ANDROID_ARCH CMAKE_ANDROID_ARCH_ABI CMAKE_ANDROID_ARM_MODE CMAKE_ANDROID_ARM_NEON CMAKE_ANDROID_ASSETS_DIRECTORIES CMAKE_ANDROID_GUI CMAKE_ANDROID_JAR_DEPENDENCIES CMAKE_ANDROID_JAR_DIRECTORIES CMAKE_ANDROID_JAVA_SOURCE_DIR CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES CMAKE_ANDROID_NDK CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION CMAKE_ANDROID_PROCESS_MAX CMAKE_ANDROID_PROGUARD CMAKE_ANDROID_PROGUARD_CONFIG_PATH CMAKE_ANDROID_SECURE_PROPS_PATH CMAKE_ANDROID_SKIP_ANT_STEP CMAKE_ANDROID_STANDALONE_TOOLCHAIN CMAKE_ANDROID_STL_TYPE CMAKE_APPBUNDLE_PATH CMAKE_AR CMAKE_ARCHIVE_OUTPUT_DIRECTORY CMAKE_ARGC CMAKE_ARGV0 CMAKE_AUTOMOC CMAKE_AUTOMOC_DEPEND_FILTERS CMAKE_AUTOMOC_MOC_OPTIONS CMAKE_AUTOMOC_RELAXED_MODE CMAKE_AUTORCC CMAKE_AUTORCC_OPTIONS CMAKE_AUTOUIC CMAKE_AUTOUIC_OPTIONS CMAKE_AUTOUIC_SEARCH_PATHS CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BINARY_DIR CMAKE_BUILD_RPATH CMAKE_BUILD_TOOL CMAKE_BUILD_TYPE CMAKE_BUILD_WITH_INSTALL_NAME_DIR CMAKE_BUILD_WITH_INSTALL_RPATH CMAKE_CACHEFILE_DIR CMAKE_CACHE_MAJOR_VERSION CMAKE_CACHE_MINOR_VERSION CMAKE_CACHE_PATCH_VERSION CMAKE_CFG_INTDIR CMAKE_CL_64 CMAKE_CODELITE_USE_TARGETS CMAKE_COLOR_MAKEFILE CMAKE_COMMAND CMAKE_COMPILER_2005 CMAKE_COMPILER_IS_GNUCC CMAKE_COMPILER_IS_GNUCXX CMAKE_COMPILER_IS_GNUG77 CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY CMAKE_CONFIGURATION_TYPES CMAKE_CROSSCOMPILING CMAKE_CROSSCOMPILING_EMULATOR CMAKE_CTEST_COMMAND CMAKE_CUDA_EXTENSIONS CMAKE_CUDA_STANDARD CMAKE_CUDA_STANDARD_REQUIRED CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES CMAKE_CURRENT_BINARY_DIR CMAKE_CURRENT_LIST_DIR CMAKE_CURRENT_LIST_FILE CMAKE_CURRENT_LIST_LINE CMAKE_CURRENT_SOURCE_DIR CMAKE_CXX_COMPILE_FEATURES CMAKE_CXX_EXTENSIONS CMAKE_CXX_STANDARD CMAKE_CXX_STANDARD_REQUIRED CMAKE_C_COMPILE_FEATURES CMAKE_C_EXTENSIONS CMAKE_C_STANDARD CMAKE_C_STANDARD_REQUIRED CMAKE_DEBUG_POSTFIX CMAKE_DEBUG_TARGET_PROPERTIES CMAKE_DEPENDS_IN_PROJECT_ONLY CMAKE_DL_LIBS CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT CMAKE_ECLIPSE_MAKE_ARGUMENTS CMAKE_ECLIPSE_VERSION CMAKE_EDIT_COMMAND CMAKE_ENABLE_EXPORTS CMAKE_ERROR_DEPRECATED CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION CMAKE_EXECUTABLE_SUFFIX CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS_INIT CMAKE_EXPORT_COMPILE_COMMANDS CMAKE_EXPORT_NO_PACKAGE_REGISTRY CMAKE_EXTRA_GENERATOR CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES CMAKE_FIND_APPBUNDLE CMAKE_FIND_FRAMEWORK CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX CMAKE_FIND_LIBRARY_PREFIXES CMAKE_FIND_LIBRARY_SUFFIXES CMAKE_FIND_NO_INSTALL_PREFIX CMAKE_FIND_PACKAGE_NAME CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY CMAKE_FIND_PACKAGE_SORT_DIRECTION CMAKE_FIND_PACKAGE_SORT_ORDER CMAKE_FIND_PACKAGE_WARN_NO_MODULE CMAKE_FIND_ROOT_PATH CMAKE_FIND_ROOT_PATH_MODE_INCLUDE CMAKE_FIND_ROOT_PATH_MODE_LIBRARY CMAKE_FIND_ROOT_PATH_MODE_PACKAGE CMAKE_FIND_ROOT_PATH_MODE_PROGRAM CMAKE_FRAMEWORK_PATH CMAKE_Fortran_FORMAT CMAKE_Fortran_MODDIR_DEFAULT CMAKE_Fortran_MODDIR_FLAG CMAKE_Fortran_MODOUT_FLAG CMAKE_Fortran_MODULE_DIRECTORY CMAKE_GENERATOR CMAKE_GENERATOR_PLATFORM CMAKE_GENERATOR_TOOLSET CMAKE_GNUtoMS CMAKE_HOME_DIRECTORY CMAKE_HOST_APPLE CMAKE_HOST_SOLARIS CMAKE_HOST_SYSTEM CMAKE_HOST_SYSTEM_NAME CMAKE_HOST_SYSTEM_PROCESSOR CMAKE_HOST_SYSTEM_VERSION CMAKE_HOST_UNIX CMAKE_HOST_WIN32 CMAKE_IGNORE_PATH CMAKE_IMPORT_LIBRARY_PREFIX CMAKE_IMPORT_LIBRARY_SUFFIX CMAKE_INCLUDE_CURRENT_DIR CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE CMAKE_INCLUDE_DIRECTORIES_BEFORE CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE CMAKE_INCLUDE_PATH CMAKE_INSTALL_DEFAULT_COMPONENT_NAME CMAKE_INSTALL_MESSAGE CMAKE_INSTALL_NAME_DIR CMAKE_INSTALL_PREFIX CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT CMAKE_INSTALL_RPATH CMAKE_INSTALL_RPATH_USE_LINK_PATH CMAKE_INTERNAL_PLATFORM_ABI CMAKE_INTERPROCEDURAL_OPTIMIZATION CMAKE_IOS_INSTALL_COMBINED CMAKE_JOB_POOL_COMPILE CMAKE_JOB_POOL_LINK CMAKE_LIBRARY_ARCHITECTURE CMAKE_LIBRARY_ARCHITECTURE_REGEX CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_LIBRARY_PATH CMAKE_LIBRARY_PATH_FLAG CMAKE_LINK_DEF_FILE_FLAG CMAKE_LINK_DEPENDS_NO_SHARED CMAKE_LINK_INTERFACE_LIBRARIES CMAKE_LINK_LIBRARY_FILE_FLAG CMAKE_LINK_LIBRARY_FLAG CMAKE_LINK_LIBRARY_SUFFIX CMAKE_LINK_SEARCH_END_STATIC CMAKE_LINK_SEARCH_START_STATIC CMAKE_LINK_WHAT_YOU_USE CMAKE_MACOSX_BUNDLE CMAKE_MACOSX_RPATH CMAKE_MAJOR_VERSION CMAKE_MAKE_PROGRAM CMAKE_MATCH_COUNT CMAKE_MFC_FLAG CMAKE_MINIMUM_REQUIRED_VERSION CMAKE_MINOR_VERSION CMAKE_MODULE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS_INIT CMAKE_MODULE_PATH CMAKE_NINJA_OUTPUT_PATH_PREFIX CMAKE_NOT_USING_CONFIG_FLAGS CMAKE_NO_BUILTIN_CHRPATH CMAKE_NO_SYSTEM_FROM_IMPORTED CMAKE_OBJECT_PATH_MAX CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT CMAKE_PARENT_LIST_FILE CMAKE_PATCH_VERSION CMAKE_PDB_OUTPUT_DIRECTORY CMAKE_POSITION_INDEPENDENT_CODE CMAKE_PREFIX_PATH CMAKE_PROGRAM_PATH CMAKE_PROJECT_DESCRIPTION CMAKE_PROJECT_NAME CMAKE_RANLIB CMAKE_ROOT CMAKE_RUNTIME_OUTPUT_DIRECTORY CMAKE_SCRIPT_MODE_FILE CMAKE_SHARED_LIBRARY_PREFIX CMAKE_SHARED_LIBRARY_SUFFIX CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS_INIT CMAKE_SHARED_MODULE_PREFIX CMAKE_SHARED_MODULE_SUFFIX CMAKE_SIZEOF_VOID_P CMAKE_SKIP_BUILD_RPATH CMAKE_SKIP_INSTALL_ALL_DEPENDENCY CMAKE_SKIP_INSTALL_RPATH CMAKE_SKIP_INSTALL_RULES CMAKE_SKIP_RPATH CMAKE_SOURCE_DIR CMAKE_STAGING_PREFIX CMAKE_STATIC_LIBRARY_PREFIX CMAKE_STATIC_LIBRARY_SUFFIX CMAKE_STATIC_LINKER_FLAGS CMAKE_STATIC_LINKER_FLAGS_INIT CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE CMAKE_SYSROOT CMAKE_SYSTEM CMAKE_SYSTEM_APPBUNDLE_PATH CMAKE_SYSTEM_FRAMEWORK_PATH CMAKE_SYSTEM_IGNORE_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_LIBRARY_PATH CMAKE_SYSTEM_NAME CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_PROCESSOR CMAKE_SYSTEM_PROGRAM_PATH CMAKE_SYSTEM_VERSION CMAKE_Swift_LANGUAGE_VERSION CMAKE_TOOLCHAIN_FILE CMAKE_TRY_COMPILE_CONFIGURATION CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CMAKE_TRY_COMPILE_TARGET_TYPE CMAKE_TWEAK_VERSION CMAKE_USER_MAKE_RULES_OVERRIDE CMAKE_USE_RELATIVE_PATHS CMAKE_VERBOSE_MAKEFILE CMAKE_VERSION CMAKE_VISIBILITY_INLINES_HIDDEN CMAKE_VS_DEVENV_COMMAND CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD CMAKE_VS_INTEL_Fortran_PROJECT_VERSION CMAKE_VS_MSBUILD_COMMAND CMAKE_VS_NsightTegra_VERSION CMAKE_VS_PLATFORM_NAME CMAKE_VS_PLATFORM_TOOLSET CMAKE_VS_PLATFORM_TOOLSET_CUDA CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION CMAKE_WARN_DEPRECATED CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION CMAKE_WIN32_EXECUTABLE CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS CMAKE_XCODE_GENERATE_SCHEME CMAKE_XCODE_PLATFORM_TOOLSET CPACK_ABSOLUTE_DESTINATION_FILES CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION CPACK_INCLUDE_TOPLEVEL_DIRECTORY CPACK_INSTALL_SCRIPT CPACK_PACKAGING_INSTALL_PREFIX CPACK_SET_DESTDIR CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION CTEST_BINARY_DIRECTORY CTEST_BUILD_COMMAND CTEST_BUILD_NAME CTEST_BZR_COMMAND CTEST_BZR_UPDATE_OPTIONS CTEST_CHANGE_ID CTEST_CHECKOUT_COMMAND CTEST_CONFIGURATION_TYPE CTEST_CONFIGURE_COMMAND CTEST_COVERAGE_COMMAND CTEST_COVERAGE_EXTRA_FLAGS CTEST_CURL_OPTIONS CTEST_CUSTOM_COVERAGE_EXCLUDE CTEST_CUSTOM_ERROR_EXCEPTION CTEST_CUSTOM_ERROR_MATCH CTEST_CUSTOM_ERROR_POST_CONTEXT CTEST_CUSTOM_ERROR_PRE_CONTEXT CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE CTEST_CUSTOM_MEMCHECK_IGNORE CTEST_CUSTOM_POST_MEMCHECK CTEST_CUSTOM_POST_TEST CTEST_CUSTOM_PRE_MEMCHECK CTEST_CUSTOM_PRE_TEST CTEST_CUSTOM_TEST_IGNORE CTEST_CUSTOM_WARNING_EXCEPTION CTEST_CUSTOM_WARNING_MATCH CTEST_CVS_CHECKOUT CTEST_CVS_COMMAND CTEST_CVS_UPDATE_OPTIONS CTEST_DROP_LOCATION CTEST_DROP_METHOD CTEST_DROP_SITE CTEST_DROP_SITE_CDASH CTEST_DROP_SITE_PASSWORD CTEST_DROP_SITE_USER CTEST_EXTRA_COVERAGE_GLOB CTEST_GIT_COMMAND CTEST_GIT_INIT_SUBMODULES CTEST_GIT_UPDATE_CUSTOM CTEST_GIT_UPDATE_OPTIONS CTEST_HG_COMMAND CTEST_HG_UPDATE_OPTIONS CTEST_LABELS_FOR_SUBPROJECTS CTEST_MEMORYCHECK_COMMAND CTEST_MEMORYCHECK_COMMAND_OPTIONS CTEST_MEMORYCHECK_SANITIZER_OPTIONS CTEST_MEMORYCHECK_SUPPRESSIONS_FILE CTEST_MEMORYCHECK_TYPE CTEST_NIGHTLY_START_TIME CTEST_P4_CLIENT CTEST_P4_COMMAND CTEST_P4_OPTIONS CTEST_P4_UPDATE_OPTIONS CTEST_SCP_COMMAND CTEST_SITE CTEST_SOURCE_DIRECTORY CTEST_SVN_COMMAND CTEST_SVN_OPTIONS CTEST_SVN_UPDATE_OPTIONS CTEST_TEST_LOAD CTEST_TEST_TIMEOUT CTEST_TRIGGER_SITE CTEST_UPDATE_COMMAND CTEST_UPDATE_OPTIONS CTEST_UPDATE_VERSION_ONLY CTEST_USE_LAUNCHERS CYGWIN ENV EXECUTABLE_OUTPUT_PATH GHS-MULTI LIBRARY_OUTPUT_PATH MINGW MSVC MSVC10 MSVC11 MSVC12 MSVC14 MSVC60 MSVC70 MSVC71 MSVC80 MSVC90 MSVC_IDE MSVC_VERSION PROJECT_BINARY_DIR PROJECT_DESCRIPTION PROJECT_NAME PROJECT_SOURCE_DIR PROJECT_VERSION PROJECT_VERSION_MAJOR PROJECT_VERSION_MINOR PROJECT_VERSION_PATCH PROJECT_VERSION_TWEAK UNIX WIN32 WINCE WINDOWS_PHONE WINDOWS_STORE XCODE XCODE_VERSION syn keyword cmakeModule contained \ ExternalProject diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index ec8fedf..54b8beb 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -481,6 +481,7 @@ Variables for CTest /variable/CTEST_GIT_UPDATE_OPTIONS /variable/CTEST_HG_COMMAND /variable/CTEST_HG_UPDATE_OPTIONS + /variable/CTEST_LABELS_FOR_SUBPROJECTS /variable/CTEST_MEMORYCHECK_COMMAND /variable/CTEST_MEMORYCHECK_COMMAND_OPTIONS /variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index a89c4e9..16529e2 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -758,6 +758,15 @@ Configuration settings include: * :module:`CTest` module variable: :variable:`CMAKE_COMMAND` followed by :variable:`PROJECT_SOURCE_DIR` +``LabelsForSubprojects`` + Specify a semicolon-separated list of labels that will be treated as + subprojects. This mapping will be passed on to CDash when configure, test or + build results are submitted. + + * `CTest Script`_ variable: :variable:`CTEST_LABELS_FOR_SUBPROJECTS` + * :module:`CTest` module variable: ``CTEST_LABELS_FOR_SUBPROJECTS`` + + .. _`CTest Build Step`: CTest Build Step @@ -780,6 +789,14 @@ Configuration settings include: * :module:`CTest` module variable: ``DEFAULT_CTEST_CONFIGURATION_TYPE``, initialized by the ``CMAKE_CONFIG_TYPE`` environment variable +``LabelsForSubprojects`` + Specify a semicolon-separated list of labels that will be treated as + subprojects. This mapping will be passed on to CDash when configure, test or + build results are submitted. + + * `CTest Script`_ variable: :variable:`CTEST_LABELS_FOR_SUBPROJECTS` + * :module:`CTest` module variable: ``CTEST_LABELS_FOR_SUBPROJECTS`` + ``MakeCommand`` Command-line to launch the software build process. It will be executed in the location specified by the @@ -815,6 +832,15 @@ Arguments to the command may specify some of the step settings. Configuration settings include: +``LabelsForSubprojects`` + Specify a semicolon-separated list of labels that will be treated as + subprojects. This mapping will be passed on to CDash when configure, test or + build results are submitted. + + * `CTest Script`_ variable: :variable:`CTEST_LABELS_FOR_SUBPROJECTS` + * :module:`CTest` module variable: ``CTEST_LABELS_FOR_SUBPROJECTS`` + + ``TestLoad`` 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. diff --git a/Help/variable/CTEST_LABELS_FOR_SUBPROJECTS.rst b/Help/variable/CTEST_LABELS_FOR_SUBPROJECTS.rst new file mode 100644 index 0000000..959596b --- /dev/null +++ b/Help/variable/CTEST_LABELS_FOR_SUBPROJECTS.rst @@ -0,0 +1,5 @@ +CTEST_LABELS_FOR_SUBPROJECTS +---------------------------- + +Specify the CTest ``LabelsForSubprojects`` setting +in a :manual:`ctest(1)` dashboard client script. diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in index 0ff2eed..b86a5a9 100644 --- a/Modules/DartConfiguration.tcl.in +++ b/Modules/DartConfiguration.tcl.in @@ -16,6 +16,9 @@ Site: @SITE@ # Build name is osname-revision-compiler, i.e. Linux-2.4.2-2smp-c++ BuildName: @BUILDNAME@ +# Subprojects +LabelsForSubprojects: @CTEST_LABELS_FOR_SUBPROJECTS@ + # Submission information IsCDash: @CTEST_DROP_SITE_CDASH@ CDashVersion: @CTEST_CDASH_VERSION@ diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx index 4c82760..64ef8de 100644 --- a/Source/CTest/cmCTestBuildCommand.cxx +++ b/Source/CTest/cmCTestBuildCommand.cxx @@ -153,6 +153,12 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() this->Quiet); } + if (const char* labelsForSubprojects = + this->Makefile->GetDefinition("CTEST_LABELS_FOR_SUBPROJECTS")) { + this->CTest->SetCTestConfiguration("LabelsForSubprojects", + labelsForSubprojects, this->Quiet); + } + handler->SetQuiet(this->Quiet); return handler; } diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 18ef05c..f9116e3 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -488,6 +488,7 @@ int cmCTestBuildHandler::ProcessHandler() void cmCTestBuildHandler::GenerateXMLHeader(cmXMLWriter& xml) { this->CTest->StartXML(xml, this->AppendXML); + this->CTest->GenerateSubprojectsOutput(xml); xml.StartElement("Build"); xml.Element("StartDateTime", this->StartBuild); xml.Element("StartBuildTime", diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx index 73e893d..aca5bd3 100644 --- a/Source/CTest/cmCTestConfigureCommand.cxx +++ b/Source/CTest/cmCTestConfigureCommand.cxx @@ -141,6 +141,12 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler() } } + if (const char* labelsForSubprojects = + this->Makefile->GetDefinition("CTEST_LABELS_FOR_SUBPROJECTS")) { + this->CTest->SetCTestConfiguration("LabelsForSubprojects", + labelsForSubprojects, this->Quiet); + } + cmCTestGenericHandler* handler = this->CTest->GetInitializedHandler("configure"); if (!handler) { diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx index 5d87f3f..56a038e 100644 --- a/Source/CTest/cmCTestConfigureHandler.cxx +++ b/Source/CTest/cmCTestConfigureHandler.cxx @@ -73,6 +73,7 @@ int cmCTestConfigureHandler::ProcessHandler() if (os) { cmXMLWriter xml(os); this->CTest->StartXML(xml, this->AppendXML); + this->CTest->GenerateSubprojectsOutput(xml); xml.StartElement("Configure"); xml.Element("StartDateTime", start_time); xml.Element("StartConfigureTime", start_time_time); diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index c35f0bc..6026a2a 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -291,6 +291,7 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml) return; } this->CTest->StartXML(xml, this->AppendXML); + this->CTest->GenerateSubprojectsOutput(xml); xml.StartElement("DynamicAnalysis"); switch (this->MemoryTesterStyle) { case cmCTestMemCheckHandler::VALGRIND: diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 1d29dfa..c566c5c 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -394,7 +394,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg) return 0; } -// extract variabels from the script to set ivars +// extract variables from the script to set ivars int cmCTestScriptHandler::ExtractVariables() { // Temporary variables diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx index 075b140..3346d86 100644 --- a/Source/CTest/cmCTestTestCommand.cxx +++ b/Source/CTest/cmCTestTestCommand.cxx @@ -124,6 +124,12 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler() } handler->SetTestLoad(testLoad); + if (const char* labelsForSubprojects = + this->Makefile->GetDefinition("CTEST_LABELS_FOR_SUBPROJECTS")) { + this->CTest->SetCTestConfiguration("LabelsForSubprojects", + labelsForSubprojects, this->Quiet); + } + handler->SetQuiet(this->Quiet); return handler; } diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 674be60..cce1516 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1277,6 +1277,7 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) } this->CTest->StartXML(xml, this->AppendXML); + this->CTest->GenerateSubprojectsOutput(xml); xml.StartElement("Testing"); xml.Element("StartDateTime", this->StartTest); xml.Element("StartTestTime", this->StartTestTime); diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index e260556..1eedaf1 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -11,6 +11,7 @@ #include "cmsys/Process.h" #include "cmsys/String.hxx" #include "cmsys/SystemInformation.hxx" +#include #include #include #include @@ -1363,6 +1364,35 @@ void cmCTest::AddSiteProperties(cmXMLWriter& xml) } } +void cmCTest::GenerateSubprojectsOutput(cmXMLWriter& xml) +{ + std::vector subprojects = this->GetLabelsForSubprojects(); + std::vector::const_iterator i; + for (i = subprojects.begin(); i != subprojects.end(); ++i) { + xml.StartElement("Subproject"); + xml.Attribute("name", *i); + xml.Element("Label", *i); + xml.EndElement(); // Subproject + } +} + +std::vector cmCTest::GetLabelsForSubprojects() +{ + std::string labelsForSubprojects = + this->GetCTestConfiguration("LabelsForSubprojects"); + std::vector subprojects; + cmSystemTools::ExpandListArgument(labelsForSubprojects, subprojects); + + // sort the array + std::sort(subprojects.begin(), subprojects.end()); + // remove duplicates + std::vector::iterator new_end = + std::unique(subprojects.begin(), subprojects.end()); + subprojects.erase(new_end, subprojects.end()); + + return subprojects; +} + void cmCTest::EndXML(cmXMLWriter& xml) { xml.EndElement(); // Site diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 60f3295..190269a 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -453,6 +453,9 @@ public: /** Return true if test should run until fail */ bool GetRepeatUntilFail() { return this->RepeatUntilFail; } + void GenerateSubprojectsOutput(cmXMLWriter& xml); + std::vector GetLabelsForSubprojects(); + private: int RepeatTests; bool RepeatUntilFail; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ef0eedb496cd60a9fa9c9f51e02e167c8a1e64a commit 4ef0eedb496cd60a9fa9c9f51e02e167c8a1e64a Author: Yurii Batrak AuthorDate: Mon Jul 10 12:18:02 2017 +0200 Commit: Yurii Batrak CommitDate: Mon Jul 10 13:08:18 2017 +0200 Ninja: always use response file for cmake_ninja_dyndep Command line argument passed to the internal tool "cmake_ninja_dyndep" could hit MAX_ARG_STRLEN on Linux for projects with a large code base. To prevent such problems, a response file was opted for argument transfer in all cases, not only on Windows. diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 7c57ef0..79191ec 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -557,17 +557,11 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) // Write the rule for ninja dyndep file generation. std::vector ddCmds; -#ifdef _WIN32 - // Windows command line length is limited -> use response file for dyndep - // rules + // Command line length is almost always limited -> use response file for + // dyndep rules std::string ddRspFile = "$out.rsp"; std::string ddRspContent = "$in"; std::string ddInput = "@" + ddRspFile; -#else - std::string ddRspFile; - std::string ddRspContent; - std::string ddInput = "$in"; -#endif // Run CMake dependency scanner on preprocessed output. std::string const cmake = this->GetLocalGenerator()->ConvertToOutputFormat( ----------------------------------------------------------------------- Summary of changes: Auxiliary/vim/syntax/cmake.vim | 5 +- Help/manual/cmake-properties.7.rst | 4 +- Help/manual/cmake-variables.7.rst | 2 + Help/manual/ctest.1.rst | 33 ++++ Help/prop_dir/LABELS.rst | 13 ++ Help/prop_dir/TEST_INCLUDE_FILE.rst | 4 +- Help/prop_dir/TEST_INCLUDE_FILES.rst | 7 + Help/release/dev/labels_for_subprojects.rst | 14 ++ Help/release/dev/test_include_files.rst | 7 + Help/variable/CMAKE_DIRECTORY_LABELS.rst | 6 + Help/variable/CTEST_LABELS_FOR_SUBPROJECTS.rst | 5 + Modules/DartConfiguration.tcl.in | 3 + Modules/FindProtobuf.cmake | 20 +- Source/CTest/cmCTestBuildCommand.cxx | 6 + Source/CTest/cmCTestBuildHandler.cxx | 1 + Source/CTest/cmCTestConfigureCommand.cxx | 6 + Source/CTest/cmCTestConfigureHandler.cxx | 1 + Source/CTest/cmCTestMemCheckHandler.cxx | 1 + Source/CTest/cmCTestRunTest.cxx | 5 +- Source/CTest/cmCTestScriptHandler.cxx | 2 +- Source/CTest/cmCTestTestCommand.cxx | 6 + Source/CTest/cmCTestTestHandler.cxx | 207 ++++++++++++++++++-- Source/CTest/cmCTestTestHandler.h | 10 +- Source/CTest/cmProcess.cxx | 5 + Source/CTest/cmProcess.h | 1 + Source/cmCTest.cxx | 34 ++++ Source/cmCTest.h | 6 + Source/cmCommands.cxx | 4 +- Source/cmGlobalGenerator.cxx | 57 +++++- Source/cmLocalGenerator.cxx | 31 +++ Source/cmMakefile.cxx | 3 + Source/cmNinjaTargetGenerator.cxx | 10 +- Source/ctest.cxx | 2 + Tests/FindProtobuf/Test/CMakeLists.txt | 2 + Tests/RunCMake/CMakeLists.txt | 2 + .../ctest_labels_for_subprojects/CMakeLists.txt.in | 5 + .../CTestConfig.cmake.in | 2 + .../CTestConfigCTestScript-check.cmake | 36 ++++ .../CTestConfigCTestScript-stdout.txt | 7 + .../CTestScriptVariable-check.cmake | 36 ++++ .../CTestScriptVariable-stdout.txt | 7 + .../CTestScriptVariableCommandLine-check.cmake | 34 ++++ .../CTestScriptVariableCommandLine-result.txt} | 0 .../CTestScriptVariableCommandLine-stderr.txt | 1 + .../CTestScriptVariableCommandLine-stdout.txt | 6 + .../ModuleVariableCMakeLists-result.txt} | 0 .../ModuleVariableCMakeLists-stderr.txt} | 0 .../ModuleVariableCMakeLists-stdout.txt | 6 + .../ModuleVariableCTestConfig-result.txt} | 0 .../ModuleVariableCTestConfig-stderr.txt} | 0 .../ModuleVariableCTestConfig-stdout.txt | 6 + .../ModuleVariableCTestConfigNoSummary-result.txt} | 0 .../ModuleVariableCTestConfigNoSummary-stderr.txt} | 0 .../ModuleVariableCTestConfigNoSummary-stdout.txt | 7 + .../ModuleVariableCommandLine-result.txt} | 0 .../ModuleVariableCommandLine-stderr.txt} | 0 .../ModuleVariableCommandLine-stdout.txt | 6 + .../MyExperimentalFeature/CMakeLists.txt | 33 ++++ .../MyExperimentalFeature/experimental.c | 16 ++ .../MyProductionCode/CMakeLists.txt | 12 ++ .../MyProductionCode/production.c | 16 ++ .../MyThirdPartyDependency/CMakeLists.txt | 7 + .../MyThirdPartyDependency/src/CMakeLists.txt | 10 + .../MyThirdPartyDependency/src/thirdparty.c | 14 ++ .../RunCMakeTest.cmake | 185 +++++++++++++++++ .../ctest_labels_for_subprojects/test.cmake.in | 21 ++ .../{Android => test_include_dirs}/CMakeLists.txt | 0 .../RunCMake/test_include_dirs/RunCMakeTest.cmake | 17 ++ .../RunCMake/test_include_dirs/TID-test-stdout.txt | 17 ++ Tests/RunCMake/test_include_dirs/TID.cmake | 29 +++ Tests/RunCMake/test_include_dirs/add-tests.cmake | 8 + .../RunCMake/test_include_dirs/dummy.cpp | 0 72 files changed, 1024 insertions(+), 45 deletions(-) create mode 100644 Help/prop_dir/LABELS.rst create mode 100644 Help/prop_dir/TEST_INCLUDE_FILES.rst create mode 100644 Help/release/dev/labels_for_subprojects.rst create mode 100644 Help/release/dev/test_include_files.rst create mode 100644 Help/variable/CMAKE_DIRECTORY_LABELS.rst create mode 100644 Help/variable/CTEST_LABELS_FOR_SUBPROJECTS.rst create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/CMakeLists.txt.in create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-check.cmake create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/CTestConfigCTestScript-stdout.txt create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-check.cmake create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariable-stdout.txt create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-check.cmake copy Tests/RunCMake/{ctest_build/BuildFailure-result.txt => ctest_labels_for_subprojects/CTestScriptVariableCommandLine-result.txt} (100%) create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stderr.txt create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/CTestScriptVariableCommandLine-stdout.txt copy Tests/RunCMake/{CTestCommandLine/SerialFailed-result.txt => ctest_labels_for_subprojects/ModuleVariableCMakeLists-result.txt} (100%) copy Tests/RunCMake/{CTestCommandLine/TestOutputSize-stderr.txt => ctest_labels_for_subprojects/ModuleVariableCMakeLists-stderr.txt} (100%) create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCMakeLists-stdout.txt copy Tests/RunCMake/{CTestCommandLine/SerialFailed-result.txt => ctest_labels_for_subprojects/ModuleVariableCTestConfig-result.txt} (100%) copy Tests/RunCMake/{CTestCommandLine/TestOutputSize-stderr.txt => ctest_labels_for_subprojects/ModuleVariableCTestConfig-stderr.txt} (100%) create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfig-stdout.txt copy Tests/RunCMake/{CTestCommandLine/SerialFailed-result.txt => ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-result.txt} (100%) copy Tests/RunCMake/{CTestCommandLine/TestOutputSize-stderr.txt => ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stderr.txt} (100%) create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCTestConfigNoSummary-stdout.txt copy Tests/RunCMake/{CTestCommandLine/SerialFailed-result.txt => ctest_labels_for_subprojects/ModuleVariableCommandLine-result.txt} (100%) copy Tests/RunCMake/{CTestCommandLine/TestOutputSize-stderr.txt => ctest_labels_for_subprojects/ModuleVariableCommandLine-stderr.txt} (100%) create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/ModuleVariableCommandLine-stdout.txt create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/MyExperimentalFeature/CMakeLists.txt create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/MyExperimentalFeature/experimental.c create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/MyProductionCode/CMakeLists.txt create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/MyProductionCode/production.c create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/CMakeLists.txt create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/src/CMakeLists.txt create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/MyThirdPartyDependency/src/thirdparty.c create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/ctest_labels_for_subprojects/test.cmake.in copy Tests/RunCMake/{Android => test_include_dirs}/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/test_include_dirs/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/test_include_dirs/TID-test-stdout.txt create mode 100644 Tests/RunCMake/test_include_dirs/TID.cmake create mode 100644 Tests/RunCMake/test_include_dirs/add-tests.cmake copy Modules/DummyCXXFile.cxx => Tests/RunCMake/test_include_dirs/dummy.cpp (100%) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jul 13 08:25:09 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 13 Jul 2017 08:25:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-280-gaa97170 Message-ID: <20170713122509.C1AC6FAE39@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 aa97170f2b25a99d2cc69fd6b2a059e52872f341 (commit) via 80f59ee6028aaaa9019e3d1eac0c018039a7f22a (commit) from a4a39a46c34c1227be999eb10dd39ddeb70ada7b (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=aa97170f2b25a99d2cc69fd6b2a059e52872f341 commit aa97170f2b25a99d2cc69fd6b2a059e52872f341 Merge: a4a39a4 80f59ee Author: Brad King AuthorDate: Thu Jul 13 12:23:52 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 13 08:23:56 2017 -0400 Merge topic 'win10-sdk-request-mismatch' 80f59ee6 cmGlobalVisualStudio14Generator: notify when the SDK version doesn't match Acked-by: Kitware Robot Merge-request: !866 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80f59ee6028aaaa9019e3d1eac0c018039a7f22a commit 80f59ee6028aaaa9019e3d1eac0c018039a7f22a Author: Ben Boeckel AuthorDate: Wed May 17 14:23:53 2017 -0400 Commit: Ben Boeckel CommitDate: Thu Jul 13 08:10:57 2017 -0400 cmGlobalVisualStudio14Generator: notify when the SDK version doesn't match When requesting an SDK version which is not suitable (e.g., missing `windows.h`), CMake will use the next-best SDK version. Output a message when CMake chooses something different than the requested SDK version. See #16895. diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index c8cf02c..e2120b8 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -151,6 +151,13 @@ bool cmGlobalVisualStudio14Generator::SelectWindows10SDK(cmMakefile* mf, mf->IssueMessage(cmake::FATAL_ERROR, e.str()); return false; } + if (!cmSystemTools::VersionCompareEqual(this->WindowsTargetPlatformVersion, + this->SystemVersion)) { + std::ostringstream e; + e << "Selecting Windows SDK version " << this->WindowsTargetPlatformVersion + << " to target Windows " << this->SystemVersion << "."; + mf->DisplayStatus(e.str().c_str(), -1); + } mf->AddDefinition("CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION", this->WindowsTargetPlatformVersion.c_str()); return true; ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio14Generator.cxx | 7 +++++++ 1 file changed, 7 insertions(+) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jul 13 10:15:18 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 13 Jul 2017 10:15:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-284-g4b460a5 Message-ID: <20170713141518.DAF89FA6BF@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 4b460a5ba8cdb36e05c1517237c8ef15562e4490 (commit) via 489a7706c25b604fa06644ab5044a9f5954b7953 (commit) via d11c48e0e344e6758a5575330b3f0e267d820e02 (commit) via 4bafa3922e3773e5bcc6741994379455c7d1c0fc (commit) from aa97170f2b25a99d2cc69fd6b2a059e52872f341 (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=4b460a5ba8cdb36e05c1517237c8ef15562e4490 commit 4b460a5ba8cdb36e05c1517237c8ef15562e4490 Merge: 489a770 d11c48e Author: Brad King AuthorDate: Thu Jul 13 10:08:27 2017 -0400 Commit: Brad King CommitDate: Thu Jul 13 10:08:27 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=489a7706c25b604fa06644ab5044a9f5954b7953 commit 489a7706c25b604fa06644ab5044a9f5954b7953 Merge: aa97170 4bafa39 Author: Brad King AuthorDate: Thu Jul 13 14:07:32 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 13 10:07:36 2017 -0400 Merge topic 'android-system-include-last' 4bafa392 Android: Always add standard include directories last Acked-by: Kitware Robot Merge-request: !1052 ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android-Common.cmake | 1 - Source/cmGeneratorTarget.cxx | 12 ------------ Source/cmLocalGenerator.cxx | 14 ++++++++++++++ Tests/RunCMake/Android/android_sysinc.c | 7 +++++++ Tests/RunCMake/Android/android_sysinc.cxx | 7 +++++++ Tests/RunCMake/Android/common.cmake | 16 ++++++++++++++++ Tests/RunCMake/Android/sysinc/dlfcn.h | 1 + 7 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 Tests/RunCMake/Android/android_sysinc.c create mode 100644 Tests/RunCMake/Android/android_sysinc.cxx create mode 100644 Tests/RunCMake/Android/sysinc/dlfcn.h hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jul 13 10:15:19 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 13 Jul 2017 10:15:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc6-2-gd11c48e Message-ID: <20170713141519.409C1FA6BF@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 d11c48e0e344e6758a5575330b3f0e267d820e02 (commit) via 4bafa3922e3773e5bcc6741994379455c7d1c0fc (commit) from 25b72e9097260d1faf254155a1199886c808a58f (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/Platform/Android-Common.cmake | 1 - Source/cmGeneratorTarget.cxx | 12 ------------ Source/cmLocalGenerator.cxx | 14 ++++++++++++++ Tests/RunCMake/Android/android_sysinc.c | 7 +++++++ Tests/RunCMake/Android/android_sysinc.cxx | 7 +++++++ Tests/RunCMake/Android/common.cmake | 16 ++++++++++++++++ Tests/RunCMake/Android/sysinc/dlfcn.h | 1 + 7 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 Tests/RunCMake/Android/android_sysinc.c create mode 100644 Tests/RunCMake/Android/android_sysinc.cxx create mode 100644 Tests/RunCMake/Android/sysinc/dlfcn.h hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jul 14 00:05:20 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 14 Jul 2017 00:05:20 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-285-g52db8d5 Message-ID: <20170714040520.CE8E2FB028@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 52db8d55e8418ba29df8cf108c789fa909a4398e (commit) from 4b460a5ba8cdb36e05c1517237c8ef15562e4490 (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=52db8d55e8418ba29df8cf108c789fa909a4398e commit 52db8d55e8418ba29df8cf108c789fa909a4398e Author: Kitware Robot AuthorDate: Fri Jul 14 00:01:07 2017 -0400 Commit: Kitware Robot CommitDate: Fri Jul 14 00:01:07 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6a45aec..1772ae5 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 20170713) +set(CMake_VERSION_PATCH 20170714) #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 Jul 14 08:25:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 14 Jul 2017 08:25:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-293-g0f096b8 Message-ID: <20170714122506.E0D36FAD6F@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 0f096b8d733bb43f1fa95c052e5c2d9e8b381508 (commit) via 688b1c11ec6a9eb071594c77a4c92023660be20e (commit) via 38f81fab720ccf5eef6c94ffa2c84f7bb6c005d9 (commit) via 652b2956c85987300fe0092ecf476fe305e2aecd (commit) via 336c4fc6fa80149e189a19f91b8de934b48105de (commit) via 712af07e4792beea6f3b62bddace9077d7fec525 (commit) via fda50a08437d99aba753bc84d26ba535e06e7b06 (commit) via 21ee3309b2a4d598bf933f644b41cd4840cde8c3 (commit) from 52db8d55e8418ba29df8cf108c789fa909a4398e (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=0f096b8d733bb43f1fa95c052e5c2d9e8b381508 commit 0f096b8d733bb43f1fa95c052e5c2d9e8b381508 Merge: 688b1c1 336c4fc Author: Brad King AuthorDate: Fri Jul 14 12:24:26 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jul 14 08:24:31 2017 -0400 Merge topic 'cmp0054-asm-warning' 336c4fc6 CMakeDetermineASMCompiler: fix a CMP0054 warning Acked-by: Kitware Robot Merge-request: !1057 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=688b1c11ec6a9eb071594c77a4c92023660be20e commit 688b1c11ec6a9eb071594c77a4c92023660be20e Merge: 38f81fa 712af07 Author: Brad King AuthorDate: Fri Jul 14 12:23:52 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jul 14 08:23:58 2017 -0400 Merge topic 'ninja_cuda_export_compile_commands_support' 712af07e CUDA: CMAKE_EXPORT_COMPILE_COMMANDS now works with CUDA and Ninja Acked-by: Kitware Robot Merge-request: !1055 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38f81fab720ccf5eef6c94ffa2c84f7bb6c005d9 commit 38f81fab720ccf5eef6c94ffa2c84f7bb6c005d9 Merge: 652b295 21ee330 Author: Brad King AuthorDate: Fri Jul 14 12:22:43 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jul 14 08:22:59 2017 -0400 Merge topic 'vs_csharp_add_custom_command_comment' 21ee3309 VS: print comment in CSharp target only if it is actually set Acked-by: Kitware Robot Merge-request: !1049 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=652b2956c85987300fe0092ecf476fe305e2aecd commit 652b2956c85987300fe0092ecf476fe305e2aecd Merge: 52db8d5 fda50a0 Author: Brad King AuthorDate: Fri Jul 14 12:22:23 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jul 14 08:22:27 2017 -0400 Merge topic 'CMakePushCheckState-fix-RESET' fda50a08 CMakePushCheckState: Fix cmake_push_check_state RESET argument Acked-by: Kitware Robot Merge-request: !1040 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=336c4fc6fa80149e189a19f91b8de934b48105de commit 336c4fc6fa80149e189a19f91b8de934b48105de Author: Ben Boeckel AuthorDate: Thu Jul 13 13:39:49 2017 -0400 Commit: Ben Boeckel CommitDate: Thu Jul 13 14:01:38 2017 -0400 CMakeDetermineASMCompiler: fix a CMP0054 warning This was introduced in commit d8e6cd9e (IAR: Improve support for IAR ARM Compiler, 2017-06-15) from !991. Fixes #17062. diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index d031421..f7cf54a 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -103,7 +103,7 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) include(CMakeDetermineCompilerId) set(userflags) CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT} "${userflags}") - if("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}" STREQUAL "IAR") + if("x${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}" STREQUAL "xIAR") # primary necessary to detect architecture, so the right archiver and linker can be picked # eg. IAR Assembler V8.10.1.12857/W32 for ARM # Cut out identification first, newline handling is a pain https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=712af07e4792beea6f3b62bddace9077d7fec525 commit 712af07e4792beea6f3b62bddace9077d7fec525 Author: Robert Maynard AuthorDate: Thu Jul 13 11:00:40 2017 -0400 Commit: Robert Maynard CommitDate: Thu Jul 13 11:23:16 2017 -0400 CUDA: CMAKE_EXPORT_COMPILE_COMMANDS now works with CUDA and Ninja Fixes: #17061 diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake index 780e953..9bba847 100644 --- a/Modules/CMakeCUDAInformation.cmake +++ b/Modules/CMakeCUDAInformation.cmake @@ -104,7 +104,9 @@ include(CMakeCommonLanguageInclude) # now define the following rules: # CMAKE_CUDA_CREATE_SHARED_LIBRARY # CMAKE_CUDA_CREATE_SHARED_MODULE -# CMAKE_CUDA_COMPILE_OBJECT +# CMAKE_CUDA_COMPILE_WHOLE_COMPILATION +# CMAKE_CUDA_COMPILE_PTX_COMPILATION +# CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION # CMAKE_CUDA_LINK_EXECUTABLE if(CMAKE_CUDA_HOST_COMPILER) diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 2f4cccb..d38dbcb 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -1064,13 +1064,28 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( compileObjectVars.Includes = includes.c_str(); // Rule for compiling object file. - std::string compileCmdVar = "CMAKE_"; - compileCmdVar += language; - compileCmdVar += "_COMPILE_OBJECT"; - std::string compileCmd = - this->GetMakefile()->GetRequiredDefinition(compileCmdVar); std::vector compileCmds; - cmSystemTools::ExpandListArgument(compileCmd, compileCmds); + if (language == "CUDA") { + std::string cmdVar; + if (this->GeneratorTarget->GetPropertyAsBool( + "CUDA_SEPARABLE_COMPILATION")) { + cmdVar = std::string("CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION"); + } else if (this->GeneratorTarget->GetPropertyAsBool( + "CUDA_PTX_COMPILATION")) { + cmdVar = std::string("CMAKE_CUDA_COMPILE_PTX_COMPILATION"); + } else { + cmdVar = std::string("CMAKE_CUDA_COMPILE_WHOLE_COMPILATION"); + } + std::string compileCmd = + this->GetMakefile()->GetRequiredDefinition(cmdVar); + cmSystemTools::ExpandListArgument(compileCmd, compileCmds); + } else { + const std::string cmdVar = + std::string("CMAKE_") + language + "_COMPILE_OBJECT"; + std::string compileCmd = + this->GetMakefile()->GetRequiredDefinition(cmdVar); + cmSystemTools::ExpandListArgument(compileCmd, compileCmds); + } CM_AUTO_PTR rulePlaceholderExpander( this->GetLocalGenerator()->CreateRulePlaceholderExpander()); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fda50a08437d99aba753bc84d26ba535e06e7b06 commit fda50a08437d99aba753bc84d26ba535e06e7b06 Author: Brad King AuthorDate: Mon Jul 10 10:30:17 2017 -0400 Commit: Brad King CommitDate: Wed Jul 12 15:09:16 2017 -0400 CMakePushCheckState: Fix cmake_push_check_state RESET argument This option was added by commit v2.8.12~138^2 (Add cmake_reset_check_state() macro, 2013-07-28) but has never worked. Fix the implementation to refer to macro arguments properly (not as normal variables). Fixes: #17048 diff --git a/Modules/CMakePushCheckState.cmake b/Modules/CMakePushCheckState.cmake index 2a527d5..98eea05 100644 --- a/Modules/CMakePushCheckState.cmake +++ b/Modules/CMakePushCheckState.cmake @@ -62,7 +62,7 @@ macro(CMAKE_PUSH_CHECK_STATE) set(_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_FLAGS}) set(_CMAKE_REQUIRED_QUIET_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_QUIET}) - if (ARGC GREATER 0 AND ARGV0 STREQUAL "RESET") + if (${ARGC} GREATER 0 AND "${ARGV0}" STREQUAL "RESET") cmake_reset_check_state() endif() diff --git a/Tests/CMakeTests/PushCheckStateTest.cmake.in b/Tests/CMakeTests/PushCheckStateTest.cmake.in index b4c48f4..cbd879d 100644 --- a/Tests/CMakeTests/PushCheckStateTest.cmake.in +++ b/Tests/CMakeTests/PushCheckStateTest.cmake.in @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.8) include(CMakePushCheckState) set(CMAKE_EXTRA_INCLUDE_FILES file1) @@ -26,6 +27,27 @@ set(CMAKE_REQUIRED_LIBRARIES lib3) set(CMAKE_REQUIRED_FLAGS flag3) set(CMAKE_REQUIRED_QUIET 3) +cmake_push_check_state(RESET) + +foreach(pair IN ITEMS + EXTRA_INCLUDE_FILES| + REQUIRED_INCLUDES| + REQUIRED_DEFINITIONS| + REQUIRED_LIBRARIES| + REQUIRED_FLAGS| + REQUIRED_QUIET| + ) + string(REPLACE "|" ";" pair "${pair}") + list(GET pair 0 var) + list(GET pair 1 expected) + if (NOT "${CMAKE_${var}}" STREQUAL "${expected}") + set(fatal TRUE) + message("ERROR: CMAKE_${var} is \"${CMAKE_${var}}\" (expected \"${expected}\")" ) + endif() +endforeach() + +cmake_pop_check_state() + cmake_pop_check_state() foreach(pair IN ITEMS https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21ee3309b2a4d598bf933f644b41cd4840cde8c3 commit 21ee3309b2a4d598bf933f644b41cd4840cde8c3 Author: Michael St?rmer AuthorDate: Wed Jul 12 15:45:28 2017 +0200 Commit: Michael St?rmer CommitDate: Wed Jul 12 15:45:28 2017 +0200 VS: print comment in CSharp target only if it is actually set diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index e4a4d6f..5570593 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3553,7 +3553,11 @@ void cmVisualStudio10TargetGenerator::WriteEvent( (*this->BuildFileStream) << cmVS10EscapeXML(comment) << "\n"; this->WriteString("", 3); } else { - if (!comment.empty()) { + std::string strippedComment = comment; + strippedComment.erase( + std::remove(strippedComment.begin(), strippedComment.end(), '\t'), + strippedComment.end()); + if (!comment.empty() && !strippedComment.empty()) { (*this->BuildFileStream) << "echo " << cmVS10EscapeXML(comment) << "\n"; } } ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCUDAInformation.cmake | 4 +++- Modules/CMakeDetermineASMCompiler.cmake | 2 +- Modules/CMakePushCheckState.cmake | 2 +- Source/cmNinjaTargetGenerator.cxx | 27 ++++++++++++++++++++------ Source/cmVisualStudio10TargetGenerator.cxx | 6 +++++- Tests/CMakeTests/PushCheckStateTest.cmake.in | 22 +++++++++++++++++++++ 6 files changed, 53 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jul 14 11:15:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 14 Jul 2017 11:15:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-295-gdb8b6c6 Message-ID: <20170714151504.EA909FAA1E@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 db8b6c69da64e3b72606afedfab7d13666ad2cac (commit) via 9d9085ab3614fa36d8b3e7e337468b53ae646b82 (commit) from 0f096b8d733bb43f1fa95c052e5c2d9e8b381508 (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=db8b6c69da64e3b72606afedfab7d13666ad2cac commit db8b6c69da64e3b72606afedfab7d13666ad2cac Merge: 0f096b8 9d9085a Author: Brad King AuthorDate: Fri Jul 14 11:13:18 2017 -0400 Commit: Brad King CommitDate: Fri Jul 14 11:13:18 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jul 14 11:15:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 14 Jul 2017 11:15:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc6-4-g9d9085a Message-ID: <20170714151505.07DF2FAA3C@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 9d9085ab3614fa36d8b3e7e337468b53ae646b82 (commit) via 712af07e4792beea6f3b62bddace9077d7fec525 (commit) from d11c48e0e344e6758a5575330b3f0e267d820e02 (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/CMakeCUDAInformation.cmake | 4 +++- Source/cmNinjaTargetGenerator.cxx | 27 +++++++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Jul 15 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 15 Jul 2017 00:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-296-gc9433f9 Message-ID: <20170715040505.E977CFAB96@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 c9433f9b5a2350df27759a7f36faab6412c54930 (commit) from db8b6c69da64e3b72606afedfab7d13666ad2cac (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=c9433f9b5a2350df27759a7f36faab6412c54930 commit c9433f9b5a2350df27759a7f36faab6412c54930 Author: Kitware Robot AuthorDate: Sat Jul 15 00:01:09 2017 -0400 Commit: Kitware Robot CommitDate: Sat Jul 15 00:01:09 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1772ae5..7d601b5 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 20170714) +set(CMake_VERSION_PATCH 20170715) #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 Jul 16 00:05:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 16 Jul 2017 00:05:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-297-gecfd3ef Message-ID: <20170716040503.82CFBFADF7@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 ecfd3ef2f30327ec53bc6a0c9b22ffe554ff3beb (commit) from c9433f9b5a2350df27759a7f36faab6412c54930 (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=ecfd3ef2f30327ec53bc6a0c9b22ffe554ff3beb commit ecfd3ef2f30327ec53bc6a0c9b22ffe554ff3beb Author: Kitware Robot AuthorDate: Sun Jul 16 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Sun Jul 16 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7d601b5..aee6c54 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 20170715) +set(CMake_VERSION_PATCH 20170716) #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 Jul 17 00:05:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 17 Jul 2017 00:05:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-298-g2d5e494 Message-ID: <20170717040503.6E7D0FAD87@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 2d5e494637f9dad13fd0206ac3420e7d26f8b778 (commit) from ecfd3ef2f30327ec53bc6a0c9b22ffe554ff3beb (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=2d5e494637f9dad13fd0206ac3420e7d26f8b778 commit 2d5e494637f9dad13fd0206ac3420e7d26f8b778 Author: Kitware Robot AuthorDate: Mon Jul 17 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Mon Jul 17 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index aee6c54..7a10ae1 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 20170716) +set(CMake_VERSION_PATCH 20170717) #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 Jul 17 10:25:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 17 Jul 2017 10:25:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-300-g9604190 Message-ID: <20170717142505.37034FAA48@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 96041907014c9d1f83dc6b2c7fbbdab8aed728ea (commit) via a1b3886556c0c052983fc2c9299f121c04a56b93 (commit) from 2d5e494637f9dad13fd0206ac3420e7d26f8b778 (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=96041907014c9d1f83dc6b2c7fbbdab8aed728ea commit 96041907014c9d1f83dc6b2c7fbbdab8aed728ea Merge: 2d5e494 a1b3886 Author: Brad King AuthorDate: Mon Jul 17 14:24:18 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jul 17 10:24:54 2017 -0400 Merge topic 'FindLibXml2-standard-vars' a1b38865 FindLibXml2: Switch to standard module variable names Acked-by: Kitware Robot Merge-request: !1043 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1b3886556c0c052983fc2c9299f121c04a56b93 commit a1b3886556c0c052983fc2c9299f121c04a56b93 Author: Vadim Zhukov AuthorDate: Tue Jul 11 01:43:47 2017 +0300 Commit: Brad King CommitDate: Fri Jul 14 11:25:10 2017 -0400 FindLibXml2: Switch to standard module variable names * LIBXML2_INCLUDE_DIR talks about libxml2 itself; * LIBXML2_INCLUDE_DIRS lists also include directories coming from libxml2's dependencies and is what libxml2 users should use; * LIBXML2_LIBRARY talks about libxml2 itself; * LIBXML2_LIBRARIES is what libxml2 users should link to. This commit doesn't break existing users of FindLibXml2.cmake, but provides the way for correct behaviour in future. In particular, on OpenBSD LIBXML2_INCLUDE_DIR resolves to /usr/local/include/libxml2, while libiconv (an libxml2 dependency) puts iconv.h in /usr/local/include, which is not picked up automatically. diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake index 613f927..f68628d 100644 --- a/Modules/FindLibXml2.cmake +++ b/Modules/FindLibXml2.cmake @@ -5,18 +5,37 @@ # FindLibXml2 # ----------- # -# Try to find the LibXml2 xml processing library +# Find the XML processing library (libxml2). # -# Once done this will define +# Result variables +# ^^^^^^^^^^^^^^^^ # -# :: +# This module will set the following variables in your project: # -# LIBXML2_FOUND - System has LibXml2 -# LIBXML2_INCLUDE_DIR - The LibXml2 include directory -# LIBXML2_LIBRARIES - The libraries needed to use LibXml2 -# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 -# LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2 -# LIBXML2_VERSION_STRING - the version of LibXml2 found (since CMake 2.8.8) +# ``LIBXML2_FOUND`` +# true if libxml2 headers and libraries were found +# ``LIBXML2_INCLUDE_DIR`` +# the directory containing LibXml2 headers +# ``LIBXML2_INCLUDE_DIRS`` +# list of the include directories needed to use LibXml2 +# ``LIBXML2_LIBRARIES`` +# LibXml2 libraries to be linked +# ``LIBXML2_DEFINITIONS`` +# the compiler switches required for using LibXml2 +# ``LIBXML2_XMLLINT_EXECUTABLE`` +# path to the XML checking tool xmllint coming with LibXml2 +# ``LIBXML2_VERSION_STRING`` +# the version of LibXml2 found (since CMake 2.8.8) +# +# Cache variables +# ^^^^^^^^^^^^^^^ +# +# The following cache variables may also be set: +# +# ``LIBXML2_INCLUDE_DIR`` +# the directory containing LibXml2 headers +# ``LIBXML2_LIBRARY`` +# path to the LibXml2 library # use pkg-config to get the directories and then use these values # in the find_path() and find_library() calls @@ -31,7 +50,7 @@ find_path(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h PATH_SUFFIXES libxml2 ) -find_library(LIBXML2_LIBRARIES NAMES xml2 libxml2 +find_library(LIBXML2_LIBRARY NAMES xml2 libxml2 HINTS ${PC_LIBXML_LIBDIR} ${PC_LIBXML_LIBRARY_DIRS} @@ -52,9 +71,12 @@ elseif(LIBXML2_INCLUDE_DIR AND EXISTS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion. unset(libxml2_version_str) endif() +set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR} ${PC_LIBXML_INCLUDE_DIRS}) +set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY}) + include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 - REQUIRED_VARS LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR + REQUIRED_VARS LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR VERSION_VAR LIBXML2_VERSION_STRING) -mark_as_advanced(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE) +mark_as_advanced(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARY LIBXML2_XMLLINT_EXECUTABLE) ----------------------------------------------------------------------- Summary of changes: Modules/FindLibXml2.cmake | 46 +++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jul 17 10:35:28 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 17 Jul 2017 10:35:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-316-g2e47dee Message-ID: <20170717143529.32D5EFAE12@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 2e47dee60a6c0bbc1eb08e9727c4c1d83dc02a3d (commit) via 5401491648c76b61307907633502c78cd2393392 (commit) via 94d387a970d628c14ffcbd9e6435e5a3efe94280 (commit) via 8ff5aeb7cb7004e48a3cb2f3524b368b77db3075 (commit) via 3ce57e3b546cb1f7aec43717ff239cd72428cc5a (commit) via f2b05a095ab2ab12d9d82daabdc31e46d36d4fcf (commit) via cfa9a2bd8893349516a2f5ffa51e67e6e0973d1c (commit) via 68a64478c51ff6feb3eb939517e53ba3de850642 (commit) via 0348383b8ccb943a68cda3ecf1bdd609212ff5ca (commit) via 8c7facd69b63f986d8d35c22d7e40cddc7da9467 (commit) via cef77f06878371cf7615bf4dd3da7cc3ba257878 (commit) via 74e337117f839378e284b7edddc8484ce9c683f5 (commit) via fca0546175edf6cae51bbf673fa379899e8c0ea6 (commit) via 218ce158f2d9b25bc5789a28d742736129cdb088 (commit) via 13e9a370d9567d68120396b785c5d9e91a7cc5b8 (commit) via 221ffabfad9ed61c6c1aed8b53e5402a943477bd (commit) from 96041907014c9d1f83dc6b2c7fbbdab8aed728ea (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=2e47dee60a6c0bbc1eb08e9727c4c1d83dc02a3d commit 2e47dee60a6c0bbc1eb08e9727c4c1d83dc02a3d Merge: 5401491 f2b05a0 Author: Brad King AuthorDate: Mon Jul 17 10:28:27 2017 -0400 Commit: Brad King CommitDate: Mon Jul 17 10:28:27 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5401491648c76b61307907633502c78cd2393392 commit 5401491648c76b61307907633502c78cd2393392 Merge: 94d387a cfa9a2b Author: Brad King AuthorDate: Mon Jul 17 14:26:45 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jul 17 10:27:26 2017 -0400 Merge topic 'doc-vs2015-update-relnote' cfa9a2bd Help: Add a 3.9 release note about the VS GenerateDebugInformation update Acked-by: Kitware Robot Merge-request: !1060 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=94d387a970d628c14ffcbd9e6435e5a3efe94280 commit 94d387a970d628c14ffcbd9e6435e5a3efe94280 Merge: 8ff5aeb 221ffab Author: Brad King AuthorDate: Mon Jul 17 14:26:33 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jul 17 10:27:03 2017 -0400 Merge topic 'TestDriver-fix-Wconversion' 221ffabf TestDriver: Fix -Wconversion warning Acked-by: Kitware Robot Merge-request: !1058 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8ff5aeb7cb7004e48a3cb2f3524b368b77db3075 commit 8ff5aeb7cb7004e48a3cb2f3524b368b77db3075 Merge: 3ce57e3 0348383 Author: Brad King AuthorDate: Mon Jul 17 14:26:21 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jul 17 10:26:37 2017 -0400 Merge topic 'xcode9support' 0348383b Xcode: Add "outputPaths" to custom command script build phase Acked-by: Kitware Robot Merge-request: !1054 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ce57e3b546cb1f7aec43717ff239cd72428cc5a commit 3ce57e3b546cb1f7aec43717ff239cd72428cc5a Merge: 9604190 cef77f0 Author: Brad King AuthorDate: Mon Jul 17 14:25:31 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jul 17 10:25:36 2017 -0400 Merge topic 'fix-lang-std-option-list' cef77f06 Allow language extensions without any standard to use a list of options 74e33711 Merge branch 'backport-fix-lang-std-option-list' into fix-lang-std-option-list fca05461 cmLocalGenerator: Explain standard flag selection logic in comments 218ce158 Features: Fix support for a list of language standard options Acked-by: Kitware Robot Merge-request: !1059 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cef77f06878371cf7615bf4dd3da7cc3ba257878 commit cef77f06878371cf7615bf4dd3da7cc3ba257878 Author: Brad King AuthorDate: Fri Jul 14 10:13:19 2017 -0400 Commit: Brad King CommitDate: Fri Jul 14 10:20:07 2017 -0400 Allow language extensions without any standard to use a list of options Fix the logic added by commit a2112257 (Add infrastructure to use language extensions without any standard, 2017-06-29) to support a list of options as has been done since commit v3.9.0-rc1~174^2~2 (CompileFeatures: Let STD compile options be a list, 2016-10-05). diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f1bf664..2c5db10 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1563,7 +1563,11 @@ void cmLocalGenerator::AddCompilerRequirementFlag( "CMAKE_" + lang + "_EXTENSION_COMPILE_OPTION"; if (const char* opt = target->Target->GetMakefile()->GetDefinition(option_flag)) { - this->AppendFlagEscape(flags, opt); + std::vector optVec; + cmSystemTools::ExpandListArgument(opt, optVec); + for (size_t i = 0; i < optVec.size(); ++i) { + this->AppendFlagEscape(flags, optVec[i]); + } } } return; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74e337117f839378e284b7edddc8484ce9c683f5 commit 74e337117f839378e284b7edddc8484ce9c683f5 Merge: fca0546 218ce15 Author: Brad King AuthorDate: Fri Jul 14 10:19:59 2017 -0400 Commit: Brad King CommitDate: Fri Jul 14 10:19:59 2017 -0400 Merge branch 'backport-fix-lang-std-option-list' into fix-lang-std-option-list https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fca0546175edf6cae51bbf673fa379899e8c0ea6 commit fca0546175edf6cae51bbf673fa379899e8c0ea6 Author: Brad King AuthorDate: Fri Jul 14 10:09:18 2017 -0400 Commit: Brad King CommitDate: Fri Jul 14 10:19:56 2017 -0400 cmLocalGenerator: Explain standard flag selection logic in comments diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 921be3b..2bd7e4e 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1637,8 +1637,10 @@ void cmLocalGenerator::AddCompilerRequirementFlag( return; } - // Greater or equal because the standards are stored in - // backward chronological order. + // If the standard requested is older than the compiler's default + // then we need to use a flag to change it. The comparison is + // greater-or-equal because the standards are stored in backward + // chronological order. if (stdIt >= defaultStdIt) { std::string option_flag = "CMAKE_" + lang + *stdIt + "_" + type + "_COMPILE_OPTION"; @@ -1649,6 +1651,9 @@ void cmLocalGenerator::AddCompilerRequirementFlag( return; } + // The standard requested is at least as new as the compiler's default, + // and the standard request is not required. Decay to the newest standard + // for which a flag is defined. for (; stdIt < defaultStdIt; ++stdIt) { std::string option_flag = "CMAKE_" + lang + *stdIt + "_" + type + "_COMPILE_OPTION"; ----------------------------------------------------------------------- Summary of changes: Help/release/3.9.rst | 7 +++++++ Source/cmGlobalXCodeGenerator.cxx | 11 +++++++++++ Source/cmLocalGenerator.cxx | 27 ++++++++++++++++++++++----- Templates/TestDriver.cxx.in | 4 ++-- 4 files changed, 42 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jul 17 10:35:29 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 17 Jul 2017 10:35:29 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc6-12-gf2b05a0 Message-ID: <20170717143530.8FC0EFAE0F@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 f2b05a095ab2ab12d9d82daabdc31e46d36d4fcf (commit) via cfa9a2bd8893349516a2f5ffa51e67e6e0973d1c (commit) via 68a64478c51ff6feb3eb939517e53ba3de850642 (commit) via 0348383b8ccb943a68cda3ecf1bdd609212ff5ca (commit) via 8c7facd69b63f986d8d35c22d7e40cddc7da9467 (commit) via 218ce158f2d9b25bc5789a28d742736129cdb088 (commit) via 13e9a370d9567d68120396b785c5d9e91a7cc5b8 (commit) via 221ffabfad9ed61c6c1aed8b53e5402a943477bd (commit) from 9d9085ab3614fa36d8b3e7e337468b53ae646b82 (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: Help/release/3.9.rst | 7 +++++++ Source/cmGlobalXCodeGenerator.cxx | 11 +++++++++++ Source/cmLocalGenerator.cxx | 12 ++++++++++-- Templates/TestDriver.cxx.in | 4 ++-- 4 files changed, 30 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jul 18 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 18 Jul 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-317-gec04964 Message-ID: <20170718040504.792E5FAD9E@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 ec049641c46eb788b25713e5d96ff32c89f0e819 (commit) from 2e47dee60a6c0bbc1eb08e9727c4c1d83dc02a3d (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=ec049641c46eb788b25713e5d96ff32c89f0e819 commit ec049641c46eb788b25713e5d96ff32c89f0e819 Author: Kitware Robot AuthorDate: Tue Jul 18 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Tue Jul 18 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7a10ae1..5dfcd83 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 20170717) +set(CMake_VERSION_PATCH 20170718) #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 Jul 18 11:15:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 18 Jul 2017 11:15:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-330-gfc4f352 Message-ID: <20170718151505.F082EFAA99@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 fc4f3525133270ccc33ccda6acff6f85006ab457 (commit) via 407c7415f41fc27578bb0ab2c831e767de575531 (commit) via b10d919de763000801cbffd4f58cbd0c4a1ad7a0 (commit) via 787017451c437713b05a2ffc6fe609ea7da5f95b (commit) via 8eb1cb3ff1938f4c216d08860f7cf8e07ec71537 (commit) via d89e10cd58e5f9e21cbd466e56a1890e2811bee0 (commit) via c4de0a25ac8b7bb94205e24b5557331ed80d79b8 (commit) via c4647d84321f4a7b52301237394087065f5df33c (commit) via cf0ae55dcb9224b92a95166f17452c56ba5b6213 (commit) via 5ddfb6a472539c3a01a6f8e6d8fa1cb1013fc4f9 (commit) via d4f5d35ca491ede92003b26a7d0eb06aea3a2bbb (commit) via 501a4feea8d0d007ce292defec1c97d6eb702409 (commit) via 5acbf08bff643ec6779464c840bfe2f02a4e65ae (commit) from ec049641c46eb788b25713e5d96ff32c89f0e819 (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=fc4f3525133270ccc33ccda6acff6f85006ab457 commit fc4f3525133270ccc33ccda6acff6f85006ab457 Merge: 407c741 cf0ae55 Author: Brad King AuthorDate: Tue Jul 18 15:13:46 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jul 18 11:14:02 2017 -0400 Merge topic 'server-refactor' cf0ae55d server: Add support for connections that aren't event based 5ddfb6a4 server: Add connection as part of a request d4f5d35c server: Refactor to make the event loop owned by server object 5acbf08b Tests: Teach Server test to forward exit code from server process Acked-by: Kitware Robot Merge-request: !552 diff --cc Source/cmServer.cxx index 5283dfc,1d5f3f6..ccb9af6 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@@ -30,13 -46,12 +46,12 @@@ public uint64_t StartTime; }; - cmServer::cmServer(cmServerConnection* conn, bool supportExperimental) - : Connection(conn) + cmServer::cmServer(cmConnection* conn, bool supportExperimental) + : cmServerBase(conn) , SupportExperimental(supportExperimental) { - this->Connection->SetServer(this); // Register supported protocols: - this->RegisterProtocol(new cmServerProtocol1_0); + this->RegisterProtocol(new cmServerProtocol1); } cmServer::~cmServer() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=407c7415f41fc27578bb0ab2c831e767de575531 commit 407c7415f41fc27578bb0ab2c831e767de575531 Merge: b10d919 c4de0a2 Author: Brad King AuthorDate: Tue Jul 18 15:12:36 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jul 18 11:12:57 2017 -0400 Merge topic 'cmake-E-sha' c4de0a25 Add sha1sum, sha224sum, sha256sum, sha384sum and sha512sum to command mode c4647d84 Change ComputeFileMD5 to ComputeFileHash 501a4fee Add some unit tests for md5sum Acked-by: Kitware Robot Merge-request: !1021 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b10d919de763000801cbffd4f58cbd0c4a1ad7a0 commit b10d919de763000801cbffd4f58cbd0c4a1ad7a0 Merge: 7870174 8eb1cb3 Author: Brad King AuthorDate: Tue Jul 18 15:12:16 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jul 18 11:12:33 2017 -0400 Merge topic 'GHS_int_detection' 8eb1cb3f GHS: Correct the regex for the intXXXX directory detection. Acked-by: Kitware Robot Merge-request: !1062 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=787017451c437713b05a2ffc6fe609ea7da5f95b commit 787017451c437713b05a2ffc6fe609ea7da5f95b Merge: ec04964 d89e10c Author: Brad King AuthorDate: Tue Jul 18 15:11:37 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jul 18 11:12:00 2017 -0400 Merge topic 'objlib-own-target-objs' d89e10cd Diagnose object library self-reference Acked-by: Kitware Robot Merge-request: !1053 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8eb1cb3ff1938f4c216d08860f7cf8e07ec71537 commit 8eb1cb3ff1938f4c216d08860f7cf8e07ec71537 Author: Roman W?ger AuthorDate: Mon Jul 17 11:30:04 2017 +0200 Commit: Roman W?ger CommitDate: Mon Jul 17 11:30:04 2017 +0200 GHS: Correct the regex for the intXXXX directory detection. The int directory does not only need to contain digits. E.g. C:\GHS\int409a is a valid Green Hills installation diff --git a/Modules/Platform/GHS-MULTI-Initialize.cmake b/Modules/Platform/GHS-MULTI-Initialize.cmake index fcda6f6..bf61d7b 100644 --- a/Modules/Platform/GHS-MULTI-Initialize.cmake +++ b/Modules/Platform/GHS-MULTI-Initialize.cmake @@ -10,7 +10,7 @@ if (NOT GHS_INT_DIRECTORY) if (EXISTS ${GHS_EXPECTED_ROOT}) FILE(GLOB GHS_CANDIDATE_INT_DIRS RELATIVE ${GHS_EXPECTED_ROOT} ${GHS_EXPECTED_ROOT}/*) - string(REGEX MATCHALL "int[0-9][0-9][0-9][0-9]" GHS_CANDIDATE_INT_DIRS + string(REGEX MATCHALL "int[0-9][0-9][0-9][0-9a-z]" GHS_CANDIDATE_INT_DIRS ${GHS_CANDIDATE_INT_DIRS}) if (GHS_CANDIDATE_INT_DIRS) list(SORT GHS_CANDIDATE_INT_DIRS) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d89e10cd58e5f9e21cbd466e56a1890e2811bee0 commit d89e10cd58e5f9e21cbd466e56a1890e2811bee0 Author: Brad King AuthorDate: Fri Jul 14 13:52:53 2017 -0400 Commit: Brad King CommitDate: Fri Jul 14 14:05:22 2017 -0400 Diagnose object library self-reference The code add_library(A OBJECT a.c) target_sources(A PRIVATE $) used to crash CMake via infinite recursion while evaluating the generator expression. Then the change in commit v3.9.0-rc1~266^2~1 (cmGeneratorTarget: Replace source classifier implementation, 2017-04-07) avoided the infinite recursion because GetKindedSources now creates a map entry and initializes it once. If it is called again on the same target during that initialization, the partially computed results are returned. This is still wrong but does not crash. Detect and diagnose this case instead. Co-Author: Ben Boeckel Fixes: #16578 diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index b93442d..e8ecac4 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1025,12 +1025,23 @@ cmGeneratorTarget::KindedSources const& cmGeneratorTarget::GetKindedSources( std::string const key = cmSystemTools::UpperCase(config); KindedSourcesMapType::iterator it = this->KindedSourcesMap.find(key); if (it != this->KindedSourcesMap.end()) { + if (!it->second.Initialized) { + std::ostringstream e; + e << "The SOURCES of \"" << this->GetName() + << "\" use a generator expression that depends on the " + "SOURCES themselves."; + this->GlobalGenerator->GetCMakeInstance()->IssueMessage( + cmake::FATAL_ERROR, e.str(), this->GetBacktrace()); + static KindedSources empty; + return empty; + } return it->second; } // Add an entry to the map for this configuration. KindedSources& files = this->KindedSourcesMap[key]; this->ComputeKindedSources(files, config); + files.Initialized = true; return files; } diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index c04d62b..52147e3 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -107,6 +107,11 @@ public: std::set ExpectedResxHeaders; std::set ExpectedXamlHeaders; std::set ExpectedXamlSources; + bool Initialized; + KindedSources() + : Initialized(false) + { + } }; /** Get all sources needed for a configuration with kinds assigned. */ diff --git a/Tests/RunCMake/ObjectLibrary/OwnSources-result.txt b/Tests/RunCMake/ObjectLibrary/OwnSources-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ObjectLibrary/OwnSources-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt b/Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt new file mode 100644 index 0000000..40d650e --- /dev/null +++ b/Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at OwnSources.cmake:[0-9]+ \(add_library\): + The SOURCES of "A" use a generator expression that depends on the SOURCES + themselves. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ObjectLibrary/OwnSources.cmake b/Tests/RunCMake/ObjectLibrary/OwnSources.cmake new file mode 100644 index 0000000..e7bdf8d --- /dev/null +++ b/Tests/RunCMake/ObjectLibrary/OwnSources.cmake @@ -0,0 +1,2 @@ +add_library(A OBJECT a.c) +target_sources(A PRIVATE $) diff --git a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake index fe708ce..b8eed73 100644 --- a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake +++ b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake @@ -19,6 +19,7 @@ run_cmake(LinkObjRHS1) run_cmake(LinkObjRHS2) run_cmake(MissingSource) run_cmake(ObjWithObj) +run_cmake(OwnSources) run_cmake(PostBuild) run_cmake(PreBuild) run_cmake(PreLink) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c4de0a25ac8b7bb94205e24b5557331ed80d79b8 commit c4de0a25ac8b7bb94205e24b5557331ed80d79b8 Author: Andr? Klitzing AuthorDate: Sat Jul 8 22:57:45 2017 +0200 Commit: Andr? Klitzing CommitDate: Fri Jul 14 19:49:45 2017 +0200 Add sha1sum, sha224sum, sha256sum, sha384sum and sha512sum to command mode diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index ba925e8..8aece23 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -262,6 +262,36 @@ Available commands are: 351abe79cd3800b38cdfb25d45015a15 file1.txt 052f86c15bbde68af55c7f7b340ab639 file2.txt +``sha1sum ...`` + Create SHA1 checksum of files in ``sha1sum`` compatible format:: + + 4bb7932a29e6f73c97bb9272f2bdc393122f86e0 file1.txt + 1df4c8f318665f9a5f2ed38f55adadb7ef9f559c file2.txt + +``sha224sum ...`` + Create SHA224 checksum of files in ``sha224sum`` compatible format:: + + b9b9346bc8437bbda630b0b7ddfc5ea9ca157546dbbf4c613192f930 file1.txt + 6dfbe55f4d2edc5fe5c9197bca51ceaaf824e48eba0cc453088aee24 file2.txt + +``sha256sum ...`` + Create SHA256 checksum of files in ``sha256sum`` compatible format:: + + 76713b23615d31680afeb0e9efe94d47d3d4229191198bb46d7485f9cb191acc file1.txt + 15b682ead6c12dedb1baf91231e1e89cfc7974b3787c1e2e01b986bffadae0ea file2.txt + +``sha384sum ...`` + Create SHA384 checksum of files in ``sha384sum`` compatible format:: + + acc049fedc091a22f5f2ce39a43b9057fd93c910e9afd76a6411a28a8f2b8a12c73d7129e292f94fc0329c309df49434 file1.txt + 668ddeb108710d271ee21c0f3acbd6a7517e2b78f9181c6a2ff3b8943af92b0195dcb7cce48aa3e17893173c0a39e23d file2.txt + +``sha512sum ...`` + Create SHA512 checksum of files in ``sha512sum`` compatible format:: + + 2a78d7a6c5328cfb1467c63beac8ff21794213901eaadafd48e7800289afbc08e5fb3e86aa31116c945ee3d7bf2a6194489ec6101051083d1108defc8e1dba89 file1.txt + 7a0b54896fe5e70cca6dd643ad6f672614b189bf26f8153061c4d219474b05dad08c4e729af9f4b009f1a1a280cb625454bf587c690f4617c27e3aebdf3b7a2d file2.txt + ``remove [-f] ...`` Remove the file(s). If any of the listed files already do not exist, the command returns a non-zero exit code, but no message diff --git a/Help/release/dev/cmake-command-mode-shasum.rst b/Help/release/dev/cmake-command-mode-shasum.rst new file mode 100644 index 0000000..681e0c0 --- /dev/null +++ b/Help/release/dev/cmake-command-mode-shasum.rst @@ -0,0 +1,5 @@ +cmake-command-mode-shasum +------------------------- + +* Added sha1sum, sha224sum, sha256sum, sha384sum and sha512sum + as an equivalent to existing md5sum to cmake command mode. diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 70ebd83..10889eb 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -3,7 +3,6 @@ #include "cmcmd.h" #include "cmAlgorithms.h" -#include "cmCryptoHash.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -89,6 +88,11 @@ void CMakeCommandUsage(const char* program) << " environment - display the current environment\n" << " make_directory ... - create parent and directories\n" << " md5sum ... - create MD5 checksum of files\n" + << " sha1sum ... - create SHA1 checksum of files\n" + << " sha224sum ... - create SHA224 checksum of files\n" + << " sha256sum ... - create SHA256 checksum of files\n" + << " sha384sum ... - create SHA384 checksum of files\n" + << " sha512sum ... - create SHA512 checksum of files\n" << " remove [-f] ... - remove the file(s), use -f to force " "it\n" << " remove_directory dir - remove a directory and its contents\n" @@ -642,27 +646,28 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) // Command to calculate the md5sum of a file if (args[1] == "md5sum" && args.size() >= 3) { - int retval = 0; - for (std::string::size_type cc = 2; cc < args.size(); cc++) { - const char* filename = args[cc].c_str(); - // Cannot compute md5sum of a directory - if (cmSystemTools::FileIsDirectory(filename)) { - std::cerr << "Error: " << filename << " is a directory" << std::endl; - retval++; - } else { - std::string value = - cmSystemTools::ComputeFileHash(filename, cmCryptoHash::AlgoMD5); - if (value.empty()) { - // To mimic "md5sum" behavior in a shell: - std::cerr << filename << ": No such file or directory" - << std::endl; - retval++; - } else { - std::cout << value << " " << filename << std::endl; - } - } - } - return retval; + return HashSumFile(args, cmCryptoHash::AlgoMD5); + } + + // Command to calculate the sha1sum of a file + if (args[1] == "sha1sum" && args.size() >= 3) { + return HashSumFile(args, cmCryptoHash::AlgoSHA1); + } + + if (args[1] == "sha224sum" && args.size() >= 3) { + return HashSumFile(args, cmCryptoHash::AlgoSHA224); + } + + if (args[1] == "sha256sum" && args.size() >= 3) { + return HashSumFile(args, cmCryptoHash::AlgoSHA256); + } + + if (args[1] == "sha384sum" && args.size() >= 3) { + return HashSumFile(args, cmCryptoHash::AlgoSHA384); + } + + if (args[1] == "sha512sum" && args.size() >= 3) { + return HashSumFile(args, cmCryptoHash::AlgoSHA512); } // Command to change directory and run a program. @@ -1078,6 +1083,33 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) return 1; } +int cmcmd::HashSumFile(std::vector& args, cmCryptoHash::Algo algo) +{ + if (args.size() < 3) { + return -1; + } + int retval = 0; + + for (std::string::size_type cc = 2; cc < args.size(); cc++) { + const char* filename = args[cc].c_str(); + // Cannot compute sum of a directory + if (cmSystemTools::FileIsDirectory(filename)) { + std::cerr << "Error: " << filename << " is a directory" << std::endl; + retval++; + } else { + std::string value = cmSystemTools::ComputeFileHash(filename, algo); + if (value.empty()) { + // To mimic "md5sum/shasum" behavior in a shell: + std::cerr << filename << ": No such file or directory" << std::endl; + retval++; + } else { + std::cout << value << " " << filename << std::endl; + } + } + } + return retval; +} + int cmcmd::SymlinkLibrary(std::vector& args) { int result = 0; diff --git a/Source/cmcmd.h b/Source/cmcmd.h index 929f1ae..faac1d2 100644 --- a/Source/cmcmd.h +++ b/Source/cmcmd.h @@ -4,6 +4,7 @@ #define cmcmd_h #include "cmConfigure.h" // IWYU pragma: keep +#include "cmCryptoHash.h" #include #include @@ -18,6 +19,8 @@ public: static int ExecuteCMakeCommand(std::vector&); protected: + static int HashSumFile(std::vector& args, + cmCryptoHash::Algo algo); static int SymlinkLibrary(std::vector& args); static int SymlinkExecutable(std::vector& args); static bool SymlinkInternal(std::string const& file, diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_sha1sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_sha1sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_sha1sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_sha1sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-result.txt b/Tests/RunCMake/CommandLine/E_sha1sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-stdout.txt b/Tests/RunCMake/CommandLine/E_sha1sum-stdout.txt new file mode 100644 index 0000000..689b85b --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-stdout.txt @@ -0,0 +1 @@ +829c3804401b0727f70f73d4415e162400cbe57b ../dummy diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_sha224sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_sha224sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_sha224sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_sha224sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-result.txt b/Tests/RunCMake/CommandLine/E_sha224sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-stdout.txt b/Tests/RunCMake/CommandLine/E_sha224sum-stdout.txt new file mode 100644 index 0000000..5b3e217 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-stdout.txt @@ -0,0 +1 @@ +37d32c6dbabed711cb1d4620b64090fef0ef63ab16a4a51d668259e6 ../dummy diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_sha256sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_sha256sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_sha256sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_sha256sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-result.txt b/Tests/RunCMake/CommandLine/E_sha256sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-stdout.txt b/Tests/RunCMake/CommandLine/E_sha256sum-stdout.txt new file mode 100644 index 0000000..9a18770 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-stdout.txt @@ -0,0 +1 @@ +b5a2c96250612366ea272ffac6d9744aaf4b45aacd96aa7cfcb931ee3b558259 ../dummy diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_sha384sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_sha384sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_sha384sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_sha384sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-result.txt b/Tests/RunCMake/CommandLine/E_sha384sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-stdout.txt b/Tests/RunCMake/CommandLine/E_sha384sum-stdout.txt new file mode 100644 index 0000000..b706ac5 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-stdout.txt @@ -0,0 +1 @@ +43c1835ceba2e29596f05e3859d4fe2b6d124a181ed670f68e914bd3ed251b02b4be609608a13f23ec3d98da6c4eb8cd ../dummy diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_sha512sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_sha512sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_sha512sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_sha512sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-result.txt b/Tests/RunCMake/CommandLine/E_sha512sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-stdout.txt b/Tests/RunCMake/CommandLine/E_sha512sum-stdout.txt new file mode 100644 index 0000000..4305383 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-stdout.txt @@ -0,0 +1 @@ +1692526aab84461a8aebcefddcba2b33fb5897ab180c53e8b345ae125484d0aaa35baf60487050be21ed8909a48eace93851bf139087ce1f7a87d97b6120a651 ../dummy diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 6f5298e..6efcc12 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -173,10 +173,27 @@ run_cmake_command(E_env-set ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND run_cmake_command(E_env-unset ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -E env --unset=TEST_ENV ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-unset.cmake) run_cmake_command(E_md5sum-dir ${CMAKE_COMMAND} -E md5sum .) +run_cmake_command(E_sha1sum-dir ${CMAKE_COMMAND} -E sha1sum .) +run_cmake_command(E_sha224sum-dir ${CMAKE_COMMAND} -E sha224sum .) +run_cmake_command(E_sha256sum-dir ${CMAKE_COMMAND} -E sha256sum .) +run_cmake_command(E_sha384sum-dir ${CMAKE_COMMAND} -E sha384sum .) +run_cmake_command(E_sha512sum-dir ${CMAKE_COMMAND} -E sha512sum .) + run_cmake_command(E_md5sum-no-file ${CMAKE_COMMAND} -E md5sum nonexisting) +run_cmake_command(E_sha1sum-no-file ${CMAKE_COMMAND} -E sha1sum nonexisting) +run_cmake_command(E_sha224sum-no-file ${CMAKE_COMMAND} -E sha224sum nonexisting) +run_cmake_command(E_sha256sum-no-file ${CMAKE_COMMAND} -E sha256sum nonexisting) +run_cmake_command(E_sha384sum-no-file ${CMAKE_COMMAND} -E sha384sum nonexisting) +run_cmake_command(E_sha512sum-no-file ${CMAKE_COMMAND} -E sha512sum nonexisting) + file(WRITE "${RunCMake_BINARY_DIR}/dummy" "dummy") run_cmake_command(E_md5sum ${CMAKE_COMMAND} -E md5sum ../dummy) run_cmake_command(E_md5sum-mixed ${CMAKE_COMMAND} -E md5sum . ../dummy nonexisting) +run_cmake_command(E_sha1sum ${CMAKE_COMMAND} -E sha1sum ../dummy) +run_cmake_command(E_sha224sum ${CMAKE_COMMAND} -E sha224sum ../dummy) +run_cmake_command(E_sha256sum ${CMAKE_COMMAND} -E sha256sum ../dummy) +run_cmake_command(E_sha384sum ${CMAKE_COMMAND} -E sha384sum ../dummy) +run_cmake_command(E_sha512sum ${CMAKE_COMMAND} -E sha512sum ../dummy) file(REMOVE "${RunCMake_BINARY_DIR}/dummy") set(RunCMake_DEFAULT_stderr ".") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c4647d84321f4a7b52301237394087065f5df33c commit c4647d84321f4a7b52301237394087065f5df33c Author: Andr? Klitzing AuthorDate: Sat Jul 8 18:42:02 2017 +0200 Commit: Andr? Klitzing CommitDate: Fri Jul 14 08:57:17 2017 +0200 Change ComputeFileMD5 to ComputeFileHash * Use a parameter to select hash algorithm * Return a std::string as result or an empty string if it fails * Avoids unnecessary copy of hash value diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 00d017e..0705460 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -6,6 +6,7 @@ #include "cmCPackComponentGroup.h" #include "cmCPackGenerator.h" #include "cmCPackLog.h" +#include "cmCryptoHash.h" #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" #include "cm_sys_stat.h" @@ -527,15 +528,13 @@ int cmCPackDebGenerator::createDeb() continue; } - char md5sum[33]; - if (!cmSystemTools::ComputeFileMD5(*fileIt, md5sum)) { + std::string output = + cmSystemTools::ComputeFileHash(*fileIt, cmCryptoHash::AlgoMD5); + if (output.empty()) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem computing the md5 of " << *fileIt << std::endl); } - md5sum[32] = 0; - - std::string output(md5sum); output += " " + *fileIt + "\n"; // debian md5sums entries are like this: // 014f3604694729f3bf19263bac599765 usr/bin/ccmake diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 8d62fa1..689668d 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -13,6 +13,7 @@ #include "cmCTest.h" #include "cmCTestCurl.h" #include "cmCTestScriptHandler.h" +#include "cmCryptoHash.h" #include "cmCurl.h" #include "cmGeneratedFileStream.h" #include "cmProcessOutput.h" @@ -428,10 +429,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, if (cmSystemTools::IsOn(this->GetOption("InternalTest"))) { upload_as += "bad_md5sum"; } else { - char md5[33]; - cmSystemTools::ComputeFileMD5(local_file, md5); - md5[32] = 0; - upload_as += md5; + upload_as += + cmSystemTools::ComputeFileHash(local_file, cmCryptoHash::AlgoMD5); } if (!cmSystemTools::FileExists(local_file.c_str())) { @@ -1058,9 +1057,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file, } } - char md5sum[33]; - md5sum[32] = 0; - cmSystemTools::ComputeFileMD5(file, md5sum); + std::string md5sum = + cmSystemTools::ComputeFileHash(file, cmCryptoHash::AlgoMD5); // 1. request the buildid and check to see if the file // has already been uploaded // TODO I added support for subproject. You would need to add diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index f7192e0..9f214c3 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -934,19 +934,17 @@ bool cmSystemTools::RenameFile(const char* oldname, const char* newname) #endif } -bool cmSystemTools::ComputeFileMD5(const std::string& source, char* md5out) +std::string cmSystemTools::ComputeFileHash(const std::string& source, + cmCryptoHash::Algo algo) { #if defined(CMAKE_BUILD_WITH_CMAKE) - cmCryptoHash md5(cmCryptoHash::AlgoMD5); - std::string const str = md5.HashFile(source); - strncpy(md5out, str.c_str(), 32); - return !str.empty(); + cmCryptoHash hash(algo); + return hash.HashFile(source); #else (void)source; - (void)md5out; - cmSystemTools::Message("md5sum not supported in bootstrapping mode", + cmSystemTools::Message("hashsum not supported in bootstrapping mode", "Error"); - return false; + return std::string(); #endif } diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 9de7967..e163c91 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -5,6 +5,7 @@ #include "cmConfigure.h" +#include "cmCryptoHash.h" #include "cmProcessOutput.h" #include "cmsys/Process.h" #include "cmsys/SystemTools.hxx" // IWYU pragma: export @@ -179,8 +180,9 @@ public: if possible). */ static bool RenameFile(const char* oldname, const char* newname); - ///! Compute the md5sum of a file - static bool ComputeFileMD5(const std::string& source, char* md5out); + ///! Compute the hash of a file + static std::string ComputeFileHash(const std::string& source, + cmCryptoHash::Algo algo); /** Compute the md5sum of a string. */ static std::string ComputeStringMD5(const std::string& input); diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index d5b0861..70ebd83 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -3,6 +3,7 @@ #include "cmcmd.h" #include "cmAlgorithms.h" +#include "cmCryptoHash.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -641,7 +642,6 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) // Command to calculate the md5sum of a file if (args[1] == "md5sum" && args.size() >= 3) { - char md5out[32]; int retval = 0; for (std::string::size_type cc = 2; cc < args.size(); cc++) { const char* filename = args[cc].c_str(); @@ -649,13 +649,17 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) if (cmSystemTools::FileIsDirectory(filename)) { std::cerr << "Error: " << filename << " is a directory" << std::endl; retval++; - } else if (!cmSystemTools::ComputeFileMD5(filename, md5out)) { - // To mimic md5sum behavior in a shell: - std::cerr << filename << ": No such file or directory" << std::endl; - retval++; } else { - std::cout << std::string(md5out, 32) << " " << filename - << std::endl; + std::string value = + cmSystemTools::ComputeFileHash(filename, cmCryptoHash::AlgoMD5); + if (value.empty()) { + // To mimic "md5sum" behavior in a shell: + std::cerr << filename << ": No such file or directory" + << std::endl; + retval++; + } else { + std::cout << value << " " << filename << std::endl; + } } } return retval; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf0ae55dcb9224b92a95166f17452c56ba5b6213 commit cf0ae55dcb9224b92a95166f17452c56ba5b6213 Author: Justin Berger AuthorDate: Sat Feb 25 15:06:34 2017 -0700 Commit: Justin Berger CommitDate: Mon Jul 10 18:12:05 2017 -0600 server: Add support for connections that aren't event based diff --git a/Source/cmConnection.cxx b/Source/cmConnection.cxx index b25843b..00cf283 100644 --- a/Source/cmConnection.cxx +++ b/Source/cmConnection.cxx @@ -14,18 +14,19 @@ struct write_req_t uv_buf_t buf; }; -void cmConnection::on_alloc_buffer(uv_handle_t* handle, size_t suggested_size, - uv_buf_t* buf) +void cmEventBasedConnection::on_alloc_buffer(uv_handle_t* handle, + size_t suggested_size, + uv_buf_t* buf) { (void)(handle); char* rawBuffer = new char[suggested_size]; *buf = uv_buf_init(rawBuffer, static_cast(suggested_size)); } -void cmConnection::on_read(uv_stream_t* stream, ssize_t nread, - const uv_buf_t* buf) +void cmEventBasedConnection::on_read(uv_stream_t* stream, ssize_t nread, + const uv_buf_t* buf) { - auto conn = reinterpret_cast(stream->data); + auto conn = reinterpret_cast(stream->data); if (conn) { if (nread >= 0) { conn->ReadData(std::string(buf->base, buf->base + nread)); @@ -37,16 +38,16 @@ void cmConnection::on_read(uv_stream_t* stream, ssize_t nread, delete[](buf->base); } -void cmConnection::on_close_delete(uv_handle_t* handle) +void cmEventBasedConnection::on_close_delete(uv_handle_t* handle) { delete handle; } -void cmConnection::on_close(uv_handle_t*) +void cmEventBasedConnection::on_close(uv_handle_t* /*handle*/) { } -void cmConnection::on_write(uv_write_t* req, int status) +void cmEventBasedConnection::on_write(uv_write_t* req, int status) { (void)(status); @@ -56,22 +57,22 @@ void cmConnection::on_write(uv_write_t* req, int status) delete wr; } -void cmConnection::on_new_connection(uv_stream_t* stream, int status) +void cmEventBasedConnection::on_new_connection(uv_stream_t* stream, int status) { (void)(status); - auto conn = reinterpret_cast(stream->data); + auto conn = reinterpret_cast(stream->data); if (conn) { conn->Connect(stream); } } -bool cmConnection::IsOpen() const +bool cmEventBasedConnection::IsOpen() const { return this->WriteStream != CM_NULLPTR; } -void cmConnection::WriteData(const std::string& data) +void cmEventBasedConnection::WriteData(const std::string& data) { assert(this->WriteStream); @@ -86,12 +87,7 @@ void cmConnection::WriteData(const std::string& data) on_write); } -cmConnection::~cmConnection() -{ - OnServerShuttingDown(); -} - -void cmConnection::ReadData(const std::string& data) +void cmEventBasedConnection::ReadData(const std::string& data) { this->RawReadBuffer += data; if (BufferStrategy) { @@ -107,19 +103,37 @@ void cmConnection::ReadData(const std::string& data) } } -void cmConnection::SetServer(cmServerBase* s) +cmEventBasedConnection::cmEventBasedConnection( + cmConnectionBufferStrategy* bufferStrategy) + : BufferStrategy(bufferStrategy) { - Server = s; } -cmConnection::cmConnection(cmConnectionBufferStrategy* bufferStrategy) - : BufferStrategy(bufferStrategy) +void cmEventBasedConnection::Connect(uv_stream_t* server) { + (void)server; + Server->OnConnected(nullptr); } -void cmConnection::Connect(uv_stream_t*) +void cmEventBasedConnection::OnDisconnect(int onerror) { - Server->OnConnected(nullptr); + (void)onerror; + this->OnConnectionShuttingDown(); + this->Server->OnDisconnect(this); +} + +cmConnection::~cmConnection() +{ +} + +bool cmConnection::OnConnectionShuttingDown() +{ + return true; +} + +void cmConnection::SetServer(cmServerBase* s) +{ + Server = s; } void cmConnection::ProcessRequest(const std::string& request) @@ -133,13 +147,7 @@ bool cmConnection::OnServeStart(std::string* errString) return true; } -void cmConnection::OnDisconnect(int errorCode) -{ - (void)errorCode; - this->Server->OnDisconnect(this); -} - -bool cmConnection::OnServerShuttingDown() +bool cmEventBasedConnection::OnConnectionShuttingDown() { this->WriteStream->data = nullptr; this->ReadStream->data = nullptr; diff --git a/Source/cmConnection.h b/Source/cmConnection.h index e994716..4b8fcb3 100644 --- a/Source/cmConnection.h +++ b/Source/cmConnection.h @@ -46,43 +46,57 @@ public: // TODO: There should be a callback / flag set for errors }; -/*** - * Abstraction of a connection; ties in event callbacks from libuv and notifies - * the server when appropriate - */ class cmConnection { CM_DISABLE_COPY(cmConnection) public: + cmConnection() {} + + virtual void WriteData(const std::string& data) = 0; + virtual ~cmConnection(); + virtual bool OnConnectionShuttingDown(); + + virtual bool IsOpen() const = 0; + + virtual void SetServer(cmServerBase* s); + + virtual void ProcessRequest(const std::string& request); + + virtual bool OnServeStart(std::string* pString); + +protected: + cmServerBase* Server = nullptr; +}; + +/*** + * Abstraction of a connection; ties in event callbacks from libuv and notifies + * the server when appropriate + */ +class cmEventBasedConnection : public cmConnection +{ + +public: /*** * @param bufferStrategy If no strategy is given, it will process the raw * chunks as they come in. The connection * owns the pointer given. */ - cmConnection(cmConnectionBufferStrategy* bufferStrategy = nullptr); + cmEventBasedConnection(cmConnectionBufferStrategy* bufferStrategy = nullptr); virtual void Connect(uv_stream_t* server); virtual void ReadData(const std::string& data); - virtual bool OnServeStart(std::string* errString); + bool IsOpen() const override; - virtual bool OnServerShuttingDown(); - - virtual bool IsOpen() const; - - virtual void WriteData(const std::string& data); - - virtual void ProcessRequest(const std::string& request); - - virtual void SetServer(cmServerBase* s); + void WriteData(const std::string& data) override; + bool OnConnectionShuttingDown() override; virtual void OnDisconnect(int errorCode); uv_stream_t* ReadStream = nullptr; - cmServerBase* Server = nullptr; uv_stream_t* WriteStream = nullptr; static void on_close(uv_handle_t* handle); diff --git a/Source/cmPipeConnection.cxx b/Source/cmPipeConnection.cxx index 438719f..cc82438 100644 --- a/Source/cmPipeConnection.cxx +++ b/Source/cmPipeConnection.cxx @@ -7,7 +7,7 @@ cmPipeConnection::cmPipeConnection(const std::string& name, cmConnectionBufferStrategy* bufferStrategy) - : cmConnection(bufferStrategy) + : cmEventBasedConnection(bufferStrategy) , PipeName(name) { } @@ -26,8 +26,7 @@ void cmPipeConnection::Connect(uv_stream_t* server) this->ClientPipe = new uv_pipe_t(); uv_pipe_init(this->Server->GetLoop(), this->ClientPipe, 0); - this->ClientPipe->data = static_cast(this); - + this->ClientPipe->data = static_cast(this); auto client = reinterpret_cast(this->ClientPipe); if (uv_accept(server, client) != 0) { uv_close(reinterpret_cast(client), &on_close_delete); @@ -45,7 +44,7 @@ bool cmPipeConnection::OnServeStart(std::string* errorMessage) { this->ServerPipe = new uv_pipe_t(); uv_pipe_init(this->Server->GetLoop(), this->ServerPipe, 0); - this->ServerPipe->data = static_cast(this); + this->ServerPipe->data = static_cast(this); int r; if ((r = uv_pipe_bind(this->ServerPipe, this->PipeName.c_str())) != 0) { @@ -63,7 +62,7 @@ bool cmPipeConnection::OnServeStart(std::string* errorMessage) return cmConnection::OnServeStart(errorMessage); } -bool cmPipeConnection::OnServerShuttingDown() +bool cmPipeConnection::OnConnectionShuttingDown() { if (this->ClientPipe) { uv_close(reinterpret_cast(this->ClientPipe), @@ -77,5 +76,5 @@ bool cmPipeConnection::OnServerShuttingDown() this->WriteStream = nullptr; this->ReadStream = nullptr; - return cmConnection::OnServerShuttingDown(); + return cmConnection::OnConnectionShuttingDown(); } diff --git a/Source/cmPipeConnection.h b/Source/cmPipeConnection.h index 3d3d52c..fea85b5 100644 --- a/Source/cmPipeConnection.h +++ b/Source/cmPipeConnection.h @@ -9,7 +9,7 @@ #include -class cmPipeConnection : public cmConnection +class cmPipeConnection : public cmEventBasedConnection { public: cmPipeConnection(const std::string& name, @@ -17,7 +17,7 @@ public: bool OnServeStart(std::string* pString) override; - bool OnServerShuttingDown() override; + bool OnConnectionShuttingDown() override; void Connect(uv_stream_t* server) override; diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx index 61ebba3..1d5f3f6 100644 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@ -28,7 +28,7 @@ static void on_walk_to_shutdown(uv_handle_t* handle, void* arg) { (void)arg; if (!uv_is_closing(handle)) { - uv_close(handle, &cmConnection::on_close); + uv_close(handle, &cmEventBasedConnection::on_close); } } @@ -478,7 +478,7 @@ void cmServerBase::StartShutDown() } for (auto& connection : Connections) { - connection->OnServerShuttingDown(); + connection->OnConnectionShuttingDown(); } Connections.clear(); diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx index 3cc7722..4891131 100644 --- a/Source/cmServerConnection.cxx +++ b/Source/cmServerConnection.cxx @@ -7,7 +7,7 @@ cmStdIoConnection::cmStdIoConnection( cmConnectionBufferStrategy* bufferStrategy) - : cmConnection(bufferStrategy) + : cmEventBasedConnection(bufferStrategy) , Input() , Output() { @@ -23,13 +23,13 @@ void cmStdIoConnection::SetServer(cmServerBase* s) this->Input.tty = new uv_tty_t(); uv_tty_init(this->Server->GetLoop(), this->Input.tty, 0, 1); uv_tty_set_mode(this->Input.tty, UV_TTY_MODE_NORMAL); - this->Input.tty->data = static_cast(this); + this->Input.tty->data = static_cast(this); this->ReadStream = reinterpret_cast(this->Input.tty); this->Output.tty = new uv_tty_t(); uv_tty_init(this->Server->GetLoop(), this->Output.tty, 1, 0); uv_tty_set_mode(this->Output.tty, UV_TTY_MODE_NORMAL); - this->Output.tty->data = static_cast(this); + this->Output.tty->data = static_cast(this); this->WriteStream = reinterpret_cast(this->Output.tty); } else { usesTty = false; @@ -37,13 +37,13 @@ void cmStdIoConnection::SetServer(cmServerBase* s) this->Input.pipe = new uv_pipe_t(); uv_pipe_init(this->Server->GetLoop(), this->Input.pipe, 0); uv_pipe_open(this->Input.pipe, 0); - this->Input.pipe->data = static_cast(this); + this->Input.pipe->data = static_cast(this); this->ReadStream = reinterpret_cast(this->Input.pipe); this->Output.pipe = new uv_pipe_t(); uv_pipe_init(this->Server->GetLoop(), this->Output.pipe, 0); uv_pipe_open(this->Output.pipe, 1); - this->Output.pipe->data = static_cast(this); + this->Output.pipe->data = static_cast(this); this->WriteStream = reinterpret_cast(this->Output.pipe); } } @@ -55,9 +55,9 @@ bool cmStdIoConnection::OnServeStart(std::string* pString) return cmConnection::OnServeStart(pString); } -bool cmStdIoConnection::OnServerShuttingDown() +bool cmStdIoConnection::OnConnectionShuttingDown() { - cmConnection::OnServerShuttingDown(); + cmEventBasedConnection::OnConnectionShuttingDown(); if (usesTty) { uv_read_stop(reinterpret_cast(this->Input.tty)); diff --git a/Source/cmServerConnection.h b/Source/cmServerConnection.h index 8865480..0804f0e 100644 --- a/Source/cmServerConnection.h +++ b/Source/cmServerConnection.h @@ -32,14 +32,14 @@ private: /*** * Generic connection over std io interfaces -- tty */ -class cmStdIoConnection : public cmConnection +class cmStdIoConnection : public cmEventBasedConnection { public: cmStdIoConnection(cmConnectionBufferStrategy* bufferStrategy); void SetServer(cmServerBase* s) override; - bool OnServerShuttingDown() override; + bool OnConnectionShuttingDown() override; bool OnServeStart(std::string* pString) override; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ddfb6a472539c3a01a6f8e6d8fa1cb1013fc4f9 commit 5ddfb6a472539c3a01a6f8e6d8fa1cb1013fc4f9 Author: Justin Berger AuthorDate: Fri Mar 24 21:57:04 2017 -0600 Commit: Justin Berger CommitDate: Mon Jul 10 18:11:33 2017 -0600 server: Add connection as part of a request diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx index 03e0115..61ebba3 100644 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@ -83,7 +83,7 @@ void cmServer::ProcessRequest(cmConnection* connection, debug->PrintStatistics = debugValue["showStats"].asBool(); } - const cmServerRequest request(this, value[kTYPE_KEY].asString(), + const cmServerRequest request(this, connection, value[kTYPE_KEY].asString(), value[kCOOKIE_KEY].asString(), value); if (request.Type == "") { @@ -323,7 +323,7 @@ void cmServer::WriteProgress(const cmServerRequest& request, int min, obj[kPROGRESS_MAXIMUM_KEY] = max; obj[kPROGRESS_CURRENT_KEY] = current; - this->WriteJsonObject(obj, nullptr); + this->WriteJsonObject(request.Connection, obj, nullptr); } void cmServer::WriteMessage(const cmServerRequest& request, @@ -343,7 +343,7 @@ void cmServer::WriteMessage(const cmServerRequest& request, obj[kTITLE_KEY] = title; } - WriteJsonObject(obj, nullptr); + WriteJsonObject(request.Connection, obj, nullptr); } void cmServer::WriteParseError(cmConnection* connection, diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index defba77..ed1abe7 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -125,11 +125,13 @@ void getCMakeInputs(const cmGlobalGenerator* gg, const std::string& sourceDir, } // namespace -cmServerRequest::cmServerRequest(cmServer* server, const std::string& t, - const std::string& c, const Json::Value& d) +cmServerRequest::cmServerRequest(cmServer* server, cmConnection* connection, + const std::string& t, const std::string& c, + const Json::Value& d) : Type(t) , Cookie(c) , Data(d) + , Connection(connection) , m_Server(server) { } diff --git a/Source/cmServerProtocol.h b/Source/cmServerProtocol.h index 83b3d58..9902dfb 100644 --- a/Source/cmServerProtocol.h +++ b/Source/cmServerProtocol.h @@ -11,6 +11,7 @@ #include #include +class cmConnection; class cmFileMonitor; class cmServer; class cmServerRequest; @@ -52,9 +53,11 @@ public: const std::string Type; const std::string Cookie; const Json::Value Data; + cmConnection* Connection; private: - cmServerRequest(cmServer* server, const std::string& t, const std::string& c, + cmServerRequest(cmServer* server, cmConnection* connection, + const std::string& t, const std::string& c, const Json::Value& d); void ReportProgress(int min, int current, int max, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4f5d35ca491ede92003b26a7d0eb06aea3a2bbb commit d4f5d35ca491ede92003b26a7d0eb06aea3a2bbb Author: Justin Berger AuthorDate: Fri Mar 24 21:38:52 2017 -0600 Commit: Justin Berger CommitDate: Mon Jul 10 18:11:27 2017 -0600 server: Refactor to make the event loop owned by server object diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 40403ca..d41d514 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -976,7 +976,9 @@ target_link_libraries(cmake CMakeLib) if(CMake_ENABLE_SERVER_MODE) add_library(CMakeServerLib + cmConnection.h cmConnection.cxx cmFileMonitor.cxx cmFileMonitor.h + cmPipeConnection.cxx cmPipeConnection.h cmServer.cxx cmServer.h cmServerConnection.cxx cmServerConnection.h cmServerProtocol.cxx cmServerProtocol.h diff --git a/Source/cmConnection.cxx b/Source/cmConnection.cxx new file mode 100644 index 0000000..b25843b --- /dev/null +++ b/Source/cmConnection.cxx @@ -0,0 +1,150 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmConnection.h" + +#include "cmServer.h" +#include "cm_uv.h" + +#include +#include + +struct write_req_t +{ + uv_write_t req; + uv_buf_t buf; +}; + +void cmConnection::on_alloc_buffer(uv_handle_t* handle, size_t suggested_size, + uv_buf_t* buf) +{ + (void)(handle); + char* rawBuffer = new char[suggested_size]; + *buf = uv_buf_init(rawBuffer, static_cast(suggested_size)); +} + +void cmConnection::on_read(uv_stream_t* stream, ssize_t nread, + const uv_buf_t* buf) +{ + auto conn = reinterpret_cast(stream->data); + if (conn) { + if (nread >= 0) { + conn->ReadData(std::string(buf->base, buf->base + nread)); + } else { + conn->OnDisconnect((int)nread); + } + } + + delete[](buf->base); +} + +void cmConnection::on_close_delete(uv_handle_t* handle) +{ + delete handle; +} + +void cmConnection::on_close(uv_handle_t*) +{ +} + +void cmConnection::on_write(uv_write_t* req, int status) +{ + (void)(status); + + // Free req and buffer + write_req_t* wr = reinterpret_cast(req); + delete[](wr->buf.base); + delete wr; +} + +void cmConnection::on_new_connection(uv_stream_t* stream, int status) +{ + (void)(status); + auto conn = reinterpret_cast(stream->data); + + if (conn) { + conn->Connect(stream); + } +} + +bool cmConnection::IsOpen() const +{ + return this->WriteStream != CM_NULLPTR; +} + +void cmConnection::WriteData(const std::string& data) +{ + assert(this->WriteStream); + + auto ds = data.size(); + + write_req_t* req = new write_req_t; + req->req.data = this; + req->buf = uv_buf_init(new char[ds], static_cast(ds)); + memcpy(req->buf.base, data.c_str(), ds); + uv_write(reinterpret_cast(req), + static_cast(this->WriteStream), &req->buf, 1, + on_write); +} + +cmConnection::~cmConnection() +{ + OnServerShuttingDown(); +} + +void cmConnection::ReadData(const std::string& data) +{ + this->RawReadBuffer += data; + if (BufferStrategy) { + std::string packet = BufferStrategy->BufferMessage(this->RawReadBuffer); + do { + ProcessRequest(packet); + packet = BufferStrategy->BufferMessage(this->RawReadBuffer); + } while (!packet.empty()); + + } else { + ProcessRequest(this->RawReadBuffer); + this->RawReadBuffer.clear(); + } +} + +void cmConnection::SetServer(cmServerBase* s) +{ + Server = s; +} + +cmConnection::cmConnection(cmConnectionBufferStrategy* bufferStrategy) + : BufferStrategy(bufferStrategy) +{ +} + +void cmConnection::Connect(uv_stream_t*) +{ + Server->OnConnected(nullptr); +} + +void cmConnection::ProcessRequest(const std::string& request) +{ + Server->ProcessRequest(this, request); +} + +bool cmConnection::OnServeStart(std::string* errString) +{ + (void)errString; + return true; +} + +void cmConnection::OnDisconnect(int errorCode) +{ + (void)errorCode; + this->Server->OnDisconnect(this); +} + +bool cmConnection::OnServerShuttingDown() +{ + this->WriteStream->data = nullptr; + this->ReadStream->data = nullptr; + + this->ReadStream = nullptr; + this->WriteStream = nullptr; + return true; +} diff --git a/Source/cmConnection.h b/Source/cmConnection.h new file mode 100644 index 0000000..e994716 --- /dev/null +++ b/Source/cmConnection.h @@ -0,0 +1,104 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#pragma once + +#include "cmConfigure.h" + +#include "cm_uv.h" + +#include +#include +#include + +class cmServerBase; + +/*** + * Given a sequence of bytes with any kind of buffering, instances of this + * class arrange logical chunks according to whatever the use case is for + * the connection. + */ +class cmConnectionBufferStrategy +{ +public: + virtual ~cmConnectionBufferStrategy(); + + /*** + * Called whenever with an active raw buffer. If a logical chunk + * becomes available, that chunk is returned and that portion is + * removed from the rawBuffer + * + * @param rawBuffer in/out parameter. Receive buffer; the buffer strategy is + * free to manipulate this buffer anyway it needs to. + * + * @return Next chunk from the stream. Returns the empty string if a chunk + * isn't ready yet. Users of this interface should repeatedly call this + * function until an empty string is returned since its entirely possible + * multiple chunks come in a single raw buffer. + */ + virtual std::string BufferMessage(std::string& rawBuffer) = 0; + + /*** + * Resets the internal state of the buffering + */ + virtual void clear(); + + // TODO: There should be a callback / flag set for errors +}; + +/*** + * Abstraction of a connection; ties in event callbacks from libuv and notifies + * the server when appropriate + */ +class cmConnection +{ + CM_DISABLE_COPY(cmConnection) + +public: + virtual ~cmConnection(); + + /*** + * @param bufferStrategy If no strategy is given, it will process the raw + * chunks as they come in. The connection + * owns the pointer given. + */ + cmConnection(cmConnectionBufferStrategy* bufferStrategy = nullptr); + + virtual void Connect(uv_stream_t* server); + + virtual void ReadData(const std::string& data); + + virtual bool OnServeStart(std::string* errString); + + virtual bool OnServerShuttingDown(); + + virtual bool IsOpen() const; + + virtual void WriteData(const std::string& data); + + virtual void ProcessRequest(const std::string& request); + + virtual void SetServer(cmServerBase* s); + + virtual void OnDisconnect(int errorCode); + uv_stream_t* ReadStream = nullptr; + cmServerBase* Server = nullptr; + uv_stream_t* WriteStream = nullptr; + + static void on_close(uv_handle_t* handle); + static void on_close_delete(uv_handle_t* handle); + +protected: + std::string RawReadBuffer; + + std::unique_ptr BufferStrategy; + + static void on_read(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf); + + static void on_write(uv_write_t* req, int status); + + static void on_new_connection(uv_stream_t* stream, int status); + + static void on_alloc_buffer(uv_handle_t* handle, size_t suggested_size, + uv_buf_t* buf); +}; diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx index 8027535..c0401d7 100644 --- a/Source/cmFileMonitor.cxx +++ b/Source/cmFileMonitor.cxx @@ -171,7 +171,9 @@ public: { if (this->Handle) { uv_fs_event_stop(this->Handle); - uv_close(reinterpret_cast(this->Handle), &on_fs_close); + if (!uv_is_closing(reinterpret_cast(this->Handle))) { + uv_close(reinterpret_cast(this->Handle), &on_fs_close); + } this->Handle = nullptr; } cmVirtualDirectoryWatcher::StopWatching(); diff --git a/Source/cmPipeConnection.cxx b/Source/cmPipeConnection.cxx new file mode 100644 index 0000000..438719f --- /dev/null +++ b/Source/cmPipeConnection.cxx @@ -0,0 +1,81 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmPipeConnection.h" + +#include "cmConfigure.h" +#include "cmServer.h" + +cmPipeConnection::cmPipeConnection(const std::string& name, + cmConnectionBufferStrategy* bufferStrategy) + : cmConnection(bufferStrategy) + , PipeName(name) +{ +} + +void cmPipeConnection::Connect(uv_stream_t* server) +{ + if (this->ClientPipe) { + // Accept and close all pipes but the first: + uv_pipe_t* rejectPipe = new uv_pipe_t(); + + uv_pipe_init(this->Server->GetLoop(), rejectPipe, 0); + uv_accept(server, reinterpret_cast(rejectPipe)); + uv_close(reinterpret_cast(rejectPipe), &on_close_delete); + return; + } + + this->ClientPipe = new uv_pipe_t(); + uv_pipe_init(this->Server->GetLoop(), this->ClientPipe, 0); + this->ClientPipe->data = static_cast(this); + + auto client = reinterpret_cast(this->ClientPipe); + if (uv_accept(server, client) != 0) { + uv_close(reinterpret_cast(client), &on_close_delete); + this->ClientPipe = CM_NULLPTR; + return; + } + this->ReadStream = client; + this->WriteStream = client; + + uv_read_start(this->ReadStream, on_alloc_buffer, on_read); + Server->OnConnected(this); +} + +bool cmPipeConnection::OnServeStart(std::string* errorMessage) +{ + this->ServerPipe = new uv_pipe_t(); + uv_pipe_init(this->Server->GetLoop(), this->ServerPipe, 0); + this->ServerPipe->data = static_cast(this); + + int r; + if ((r = uv_pipe_bind(this->ServerPipe, this->PipeName.c_str())) != 0) { + *errorMessage = std::string("Internal Error with ") + this->PipeName + + ": " + uv_err_name(r); + return false; + } + auto serverStream = reinterpret_cast(this->ServerPipe); + if ((r = uv_listen(serverStream, 1, on_new_connection)) != 0) { + *errorMessage = std::string("Internal Error listening on ") + + this->PipeName + ": " + uv_err_name(r); + return false; + } + + return cmConnection::OnServeStart(errorMessage); +} + +bool cmPipeConnection::OnServerShuttingDown() +{ + if (this->ClientPipe) { + uv_close(reinterpret_cast(this->ClientPipe), + &on_close_delete); + this->WriteStream->data = nullptr; + } + uv_close(reinterpret_cast(this->ServerPipe), &on_close_delete); + + this->ClientPipe = nullptr; + this->ServerPipe = nullptr; + this->WriteStream = nullptr; + this->ReadStream = nullptr; + + return cmConnection::OnServerShuttingDown(); +} diff --git a/Source/cmPipeConnection.h b/Source/cmPipeConnection.h new file mode 100644 index 0000000..3d3d52c --- /dev/null +++ b/Source/cmPipeConnection.h @@ -0,0 +1,28 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#pragma once + +#include "cmConnection.h" + +#include "cm_uv.h" + +#include + +class cmPipeConnection : public cmConnection +{ +public: + cmPipeConnection(const std::string& name, + cmConnectionBufferStrategy* bufferStrategy = nullptr); + + bool OnServeStart(std::string* pString) override; + + bool OnServerShuttingDown() override; + + void Connect(uv_stream_t* server) override; + +private: + const std::string PipeName; + uv_pipe_t* ServerPipe = nullptr; + uv_pipe_t* ClientPipe = nullptr; +}; diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx index 7fc6ed7..03e0115 100644 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@ -2,7 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmServer.h" -#include "cmServerConnection.h" +#include "cmConnection.h" +#include "cmFileMonitor.h" #include "cmServerDictionary.h" #include "cmServerProtocol.h" #include "cmSystemTools.h" @@ -14,8 +15,23 @@ #include #include #include +#include #include +void on_signal(uv_signal_t* signal, int signum) +{ + auto conn = reinterpret_cast(signal->data); + conn->OnSignal(signum); +} + +static void on_walk_to_shutdown(uv_handle_t* handle, void* arg) +{ + (void)arg; + if (!uv_is_closing(handle)) { + uv_close(handle, &cmConnection::on_close); + } +} + class cmServer::DebugInfo { public: @@ -30,11 +46,10 @@ public: uint64_t StartTime; }; -cmServer::cmServer(cmServerConnection* conn, bool supportExperimental) - : Connection(conn) +cmServer::cmServer(cmConnection* conn, bool supportExperimental) + : cmServerBase(conn) , SupportExperimental(supportExperimental) { - this->Connection->SetServer(this); // Register supported protocols: this->RegisterProtocol(new cmServerProtocol1_0); } @@ -48,23 +63,15 @@ cmServer::~cmServer() for (cmServerProtocol* p : this->SupportedProtocols) { delete p; } - - delete this->Connection; } -void cmServer::PopOne() +void cmServer::ProcessRequest(cmConnection* connection, + const std::string& input) { - if (this->Queue.empty()) { - return; - } - Json::Reader reader; Json::Value value; - const std::string input = this->Queue.front(); - this->Queue.erase(this->Queue.begin()); - if (!reader.parse(input, value)) { - this->WriteParseError("Failed to parse JSON input."); + this->WriteParseError(connection, "Failed to parse JSON input."); return; } @@ -82,7 +89,7 @@ void cmServer::PopOne() if (request.Type == "") { cmServerResponse response(request); response.SetError("No type given in request."); - this->WriteResponse(response, nullptr); + this->WriteResponse(connection, response, nullptr); return; } @@ -91,9 +98,11 @@ void cmServer::PopOne() if (this->Protocol) { this->Protocol->CMakeInstance()->SetProgressCallback( reportProgress, const_cast(&request)); - this->WriteResponse(this->Protocol->Process(request), debug.get()); + this->WriteResponse(connection, this->Protocol->Process(request), + debug.get()); } else { - this->WriteResponse(this->SetProtocolVersion(request), debug.get()); + this->WriteResponse(connection, this->SetProtocolVersion(request), + debug.get()); } } @@ -115,7 +124,7 @@ void cmServer::RegisterProtocol(cmServerProtocol* protocol) } } -void cmServer::PrintHello() const +void cmServer::PrintHello(cmConnection* connection) const { Json::Value hello = Json::objectValue; hello[kTYPE_KEY] = "hello"; @@ -134,13 +143,7 @@ void cmServer::PrintHello() const protocolVersions.append(tmp); } - this->WriteJsonObject(hello, nullptr); -} - -void cmServer::QueueRequest(const std::string& request) -{ - this->Queue.push_back(request); - this->PopOne(); + this->WriteJsonObject(connection, hello, nullptr); } void cmServer::reportProgress(const char* msg, float progress, void* data) @@ -232,17 +235,26 @@ bool cmServer::Serve(std::string* errorMessage) } assert(!this->Protocol); - return Connection->ProcessEvents(errorMessage); + return cmServerBase::Serve(errorMessage); } cmFileMonitor* cmServer::FileMonitor() const { - return Connection->FileMonitor(); + return fileMonitor.get(); } void cmServer::WriteJsonObject(const Json::Value& jsonValue, const DebugInfo* debug) const { + for (auto& connection : this->Connections) { + WriteJsonObject(connection.get(), jsonValue, debug); + } +} + +void cmServer::WriteJsonObject(cmConnection* connection, + const Json::Value& jsonValue, + const DebugInfo* debug) const +{ Json::FastWriter writer; auto beforeJson = uv_hrtime(); @@ -272,7 +284,7 @@ void cmServer::WriteJsonObject(const Json::Value& jsonValue, } } - Connection->WriteData(std::string("\n") + kSTART_MAGIC + std::string("\n") + + connection->WriteData(std::string("\n") + kSTART_MAGIC + std::string("\n") + result + kEND_MAGIC + std::string("\n")); } @@ -334,7 +346,8 @@ void cmServer::WriteMessage(const cmServerRequest& request, WriteJsonObject(obj, nullptr); } -void cmServer::WriteParseError(const std::string& message) const +void cmServer::WriteParseError(cmConnection* connection, + const std::string& message) const { Json::Value obj = Json::objectValue; obj[kTYPE_KEY] = kERROR_TYPE; @@ -342,7 +355,7 @@ void cmServer::WriteParseError(const std::string& message) const obj[kREPLY_TO_KEY] = ""; obj[kCOOKIE_KEY] = ""; - this->WriteJsonObject(obj, nullptr); + this->WriteJsonObject(connection, obj, nullptr); } void cmServer::WriteSignal(const std::string& name, @@ -358,7 +371,8 @@ void cmServer::WriteSignal(const std::string& name, WriteJsonObject(obj, nullptr); } -void cmServer::WriteResponse(const cmServerResponse& response, +void cmServer::WriteResponse(cmConnection* connection, + const cmServerResponse& response, const DebugInfo* debug) const { assert(response.IsComplete()); @@ -371,5 +385,161 @@ void cmServer::WriteResponse(const cmServerResponse& response, obj[kERROR_MESSAGE_KEY] = response.ErrorMessage(); } - this->WriteJsonObject(obj, debug); + this->WriteJsonObject(connection, obj, debug); +} + +void cmServer::OnConnected(cmConnection* connection) +{ + PrintHello(connection); +} + +void cmServer::OnServeStart() +{ + cmServerBase::OnServeStart(); + fileMonitor = std::make_shared(GetLoop()); +} + +void cmServer::StartShutDown() +{ + if (fileMonitor) { + fileMonitor->StopMonitoring(); + fileMonitor.reset(); + } + cmServerBase::StartShutDown(); +} + +static void __start_thread(void* arg) +{ + auto server = reinterpret_cast(arg); + std::string error; + server->Serve(&error); +} + +bool cmServerBase::StartServeThread() +{ + ServeThreadRunning = true; + uv_thread_create(&ServeThread, __start_thread, this); + return true; +} + +bool cmServerBase::Serve(std::string* errorMessage) +{ + errorMessage->clear(); + + uv_signal_init(&Loop, &this->SIGINTHandler); + uv_signal_init(&Loop, &this->SIGHUPHandler); + + this->SIGINTHandler.data = this; + this->SIGHUPHandler.data = this; + + uv_signal_start(&this->SIGINTHandler, &on_signal, SIGINT); + uv_signal_start(&this->SIGHUPHandler, &on_signal, SIGHUP); + + OnServeStart(); + + for (auto& connection : Connections) { + if (!connection->OnServeStart(errorMessage)) { + return false; + } + } + + if (uv_run(&Loop, UV_RUN_DEFAULT) != 0) { + *errorMessage = "Internal Error: Event loop stopped in unclean state."; + StartShutDown(); + return false; + } + + ServeThreadRunning = false; + return true; +} + +void cmServerBase::OnConnected(cmConnection*) +{ +} + +void cmServerBase::OnDisconnect() +{ +} + +void cmServerBase::OnServeStart() +{ + uv_signal_start(&this->SIGINTHandler, &on_signal, SIGINT); + uv_signal_start(&this->SIGHUPHandler, &on_signal, SIGHUP); +} + +void cmServerBase::StartShutDown() +{ + if (!uv_is_closing((const uv_handle_t*)&this->SIGINTHandler)) { + uv_signal_stop(&this->SIGINTHandler); + } + + if (!uv_is_closing((const uv_handle_t*)&this->SIGHUPHandler)) { + uv_signal_stop(&this->SIGHUPHandler); + } + + for (auto& connection : Connections) { + connection->OnServerShuttingDown(); + } + Connections.clear(); + + uv_stop(&Loop); + + uv_walk(&Loop, on_walk_to_shutdown, CM_NULLPTR); + + uv_run(&Loop, UV_RUN_DEFAULT); +} + +bool cmServerBase::OnSignal(int signum) +{ + (void)signum; + StartShutDown(); + return true; +} + +cmServerBase::cmServerBase(cmConnection* connection) +{ + uv_loop_init(&Loop); + + uv_signal_init(&Loop, &this->SIGINTHandler); + uv_signal_init(&Loop, &this->SIGHUPHandler); + + this->SIGINTHandler.data = this; + this->SIGHUPHandler.data = this; + + AddNewConnection(connection); +} + +cmServerBase::~cmServerBase() +{ + + if (ServeThreadRunning) { + StartShutDown(); + uv_thread_join(&ServeThread); + } + + uv_loop_close(&Loop); +} + +void cmServerBase::AddNewConnection(cmConnection* ownedConnection) +{ + Connections.emplace_back(ownedConnection); + ownedConnection->SetServer(this); +} + +uv_loop_t* cmServerBase::GetLoop() +{ + return &Loop; +} + +void cmServerBase::OnDisconnect(cmConnection* pConnection) +{ + auto pred = [pConnection](const std::unique_ptr& m) { + return m.get() == pConnection; + }; + 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 b814050..0000704 100644 --- a/Source/cmServer.h +++ b/Source/cmServer.h @@ -7,26 +7,83 @@ #include "cm_jsoncpp_value.h" #include "cm_uv.h" +#include // IWYU pragma: keep #include #include +class cmConnection; class cmFileMonitor; -class cmServerConnection; class cmServerProtocol; class cmServerRequest; class cmServerResponse; -class cmServer +/*** + * This essentially hold and manages a libuv event queue and responds to + * messages + * on any of its connections. + */ +class cmServerBase +{ +public: + cmServerBase(cmConnection* connection); + virtual ~cmServerBase(); + + virtual void AddNewConnection(cmConnection* ownedConnection); + + /*** + * The main override responsible for tailoring behavior towards + * whatever the given server is supposed to do + * + * This should almost always be called by the given connections + * directly. + * + * @param connection The connectiont the request was received on + * @param request The actual request + */ + virtual void ProcessRequest(cmConnection* connection, + const std::string& request) = 0; + virtual void OnConnected(cmConnection* connection); + virtual void OnDisconnect(); + + /*** + * Start a dedicated thread. If this is used to start the server, it will + * join on the + * servers dtor. + */ + virtual bool StartServeThread(); + virtual bool Serve(std::string* errorMessage); + + virtual void OnServeStart(); + virtual void StartShutDown(); + + virtual bool OnSignal(int signum); + uv_loop_t* GetLoop(); + + void OnDisconnect(cmConnection* pConnection); + +protected: + std::vector > Connections; + + bool ServeThreadRunning = false; + uv_thread_t ServeThread; + + uv_loop_t Loop; + + uv_signal_t SIGINTHandler; + uv_signal_t SIGHUPHandler; +}; + +class cmServer : public cmServerBase { CM_DISABLE_COPY(cmServer) public: class DebugInfo; - cmServer(cmServerConnection* conn, bool supportExperimental); - ~cmServer(); + cmServer(cmConnection* conn, bool supportExperimental); + ~cmServer() override; - bool Serve(std::string* errorMessage); + bool Serve(std::string* errorMessage) override; cmFileMonitor* FileMonitor() const; @@ -34,9 +91,20 @@ private: void RegisterProtocol(cmServerProtocol* protocol); // Callbacks from cmServerConnection: - void PopOne(); - void QueueRequest(const std::string& request); + void ProcessRequest(cmConnection* connection, + const std::string& request) override; + std::shared_ptr fileMonitor; + +public: + void OnServeStart() override; + + void StartShutDown() override; + +public: + void OnConnected(cmConnection* connection) override; + +private: static void reportProgress(const char* msg, float progress, void* data); static void reportMessage(const char* msg, const char* title, bool& cancel, void* data); @@ -44,36 +112,37 @@ private: // Handle requests: cmServerResponse SetProtocolVersion(const cmServerRequest& request); - void PrintHello() const; + void PrintHello(cmConnection* connection) const; // Write responses: void WriteProgress(const cmServerRequest& request, int min, int current, int max, const std::string& message) const; void WriteMessage(const cmServerRequest& request, const std::string& message, const std::string& title) const; - void WriteResponse(const cmServerResponse& response, + void WriteResponse(cmConnection* connection, + const cmServerResponse& response, const DebugInfo* debug) const; - void WriteParseError(const std::string& message) const; + void WriteParseError(cmConnection* connection, + const std::string& message) const; void WriteSignal(const std::string& name, const Json::Value& obj) const; void WriteJsonObject(Json::Value const& jsonValue, const DebugInfo* debug) const; + void WriteJsonObject(cmConnection* connection, Json::Value const& jsonValue, + const DebugInfo* debug) const; + static cmServerProtocol* FindMatchingProtocol( const std::vector& protocols, int major, int minor); - cmServerConnection* Connection = nullptr; const bool SupportExperimental; cmServerProtocol* Protocol = nullptr; std::vector SupportedProtocols; - std::vector Queue; std::string DataBuffer; std::string JsonData; - uv_loop_t* Loop = nullptr; - typedef union { uv_tty_t tty; @@ -87,7 +156,6 @@ private: mutable bool Writing = false; - friend class cmServerConnection; friend class cmServerProtocol; friend class cmServerRequest; }; diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx index 36312ed..3cc7722 100644 --- a/Source/cmServerConnection.cxx +++ b/Source/cmServerConnection.cxx @@ -2,376 +2,123 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmServerConnection.h" -#include "cmFileMonitor.h" #include "cmServer.h" #include "cmServerDictionary.h" -#include -#include - -namespace { - -struct write_req_t +cmStdIoConnection::cmStdIoConnection( + cmConnectionBufferStrategy* bufferStrategy) + : cmConnection(bufferStrategy) + , Input() + , Output() { - uv_write_t req; - uv_buf_t buf; -}; - -void on_alloc_buffer(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) -{ - (void)(handle); - char* rawBuffer = new char[suggested_size]; - *buf = uv_buf_init(rawBuffer, static_cast(suggested_size)); -} - -void on_read(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) -{ - auto conn = reinterpret_cast(stream->data); - if (nread >= 0) { - conn->ReadData(std::string(buf->base, buf->base + nread)); - } else { - conn->TriggerShutdown(); - } - - delete[](buf->base); } -void on_write(uv_write_t* req, int status) +void cmStdIoConnection::SetServer(cmServerBase* s) { - (void)(status); - auto conn = reinterpret_cast(req->data); - - // Free req and buffer - write_req_t* wr = reinterpret_cast(req); - delete[](wr->buf.base); - delete wr; + cmConnection::SetServer(s); - conn->ProcessNextRequest(); -} + if (uv_guess_handle(1) == UV_TTY) { + usesTty = true; -void on_new_connection(uv_stream_t* stream, int status) -{ - (void)(status); - auto conn = reinterpret_cast(stream->data); - conn->Connect(stream); -} + this->Input.tty = new uv_tty_t(); + uv_tty_init(this->Server->GetLoop(), this->Input.tty, 0, 1); + uv_tty_set_mode(this->Input.tty, UV_TTY_MODE_NORMAL); + this->Input.tty->data = static_cast(this); + this->ReadStream = reinterpret_cast(this->Input.tty); -void on_signal(uv_signal_t* signal, int signum) -{ - auto conn = reinterpret_cast(signal->data); - (void)(signum); - conn->TriggerShutdown(); -} + this->Output.tty = new uv_tty_t(); + uv_tty_init(this->Server->GetLoop(), this->Output.tty, 1, 0); + uv_tty_set_mode(this->Output.tty, UV_TTY_MODE_NORMAL); + this->Output.tty->data = static_cast(this); + this->WriteStream = reinterpret_cast(this->Output.tty); + } else { + usesTty = false; -void on_signal_close(uv_handle_t* handle) -{ - delete reinterpret_cast(handle); -} + this->Input.pipe = new uv_pipe_t(); + uv_pipe_init(this->Server->GetLoop(), this->Input.pipe, 0); + uv_pipe_open(this->Input.pipe, 0); + this->Input.pipe->data = static_cast(this); + this->ReadStream = reinterpret_cast(this->Input.pipe); -void on_pipe_close(uv_handle_t* handle) -{ - delete reinterpret_cast(handle); + this->Output.pipe = new uv_pipe_t(); + uv_pipe_init(this->Server->GetLoop(), this->Output.pipe, 0); + uv_pipe_open(this->Output.pipe, 1); + this->Output.pipe->data = static_cast(this); + this->WriteStream = reinterpret_cast(this->Output.pipe); + } } -void on_tty_close(uv_handle_t* handle) +bool cmStdIoConnection::OnServeStart(std::string* pString) { - delete reinterpret_cast(handle); + uv_read_start(this->ReadStream, on_alloc_buffer, on_read); + Server->OnConnected(this); + return cmConnection::OnServeStart(pString); } -} // namespace - -class LoopGuard +bool cmStdIoConnection::OnServerShuttingDown() { -public: - LoopGuard(cmServerConnection* connection) - : Connection(connection) - { - this->Connection->mLoop = uv_default_loop(); - if (!this->Connection->mLoop) { - return; - } - this->Connection->mFileMonitor = - new cmFileMonitor(this->Connection->mLoop); - } - - ~LoopGuard() - { - if (!this->Connection->mLoop) { - return; - } + cmConnection::OnServerShuttingDown(); - if (this->Connection->mFileMonitor) { - delete this->Connection->mFileMonitor; - } - uv_loop_close(this->Connection->mLoop); - this->Connection->mLoop = nullptr; + if (usesTty) { + uv_read_stop(reinterpret_cast(this->Input.tty)); + uv_close(reinterpret_cast(this->Input.tty), + &on_close_delete); + uv_close(reinterpret_cast(this->Output.tty), + &on_close_delete); + } else { + uv_close(reinterpret_cast(this->Input.pipe), + &on_close_delete); + uv_close(reinterpret_cast(this->Output.pipe), + &on_close_delete); } -private: - cmServerConnection* Connection; -}; + return true; +} -cmServerConnection::cmServerConnection() +cmServerPipeConnection::cmServerPipeConnection(const std::string& name) + : cmPipeConnection(name, new cmServerBufferStrategy) { } -cmServerConnection::~cmServerConnection() +cmServerStdIoConnection::cmServerStdIoConnection() + : cmStdIoConnection(new cmServerBufferStrategy) { } -void cmServerConnection::SetServer(cmServer* s) +cmConnectionBufferStrategy::~cmConnectionBufferStrategy() { - this->Server = s; } -bool cmServerConnection::ProcessEvents(std::string* errorMessage) +void cmConnectionBufferStrategy::clear() { - assert(this->Server); - errorMessage->clear(); - - this->RawReadBuffer.clear(); - this->RequestBuffer.clear(); - - LoopGuard guard(this); - (void)(guard); - if (!this->mLoop) { - *errorMessage = "Internal Error: Failed to create event loop."; - return false; - } - - this->SIGINTHandler = new uv_signal_t; - uv_signal_init(this->mLoop, this->SIGINTHandler); - this->SIGINTHandler->data = static_cast(this); - uv_signal_start(this->SIGINTHandler, &on_signal, SIGINT); - - this->SIGHUPHandler = new uv_signal_t; - uv_signal_init(this->mLoop, this->SIGHUPHandler); - this->SIGHUPHandler->data = static_cast(this); - uv_signal_start(this->SIGHUPHandler, &on_signal, SIGHUP); - - if (!DoSetup(errorMessage)) { - return false; - } - - if (uv_run(this->mLoop, UV_RUN_DEFAULT) != 0) { - *errorMessage = "Internal Error: Event loop stopped in unclean state."; - return false; - } - - // These need to be cleaned up by now: - assert(!this->ReadStream); - assert(!this->WriteStream); - - this->RawReadBuffer.clear(); - this->RequestBuffer.clear(); - - return true; } -void cmServerConnection::ReadData(const std::string& data) +std::string cmServerBufferStrategy::BufferMessage(std::string& RawReadBuffer) { - this->RawReadBuffer += data; - for (;;) { - auto needle = this->RawReadBuffer.find('\n'); + auto needle = RawReadBuffer.find('\n'); if (needle == std::string::npos) { - return; + return ""; } - std::string line = this->RawReadBuffer.substr(0, needle); + std::string line = RawReadBuffer.substr(0, needle); const auto ls = line.size(); if (ls > 1 && line.at(ls - 1) == '\r') { line.erase(ls - 1, 1); } - this->RawReadBuffer.erase(this->RawReadBuffer.begin(), - this->RawReadBuffer.begin() + - static_cast(needle) + 1); + RawReadBuffer.erase(RawReadBuffer.begin(), + RawReadBuffer.begin() + static_cast(needle) + 1); if (line == kSTART_MAGIC) { - this->RequestBuffer.clear(); + RequestBuffer.clear(); continue; } if (line == kEND_MAGIC) { - this->Server->QueueRequest(this->RequestBuffer); - this->RequestBuffer.clear(); - } else { - this->RequestBuffer += line; - this->RequestBuffer += "\n"; + std::string rtn; + rtn.swap(this->RequestBuffer); + return rtn; } - } -} -void cmServerConnection::TriggerShutdown() -{ - this->FileMonitor()->StopMonitoring(); - - uv_signal_stop(this->SIGINTHandler); - uv_signal_stop(this->SIGHUPHandler); - - uv_close(reinterpret_cast(this->SIGINTHandler), - &on_signal_close); // delete handle - uv_close(reinterpret_cast(this->SIGHUPHandler), - &on_signal_close); // delete handle - - this->SIGINTHandler = nullptr; - this->SIGHUPHandler = nullptr; - - this->TearDown(); -} - -void cmServerConnection::WriteData(const std::string& data) -{ - assert(this->WriteStream); - - auto ds = data.size(); - - write_req_t* req = new write_req_t; - req->req.data = this; - req->buf = uv_buf_init(new char[ds], static_cast(ds)); - memcpy(req->buf.base, data.c_str(), ds); - - uv_write(reinterpret_cast(req), - static_cast(this->WriteStream), &req->buf, 1, - on_write); -} - -void cmServerConnection::ProcessNextRequest() -{ - Server->PopOne(); -} - -void cmServerConnection::SendGreetings() -{ - Server->PrintHello(); -} - -cmServerStdIoConnection::cmServerStdIoConnection() -{ - this->Input.tty = nullptr; - this->Output.tty = nullptr; -} - -bool cmServerStdIoConnection::DoSetup(std::string* errorMessage) -{ - (void)(errorMessage); - - if (uv_guess_handle(1) == UV_TTY) { - usesTty = true; - this->Input.tty = new uv_tty_t; - uv_tty_init(this->Loop(), this->Input.tty, 0, 1); - uv_tty_set_mode(this->Input.tty, UV_TTY_MODE_NORMAL); - Input.tty->data = this; - this->ReadStream = reinterpret_cast(this->Input.tty); - - this->Output.tty = new uv_tty_t; - uv_tty_init(this->Loop(), this->Output.tty, 1, 0); - uv_tty_set_mode(this->Output.tty, UV_TTY_MODE_NORMAL); - Output.tty->data = this; - this->WriteStream = reinterpret_cast(this->Output.tty); - } else { - usesTty = false; - this->Input.pipe = new uv_pipe_t; - uv_pipe_init(this->Loop(), this->Input.pipe, 0); - uv_pipe_open(this->Input.pipe, 0); - Input.pipe->data = this; - this->ReadStream = reinterpret_cast(this->Input.pipe); - - this->Output.pipe = new uv_pipe_t; - uv_pipe_init(this->Loop(), this->Output.pipe, 0); - uv_pipe_open(this->Output.pipe, 1); - Output.pipe->data = this; - this->WriteStream = reinterpret_cast(this->Output.pipe); + this->RequestBuffer += line; + this->RequestBuffer += "\n"; } - - SendGreetings(); - uv_read_start(this->ReadStream, on_alloc_buffer, on_read); - - return true; -} - -void cmServerStdIoConnection::TearDown() -{ - if (usesTty) { - uv_close(reinterpret_cast(this->Input.tty), &on_tty_close); - uv_close(reinterpret_cast(this->Output.tty), &on_tty_close); - this->Input.tty = nullptr; - this->Output.tty = nullptr; - } else { - uv_close(reinterpret_cast(this->Input.pipe), &on_pipe_close); - uv_close(reinterpret_cast(this->Output.pipe), - &on_pipe_close); - this->Input.pipe = nullptr; - this->Input.pipe = nullptr; - } - this->ReadStream = nullptr; - this->WriteStream = nullptr; -} - -cmServerPipeConnection::cmServerPipeConnection(const std::string& name) - : PipeName(name) -{ -} - -bool cmServerPipeConnection::DoSetup(std::string* errorMessage) -{ - this->ServerPipe = new uv_pipe_t; - uv_pipe_init(this->Loop(), this->ServerPipe, 0); - this->ServerPipe->data = this; - - int r; - if ((r = uv_pipe_bind(this->ServerPipe, this->PipeName.c_str())) != 0) { - *errorMessage = std::string("Internal Error with ") + this->PipeName + - ": " + uv_err_name(r); - return false; - } - auto serverStream = reinterpret_cast(this->ServerPipe); - if ((r = uv_listen(serverStream, 1, on_new_connection)) != 0) { - *errorMessage = std::string("Internal Error listening on ") + - this->PipeName + ": " + uv_err_name(r); - return false; - } - - return true; -} - -void cmServerPipeConnection::TearDown() -{ - if (this->ClientPipe) { - uv_close(reinterpret_cast(this->ClientPipe), &on_pipe_close); - this->WriteStream->data = nullptr; - } - uv_close(reinterpret_cast(this->ServerPipe), &on_pipe_close); - - this->ClientPipe = nullptr; - this->ServerPipe = nullptr; - this->WriteStream = nullptr; - this->ReadStream = nullptr; -} - -void cmServerPipeConnection::Connect(uv_stream_t* server) -{ - if (this->ClientPipe) { - // Accept and close all pipes but the first: - uv_pipe_t* rejectPipe = new uv_pipe_t; - - uv_pipe_init(this->Loop(), rejectPipe, 0); - auto rejecter = reinterpret_cast(rejectPipe); - uv_accept(server, rejecter); - uv_close(reinterpret_cast(rejecter), &on_pipe_close); - return; - } - - this->ClientPipe = new uv_pipe_t; - uv_pipe_init(this->Loop(), this->ClientPipe, 0); - this->ClientPipe->data = this; - auto client = reinterpret_cast(this->ClientPipe); - if (uv_accept(server, client) != 0) { - uv_close(reinterpret_cast(client), nullptr); - return; - } - this->ReadStream = client; - this->WriteStream = client; - - uv_read_start(this->ReadStream, on_alloc_buffer, on_read); - - this->SendGreetings(); } diff --git a/Source/cmServerConnection.h b/Source/cmServerConnection.h index b96bf3c..8865480 100644 --- a/Source/cmServerConnection.h +++ b/Source/cmServerConnection.h @@ -2,68 +2,46 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #pragma once -#include "cmConfigure.h" +#include "cmConnection.h" +#include "cmPipeConnection.h" #include "cm_uv.h" #include -class cmFileMonitor; -class cmServer; +class cmServerBase; -class cmServerConnection +/*** + * This connection buffer strategy accepts messages in the form of + * [== "CMake Server" ==[ +{ + ... some JSON message ... +} +]== "CMake Server" ==] + * and only passes on the core json; it discards the envelope. + */ +class cmServerBufferStrategy : public cmConnectionBufferStrategy { - CM_DISABLE_COPY(cmServerConnection) - public: - cmServerConnection(); - virtual ~cmServerConnection(); - - void SetServer(cmServer* s); - - bool ProcessEvents(std::string* errorMessage); - - void ReadData(const std::string& data); - void TriggerShutdown(); - void WriteData(const std::string& data); - void ProcessNextRequest(); - - virtual void Connect(uv_stream_t* server) { (void)(server); } - - cmFileMonitor* FileMonitor() const { return this->mFileMonitor; } - -protected: - virtual bool DoSetup(std::string* errorMessage) = 0; - virtual void TearDown() = 0; - - void SendGreetings(); - - uv_loop_t* Loop() const { return mLoop; } - -protected: - std::string RawReadBuffer; - std::string RequestBuffer; - - uv_stream_t* ReadStream = nullptr; - uv_stream_t* WriteStream = nullptr; + std::string BufferMessage(std::string& rawBuffer) override; private: - uv_loop_t* mLoop = nullptr; - cmFileMonitor* mFileMonitor = nullptr; - cmServer* Server = nullptr; - uv_signal_t* SIGINTHandler = nullptr; - uv_signal_t* SIGHUPHandler = nullptr; - - friend class LoopGuard; + std::string RequestBuffer; }; -class cmServerStdIoConnection : public cmServerConnection +/*** + * Generic connection over std io interfaces -- tty + */ +class cmStdIoConnection : public cmConnection { public: - cmServerStdIoConnection(); - bool DoSetup(std::string* errorMessage) override; + cmStdIoConnection(cmConnectionBufferStrategy* bufferStrategy); + + void SetServer(cmServerBase* s) override; + + bool OnServerShuttingDown() override; - void TearDown() override; + bool OnServeStart(std::string* pString) override; private: typedef union @@ -78,18 +56,18 @@ private: InOutUnion Output; }; -class cmServerPipeConnection : public cmServerConnection +/*** + * These specific connections use the cmake server + * buffering strategy. + */ +class cmServerStdIoConnection : public cmStdIoConnection { public: - cmServerPipeConnection(const std::string& name); - bool DoSetup(std::string* errorMessage) override; - - void TearDown() override; - - void Connect(uv_stream_t* server) override; + cmServerStdIoConnection(); +}; -private: - const std::string PipeName; - uv_pipe_t* ServerPipe = nullptr; - uv_pipe_t* ClientPipe = nullptr; +class cmServerPipeConnection : public cmPipeConnection +{ +public: + cmServerPipeConnection(const std::string& name); }; diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index d5b0861..8fadbb1 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -44,6 +44,8 @@ #include #include +class cmConnection; + int cmcmd_cmake_ninja_depends(std::vector::const_iterator argBeg, std::vector::const_iterator argEnd); int cmcmd_cmake_ninja_dyndep(std::vector::const_iterator argBeg, @@ -1013,7 +1015,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } } #if defined(HAVE_SERVER_MODE) && HAVE_SERVER_MODE - cmServerConnection* conn; + cmConnection* conn; if (isDebug) { conn = new cmServerStdIoConnection; } else { diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp index fe0f7df..23ca091 100644 --- a/Utilities/IWYU/mapping.imp +++ b/Utilities/IWYU/mapping.imp @@ -21,6 +21,7 @@ { include: [ "", public, "", public ] }, # HACK: check whether this can be removed with next iwyu release. + { include: [ "", private, "", public ] }, { include: [ "", private, "", public ] }, { include: [ "", private, "", public ] }, { include: [ "", private, "", public ] }, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=501a4feea8d0d007ce292defec1c97d6eb702409 commit 501a4feea8d0d007ce292defec1c97d6eb702409 Author: Andr? Klitzing AuthorDate: Sun Jul 9 13:18:20 2017 +0200 Commit: Andr? Klitzing CommitDate: Sun Jul 9 13:18:20 2017 +0200 Add some unit tests for md5sum diff --git a/Tests/RunCMake/CommandLine/E_md5sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_md5sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_md5sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_md5sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_md5sum-mixed-result.txt b/Tests/RunCMake/CommandLine/E_md5sum-mixed-result.txt new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-mixed-result.txt @@ -0,0 +1 @@ +2 diff --git a/Tests/RunCMake/CommandLine/E_md5sum-mixed-stderr.txt b/Tests/RunCMake/CommandLine/E_md5sum-mixed-stderr.txt new file mode 100644 index 0000000..b6b84c3 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-mixed-stderr.txt @@ -0,0 +1,2 @@ +Error: . is a directory +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_md5sum-mixed-stdout.txt b/Tests/RunCMake/CommandLine/E_md5sum-mixed-stdout.txt new file mode 100644 index 0000000..18e49be --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-mixed-stdout.txt @@ -0,0 +1 @@ +275876e34cf609db118f3d84b799a790 ../dummy diff --git a/Tests/RunCMake/CommandLine/E_md5sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_md5sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_md5sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_md5sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_md5sum-result.txt b/Tests/RunCMake/CommandLine/E_md5sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_md5sum-stdout.txt b/Tests/RunCMake/CommandLine/E_md5sum-stdout.txt new file mode 100644 index 0000000..18e49be --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-stdout.txt @@ -0,0 +1 @@ +275876e34cf609db118f3d84b799a790 ../dummy diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index f94b10a..6f5298e 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -172,6 +172,13 @@ run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1) run_cmake_command(E_env-set ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-set.cmake) run_cmake_command(E_env-unset ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -E env --unset=TEST_ENV ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-unset.cmake) +run_cmake_command(E_md5sum-dir ${CMAKE_COMMAND} -E md5sum .) +run_cmake_command(E_md5sum-no-file ${CMAKE_COMMAND} -E md5sum nonexisting) +file(WRITE "${RunCMake_BINARY_DIR}/dummy" "dummy") +run_cmake_command(E_md5sum ${CMAKE_COMMAND} -E md5sum ../dummy) +run_cmake_command(E_md5sum-mixed ${CMAKE_COMMAND} -E md5sum . ../dummy nonexisting) +file(REMOVE "${RunCMake_BINARY_DIR}/dummy") + set(RunCMake_DEFAULT_stderr ".") run_cmake_command(E_sleep-no-args ${CMAKE_COMMAND} -E sleep) unset(RunCMake_DEFAULT_stderr) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5acbf08bff643ec6779464c840bfe2f02a4e65ae commit 5acbf08bff643ec6779464c840bfe2f02a4e65ae Author: Justin Berger AuthorDate: Sat Feb 25 15:06:34 2017 -0700 Commit: Brad King CommitDate: Thu Jun 8 15:00:12 2017 -0400 Tests: Teach Server test to forward exit code from server process diff --git a/Tests/Server/server-test.py b/Tests/Server/server-test.py index 62d9008..5621111 100644 --- a/Tests/Server/server-test.py +++ b/Tests/Server/server-test.py @@ -117,4 +117,4 @@ except: proc.terminate() raise -sys.exit(0) +sys.exit(proc.returncode) ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake.1.rst | 30 ++ Help/release/dev/cmake-command-mode-shasum.rst | 5 + Modules/Platform/GHS-MULTI-Initialize.cmake | 2 +- Source/CMakeLists.txt | 2 + Source/CPack/cmCPackDebGenerator.cxx | 9 +- Source/CTest/cmCTestSubmitHandler.cxx | 12 +- Source/cmConnection.cxx | 158 ++++++++ Source/cmConnection.h | 118 ++++++ Source/cmFileMonitor.cxx | 4 +- Source/cmGeneratorTarget.cxx | 11 + Source/cmGeneratorTarget.h | 5 + Source/cmPipeConnection.cxx | 80 ++++ Source/cmPipeConnection.h | 28 ++ Source/cmServer.cxx | 242 ++++++++++-- Source/cmServer.h | 98 ++++- Source/cmServerConnection.cxx | 391 ++++---------------- Source/cmServerConnection.h | 94 ++--- Source/cmServerProtocol.cxx | 6 +- Source/cmServerProtocol.h | 5 +- Source/cmSystemTools.cxx | 14 +- Source/cmSystemTools.h | 6 +- Source/cmcmd.cxx | 76 +++- Source/cmcmd.h | 3 + .../E_md5sum-dir-result.txt} | 0 Tests/RunCMake/CommandLine/E_md5sum-dir-stderr.txt | 1 + ...r-pipe-result.txt => E_md5sum-mixed-result.txt} | 0 .../RunCMake/CommandLine/E_md5sum-mixed-stderr.txt | 2 + .../RunCMake/CommandLine/E_md5sum-mixed-stdout.txt | 1 + .../E_md5sum-no-file-result.txt} | 0 .../CommandLine/E_md5sum-no-file-stderr.txt | 1 + .../E_md5sum-result.txt} | 0 Tests/RunCMake/CommandLine/E_md5sum-stdout.txt | 1 + .../E_sha1sum-dir-result.txt} | 0 .../RunCMake/CommandLine/E_sha1sum-dir-stderr.txt | 1 + .../E_sha1sum-no-file-result.txt} | 0 .../CommandLine/E_sha1sum-no-file-stderr.txt | 1 + .../E_sha1sum-result.txt} | 0 Tests/RunCMake/CommandLine/E_sha1sum-stdout.txt | 1 + .../E_sha224sum-dir-result.txt} | 0 .../CommandLine/E_sha224sum-dir-stderr.txt | 1 + .../E_sha224sum-no-file-result.txt} | 0 .../CommandLine/E_sha224sum-no-file-stderr.txt | 1 + .../E_sha224sum-result.txt} | 0 Tests/RunCMake/CommandLine/E_sha224sum-stdout.txt | 1 + .../E_sha256sum-dir-result.txt} | 0 .../CommandLine/E_sha256sum-dir-stderr.txt | 1 + .../E_sha256sum-no-file-result.txt} | 0 .../CommandLine/E_sha256sum-no-file-stderr.txt | 1 + .../E_sha256sum-result.txt} | 0 Tests/RunCMake/CommandLine/E_sha256sum-stdout.txt | 1 + .../E_sha384sum-dir-result.txt} | 0 .../CommandLine/E_sha384sum-dir-stderr.txt | 1 + .../E_sha384sum-no-file-result.txt} | 0 .../CommandLine/E_sha384sum-no-file-stderr.txt | 1 + .../E_sha384sum-result.txt} | 0 Tests/RunCMake/CommandLine/E_sha384sum-stdout.txt | 1 + .../E_sha512sum-dir-result.txt} | 0 .../CommandLine/E_sha512sum-dir-stderr.txt | 1 + .../E_sha512sum-no-file-result.txt} | 0 .../CommandLine/E_sha512sum-no-file-stderr.txt | 1 + .../E_sha512sum-result.txt} | 0 Tests/RunCMake/CommandLine/E_sha512sum-stdout.txt | 1 + Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 24 ++ .../OwnSources-result.txt} | 0 Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt | 5 + Tests/RunCMake/ObjectLibrary/OwnSources.cmake | 2 + Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake | 1 + Tests/Server/server-test.py | 2 +- Utilities/IWYU/mapping.imp | 1 + 69 files changed, 977 insertions(+), 478 deletions(-) create mode 100644 Help/release/dev/cmake-command-mode-shasum.rst create mode 100644 Source/cmConnection.cxx create mode 100644 Source/cmConnection.h create mode 100644 Source/cmPipeConnection.cxx create mode 100644 Source/cmPipeConnection.h copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_md5sum-dir-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_md5sum-dir-stderr.txt copy Tests/RunCMake/CommandLine/{E_server-pipe-result.txt => E_md5sum-mixed-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_md5sum-mixed-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/E_md5sum-mixed-stdout.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_md5sum-no-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_md5sum-no-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_md5sum-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_md5sum-stdout.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_sha1sum-dir-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha1sum-dir-stderr.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_sha1sum-no-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha1sum-no-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_sha1sum-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha1sum-stdout.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_sha224sum-dir-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha224sum-dir-stderr.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_sha224sum-no-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha224sum-no-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_sha224sum-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha224sum-stdout.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_sha256sum-dir-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha256sum-dir-stderr.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_sha256sum-no-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha256sum-no-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_sha256sum-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha256sum-stdout.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_sha384sum-dir-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha384sum-dir-stderr.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_sha384sum-no-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha384sum-no-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_sha384sum-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha384sum-stdout.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_sha512sum-dir-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha512sum-dir-stderr.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/E_sha512sum-no-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha512sum-no-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_sha512sum-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_sha512sum-stdout.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => ObjectLibrary/OwnSources-result.txt} (100%) create mode 100644 Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt create mode 100644 Tests/RunCMake/ObjectLibrary/OwnSources.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jul 18 11:25:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 18 Jul 2017 11:25:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-332-g92856a9 Message-ID: <20170718152504.0CEE0FADE2@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 92856a9d132dd648ed7717351b34b3a0081dcb79 (commit) via b97878643bbd5952acfbd99e752d2302406dd90e (commit) from fc4f3525133270ccc33ccda6acff6f85006ab457 (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=92856a9d132dd648ed7717351b34b3a0081dcb79 commit 92856a9d132dd648ed7717351b34b3a0081dcb79 Merge: fc4f352 b978786 Author: Brad King AuthorDate: Tue Jul 18 11:15:44 2017 -0400 Commit: Brad King CommitDate: Tue Jul 18 11:15:44 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jul 18 11:25:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 18 Jul 2017 11:25:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc6-14-gb978786 Message-ID: <20170718152506.DC31EFADFC@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 b97878643bbd5952acfbd99e752d2302406dd90e (commit) via d89e10cd58e5f9e21cbd466e56a1890e2811bee0 (commit) from f2b05a095ab2ab12d9d82daabdc31e46d36d4fcf (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/cmGeneratorTarget.cxx | 11 +++++++++++ Source/cmGeneratorTarget.h | 5 +++++ .../OwnSources-result.txt} | 0 Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt | 5 +++++ Tests/RunCMake/ObjectLibrary/OwnSources.cmake | 2 ++ Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake | 1 + 6 files changed, 24 insertions(+) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => ObjectLibrary/OwnSources-result.txt} (100%) create mode 100644 Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt create mode 100644 Tests/RunCMake/ObjectLibrary/OwnSources.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jul 18 12:45:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 18 Jul 2017 12:45:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-319-gb5a28eb Message-ID: <20170718164502.D1E7DFA132@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 b5a28eb9e7b997bf15c9b6fbaf7b61e053873c34 (commit) via f15cfd891d1e01247ed285320ae32b6c3182ac8f (commit) from 92856a9d132dd648ed7717351b34b3a0081dcb79 (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=b5a28eb9e7b997bf15c9b6fbaf7b61e053873c34 commit b5a28eb9e7b997bf15c9b6fbaf7b61e053873c34 Merge: 92856a9 f15cfd8 Author: Brad King AuthorDate: Tue Jul 18 12:41:05 2017 -0400 Commit: Brad King CommitDate: Tue Jul 18 12:41:05 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jul 18 12:45:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 18 Jul 2017 12:45:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0 Message-ID: <20170718164502.E240AFA188@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 f15cfd891d1e01247ed285320ae32b6c3182ac8f (commit) from b97878643bbd5952acfbd99e752d2302406dd90e (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 Tue Jul 18 12:45:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 18 Jul 2017 12:45:02 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.9.0, created. v3.9.0 Message-ID: <20170718164502.F15ABFA1D8@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.0 has been created at d1784dbf1fe2c78c52699de5e0847b96fd0da4dc (tag) tagging f15cfd891d1e01247ed285320ae32b6c3182ac8f (commit) replaces v3.9.0-rc6 tagged by Brad King on Tue Jul 18 12:41:19 2017 -0400 - Log ----------------------------------------------------------------- CMake 3.9.0 -----BEGIN PGP SIGNATURE----- iQJKBAABCAA0FiEExsJlMku+vcNQtRPQLSzvEDSSFoQFAlluOi8WHGJyYWQua2lu Z0BraXR3YXJlLmNvbQAKCRAtLO8QNJIWhJDPEACaMqxHbPdiB50jo2LamjdIeW16 sckMKEr2pfO+C57BZMMuevfLPDteaS0v/AgH08CwDhyNr0CnVp8M/jssPSoQYcon 6ENLbZdQLMk8YWhnaO87RvAYOedFFby37MUoFo9Xm6Ymm177ztw2v6X3FAyFJDhq uszwcaCWGO1S1FnzAnetDs9WBZZPG5PIEvWHcaWIjDAirTS87dRMB6D/L8d1bFiI KdUgFdo1p4kjpyfD76/yqoXdoQWkpQ3H5keqDVC9wMgjJqCMqrocS5nRHJtUqcE1 szHLEWcGQLeFKbfi5KyqaW2/D5XiMpca8s8VlJhga3Qyx5xWF8k5Sn0zsTix78a8 tHuXlgFb0DCFEFiIXKwM+dAzWOSIKpWCvZ/M7kWTAtbT8xw5cwodMuWFVSeifYSI fw4+tUxRvo44IPQmj4MSlcdiCFjLaJUHsbM+6lgzmli55mOhrAmxhhAnKMr2ue+0 TNGL7LsVKz0vZluDVtb1I9ORP6Hq0hTSSWIguv40Reux+h/jYmd3uDhCytNBnpHF EWvCdK7FUxcF2g64cVLFocBe0iATizUrpiTE8ZoUs23r/LzaDVE9kYDh1NH7E3Fs sMGumhTfWpLd9ZzOlv4Wynuv+bMxuVH/3bXh+TOdUxFnY7SEHJzorq0kDlXNQ7nX 06vT+xCsyn25g4qMJQ== =3FHM -----END PGP SIGNATURE----- Brad King (13): Android: Always add standard include directories last Merge branch 'android-system-include-last' into release-3.9 Merge branch 'ninja_cuda_export_compile_commands_support' into release-3.9 TestDriver: Fix -Wconversion warning Merge branch 'TestDriver-fix-Wconversion' into release-3.9 Features: Fix support for a list of language standard options Merge branch 'backport-fix-lang-std-option-list' into release-3.9 Merge branch 'xcode9support' into release-3.9 Help: Add a 3.9 release note about the VS GenerateDebugInformation update Merge branch 'doc-vs2015-update-relnote' into release-3.9 Diagnose object library self-reference Merge branch 'objlib-own-target-objs' into release-3.9 CMake 3.9.0 Harry Mallon (1): Xcode: Add "outputPaths" to custom command script build phase Robert Maynard (1): CUDA: CMAKE_EXPORT_COMPILE_COMMANDS now works with CUDA and Ninja ----------------------------------------------------------------------- hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jul 19 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 19 Jul 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-320-gce09110 Message-ID: <20170719040504.5CF27FAA3A@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 ce0911011eb75e244b0582b0373883b4a1954d3b (commit) from b5a28eb9e7b997bf15c9b6fbaf7b61e053873c34 (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=ce0911011eb75e244b0582b0373883b4a1954d3b commit ce0911011eb75e244b0582b0373883b4a1954d3b Author: Kitware Robot AuthorDate: Wed Jul 19 00:01:08 2017 -0400 Commit: Kitware Robot CommitDate: Wed Jul 19 00:01:08 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 5dfcd83..bc1de1d 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 20170718) +set(CMake_VERSION_PATCH 20170719) #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 Jul 20 00:05:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 20 Jul 2017 00:05:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-321-gf6a85bd Message-ID: <20170720040503.D6B5EFAE37@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 f6a85bdbb19c4d8124f683db17c634fa48a62c02 (commit) from ce0911011eb75e244b0582b0373883b4a1954d3b (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=f6a85bdbb19c4d8124f683db17c634fa48a62c02 commit f6a85bdbb19c4d8124f683db17c634fa48a62c02 Author: Kitware Robot AuthorDate: Thu Jul 20 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Thu Jul 20 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index bc1de1d..1f0d469 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 20170719) +set(CMake_VERSION_PATCH 20170720) #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 Jul 20 10:55:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 20 Jul 2017 10:55:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-325-ga8d8d2f Message-ID: <20170720145506.524FEFAF6A@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 a8d8d2fd05e65444e52adb5164a38f3c64b247d5 (commit) via e14ad2e376ee648cd0a9daf91c6a12ee6085f6e2 (commit) via dca5df16c51dd9426f415ed7943402036e0ad08c (commit) via 131c721f542cd6f8805967d847965510172a2c6b (commit) from f6a85bdbb19c4d8124f683db17c634fa48a62c02 (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=a8d8d2fd05e65444e52adb5164a38f3c64b247d5 commit a8d8d2fd05e65444e52adb5164a38f3c64b247d5 Merge: e14ad2e dca5df1 Author: Brad King AuthorDate: Thu Jul 20 14:52:15 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 20 10:52:20 2017 -0400 Merge topic 'autogen-generated-files' dca5df16 Autogen: Process GENERATED files. Add CMP0071. Acked-by: Kitware Robot Merge-request: !1061 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e14ad2e376ee648cd0a9daf91c6a12ee6085f6e2 commit e14ad2e376ee648cd0a9daf91c6a12ee6085f6e2 Merge: f6a85bd 131c721 Author: Brad King AuthorDate: Thu Jul 20 14:51:05 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jul 20 10:51:12 2017 -0400 Merge topic 'vs-lang-std' 131c721f MSVC: Add flags for C++ language standards Acked-by: Kitware Robot Merge-request: !1063 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dca5df16c51dd9426f415ed7943402036e0ad08c commit dca5df16c51dd9426f415ed7943402036e0ad08c Author: Sebastian Holtermann AuthorDate: Sun Jul 16 16:51:14 2017 +0200 Commit: Sebastian Holtermann CommitDate: Tue Jul 18 18:11:31 2017 +0200 Autogen: Process GENERATED files. Add CMP0071. This lets AUTOMOC and AUTOUIC process GENERATED files which used to be ignored before. A new policy CMP0071 ensures that the old behavior of ignoring GENERATED files is enabled when the CMake compatibility version CMAKE_MINIMUM_REQUIRED is < 3.10. Closes #16186 diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index eb9af27..c81ba59 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,6 +57,7 @@ Policies Introduced by CMake 3.10 .. toctree:: :maxdepth: 1 + CMP0071: Let AUTOMOC and AUTOUIC process GENERATED files. CMP0070: Define file(GENERATE) behavior for relative paths. Policies Introduced by CMake 3.9 diff --git a/Help/policy/CMP0071.rst b/Help/policy/CMP0071.rst new file mode 100644 index 0000000..61f14dc --- /dev/null +++ b/Help/policy/CMP0071.rst @@ -0,0 +1,34 @@ +CMP0071 +------- + +Let :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` process +:prop_sf:`GENERATED` files. + +CMake 3.10 and newer process regular *and* :prop_sf:`GENERATED` source files +in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`. +In CMake 3.9 and lower, only regular source files were processed in +:prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`, +:prop_sf:`GENERATED` source files were ignored. + +This policy affects how :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` process +source files that are :prop_sf:`GENERATED`. + +The ``OLD`` behavior for this policy is to *ignore* :prop_sf:`GENERATED` +source files in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`. + +The ``NEW`` behavior for this policy is to process :prop_sf:`GENERATED` +source files in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` just like regular +source files. + +.. note:: + To exclude source files from :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` + processing, the boolean source file properties + :prop_sf:`SKIP_AUTOMOC`, :prop_sf:`SKIP_AUTOUIC` and :prop_sf:`SKIP_AUTOGEN` + can be set accordingly. + +This policy was introduced in CMake version 3.10. CMake version +|release| warns when the policy is not set and uses ``OLD`` behavior. +Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` +explicitly. + +.. include:: DEPRECATED.txt diff --git a/Help/release/dev/autogen-generated-files.rst b/Help/release/dev/autogen-generated-files.rst new file mode 100644 index 0000000..da2fc4e --- /dev/null +++ b/Help/release/dev/autogen-generated-files.rst @@ -0,0 +1,8 @@ +autogen-generated-files +----------------------- + +* When using :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC`, + source files that are :prop_sf:`GENERATED` will be processed as well. + They were ignored by :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` + in earlier releases. + See policy :policy:`CMP0071`. diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 0a0178c..354011a 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -209,7 +209,9 @@ class cmMakefile; cmPolicies::WARN) \ SELECT(POLICY, CMP0070, \ "Define file(GENERATE) behavior for relative paths.", 3, 10, 0, \ - cmPolicies::WARN) + cmPolicies::WARN) \ + SELECT(POLICY, CMP0071, "Let AUTOMOC and AUTOUIC process GENERATED files.", \ + 3, 10, 0, cmPolicies::WARN) #define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1) #define CM_FOR_EACH_POLICY_ID(POLICY) \ diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index cecf165..92fa1bd 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -11,6 +11,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmPolicies.h" #include "cmSourceFile.h" #include "cmSourceGroup.h" #include "cmState.h" @@ -28,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -290,6 +292,8 @@ static void AcquireScanFiles(cmGeneratorTarget const* target, { const bool mocTarget = target->GetPropertyAsBool("AUTOMOC"); const bool uicTarget = target->GetPropertyAsBool("AUTOUIC"); + const cmPolicies::PolicyStatus CMP0071_status = + target->Makefile->GetPolicyStatus(cmPolicies::CMP0071); std::vector srcFiles; target->GetConfigCommonSourceFiles(srcFiles); @@ -298,24 +302,46 @@ static void AcquireScanFiles(cmGeneratorTarget const* target, cmSourceFile* sf = *fileIt; const cmSystemTools::FileFormat fileType = cmSystemTools::GetFileFormat(sf->GetExtension().c_str()); - if (!(fileType == cmSystemTools::CXX_FILE_FORMAT) && !(fileType == cmSystemTools::HEADER_FILE_FORMAT)) { continue; } - if (PropertyEnabled(sf, "GENERATED") && - !target->GetPropertyAsBool("__UNDOCUMENTED_AUTOGEN_GENERATED_FILES")) { - // FIXME: Add a policy whose NEW behavior allows generated files. - // The implementation already works. We disable it here to avoid - // changing behavior for existing projects that do not expect it. - continue; - } + const std::string absFile = cmsys::SystemTools::GetRealPath(sf->GetFullPath()); // Skip flags const bool skipAll = PropertyEnabled(sf, "SKIP_AUTOGEN"); const bool mocSkip = skipAll || PropertyEnabled(sf, "SKIP_AUTOMOC"); const bool uicSkip = skipAll || PropertyEnabled(sf, "SKIP_AUTOUIC"); + const bool accept = (mocTarget && !mocSkip) || (uicTarget && !uicSkip); + + // For GENERATED files check status of policy CMP0071 + if (accept && PropertyEnabled(sf, "GENERATED")) { + bool policyAccept = false; + switch (CMP0071_status) { + case cmPolicies::WARN: { + std::ostringstream ost; + ost << cmPolicies::GetPolicyWarning(cmPolicies::CMP0071) << "\n"; + ost << "AUTOMOC/AUTOUIC: Ignoring GENERATED source file:\n"; + ost << " " << cmQtAutoGeneratorCommon::Quoted(absFile) << "\n"; + target->Makefile->IssueMessage(cmake::AUTHOR_WARNING, ost.str()); + } + CM_FALLTHROUGH; + case cmPolicies::OLD: + // Ignore GENERATED file + break; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::NEW: + // Process GENERATED file + policyAccept = true; + break; + } + if (!policyAccept) { + continue; + } + } + // Add file name to skip lists. // Do this even when the file is not added to the sources/headers lists // because the file name may be extracted from an other file when @@ -327,7 +353,7 @@ static void AcquireScanFiles(cmGeneratorTarget const* target, uicSkipList.push_back(absFile); } - if ((mocTarget && !mocSkip) || (uicTarget && !uicSkip)) { + if (accept) { // Add file name to sources or headers list switch (fileType) { case cmSystemTools::CXX_FILE_FORMAT: diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 89d2b80..9393f1e 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.7) - +cmake_minimum_required(VERSION 3.9) +cmake_policy(SET CMP0071 NEW) project(QtAutogen) # Tell find_package(Qt5) where to find Qt. @@ -304,11 +304,16 @@ add_subdirectory(mocDepends) # -- Test # Tests various include moc patterns -add_subdirectory(mocIncludeStrict) +if(ALLOW_WRAP_CPP) + add_subdirectory(mocIncludeStrict) + add_subdirectory(mocIncludeRelaxed) +endif() # -- Test -# Tests various include moc patterns -add_subdirectory(mocIncludeRelaxed) +# Tests policy 0071 +if(ALLOW_WRAP_CPP) + add_subdirectory(mocCMP0071) +endif() # -- Test # Tests Q_PLUGIN_METADATA json file change detection diff --git a/Tests/QtAutogen/complex/CMakeLists.txt b/Tests/QtAutogen/complex/CMakeLists.txt index d48f6cc..2043ccf 100644 --- a/Tests/QtAutogen/complex/CMakeLists.txt +++ b/Tests/QtAutogen/complex/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.7) +cmake_minimum_required(VERSION 3.9) # -- Test: AUTOMOC AUTORCC AUTOUIC add_definitions(-DFOO -DSomeDefine="Barx") diff --git a/Tests/QtAutogen/mocCMP0071/CMakeLists.txt b/Tests/QtAutogen/mocCMP0071/CMakeLists.txt new file mode 100644 index 0000000..003fa08 --- /dev/null +++ b/Tests/QtAutogen/mocCMP0071/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.9) +project(mocCMP0071 CXX) +add_subdirectory(OLD) +add_subdirectory(NEW) diff --git a/Tests/QtAutogen/mocCMP0071/NEW/CMakeLists.txt b/Tests/QtAutogen/mocCMP0071/NEW/CMakeLists.txt new file mode 100644 index 0000000..0237afc --- /dev/null +++ b/Tests/QtAutogen/mocCMP0071/NEW/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.9) +cmake_policy(SET CMP0071 NEW) + +# *Generate* files +set(CSD ${CMAKE_CURRENT_SOURCE_DIR}) +set(CBD ${CMAKE_CURRENT_BINARY_DIR}) +add_custom_command( + OUTPUT ${CBD}/Obj_p.h ${CBD}/Obj.hpp ${CBD}/Obj.cpp ${CBD}/main.cpp + COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/../Obj_p.h ${CBD}/Obj_p.h + COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/../Obj.hpp ${CBD}/Obj.hpp + COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/../Obj.cpp ${CBD}/Obj.cpp + COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/../main.cpp ${CBD}/main.cpp) + +add_executable(mocCMP0071New ${CBD}/Obj.cpp ${CBD}/main.cpp) +target_link_libraries(mocCMP0071New ${QT_LIBRARIES}) +set_target_properties(mocCMP0071New PROPERTIES AUTOMOC ON) diff --git a/Tests/QtAutogen/mocCMP0071/OLD/CMakeLists.txt b/Tests/QtAutogen/mocCMP0071/OLD/CMakeLists.txt new file mode 100644 index 0000000..5699433 --- /dev/null +++ b/Tests/QtAutogen/mocCMP0071/OLD/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.9) +cmake_policy(SET CMP0071 OLD) + +# *Generate* files +set(CSD ${CMAKE_CURRENT_SOURCE_DIR}) +set(CBD ${CMAKE_CURRENT_BINARY_DIR}) +add_custom_command( + OUTPUT ${CBD}/Obj_p.h ${CBD}/Obj.hpp ${CBD}/Obj.cpp ${CBD}/main.cpp + COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/../Obj_p.h ${CBD}/Obj_p.h + COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/../Obj.hpp ${CBD}/Obj.hpp + COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/../Obj.cpp ${CBD}/Obj.cpp + COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/../main.cpp ${CBD}/main.cpp) + +# Generate moc files externally +qtx_wrap_cpp(mocCMP0071OldMoc ${CBD}/Obj.hpp ${CBD}/Obj_p.h) +add_executable(mocCMP0071Old ${CBD}/Obj.cpp ${CBD}/main.cpp ${mocCMP0071OldMoc}) +target_link_libraries(mocCMP0071Old ${QT_LIBRARIES}) +set_target_properties(mocCMP0071Old PROPERTIES AUTOMOC ON) diff --git a/Tests/QtAutogen/mocCMP0071/Obj.cpp b/Tests/QtAutogen/mocCMP0071/Obj.cpp new file mode 100644 index 0000000..1ae50ed --- /dev/null +++ b/Tests/QtAutogen/mocCMP0071/Obj.cpp @@ -0,0 +1,20 @@ +#include "Obj.hpp" +#include "Obj_p.h" + +ObjPrivate::ObjPrivate() +{ +} + +ObjPrivate::~ObjPrivate() +{ +} + +Obj::Obj() + : d(new ObjPrivate) +{ +} + +Obj::~Obj() +{ + delete d; +} diff --git a/Tests/QtAutogen/mocCMP0071/Obj.hpp b/Tests/QtAutogen/mocCMP0071/Obj.hpp new file mode 100644 index 0000000..f064e47 --- /dev/null +++ b/Tests/QtAutogen/mocCMP0071/Obj.hpp @@ -0,0 +1,19 @@ +#ifndef OBJ_HPP +#define OBJ_HPP + +#include + +// Object source comes without any _moc/.moc includes +class ObjPrivate; +class Obj : public QObject +{ + Q_OBJECT +public: + Obj(); + ~Obj(); + +private: + ObjPrivate* const d; +}; + +#endif diff --git a/Tests/QtAutogen/mocCMP0071/Obj_p.h b/Tests/QtAutogen/mocCMP0071/Obj_p.h new file mode 100644 index 0000000..cb1e5df --- /dev/null +++ b/Tests/QtAutogen/mocCMP0071/Obj_p.h @@ -0,0 +1,14 @@ +#ifndef OBJ_P_HPP +#define OBJ_P_HPP + +#include + +class ObjPrivate : public QObject +{ + Q_OBJECT +public: + ObjPrivate(); + ~ObjPrivate(); +}; + +#endif diff --git a/Tests/QtAutogen/mocCMP0071/main.cpp b/Tests/QtAutogen/mocCMP0071/main.cpp new file mode 100644 index 0000000..3887840 --- /dev/null +++ b/Tests/QtAutogen/mocCMP0071/main.cpp @@ -0,0 +1,7 @@ +#include "Obj.hpp" + +int main(int argv, char** args) +{ + Obj obj; + return 0; +} diff --git a/Tests/QtAutogen/mocDepends/CMakeLists.txt b/Tests/QtAutogen/mocDepends/CMakeLists.txt index a67dcfe..cd5adf5 100644 --- a/Tests/QtAutogen/mocDepends/CMakeLists.txt +++ b/Tests/QtAutogen/mocDepends/CMakeLists.txt @@ -1,5 +1,6 @@ -cmake_minimum_required(VERSION 3.7) -project(mocDepends) +cmake_minimum_required(VERSION 3.9) +cmake_policy(SET CMP0071 NEW) +project(mocDepends CXX) if (QT_TEST_VERSION STREQUAL 4) find_package(Qt4 REQUIRED) @@ -28,7 +29,6 @@ add_executable(mocDepends1 test1.cpp ) target_link_libraries(mocDepends1 ${QT_CORE_TARGET}) set_target_properties(mocDepends1 PROPERTIES AUTOMOC TRUE) -set_property(TARGET mocDepends1 PROPERTY __UNDOCUMENTED_AUTOGEN_GENERATED_FILES 1) # -- Test 2 using generated library # This tests the dependency of AUTOMOC of mocDepends2 to the @@ -44,4 +44,3 @@ add_library(SimpleLib STATIC simpleLib.hpp simpleLib.cpp) add_executable(mocDepends2 test2.cpp ) target_link_libraries(mocDepends2 SimpleLib ${QT_CORE_TARGET}) set_target_properties(mocDepends2 PROPERTIES AUTOMOC TRUE) -set_property(TARGET mocDepends2 PROPERTY __UNDOCUMENTED_AUTOGEN_GENERATED_FILES 1) diff --git a/Tests/QtAutogen/mocPlugin/CMakeLists.txt b/Tests/QtAutogen/mocPlugin/CMakeLists.txt index f80aa29..9b224fb 100644 --- a/Tests/QtAutogen/mocPlugin/CMakeLists.txt +++ b/Tests/QtAutogen/mocPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.9) project(mocPlugin CXX) set(CMAKE_AUTOMOC_DEPEND_FILTERS diff --git a/Tests/QtAutogen/mocRerun/CMakeLists.txt b/Tests/QtAutogen/mocRerun/CMakeLists.txt index 14b077b..7380bdd 100644 --- a/Tests/QtAutogen/mocRerun/CMakeLists.txt +++ b/Tests/QtAutogen/mocRerun/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.7) +cmake_minimum_required(VERSION 3.9) +cmake_policy(SET CMP0071 NEW) project(mocRerun CXX) if (QT_TEST_VERSION STREQUAL 4) @@ -27,7 +28,6 @@ add_executable(mocRerun ${CMAKE_CURRENT_BINARY_DIR}/main.cpp res1.qrc ) -set_property(TARGET mocRerun PROPERTY __UNDOCUMENTED_AUTOGEN_GENERATED_FILES 1) target_include_directories(mocRerun PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(mocRerun ${QT_CORE_TARGET}) # Write target name to text file diff --git a/Tests/QtAutogen/rccDepends/CMakeLists.txt b/Tests/QtAutogen/rccDepends/CMakeLists.txt index 878ae5d..edc0ac3 100644 --- a/Tests/QtAutogen/rccDepends/CMakeLists.txt +++ b/Tests/QtAutogen/rccDepends/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.7) -project(rccDepends) +cmake_minimum_required(VERSION 3.9) +project(rccDepends CXX) set(CMAKE_AUTORCC ON) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=131c721f542cd6f8805967d847965510172a2c6b commit 131c721f542cd6f8805967d847965510172a2c6b Author: Brad King AuthorDate: Fri Jul 14 09:17:05 2017 -0400 Commit: Brad King CommitDate: Mon Jul 17 10:48:43 2017 -0400 MSVC: Add flags for C++ language standards Visual Studio 2015 Update 3 introduced the notion of language standard levels to MSVC. The language standard level is defined in `_MSVC_LANG` instead of `__cplusplus`. It also added support for the `-std:c++14` and `-std:c++latest` flags, although the compiler defaults to its C++14 mode anyway. Visual Studio 2017 Update 3 will introduce support for the `-std:c++17` flag. Fixes: #16482 diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 9aa096d..6572bb3 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -27,12 +27,18 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@ @CMAKE_CXX_COMPILER_ID_ERROR_FOR_TEST@ +#if defined(_MSC_VER) && defined(_MSVC_LANG) +#define CXX_STD _MSVC_LANG +#else +#define CXX_STD __cplusplus +#endif + const char* info_language_dialect_default = "INFO" ":" "dialect_default[" -#if __cplusplus > 201402L +#if CXX_STD > 201402L "17" -#elif __cplusplus >= 201402L +#elif CXX_STD >= 201402L "14" -#elif __cplusplus >= 201103L +#elif CXX_STD >= 201103L "11" #else "98" diff --git a/Modules/Compiler/MSVC-CXX.cmake b/Modules/Compiler/MSVC-CXX.cmake index 9371301..f478b85 100644 --- a/Modules/Compiler/MSVC-CXX.cmake +++ b/Modules/Compiler/MSVC-CXX.cmake @@ -3,7 +3,25 @@ include(Compiler/CMakeCommonCompilerMacros) -if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) +if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.10.25017) + # VS 2015 Update 3 and above support language standard level flags, + # with the default and minimum level being C++14. + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "") + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "") + set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std:c++14") + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std:c++14") + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.11.25505) + set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std:c++17") + set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std:c++17") + else() + set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std:c++latest") + set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std:c++latest") + endif() + + __compiler_check_default_language_standard(CXX 19.0 14) +elseif (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) # MSVC has no specific options to set language standards, but set them as # empty strings anyways so the feature test infrastructure can at least check # to see if they are defined. diff --git a/Tests/CompileFeatures/default_dialect.cpp b/Tests/CompileFeatures/default_dialect.cpp index 9b65b42..0de1125 100644 --- a/Tests/CompileFeatures/default_dialect.cpp +++ b/Tests/CompileFeatures/default_dialect.cpp @@ -2,25 +2,30 @@ template struct Outputter; +#if defined(_MSC_VER) && defined(_MSVC_LANG) +#define CXX_STD _MSVC_LANG +#else +#define CXX_STD __cplusplus +#endif + #if DEFAULT_CXX17 -#if __cplusplus <= 201402L -Outputter<__cplusplus> o; +#if CXX_STD <= 201402L +Outputter o; #endif #elif DEFAULT_CXX14 -#if __cplusplus != 201402L -Outputter<__cplusplus> o; +#if CXX_STD != 201402L +Outputter o; #endif #elif DEFAULT_CXX11 -#if __cplusplus != 201103L -Outputter<__cplusplus> o; +#if CXX_STD != 201103L +Outputter o; #endif #else #if !DEFAULT_CXX98 #error Buildsystem error #endif -#if __cplusplus != 199711L && __cplusplus != 1 && \ - !defined(__GXX_EXPERIMENTAL_CXX0X__) -Outputter<__cplusplus> o; +#if CXX_STD != 199711L && CXX_STD != 1 && !defined(__GXX_EXPERIMENTAL_CXX0X__) +Outputter o; #endif #endif ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-policies.7.rst | 1 + Help/policy/CMP0071.rst | 34 +++++++++++++++ Help/release/dev/autogen-generated-files.rst | 8 ++++ Modules/CMakeCXXCompilerId.cpp.in | 12 ++++-- Modules/Compiler/MSVC-CXX.cmake | 20 ++++++++- Source/cmPolicies.h | 4 +- Source/cmQtAutoGeneratorInitializer.cxx | 44 ++++++++++++++++---- Tests/CompileFeatures/default_dialect.cpp | 23 ++++++---- Tests/QtAutogen/CMakeLists.txt | 15 ++++--- Tests/QtAutogen/complex/CMakeLists.txt | 2 +- Tests/QtAutogen/mocCMP0071/CMakeLists.txt | 4 ++ Tests/QtAutogen/mocCMP0071/NEW/CMakeLists.txt | 16 +++++++ Tests/QtAutogen/mocCMP0071/OLD/CMakeLists.txt | 18 ++++++++ Tests/QtAutogen/mocCMP0071/Obj.cpp | 20 +++++++++ Tests/QtAutogen/mocCMP0071/Obj.hpp | 19 +++++++++ Tests/QtAutogen/mocCMP0071/Obj_p.h | 14 +++++++ Tests/QtAutogen/{mocPlugin => mocCMP0071}/main.cpp | 3 +- Tests/QtAutogen/mocDepends/CMakeLists.txt | 7 ++-- Tests/QtAutogen/mocPlugin/CMakeLists.txt | 2 +- Tests/QtAutogen/mocRerun/CMakeLists.txt | 4 +- Tests/QtAutogen/rccDepends/CMakeLists.txt | 4 +- 21 files changed, 235 insertions(+), 39 deletions(-) create mode 100644 Help/policy/CMP0071.rst create mode 100644 Help/release/dev/autogen-generated-files.rst create mode 100644 Tests/QtAutogen/mocCMP0071/CMakeLists.txt create mode 100644 Tests/QtAutogen/mocCMP0071/NEW/CMakeLists.txt create mode 100644 Tests/QtAutogen/mocCMP0071/OLD/CMakeLists.txt create mode 100644 Tests/QtAutogen/mocCMP0071/Obj.cpp create mode 100644 Tests/QtAutogen/mocCMP0071/Obj.hpp create mode 100644 Tests/QtAutogen/mocCMP0071/Obj_p.h copy Tests/QtAutogen/{mocPlugin => mocCMP0071}/main.cpp (62%) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jul 21 00:05:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 21 Jul 2017 00:05:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-326-g6f08ce1 Message-ID: <20170721040510.32A5FFAEEC@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 6f08ce1a4f6b91a9911dde282f49f53f133c0593 (commit) from a8d8d2fd05e65444e52adb5164a38f3c64b247d5 (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=6f08ce1a4f6b91a9911dde282f49f53f133c0593 commit 6f08ce1a4f6b91a9911dde282f49f53f133c0593 Author: Kitware Robot AuthorDate: Fri Jul 21 00:01:05 2017 -0400 Commit: Kitware Robot CommitDate: Fri Jul 21 00:01:05 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1f0d469..33c363b 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 20170720) +set(CMake_VERSION_PATCH 20170721) #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 Jul 21 10:15:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 21 Jul 2017 10:15:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-332-g5e3b29f Message-ID: <20170721141506.C5015FA034@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 5e3b29f03af342f301c301abddf7a9af868ce211 (commit) via 7b70023e9323166c252cae1c7335a03b858343b4 (commit) via 43383fa9226a07e3bc592fa0d1351f400c99e435 (commit) via 29a5cf7c42f2c229ec09ab2fb5666751b3b7e15d (commit) via 614921b4c916038fcb7bc8c899a7d1d8b772b143 (commit) via 8842a0272b541c0e641c8132070828c3d579d1ea (commit) from 6f08ce1a4f6b91a9911dde282f49f53f133c0593 (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=5e3b29f03af342f301c301abddf7a9af868ce211 commit 5e3b29f03af342f301c301abddf7a9af868ce211 Merge: 7b70023 29a5cf7 Author: Brad King AuthorDate: Fri Jul 21 14:14:13 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jul 21 10:14:19 2017 -0400 Merge topic 'cpack-stgz-help' 29a5cf7c CPack: Add missing options to installer shell script help Acked-by: Kitware Robot Merge-request: !1068 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b70023e9323166c252cae1c7335a03b858343b4 commit 7b70023e9323166c252cae1c7335a03b858343b4 Merge: 43383fa 614921b Author: Brad King AuthorDate: Fri Jul 21 14:13:29 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jul 21 10:13:36 2017 -0400 Merge topic 'add_test_processors_prop_to_cdash' 614921b4 Add the test property PROCESSORS to the CDash xml as a NamedMeasurement. Acked-by: Kitware Robot Merge-request: !1066 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43383fa9226a07e3bc592fa0d1351f400c99e435 commit 43383fa9226a07e3bc592fa0d1351f400c99e435 Merge: 6f08ce1 8842a02 Author: Brad King AuthorDate: Fri Jul 21 14:12:24 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jul 21 10:12:33 2017 -0400 Merge topic 'docsExternalProject' 8842a027 ExternalProject: Improve documentation Acked-by: Kitware Robot Merge-request: !1037 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29a5cf7c42f2c229ec09ab2fb5666751b3b7e15d commit 29a5cf7c42f2c229ec09ab2fb5666751b3b7e15d Author: Francois Budin AuthorDate: Wed Jul 19 14:13:23 2017 -0400 Commit: Brad King CommitDate: Thu Jul 20 11:06:39 2017 -0400 CPack: Add missing options to installer shell script help `--version` and `--skip-license` were not in the list of available options when running script with `--help` option. diff --git a/Modules/CPack.STGZ_Header.sh.in b/Modules/CPack.STGZ_Header.sh.in index c615851..70f63d2 100755 --- a/Modules/CPack.STGZ_Header.sh.in +++ b/Modules/CPack.STGZ_Header.sh.in @@ -7,9 +7,11 @@ cpack_usage() Usage: $0 [options] Options: [defaults in brackets after descriptions] --help print this message + --version print cmake installer version --prefix=dir directory in which to install --include-subdir include the @CPACK_PACKAGE_FILE_NAME@ subdirectory --exclude-subdir exclude the @CPACK_PACKAGE_FILE_NAME@ subdirectory + --skip-license accept license EOF exit 1 } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=614921b4c916038fcb7bc8c899a7d1d8b772b143 commit 614921b4c916038fcb7bc8c899a7d1d8b772b143 Author: Bill Hoffman AuthorDate: Tue Jul 18 12:18:11 2017 -0400 Commit: Bill Hoffman CommitDate: Tue Jul 18 12:18:11 2017 -0400 Add the test property PROCESSORS to the CDash xml as a NamedMeasurement. This commit forwards the test property PROCESSORS to CDash in the xml produced by ctest. This is to allow CDash to know how much processor time was allocated to a test. diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 8797204..ef0fac8 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1441,6 +1441,12 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) } xml.StartElement("NamedMeasurement"); + xml.Attribute("type", "numeric/double"); + xml.Attribute("name", "Processors"); + xml.Element("Value", result->Properties->Processors); + xml.EndElement(); // NamedMeasurement + + xml.StartElement("NamedMeasurement"); xml.Attribute("type", "text/string"); xml.Attribute("name", "Completion Status"); xml.Element("Value", result->CompletionStatus); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8842a0272b541c0e641c8132070828c3d579d1ea commit 8842a0272b541c0e641c8132070828c3d579d1ea Author: Craig Scott AuthorDate: Sun Jul 9 20:40:34 2017 +1000 Commit: Craig Scott CommitDate: Tue Jul 18 08:39:39 2017 +1000 ExternalProject: Improve documentation - Added clearer structure by grouping the options into logical sections. - Expanded the details for many of the options. - Added Examples section to show how to use the various commands. - Specifically highlighted that the contents of SOURCE_DIR may be lost if a download method is also provided. - Updated argument-matching regex to be more robust and account for the varying leading spaces before keywords in the docs. - Updated tests to account for slightly changed error messages. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 2495736..d92eb5f 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -5,413 +5,860 @@ ExternalProject --------------- -Create custom targets to build projects in external trees +.. only:: html + + .. contents:: + +External Project Definition +^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. command:: ExternalProject_Add - The ``ExternalProject_Add`` function creates a custom target to drive + The ``ExternalProject_Add()`` function creates a custom target to drive download, update/patch, configure, build, install and test steps of an external project:: - ExternalProject_Add( [