From kwrobot at kitware.com Fri Aug 1 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 1 Aug 2014 00:01:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1596-gb0f6d3e Message-ID: <20140801040110.120174B3DC@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 b0f6d3eb9969dc60cbbf8d151207852f88b62380 (commit) from b48211d4261840136e750d3d82f195ad48b17a8f (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0f6d3eb9969dc60cbbf8d151207852f88b62380 commit b0f6d3eb9969dc60cbbf8d151207852f88b62380 Author: Kitware Robot AuthorDate: Fri Aug 1 00:01:08 2014 -0400 Commit: Kitware Robot CommitDate: Fri Aug 1 00:01:08 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ea892aa..8070a43 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 0) -set(CMake_VERSION_PATCH 20140731) +set(CMake_VERSION_PATCH 20140801) #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 Sat Aug 2 00:01:12 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 2 Aug 2014 00:01:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1597-ged4b52b Message-ID: <20140802040112.49C034B9EF@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 ed4b52b025601b9aef3ae26c11bf36e169d84a24 (commit) from b0f6d3eb9969dc60cbbf8d151207852f88b62380 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed4b52b025601b9aef3ae26c11bf36e169d84a24 commit ed4b52b025601b9aef3ae26c11bf36e169d84a24 Author: Kitware Robot AuthorDate: Sat Aug 2 00:01:09 2014 -0400 Commit: Kitware Robot CommitDate: Sat Aug 2 00:01:09 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 8070a43..25f135a 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 0) -set(CMake_VERSION_PATCH 20140801) +set(CMake_VERSION_PATCH 20140802) #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 Aug 3 00:01:14 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 3 Aug 2014 00:01:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1598-g6e1c35f Message-ID: <20140803040114.E804D4CB64@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 6e1c35f25c264c170ff26f0784a07a7240b0f949 (commit) from ed4b52b025601b9aef3ae26c11bf36e169d84a24 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e1c35f25c264c170ff26f0784a07a7240b0f949 commit 6e1c35f25c264c170ff26f0784a07a7240b0f949 Author: Kitware Robot AuthorDate: Sun Aug 3 00:01:13 2014 -0400 Commit: Kitware Robot CommitDate: Sun Aug 3 00:01:13 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 25f135a..1dbbc8b 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 0) -set(CMake_VERSION_PATCH 20140802) +set(CMake_VERSION_PATCH 20140803) #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 Aug 4 00:01:08 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 4 Aug 2014 00:01:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1599-g1238b36 Message-ID: <20140804040108.532D54FF74@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 1238b3656ad95a6cc23a08e1846099ca773a5e1f (commit) from 6e1c35f25c264c170ff26f0784a07a7240b0f949 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1238b3656ad95a6cc23a08e1846099ca773a5e1f commit 1238b3656ad95a6cc23a08e1846099ca773a5e1f Author: Kitware Robot AuthorDate: Mon Aug 4 00:01:06 2014 -0400 Commit: Kitware Robot CommitDate: Mon Aug 4 00:01:06 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1dbbc8b..2952b93 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 0) -set(CMake_VERSION_PATCH 20140803) +set(CMake_VERSION_PATCH 20140804) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 09:49:21 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 09:49:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4698-gd6c600c Message-ID: <20140804134921.805194FE35@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, next has been updated via d6c600ce367dac81b82da04bd17abbbfc726df36 (commit) via d4557188bb4719c81eeeefedf72bc765d7173793 (commit) via b0f6d3eb9969dc60cbbf8d151207852f88b62380 (commit) from 0fbb6c75b64851e51edbd1695120f826cfde20f1 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d6c600ce367dac81b82da04bd17abbbfc726df36 commit d6c600ce367dac81b82da04bd17abbbfc726df36 Merge: 0fbb6c7 d455718 Author: Brad King AuthorDate: Mon Aug 4 09:49:20 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 09:49:20 2014 -0400 Merge topic 'readme-link-to-issue-tracker' into next d4557188 README: Add a section explaining how to report bugs b0f6d3eb CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4557188bb4719c81eeeefedf72bc765d7173793 commit d4557188bb4719c81eeeefedf72bc765d7173793 Author: Brad King AuthorDate: Mon Aug 4 09:41:37 2014 -0400 Commit: Brad King CommitDate: Mon Aug 4 09:49:49 2014 -0400 README: Add a section explaining how to report bugs Suggested-by: Petr Bena diff --git a/README.rst b/README.rst index e91b209..e8524f8 100644 --- a/README.rst +++ b/README.rst @@ -75,6 +75,22 @@ For instructions how to do this, see documentation on `Running CMake`_. .. _`Running CMake`: http://www.cmake.org/cmake/help/runningcmake.html +Reporting Bugs +============== + +If you have found a bug: + +1. If you have a patch, please read the `CONTRIBUTING.rst`_ document. + +2. Otherwise, please join the the `CMake Users List`_ and ask about + the expected and observed behaviors to determine if it is really + a bug. + +3. Finally, if the issue is not resolved by the above steps, open + an entry in the `CMake Issue Tracker`_. + +.. _`CMake Issue Tracker`: http://www.cmake.org/Bug + Contributing ============ ----------------------------------------------------------------------- Summary of changes: README.rst | 16 ++++++++++++++++ Source/CMakeVersion.cmake | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:02:18 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:02:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1602-g628f02b Message-ID: <20140804140218.1EE3650395@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 628f02ba352f7b62ef108e356300845ae81fd6a2 (commit) via ccec6df85f604429a905d664d8a6e8c9e0d835e1 (commit) via 9f7e27fc3a2d2b1863147f235a2980de019ee7c9 (commit) from 1238b3656ad95a6cc23a08e1846099ca773a5e1f (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=628f02ba352f7b62ef108e356300845ae81fd6a2 commit 628f02ba352f7b62ef108e356300845ae81fd6a2 Merge: 1238b36 ccec6df Author: Brad King AuthorDate: Mon Aug 4 10:02:16 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:02:16 2014 -0400 Merge topic 'link-line-dedup' ccec6df8 Help: Add notes for topic 'link-line-dedup' 9f7e27fc De-duplicate shared library targets in generated link lines ----------------------------------------------------------------------- Summary of changes: Help/release/dev/link-line-dedup.rst | 5 +++++ Source/cmComputeLinkDepends.cxx | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 Help/release/dev/link-line-dedup.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:02:19 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:02:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1604-ge0ff6de Message-ID: <20140804140219.B551F50397@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 e0ff6def7180c4792019159d84fa52ad707021f3 (commit) via 5570d8d3f3ba3922b2e86cabe54a0913b39c3f41 (commit) from 628f02ba352f7b62ef108e356300845ae81fd6a2 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0ff6def7180c4792019159d84fa52ad707021f3 commit e0ff6def7180c4792019159d84fa52ad707021f3 Merge: 628f02b 5570d8d Author: Brad King AuthorDate: Mon Aug 4 10:02:18 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:02:18 2014 -0400 Merge topic 'check-flag-for-fujitsu' 5570d8d3 Check*CompilerFlag: Add pattern for Fujitsu compiler (#15051) ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCheckCompilerFlagCommonPatterns.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:02:21 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:02:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1606-g506ed92 Message-ID: <20140804140221.5EA0C5037E@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 506ed92c68ebc5494bd65d9c10eb8123a3bd3321 (commit) via 4f2fcce4b9f897dfa98cb82f3876cd43ab80f69b (commit) from e0ff6def7180c4792019159d84fa52ad707021f3 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=506ed92c68ebc5494bd65d9c10eb8123a3bd3321 commit 506ed92c68ebc5494bd65d9c10eb8123a3bd3321 Merge: e0ff6de 4f2fcce Author: Brad King AuthorDate: Mon Aug 4 10:02:20 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:02:20 2014 -0400 Merge topic 'fix-check-module-DEFINED-tests' 4f2fcce4 Check*: Allow result variables to contain regex special characters (#14923) ----------------------------------------------------------------------- Summary of changes: Modules/CheckCSourceCompiles.cmake | 2 +- Modules/CheckCSourceRuns.cmake | 2 +- Modules/CheckCXXSourceCompiles.cmake | 2 +- Modules/CheckCXXSourceRuns.cmake | 2 +- Modules/CheckFunctionExists.cmake | 2 +- Modules/CheckIncludeFile.cmake | 2 +- Modules/CheckIncludeFileCXX.cmake | 2 +- Modules/CheckIncludeFiles.cmake | 2 +- Modules/CheckLibraryExists.cmake | 2 +- Modules/CheckSymbolExists.cmake | 2 +- Modules/CheckVariableExists.cmake | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:02:23 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:02:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1609-g9d9333b Message-ID: <20140804140223.09F27503A4@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 9d9333b26ac18943cd310900dfc88a17d98667e1 (commit) via 58f3d96d178fe42958cd9eb3cb08df96bbd80200 (commit) via efb45007f9bdd86efdbe27df75ece1043b3a075e (commit) from 506ed92c68ebc5494bd65d9c10eb8123a3bd3321 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d9333b26ac18943cd310900dfc88a17d98667e1 commit 9d9333b26ac18943cd310900dfc88a17d98667e1 Merge: 506ed92 58f3d96 Author: Brad King AuthorDate: Mon Aug 4 10:02:22 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:02:22 2014 -0400 Merge topic 'cpack-options-sort' 58f3d96d CPack: Sort packaging options lexicographically efb45007 CPack: Expand mark_as_advanced arguments to one-per-line ----------------------------------------------------------------------- Summary of changes: Modules/CPack.cmake | 67 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 25 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:02:24 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:02:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1611-g4e22fcf Message-ID: <20140804140224.A8B80503D0@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 4e22fcf215cdb37c9e440f8825c5945589de338b (commit) via 66edd06587bfaafc2cb1f24286925750454ec9cc (commit) from 9d9333b26ac18943cd310900dfc88a17d98667e1 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e22fcf215cdb37c9e440f8825c5945589de338b commit 4e22fcf215cdb37c9e440f8825c5945589de338b Merge: 9d9333b 66edd06 Author: Brad King AuthorDate: Mon Aug 4 10:02:23 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:02:23 2014 -0400 Merge topic 'vs-vcxproj-missing-newline' 66edd065 VS: Add missing newline after .vcxproj user prop import line ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:02:26 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:02:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1613-g7338d4c Message-ID: <20140804140226.646FF4FE5B@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 7338d4c21177c632f445d7e560d9509fdf233350 (commit) via fe161dc30daf4d329e74d0586f47780b4c127ed4 (commit) from 4e22fcf215cdb37c9e440f8825c5945589de338b (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7338d4c21177c632f445d7e560d9509fdf233350 commit 7338d4c21177c632f445d7e560d9509fdf233350 Merge: 4e22fcf fe161dc Author: Brad King AuthorDate: Mon Aug 4 10:02:25 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:02:25 2014 -0400 Merge topic 'vs-refactor-sln-deploy' fe161dc3 VS: Refactor logic deciding to add "Deploy" to the .sln file ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio8Generator.cxx | 13 ++++++++++--- Source/cmGlobalVisualStudio8Generator.h | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:02:28 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:02:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1615-gba62b34 Message-ID: <20140804140228.06A1D503A6@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 ba62b3495bc35898f3e43324688bcf847c9fd343 (commit) via 0a5fe2793a385034d3a676d2dc4cef3122e9bbea (commit) from 7338d4c21177c632f445d7e560d9509fdf233350 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba62b3495bc35898f3e43324688bcf847c9fd343 commit ba62b3495bc35898f3e43324688bcf847c9fd343 Merge: 7338d4c 0a5fe27 Author: Brad King AuthorDate: Mon Aug 4 10:02:27 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:02:27 2014 -0400 Merge topic 'vs-internal-system-apis' 0a5fe279 VS: Add internal API to get system name and version ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio10Generator.h | 6 ++++++ 1 file changed, 6 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:02:29 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:02:29 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1617-gba60ff9 Message-ID: <20140804140231.647F050394@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 ba60ff99ed2ea35f8b8c24bc566b6f60d51fce53 (commit) via 30983ebec1f242888560cff86e8789b3f02be056 (commit) from ba62b3495bc35898f3e43324688bcf847c9fd343 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba60ff99ed2ea35f8b8c24bc566b6f60d51fce53 commit ba60ff99ed2ea35f8b8c24bc566b6f60d51fce53 Merge: ba62b34 30983eb Author: Brad King AuthorDate: Mon Aug 4 10:02:28 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:02:28 2014 -0400 Merge topic 'cmGlobalGenerator-Build-output-ref' 30983ebe cmGlobalGenerator: Take Build output argument by reference ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestBuildAndTestHandler.cxx | 2 +- Source/cmCoreTryCompile.cxx | 2 +- Source/cmGlobalGenerator.cxx | 63 ++++++++------------------- Source/cmGlobalGenerator.h | 4 +- Source/cmMakefile.cxx | 2 +- Source/cmMakefile.h | 2 +- Source/cmake.cxx | 2 +- 7 files changed, 26 insertions(+), 51 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:02:50 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:02:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4710-g8d53830 Message-ID: <20140804140250.8146F50397@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, next has been updated via 8d53830cef29277af80ebdf666349e386f22e0c9 (commit) via ba60ff99ed2ea35f8b8c24bc566b6f60d51fce53 (commit) via ba62b3495bc35898f3e43324688bcf847c9fd343 (commit) via 7338d4c21177c632f445d7e560d9509fdf233350 (commit) via 4e22fcf215cdb37c9e440f8825c5945589de338b (commit) via 9d9333b26ac18943cd310900dfc88a17d98667e1 (commit) via 506ed92c68ebc5494bd65d9c10eb8123a3bd3321 (commit) via e0ff6def7180c4792019159d84fa52ad707021f3 (commit) via 628f02ba352f7b62ef108e356300845ae81fd6a2 (commit) via 1238b3656ad95a6cc23a08e1846099ca773a5e1f (commit) via 6e1c35f25c264c170ff26f0784a07a7240b0f949 (commit) via ed4b52b025601b9aef3ae26c11bf36e169d84a24 (commit) from d6c600ce367dac81b82da04bd17abbbfc726df36 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d53830cef29277af80ebdf666349e386f22e0c9 commit 8d53830cef29277af80ebdf666349e386f22e0c9 Merge: d6c600c ba60ff9 Author: Brad King AuthorDate: Mon Aug 4 10:04:09 2014 -0400 Commit: Brad King CommitDate: Mon Aug 4 10:04:09 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:05:21 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:05:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4712-ged9d665 Message-ID: <20140804140521.400F35040F@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, next has been updated via ed9d665de5d2c949b607e1669ce59a985b9b3f8a (commit) via 3bfa6de9fb6260c632b5e6eec718eb91938cb1ce (commit) from 8d53830cef29277af80ebdf666349e386f22e0c9 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed9d665de5d2c949b607e1669ce59a985b9b3f8a commit ed9d665de5d2c949b607e1669ce59a985b9b3f8a Merge: 8d53830 3bfa6de Author: Brad King AuthorDate: Mon Aug 4 10:05:20 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:05:20 2014 -0400 Merge topic 'CMakePackageConfigHelpers_build_tree' into next 3bfa6de9 Revert topic 'CMakePackageConfigHelpers_build_tree' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3bfa6de9fb6260c632b5e6eec718eb91938cb1ce commit 3bfa6de9fb6260c632b5e6eec718eb91938cb1ce Author: Brad King AuthorDate: Mon Aug 4 10:05:41 2014 -0400 Commit: Brad King CommitDate: Mon Aug 4 10:05:41 2014 -0400 Revert topic 'CMakePackageConfigHelpers_build_tree' It will be replaced by an INSTALL_PREFIX option topic instead. diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 8ec9c69..473bbe5 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -2,36 +2,29 @@ # CMakePackageConfigHelpers # ------------------------- # -# Helpers functions for creating config files that can be included by other -# projects to find and use a package. +# CONFIGURE_PACKAGE_CONFIG_FILE(), WRITE_BASIC_PACKAGE_VERSION_FILE() # -# Adds the :command:`configure_package_config_file()` and -# :command:`write_basic_package_version_file()` commands. # -# Generating a Package Configuration File -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# .. command:: configure_package_config_file +# :: # -# Create a config file for a project:: -# -# configure_package_config_file( INSTALL_DESTINATION +# CONFIGURE_PACKAGE_CONFIG_FILE( INSTALL_DESTINATION # [PATH_VARS ... ] # [NO_SET_AND_CHECK_MACRO] -# [NO_CHECK_REQUIRED_COMPONENTS_MACRO] -# [BUILD_TREE]) +# [NO_CHECK_REQUIRED_COMPONENTS_MACRO]) +# # # -# ``configure_package_config_file()`` should be used instead of the plain -# :command:`configure_file()` command when creating the ``Config.cmake`` -# or ``-config.cmake`` file for installing a project or library. It helps -# making the resulting package relocatable by avoiding hardcoded paths in the -# installed ``Config.cmake`` file. +# CONFIGURE_PACKAGE_CONFIG_FILE() should be used instead of the plain +# configure_file() command when creating the Config.cmake or +# -config.cmake file for installing a project or library. It +# helps making the resulting package relocatable by avoiding hardcoded +# paths in the installed Config.cmake file. # -# In a ``FooConfig.cmake`` file there may be code like this to make the install -# destinations know to the using project: +# In a FooConfig.cmake file there may be code like this to make the +# install destinations know to the using project: # -# .. code-block:: cmake +# :: # # set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" ) # set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" ) @@ -39,132 +32,121 @@ # ...logic to determine installedPrefix from the own location... # set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" ) # -# All 4 options shown above are not sufficient, since the first 3 hardcode the -# absolute directory locations, and the 4th case works only if the logic to -# determine the ``installedPrefix`` is correct, and if ``CONFIG_INSTALL_DIR`` -# contains a relative path, which in general cannot be guaranteed. This has the -# effect that the resulting ``FooConfig.cmake`` file would work poorly under -# Windows and OSX, where users are used to choose the install location of a -# binary package at install time, independent from how -# :variable:`CMAKE_INSTALL_PREFIX` was set at build/cmake time. +# All 4 options shown above are not sufficient, since the first 3 +# hardcode the absolute directory locations, and the 4th case works only +# if the logic to determine the installedPrefix is correct, and if +# CONFIG_INSTALL_DIR contains a relative path, which in general cannot +# be guaranteed. This has the effect that the resulting FooConfig.cmake +# file would work poorly under Windows and OSX, where users are used to +# choose the install location of a binary package at install time, +# independent from how CMAKE_INSTALL_PREFIX was set at build/cmake time. +# +# Using CONFIGURE_PACKAGE_CONFIG_FILE() helps. If used correctly, it +# makes the resulting FooConfig.cmake file relocatable. Usage: # -# Using ``configure_package_config_file`` helps. If used correctly, it makes -# the resulting ``FooConfig.cmake`` file relocatable. Usage: +# :: # -# 1. write a ``FooConfig.cmake.in`` file as you are used to -# 2. insert a line containing only the string ``@PACKAGE_INIT@`` -# 3. instead of ``set(FOO_DIR "@SOME_INSTALL_DIR@")``, use -# ``set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")`` (this must be after the -# ``@PACKAGE_INIT@`` line) -# 4. instead of using the normal :command:`configure_file()`, use -# ``configure_package_config_file()`` +# 1. write a FooConfig.cmake.in file as you are used to +# 2. insert a line containing only the string "@PACKAGE_INIT@" +# 3. instead of set(FOO_DIR "@SOME_INSTALL_DIR@"), use set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@") +# (this must be after the @PACKAGE_INIT@ line) +# 4. instead of using the normal configure_file(), use CONFIGURE_PACKAGE_CONFIG_FILE() # # # -# The ```` and ```` arguments are the input and output file, the -# same way as in :command:`configure_file()`. +# The and arguments are the input and output file, the +# same way as in configure_file(). # -# The ```` given to ``INSTALL_DESTINATION`` must be the destination where -# the ``FooConfig.cmake`` file will be installed to. This can either be a +# The given to INSTALL_DESTINATION must be the destination where +# the FooConfig.cmake file will be installed to. This can either be a # relative or absolute path, both work. # -# The variables ```` to ```` given as ``PATH_VARS`` are the -# variables which contain install destinations. For each of them the macro will -# create a helper variable ``PACKAGE_``. These helper variables must be -# used in the ``FooConfig.cmake.in`` file for setting the installed location. -# They are calculated by ``configure_package_config_file`` so that they are -# always relative to the installed location of the package. This works both for -# relative and also for absolute locations. For absolute locations it works -# only if the absolute location is a subdirectory of -# :variable:`CMAKE_INSTALL_PREFIX`. -# -# When generating a FooConfig.cmake file to use your package from the build -# tree the option ``BUILD_TREE`` should be passed, in order to consider -# paths that are not absolute as relative to the -# :cmake:variable:`CMAKE_BINARY_DIR` directory instead of relative to the -# :cmake:variable:`CMAKE_INSTALL_PREFIX` directory. -# -# By default ``configure_package_config_file`` also generates two helper macros, -# ``set_and_check()`` and ``check_required_components()`` into the -# ``FooConfig.cmake`` file. -# -# ``set_and_check()`` should be used instead of the normal ``set()`` command for -# setting directories and file locations. Additionally to setting the variable -# it also checks that the referenced file or directory actually exists and fails? -# with a ``FATAL_ERROR`` otherwise. This makes sure that the created -# ``FooConfig.cmake`` file does not contain wrong references. -# When using the ``NO_SET_AND_CHECK_MACRO``, this macro is not generated -# into the ``FooConfig.cmake`` file. -# -# ``check_required_components()`` should be called at the end of -# the ``FooConfig.cmake`` file if the package supports components. This macro -# checks whether all requested, non-optional components have been found, and if -# this is not the case, sets the ``Foo_FOUND`` variable to ``FALSE``, so that -# the package is considered to be not found. It does that by testing the -# ``Foo__FOUND`` variables for all requested required components. -# When using the ``NO_CHECK_REQUIRED_COMPONENTS_MACRO`` option, this macro is -# not generated into the ``FooConfig.cmake`` file. +# The variables to given as PATH_VARS are the variables +# which contain install destinations. For each of them the macro will +# create a helper variable PACKAGE_. These helper variables +# must be used in the FooConfig.cmake.in file for setting the installed +# location. They are calculated by CONFIGURE_PACKAGE_CONFIG_FILE() so +# that they are always relative to the installed location of the +# package. This works both for relative and also for absolute +# locations. For absolute locations it works only if the absolute +# location is a subdirectory of CMAKE_INSTALL_PREFIX. +# +# By default configure_package_config_file() also generates two helper +# macros, set_and_check() and check_required_components() into the +# FooConfig.cmake file. +# +# set_and_check() should be used instead of the normal set() command for +# setting directories and file locations. Additionally to setting the +# variable it also checks that the referenced file or directory actually +# exists and fails with a FATAL_ERROR otherwise. This makes sure that +# the created FooConfig.cmake file does not contain wrong references. +# When using the NO_SET_AND_CHECK_MACRO, this macro is not generated +# into the FooConfig.cmake file. +# +# check_required_components() should be called at the end +# of the FooConfig.cmake file if the package supports components. This +# macro checks whether all requested, non-optional components have been +# found, and if this is not the case, sets the Foo_FOUND variable to +# FALSE, so that the package is considered to be not found. It does +# that by testing the Foo__FOUND variables for all requested +# required components. When using the NO_CHECK_REQUIRED_COMPONENTS +# option, this macro is not generated into the FooConfig.cmake file. # # For an example see below the documentation for -# :command:`write_basic_package_version_file()`. -# -# Generating a Package Version File -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -# -# .. command:: write_basic_package_version_file -# -# Create a version file for a project:: -# -# write_basic_package_version_file( -# [VERSION ] -# COMPATIBILITY ) -# -# -# Writes a file for use as ``ConfigVersion.cmake`` file to -# ````. See the documentation of :command:`find_package()` for -# details on this. -# -# ```` is the output filename, it should be in the build tree. -# ```` is the version number of the project to be installed. -# -# If no ``VERSION`` is given, the :variable:`PROJECT_VERSION` variable is used. -# If this hasn't been set, it errors out. -# -# The ``COMPATIBILITY`` mode ``AnyNewerVersion`` means that the installed -# package version will be considered compatible if it is newer or exactly the -# same as the requested version. This mode should be used for packages which -# are fully backward compatible, also across major versions. -# If ``SameMajorVersion`` is used instead, then the behaviour differs from -# ``AnyNewerVersion`` in that the major version number must be the same as -# requested, e.g. version 2.0 will not be considered compatible if 1.0 is -# requested. This mode should be used for packages which guarantee backward -# compatibility within the same major version. -# If ``ExactVersion`` is used, then the package is only considered compatible if -# the requested version matches exactly its own version number (not considering -# the tweak version). For example, version 1.2.3 of a package is only -# considered compatible to requested version 1.2.3. This mode is for packages -# without compatibility guarantees. -# If your project has more elaborated version matching rules, you will need to -# write your own custom ``ConfigVersion.cmake`` file instead of using this -# macro. -# -# Internally, this macro executes :command:`configure_file()` to create the -# resulting version file. Depending on the ``COMPATIBLITY``, either the file -# ``BasicConfigVersion-SameMajorVersion.cmake.in`` or -# ``BasicConfigVersion-AnyNewerVersion.cmake.in`` is used. Please note that +# WRITE_BASIC_PACKAGE_VERSION_FILE(). +# +# +# +# :: +# +# WRITE_BASIC_PACKAGE_VERSION_FILE( filename [VERSION major.minor.patch] COMPATIBILITY (AnyNewerVersion|SameMajorVersion|ExactVersion) ) +# +# +# +# Writes a file for use as ConfigVersion.cmake file to +# . See the documentation of find_package() for details on +# this. +# +# :: +# +# filename is the output filename, it should be in the build tree. +# major.minor.patch is the version number of the project to be installed +# +# If no ``VERSION`` is given, the :variable:`PROJECT_VERSION` variable +# is used. If this hasn't been set, it errors out. +# +# The COMPATIBILITY mode AnyNewerVersion means that the installed +# package version will be considered compatible if it is newer or +# exactly the same as the requested version. This mode should be used +# for packages which are fully backward compatible, also across major +# versions. If SameMajorVersion is used instead, then the behaviour +# differs from AnyNewerVersion in that the major version number must be +# the same as requested, e.g. version 2.0 will not be considered +# compatible if 1.0 is requested. This mode should be used for packages +# which guarantee backward compatibility within the same major version. +# If ExactVersion is used, then the package is only considered +# compatible if the requested version matches exactly its own version +# number (not considering the tweak version). For example, version +# 1.2.3 of a package is only considered compatible to requested version +# 1.2.3. This mode is for packages without compatibility guarantees. +# If your project has more elaborated version matching rules, you will +# need to write your own custom ConfigVersion.cmake file instead of +# using this macro. +# +# Internally, this macro executes configure_file() to create the +# resulting version file. Depending on the COMPATIBLITY, either the +# file BasicConfigVersion-SameMajorVersion.cmake.in or +# BasicConfigVersion-AnyNewerVersion.cmake.in is used. Please note that # these two files are internal to CMake and you should not call -# :command:`configure_file()` on them yourself, but they can be used as starting -# point to create more sophisticted custom ``ConfigVersion.cmake`` files. +# configure_file() on them yourself, but they can be used as starting +# point to create more sophisticted custom ConfigVersion.cmake files. # -# Example Generating Package Files -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# Example using both :command:`configure_package_config_file` and -# ``write_basic_package_version_file()``: # -# ``CMakeLists.txt``: +# Example using both configure_package_config_file() and +# write_basic_package_version_file(): CMakeLists.txt: # -# .. code-block:: cmake +# :: # # set(INCLUDE_INSTALL_DIR include/ ... CACHE ) # set(LIB_INSTALL_DIR lib/ ... CACHE ) @@ -180,9 +162,11 @@ # install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake # DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake ) # -# ``FooConfig.cmake.in``: # -# .. code-block:: cmake +# +# With a FooConfig.cmake.in: +# +# :: # # set(FOO_VERSION x.y.z) # ... @@ -191,6 +175,10 @@ # set_and_check(FOO_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") # set_and_check(FOO_SYSCONFIG_DIR "@PACKAGE_SYSCONFIG_INSTALL_DIR@") # +# +# +# :: +# # check_required_components(Foo) @@ -215,8 +203,10 @@ macro(WRITE_BASIC_PACKAGE_VERSION_FILE) write_basic_config_version_file(${ARGN}) endmacro() +set(cfpch_dir ${CMAKE_CURRENT_LIST_DIR}) + function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) - set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO BUILD_TREE) + set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO) set(oneValueArgs INSTALL_DESTINATION ) set(multiValueArgs PATH_VARS ) @@ -232,31 +222,19 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}") set(absInstallDir "${CCF_INSTALL_DESTINATION}") - elseif(CCF_BUILD_TREE) - set(absInstallDir "${CMAKE_BINARY_DIR}/${CCF_INSTALL_DESTINATION}") else() set(absInstallDir "${CMAKE_INSTALL_PREFIX}/${CCF_INSTALL_DESTINATION}") endif() - - if(CCF_BUILD_TREE) - file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_BINARY_DIR}" ) - else() - file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_INSTALL_PREFIX}" ) - endif() + file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_INSTALL_PREFIX}" ) foreach(var ${CCF_PATH_VARS}) if(NOT DEFINED ${var}) message(FATAL_ERROR "Variable ${var} does not exist") else() if(IS_ABSOLUTE "${${var}}") - if(CCF_BUILD_TREE) - string(REPLACE "${CMAKE_BINARY_DIR}" "\${PACKAGE_PREFIX_DIR}" - PACKAGE_${var} "${${var}}") - else() - string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}" - PACKAGE_${var} "${${var}}") - endif() + string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}" + PACKAGE_${var} "${${var}}") else() set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}") endif() diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index 5a81b44..092bf20 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -374,7 +374,6 @@ endif() include(CMakePackageConfigHelpers) -# Generate a config file ready to be installed. set(INCLUDE_INSTALL_DIR include ) set(SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/" ) set(CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" ) @@ -408,43 +407,6 @@ if(Relocatable_FOUND) message(SEND_ERROR "Relocatable_FOUND set to TRUE !") endif() -# Generate a config file for the build tree. -set(INCLUDE_INSTALL_DIR include ) -set(SHARE_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/share/" ) -set(CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" ) - -configure_package_config_file(RelocatableConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/RelocatableConfig.cmake" - INSTALL_DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" - PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR - BUILD_TREE - ) - -set(Relocatable_FIND_COMPONENTS AComp BComp CComp) -set(Relocatable_FIND_REQUIRED_BComp 1) -include("${CMAKE_CURRENT_BINARY_DIR}/RelocatableConfig.cmake") - -if(NOT "${RELOC_INCLUDE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/include") - message(SEND_ERROR "RELOC_INCLUDE_DIR set by configure_package_config_file() is set to \"${RELOC_INCLUDE_DIR}\" (expected \"${CMAKE_CURRENT_BINARY_DIR}/include\")") -endif() - -if(NOT "${RELOC_SHARE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/share/") - message(SEND_ERROR "RELOC_SHARE_DIR set by configure_package_config_file() is set to \"${RELOC_SHARE_DIR}\" (expected \"${CMAKE_CURRENT_BINARY_DIR}/share/\")") -endif() - -if(NOT "${RELOC_BUILD_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") - message(SEND_ERROR "RELOC_BUILD_DIR set by configure_package_config_file() is set to \"${RELOC_BUILD_DIR}\" (expected \"${CMAKE_CURRENT_BINARY_DIR}\")") -endif() - -if(NOT DEFINED Relocatable_FOUND) - message(SEND_ERROR "Relocatable_FOUND not defined !") -endif() - -if(Relocatable_FOUND) - message(SEND_ERROR "Relocatable_FOUND set to TRUE !") -endif() - - - #----------------------------------------------------------------------------- # Test write_basic_config_version_file(). ----------------------------------------------------------------------- Summary of changes: Modules/CMakePackageConfigHelpers.cmake | 276 ++++++++++++++----------------- Tests/FindPackageTest/CMakeLists.txt | 38 ----- 2 files changed, 127 insertions(+), 187 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:07:37 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:07:37 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4717-g1a1f652 Message-ID: <20140804140737.5C2445044C@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, next has been updated via 1a1f6526f308d87a22071539acda3a6da49d9e82 (commit) via 65d23e58b813dad360f3315121d3581b4f1123dd (commit) via 609ba044308bff8e8c2714c843c7eb84b9d554ac (commit) via 477babe0fc83f3cdfc58fc940c061f4d254810b2 (commit) via 64eca30dc4d584fb6acf8f6486c016eed50eb7ae (commit) from ed9d665de5d2c949b607e1669ce59a985b9b3f8a (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a1f6526f308d87a22071539acda3a6da49d9e82 commit 1a1f6526f308d87a22071539acda3a6da49d9e82 Merge: ed9d665 65d23e5 Author: Brad King AuthorDate: Mon Aug 4 10:07:36 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:07:36 2014 -0400 Merge topic 'CMakePackageConfigHelpers-INSTALL_PREFIX' into next 65d23e58 CMakePackageConfigHelpers: Add unit tests for INSTALL_PREFIX option 609ba044 CMakePackageConfigHelpers: Add INSTALL_PREFIX option 477babe0 CMakePackageConfigHelpers: restructure documentation and document commands 64eca30d CMakePackageConfigHelpers: Remove unused variable http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65d23e58b813dad360f3315121d3581b4f1123dd commit 65d23e58b813dad360f3315121d3581b4f1123dd Author: Daniele E. Domenichelli AuthorDate: Tue Jul 15 19:51:16 2014 +0200 Commit: Brad King CommitDate: Mon Aug 4 10:07:25 2014 -0400 CMakePackageConfigHelpers: Add unit tests for INSTALL_PREFIX option diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index 092bf20..f311fb9 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -374,6 +374,7 @@ endif() include(CMakePackageConfigHelpers) +# Generate a config file ready to be installed. set(INCLUDE_INSTALL_DIR include ) set(SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/" ) set(CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" ) @@ -407,6 +408,43 @@ if(Relocatable_FOUND) message(SEND_ERROR "Relocatable_FOUND set to TRUE !") endif() +# Generate a config file for the build tree. +set(INCLUDE_INSTALL_DIR include ) +set(SHARE_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/share/" ) +set(CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" ) + +configure_package_config_file(RelocatableConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/RelocatableConfig.cmake" + INSTALL_DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" + PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR + INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}" + ) + +set(Relocatable_FIND_COMPONENTS AComp BComp CComp) +set(Relocatable_FIND_REQUIRED_BComp 1) +include("${CMAKE_CURRENT_BINARY_DIR}/RelocatableConfig.cmake") + +if(NOT "${RELOC_INCLUDE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/include") + message(SEND_ERROR "RELOC_INCLUDE_DIR set by configure_package_config_file() is set to \"${RELOC_INCLUDE_DIR}\" (expected \"${CMAKE_CURRENT_BINARY_DIR}/include\")") +endif() + +if(NOT "${RELOC_SHARE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/share/") + message(SEND_ERROR "RELOC_SHARE_DIR set by configure_package_config_file() is set to \"${RELOC_SHARE_DIR}\" (expected \"${CMAKE_CURRENT_BINARY_DIR}/share/\")") +endif() + +if(NOT "${RELOC_BUILD_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") + message(SEND_ERROR "RELOC_BUILD_DIR set by configure_package_config_file() is set to \"${RELOC_BUILD_DIR}\" (expected \"${CMAKE_CURRENT_BINARY_DIR}\")") +endif() + +if(NOT DEFINED Relocatable_FOUND) + message(SEND_ERROR "Relocatable_FOUND not defined !") +endif() + +if(Relocatable_FOUND) + message(SEND_ERROR "Relocatable_FOUND set to TRUE !") +endif() + + + #----------------------------------------------------------------------------- # Test write_basic_config_version_file(). http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=609ba044308bff8e8c2714c843c7eb84b9d554ac commit 609ba044308bff8e8c2714c843c7eb84b9d554ac Author: Daniele E. Domenichelli AuthorDate: Tue Jul 15 19:10:54 2014 +0200 Commit: Brad King CommitDate: Mon Aug 4 10:07:17 2014 -0400 CMakePackageConfigHelpers: Add INSTALL_PREFIX option This option instructs configure_package_config_file to consider paths that are not absolute as relative to the INSTALL_PREFIX directory instead of relative to the CMAKE_INSTALL_PREFIX directory. If this argument is not passed, the default behaviour is to use the CMAKE_INSTALL_PREFIX variable. The new signature is therefore: configure_package_config_file( INSTALL_DESTINATION [PATH_VARS ... ] [NO_SET_AND_CHECK_MACRO] [NO_CHECK_REQUIRED_COMPONENTS_MACRO] [INSTALL_PREFIX ]) diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 712ced2..6534583 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -18,7 +18,8 @@ # configure_package_config_file( INSTALL_DESTINATION # [PATH_VARS ... ] # [NO_SET_AND_CHECK_MACRO] -# [NO_CHECK_REQUIRED_COMPONENTS_MACRO]) +# [NO_CHECK_REQUIRED_COMPONENTS_MACRO] +# [INSTALL_PREFIX ]) # # # ``configure_package_config_file()`` should be used instead of the plain @@ -64,8 +65,8 @@ # same way as in :command:`configure_file()`. # # The ```` given to ``INSTALL_DESTINATION`` must be the destination where -# the ``FooConfig.cmake`` file will be installed to. This can either be a -# relative or absolute path, both work. +# the ``FooConfig.cmake`` file will be installed to. This path can either be +# absolute, or relative to the ``INSTALL_PREFIX`` path. # # The variables ```` to ```` given as ``PATH_VARS`` are the # variables which contain install destinations. For each of them the macro will @@ -74,8 +75,14 @@ # They are calculated by ``configure_package_config_file`` so that they are # always relative to the installed location of the package. This works both for # relative and also for absolute locations. For absolute locations it works -# only if the absolute location is a subdirectory of -# :variable:`CMAKE_INSTALL_PREFIX`. +# only if the absolute location is a subdirectory of ``INSTALL_PREFIX``. +# +# If the ``INSTALL_PREFIX`` argument is passed, this is used as base path to +# calculate all the relative paths. If this argument is not passed, the +# :variable:`CMAKE_INSTALL_PREFIX` variable will be used instead. The default +# value is good when generating a FooConfig.cmake file to use your package from +# the install tree. When generating a FooConfig.cmake file to use your package +# from the build tree this option should be used. # # By default ``configure_package_config_file`` also generates two helper macros, # ``set_and_check()`` and ``check_required_components()`` into the @@ -210,7 +217,7 @@ endmacro() function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO) - set(oneValueArgs INSTALL_DESTINATION ) + set(oneValueArgs INSTALL_DESTINATION INSTALL_PREFIX) set(multiValueArgs PATH_VARS ) cmake_parse_arguments(CCF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -223,20 +230,26 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) message(FATAL_ERROR "No INSTALL_DESTINATION given to CONFIGURE_PACKAGE_CONFIG_FILE()") endif() + if(DEFINED CCF_INSTALL_PREFIX) + set(installPrefix "${CCF_INSTALL_PREFIX}") + else() + set(installPrefix "${CMAKE_INSTALL_PREFIX}") + endif() + if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}") set(absInstallDir "${CCF_INSTALL_DESTINATION}") else() - set(absInstallDir "${CMAKE_INSTALL_PREFIX}/${CCF_INSTALL_DESTINATION}") + set(absInstallDir "${installPrefix}/${CCF_INSTALL_DESTINATION}") endif() - file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_INSTALL_PREFIX}" ) + file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${installPrefix}" ) foreach(var ${CCF_PATH_VARS}) if(NOT DEFINED ${var}) message(FATAL_ERROR "Variable ${var} does not exist") else() if(IS_ABSOLUTE "${${var}}") - string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}" + string(REPLACE "${installPrefix}" "\${PACKAGE_PREFIX_DIR}" PACKAGE_${var} "${${var}}") else() set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}") @@ -262,7 +275,7 @@ get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE get_filename_component(_realCurr \"\${CMAKE_CURRENT_LIST_DIR}\" REALPATH) get_filename_component(_realOrig \"${absInstallDir}\" REALPATH) if(_realCurr STREQUAL _realOrig) - set(PACKAGE_PREFIX_DIR \"${CMAKE_INSTALL_PREFIX}\") + set(PACKAGE_PREFIX_DIR \"${installPrefix}\") endif() unset(_realOrig) unset(_realCurr) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=477babe0fc83f3cdfc58fc940c061f4d254810b2 commit 477babe0fc83f3cdfc58fc940c061f4d254810b2 Author: Daniele E. Domenichelli AuthorDate: Tue Jul 15 19:10:28 2014 +0200 Commit: Brad King CommitDate: Mon Aug 4 10:07:17 2014 -0400 CMakePackageConfigHelpers: restructure documentation and document commands diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 318382e..712ced2 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -2,29 +2,35 @@ # CMakePackageConfigHelpers # ------------------------- # -# CONFIGURE_PACKAGE_CONFIG_FILE(), WRITE_BASIC_PACKAGE_VERSION_FILE() +# Helpers functions for creating config files that can be included by other +# projects to find and use a package. # +# Adds the :command:`configure_package_config_file()` and +# :command:`write_basic_package_version_file()` commands. # +# Generating a Package Configuration File +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# :: +# .. command:: configure_package_config_file # -# CONFIGURE_PACKAGE_CONFIG_FILE( INSTALL_DESTINATION +# Create a config file for a project:: +# +# configure_package_config_file( INSTALL_DESTINATION # [PATH_VARS ... ] # [NO_SET_AND_CHECK_MACRO] # [NO_CHECK_REQUIRED_COMPONENTS_MACRO]) # # +# ``configure_package_config_file()`` should be used instead of the plain +# :command:`configure_file()` command when creating the ``Config.cmake`` +# or ``-config.cmake`` file for installing a project or library. It helps +# making the resulting package relocatable by avoiding hardcoded paths in the +# installed ``Config.cmake`` file. # -# CONFIGURE_PACKAGE_CONFIG_FILE() should be used instead of the plain -# configure_file() command when creating the Config.cmake or -# -config.cmake file for installing a project or library. It -# helps making the resulting package relocatable by avoiding hardcoded -# paths in the installed Config.cmake file. -# -# In a FooConfig.cmake file there may be code like this to make the -# install destinations know to the using project: +# In a ``FooConfig.cmake`` file there may be code like this to make the install +# destinations know to the using project: # -# :: +# .. code-block:: cmake # # set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" ) # set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" ) @@ -32,121 +38,126 @@ # ...logic to determine installedPrefix from the own location... # set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" ) # -# All 4 options shown above are not sufficient, since the first 3 -# hardcode the absolute directory locations, and the 4th case works only -# if the logic to determine the installedPrefix is correct, and if -# CONFIG_INSTALL_DIR contains a relative path, which in general cannot -# be guaranteed. This has the effect that the resulting FooConfig.cmake -# file would work poorly under Windows and OSX, where users are used to -# choose the install location of a binary package at install time, -# independent from how CMAKE_INSTALL_PREFIX was set at build/cmake time. -# -# Using CONFIGURE_PACKAGE_CONFIG_FILE() helps. If used correctly, it -# makes the resulting FooConfig.cmake file relocatable. Usage: +# All 4 options shown above are not sufficient, since the first 3 hardcode the +# absolute directory locations, and the 4th case works only if the logic to +# determine the ``installedPrefix`` is correct, and if ``CONFIG_INSTALL_DIR`` +# contains a relative path, which in general cannot be guaranteed. This has the +# effect that the resulting ``FooConfig.cmake`` file would work poorly under +# Windows and OSX, where users are used to choose the install location of a +# binary package at install time, independent from how +# :variable:`CMAKE_INSTALL_PREFIX` was set at build/cmake time. # -# :: +# Using ``configure_package_config_file`` helps. If used correctly, it makes +# the resulting ``FooConfig.cmake`` file relocatable. Usage: # -# 1. write a FooConfig.cmake.in file as you are used to -# 2. insert a line containing only the string "@PACKAGE_INIT@" -# 3. instead of set(FOO_DIR "@SOME_INSTALL_DIR@"), use set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@") -# (this must be after the @PACKAGE_INIT@ line) -# 4. instead of using the normal configure_file(), use CONFIGURE_PACKAGE_CONFIG_FILE() +# 1. write a ``FooConfig.cmake.in`` file as you are used to +# 2. insert a line containing only the string ``@PACKAGE_INIT@`` +# 3. instead of ``set(FOO_DIR "@SOME_INSTALL_DIR@")``, use +# ``set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")`` (this must be after the +# ``@PACKAGE_INIT@`` line) +# 4. instead of using the normal :command:`configure_file()`, use +# ``configure_package_config_file()`` # # # -# The and arguments are the input and output file, the -# same way as in configure_file(). +# The ```` and ```` arguments are the input and output file, the +# same way as in :command:`configure_file()`. # -# The given to INSTALL_DESTINATION must be the destination where -# the FooConfig.cmake file will be installed to. This can either be a +# The ```` given to ``INSTALL_DESTINATION`` must be the destination where +# the ``FooConfig.cmake`` file will be installed to. This can either be a # relative or absolute path, both work. # -# The variables to given as PATH_VARS are the variables -# which contain install destinations. For each of them the macro will -# create a helper variable PACKAGE_. These helper variables -# must be used in the FooConfig.cmake.in file for setting the installed -# location. They are calculated by CONFIGURE_PACKAGE_CONFIG_FILE() so -# that they are always relative to the installed location of the -# package. This works both for relative and also for absolute -# locations. For absolute locations it works only if the absolute -# location is a subdirectory of CMAKE_INSTALL_PREFIX. -# -# By default configure_package_config_file() also generates two helper -# macros, set_and_check() and check_required_components() into the -# FooConfig.cmake file. -# -# set_and_check() should be used instead of the normal set() command for -# setting directories and file locations. Additionally to setting the -# variable it also checks that the referenced file or directory actually -# exists and fails with a FATAL_ERROR otherwise. This makes sure that -# the created FooConfig.cmake file does not contain wrong references. -# When using the NO_SET_AND_CHECK_MACRO, this macro is not generated -# into the FooConfig.cmake file. -# -# check_required_components() should be called at the end -# of the FooConfig.cmake file if the package supports components. This -# macro checks whether all requested, non-optional components have been -# found, and if this is not the case, sets the Foo_FOUND variable to -# FALSE, so that the package is considered to be not found. It does -# that by testing the Foo__FOUND variables for all requested -# required components. When using the NO_CHECK_REQUIRED_COMPONENTS -# option, this macro is not generated into the FooConfig.cmake file. +# The variables ```` to ```` given as ``PATH_VARS`` are the +# variables which contain install destinations. For each of them the macro will +# create a helper variable ``PACKAGE_``. These helper variables must be +# used in the ``FooConfig.cmake.in`` file for setting the installed location. +# They are calculated by ``configure_package_config_file`` so that they are +# always relative to the installed location of the package. This works both for +# relative and also for absolute locations. For absolute locations it works +# only if the absolute location is a subdirectory of +# :variable:`CMAKE_INSTALL_PREFIX`. +# +# By default ``configure_package_config_file`` also generates two helper macros, +# ``set_and_check()`` and ``check_required_components()`` into the +# ``FooConfig.cmake`` file. +# +# ``set_and_check()`` should be used instead of the normal ``set()`` command for +# setting directories and file locations. Additionally to setting the variable +# it also checks that the referenced file or directory actually exists and fails? +# with a ``FATAL_ERROR`` otherwise. This makes sure that the created +# ``FooConfig.cmake`` file does not contain wrong references. +# When using the ``NO_SET_AND_CHECK_MACRO``, this macro is not generated +# into the ``FooConfig.cmake`` file. +# +# ``check_required_components()`` should be called at the end of +# the ``FooConfig.cmake`` file if the package supports components. This macro +# checks whether all requested, non-optional components have been found, and if +# this is not the case, sets the ``Foo_FOUND`` variable to ``FALSE``, so that +# the package is considered to be not found. It does that by testing the +# ``Foo__FOUND`` variables for all requested required components. +# When using the ``NO_CHECK_REQUIRED_COMPONENTS_MACRO`` option, this macro is +# not generated into the ``FooConfig.cmake`` file. # # For an example see below the documentation for -# WRITE_BASIC_PACKAGE_VERSION_FILE(). -# -# -# -# :: -# -# WRITE_BASIC_PACKAGE_VERSION_FILE( filename [VERSION major.minor.patch] COMPATIBILITY (AnyNewerVersion|SameMajorVersion|ExactVersion) ) -# -# -# -# Writes a file for use as ConfigVersion.cmake file to -# . See the documentation of find_package() for details on -# this. -# -# :: -# -# filename is the output filename, it should be in the build tree. -# major.minor.patch is the version number of the project to be installed -# -# If no ``VERSION`` is given, the :variable:`PROJECT_VERSION` variable -# is used. If this hasn't been set, it errors out. -# -# The COMPATIBILITY mode AnyNewerVersion means that the installed -# package version will be considered compatible if it is newer or -# exactly the same as the requested version. This mode should be used -# for packages which are fully backward compatible, also across major -# versions. If SameMajorVersion is used instead, then the behaviour -# differs from AnyNewerVersion in that the major version number must be -# the same as requested, e.g. version 2.0 will not be considered -# compatible if 1.0 is requested. This mode should be used for packages -# which guarantee backward compatibility within the same major version. -# If ExactVersion is used, then the package is only considered -# compatible if the requested version matches exactly its own version -# number (not considering the tweak version). For example, version -# 1.2.3 of a package is only considered compatible to requested version -# 1.2.3. This mode is for packages without compatibility guarantees. -# If your project has more elaborated version matching rules, you will -# need to write your own custom ConfigVersion.cmake file instead of -# using this macro. -# -# Internally, this macro executes configure_file() to create the -# resulting version file. Depending on the COMPATIBLITY, either the -# file BasicConfigVersion-SameMajorVersion.cmake.in or -# BasicConfigVersion-AnyNewerVersion.cmake.in is used. Please note that +# :command:`write_basic_package_version_file()`. +# +# Generating a Package Version File +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# .. command:: write_basic_package_version_file +# +# Create a version file for a project:: +# +# write_basic_package_version_file( +# [VERSION ] +# COMPATIBILITY ) +# +# +# Writes a file for use as ``ConfigVersion.cmake`` file to +# ````. See the documentation of :command:`find_package()` for +# details on this. +# +# ```` is the output filename, it should be in the build tree. +# ```` is the version number of the project to be installed. +# +# If no ``VERSION`` is given, the :variable:`PROJECT_VERSION` variable is used. +# If this hasn't been set, it errors out. +# +# The ``COMPATIBILITY`` mode ``AnyNewerVersion`` means that the installed +# package version will be considered compatible if it is newer or exactly the +# same as the requested version. This mode should be used for packages which +# are fully backward compatible, also across major versions. +# If ``SameMajorVersion`` is used instead, then the behaviour differs from +# ``AnyNewerVersion`` in that the major version number must be the same as +# requested, e.g. version 2.0 will not be considered compatible if 1.0 is +# requested. This mode should be used for packages which guarantee backward +# compatibility within the same major version. +# If ``ExactVersion`` is used, then the package is only considered compatible if +# the requested version matches exactly its own version number (not considering +# the tweak version). For example, version 1.2.3 of a package is only +# considered compatible to requested version 1.2.3. This mode is for packages +# without compatibility guarantees. +# If your project has more elaborated version matching rules, you will need to +# write your own custom ``ConfigVersion.cmake`` file instead of using this +# macro. +# +# Internally, this macro executes :command:`configure_file()` to create the +# resulting version file. Depending on the ``COMPATIBLITY``, either the file +# ``BasicConfigVersion-SameMajorVersion.cmake.in`` or +# ``BasicConfigVersion-AnyNewerVersion.cmake.in`` is used. Please note that # these two files are internal to CMake and you should not call -# configure_file() on them yourself, but they can be used as starting -# point to create more sophisticted custom ConfigVersion.cmake files. +# :command:`configure_file()` on them yourself, but they can be used as starting +# point to create more sophisticted custom ``ConfigVersion.cmake`` files. # +# Example Generating Package Files +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # +# Example using both :command:`configure_package_config_file` and +# ``write_basic_package_version_file()``: # -# Example using both configure_package_config_file() and -# write_basic_package_version_file(): CMakeLists.txt: +# ``CMakeLists.txt``: # -# :: +# .. code-block:: cmake # # set(INCLUDE_INSTALL_DIR include/ ... CACHE ) # set(LIB_INSTALL_DIR lib/ ... CACHE ) @@ -162,11 +173,9 @@ # install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake # DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake ) # +# ``FooConfig.cmake.in``: # -# -# With a FooConfig.cmake.in: -# -# :: +# .. code-block:: cmake # # set(FOO_VERSION x.y.z) # ... @@ -175,10 +184,6 @@ # set_and_check(FOO_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") # set_and_check(FOO_SYSCONFIG_DIR "@PACKAGE_SYSCONFIG_INSTALL_DIR@") # -# -# -# :: -# # check_required_components(Foo) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64eca30dc4d584fb6acf8f6486c016eed50eb7ae commit 64eca30dc4d584fb6acf8f6486c016eed50eb7ae Author: Daniele E. Domenichelli AuthorDate: Tue Jul 15 18:47:05 2014 +0200 Commit: Brad King CommitDate: Mon Aug 4 10:07:16 2014 -0400 CMakePackageConfigHelpers: Remove unused variable diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 473bbe5..318382e 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -203,8 +203,6 @@ macro(WRITE_BASIC_PACKAGE_VERSION_FILE) write_basic_config_version_file(${ARGN}) endmacro() -set(cfpch_dir ${CMAKE_CURRENT_LIST_DIR}) - function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO) set(oneValueArgs INSTALL_DESTINATION ) ----------------------------------------------------------------------- Summary of changes: Modules/CMakePackageConfigHelpers.cmake | 288 ++++++++++++++++--------------- Tests/FindPackageTest/CMakeLists.txt | 38 ++++ 2 files changed, 190 insertions(+), 136 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:13:04 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:13:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4719-geb2eb78 Message-ID: <20140804141304.BB5704F61E@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, next has been updated via eb2eb7840ae2706aadeb9e8015656ed03843acd1 (commit) via 2dd17a546f0a2dafacf53b5db1e9ead0990d91ea (commit) from 1a1f6526f308d87a22071539acda3a6da49d9e82 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb2eb7840ae2706aadeb9e8015656ed03843acd1 commit eb2eb7840ae2706aadeb9e8015656ed03843acd1 Merge: 1a1f652 2dd17a5 Author: Brad King AuthorDate: Mon Aug 4 10:13:04 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:13:04 2014 -0400 Merge topic 'liblzma-pgi-compiler' into next 2dd17a54 liblzma: Fix compilation with PGI compiler http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2dd17a546f0a2dafacf53b5db1e9ead0990d91ea commit 2dd17a546f0a2dafacf53b5db1e9ead0990d91ea Author: Chuck Atkins AuthorDate: Fri Aug 1 13:56:41 2014 -0400 Commit: Brad King CommitDate: Mon Aug 4 10:12:51 2014 -0400 liblzma: Fix compilation with PGI compiler - sha265.c is using some C99 specific features, in particular static array dimensions in a function parameter array (see section 6.7.5-7 of the C99 spec). A #ifndef check was in place to prevent compilation under MSVC but it actually needed to check for C99 compliance instead. Even still, the C99 code fails on a few compilers (PGI being one) so for compatibility reasons, the C99 version of the function declaration is removed entirely, leaving only the C89 version. - CHECK_SYMBOL_EXISTS is used to determine the presense of bswap functions from byteswap.h. Most compilers re-dedefine the bswap_N functions as a __bswap_N function implemented by the compiler. Since bswap_N is usually defined as a macro then it's mere presence passes the check. Some versions of the PGI compiler though have shipped broken headers for byteswap.h, in particular 11.3 for x64 linux provides byteswap.h but is missing an associated bits/byteswap.h which causes some of the bswap_N macros to be defined but broken and unusable. The bswap_N checks have been converted to CHECK_SOURCE_COMPILES to ensure that the bswap_N calls are actually usable and not just merely defined. diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt index fc50dbe..856e41e 100644 --- a/Utilities/cmliblzma/CMakeLists.txt +++ b/Utilities/cmliblzma/CMakeLists.txt @@ -31,9 +31,15 @@ CHECK_INCLUDE_FILE(strings.h HAVE_STRINGS_H) CHECK_INCLUDE_FILE(string.h HAVE_STRING_H) CHECK_INCLUDE_FILE(sys/sysctl.h HAVE_SYS_SYSCTL_H) -CHECK_SYMBOL_EXISTS(bswap_16 byteswap.h HAVE_BSWAP_16) -CHECK_SYMBOL_EXISTS(bswap_32 byteswap.h HAVE_BSWAP_32) -CHECK_SYMBOL_EXISTS(bswap_64 byteswap.h HAVE_BSWAP_64) +CHECK_C_SOURCE_COMPILES ( + "#include\nint main(void){bswap_16(0);return 0;}" + HAVE_BSWAP_16) +CHECK_C_SOURCE_COMPILES ( + "#include\nint main(void){bswap_32(0);return 0;}" + HAVE_BSWAP_32) +CHECK_C_SOURCE_COMPILES ( + "#include\nint main(void){bswap_64(0);return 0;}" + HAVE_BSWAP_64) TEST_BIG_ENDIAN(WORDS_BIGENDIAN) diff --git a/Utilities/cmliblzma/liblzma/check/sha256.c b/Utilities/cmliblzma/liblzma/check/sha256.c index b09ccbf..c2c85eb 100644 --- a/Utilities/cmliblzma/liblzma/check/sha256.c +++ b/Utilities/cmliblzma/liblzma/check/sha256.c @@ -80,11 +80,7 @@ static const uint32_t SHA256_K[64] = { static void -#ifndef _MSC_VER -transform(uint32_t state[static 8], const uint32_t data[static 16]) -#else transform(uint32_t state[], const uint32_t data[]) -#endif { uint32_t W[16]; uint32_t T[8]; ----------------------------------------------------------------------- Summary of changes: Utilities/cmliblzma/CMakeLists.txt | 12 +++++++++--- Utilities/cmliblzma/liblzma/check/sha256.c | 4 ---- 2 files changed, 9 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:16:42 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:16:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4722-g0bb1dad Message-ID: <20140804141642.17C454F996@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, next has been updated via 0bb1daddaf0f450b8d040015c9135ad85fee9378 (commit) via 60c783676c91ff1ded2ed5e6fd50d0f9664032e5 (commit) via 158c6d1cffe863fde284d4e5eeeb8129d40ce0e9 (commit) from eb2eb7840ae2706aadeb9e8015656ed03843acd1 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0bb1daddaf0f450b8d040015c9135ad85fee9378 commit 0bb1daddaf0f450b8d040015c9135ad85fee9378 Merge: eb2eb78 60c7836 Author: Brad King AuthorDate: Mon Aug 4 10:16:41 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:16:41 2014 -0400 Merge topic 'update-kwsys' into next 60c78367 Merge branch 'upstream-kwsys' into update-kwsys 158c6d1c KWSys 2014-08-04 (e787837a) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60c783676c91ff1ded2ed5e6fd50d0f9664032e5 commit 60c783676c91ff1ded2ed5e6fd50d0f9664032e5 Merge: ba60ff9 158c6d1 Author: Brad King AuthorDate: Mon Aug 4 10:16:34 2014 -0400 Commit: Brad King CommitDate: Mon Aug 4 10:16:34 2014 -0400 Merge branch 'upstream-kwsys' into update-kwsys http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=158c6d1cffe863fde284d4e5eeeb8129d40ce0e9 commit 158c6d1cffe863fde284d4e5eeeb8129d40ce0e9 Author: KWSys Robot AuthorDate: Mon Aug 4 08:59:12 2014 -0400 Commit: Brad King CommitDate: Mon Aug 4 10:16:30 2014 -0400 KWSys 2014-08-04 (e787837a) Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ e787837a | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 65b36ede..e787837a Ben Boeckel (4): 9927862c SystemTools: more string replacements b3d598b0 strings: remove unnecessary c_str calls ffe94132 SystemTools: use char instead of const char* f29fec7c Directory: accept strings in methods Rashad M (1): e787837a SharedForward: Cast away const to call execvp on MinGW 64-bit Change-Id: I96437b332971670cfcd953717c5563e9ba0f2b99 diff --git a/Directory.cxx b/Directory.cxx index b305fd7..741bcba 100644 --- a/Directory.cxx +++ b/Directory.cxx @@ -103,7 +103,7 @@ void Directory::Clear() namespace KWSYS_NAMESPACE { -bool Directory::Load(const char* name) +bool Directory::Load(const kwsys_stl::string& name) { this->Clear(); #if _MSC_VER < 1300 @@ -112,24 +112,24 @@ bool Directory::Load(const char* name) intptr_t srchHandle; #endif char* buf; - size_t n = strlen(name); - if ( name[n - 1] == '/' || name[n - 1] == '\\' ) + size_t n = name.size(); + if ( *name.rbegin() == '/' || *name.rbegin() == '\\' ) { buf = new char[n + 1 + 1]; - sprintf(buf, "%s*", name); + sprintf(buf, "%s*", name.c_str()); } else { // Make sure the slashes in the wildcard suffix are consistent with the // rest of the path buf = new char[n + 2 + 1]; - if ( strchr(name, '\\') ) + if ( name.find('\\') != name.npos ) { - sprintf(buf, "%s\\*", name); + sprintf(buf, "%s\\*", name.c_str()); } else { - sprintf(buf, "%s/*", name); + sprintf(buf, "%s/*", name.c_str()); } } struct _wfinddata_t data; // data of current file @@ -153,7 +153,7 @@ bool Directory::Load(const char* name) return _findclose(srchHandle) != -1; } -unsigned long Directory::GetNumberOfFilesInDirectory(const char* name) +unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& name) { #if _MSC_VER < 1300 long srchHandle; @@ -161,16 +161,16 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const char* name) intptr_t srchHandle; #endif char* buf; - size_t n = strlen(name); - if ( name[n - 1] == '/' ) + size_t n = name.size(); + if ( *name.rbegin() == '/' ) { buf = new char[n + 1 + 1]; - sprintf(buf, "%s*", name); + sprintf(buf, "%s*", name.c_str()); } else { buf = new char[n + 2 + 1]; - sprintf(buf, "%s/*", name); + sprintf(buf, "%s/*", name.c_str()); } struct _wfinddata_t data; // data of current file @@ -215,15 +215,11 @@ p=1992&sid=f16167f51964f1a68fe5041b8eb213b6 namespace KWSYS_NAMESPACE { -bool Directory::Load(const char* name) +bool Directory::Load(const kwsys_stl::string& name) { this->Clear(); - if (!name) - { - return 0; - } - DIR* dir = opendir(name); + DIR* dir = opendir(name.c_str()); if (!dir) { @@ -239,14 +235,9 @@ bool Directory::Load(const char* name) return 1; } -unsigned long Directory::GetNumberOfFilesInDirectory(const char* name) +unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& name) { - DIR* dir = opendir(name); - - if (!dir) - { - return 0; - } + DIR* dir = opendir(name.c_str()); unsigned long count = 0; for (dirent* d = readdir(dir); d; d = readdir(dir) ) diff --git a/Directory.hxx.in b/Directory.hxx.in index 05217c4..0acb191 100644 --- a/Directory.hxx.in +++ b/Directory.hxx.in @@ -13,6 +13,13 @@ #define @KWSYS_NAMESPACE at _Directory_hxx #include <@KWSYS_NAMESPACE@/Configure.h> +#include <@KWSYS_NAMESPACE@/stl/string> + +/* Define these macros temporarily to keep the code readable. */ +#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE at _NAME_IS_KWSYS +# define kwsys_stl @KWSYS_NAMESPACE at _stl +# define kwsys_ios @KWSYS_NAMESPACE at _ios +#endif namespace @KWSYS_NAMESPACE@ { @@ -38,7 +45,7 @@ public: * in that directory. 0 is returned if the directory can not be * opened, 1 if it is opened. */ - bool Load(const char*); + bool Load(const kwsys_stl::string&); /** * Return the number of files in the current directory. @@ -49,7 +56,7 @@ public: * Return the number of files in the specified directory. * A higher performance static method. */ - static unsigned long GetNumberOfFilesInDirectory(const char*); + static unsigned long GetNumberOfFilesInDirectory(const kwsys_stl::string&); /** * Return the file at the given index, the indexing is 0 based @@ -77,4 +84,10 @@ private: } // namespace @KWSYS_NAMESPACE@ +/* Undefine temporary macros. */ +#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE at _NAME_IS_KWSYS +# undef kwsys_stl +# undef kwsys_ios +#endif + #endif diff --git a/Glob.cxx b/Glob.cxx index 8569b0e..0916d2e 100644 --- a/Glob.cxx +++ b/Glob.cxx @@ -218,7 +218,7 @@ void Glob::RecurseDirectory(kwsys_stl::string::size_type start, const kwsys_stl::string& dir) { kwsys::Directory d; - if ( !d.Load(dir.c_str()) ) + if ( !d.Load(dir) ) { return; } @@ -257,8 +257,8 @@ void Glob::RecurseDirectory(kwsys_stl::string::size_type start, fullname = dir + "/" + fname; } - bool isDir = kwsys::SystemTools::FileIsDirectory(realname.c_str()); - bool isSymLink = kwsys::SystemTools::FileIsSymlink(realname.c_str()); + bool isDir = kwsys::SystemTools::FileIsDirectory(realname); + bool isSymLink = kwsys::SystemTools::FileIsSymlink(realname); if ( isDir && (!isSymLink || this->RecurseThroughSymlinks) ) { @@ -297,7 +297,7 @@ void Glob::ProcessDirectory(kwsys_stl::string::size_type start, } kwsys::Directory d; - if ( !d.Load(dir.c_str()) ) + if ( !d.Load(dir) ) { return; } @@ -342,12 +342,12 @@ void Glob::ProcessDirectory(kwsys_stl::string::size_type start, //kwsys_ios::cout << "Full name: " << fullname << kwsys_ios::endl; if ( !last && - !kwsys::SystemTools::FileIsDirectory(realname.c_str()) ) + !kwsys::SystemTools::FileIsDirectory(realname) ) { continue; } - if ( this->Internals->Expressions[start].find(fname.c_str()) ) + if ( this->Internals->Expressions[start].find(fname) ) { if ( last ) { @@ -371,7 +371,7 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr) this->Internals->Expressions.clear(); this->Internals->Files.clear(); - if ( !kwsys::SystemTools::FileIsFullPath(expr.c_str()) ) + if ( !kwsys::SystemTools::FileIsFullPath(expr) ) { expr = kwsys::SystemTools::GetCurrentWorkingDirectory(); expr += "/" + inexpr; diff --git a/SharedForward.h.in b/SharedForward.h.in index dd4d462..7ff29b4 100644 --- a/SharedForward.h.in +++ b/SharedForward.h.in @@ -512,7 +512,7 @@ static void kwsys_shared_forward_execvp(const char* cmd, /* Invoke the child process. */ #if defined(_MSC_VER) _execvp(cmd, argv); -#elif defined(__MINGW32__) +#elif defined(__MINGW32__) && !defined(__MINGW64__) execvp(cmd, argv); #else execvp(cmd, (char* const*)argv); diff --git a/SystemTools.cxx b/SystemTools.cxx index db94510..dcfd49c 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -206,12 +206,12 @@ static time_t windows_filetime_to_posix_time(const FILETIME& ft) #include -inline int Mkdir(const char* dir) +inline int Mkdir(const kwsys_stl::string& dir) { return _wmkdir( KWSYS_NAMESPACE::SystemTools::ConvertToWindowsExtendedPath(dir).c_str()); } -inline int Rmdir(const char* dir) +inline int Rmdir(const kwsys_stl::string& dir) { return _wrmdir( KWSYS_NAMESPACE::SystemTools::ConvertToWindowsExtendedPath(dir).c_str()); @@ -232,15 +232,15 @@ inline const char* Getcwd(char* buf, unsigned int len) } return 0; } -inline int Chdir(const char* dir) +inline int Chdir(const kwsys_stl::string& dir) { #if defined(__BORLANDC__) - return chdir(dir); + return chdir(dir.c_str()); #else return _wchdir(KWSYS_NAMESPACE::Encoding::ToWide(dir).c_str()); #endif } -inline void Realpath(const char *path, kwsys_stl::string & resolved_path) +inline void Realpath(const kwsys_stl::string& path, kwsys_stl::string & resolved_path) { kwsys_stl::wstring tmp = KWSYS_NAMESPACE::Encoding::ToWide(path); wchar_t *ptemp; @@ -260,28 +260,28 @@ inline void Realpath(const char *path, kwsys_stl::string & resolved_path) #include #include #include -inline int Mkdir(const char* dir) +inline int Mkdir(const kwsys_stl::string& dir) { - return mkdir(dir, 00777); + return mkdir(dir.c_str(), 00777); } -inline int Rmdir(const char* dir) +inline int Rmdir(const kwsys_stl::string& dir) { - return rmdir(dir); + return rmdir(dir.c_str()); } inline const char* Getcwd(char* buf, unsigned int len) { return getcwd(buf, len); } -inline int Chdir(const char* dir) +inline int Chdir(const kwsys_stl::string& dir) { - return chdir(dir); + return chdir(dir.c_str()); } -inline void Realpath(const char *path, kwsys_stl::string & resolved_path) +inline void Realpath(const kwsys_stl::string& path, kwsys_stl::string & resolved_path) { char resolved_name[KWSYS_SYSTEMTOOLS_MAXPATH]; - char *ret = realpath(path, resolved_name); + char *ret = realpath(path.c_str(), resolved_name); if(ret) { resolved_path = ret; @@ -334,9 +334,9 @@ class SystemToolsTranslationMap : void SystemTools::GetPath(kwsys_stl::vector& path, const char* env) { #if defined(_WIN32) && !defined(__CYGWIN__) - const char* pathSep = ";"; + const char pathSep = ';'; #else - const char* pathSep = ":"; + const char pathSep = ':'; #endif if(!env) { @@ -351,7 +351,7 @@ void SystemTools::GetPath(kwsys_stl::vector& path, const char kwsys_stl::string pathEnv = cpathEnv; // A hack to make the below algorithm work. - if(!pathEnv.empty() && pathEnv[pathEnv.length()-1] != pathSep[0]) + if(!pathEnv.empty() && *pathEnv.rbegin() != pathSep) { pathEnv += pathSep; } @@ -623,13 +623,13 @@ const char* SystemTools::GetExecutableExtension() #endif } -FILE* SystemTools::Fopen(const char* file, const char* mode) +FILE* SystemTools::Fopen(const kwsys_stl::string& file, const char* mode) { #ifdef _WIN32 return _wfopen(SystemTools::ConvertToWindowsExtendedPath(file).c_str(), Encoding::ToWide(mode).c_str()); #else - return fopen(file, mode); + return fopen(file.c_str(), mode); #endif } @@ -639,15 +639,20 @@ bool SystemTools::MakeDirectory(const char* path) { return false; } + return SystemTools::MakeDirectory(kwsys_stl::string(path)); +} + +bool SystemTools::MakeDirectory(const kwsys_stl::string& path) +{ if(SystemTools::FileExists(path)) { return SystemTools::FileIsDirectory(path); } - kwsys_stl::string dir = path; - if(dir.empty()) + if(path.empty()) { return false; } + kwsys_stl::string dir = path; SystemTools::ConvertToUnixSlashes(dir); kwsys_stl::string::size_type pos = 0; @@ -655,11 +660,11 @@ bool SystemTools::MakeDirectory(const char* path) while((pos = dir.find('/', pos)) != kwsys_stl::string::npos) { topdir = dir.substr(0, pos); - Mkdir(topdir.c_str()); + Mkdir(topdir); pos++; } topdir = dir; - if(Mkdir(topdir.c_str()) != 0) + if(Mkdir(topdir) != 0) { // There is a bug in the Borland Run time library which makes MKDIR // return EACCES when it should return EEXISTS @@ -1021,7 +1026,7 @@ bool SystemTools::DeleteRegistryValue(const char *, KeyWOW64) } #endif -bool SystemTools::SameFile(const char* file1, const char* file2) +bool SystemTools::SameFile(const kwsys_stl::string& file1, const kwsys_stl::string& file2) { #ifdef _WIN32 HANDLE hFile1, hFile2; @@ -1066,7 +1071,7 @@ bool SystemTools::SameFile(const char* file1, const char* file2) fiBuf1.nFileIndexLow == fiBuf2.nFileIndexLow); #else struct stat fileStat1, fileStat2; - if (stat(file1, &fileStat1) == 0 && stat(file2, &fileStat2) == 0) + if (stat(file1.c_str(), &fileStat1) == 0 && stat(file2.c_str(), &fileStat2) == 0) { // see if the files are the same file // check the device inode and size @@ -1085,24 +1090,34 @@ bool SystemTools::SameFile(const char* file1, const char* file2) //---------------------------------------------------------------------------- bool SystemTools::FileExists(const char* filename) { - if(!(filename && *filename)) + if(!filename) + { + return false; + } + return SystemTools::FileExists(kwsys_stl::string(filename)); +} + +//---------------------------------------------------------------------------- +bool SystemTools::FileExists(const kwsys_stl::string& filename) +{ + if(filename.empty()) { return false; } #if defined(__CYGWIN__) // Convert filename to native windows path if possible. char winpath[MAX_PATH]; - if(SystemTools::PathCygwinToWin32(filename, winpath)) + if(SystemTools::PathCygwinToWin32(filename.c_str(), winpath)) { return (GetFileAttributesA(winpath) != INVALID_FILE_ATTRIBUTES); } - return access(filename, R_OK) == 0; + return access(filename.c_str(), R_OK) == 0; #elif defined(_WIN32) return (GetFileAttributesW( SystemTools::ConvertToWindowsExtendedPath(filename).c_str()) != INVALID_FILE_ATTRIBUTES); #else - return access(filename, R_OK) == 0; + return access(filename.c_str(), R_OK) == 0; #endif } @@ -1119,6 +1134,18 @@ bool SystemTools::FileExists(const char* filename, bool isFile) } //---------------------------------------------------------------------------- +bool SystemTools::FileExists(const kwsys_stl::string& filename, bool isFile) +{ + if(SystemTools::FileExists(filename)) + { + // If isFile is set return not FileIsDirectory, + // so this will only be true if it is a file + return !isFile || !SystemTools::FileIsDirectory(filename); + } + return false; +} + +//---------------------------------------------------------------------------- #ifdef __CYGWIN__ bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path) { @@ -1142,7 +1169,7 @@ bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path) } #endif -bool SystemTools::Touch(const char* filename, bool create) +bool SystemTools::Touch(const kwsys_stl::string& filename, bool create) { if(create && !SystemTools::FileExists(filename)) { @@ -1174,13 +1201,13 @@ bool SystemTools::Touch(const char* filename, bool create) CloseHandle(h); #elif KWSYS_CXX_HAS_UTIMENSAT struct timespec times[2] = {{0,UTIME_OMIT},{0,UTIME_NOW}}; - if(utimensat(AT_FDCWD, filename, times, 0) < 0) + if(utimensat(AT_FDCWD, filename.c_str(), times, 0) < 0) { return false; } #else struct stat st; - if(stat(filename, &st) < 0) + if(stat(filename.c_str(), &st) < 0) { return false; } @@ -1196,13 +1223,13 @@ bool SystemTools::Touch(const char* filename, bool create) # endif mtime }; - if(utimes(filename, times) < 0) + if(utimes(filename.c_str(), times) < 0) { return false; } # else struct utimbuf times = {st.st_atime, mtime.tv_sec}; - if(utime(filename, ×) < 0) + if(utime(filename.c_str(), ×) < 0) { return false; } @@ -1211,7 +1238,8 @@ bool SystemTools::Touch(const char* filename, bool create) return true; } -bool SystemTools::FileTimeCompare(const char* f1, const char* f2, +bool SystemTools::FileTimeCompare(const kwsys_stl::string& f1, + const kwsys_stl::string& f2, int* result) { // Default to same time. @@ -1219,12 +1247,12 @@ bool SystemTools::FileTimeCompare(const char* f1, const char* f2, #if !defined(_WIN32) || defined(__CYGWIN__) // POSIX version. Use stat function to get file modification time. struct stat s1; - if(stat(f1, &s1) != 0) + if(stat(f1.c_str(), &s1) != 0) { return false; } struct stat s2; - if(stat(f2, &s2) != 0) + if(stat(f2.c_str(), &s2) != 0) { return false; } @@ -1535,6 +1563,17 @@ bool SystemTools::StringStartsWith(const char* str1, const char* str2) return len1 >= len2 && !strncmp(str1, str2, len2) ? true : false; } +// Returns if string starts with another string +bool SystemTools::StringStartsWith(const kwsys_stl::string& str1, const char* str2) +{ + if (!str2) + { + return false; + } + size_t len1 = str1.size(), len2 = strlen(str2); + return len1 >= len2 && !strncmp(str1.c_str(), str2, len2) ? true : false; +} + // Returns if string ends with another string bool SystemTools::StringEndsWith(const char* str1, const char* str2) { @@ -1546,6 +1585,17 @@ bool SystemTools::StringEndsWith(const char* str1, const char* str2) return len1 >= len2 && !strncmp(str1 + (len1 - len2), str2, len2) ? true : false; } +// Returns if string ends with another string +bool SystemTools::StringEndsWith(const kwsys_stl::string& str1, const char* str2) +{ + if (!str2) + { + return false; + } + size_t len1 = str1.size(), len2 = strlen(str2); + return len1 >= len2 && !strncmp(str1.c_str() + (len1 - len2), str2, len2) ? true : false; +} + // Returns a pointer to the last occurence of str2 in str1 const char* SystemTools::FindLastString(const char* str1, const char* str2) { @@ -1615,7 +1665,7 @@ kwsys_stl::string SystemTools::CropString(const kwsys_stl::string& s, } //---------------------------------------------------------------------------- -kwsys_stl::vector SystemTools::SplitString(const char* p, char sep, bool isPath) +kwsys_stl::vector SystemTools::SplitString(const kwsys_stl::string& p, char sep, bool isPath) { kwsys_stl::string path = p; kwsys_stl::vector paths; @@ -1917,7 +1967,7 @@ SystemTools::ConvertToWindowsExtendedPath(const kwsys_stl::string &source) #endif // change // to /, and escape any spaces in the path -kwsys_stl::string SystemTools::ConvertToUnixOutputPath(const char* path) +kwsys_stl::string SystemTools::ConvertToUnixOutputPath(const kwsys_stl::string& path) { kwsys_stl::string ret = path; @@ -1947,7 +1997,7 @@ kwsys_stl::string SystemTools::ConvertToUnixOutputPath(const char* path) return ret; } -kwsys_stl::string SystemTools::ConvertToOutputPath(const char* path) +kwsys_stl::string SystemTools::ConvertToOutputPath(const kwsys_stl::string& path) { #if defined(_WIN32) && !defined(__CYGWIN__) return SystemTools::ConvertToWindowsOutputPath(path); @@ -1957,13 +2007,12 @@ kwsys_stl::string SystemTools::ConvertToOutputPath(const char* path) } // remove double slashes not at the start -kwsys_stl::string SystemTools::ConvertToWindowsOutputPath(const char* path) +kwsys_stl::string SystemTools::ConvertToWindowsOutputPath(const kwsys_stl::string& path) { kwsys_stl::string ret; // make it big enough for all of path and double quotes - ret.reserve(strlen(path)+3); + ret.reserve(path.size()+3); // put path into the string - ret.assign(path); ret = path; kwsys_stl::string::size_type pos = 0; // first convert all of the slashes @@ -2005,8 +2054,8 @@ kwsys_stl::string SystemTools::ConvertToWindowsOutputPath(const char* path) return ret; } -bool SystemTools::CopyFileIfDifferent(const char* source, - const char* destination) +bool SystemTools::CopyFileIfDifferent(const kwsys_stl::string& source, + const kwsys_stl::string& destination) { // special check for a destination that is a directory // FilesDiffer does not handle file to directory compare @@ -2017,7 +2066,7 @@ bool SystemTools::CopyFileIfDifferent(const char* source, new_destination += '/'; kwsys_stl::string source_name = source; new_destination += SystemTools::GetFilenameName(source_name); - if(SystemTools::FilesDiffer(source, new_destination.c_str())) + if(SystemTools::FilesDiffer(source, new_destination)) { return SystemTools::CopyFileAlways(source, destination); } @@ -2040,8 +2089,8 @@ bool SystemTools::CopyFileIfDifferent(const char* source, #define KWSYS_ST_BUFFER 4096 -bool SystemTools::FilesDiffer(const char* source, - const char* destination) +bool SystemTools::FilesDiffer(const kwsys_stl::string& source, + const kwsys_stl::string& destination) { #if defined(_WIN32) @@ -2079,13 +2128,13 @@ bool SystemTools::FilesDiffer(const char* source, #else struct stat statSource; - if (stat(source, &statSource) != 0) + if (stat(source.c_str(), &statSource) != 0) { return true; } struct stat statDestination; - if (stat(destination, &statDestination) != 0) + if (stat(destination.c_str(), &statDestination) != 0) { return true; } @@ -2103,15 +2152,15 @@ bool SystemTools::FilesDiffer(const char* source, #endif #if defined(_WIN32) - kwsys::ifstream finSource(source, + kwsys::ifstream finSource(source.c_str(), (kwsys_ios::ios::binary | kwsys_ios::ios::in)); - kwsys::ifstream finDestination(destination, + kwsys::ifstream finDestination(destination.c_str(), (kwsys_ios::ios::binary | kwsys_ios::ios::in)); #else - kwsys::ifstream finSource(source); - kwsys::ifstream finDestination(destination); + kwsys::ifstream finSource(source.c_str()); + kwsys::ifstream finDestination(destination.c_str()); #endif if(!finSource || !finDestination) { @@ -2156,7 +2205,7 @@ bool SystemTools::FilesDiffer(const char* source, /** * Copy a file named by "source" to the file named by "destination". */ -bool SystemTools::CopyFileAlways(const char* source, const char* destination) +bool SystemTools::CopyFileAlways(const kwsys_stl::string& source, const kwsys_stl::string& destination) { // If files are the same do not copy if ( SystemTools::SameFile(source, destination) ) @@ -2172,31 +2221,33 @@ bool SystemTools::CopyFileAlways(const char* source, const char* destination) // If destination is a directory, try to create a file with the same // name as the source in that directory. - kwsys_stl::string new_destination; + kwsys_stl::string real_destination = destination; + kwsys_stl::string destination_dir; if(SystemTools::FileExists(destination) && SystemTools::FileIsDirectory(destination)) { - new_destination = destination; - SystemTools::ConvertToUnixSlashes(new_destination); - new_destination += '/'; + destination_dir = real_destination; + SystemTools::ConvertToUnixSlashes(real_destination); + real_destination += '/'; kwsys_stl::string source_name = source; - new_destination += SystemTools::GetFilenameName(source_name); - destination = new_destination.c_str(); + real_destination += SystemTools::GetFilenameName(source_name); + } + else + { + destination_dir = SystemTools::GetFilenamePath(destination); } // Create destination directory - kwsys_stl::string destination_dir = destination; - destination_dir = SystemTools::GetFilenamePath(destination_dir); - SystemTools::MakeDirectory(destination_dir.c_str()); + SystemTools::MakeDirectory(destination_dir); // Open files #if defined(_WIN32) || defined(__CYGWIN__) - kwsys::ifstream fin(source, + kwsys::ifstream fin(source.c_str(), kwsys_ios::ios::binary | kwsys_ios::ios::in); #else - kwsys::ifstream fin(source); + kwsys::ifstream fin(source.c_str()); #endif if(!fin) { @@ -2207,13 +2258,13 @@ bool SystemTools::CopyFileAlways(const char* source, const char* destination) // can be written to. // If the remove fails continue so that files in read only directories // that do not allow file removal can be modified. - SystemTools::RemoveFile(destination); + SystemTools::RemoveFile(real_destination); #if defined(_WIN32) || defined(__CYGWIN__) - kwsys::ofstream fout(destination, + kwsys::ofstream fout(real_destination.c_str(), kwsys_ios::ios::binary | kwsys_ios::ios::out | kwsys_ios::ios::trunc); #else - kwsys::ofstream fout(destination, + kwsys::ofstream fout(real_destination.c_str(), kwsys_ios::ios::out | kwsys_ios::ios::trunc); #endif if(!fout) @@ -2249,7 +2300,7 @@ bool SystemTools::CopyFileAlways(const char* source, const char* destination) } if ( perms ) { - if ( !SystemTools::SetPermissions(destination, perm) ) + if ( !SystemTools::SetPermissions(real_destination, perm) ) { return false; } @@ -2258,7 +2309,7 @@ bool SystemTools::CopyFileAlways(const char* source, const char* destination) } //---------------------------------------------------------------------------- -bool SystemTools::CopyAFile(const char* source, const char* destination, +bool SystemTools::CopyAFile(const kwsys_stl::string& source, const kwsys_stl::string& destination, bool always) { if(always) @@ -2275,13 +2326,13 @@ bool SystemTools::CopyAFile(const char* source, const char* destination, * Copy a directory content from "source" directory to the directory named by * "destination". */ -bool SystemTools::CopyADirectory(const char* source, const char* destination, +bool SystemTools::CopyADirectory(const kwsys_stl::string& source, const kwsys_stl::string& destination, bool always) { Directory dir; #ifdef _WIN32 dir.Load(Encoding::ToNarrow( - SystemTools::ConvertToWindowsExtendedPath(source)).c_str()); + SystemTools::ConvertToWindowsExtendedPath(source))); #else dir.Load(source); #endif @@ -2298,13 +2349,13 @@ bool SystemTools::CopyADirectory(const char* source, const char* destination, kwsys_stl::string fullPath = source; fullPath += "/"; fullPath += dir.GetFile(static_cast(fileNum)); - if(SystemTools::FileIsDirectory(fullPath.c_str())) + if(SystemTools::FileIsDirectory(fullPath)) { kwsys_stl::string fullDestPath = destination; fullDestPath += "/"; fullDestPath += dir.GetFile(static_cast(fileNum)); - if (!SystemTools::CopyADirectory(fullPath.c_str(), - fullDestPath.c_str(), + if (!SystemTools::CopyADirectory(fullPath, + fullDestPath, always)) { return false; @@ -2312,7 +2363,7 @@ bool SystemTools::CopyADirectory(const char* source, const char* destination, } else { - if(!SystemTools::CopyAFile(fullPath.c_str(), destination, always)) + if(!SystemTools::CopyAFile(fullPath, destination, always)) { return false; } @@ -2365,7 +2416,7 @@ int SystemTools::Strucmp(const char *s1, const char *s2) } // return file's modified time -long int SystemTools::ModifiedTime(const char* filename) +long int SystemTools::ModifiedTime(const kwsys_stl::string& filename) { long int mt = 0; #ifdef _WIN32 @@ -2379,7 +2430,7 @@ long int SystemTools::ModifiedTime(const char* filename) } #else struct stat fs; - if (stat(filename, &fs) == 0) + if (stat(filename.c_str(), &fs) == 0) { mt = static_cast(fs.st_mtime); } @@ -2388,7 +2439,7 @@ long int SystemTools::ModifiedTime(const char* filename) } // return file's creation time -long int SystemTools::CreationTime(const char* filename) +long int SystemTools::CreationTime(const kwsys_stl::string& filename) { long int ct = 0; #ifdef _WIN32 @@ -2402,7 +2453,7 @@ long int SystemTools::CreationTime(const char* filename) } #else struct stat fs; - if (stat(filename, &fs) == 0) + if (stat(filename.c_str(), &fs) == 0) { ct = fs.st_ctime >= 0 ? static_cast(fs.st_ctime) : 0; } @@ -2518,7 +2569,7 @@ kwsys_stl::string SystemTools::GetLastSystemError() return strerror(e); } -bool SystemTools::RemoveFile(const char* source) +bool SystemTools::RemoveFile(const kwsys_stl::string& source) { #ifdef _WIN32 mode_t mode; @@ -2533,7 +2584,7 @@ bool SystemTools::RemoveFile(const char* source) bool res = _wunlink(SystemTools::ConvertToWindowsExtendedPath(source).c_str()) == 0; #else - bool res = unlink(source) != 0 ? false : true; + bool res = unlink(source.c_str()) != 0 ? false : true; #endif #ifdef _WIN32 if ( !res ) @@ -2544,7 +2595,7 @@ bool SystemTools::RemoveFile(const char* source) return res; } -bool SystemTools::RemoveADirectory(const char* source) +bool SystemTools::RemoveADirectory(const kwsys_stl::string& source) { // Add write permission to the directory so we can modify its // content to remove files and directories from it. @@ -2562,7 +2613,7 @@ bool SystemTools::RemoveADirectory(const char* source) Directory dir; #ifdef _WIN32 dir.Load(Encoding::ToNarrow( - SystemTools::ConvertToWindowsExtendedPath(source)).c_str()); + SystemTools::ConvertToWindowsExtendedPath(source))); #else dir.Load(source); #endif @@ -2575,17 +2626,17 @@ bool SystemTools::RemoveADirectory(const char* source) kwsys_stl::string fullPath = source; fullPath += "/"; fullPath += dir.GetFile(static_cast(fileNum)); - if(SystemTools::FileIsDirectory(fullPath.c_str()) && - !SystemTools::FileIsSymlink(fullPath.c_str())) + if(SystemTools::FileIsDirectory(fullPath) && + !SystemTools::FileIsSymlink(fullPath)) { - if (!SystemTools::RemoveADirectory(fullPath.c_str())) + if (!SystemTools::RemoveADirectory(fullPath)) { return false; } } else { - if(!SystemTools::RemoveFile(fullPath.c_str())) + if(!SystemTools::RemoveFile(fullPath)) { return false; } @@ -2647,7 +2698,7 @@ kwsys_stl::string SystemTools { tryPath = *p; tryPath += name; - if(SystemTools::FileExists(tryPath.c_str())) + if(SystemTools::FileExists(tryPath)) { return tryPath; } @@ -2667,7 +2718,7 @@ kwsys_stl::string SystemTools bool no_system_path) { kwsys_stl::string tryPath = SystemTools::FindName(name, userPaths, no_system_path); - if(tryPath != "" && !SystemTools::FileIsDirectory(tryPath.c_str())) + if(!tryPath.empty() && !SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2686,7 +2737,7 @@ kwsys_stl::string SystemTools bool no_system_path) { kwsys_stl::string tryPath = SystemTools::FindName(name, userPaths, no_system_path); - if(tryPath != "" && SystemTools::FileIsDirectory(tryPath.c_str())) + if(!tryPath.empty() && SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2708,7 +2759,14 @@ kwsys_stl::string SystemTools::FindProgram( { return ""; } - kwsys_stl::string name = nameIn; + return SystemTools::FindProgram(kwsys_stl::string(nameIn), userPaths, no_system_path); +} + +kwsys_stl::string SystemTools::FindProgram( + const kwsys_stl::string& name, + const kwsys_stl::vector& userPaths, + bool no_system_path) +{ kwsys_stl::vector extensions; #if defined (_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) bool hasExtension = false; @@ -2733,16 +2791,16 @@ kwsys_stl::string SystemTools::FindProgram( { tryPath = name; tryPath += *i; - if(SystemTools::FileExists(tryPath.c_str()) && - !SystemTools::FileIsDirectory(tryPath.c_str())) + if(SystemTools::FileExists(tryPath) && + !SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } } // now try just the name tryPath = name; - if(SystemTools::FileExists(tryPath.c_str()) && - !SystemTools::FileIsDirectory(tryPath.c_str())) + if(SystemTools::FileExists(tryPath) && + !SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2788,8 +2846,8 @@ kwsys_stl::string SystemTools::FindProgram( tryPath = *p; tryPath += name; tryPath += *ext; - if(SystemTools::FileExists(tryPath.c_str()) && - !SystemTools::FileIsDirectory(tryPath.c_str())) + if(SystemTools::FileExists(tryPath) && + !SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2797,8 +2855,8 @@ kwsys_stl::string SystemTools::FindProgram( // now try it without them tryPath = *p; tryPath += name; - if(SystemTools::FileExists(tryPath.c_str()) && - !SystemTools::FileIsDirectory(tryPath.c_str())) + if(SystemTools::FileExists(tryPath) && + !SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2816,7 +2874,7 @@ kwsys_stl::string SystemTools::FindProgram( it != names.end() ; ++it) { // Try to find the program. - kwsys_stl::string result = SystemTools::FindProgram(it->c_str(), + kwsys_stl::string result = SystemTools::FindProgram(*it, path, noSystemPath); if ( !result.empty() ) @@ -2833,7 +2891,7 @@ kwsys_stl::string SystemTools::FindProgram( * found. Otherwise, the empty string is returned. */ kwsys_stl::string SystemTools -::FindLibrary(const char* name, +::FindLibrary(const kwsys_stl::string& name, const kwsys_stl::vector& userPaths) { // See if the executable exists as written. @@ -2874,8 +2932,8 @@ kwsys_stl::string SystemTools tryPath = *p; tryPath += name; tryPath += ".framework"; - if(SystemTools::FileExists(tryPath.c_str()) - && SystemTools::FileIsDirectory(tryPath.c_str())) + if(SystemTools::FileExists(tryPath) + && SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2884,8 +2942,8 @@ kwsys_stl::string SystemTools tryPath = *p; tryPath += name; tryPath += ".lib"; - if(SystemTools::FileExists(tryPath.c_str()) - && !SystemTools::FileIsDirectory(tryPath.c_str())) + if(SystemTools::FileExists(tryPath) + && !SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2894,8 +2952,8 @@ kwsys_stl::string SystemTools tryPath += "lib"; tryPath += name; tryPath += ".so"; - if(SystemTools::FileExists(tryPath.c_str()) - && !SystemTools::FileIsDirectory(tryPath.c_str())) + if(SystemTools::FileExists(tryPath) + && !SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2903,8 +2961,8 @@ kwsys_stl::string SystemTools tryPath += "lib"; tryPath += name; tryPath += ".a"; - if(SystemTools::FileExists(tryPath.c_str()) - && !SystemTools::FileIsDirectory(tryPath.c_str())) + if(SystemTools::FileExists(tryPath) + && !SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2912,8 +2970,8 @@ kwsys_stl::string SystemTools tryPath += "lib"; tryPath += name; tryPath += ".sl"; - if(SystemTools::FileExists(tryPath.c_str()) - && !SystemTools::FileIsDirectory(tryPath.c_str())) + if(SystemTools::FileExists(tryPath) + && !SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2921,8 +2979,8 @@ kwsys_stl::string SystemTools tryPath += "lib"; tryPath += name; tryPath += ".dylib"; - if(SystemTools::FileExists(tryPath.c_str()) - && !SystemTools::FileIsDirectory(tryPath.c_str())) + if(SystemTools::FileExists(tryPath) + && !SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2930,8 +2988,8 @@ kwsys_stl::string SystemTools tryPath += "lib"; tryPath += name; tryPath += ".dll"; - if(SystemTools::FileExists(tryPath.c_str()) - && !SystemTools::FileIsDirectory(tryPath.c_str())) + if(SystemTools::FileExists(tryPath) + && !SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } @@ -2942,32 +3000,33 @@ kwsys_stl::string SystemTools return ""; } -kwsys_stl::string SystemTools::GetRealPath(const char* path) +kwsys_stl::string SystemTools::GetRealPath(const kwsys_stl::string& path) { kwsys_stl::string ret; Realpath(path, ret); return ret; } -bool SystemTools::FileIsDirectory(const char* name) +bool SystemTools::FileIsDirectory(const kwsys_stl::string& inName) { - if (!*name) + if (inName.empty()) { return false; } - size_t length = strlen(name); + size_t length = inName.size(); + const char* name = inName.c_str(); // Remove any trailing slash from the name except in a root component. char local_buffer[KWSYS_SYSTEMTOOLS_MAXPATH]; std::string string_buffer; size_t last = length-1; if(last > 0 && (name[last] == '/' || name[last] == '\\') - && strcmp(name, "/") !=0 && name[last-1] != ':') + && strcmp(name, "/") != 0 && name[last-1] != ':') { - if(last < sizeof(local_buffer)) + if (last < sizeof(local_buffer)) { memcpy(local_buffer, name, last); - local_buffer[last] = 0; + local_buffer[last] = '\0'; name = local_buffer; } else @@ -2997,14 +3056,14 @@ bool SystemTools::FileIsDirectory(const char* name) } } -bool SystemTools::FileIsSymlink(const char* name) +bool SystemTools::FileIsSymlink(const kwsys_stl::string& name) { #if defined( _WIN32 ) (void)name; return false; #else struct stat fs; - if(lstat(name, &fs) == 0) + if(lstat(name.c_str(), &fs) == 0) { return S_ISLNK(fs.st_mode); } @@ -3053,7 +3112,7 @@ bool SystemTools::ReadSymlink(const char* newName, } #endif -int SystemTools::ChangeDirectory(const char *dir) +int SystemTools::ChangeDirectory(const kwsys_stl::string& dir) { return Chdir(dir); } @@ -3090,7 +3149,7 @@ bool SystemTools::SplitProgramPath(const char* in_name, file = ""; SystemTools::ConvertToUnixSlashes(dir); - if(!SystemTools::FileIsDirectory(dir.c_str())) + if(!SystemTools::FileIsDirectory(dir)) { kwsys_stl::string::size_type slashPos = dir.rfind("/"); if(slashPos != kwsys_stl::string::npos) @@ -3104,7 +3163,7 @@ bool SystemTools::SplitProgramPath(const char* in_name, dir = ""; } } - if(!(dir == "") && !SystemTools::FileIsDirectory(dir.c_str())) + if(!(dir.empty()) && !SystemTools::FileIsDirectory(dir)) { kwsys_stl::string oldDir = in_name; SystemTools::ConvertToUnixSlashes(oldDir); @@ -3125,8 +3184,8 @@ bool SystemTools::FindProgramPath(const char* argv0, kwsys_stl::string self = argv0 ? argv0 : ""; failures.push_back(self); SystemTools::ConvertToUnixSlashes(self); - self = SystemTools::FindProgram(self.c_str()); - if(!SystemTools::FileExists(self.c_str())) + self = SystemTools::FindProgram(self); + if(!SystemTools::FileExists(self)) { if(buildDir) { @@ -3144,7 +3203,7 @@ bool SystemTools::FindProgramPath(const char* argv0, } if(installPrefix) { - if(!SystemTools::FileExists(self.c_str())) + if(!SystemTools::FileExists(self)) { failures.push_back(self); self = installPrefix; @@ -3152,7 +3211,7 @@ bool SystemTools::FindProgramPath(const char* argv0, self += exeName; } } - if(!SystemTools::FileExists(self.c_str())) + if(!SystemTools::FileExists(self)) { failures.push_back(self); kwsys_ios::ostringstream msg; @@ -3193,12 +3252,12 @@ void SystemTools::AddTranslationPath(const kwsys_stl::string& a, const kwsys_stl SystemTools::ConvertToUnixSlashes(path_b); // First check this is a directory path, since we don't want the table to // grow too fat - if( SystemTools::FileIsDirectory( path_a.c_str() ) ) + if( SystemTools::FileIsDirectory( path_a ) ) { // Make sure the path is a full path and does not contain no '..' // Ken--the following code is incorrect. .. can be in a valid path // for example /home/martink/MyHubba...Hubba/Src - if( SystemTools::FileIsFullPath(path_b.c_str()) && path_b.find("..") + if( SystemTools::FileIsFullPath(path_b) && path_b.find("..") == kwsys_stl::string::npos ) { // Before inserting make sure path ends with '/' @@ -3355,7 +3414,7 @@ kwsys_stl::string SystemTools::CollapseFullPath(const kwsys_stl::string& in_path } // compute the relative path from here to there -kwsys_stl::string SystemTools::RelativePath(const char* local, const char* remote) +kwsys_stl::string SystemTools::RelativePath(const kwsys_stl::string& local, const kwsys_stl::string& remote) { if(!SystemTools::FileIsFullPath(local)) { @@ -3745,7 +3804,7 @@ bool SystemTools::ComparePath(const kwsys_stl::string& c1, const kwsys_stl::stri } //---------------------------------------------------------------------------- -bool SystemTools::Split(const char* str, kwsys_stl::vector& lines, char separator) +bool SystemTools::Split(const kwsys_stl::string& str, kwsys_stl::vector& lines, char separator) { kwsys_stl::string data(str); kwsys_stl::string::size_type lpos = 0; @@ -3769,7 +3828,7 @@ bool SystemTools::Split(const char* str, kwsys_stl::vector& l } //---------------------------------------------------------------------------- -bool SystemTools::Split(const char* str, kwsys_stl::vector& lines) +bool SystemTools::Split(const kwsys_stl::string& str, kwsys_stl::vector& lines) { kwsys_stl::string data(str); kwsys_stl::string::size_type lpos = 0; @@ -4062,7 +4121,7 @@ bool SystemTools::LocateFileInDir(const char *filename, } temp += filename_base; - if (SystemTools::FileExists(temp.c_str())) + if (SystemTools::FileExists(temp)) { res = true; filename_found = temp; @@ -4111,9 +4170,18 @@ bool SystemTools::LocateFileInDir(const char *filename, return res; } +bool SystemTools::FileIsFullPath(const kwsys_stl::string& in_name) +{ + return SystemTools::FileIsFullPath(in_name.c_str(), in_name.size()); +} + bool SystemTools::FileIsFullPath(const char* in_name) { - size_t len = strlen(in_name); + return SystemTools::FileIsFullPath(in_name, in_name[0] ? (in_name[1] ? 2 : 1) : 0); +} + +bool SystemTools::FileIsFullPath(const char* in_name, size_t len) +{ #if defined(_WIN32) || defined(__CYGWIN__) // On Windows, the name must be at least two characters long. if(len < 2) @@ -4222,7 +4290,7 @@ void SystemTools::SplitProgramFromArgs(const char* path, { kwsys_stl::string tryProg = dir.substr(0, spacePos); // See if the file exists - if(SystemTools::FileExists(tryProg.c_str())) + if(SystemTools::FileExists(tryProg)) { program = tryProg; // remove trailing spaces from program @@ -4236,7 +4304,7 @@ void SystemTools::SplitProgramFromArgs(const char* path, return; } // Now try and find the program in the path - findProg = SystemTools::FindProgram(tryProg.c_str(), e); + findProg = SystemTools::FindProgram(tryProg, e); if(!findProg.empty()) { program = findProg; @@ -4408,7 +4476,11 @@ bool SystemTools::GetPermissions(const char* file, mode_t& mode) { return false; } + return SystemTools::GetPermissions(kwsys_stl::string(file), mode); +} +bool SystemTools::GetPermissions(const kwsys_stl::string& file, mode_t& mode) +{ #if defined(_WIN32) DWORD attr = GetFileAttributesW( SystemTools::ConvertToWindowsExtendedPath(file).c_str()); @@ -4433,7 +4505,8 @@ bool SystemTools::GetPermissions(const char* file, mode_t& mode) { mode |= S_IFREG; } - const char* ext = strrchr(file, '.'); + size_t dotPos = file.rfind('.'); + const char* ext = dotPos == file.npos ? 0 : (file.c_str() + dotPos); if(ext && (Strucmp(ext, ".exe") == 0 || Strucmp(ext, ".com") == 0 || Strucmp(ext, ".cmd") == 0 || @@ -4443,7 +4516,7 @@ bool SystemTools::GetPermissions(const char* file, mode_t& mode) } #else struct stat st; - if ( stat(file, &st) < 0 ) + if ( stat(file.c_str(), &st) < 0 ) { return false; } @@ -4458,6 +4531,11 @@ bool SystemTools::SetPermissions(const char* file, mode_t mode) { return false; } + return SystemTools::SetPermissions(kwsys_stl::string(file), mode); +} + +bool SystemTools::SetPermissions(const kwsys_stl::string& file, mode_t mode) +{ if ( !SystemTools::FileExists(file) ) { return false; @@ -4466,7 +4544,7 @@ bool SystemTools::SetPermissions(const char* file, mode_t mode) if ( _wchmod(SystemTools::ConvertToWindowsExtendedPath(file).c_str(), mode) < 0 ) #else - if ( chmod(file, mode) < 0 ) + if ( chmod(file.c_str(), mode) < 0 ) #endif { return false; @@ -4475,7 +4553,7 @@ bool SystemTools::SetPermissions(const char* file, mode_t mode) return true; } -kwsys_stl::string SystemTools::GetParentDirectory(const char* fileOrDir) +kwsys_stl::string SystemTools::GetParentDirectory(const kwsys_stl::string& fileOrDir) { return SystemTools::GetFilenamePath(fileOrDir); } diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in index b7c7206..2514699 100644 --- a/SystemTools.hxx.in +++ b/SystemTools.hxx.in @@ -158,7 +158,9 @@ public: * Returns true if str1 starts (respectively ends) with str2 */ static bool StringStartsWith(const char* str1, const char* str2); + static bool StringStartsWith(const kwsys_stl::string& str1, const char* str2); static bool StringEndsWith(const char* str1, const char* str2); + static bool StringEndsWith(const kwsys_stl::string& str1, const char* str2); /** * Returns a pointer to the last occurence of str2 in str1 @@ -183,7 +185,7 @@ public: s starts with a / then the first element of the returned array will be /, so /foo/bar will be [/, foo, bar] */ - static kwsys_stl::vector SplitString(const char* s, char separator = '/', + static kwsys_stl::vector SplitString(const kwsys_stl::string& s, char separator = '/', bool isPath = false); /** * Perform a case-independent string comparison @@ -201,8 +203,8 @@ public: * Split a string on its newlines into multiple lines * Return false only if the last line stored had no newline */ - static bool Split(const char* s, kwsys_stl::vector& l); - static bool Split(const char* s, kwsys_stl::vector& l, char separator); + static bool Split(const kwsys_stl::string& s, kwsys_stl::vector& l); + static bool Split(const kwsys_stl::string& s, kwsys_stl::vector& l, char separator); /** * Return string with space added between capitalized words @@ -265,13 +267,13 @@ public: * For windows this calls ConvertToWindowsOutputPath and for unix * it calls ConvertToUnixOutputPath */ - static kwsys_stl::string ConvertToOutputPath(const char*); + static kwsys_stl::string ConvertToOutputPath(const kwsys_stl::string&); /** * Convert the path to a string that can be used in a unix makefile. * double slashes are removed, and spaces are escaped. */ - static kwsys_stl::string ConvertToUnixOutputPath(const char*); + static kwsys_stl::string ConvertToUnixOutputPath(const kwsys_stl::string&); /** * Convert the path to string that can be used in a windows project or @@ -279,7 +281,7 @@ public: * the string, the slashes are converted to windows style backslashes, and * if there are spaces in the string it is double quoted. */ - static kwsys_stl::string ConvertToWindowsOutputPath(const char*); + static kwsys_stl::string ConvertToWindowsOutputPath(const kwsys_stl::string&); /** * Return true if a file exists in the current directory. @@ -288,7 +290,9 @@ public: * if it is a file or a directory. */ static bool FileExists(const char* filename, bool isFile); + static bool FileExists(const kwsys_stl::string& filename, bool isFile); static bool FileExists(const char* filename); + static bool FileExists(const kwsys_stl::string& filename); /** * Converts Cygwin path to Win32 path. Uses dictionary container for @@ -307,7 +311,7 @@ public: /** Change the modification time or create a file */ - static bool Touch(const char* filename, bool create); + static bool Touch(const kwsys_stl::string& filename, bool create); /** * Compare file modification times. @@ -315,7 +319,8 @@ public: * When true is returned, result has -1, 0, +1 for * f1 older, same, or newer than f2. */ - static bool FileTimeCompare(const char* f1, const char* f2, + static bool FileTimeCompare(const kwsys_stl::string& f1, + const kwsys_stl::string& f2, int* result); /** @@ -377,7 +382,7 @@ public: * the event of an error (non-existent path, permissions issue, * etc.) the original path is returned. */ - static kwsys_stl::string GetRealPath(const char* path); + static kwsys_stl::string GetRealPath(const kwsys_stl::string& path); /** * Split a path name into its root component and the rest of the @@ -470,6 +475,7 @@ public: /** * Return whether the path represents a full path (not relative) */ + static bool FileIsFullPath(const kwsys_stl::string&); static bool FileIsFullPath(const char*); /** @@ -493,7 +499,7 @@ public: /** * Get the parent directory of the directory or file */ - static kwsys_stl::string GetParentDirectory(const char* fileOrDir); + static kwsys_stl::string GetParentDirectory(const kwsys_stl::string& fileOrDir); /** * Check if the given file or directory is in subdirectory of dir @@ -508,7 +514,7 @@ public: /** * Open a file considering unicode. */ - static FILE* Fopen(const char* file, const char* mode); + static FILE* Fopen(const kwsys_stl::string& file, const char* mode); /** * Make a new directory if it is not there. This function @@ -516,35 +522,36 @@ public: * prior to calling this function. */ static bool MakeDirectory(const char* path); + static bool MakeDirectory(const kwsys_stl::string& path); /** * Copy the source file to the destination file only * if the two files differ. */ - static bool CopyFileIfDifferent(const char* source, - const char* destination); + static bool CopyFileIfDifferent(const kwsys_stl::string& source, + const kwsys_stl::string& destination); /** * Compare the contents of two files. Return true if different */ - static bool FilesDiffer(const char* source, const char* destination); + static bool FilesDiffer(const kwsys_stl::string& source, const kwsys_stl::string& destination); /** * Return true if the two files are the same file */ - static bool SameFile(const char* file1, const char* file2); + static bool SameFile(const kwsys_stl::string& file1, const kwsys_stl::string& file2); /** * Copy a file. */ - static bool CopyFileAlways(const char* source, const char* destination); + static bool CopyFileAlways(const kwsys_stl::string& source, const kwsys_stl::string& destination); /** * Copy a file. If the "always" argument is true the file is always * copied. If it is false, the file is copied only if it is new or * has changed. */ - static bool CopyAFile(const char* source, const char* destination, + static bool CopyAFile(const kwsys_stl::string& source, const kwsys_stl::string& destination, bool always = true); /** @@ -553,18 +560,18 @@ public: * always copied. If it is false, only files that have changed or * are new are copied. */ - static bool CopyADirectory(const char* source, const char* destination, + static bool CopyADirectory(const kwsys_stl::string& source, const kwsys_stl::string& destination, bool always = true); /** * Remove a file */ - static bool RemoveFile(const char* source); + static bool RemoveFile(const kwsys_stl::string& source); /** * Remove a directory */ - static bool RemoveADirectory(const char* source); + static bool RemoveADirectory(const kwsys_stl::string& source); /** * Get the maximum full file path length @@ -594,12 +601,17 @@ public: */ static kwsys_stl::string FindProgram( const char* name, - const kwsys_stl::vector& path = + const kwsys_stl::vector& path = + kwsys_stl::vector(), + bool no_system_path = false); + static kwsys_stl::string FindProgram( + const kwsys_stl::string& name, + const kwsys_stl::vector& path = kwsys_stl::vector(), bool no_system_path = false); static kwsys_stl::string FindProgram( const kwsys_stl::vector& names, - const kwsys_stl::vector& path = + const kwsys_stl::vector& path = kwsys_stl::vector(), bool no_system_path = false); @@ -607,18 +619,18 @@ public: * Find a library in the system PATH, with optional extra paths */ static kwsys_stl::string FindLibrary( - const char* name, + const kwsys_stl::string& name, const kwsys_stl::vector& path); /** * Return true if the file is a directory */ - static bool FileIsDirectory(const char* name); + static bool FileIsDirectory(const kwsys_stl::string& name); /** * Return true if the file is a symlink */ - static bool FileIsSymlink(const char* name); + static bool FileIsSymlink(const kwsys_stl::string& name); /** * Return true if the file has a given signature (first set of bytes) @@ -686,17 +698,17 @@ public: /a/b/c/d to /a/b/c1/d1 -> ../../c1/d1 from /usr/src to /usr/src/test/blah/foo.cpp -> test/blah/foo.cpp */ - static kwsys_stl::string RelativePath(const char* local, const char* remote); + static kwsys_stl::string RelativePath(const kwsys_stl::string& local, const kwsys_stl::string& remote); /** * Return file's modified time */ - static long int ModifiedTime(const char* filename); + static long int ModifiedTime(const kwsys_stl::string& filename); /** * Return file's creation time (Win32: works only for NTFS, not FAT) */ - static long int CreationTime(const char* filename); + static long int CreationTime(const kwsys_stl::string& filename); #if defined( _MSC_VER ) typedef unsigned short mode_t; @@ -706,7 +718,9 @@ public: * Get and set permissions of the file. */ static bool GetPermissions(const char* file, mode_t& mode); + static bool GetPermissions(const kwsys_stl::string& file, mode_t& mode); static bool SetPermissions(const char* file, mode_t mode); + static bool SetPermissions(const kwsys_stl::string& file, mode_t mode); /** ----------------------------------------------------------------- * Time Manipulation Routines @@ -793,7 +807,7 @@ public: /** * Change directory to the directory specified */ - static int ChangeDirectory(const char* dir); + static int ChangeDirectory(const kwsys_stl::string& dir); /** * Get the result of strerror(errno) @@ -901,6 +915,11 @@ private: } /** + * Actual implementation of FileIsFullPath. + */ + static bool FileIsFullPath(const char*, size_t); + + /** * Find a filename (file or directory) in the system PATH, with * optional extra paths. */ diff --git a/testSystemTools.cxx b/testSystemTools.cxx index 8b21081..15123eb 100644 --- a/testSystemTools.cxx +++ b/testSystemTools.cxx @@ -132,7 +132,7 @@ static bool CheckFileOperations() res = false; } - if (!kwsys::SystemTools::MakeDirectory(testNewDir.c_str())) + if (!kwsys::SystemTools::MakeDirectory(testNewDir)) { kwsys_ios::cerr << "Problem with MakeDirectory for: " @@ -148,7 +148,7 @@ static bool CheckFileOperations() res = false; } - if (!kwsys::SystemTools::RemoveFile(testNewFile.c_str())) + if (!kwsys::SystemTools::RemoveFile(testNewFile)) { kwsys_ios::cerr << "Problem with RemoveFile: " @@ -157,7 +157,7 @@ static bool CheckFileOperations() } kwsys::SystemTools::Touch(testNewFile.c_str(), true); - if (!kwsys::SystemTools::RemoveADirectory(testNewDir.c_str())) + if (!kwsys::SystemTools::RemoveADirectory(testNewDir)) { kwsys_ios::cerr << "Problem with RemoveADirectory for: " @@ -183,7 +183,7 @@ static bool CheckFileOperations() "012345678901234567890123456789012345678901234567890123456789" "0123456789.txt"); - if (!kwsys::SystemTools::MakeDirectory(testNewLongDir.c_str())) + if (!kwsys::SystemTools::MakeDirectory(testNewLongDir)) { kwsys_ios::cerr << "Problem with MakeDirectory for: " @@ -199,7 +199,7 @@ static bool CheckFileOperations() res = false; } - if (!kwsys::SystemTools::RemoveFile(testNewLongFile.c_str())) + if (!kwsys::SystemTools::RemoveFile(testNewLongFile)) { kwsys_ios::cerr << "Problem with RemoveFile: " @@ -208,7 +208,7 @@ static bool CheckFileOperations() } kwsys::SystemTools::Touch(testNewLongFile.c_str(), true); - if (!kwsys::SystemTools::RemoveADirectory(testNewLongDir.c_str())) + if (!kwsys::SystemTools::RemoveADirectory(testNewLongDir)) { kwsys_ios::cerr << "Problem with RemoveADirectory for: " ----------------------------------------------------------------------- Summary of changes: Source/kwsys/Directory.cxx | 41 ++--- Source/kwsys/Directory.hxx.in | 17 +- Source/kwsys/Glob.cxx | 14 +- Source/kwsys/SharedForward.h.in | 2 +- Source/kwsys/SystemTools.cxx | 368 +++++++++++++++++++++++--------------- Source/kwsys/SystemTools.hxx.in | 77 +++++--- Source/kwsys/testSystemTools.cxx | 12 +- 7 files changed, 316 insertions(+), 215 deletions(-) hooks/post-receive -- CMake From clinton at elemtech.com Mon Aug 4 10:17:59 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 4 Aug 2014 10:17:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4725-gaf5b825 Message-ID: <20140804141759.577764FAC2@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, next has been updated via af5b8256b4d3ca1b65f5f97424918e241e360213 (commit) via 20f56fe4d4c1227a9bd1601311aaf7c07b28bbd4 (commit) via 6e576baa2a639ed4401a35c640e20002828dac9b (commit) from 0bb1daddaf0f450b8d040015c9135ad85fee9378 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af5b8256b4d3ca1b65f5f97424918e241e360213 commit af5b8256b4d3ca1b65f5f97424918e241e360213 Merge: 0bb1dad 20f56fe Author: Clinton Stimpson AuthorDate: Mon Aug 4 10:17:58 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:17:58 2014 -0400 Merge topic 'qt-automoc' into next 20f56fe4 Qt: Enable running automoc test with Qt4 or Qt5. 6e576baa Qt: Fix automoc when .h and .cpp are in different directories. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20f56fe4d4c1227a9bd1601311aaf7c07b28bbd4 commit 20f56fe4d4c1227a9bd1601311aaf7c07b28bbd4 Author: Clinton Stimpson AuthorDate: Mon Aug 4 08:14:52 2014 -0600 Commit: Clinton Stimpson CommitDate: Mon Aug 4 08:14:52 2014 -0600 Qt: Enable running automoc test with Qt4 or Qt5. Previously, the automoc tests required both Qt4 and Qt5. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index ca7fcdc..1402c95 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1201,7 +1201,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Targets") - if(Qt5Widgets_FOUND AND NOT Qt5Widgets_VERSION VERSION_LESS 5.1.0) + endif() + + if((QT4_WORKS AND QT_QTGUI_FOUND) OR + (Qt5Widgets_FOUND AND NOT Qt5Widgets_VERSION VERSION_LESS 5.1.0) ) add_test(Qt4And5Automoc ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/Qt4And5Automoc" @@ -1226,7 +1229,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release --test-command ${CMAKE_CTEST_COMMAND} -V ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4And5AutomocReverse") - endif() endif() find_package(GTK2 QUIET) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e576baa2a639ed4401a35c640e20002828dac9b commit 6e576baa2a639ed4401a35c640e20002828dac9b Author: Clinton Stimpson AuthorDate: Mon Aug 4 08:11:31 2014 -0600 Commit: Clinton Stimpson CommitDate: Mon Aug 4 08:11:31 2014 -0600 Qt: Fix automoc when .h and .cpp are in different directories. Thanks Pau Garcia i Quiles for the patch. diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index d4d565c..76edad5 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1830,30 +1830,57 @@ cmQtAutoGenerators::SearchHeadersForCppFile(const std::string& absFilename, const std::string basename = cmsys::SystemTools::GetFilenameWithoutLastExtension(absFilename); const std::string absPath = cmsys::SystemTools::GetFilenamePath( - cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/'; + cmsys::SystemTools::GetRealPath(absFilename.c_str())); - for(std::vector::const_iterator ext = headerExtensions.begin(); - ext != headerExtensions.end(); - ++ext) + std::vector incPaths; + incPaths.push_back(absPath); + cmSystemTools::ExpandListArgument(this->MocIncludesStr, incPaths); + + for(std::vector::const_iterator path = incPaths.begin(); + path != incPaths.end(); + ++path) + { + bool found = false; + for(std::vector::const_iterator ext = + headerExtensions.begin(); + ext != headerExtensions.end(); + ++ext) { - const std::string headerName = absPath + basename + "." + (*ext); - if (cmsys::SystemTools::FileExists(headerName.c_str())) + const std::string headerName = (*path) + "/" + basename + "." + (*ext); + + if (cmsys::SystemTools::FileExists(headerName.c_str())) { - absHeaders.insert(headerName); - break; + absHeaders.insert(headerName); + found = true; + break; } } - for(std::vector::const_iterator ext = headerExtensions.begin(); - ext != headerExtensions.end(); - ++ext) + if (found) + break; + } + for(std::vector::const_iterator path = incPaths.begin(); + path != incPaths.end(); + ++path) + { + bool found = false; + for(std::vector::const_iterator ext = + headerExtensions.begin(); + ext != headerExtensions.end(); + ++ext) { - const std::string privateHeaderName = absPath+basename+"_p."+(*ext); - if (cmsys::SystemTools::FileExists(privateHeaderName.c_str())) + const std::string privateHeaderName = (*path) + "/" + + basename + "_p." + (*ext); + + if (cmsys::SystemTools::FileExists(privateHeaderName.c_str())) { - absHeaders.insert(privateHeaderName); - break; + absHeaders.insert(privateHeaderName); + found = true; + break; } } + if (found) + break; + } } diff --git a/Tests/Qt4And5Automoc/AnObject.cpp b/Tests/Qt4And5Automoc/AnObject.cpp new file mode 100644 index 0000000..c1c93f1 --- /dev/null +++ b/Tests/Qt4And5Automoc/AnObject.cpp @@ -0,0 +1,4 @@ +#include "AnObject.h" + +void AnObject::activated() { +} diff --git a/Tests/Qt4And5Automoc/AnObject.h b/Tests/Qt4And5Automoc/AnObject.h new file mode 100644 index 0000000..b7c5409 --- /dev/null +++ b/Tests/Qt4And5Automoc/AnObject.h @@ -0,0 +1,9 @@ +#include + +class AnObject : public QObject { + Q_OBJECT +public: + AnObject() {} +private slots: + void activated(); +}; diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt index ad74961..7f3e81e 100644 --- a/Tests/Qt4And5Automoc/CMakeLists.txt +++ b/Tests/Qt4And5Automoc/CMakeLists.txt @@ -1,13 +1,13 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.0.1) project(Qt4And5Automoc) if (QT_REVERSE_FIND_ORDER) - find_package(Qt5Core REQUIRED) - find_package(Qt4 REQUIRED) + find_package(Qt5Core) + find_package(Qt4) else() - find_package(Qt4 REQUIRED) - find_package(Qt5Core REQUIRED) + find_package(Qt4) + find_package(Qt5Core) endif() set(CMAKE_AUTOMOC ON) @@ -20,10 +20,16 @@ macro(generate_main_file VERSION) ) endmacro() -generate_main_file(4) -generate_main_file(5) +include_directories(include) -add_executable(qt4_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt4.cpp") +if (${QT4_FOUND}) +generate_main_file(4) +add_executable(qt4_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt4.cpp" AnObject.cpp src/OtherObject.cpp) target_link_libraries(qt4_exe Qt4::QtCore) -add_executable(qt5_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt5.cpp") +endif() + +if (${QT5_FOUND}) +generate_main_file(5) +add_executable(qt5_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt5.cpp" AnObject.cpp src/OtherObject.cpp) target_link_libraries(qt5_exe Qt5::Core) +endif() diff --git a/Tests/Qt4And5Automoc/include/OtherObject.h b/Tests/Qt4And5Automoc/include/OtherObject.h new file mode 100644 index 0000000..6d51cc1 --- /dev/null +++ b/Tests/Qt4And5Automoc/include/OtherObject.h @@ -0,0 +1,9 @@ +#include + +class OtherObject : public QObject { + Q_OBJECT +public: + OtherObject() {} +private slots: + void activated(); +}; diff --git a/Tests/Qt4And5Automoc/main.cpp.in b/Tests/Qt4And5Automoc/main.cpp.in index 00fd641..7852cd6 100644 --- a/Tests/Qt4And5Automoc/main.cpp.in +++ b/Tests/Qt4And5Automoc/main.cpp.in @@ -1,5 +1,7 @@ #include +#include "AnObject.h" +#include "OtherObject.h" class SomeObject : public QObject { @@ -14,5 +16,7 @@ public: int main(int argc, char **argv) { + AnObject a; + OtherObject o; return 0; } diff --git a/Tests/Qt4And5Automoc/src/OtherObject.cpp b/Tests/Qt4And5Automoc/src/OtherObject.cpp new file mode 100644 index 0000000..d4e724a --- /dev/null +++ b/Tests/Qt4And5Automoc/src/OtherObject.cpp @@ -0,0 +1,4 @@ +#include "OtherObject.h" + +void OtherObject::activated() { +} ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutoGenerators.cxx | 57 ++++++++++++++++++++-------- Tests/CMakeLists.txt | 6 ++- Tests/Qt4And5Automoc/AnObject.cpp | 4 ++ Tests/Qt4And5Automoc/AnObject.h | 9 +++++ Tests/Qt4And5Automoc/CMakeLists.txt | 24 +++++++----- Tests/Qt4And5Automoc/include/OtherObject.h | 9 +++++ Tests/Qt4And5Automoc/main.cpp.in | 4 ++ Tests/Qt4And5Automoc/src/OtherObject.cpp | 4 ++ 8 files changed, 91 insertions(+), 26 deletions(-) create mode 100644 Tests/Qt4And5Automoc/AnObject.cpp create mode 100644 Tests/Qt4And5Automoc/AnObject.h create mode 100644 Tests/Qt4And5Automoc/include/OtherObject.h create mode 100644 Tests/Qt4And5Automoc/src/OtherObject.cpp hooks/post-receive -- CMake From clinton at elemtech.com Mon Aug 4 10:26:35 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 4 Aug 2014 10:26:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4727-g4c83a4e Message-ID: <20140804142635.50D945010D@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, next has been updated via 4c83a4e74d4e13307504ff681269776ef0878246 (commit) via 8157cb2ea2247ffb5aef206e149da17dfad9a6a7 (commit) from af5b8256b4d3ca1b65f5f97424918e241e360213 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c83a4e74d4e13307504ff681269776ef0878246 commit 4c83a4e74d4e13307504ff681269776ef0878246 Merge: af5b825 8157cb2 Author: Clinton Stimpson AuthorDate: Mon Aug 4 10:26:34 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:26:34 2014 -0400 Merge topic 'file-strings-encoding' into next 8157cb2e cmFileCommand: Add ENCODING option to file(STRINGS ...) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8157cb2ea2247ffb5aef206e149da17dfad9a6a7 commit 8157cb2ea2247ffb5aef206e149da17dfad9a6a7 Author: Clinton Stimpson AuthorDate: Mon Aug 4 08:20:19 2014 -0600 Commit: Clinton Stimpson CommitDate: Mon Aug 4 08:21:42 2014 -0600 cmFileCommand: Add ENCODING option to file(STRINGS ...) For now, UTF8 encoding support is added. This addresses issue #10519. diff --git a/Help/command/file.rst b/Help/command/file.rst index 58e3a26..5f93686 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -64,6 +64,9 @@ Parse a list of ASCII strings from ```` and store it in ``REGEX `` Consider only strings that match the given regular expression. +``ENCODING `` + Consider strings of a given encoding. "UTF8" is currently supported. + For example, the code .. code-block:: cmake diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index e47365a..34c0d73 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -428,7 +428,8 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) arg_length_minimum, arg_length_maximum, arg__maximum, - arg_regex }; + arg_regex, + arg_encoding }; unsigned int minlen = 0; unsigned int maxlen = 0; int limit_input = -1; @@ -438,6 +439,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) bool have_regex = false; bool newline_consume = false; bool hex_conversion_enabled = true; + bool utf8_encoding = false; int arg_mode = arg_none; for(unsigned int i=3; i < args.size(); ++i) { @@ -475,6 +477,10 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) hex_conversion_enabled = false; arg_mode = arg_none; } + else if(args[i] == "ENCODING") + { + arg_mode = arg_encoding; + } else if(arg_mode == arg_limit_input) { if(sscanf(args[i].c_str(), "%d", &limit_input) != 1 || @@ -556,6 +562,22 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) have_regex = true; arg_mode = arg_none; } + else if(arg_mode == arg_encoding) + { + if(args[i] == "UTF8") + { + utf8_encoding = true; + } + else + { + cmOStringStream e; + e << "STRINGS option ENCODING \"" + << args[i] << "\" not recognized."; + this->SetError(e.str()); + return false; + } + arg_mode = arg_none; + } else { cmOStringStream e; @@ -596,11 +618,75 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) int output_size = 0; std::vector strings; std::string s; - int c; while((!limit_count || strings.size() < limit_count) && (limit_input < 0 || static_cast(fin.tellg()) < limit_input) && - (c = fin.get(), fin)) + fin) { + std::string current_str; + + int c = fin.get(); + + if(c == '\r') + { + // Ignore CR character to make output always have UNIX newlines. + continue; + } + + else if((c >= 0x20 && c < 0x7F) || c == '\t' || + (c == '\n' && newline_consume)) + { + // This is an ASCII character that may be part of a string. + // Cast added to avoid compiler warning. Cast is ok because + // c is guaranteed to fit in char by the above if... + current_str += static_cast(c); + } + else if(utf8_encoding) + { + // Check for UTF-8 encoded string (up to 4 octets) + static const unsigned char utf8_check_table[3][2] = + { + {0xE0, 0xC0}, + {0xF0, 0xE0}, + {0xF8, 0xF0}, + }; + + // how many octets are there? + unsigned int num_utf8_bytes = 0; + for(unsigned int j=0; num_utf8_bytes == 0 && j<3; j++) + { + if((c & utf8_check_table[j][0]) == utf8_check_table[j][1]) + num_utf8_bytes = j+2; + } + + // get subsequent octets and check that they are valid + for(unsigned int j=0; j(c); + } + + // if this was an invalid utf8 sequence, discard the data, and put + // back subsequent characters + if((current_str.length() != num_utf8_bytes)) + { + for(unsigned int j=0; j const& args) // Reset the string to empty. s = ""; } - else if(c == '\r') - { - // Ignore CR character to make output always have UNIX newlines. - } - else if((c >= 0x20 && c < 0x7F) || c == '\t' || - (c == '\n' && newline_consume)) + else if(current_str.empty()) { - // This is an ASCII character that may be part of a string. - // Cast added to avoid compiler warning. Cast is ok because - // c is guaranteed to fit in char by the above if... - s += static_cast(c); - } - else - { - // TODO: Support ENCODING option. See issue #10519. // A non-string character has been found. Check if the current // string matches the requirements. We require that the length // be at least one no matter what the user specified. if(s.length() >= minlen && s.length() >= 1 && - (!have_regex || regex.find(s.c_str()))) + (!have_regex || regex.find(s.c_str()))) { output_size += static_cast(s.size()) + 1; if(limit_output >= 0 && output_size >= limit_output) @@ -654,10 +727,15 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) // Reset the string to empty. s = ""; } + else + { + s += current_str; + } + - // Terminate a string if the maximum length is reached. if(maxlen > 0 && s.size() == maxlen) { + // Terminate a string if the maximum length is reached. if(s.length() >= minlen && (!have_regex || regex.find(s.c_str()))) { diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt index 4fa5a86..c46bef6 100644 --- a/Tests/StringFileTest/CMakeLists.txt +++ b/Tests/StringFileTest/CMakeLists.txt @@ -55,6 +55,16 @@ else() "file(STRINGS) incorrectly read from srec file [${infile_strings}]") endif() +#this file has utf-8 content +FILE(STRINGS test.utf8 infile_strings ENCODING UTF8) +list(LENGTH infile_strings content_len) +if(content_len MATCHES "3") + message("file(STRINGS) correctly read from utf8 file [${infile_strings}]") +else() + message(SEND_ERROR + "file(STRINGS) incorrectly read from utf8 file [${infile_strings}]") +endif() + # String test string(REGEX MATCH "[cC][mM][aA][kK][eE]" rmvar "CMake is great") string(REGEX MATCHALL "[cC][mM][aA][kK][eE]" rmallvar "CMake is better than cmake or CMake") diff --git a/Tests/StringFileTest/test.utf8 b/Tests/StringFileTest/test.utf8 new file mode 100644 index 0000000..6c29170 --- /dev/null +++ b/Tests/StringFileTest/test.utf8 @@ -0,0 +1,3 @@ +The value of ?? (pi) is 3.141593 +Line mixed with binary partially matches valid utf8: ?? is ?93.1593 +? \ No newline at end of file ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 3 + Source/cmFileCommand.cxx | 116 +++++++++++++++++++++++++++++------ Tests/StringFileTest/CMakeLists.txt | 10 +++ Tests/StringFileTest/test.utf8 | 3 + 4 files changed, 113 insertions(+), 19 deletions(-) create mode 100644 Tests/StringFileTest/test.utf8 hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 4 10:31:04 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 4 Aug 2014 10:31:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4741-g0df50f4 Message-ID: <20140804143104.380E350241@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, next has been updated via 0df50f497c4c4937e882b6ea7048980e52e855d0 (commit) via 401a00d9f98aff9c2f15315945cd4c392ff36d9f (commit) via 709cebde66a4251e1a1ed7a90c072f06be691bee (commit) via 72395ab23eee5ed7ff5a8800632869d6ef66f805 (commit) via 2074f5813889680d32c784c3dbdb1bf41be1405f (commit) via c72f0887cee6c3c47f50efb44256476045cf801f (commit) via 1c94558abb653968de6da2cb4672006f31ca0d14 (commit) via 592098e2d5a00d396e84d7a5e51ae6c550a21fc6 (commit) via aa42a78f523f3db5e849663a7c55d949dd25bfb0 (commit) via b94ddf6cd70e811e4bc3f3c28ef7195bcf2bb0cf (commit) via d7938bff37bfa05f34b9ad5a46ae3aff54955eea (commit) via 3abd150ce9df03e24a903dedc952339b58ba79cb (commit) via c1580a9217ee2447433c76eca2ad0e6be6347a57 (commit) via 29410df23d4783de9d90a6d8c24cf7c9c5aacc80 (commit) from 4c83a4e74d4e13307504ff681269776ef0878246 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0df50f497c4c4937e882b6ea7048980e52e855d0 commit 0df50f497c4c4937e882b6ea7048980e52e855d0 Merge: 4c83a4e 401a00d Author: Brad King AuthorDate: Mon Aug 4 10:31:02 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 10:31:02 2014 -0400 Merge topic 'vs-windows-phone-and-store' into next 401a00d9 VS: Set WindowsPhone and WindowsStore min VS version required 709cebde VS: Generate WindowsPhone and WindowsStore application types 72395ab2 VS: Add .sln "Deploy" mark for WindowsPhone and WindowsStore binaries 2074f581 MSVC: Add system libs for WindowsPhone and WindowsStore c72f0887 MSVC: Add default WindowsPhone and WindowsStore compile flags 1c94558a MSVC: Disable incremental linking for WindowsPhone and WindowsStore 592098e2 Define 'WINDOWS_PHONE' and 'WINDOWS_STORE' variables aa42a78f Add WindowsPhone and WindowsStore platform information modules b94ddf6c CMakeDetermineCompilerId: Recognize WindowsPhone and WindowsStore d7938bff VS: Select WindowsPhone and WindowsStore default toolsets 3abd150c VS: Save WindowsPhone and WindowsStore system internally c1580a92 VS: Always add IgnoreSpecificDefaultLibraries to .vcxproj files 29410df2 cmIDEOptions: Add an AppendFlag method to update multi-valued options http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=401a00d9f98aff9c2f15315945cd4c392ff36d9f commit 401a00d9f98aff9c2f15315945cd4c392ff36d9f Author: Gilles Khouzam AuthorDate: Thu Jul 31 13:24:08 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:09:05 2014 -0400 VS: Set WindowsPhone and WindowsStore min VS version required Generate the MinimumVisualStudioVersion element in the .vcxproj file based on the version of WindowsPhone or WindowsStore to be targeted. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index e9421e3..291827a 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2120,5 +2120,17 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() this->WriteString("", 2); (*this->BuildFileStream) << cmVS10EscapeXML(v) << "\n"; + if(v == "8.1") + { + // Visual Studio 12.0 is necessary for building 8.1 apps + this->WriteString("12.0" + "\n", 2); + } + else if (v == "8.0") + { + // Visual Studio 11.0 is necessary for building 8.0 apps + this->WriteString("11.0" + "\n", 2); + } } } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=709cebde66a4251e1a1ed7a90c072f06be691bee commit 709cebde66a4251e1a1ed7a90c072f06be691bee Author: Gilles Khouzam AuthorDate: Thu Jul 31 13:22:35 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:09:03 2014 -0400 VS: Generate WindowsPhone and WindowsStore application types Generate the ApplicationType and ApplicationTypeRevision elements in .vcxproj files. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 18d8951..e9421e3 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -286,6 +286,11 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("", 2); (*this->BuildFileStream) << "{" << this->GUID << "}\n"; + if(this->MSTools && this->Target->GetType() <= cmTarget::UTILITY) + { + this->WriteApplicationTypeSettings(); + } + const char* vsProjectTypes = this->Target->GetProperty("VS_GLOBAL_PROJECT_TYPES"); if(vsProjectTypes) @@ -2100,3 +2105,20 @@ bool cmVisualStudio10TargetGenerator:: expectedResxHeaders.find(headerFile); return it != expectedResxHeaders.end(); } + +void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() +{ + bool const isWindowsPhone = this->GlobalGenerator->TargetsWindowsPhone(); + bool const isWindowsStore = this->GlobalGenerator->TargetsWindowsStore(); + std::string const& v = this->GlobalGenerator->GetSystemVersion(); + if(isWindowsPhone || isWindowsStore) + { + this->WriteString("", 2); + (*this->BuildFileStream) << (isWindowsPhone ? + "Windows Phone" : "Windows Store") + << "\n"; + this->WriteString("", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(v) + << "\n"; + } +} diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 7436372..2bbdb8c 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -91,6 +91,7 @@ private: void WriteCustomCommand(cmSourceFile const* sf); void WriteGroups(); void WriteProjectReferences(); + void WriteApplicationTypeSettings(); bool OutputSourceSpecificFlags(cmSourceFile const* source); void AddLibraries(cmComputeLinkInformation& cli, std::vector& libVec); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72395ab23eee5ed7ff5a8800632869d6ef66f805 commit 72395ab23eee5ed7ff5a8800632869d6ef66f805 Author: Gilles Khouzam AuthorDate: Tue Jul 29 11:43:19 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:09:01 2014 -0400 VS: Add .sln "Deploy" mark for WindowsPhone and WindowsStore binaries diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 33cfaa1..39bbdc0 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -242,3 +242,17 @@ cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs() return ret; } + +//---------------------------------------------------------------------------- +bool +cmGlobalVisualStudio11Generator::NeedsDeploy(cmTarget::TargetType type) const +{ + if((type == cmTarget::EXECUTABLE || + type == cmTarget::SHARED_LIBRARY) && + (this->SystemIsWindowsPhone || + this->SystemIsWindowsStore)) + { + return true; + } + return cmGlobalVisualStudio10Generator::NeedsDeploy(type); +} diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index 0b497db..bbd935c 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -41,6 +41,9 @@ protected: virtual const char* GetIDEVersion() { return "11.0"; } bool UseFolderProperty(); static std::set GetInstalledWindowsCESDKs(); + + /** Return true if the configuration needs to be deployed */ + virtual bool NeedsDeploy(cmTarget::TargetType type) const; private: class Factory; friend class Factory; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2074f5813889680d32c784c3dbdb1bf41be1405f commit 2074f5813889680d32c784c3dbdb1bf41be1405f Author: Brad King AuthorDate: Thu Jul 31 13:08:53 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:08:58 2014 -0400 MSVC: Add system libs for WindowsPhone and WindowsStore Use the libraries that are added by default by the VS 2013 IDE for Windows Phone and Windows Store projects. diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 9431e90..9d4aca2 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -165,7 +165,11 @@ if(WINCE) elseif(WINDOWS_PHONE OR WINDOWS_STORE) set(_FLAGS_C " /DUNICODE /D_UNICODE") set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc") - set(CMAKE_C_STANDARD_LIBRARIES_INIT "") + if(WINDOWS_PHONE) + set(CMAKE_C_STANDARD_LIBRARIES_INIT "WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib") + else() + set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib") + endif() else() set(_PLATFORM_DEFINES "/DWIN32") http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c72f0887cee6c3c47f50efb44256476045cf801f commit c72f0887cee6c3c47f50efb44256476045cf801f Author: Paul Annetts AuthorDate: Mon Jul 28 14:56:13 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:08:56 2014 -0400 MSVC: Add default WindowsPhone and WindowsStore compile flags Also set the list of standard libraries to empty. diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index b0d3e49..9431e90 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -162,6 +162,10 @@ if(WINCE) if (MSVC_VERSION LESS 1600) set(CMAKE_C_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT} corelibc.lib") endif () +elseif(WINDOWS_PHONE OR WINDOWS_STORE) + set(_FLAGS_C " /DUNICODE /D_UNICODE") + set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc") + set(CMAKE_C_STANDARD_LIBRARIES_INIT "") else() set(_PLATFORM_DEFINES "/DWIN32") http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c94558abb653968de6da2cb4672006f31ca0d14 commit 1c94558abb653968de6da2cb4672006f31ca0d14 Author: Gilles Khouzam AuthorDate: Mon Jul 28 14:50:57 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:08:54 2014 -0400 MSVC: Disable incremental linking for WindowsPhone and WindowsStore Do not add a "/INCREMENTAL" flag when using the toolchains for these systems. diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index e51c592..b0d3e49 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -199,10 +199,12 @@ unset(_MACHINE_ARCH_FLAG) # add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype # on versions that support it set( MSVC_INCREMENTAL_YES_FLAG "") -if(NOT MSVC_INCREMENTAL_DEFAULT) - set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES") -else() - set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" ) +if(NOT WINDOWS_PHONE AND NOT WINDOWS_STORE) + if(NOT MSVC_INCREMENTAL_DEFAULT) + set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES") + else() + set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" ) + endif() endif() if (CMAKE_COMPILER_SUPPORTS_PDBTYPE) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=592098e2d5a00d396e84d7a5e51ae6c550a21fc6 commit 592098e2d5a00d396e84d7a5e51ae6c550a21fc6 Author: Gilles Khouzam AuthorDate: Mon Jul 28 14:19:45 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:08:52 2014 -0400 Define 'WINDOWS_PHONE' and 'WINDOWS_STORE' variables Set one of these when CMAKE_SYSTEM_NAME is "WindowsPhone" or "WindowsStore", respectively. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 05a7b33..e622784 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -190,6 +190,8 @@ Variables that Describe the System /variable/MSVC_VERSION /variable/UNIX /variable/WIN32 + /variable/WINDOWS_PHONE + /variable/WINDOWS_STORE /variable/XCODE_VERSION Variables that Control the Build diff --git a/Help/variable/WINDOWS_PHONE.rst b/Help/variable/WINDOWS_PHONE.rst new file mode 100644 index 0000000..61d91b0 --- /dev/null +++ b/Help/variable/WINDOWS_PHONE.rst @@ -0,0 +1,5 @@ +WINDOWS_PHONE +------------- + +True when the :variable:`CMAKE_SYSTEM_NAME` variable is set +to ``WindowsPhone``. diff --git a/Help/variable/WINDOWS_STORE.rst b/Help/variable/WINDOWS_STORE.rst new file mode 100644 index 0000000..dae3b53 --- /dev/null +++ b/Help/variable/WINDOWS_STORE.rst @@ -0,0 +1,5 @@ +WINDOWS_STORE +------------- + +True when the :variable:`CMAKE_SYSTEM_NAME` variable is set +to ``WindowsStore``. diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake index 7e97111..9a937a7 100644 --- a/Modules/Platform/Windows.cmake +++ b/Modules/Platform/Windows.cmake @@ -2,6 +2,10 @@ set(WIN32 1) if(CMAKE_SYSTEM_NAME STREQUAL "WindowsCE") set(WINCE 1) +elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") + set(WINDOWS_PHONE 1) +elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(WINDOWS_STORE 1) endif() set(CMAKE_STATIC_LIBRARY_PREFIX "") http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa42a78f523f3db5e849663a7c55d949dd25bfb0 commit aa42a78f523f3db5e849663a7c55d949dd25bfb0 Author: Brad King AuthorDate: Mon Jul 28 14:08:10 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:08:50 2014 -0400 Add WindowsPhone and WindowsStore platform information modules Simply include the "Windows" platform equivalents. This will allow -DCMAKE_SYSTEM_NAME=WindowsPhone or -DCMAKE_SYSTEM_NAME=WindowsStore to select variants of the Windows platform while re-using most of the platform information from "Windows". diff --git a/Modules/Platform/WindowsPhone-MSVC-C.cmake b/Modules/Platform/WindowsPhone-MSVC-C.cmake new file mode 100644 index 0000000..ce8060b --- /dev/null +++ b/Modules/Platform/WindowsPhone-MSVC-C.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-C) diff --git a/Modules/Platform/WindowsPhone-MSVC-CXX.cmake b/Modules/Platform/WindowsPhone-MSVC-CXX.cmake new file mode 100644 index 0000000..281eadc --- /dev/null +++ b/Modules/Platform/WindowsPhone-MSVC-CXX.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-CXX) diff --git a/Modules/Platform/WindowsPhone.cmake b/Modules/Platform/WindowsPhone.cmake new file mode 100644 index 0000000..65b2eae --- /dev/null +++ b/Modules/Platform/WindowsPhone.cmake @@ -0,0 +1 @@ +include(Platform/Windows) diff --git a/Modules/Platform/WindowsStore-MSVC-C.cmake b/Modules/Platform/WindowsStore-MSVC-C.cmake new file mode 100644 index 0000000..ce8060b --- /dev/null +++ b/Modules/Platform/WindowsStore-MSVC-C.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-C) diff --git a/Modules/Platform/WindowsStore-MSVC-CXX.cmake b/Modules/Platform/WindowsStore-MSVC-CXX.cmake new file mode 100644 index 0000000..281eadc --- /dev/null +++ b/Modules/Platform/WindowsStore-MSVC-CXX.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-CXX) diff --git a/Modules/Platform/WindowsStore.cmake b/Modules/Platform/WindowsStore.cmake new file mode 100644 index 0000000..65b2eae --- /dev/null +++ b/Modules/Platform/WindowsStore.cmake @@ -0,0 +1 @@ +include(Platform/Windows) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b94ddf6cd70e811e4bc3f3c28ef7195bcf2bb0cf commit b94ddf6cd70e811e4bc3f3c28ef7195bcf2bb0cf Author: Gilles Khouzam AuthorDate: Mon Jul 28 14:27:59 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:08:48 2014 -0400 CMakeDetermineCompilerId: Recognize WindowsPhone and WindowsStore When CMAKE_SYSTEM_NAME is set to target one of these, add ApplicationType and ApplicationTypeRevision elements to the .vcxproj file used to identify the compiler so that the WindowsPhone or WindowsStore toolchains can work. Co-Author: Brad King diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 025d296..a780fa6 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -168,6 +168,18 @@ Id flags: ${testflags} else() set(id_toolset "") endif() + if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") + set(id_system "Windows Phone") + elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(id_system "Windows Store") + else() + set(id_system "") + endif() + if(id_system AND CMAKE_SYSTEM_VERSION) + set(id_system_version "${CMAKE_SYSTEM_VERSION}") + else() + set(id_system_version "") + endif() if(CMAKE_VS_WINCE_VERSION) set(id_entrypoint "mainACRTStartup") if("${vs_version}" VERSION_LESS 9) diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index 1a7a539..bacbca4 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -10,6 +10,8 @@ {CAE07175-D007-4FC3-BFE8-47B392814159} CompilerId at id_lang@ Win32Proj + @id_system@ + @id_system_version@ http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7938bff37bfa05f34b9ad5a46ae3aff54955eea commit d7938bff37bfa05f34b9ad5a46ae3aff54955eea Author: Brad King AuthorDate: Mon Jul 28 16:15:43 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:08:46 2014 -0400 VS: Select WindowsPhone and WindowsStore default toolsets Teach the VS >= 10 generators to recognize these system names and select the appropriate default toolset for the system version. Report an error when the version is not known to be supported by VS. Inspired-by: Gilles Khouzam diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 5189569..c708a08 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -148,20 +148,46 @@ bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s, } //---------------------------------------------------------------------------- -bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile*) +bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf) { if(this->SystemName == "WindowsPhone") { this->SystemIsWindowsPhone = true; + if(!this->InitializeWindowsPhone(mf)) + { + return false; + } } else if(this->SystemName == "WindowsStore") { this->SystemIsWindowsStore = true; + if(!this->InitializeWindowsStore(mf)) + { + return false; + } } return true; } //---------------------------------------------------------------------------- +bool cmGlobalVisualStudio10Generator::InitializeWindowsPhone(cmMakefile* mf) +{ + cmOStringStream e; + e << this->GetName() << " does not support Windows Phone."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; +} + +//---------------------------------------------------------------------------- +bool cmGlobalVisualStudio10Generator::InitializeWindowsStore(cmMakefile* mf) +{ + cmOStringStream e; + e << this->GetName() << " does not support Windows Store."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; +} + +//---------------------------------------------------------------------------- void cmGlobalVisualStudio10Generator ::AddVSPlatformToolsetDefinition(cmMakefile* mf) const { diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index e3156bf..6245b28 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -107,6 +107,10 @@ public: protected: virtual void Generate(); virtual bool InitializeSystem(cmMakefile* mf); + virtual bool InitializeWindowsPhone(cmMakefile* mf); + virtual bool InitializeWindowsStore(cmMakefile* mf); + virtual std::string SelectWindowsPhoneToolset() const { return ""; } + virtual std::string SelectWindowsStoreToolset() const { return ""; } virtual const char* GetIDEVersion() { return "10.0"; } diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index e5a159b..33cfaa1 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -129,6 +129,56 @@ cmGlobalVisualStudio11Generator::MatchesGeneratorName( } //---------------------------------------------------------------------------- +bool cmGlobalVisualStudio11Generator::InitializeWindowsPhone(cmMakefile* mf) +{ + this->DefaultPlatformToolset = this->SelectWindowsPhoneToolset(); + if(this->DefaultPlatformToolset.empty()) + { + cmOStringStream e; + e << this->GetName() << " supports Windows Phone '8.0', but not '" + << this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmGlobalVisualStudio11Generator::InitializeWindowsStore(cmMakefile* mf) +{ + this->DefaultPlatformToolset = this->SelectWindowsStoreToolset(); + if(this->DefaultPlatformToolset.empty()) + { + cmOStringStream e; + e << this->GetName() << " supports Windows Store '8.0', but not '" + << this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio11Generator::SelectWindowsPhoneToolset() const +{ + if(this->SystemVersion == "8.0") + { + return "v110_wp80"; + } + return this->cmGlobalVisualStudio10Generator::SelectWindowsPhoneToolset(); +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio11Generator::SelectWindowsStoreToolset() const +{ + if(this->SystemVersion == "8.0") + { + return "v110"; + } + return this->cmGlobalVisualStudio10Generator::SelectWindowsStoreToolset(); +} + +//---------------------------------------------------------------------------- void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout) { fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index 3d89a94..0b497db 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -34,6 +34,10 @@ public: /** TODO: VS 11 user macro support. */ virtual std::string GetUserMacrosDirectory() { return ""; } protected: + virtual bool InitializeWindowsPhone(cmMakefile* mf); + virtual bool InitializeWindowsStore(cmMakefile* mf); + virtual std::string SelectWindowsPhoneToolset() const; + virtual std::string SelectWindowsStoreToolset() const; virtual const char* GetIDEVersion() { return "11.0"; } bool UseFolderProperty(); static std::set GetInstalledWindowsCESDKs(); diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 4235cbc..29ecfe0 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -109,6 +109,56 @@ cmGlobalVisualStudio12Generator::MatchesGeneratorName( } //---------------------------------------------------------------------------- +bool cmGlobalVisualStudio12Generator::InitializeWindowsPhone(cmMakefile* mf) +{ + this->DefaultPlatformToolset = this->SelectWindowsPhoneToolset(); + if(this->DefaultPlatformToolset.empty()) + { + cmOStringStream e; + e << this->GetName() << " supports Windows Phone '8.0' and '8.1', " + "but not '" << this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmGlobalVisualStudio12Generator::InitializeWindowsStore(cmMakefile* mf) +{ + this->DefaultPlatformToolset = this->SelectWindowsStoreToolset(); + if(this->DefaultPlatformToolset.empty()) + { + cmOStringStream e; + e << this->GetName() << " supports Windows Store '8.0' and '8.1', " + "but not '" << this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio12Generator::SelectWindowsPhoneToolset() const +{ + if(this->SystemVersion == "8.1") + { + return "v120_wp81"; + } + return this->cmGlobalVisualStudio11Generator::SelectWindowsPhoneToolset(); +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio12Generator::SelectWindowsStoreToolset() const +{ + if(this->SystemVersion == "8.1") + { + return "v120"; + } + return this->cmGlobalVisualStudio11Generator::SelectWindowsStoreToolset(); +} + +//---------------------------------------------------------------------------- void cmGlobalVisualStudio12Generator::WriteSLNHeader(std::ostream& fout) { fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index 8ac2d1d..ec85f10 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -39,6 +39,10 @@ public: //version number virtual const char* GetToolsVersion() { return "12.0"; } protected: + virtual bool InitializeWindowsPhone(cmMakefile* mf); + virtual bool InitializeWindowsStore(cmMakefile* mf); + virtual std::string SelectWindowsPhoneToolset() const; + virtual std::string SelectWindowsStoreToolset() const; virtual const char* GetIDEVersion() { return "12.0"; } private: class Factory; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3abd150ce9df03e24a903dedc952339b58ba79cb commit 3abd150ce9df03e24a903dedc952339b58ba79cb Author: Brad King AuthorDate: Tue Jul 29 11:42:30 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:08:43 2014 -0400 VS: Save WindowsPhone and WindowsStore system internally Add boolean members to the VS >= 10 global generator to save whether CMAKE_SYSTEM_NAME is WindowsPhone or WindowsStore without having to repeat a string comparison. Inspired-by: Gilles Khouzam diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 4007789..5189569 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -97,6 +97,8 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( this->ExpressEdition = cmSystemTools::ReadRegistryValue( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0\\Setup\\VC;" "ProductDir", vc10Express, cmSystemTools::KeyWOW64_32); + this->SystemIsWindowsPhone = false; + this->SystemIsWindowsStore = false; this->MasmEnabled = false; this->MSBuildCommandInitialized = false; } @@ -148,6 +150,14 @@ bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s, //---------------------------------------------------------------------------- bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile*) { + if(this->SystemName == "WindowsPhone") + { + this->SystemIsWindowsPhone = true; + } + else if(this->SystemName == "WindowsStore") + { + this->SystemIsWindowsStore = true; + } return true; } diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index b042559..e3156bf 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -70,6 +70,14 @@ public: /** Return the CMAKE_SYSTEM_VERSION. */ std::string const& GetSystemVersion() const { return this->SystemVersion; } + /** Return true if building for WindowsPhone */ + bool TargetsWindowsPhone() const + { return this->SystemIsWindowsPhone; } + + /** Return true if building for WindowsStore */ + bool TargetsWindowsStore() const + { return this->SystemIsWindowsStore; } + /** * Where does this version of Visual Studio look for macros for the * current user? Returns the empty string if this version of Visual @@ -108,6 +116,8 @@ protected: std::string DefaultPlatformToolset; std::string SystemName; std::string SystemVersion; + bool SystemIsWindowsPhone; + bool SystemIsWindowsStore; bool ExpressEdition; bool MasmEnabled; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c1580a9217ee2447433c76eca2ad0e6be6347a57 commit c1580a9217ee2447433c76eca2ad0e6be6347a57 Author: Brad King AuthorDate: Thu Jul 31 14:03:03 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:08:41 2014 -0400 VS: Always add IgnoreSpecificDefaultLibraries to .vcxproj files Append %(IgnoreSpecificDefaultLibraries) to any user-specified libraries so that the system-default list of libraries to ignore is honored even when the user specifies more. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 6989d95..18d8951 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1864,6 +1864,8 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) { linkOptions.AddFlag("ModuleDefinitionFile", def.c_str()); } + linkOptions.AppendFlag("IgnoreSpecificDefaultLibraries", + "%(IgnoreSpecificDefaultLibraries)"); } this->LinkOptions[config] = pOptions.release(); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29410df23d4783de9d90a6d8c24cf7c9c5aacc80 commit 29410df23d4783de9d90a6d8c24cf7c9c5aacc80 Author: Brad King AuthorDate: Thu Jul 31 14:02:03 2014 -0400 Commit: Brad King CommitDate: Thu Jul 31 14:08:39 2014 -0400 cmIDEOptions: Add an AppendFlag method to update multi-valued options diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index dfbece7..72bd593 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -196,6 +196,13 @@ void cmIDEOptions::AddFlag(const char* flag, } //---------------------------------------------------------------------------- +void cmIDEOptions::AppendFlag(std::string const& flag, + std::string const& value) +{ + this->FlagMap[flag].push_back(value); +} + +//---------------------------------------------------------------------------- void cmIDEOptions::RemoveFlag(const char* flag) { this->FlagMap.erase(flag); diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index 313c003..9b60f80 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -30,6 +30,7 @@ public: void AddDefines(const std::vector &defines); void AddFlag(const char* flag, const char* value); void AddFlag(const char* flag, std::vector const& value); + void AppendFlag(std::string const& flag, std::string const& value); void RemoveFlag(const char* flag); const char* GetFlag(const char* flag); ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 2 + Help/variable/WINDOWS_PHONE.rst | 5 ++ Help/variable/WINDOWS_STORE.rst | 5 ++ Modules/CMakeDetermineCompilerId.cmake | 12 ++++ Modules/CompilerId/VS-10.vcxproj.in | 2 + Modules/Platform/Windows-MSVC.cmake | 18 ++++-- Modules/Platform/Windows.cmake | 4 ++ ...wsCE-MSVC-C.cmake => WindowsPhone-MSVC-C.cmake} | 0 ...-MSVC-CXX.cmake => WindowsPhone-MSVC-CXX.cmake} | 0 .../{WindowsCE.cmake => WindowsPhone.cmake} | 0 ...wsCE-MSVC-C.cmake => WindowsStore-MSVC-C.cmake} | 0 ...-MSVC-CXX.cmake => WindowsStore-MSVC-CXX.cmake} | 0 .../{WindowsCE.cmake => WindowsStore.cmake} | 0 Source/cmGlobalVisualStudio10Generator.cxx | 38 +++++++++++- Source/cmGlobalVisualStudio10Generator.h | 14 +++++ Source/cmGlobalVisualStudio11Generator.cxx | 64 ++++++++++++++++++++ Source/cmGlobalVisualStudio11Generator.h | 7 +++ Source/cmGlobalVisualStudio12Generator.cxx | 50 +++++++++++++++ Source/cmGlobalVisualStudio12Generator.h | 4 ++ Source/cmIDEOptions.cxx | 7 +++ Source/cmIDEOptions.h | 1 + Source/cmVisualStudio10TargetGenerator.cxx | 36 +++++++++++ Source/cmVisualStudio10TargetGenerator.h | 1 + 23 files changed, 265 insertions(+), 5 deletions(-) create mode 100644 Help/variable/WINDOWS_PHONE.rst create mode 100644 Help/variable/WINDOWS_STORE.rst copy Modules/Platform/{WindowsCE-MSVC-C.cmake => WindowsPhone-MSVC-C.cmake} (100%) copy Modules/Platform/{WindowsCE-MSVC-CXX.cmake => WindowsPhone-MSVC-CXX.cmake} (100%) copy Modules/Platform/{WindowsCE.cmake => WindowsPhone.cmake} (100%) copy Modules/Platform/{WindowsCE-MSVC-C.cmake => WindowsStore-MSVC-C.cmake} (100%) copy Modules/Platform/{WindowsCE-MSVC-CXX.cmake => WindowsStore-MSVC-CXX.cmake} (100%) copy Modules/Platform/{WindowsCE.cmake => WindowsStore.cmake} (100%) hooks/post-receive -- CMake From clinton at elemtech.com Mon Aug 4 11:08:40 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 4 Aug 2014 11:08:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4744-g2ce89b4 Message-ID: <20140804150840.F29AF5007C@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, next has been updated via 2ce89b454085b5432bdf05f0c86af0e3879f6c75 (commit) via c979c60c4386b844bfe0d2dc3a8e64da1318c561 (commit) via cf4a7eb0272555119489b7eacd88eb785c496ce2 (commit) from 0df50f497c4c4937e882b6ea7048980e52e855d0 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2ce89b454085b5432bdf05f0c86af0e3879f6c75 commit 2ce89b454085b5432bdf05f0c86af0e3879f6c75 Merge: 0df50f4 c979c60 Author: Clinton Stimpson AuthorDate: Mon Aug 4 11:08:40 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 11:08:40 2014 -0400 Merge topic 'qt-automoc' into next c979c60c Qt: Enable running automoc test with Qt4 or Qt5. cf4a7eb0 Qt: Fix automoc when .h and .cpp are in different directories. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c979c60c4386b844bfe0d2dc3a8e64da1318c561 commit c979c60c4386b844bfe0d2dc3a8e64da1318c561 Author: Clinton Stimpson AuthorDate: Mon Aug 4 08:14:52 2014 -0600 Commit: Clinton Stimpson CommitDate: Mon Aug 4 09:08:16 2014 -0600 Qt: Enable running automoc test with Qt4 or Qt5. Previously, the automoc tests required both Qt4 and Qt5. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index ca7fcdc..1402c95 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1201,7 +1201,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Targets") - if(Qt5Widgets_FOUND AND NOT Qt5Widgets_VERSION VERSION_LESS 5.1.0) + endif() + + if((QT4_WORKS AND QT_QTGUI_FOUND) OR + (Qt5Widgets_FOUND AND NOT Qt5Widgets_VERSION VERSION_LESS 5.1.0) ) add_test(Qt4And5Automoc ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/Qt4And5Automoc" @@ -1226,7 +1229,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release --test-command ${CMAKE_CTEST_COMMAND} -V ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4And5AutomocReverse") - endif() endif() find_package(GTK2 QUIET) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf4a7eb0272555119489b7eacd88eb785c496ce2 commit cf4a7eb0272555119489b7eacd88eb785c496ce2 Author: Clinton Stimpson AuthorDate: Mon Aug 4 08:11:31 2014 -0600 Commit: Clinton Stimpson CommitDate: Mon Aug 4 09:08:00 2014 -0600 Qt: Fix automoc when .h and .cpp are in different directories. Thanks Lode Leroy for the patch. diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index d4d565c..76edad5 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1830,30 +1830,57 @@ cmQtAutoGenerators::SearchHeadersForCppFile(const std::string& absFilename, const std::string basename = cmsys::SystemTools::GetFilenameWithoutLastExtension(absFilename); const std::string absPath = cmsys::SystemTools::GetFilenamePath( - cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/'; + cmsys::SystemTools::GetRealPath(absFilename.c_str())); - for(std::vector::const_iterator ext = headerExtensions.begin(); - ext != headerExtensions.end(); - ++ext) + std::vector incPaths; + incPaths.push_back(absPath); + cmSystemTools::ExpandListArgument(this->MocIncludesStr, incPaths); + + for(std::vector::const_iterator path = incPaths.begin(); + path != incPaths.end(); + ++path) + { + bool found = false; + for(std::vector::const_iterator ext = + headerExtensions.begin(); + ext != headerExtensions.end(); + ++ext) { - const std::string headerName = absPath + basename + "." + (*ext); - if (cmsys::SystemTools::FileExists(headerName.c_str())) + const std::string headerName = (*path) + "/" + basename + "." + (*ext); + + if (cmsys::SystemTools::FileExists(headerName.c_str())) { - absHeaders.insert(headerName); - break; + absHeaders.insert(headerName); + found = true; + break; } } - for(std::vector::const_iterator ext = headerExtensions.begin(); - ext != headerExtensions.end(); - ++ext) + if (found) + break; + } + for(std::vector::const_iterator path = incPaths.begin(); + path != incPaths.end(); + ++path) + { + bool found = false; + for(std::vector::const_iterator ext = + headerExtensions.begin(); + ext != headerExtensions.end(); + ++ext) { - const std::string privateHeaderName = absPath+basename+"_p."+(*ext); - if (cmsys::SystemTools::FileExists(privateHeaderName.c_str())) + const std::string privateHeaderName = (*path) + "/" + + basename + "_p." + (*ext); + + if (cmsys::SystemTools::FileExists(privateHeaderName.c_str())) { - absHeaders.insert(privateHeaderName); - break; + absHeaders.insert(privateHeaderName); + found = true; + break; } } + if (found) + break; + } } diff --git a/Tests/Qt4And5Automoc/AnObject.cpp b/Tests/Qt4And5Automoc/AnObject.cpp new file mode 100644 index 0000000..c1c93f1 --- /dev/null +++ b/Tests/Qt4And5Automoc/AnObject.cpp @@ -0,0 +1,4 @@ +#include "AnObject.h" + +void AnObject::activated() { +} diff --git a/Tests/Qt4And5Automoc/AnObject.h b/Tests/Qt4And5Automoc/AnObject.h new file mode 100644 index 0000000..b7c5409 --- /dev/null +++ b/Tests/Qt4And5Automoc/AnObject.h @@ -0,0 +1,9 @@ +#include + +class AnObject : public QObject { + Q_OBJECT +public: + AnObject() {} +private slots: + void activated(); +}; diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt index ad74961..7f3e81e 100644 --- a/Tests/Qt4And5Automoc/CMakeLists.txt +++ b/Tests/Qt4And5Automoc/CMakeLists.txt @@ -1,13 +1,13 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.0.1) project(Qt4And5Automoc) if (QT_REVERSE_FIND_ORDER) - find_package(Qt5Core REQUIRED) - find_package(Qt4 REQUIRED) + find_package(Qt5Core) + find_package(Qt4) else() - find_package(Qt4 REQUIRED) - find_package(Qt5Core REQUIRED) + find_package(Qt4) + find_package(Qt5Core) endif() set(CMAKE_AUTOMOC ON) @@ -20,10 +20,16 @@ macro(generate_main_file VERSION) ) endmacro() -generate_main_file(4) -generate_main_file(5) +include_directories(include) -add_executable(qt4_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt4.cpp") +if (${QT4_FOUND}) +generate_main_file(4) +add_executable(qt4_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt4.cpp" AnObject.cpp src/OtherObject.cpp) target_link_libraries(qt4_exe Qt4::QtCore) -add_executable(qt5_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt5.cpp") +endif() + +if (${QT5_FOUND}) +generate_main_file(5) +add_executable(qt5_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt5.cpp" AnObject.cpp src/OtherObject.cpp) target_link_libraries(qt5_exe Qt5::Core) +endif() diff --git a/Tests/Qt4And5Automoc/include/OtherObject.h b/Tests/Qt4And5Automoc/include/OtherObject.h new file mode 100644 index 0000000..6d51cc1 --- /dev/null +++ b/Tests/Qt4And5Automoc/include/OtherObject.h @@ -0,0 +1,9 @@ +#include + +class OtherObject : public QObject { + Q_OBJECT +public: + OtherObject() {} +private slots: + void activated(); +}; diff --git a/Tests/Qt4And5Automoc/main.cpp.in b/Tests/Qt4And5Automoc/main.cpp.in index 00fd641..7852cd6 100644 --- a/Tests/Qt4And5Automoc/main.cpp.in +++ b/Tests/Qt4And5Automoc/main.cpp.in @@ -1,5 +1,7 @@ #include +#include "AnObject.h" +#include "OtherObject.h" class SomeObject : public QObject { @@ -14,5 +16,7 @@ public: int main(int argc, char **argv) { + AnObject a; + OtherObject o; return 0; } diff --git a/Tests/Qt4And5Automoc/src/OtherObject.cpp b/Tests/Qt4And5Automoc/src/OtherObject.cpp new file mode 100644 index 0000000..d4e724a --- /dev/null +++ b/Tests/Qt4And5Automoc/src/OtherObject.cpp @@ -0,0 +1,4 @@ +#include "OtherObject.h" + +void OtherObject::activated() { +} ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From clinton at elemtech.com Mon Aug 4 12:53:38 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 4 Aug 2014 12:53:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4747-g7b81cf8 Message-ID: <20140804165338.42C7A505C6@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, next has been updated via 7b81cf8943c519fa76c781afdcdc54eac08b3bfb (commit) via 556635f5eb4f20052de4c5fa84d17bfa44764520 (commit) via 0397a7d76906b11d97380e7073dd7183353980b6 (commit) from 2ce89b454085b5432bdf05f0c86af0e3879f6c75 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b81cf8943c519fa76c781afdcdc54eac08b3bfb commit 7b81cf8943c519fa76c781afdcdc54eac08b3bfb Merge: 2ce89b4 556635f Author: Clinton Stimpson AuthorDate: Mon Aug 4 12:53:37 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 12:53:37 2014 -0400 Merge topic 'file-strings-encoding' into next 556635f5 cmFileCommand: Add ENCODING option to file(STRINGS ...) 0397a7d7 cmFileCommand: Refactor handling for file(STRINGS ...). http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=556635f5eb4f20052de4c5fa84d17bfa44764520 commit 556635f5eb4f20052de4c5fa84d17bfa44764520 Author: Clinton Stimpson AuthorDate: Mon Aug 4 10:47:22 2014 -0600 Commit: Clinton Stimpson CommitDate: Mon Aug 4 10:52:50 2014 -0600 cmFileCommand: Add ENCODING option to file(STRINGS ...) For now, UTF8 encoding support is added. This addresses issue #10519. diff --git a/Help/command/file.rst b/Help/command/file.rst index 58e3a26..5f93686 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -64,6 +64,9 @@ Parse a list of ASCII strings from ```` and store it in ``REGEX `` Consider only strings that match the given regular expression. +``ENCODING `` + Consider strings of a given encoding. "UTF8" is currently supported. + For example, the code .. code-block:: cmake diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index b99b1c7..34c0d73 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -428,7 +428,8 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) arg_length_minimum, arg_length_maximum, arg__maximum, - arg_regex }; + arg_regex, + arg_encoding }; unsigned int minlen = 0; unsigned int maxlen = 0; int limit_input = -1; @@ -438,6 +439,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) bool have_regex = false; bool newline_consume = false; bool hex_conversion_enabled = true; + bool utf8_encoding = false; int arg_mode = arg_none; for(unsigned int i=3; i < args.size(); ++i) { @@ -475,6 +477,10 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) hex_conversion_enabled = false; arg_mode = arg_none; } + else if(args[i] == "ENCODING") + { + arg_mode = arg_encoding; + } else if(arg_mode == arg_limit_input) { if(sscanf(args[i].c_str(), "%d", &limit_input) != 1 || @@ -556,6 +562,22 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) have_regex = true; arg_mode = arg_none; } + else if(arg_mode == arg_encoding) + { + if(args[i] == "UTF8") + { + utf8_encoding = true; + } + else + { + cmOStringStream e; + e << "STRINGS option ENCODING \"" + << args[i] << "\" not recognized."; + this->SetError(e.str()); + return false; + } + arg_mode = arg_none; + } else { cmOStringStream e; @@ -618,6 +640,52 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) // c is guaranteed to fit in char by the above if... current_str += static_cast(c); } + else if(utf8_encoding) + { + // Check for UTF-8 encoded string (up to 4 octets) + static const unsigned char utf8_check_table[3][2] = + { + {0xE0, 0xC0}, + {0xF0, 0xE0}, + {0xF8, 0xF0}, + }; + + // how many octets are there? + unsigned int num_utf8_bytes = 0; + for(unsigned int j=0; num_utf8_bytes == 0 && j<3; j++) + { + if((c & utf8_check_table[j][0]) == utf8_check_table[j][1]) + num_utf8_bytes = j+2; + } + + // get subsequent octets and check that they are valid + for(unsigned int j=0; j(c); + } + + // if this was an invalid utf8 sequence, discard the data, and put + // back subsequent characters + if((current_str.length() != num_utf8_bytes)) + { + for(unsigned int j=0; j AuthorDate: Mon Aug 4 10:45:13 2014 -0600 Commit: Clinton Stimpson CommitDate: Mon Aug 4 10:52:26 2014 -0600 cmFileCommand: Refactor handling for file(STRINGS ...). This refactor will make room for encoding support. diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index e47365a..b99b1c7 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -596,11 +596,29 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) int output_size = 0; std::vector strings; std::string s; - int c; while((!limit_count || strings.size() < limit_count) && (limit_input < 0 || static_cast(fin.tellg()) < limit_input) && - (c = fin.get(), fin)) + fin) { + std::string current_str; + + int c = fin.get(); + + if(c == '\r') + { + // Ignore CR character to make output always have UNIX newlines. + continue; + } + + else if((c >= 0x20 && c < 0x7F) || c == '\t' || + (c == '\n' && newline_consume)) + { + // This is an ASCII character that may be part of a string. + // Cast added to avoid compiler warning. Cast is ok because + // c is guaranteed to fit in char by the above if... + current_str += static_cast(c); + } + if(c == '\n' && !newline_consume) { // The current line has been terminated. Check if the current @@ -621,26 +639,13 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) // Reset the string to empty. s = ""; } - else if(c == '\r') - { - // Ignore CR character to make output always have UNIX newlines. - } - else if((c >= 0x20 && c < 0x7F) || c == '\t' || - (c == '\n' && newline_consume)) + else if(current_str.empty()) { - // This is an ASCII character that may be part of a string. - // Cast added to avoid compiler warning. Cast is ok because - // c is guaranteed to fit in char by the above if... - s += static_cast(c); - } - else - { - // TODO: Support ENCODING option. See issue #10519. // A non-string character has been found. Check if the current // string matches the requirements. We require that the length // be at least one no matter what the user specified. if(s.length() >= minlen && s.length() >= 1 && - (!have_regex || regex.find(s.c_str()))) + (!have_regex || regex.find(s.c_str()))) { output_size += static_cast(s.size()) + 1; if(limit_output >= 0 && output_size >= limit_output) @@ -654,10 +659,15 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) // Reset the string to empty. s = ""; } + else + { + s += current_str; + } + - // Terminate a string if the maximum length is reached. if(maxlen > 0 && s.size() == maxlen) { + // Terminate a string if the maximum length is reached. if(s.length() >= minlen && (!have_regex || regex.find(s.c_str()))) { ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From clinton at elemtech.com Mon Aug 4 13:31:29 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 4 Aug 2014 13:31:29 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4749-g6562e32 Message-ID: <20140804173129.6D3D8501DA@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, next has been updated via 6562e3204db04bf6f5256b090db751d0ca9136dd (commit) via 5493ba5ec8d5ea156c3ea8f0d1e1805a7f6dadf3 (commit) from 7b81cf8943c519fa76c781afdcdc54eac08b3bfb (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6562e3204db04bf6f5256b090db751d0ca9136dd commit 6562e3204db04bf6f5256b090db751d0ca9136dd Merge: 7b81cf8 5493ba5 Author: Clinton Stimpson AuthorDate: Mon Aug 4 13:31:28 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 13:31:28 2014 -0400 Merge topic 'file-strings-encoding' into next 5493ba5e cmFileCommand: Change "UTF8" argument to "UTF-8" http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5493ba5ec8d5ea156c3ea8f0d1e1805a7f6dadf3 commit 5493ba5ec8d5ea156c3ea8f0d1e1805a7f6dadf3 Author: Clinton Stimpson AuthorDate: Mon Aug 4 11:30:09 2014 -0600 Commit: Clinton Stimpson CommitDate: Mon Aug 4 11:30:09 2014 -0600 cmFileCommand: Change "UTF8" argument to "UTF-8" diff --git a/Help/command/file.rst b/Help/command/file.rst index 5f93686..dbc4149 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -65,7 +65,7 @@ Parse a list of ASCII strings from ```` and store it in Consider only strings that match the given regular expression. ``ENCODING `` - Consider strings of a given encoding. "UTF8" is currently supported. + Consider strings of a given encoding. "UTF-8" is currently supported. For example, the code diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 34c0d73..52571e2 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -564,7 +564,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) } else if(arg_mode == arg_encoding) { - if(args[i] == "UTF8") + if(args[i] == "UTF-8") { utf8_encoding = true; } diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt index c46bef6..2107488 100644 --- a/Tests/StringFileTest/CMakeLists.txt +++ b/Tests/StringFileTest/CMakeLists.txt @@ -56,7 +56,7 @@ else() endif() #this file has utf-8 content -FILE(STRINGS test.utf8 infile_strings ENCODING UTF8) +FILE(STRINGS test.utf8 infile_strings ENCODING UTF-8) list(LENGTH infile_strings content_len) if(content_len MATCHES "3") message("file(STRINGS) correctly read from utf8 file [${infile_strings}]") ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 2 +- Source/cmFileCommand.cxx | 2 +- Tests/StringFileTest/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From clinton at elemtech.com Mon Aug 4 14:26:37 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 4 Aug 2014 14:26:37 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4751-gf197197 Message-ID: <20140804182637.AD8614FD0D@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, next has been updated via f1971971c9c23f1d2819d64e189ce01a15362ac4 (commit) via 414a1b6e13766a73dd1c7618465d0bcc57a80805 (commit) from 6562e3204db04bf6f5256b090db751d0ca9136dd (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f1971971c9c23f1d2819d64e189ce01a15362ac4 commit f1971971c9c23f1d2819d64e189ce01a15362ac4 Merge: 6562e32 414a1b6 Author: Clinton Stimpson AuthorDate: Mon Aug 4 14:26:37 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 14:26:37 2014 -0400 Merge topic 'file-strings-encoding' into next 414a1b6e cmFileCommand: Fix style and compile issues. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=414a1b6e13766a73dd1c7618465d0bcc57a80805 commit 414a1b6e13766a73dd1c7618465d0bcc57a80805 Author: Clinton Stimpson AuthorDate: Mon Aug 4 12:26:13 2014 -0600 Commit: Clinton Stimpson CommitDate: Mon Aug 4 12:26:13 2014 -0600 cmFileCommand: Fix style and compile issues. diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 52571e2..d55c44b 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -682,7 +682,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) c = current_str[current_str.size() - 1 - j]; fin.putback(c); } - current_str.clear(); + current_str = ""; } } diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt index 2107488..683f969 100644 --- a/Tests/StringFileTest/CMakeLists.txt +++ b/Tests/StringFileTest/CMakeLists.txt @@ -56,7 +56,7 @@ else() endif() #this file has utf-8 content -FILE(STRINGS test.utf8 infile_strings ENCODING UTF-8) +file(STRINGS test.utf8 infile_strings ENCODING UTF-8) list(LENGTH infile_strings content_len) if(content_len MATCHES "3") message("file(STRINGS) correctly read from utf8 file [${infile_strings}]") ----------------------------------------------------------------------- Summary of changes: Source/cmFileCommand.cxx | 2 +- Tests/StringFileTest/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From bill.hoffman at kitware.com Mon Aug 4 15:20:40 2014 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Mon, 4 Aug 2014 15:20:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4753-ge951857 Message-ID: <20140804192040.73D03501DA@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, next has been updated via e951857e6a54a6920e4ab9d198c4d6a4612285bd (commit) via 7762fffa238a9bbc28658742792c25c10a7cc9c5 (commit) from f1971971c9c23f1d2819d64e189ce01a15362ac4 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e951857e6a54a6920e4ab9d198c4d6a4612285bd commit e951857e6a54a6920e4ab9d198c4d6a4612285bd Merge: f197197 7762fff Author: Bill Hoffman AuthorDate: Mon Aug 4 15:20:39 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 15:20:39 2014 -0400 Merge topic 'pass_output_by_reference' into next 7762fffa Change output to be a reference and not a pointer. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7762fffa238a9bbc28658742792c25c10a7cc9c5 commit 7762fffa238a9bbc28658742792c25c10a7cc9c5 Author: Bill Hoffman AuthorDate: Mon Aug 4 15:16:40 2014 -0400 Commit: Bill Hoffman CommitDate: Mon Aug 4 15:16:40 2014 -0400 Change output to be a reference and not a pointer. This avoids having to check the pointer value at each use which was not being done. diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx index a6e39a4..c492bf0 100644 --- a/Source/CTest/cmCTestConfigureHandler.cxx +++ b/Source/CTest/cmCTestConfigureHandler.cxx @@ -77,7 +77,7 @@ int cmCTestConfigureHandler::ProcessHandler() this->StartLogFile("Configure", ofs); cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Configure with command: " << cCommand << std::endl); - res = this->CTest->RunMakeCommand(cCommand.c_str(), &output, + res = this->CTest->RunMakeCommand(cCommand.c_str(), output, &retVal, buildDirectory.c_str(), 0, ofs); diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index d797d3b..b28f3b5 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1147,7 +1147,7 @@ int cmCTest::GetTestModelFromString(const char* str) //###################################################################### //---------------------------------------------------------------------- -int cmCTest::RunMakeCommand(const char* command, std::string* output, +int cmCTest::RunMakeCommand(const char* command, std::string& output, int* retVal, const char* dir, int timeout, std::ostream& ofs) { // First generate the command and arguments @@ -1166,11 +1166,7 @@ int cmCTest::RunMakeCommand(const char* command, std::string* output, } argv.push_back(0); - if ( output ) - { - *output = ""; - } - + output = ""; cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Run command:"); std::vector::iterator ait; for ( ait = argv.begin(); ait != argv.end() && *ait; ++ ait ) @@ -1199,27 +1195,25 @@ int cmCTest::RunMakeCommand(const char* command, std::string* output, << " " << std::flush); while(cmsysProcess_WaitForData(cp, &data, &length, 0)) { - if ( output ) + for(int cc =0; cc < length; ++cc) { - for(int cc =0; cc < length; ++cc) + if(data[cc] == 0) { - if(data[cc] == 0) - { - data[cc] = '\n'; - } + data[cc] = '\n'; } - - output->append(data, length); - while ( output->size() > (tick * tick_len) ) + } + output.append(data, length); + while ( output.size() > (tick * tick_len) ) + { + tick ++; + cmCTestLog(this, HANDLER_OUTPUT, "." << std::flush); + if ( tick % tick_line_len == 0 && tick > 0 ) { - tick ++; - cmCTestLog(this, HANDLER_OUTPUT, "." << std::flush); - if ( tick % tick_line_len == 0 && tick > 0 ) - { - cmCTestLog(this, HANDLER_OUTPUT, " Size: " - << int((double(output->size()) / 1024.0) + 1) << "K" << std::endl - << " " << std::flush); - } + cmCTestLog(this, HANDLER_OUTPUT, + " Size: " + << int((double(output.size()) / 1024.0) + 1) + << "K" << std::endl + << " " << std::flush); } } cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, cmCTestLogWrite(data, length)); @@ -1229,7 +1223,7 @@ int cmCTest::RunMakeCommand(const char* command, std::string* output, } } cmCTestLog(this, OUTPUT, " Size of output: " - << int(double(output->size()) / 1024.0) << "K" << std::endl); + << int(double(output.size()) / 1024.0) << "K" << std::endl); cmsysProcess_WaitForExit(cp, 0); @@ -1253,9 +1247,9 @@ int cmCTest::RunMakeCommand(const char* command, std::string* output, } else if(result == cmsysProcess_State_Error) { - *output += "\n*** ERROR executing: "; - *output += cmsysProcess_GetErrorString(cp); - *output += "\n***The build process failed."; + output += "\n*** ERROR executing: "; + output += cmsysProcess_GetErrorString(cp); + output += "\n***The build process failed."; cmCTestLog(this, ERROR_MESSAGE, "There was an error: " << cmsysProcess_GetErrorString(cp) << std::endl); } diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 246294f..e19d32c 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -271,7 +271,7 @@ public: //! Run command specialized for make and configure. Returns process status // and retVal is return value or exception. - int RunMakeCommand(const char* command, std::string* output, + int RunMakeCommand(const char* command, std::string& output, int* retVal, const char* dir, int timeout, std::ostream& ofs); ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestConfigureHandler.cxx | 2 +- Source/cmCTest.cxx | 48 +++++++++++++----------------- Source/cmCTest.h | 2 +- 3 files changed, 23 insertions(+), 29 deletions(-) hooks/post-receive -- CMake From bill.hoffman at kitware.com Mon Aug 4 15:34:29 2014 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Mon, 4 Aug 2014 15:34:29 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4755-ge9a8991 Message-ID: <20140804193429.7878B50658@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, next has been updated via e9a89912e887da393c818d0fc2a84c6798fcfe2e (commit) via b35a7730ce8c6ce853d359654d436334c452aec6 (commit) from e951857e6a54a6920e4ab9d198c4d6a4612285bd (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9a89912e887da393c818d0fc2a84c6798fcfe2e commit e9a89912e887da393c818d0fc2a84c6798fcfe2e Merge: e951857 b35a773 Author: Bill Hoffman AuthorDate: Mon Aug 4 15:34:28 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 15:34:28 2014 -0400 Merge topic 'fix_truncation_logic_valgrind_output' into next b35a7730 Fix truncation of valgrind output logic. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b35a7730ce8c6ce853d359654d436334c452aec6 commit b35a7730ce8c6ce853d359654d436334c452aec6 Author: Bill Hoffman AuthorDate: Mon Aug 4 15:28:48 2014 -0400 Commit: Bill Hoffman CommitDate: Mon Aug 4 15:28:48 2014 -0400 Fix truncation of valgrind output logic. This showed up because scan-build noticed outputFull was basically a constant. Logic should be output all valgrind output. Then output regular test output until output limit is reached. diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index ced7982..a7ab077 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -932,7 +932,6 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( double sttime = cmSystemTools::GetTime(); cmCTestLog(this->CTest, DEBUG, "Start test: " << lines.size() << std::endl); std::string::size_type totalOutputSize = 0; - bool outputFull = false; for ( cc = 0; cc < lines.size(); cc ++ ) { cmCTestLog(this->CTest, DEBUG, "test line " @@ -1019,32 +1018,30 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( } } // Now put all all the non valgrind output into the test output - if(!outputFull) + // This should be last in case it gets truncated by the output + // limiting code + for(std::vector::iterator i = + nonValGrindOutput.begin(); i != nonValGrindOutput.end(); ++i) { - for(std::vector::iterator i = - nonValGrindOutput.begin(); i != nonValGrindOutput.end(); ++i) + totalOutputSize += lines[*i].size(); + cmCTestLog(this->CTest, DEBUG, "before xml safe " + << lines[*i] << std::endl); + cmCTestLog(this->CTest, DEBUG, "after xml safe " + << cmXMLSafe(lines[*i]) << std::endl); + ostr << cmXMLSafe(lines[*i]) << std::endl; + if(!unlimitedOutput && totalOutputSize > + static_cast(this->CustomMaximumFailedTestOutputSize)) { - totalOutputSize += lines[*i].size(); - cmCTestLog(this->CTest, DEBUG, "before xml safe " - << lines[*i] << std::endl); - cmCTestLog(this->CTest, DEBUG, "after xml safe " - << cmXMLSafe(lines[*i]) << std::endl); - - ostr << cmXMLSafe(lines[*i]) << std::endl; - if(!unlimitedOutput && totalOutputSize > - static_cast(this->CustomMaximumFailedTestOutputSize)) - { - outputFull = true; - ostr << "....\n"; - ostr << "Test Output for this test has been truncated see testing" - " machine logs for full output,\n"; - ostr << "or put CTEST_FULL_OUTPUT in the output of " - "this test program.\n"; - } + ostr << "....\n"; + ostr << "Test Output for this test has been truncated see testing" + " machine logs for full output,\n"; + ostr << "or put CTEST_FULL_OUTPUT in the output of " + "this test program.\n"; + break; // stop the copy of output if we are full } } cmCTestLog(this->CTest, DEBUG, "End test (elapsed: " - << (cmSystemTools::GetTime() - sttime) << std::endl); + << (cmSystemTools::GetTime() - sttime) << std::endl); log = ostr.str(); if ( defects ) { ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestMemCheckHandler.cxx | 41 ++++++++++++++----------------- 1 file changed, 19 insertions(+), 22 deletions(-) hooks/post-receive -- CMake From bill.hoffman at kitware.com Mon Aug 4 15:39:39 2014 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Mon, 4 Aug 2014 15:39:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4757-gaa373eb Message-ID: <20140804193939.C3D894F24E@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, next has been updated via aa373eb723dc596e8b129a6b2f279df27f6d3dda (commit) via aea40fcb43f3b3496c79948e4e4fe08dbe4086d5 (commit) from e9a89912e887da393c818d0fc2a84c6798fcfe2e (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa373eb723dc596e8b129a6b2f279df27f6d3dda commit aa373eb723dc596e8b129a6b2f279df27f6d3dda Merge: e9a8991 aea40fc Author: Bill Hoffman AuthorDate: Mon Aug 4 15:39:39 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 15:39:39 2014 -0400 Merge topic 'fix_value_not_used' into next aea40fcb Fix scan-build warning parsed is never read after being set. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aea40fcb43f3b3496c79948e4e4fe08dbe4086d5 commit aea40fcb43f3b3496c79948e4e4fe08dbe4086d5 Author: Bill Hoffman AuthorDate: Mon Aug 4 15:38:56 2014 -0400 Commit: Bill Hoffman CommitDate: Mon Aug 4 15:38:56 2014 -0400 Fix scan-build warning parsed is never read after being set. diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 98c62d5..c57028d 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -343,7 +343,6 @@ int main (int argc, char const* const* argv) { cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "CPack generator not specified" << std::endl); - parsed = 0; } else { ----------------------------------------------------------------------- Summary of changes: Source/CPack/cpack.cxx | 1 - 1 file changed, 1 deletion(-) hooks/post-receive -- CMake From clinton at elemtech.com Mon Aug 4 21:49:11 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 4 Aug 2014 21:49:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4759-g0c47c2f Message-ID: <20140805014911.EDD114FDDB@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, next has been updated via 0c47c2f90796aab40911b3595870801bae6ba7d7 (commit) via 8c308e7ee5061e6b68c8694f618696a72042640c (commit) from aa373eb723dc596e8b129a6b2f279df27f6d3dda (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c47c2f90796aab40911b3595870801bae6ba7d7 commit 0c47c2f90796aab40911b3595870801bae6ba7d7 Merge: aa373eb 8c308e7 Author: Clinton Stimpson AuthorDate: Mon Aug 4 21:49:11 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 4 21:49:11 2014 -0400 Merge topic 'file-strings-encoding' into next 8c308e7e cmFileCommand: Fix compile warnings. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c308e7ee5061e6b68c8694f618696a72042640c commit 8c308e7ee5061e6b68c8694f618696a72042640c Author: Clinton Stimpson AuthorDate: Mon Aug 4 19:48:35 2014 -0600 Commit: Clinton Stimpson CommitDate: Mon Aug 4 19:48:35 2014 -0600 cmFileCommand: Fix compile warnings. diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index d55c44b..1325cec 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -666,7 +666,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) c = fin.get(); if(!fin || (c & 0xC0) != 0x80) { - fin.putback(c); + fin.putback(static_cast(c)); break; } } @@ -680,7 +680,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) for(unsigned int j=0; j(c)); } current_str = ""; } ----------------------------------------------------------------------- Summary of changes: Source/cmFileCommand.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Aug 5 00:01:09 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 5 Aug 2014 00:01:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1618-ga6c1d58 Message-ID: <20140805040109.8DC1F5054C@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 a6c1d58a09c0c96a83f65b6e67d5eb5982170be7 (commit) from ba60ff99ed2ea35f8b8c24bc566b6f60d51fce53 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6c1d58a09c0c96a83f65b6e67d5eb5982170be7 commit a6c1d58a09c0c96a83f65b6e67d5eb5982170be7 Author: Kitware Robot AuthorDate: Tue Aug 5 00:01:08 2014 -0400 Commit: Kitware Robot CommitDate: Tue Aug 5 00:01:08 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 2952b93..17ec35b 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 0) -set(CMake_VERSION_PATCH 20140804) +set(CMake_VERSION_PATCH 20140805) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From clinton at elemtech.com Tue Aug 5 09:02:21 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Tue, 5 Aug 2014 09:02:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4761-g0fbb08b Message-ID: <20140805130221.BBD4C51261@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, next has been updated via 0fbb08b228c1ce0cef6d4c6332d0dbcde87b03f4 (commit) via 305c206900d7ada953e2b8de7709733f5c46cdf9 (commit) from 0c47c2f90796aab40911b3595870801bae6ba7d7 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0fbb08b228c1ce0cef6d4c6332d0dbcde87b03f4 commit 0fbb08b228c1ce0cef6d4c6332d0dbcde87b03f4 Merge: 0c47c2f 305c206 Author: Clinton Stimpson AuthorDate: Tue Aug 5 09:02:20 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 09:02:20 2014 -0400 Merge topic 'qt-automoc' into next 305c2069 Qt: Restore Qt4AndQt5Automoc test behavior. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=305c206900d7ada953e2b8de7709733f5c46cdf9 commit 305c206900d7ada953e2b8de7709733f5c46cdf9 Author: Clinton Stimpson AuthorDate: Tue Aug 5 07:00:07 2014 -0600 Commit: Clinton Stimpson CommitDate: Tue Aug 5 07:00:07 2014 -0600 Qt: Restore Qt4AndQt5Automoc test behavior. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 1402c95..ca7fcdc 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1201,10 +1201,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Targets") - endif() - - if((QT4_WORKS AND QT_QTGUI_FOUND) OR - (Qt5Widgets_FOUND AND NOT Qt5Widgets_VERSION VERSION_LESS 5.1.0) ) + if(Qt5Widgets_FOUND AND NOT Qt5Widgets_VERSION VERSION_LESS 5.1.0) add_test(Qt4And5Automoc ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/Qt4And5Automoc" @@ -1229,6 +1226,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release --test-command ${CMAKE_CTEST_COMMAND} -V ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4And5AutomocReverse") + endif() endif() find_package(GTK2 QUIET) diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt index 7f3e81e..34c8115 100644 --- a/Tests/Qt4And5Automoc/CMakeLists.txt +++ b/Tests/Qt4And5Automoc/CMakeLists.txt @@ -3,11 +3,11 @@ cmake_minimum_required(VERSION 3.0.1) project(Qt4And5Automoc) if (QT_REVERSE_FIND_ORDER) - find_package(Qt5Core) - find_package(Qt4) + find_package(Qt5Core REQUIRED) + find_package(Qt4 REQUIRED) else() - find_package(Qt4) - find_package(Qt5Core) + find_package(Qt4 REQUIRED) + find_package(Qt5Core REQUIRED) endif() set(CMAKE_AUTOMOC ON) @@ -22,14 +22,10 @@ endmacro() include_directories(include) -if (${QT4_FOUND}) generate_main_file(4) add_executable(qt4_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt4.cpp" AnObject.cpp src/OtherObject.cpp) target_link_libraries(qt4_exe Qt4::QtCore) -endif() -if (${QT5_FOUND}) generate_main_file(5) add_executable(qt5_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt5.cpp" AnObject.cpp src/OtherObject.cpp) target_link_libraries(qt5_exe Qt5::Core) -endif() ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 6 ++---- Tests/Qt4And5Automoc/CMakeLists.txt | 12 ++++-------- 2 files changed, 6 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 09:14:36 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 09:14:36 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4763-g2d89813 Message-ID: <20140805131436.79A1051310@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, next has been updated via 2d89813845f87c519339a33c43f5e1b5a11021a3 (commit) via bf89f9103410036c6b09aba79330bb41ad300bcf (commit) from 0fbb08b228c1ce0cef6d4c6332d0dbcde87b03f4 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d89813845f87c519339a33c43f5e1b5a11021a3 commit 2d89813845f87c519339a33c43f5e1b5a11021a3 Merge: 0fbb08b bf89f91 Author: Brad King AuthorDate: Tue Aug 5 09:14:35 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 09:14:35 2014 -0400 Merge topic 'CheckIncludeFiles-main-prototype' into next bf89f910 CheckIncludeFiles: Use modern C declaration for 'main' (#15058) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf89f9103410036c6b09aba79330bb41ad300bcf commit bf89f9103410036c6b09aba79330bb41ad300bcf Author: Nate Eldredge AuthorDate: Mon Aug 4 21:00:55 2014 -0600 Commit: Brad King CommitDate: Tue Aug 5 09:09:58 2014 -0400 CheckIncludeFiles: Use modern C declaration for 'main' (#15058) Otherwise some compilers will incorrectly fail the checks when certain warning/error flags are enabled. diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index eb4cf0d..f8378c0 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -53,7 +53,7 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE) "${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n") endforeach() set(CMAKE_CONFIGURABLE_FILE_CONTENT - "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(){return 0;}\n") + "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(void){return 0;}\n") configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c" @ONLY) ----------------------------------------------------------------------- Summary of changes: Modules/CheckIncludeFiles.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 09:22:27 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 09:22:27 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1620-ga67b635 Message-ID: <20140805132227.7C4CB51928@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 a67b6353940434c856cc332ce490bb6522c32814 (commit) via d4557188bb4719c81eeeefedf72bc765d7173793 (commit) from a6c1d58a09c0c96a83f65b6e67d5eb5982170be7 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a67b6353940434c856cc332ce490bb6522c32814 commit a67b6353940434c856cc332ce490bb6522c32814 Merge: a6c1d58 d455718 Author: Brad King AuthorDate: Tue Aug 5 09:22:26 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 09:22:26 2014 -0400 Merge topic 'readme-link-to-issue-tracker' d4557188 README: Add a section explaining how to report bugs ----------------------------------------------------------------------- Summary of changes: README.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 09:22:29 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 09:22:29 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1622-gf174a1c Message-ID: <20140805132229.31E5751932@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 f174a1cc61a629c77db49e7ffae74b8c7d60d618 (commit) via 2dd17a546f0a2dafacf53b5db1e9ead0990d91ea (commit) from a67b6353940434c856cc332ce490bb6522c32814 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f174a1cc61a629c77db49e7ffae74b8c7d60d618 commit f174a1cc61a629c77db49e7ffae74b8c7d60d618 Merge: a67b635 2dd17a5 Author: Brad King AuthorDate: Tue Aug 5 09:22:28 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 09:22:28 2014 -0400 Merge topic 'liblzma-pgi-compiler' 2dd17a54 liblzma: Fix compilation with PGI compiler ----------------------------------------------------------------------- Summary of changes: Utilities/cmliblzma/CMakeLists.txt | 12 +++++++++--- Utilities/cmliblzma/liblzma/check/sha256.c | 4 ---- 2 files changed, 9 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 09:22:30 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 09:22:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1625-ge76b72f Message-ID: <20140805132230.E4A5551940@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 e76b72fa83eb5ed179b6b988cb7bc58cdd8b12e4 (commit) via 60c783676c91ff1ded2ed5e6fd50d0f9664032e5 (commit) via 158c6d1cffe863fde284d4e5eeeb8129d40ce0e9 (commit) from f174a1cc61a629c77db49e7ffae74b8c7d60d618 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e76b72fa83eb5ed179b6b988cb7bc58cdd8b12e4 commit e76b72fa83eb5ed179b6b988cb7bc58cdd8b12e4 Merge: f174a1c 60c7836 Author: Brad King AuthorDate: Tue Aug 5 09:22:30 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 09:22:30 2014 -0400 Merge topic 'update-kwsys' 60c78367 Merge branch 'upstream-kwsys' into update-kwsys 158c6d1c KWSys 2014-08-04 (e787837a) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/Directory.cxx | 41 ++--- Source/kwsys/Directory.hxx.in | 17 +- Source/kwsys/Glob.cxx | 14 +- Source/kwsys/SharedForward.h.in | 2 +- Source/kwsys/SystemTools.cxx | 368 +++++++++++++++++++++++--------------- Source/kwsys/SystemTools.hxx.in | 77 +++++--- Source/kwsys/testSystemTools.cxx | 12 +- 7 files changed, 316 insertions(+), 215 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 09:22:32 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 09:22:32 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1627-g8fef9dd Message-ID: <20140805132232.92F2B51941@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 8fef9dd271200eb904a721876564fe87d928fa44 (commit) via 7762fffa238a9bbc28658742792c25c10a7cc9c5 (commit) from e76b72fa83eb5ed179b6b988cb7bc58cdd8b12e4 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8fef9dd271200eb904a721876564fe87d928fa44 commit 8fef9dd271200eb904a721876564fe87d928fa44 Merge: e76b72f 7762fff Author: Brad King AuthorDate: Tue Aug 5 09:22:31 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 09:22:31 2014 -0400 Merge topic 'pass_output_by_reference' 7762fffa Change output to be a reference and not a pointer. ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestConfigureHandler.cxx | 2 +- Source/cmCTest.cxx | 48 +++++++++++++----------------- Source/cmCTest.h | 2 +- 3 files changed, 23 insertions(+), 29 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 09:22:34 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 09:22:34 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1629-g99f6eab Message-ID: <20140805132234.4553C5193E@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 99f6eab8514214d873d7b4f5161e1062ea50829f (commit) via aea40fcb43f3b3496c79948e4e4fe08dbe4086d5 (commit) from 8fef9dd271200eb904a721876564fe87d928fa44 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99f6eab8514214d873d7b4f5161e1062ea50829f commit 99f6eab8514214d873d7b4f5161e1062ea50829f Merge: 8fef9dd aea40fc Author: Brad King AuthorDate: Tue Aug 5 09:22:33 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 09:22:33 2014 -0400 Merge topic 'fix_value_not_used' aea40fcb Fix scan-build warning parsed is never read after being set. ----------------------------------------------------------------------- Summary of changes: Source/CPack/cpack.cxx | 1 - 1 file changed, 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 09:22:35 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 09:22:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1631-g6548e17 Message-ID: <20140805132235.E470A51958@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 6548e171e36b91af6dcbbe8c5e265cd37b8a2a5f (commit) via b35a7730ce8c6ce853d359654d436334c452aec6 (commit) from 99f6eab8514214d873d7b4f5161e1062ea50829f (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6548e171e36b91af6dcbbe8c5e265cd37b8a2a5f commit 6548e171e36b91af6dcbbe8c5e265cd37b8a2a5f Merge: 99f6eab b35a773 Author: Brad King AuthorDate: Tue Aug 5 09:22:35 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 09:22:35 2014 -0400 Merge topic 'fix_truncation_logic_valgrind_output' b35a7730 Fix truncation of valgrind output logic. ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestMemCheckHandler.cxx | 41 ++++++++++++++----------------- 1 file changed, 19 insertions(+), 22 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 09:22:56 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 09:22:56 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4771-gf9ae1e2 Message-ID: <20140805132256.B346C51980@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, next has been updated via f9ae1e2f8eff0e8f155a98c0447526ea1760bcb3 (commit) via 6548e171e36b91af6dcbbe8c5e265cd37b8a2a5f (commit) via 99f6eab8514214d873d7b4f5161e1062ea50829f (commit) via 8fef9dd271200eb904a721876564fe87d928fa44 (commit) via e76b72fa83eb5ed179b6b988cb7bc58cdd8b12e4 (commit) via f174a1cc61a629c77db49e7ffae74b8c7d60d618 (commit) via a67b6353940434c856cc332ce490bb6522c32814 (commit) via a6c1d58a09c0c96a83f65b6e67d5eb5982170be7 (commit) from 2d89813845f87c519339a33c43f5e1b5a11021a3 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9ae1e2f8eff0e8f155a98c0447526ea1760bcb3 commit f9ae1e2f8eff0e8f155a98c0447526ea1760bcb3 Merge: 2d89813 6548e17 Author: Brad King AuthorDate: Tue Aug 5 09:24:15 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 09:24:15 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From clinton at elemtech.com Tue Aug 5 09:45:08 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Tue, 5 Aug 2014 09:45:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4775-g7c07f54 Message-ID: <20140805134508.9CDDD510E4@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, next has been updated via 7c07f54f7061bf77a809bf2890d6a89b8ae45d0f (commit) via efe57573f6a6490506a9ef337d70d0ef7bee8cb2 (commit) via fbd6da7452e19a289e176ca3195cbff5e9bc4ee4 (commit) via a61c41cb4830e08403faa0bab4f4f983d5f12390 (commit) from f9ae1e2f8eff0e8f155a98c0447526ea1760bcb3 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c07f54f7061bf77a809bf2890d6a89b8ae45d0f commit 7c07f54f7061bf77a809bf2890d6a89b8ae45d0f Merge: f9ae1e2 efe5757 Author: Clinton Stimpson AuthorDate: Tue Aug 5 09:45:07 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 09:45:07 2014 -0400 Merge topic 'qt-automoc' into next efe57573 Revert "Qt: Fix automoc when .h and .cpp are in different directories." fbd6da74 Revert "Qt: Enable running automoc test with Qt4 or Qt5." a61c41cb Revert "Qt: Restore Qt4AndQt5Automoc test behavior." http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efe57573f6a6490506a9ef337d70d0ef7bee8cb2 commit efe57573f6a6490506a9ef337d70d0ef7bee8cb2 Author: Clinton Stimpson AuthorDate: Tue Aug 5 07:44:42 2014 -0600 Commit: Clinton Stimpson CommitDate: Tue Aug 5 07:44:42 2014 -0600 Revert "Qt: Fix automoc when .h and .cpp are in different directories." This reverts commit cf4a7eb0272555119489b7eacd88eb785c496ce2. diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 76edad5..d4d565c 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1830,57 +1830,30 @@ cmQtAutoGenerators::SearchHeadersForCppFile(const std::string& absFilename, const std::string basename = cmsys::SystemTools::GetFilenameWithoutLastExtension(absFilename); const std::string absPath = cmsys::SystemTools::GetFilenamePath( - cmsys::SystemTools::GetRealPath(absFilename.c_str())); - - std::vector incPaths; - incPaths.push_back(absPath); - cmSystemTools::ExpandListArgument(this->MocIncludesStr, incPaths); + cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/'; - for(std::vector::const_iterator path = incPaths.begin(); - path != incPaths.end(); - ++path) - { - bool found = false; - for(std::vector::const_iterator ext = - headerExtensions.begin(); - ext != headerExtensions.end(); - ++ext) + for(std::vector::const_iterator ext = headerExtensions.begin(); + ext != headerExtensions.end(); + ++ext) { - const std::string headerName = (*path) + "/" + basename + "." + (*ext); - - if (cmsys::SystemTools::FileExists(headerName.c_str())) + const std::string headerName = absPath + basename + "." + (*ext); + if (cmsys::SystemTools::FileExists(headerName.c_str())) { - absHeaders.insert(headerName); - found = true; - break; + absHeaders.insert(headerName); + break; } } - if (found) - break; - } - for(std::vector::const_iterator path = incPaths.begin(); - path != incPaths.end(); - ++path) - { - bool found = false; - for(std::vector::const_iterator ext = - headerExtensions.begin(); - ext != headerExtensions.end(); - ++ext) + for(std::vector::const_iterator ext = headerExtensions.begin(); + ext != headerExtensions.end(); + ++ext) { - const std::string privateHeaderName = (*path) + "/" + - basename + "_p." + (*ext); - - if (cmsys::SystemTools::FileExists(privateHeaderName.c_str())) + const std::string privateHeaderName = absPath+basename+"_p."+(*ext); + if (cmsys::SystemTools::FileExists(privateHeaderName.c_str())) { - absHeaders.insert(privateHeaderName); - found = true; - break; + absHeaders.insert(privateHeaderName); + break; } } - if (found) - break; - } } diff --git a/Tests/Qt4And5Automoc/AnObject.cpp b/Tests/Qt4And5Automoc/AnObject.cpp deleted file mode 100644 index c1c93f1..0000000 --- a/Tests/Qt4And5Automoc/AnObject.cpp +++ /dev/null @@ -1,4 +0,0 @@ -#include "AnObject.h" - -void AnObject::activated() { -} diff --git a/Tests/Qt4And5Automoc/AnObject.h b/Tests/Qt4And5Automoc/AnObject.h deleted file mode 100644 index b7c5409..0000000 --- a/Tests/Qt4And5Automoc/AnObject.h +++ /dev/null @@ -1,9 +0,0 @@ -#include - -class AnObject : public QObject { - Q_OBJECT -public: - AnObject() {} -private slots: - void activated(); -}; diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt index 7f3e81e..ad74961 100644 --- a/Tests/Qt4And5Automoc/CMakeLists.txt +++ b/Tests/Qt4And5Automoc/CMakeLists.txt @@ -1,13 +1,13 @@ -cmake_minimum_required(VERSION 3.0.1) +cmake_minimum_required(VERSION 2.8.12) project(Qt4And5Automoc) if (QT_REVERSE_FIND_ORDER) - find_package(Qt5Core) - find_package(Qt4) + find_package(Qt5Core REQUIRED) + find_package(Qt4 REQUIRED) else() - find_package(Qt4) - find_package(Qt5Core) + find_package(Qt4 REQUIRED) + find_package(Qt5Core REQUIRED) endif() set(CMAKE_AUTOMOC ON) @@ -20,16 +20,10 @@ macro(generate_main_file VERSION) ) endmacro() -include_directories(include) - -if (${QT4_FOUND}) generate_main_file(4) -add_executable(qt4_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt4.cpp" AnObject.cpp src/OtherObject.cpp) -target_link_libraries(qt4_exe Qt4::QtCore) -endif() - -if (${QT5_FOUND}) generate_main_file(5) -add_executable(qt5_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt5.cpp" AnObject.cpp src/OtherObject.cpp) + +add_executable(qt4_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt4.cpp") +target_link_libraries(qt4_exe Qt4::QtCore) +add_executable(qt5_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt5.cpp") target_link_libraries(qt5_exe Qt5::Core) -endif() diff --git a/Tests/Qt4And5Automoc/include/OtherObject.h b/Tests/Qt4And5Automoc/include/OtherObject.h deleted file mode 100644 index 6d51cc1..0000000 --- a/Tests/Qt4And5Automoc/include/OtherObject.h +++ /dev/null @@ -1,9 +0,0 @@ -#include - -class OtherObject : public QObject { - Q_OBJECT -public: - OtherObject() {} -private slots: - void activated(); -}; diff --git a/Tests/Qt4And5Automoc/main.cpp.in b/Tests/Qt4And5Automoc/main.cpp.in index 7852cd6..00fd641 100644 --- a/Tests/Qt4And5Automoc/main.cpp.in +++ b/Tests/Qt4And5Automoc/main.cpp.in @@ -1,7 +1,5 @@ #include -#include "AnObject.h" -#include "OtherObject.h" class SomeObject : public QObject { @@ -16,7 +14,5 @@ public: int main(int argc, char **argv) { - AnObject a; - OtherObject o; return 0; } diff --git a/Tests/Qt4And5Automoc/src/OtherObject.cpp b/Tests/Qt4And5Automoc/src/OtherObject.cpp deleted file mode 100644 index d4e724a..0000000 --- a/Tests/Qt4And5Automoc/src/OtherObject.cpp +++ /dev/null @@ -1,4 +0,0 @@ -#include "OtherObject.h" - -void OtherObject::activated() { -} http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fbd6da7452e19a289e176ca3195cbff5e9bc4ee4 commit fbd6da7452e19a289e176ca3195cbff5e9bc4ee4 Author: Clinton Stimpson AuthorDate: Tue Aug 5 07:44:34 2014 -0600 Commit: Clinton Stimpson CommitDate: Tue Aug 5 07:44:34 2014 -0600 Revert "Qt: Enable running automoc test with Qt4 or Qt5." This reverts commit c979c60c4386b844bfe0d2dc3a8e64da1318c561. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 1402c95..ca7fcdc 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1201,10 +1201,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Targets") - endif() - - if((QT4_WORKS AND QT_QTGUI_FOUND) OR - (Qt5Widgets_FOUND AND NOT Qt5Widgets_VERSION VERSION_LESS 5.1.0) ) + if(Qt5Widgets_FOUND AND NOT Qt5Widgets_VERSION VERSION_LESS 5.1.0) add_test(Qt4And5Automoc ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/Qt4And5Automoc" @@ -1229,6 +1226,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release --test-command ${CMAKE_CTEST_COMMAND} -V ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4And5AutomocReverse") + endif() endif() find_package(GTK2 QUIET) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a61c41cb4830e08403faa0bab4f4f983d5f12390 commit a61c41cb4830e08403faa0bab4f4f983d5f12390 Author: Clinton Stimpson AuthorDate: Tue Aug 5 07:44:27 2014 -0600 Commit: Clinton Stimpson CommitDate: Tue Aug 5 07:44:27 2014 -0600 Revert "Qt: Restore Qt4AndQt5Automoc test behavior." This reverts commit 305c206900d7ada953e2b8de7709733f5c46cdf9. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index ca7fcdc..1402c95 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1201,7 +1201,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Targets") - if(Qt5Widgets_FOUND AND NOT Qt5Widgets_VERSION VERSION_LESS 5.1.0) + endif() + + if((QT4_WORKS AND QT_QTGUI_FOUND) OR + (Qt5Widgets_FOUND AND NOT Qt5Widgets_VERSION VERSION_LESS 5.1.0) ) add_test(Qt4And5Automoc ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/Qt4And5Automoc" @@ -1226,7 +1229,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release --test-command ${CMAKE_CTEST_COMMAND} -V ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4And5AutomocReverse") - endif() endif() find_package(GTK2 QUIET) diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt index 34c8115..7f3e81e 100644 --- a/Tests/Qt4And5Automoc/CMakeLists.txt +++ b/Tests/Qt4And5Automoc/CMakeLists.txt @@ -3,11 +3,11 @@ cmake_minimum_required(VERSION 3.0.1) project(Qt4And5Automoc) if (QT_REVERSE_FIND_ORDER) - find_package(Qt5Core REQUIRED) - find_package(Qt4 REQUIRED) + find_package(Qt5Core) + find_package(Qt4) else() - find_package(Qt4 REQUIRED) - find_package(Qt5Core REQUIRED) + find_package(Qt4) + find_package(Qt5Core) endif() set(CMAKE_AUTOMOC ON) @@ -22,10 +22,14 @@ endmacro() include_directories(include) +if (${QT4_FOUND}) generate_main_file(4) add_executable(qt4_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt4.cpp" AnObject.cpp src/OtherObject.cpp) target_link_libraries(qt4_exe Qt4::QtCore) +endif() +if (${QT5_FOUND}) generate_main_file(5) add_executable(qt5_exe "${CMAKE_CURRENT_BINARY_DIR}/main_qt5.cpp" AnObject.cpp src/OtherObject.cpp) target_link_libraries(qt5_exe Qt5::Core) +endif() ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutoGenerators.cxx | 57 ++++++++-------------------- Tests/Qt4And5Automoc/AnObject.cpp | 4 -- Tests/Qt4And5Automoc/AnObject.h | 9 ----- Tests/Qt4And5Automoc/CMakeLists.txt | 12 +++--- Tests/Qt4And5Automoc/include/OtherObject.h | 9 ----- Tests/Qt4And5Automoc/main.cpp.in | 4 -- Tests/Qt4And5Automoc/src/OtherObject.cpp | 4 -- 7 files changed, 20 insertions(+), 79 deletions(-) delete mode 100644 Tests/Qt4And5Automoc/AnObject.cpp delete mode 100644 Tests/Qt4And5Automoc/AnObject.h delete mode 100644 Tests/Qt4And5Automoc/include/OtherObject.h delete mode 100644 Tests/Qt4And5Automoc/src/OtherObject.cpp hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 10:17:24 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 10:17:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4779-gca5ec0d Message-ID: <20140805141724.08E2F5119C@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, next has been updated via ca5ec0de3af93edcbaf5b79026b57fadf16bd123 (commit) via 5bf1c5cce17fe76727ea4487fd500d7f9a4b5da4 (commit) via 2a58c872d7764e9a4c618662ae49da289789e44f (commit) via cb88742da4e50bf2265799aae73c9e141757f87f (commit) from 7c07f54f7061bf77a809bf2890d6a89b8ae45d0f (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca5ec0de3af93edcbaf5b79026b57fadf16bd123 commit ca5ec0de3af93edcbaf5b79026b57fadf16bd123 Merge: 7c07f54 5bf1c5c Author: Brad King AuthorDate: Tue Aug 5 10:17:23 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 10:17:23 2014 -0400 Merge topic 'doc-add_custom_command' into next 5bf1c5cc Help: Document add_custom_command PRE_BUILD/PRE_LINK for exe/lib only (#15059) 2a58c872 Help: Revise and format 'add_custom_command' docs cb88742d Help: Remove stray content from 'add_custom_command' docs http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5bf1c5cce17fe76727ea4487fd500d7f9a4b5da4 commit 5bf1c5cce17fe76727ea4487fd500d7f9a4b5da4 Author: Brad King AuthorDate: Tue Aug 5 10:14:35 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 10:14:35 2014 -0400 Help: Document add_custom_command PRE_BUILD/PRE_LINK for exe/lib only (#15059) State explicitly that the PRE_LINK mode is not for targets created by the add_custom_target command. The existing wording for PRE_BUILD being treated as PRE_LINK by non-VS generators will now imply this restriction for PRE_BUILD too. diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 48e2a5d..130f5c2 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -159,5 +159,7 @@ of the following is specified: ``PRE_LINK`` Run after sources have been compiled but before linking the binary or running the librarian or archiver tool of a static library. + This is not defined for targets created by the + :command:`add_custom_target` command. ``POST_BUILD`` Run after all other rules within the target have been executed. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a58c872d7764e9a4c618662ae49da289789e44f commit 2a58c872d7764e9a4c618662ae49da289789e44f Author: Brad King AuthorDate: Tue Aug 5 10:12:59 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 10:12:59 2014 -0400 Help: Revise and format 'add_custom_command' docs Format the reStructuredText markup manually. Organize the command options into a definition list. Use inline markup to cross-reference related documents. diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index a7390ef..48e2a5d 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -3,10 +3,12 @@ add_custom_command Add a custom build rule to the generated build system. -There are two main signatures for add_custom_command The first -signature is for adding a custom command to produce an output. +There are two main signatures for ``add_custom_command``. -:: +Generating Files +^^^^^^^^^^^^^^^^ + +The first signature is for adding a custom command to produce an output:: add_custom_command(OUTPUT output1 [output2 ...] COMMAND command1 [ARGS] [args1...] @@ -18,28 +20,117 @@ signature is for adding a custom command to produce an output. [WORKING_DIRECTORY dir] [COMMENT comment] [VERBATIM] [APPEND]) -This defines a command to generate specified OUTPUT file(s). A target -created in the same directory (CMakeLists.txt file) that specifies any -output of the custom command as a source file is given a rule to -generate the file using the command at build time. Do not list the -output in more than one independent target that may build in parallel -or the two instances of the rule may conflict (instead use -add_custom_target to drive the command and make the other targets -depend on that one). If an output name is a relative path it will be -interpreted relative to the build tree directory corresponding to the -current source directory. Note that MAIN_DEPENDENCY is completely -optional and is used as a suggestion to visual studio about where to -hang the custom command. In makefile terms this creates a new target -in the following form: - -:: +This defines a command to generate specified ``OUTPUT`` file(s). +A target created in the same directory (``CMakeLists.txt`` file) +that specifies any output of the custom command as a source file +is given a rule to generate the file using the command at build time. +Do not list the output in more than one independent target that +may build in parallel or the two instances of the rule may conflict +(instead use the :command:`add_custom_target` command to drive the +command and make the other targets depend on that one). +In makefile terms this creates a new target in the following form:: OUTPUT: MAIN_DEPENDENCY DEPENDS COMMAND -If more than one command is specified they will be executed in order. -The optional ARGS argument is for backward compatibility and will be -ignored. +The options are: + +``APPEND`` + Append the ``COMMAND`` and ``DEPENDS`` option values to the custom + command for the first output specified. There must have already + been a previous call to this command with the same output. + The ``COMMENT``, ``MAIN_DEPENDENCY``, and ``WORKING_DIRECTORY`` + options are currently ignored when APPEND is given, but may be + used in the future. + +``COMMAND`` + Specify the command-line(s) to execute at build time. + If more than one command is specified they will be executed in order. + The optional ``ARGS`` argument is for backward compatibility and + will be ignored. + + If ``COMMAND`` specifies an executable target (created by the + :command:`add_executable` command) it will automatically be replaced + by the location of the executable created at build time. + Additionally a target-level dependency will be added so that the + executable target will be built before any target using this custom + command. However this does NOT add a file-level dependency that + would cause the custom command to re-run whenever the executable is + recompiled. + + Arguments to ``COMMAND`` may use + :manual:`generator expressions `. + References to target names in generator expressions imply target-level + dependencies, but NOT file-level dependencies. List target names with + the ``DEPENDS`` option to add file-level dependencies. + +``COMMENT`` + Display the given message before the commands are executed at + build time. + +``DEPENDS`` + Specify files on which the command depends. If any dependency is + an ``OUTPUT`` of another custom command in the same directory + (``CMakeLists.txt`` file) CMake automatically brings the other + custom command into the target in which this command is built. + If ``DEPENDS`` is not specified the command will run whenever + the ``OUTPUT`` is missing; if the command does not actually + create the ``OUTPUT`` then the rule will always run. + If ``DEPENDS`` specifies any target (created by the + :command:`add_custom_target`, :command:`add_executable`, or + :command:`add_library` command) a target-level dependency is + created to make sure the target is built before any target + using this custom command. Additionally, if the target is an + executable or library a file-level dependency is created to + cause the custom command to re-run whenever the target is + recompiled. + + Arguments to ``DEPENDS`` may use + :manual:`generator expressions `. + +``IMPLICIT_DEPENDS`` + Request scanning of implicit dependencies of an input file. + The language given specifies the programming language whose + corresponding dependency scanner should be used. + Currently only ``C`` and ``CXX`` language scanners are supported. + The language has to be specified for every file in the + ``IMPLICIT_DEPENDS`` list. Dependencies discovered from the + scanning are added to those of the custom command at build time. + Note that the ``IMPLICIT_DEPENDS`` option is currently supported + only for Makefile generators and will be ignored by other generators. + +``MAIN_DEPENDENCY`` + Specify the primary input source file to the command. This is + treated just like any value given to the ``DEPENDS`` option + but also suggests to Visual Studio generators where to hang + the custom command. + +``OUTPUT`` + Specify the output files the command is expected to produce. + If an output name is a relative path it will be interpreted + relative to the build tree directory corresponding to the + current source directory. + If the output of the custom command is not actually created + as a file on disk it should be marked with the :prop_sf:`SYMBOLIC` + source file property. + +``VERBATIM`` + All arguments to the commands will be escaped properly for the + build tool so that the invoked command receives each argument + unchanged. Note that one level of escapes is still used by the + CMake language processor before add_custom_command even sees the + arguments. Use of ``VERBATIM`` is recommended as it enables + correct behavior. When ``VERBATIM`` is not given the behavior + is platform specific because there is no protection of + tool-specific special characters. + +``WORKING_DIRECTORY`` + Execute the command with the given current working directory. + If it is a relative path it will be interpreted relative to the + build tree directory corresponding to the current source directory. + +Build Events +^^^^^^^^^^^^ The second signature adds a custom command to a target such as a library or executable. This is useful for performing an operation @@ -60,79 +151,13 @@ This defines a new command that will be associated with building the specified target. When the command will happen is determined by which of the following is specified: -:: - - PRE_BUILD - run before all other dependencies - PRE_LINK - run after other dependencies - POST_BUILD - run after the target has been built - -Note that the PRE_BUILD option is only supported on Visual Studio 7 or -later. For all other generators PRE_BUILD will be treated as -PRE_LINK. - -If WORKING_DIRECTORY is specified the command will be executed in the -directory given. If it is a relative path it will be interpreted -relative to the build tree directory corresponding to the current -source directory. If COMMENT is set, the value will be displayed as a -message before the commands are executed at build time. If APPEND is -specified the COMMAND and DEPENDS option values are appended to the -custom command for the first output specified. There must have -already been a previous call to this command with the same output. -The COMMENT, WORKING_DIRECTORY, and MAIN_DEPENDENCY options are -currently ignored when APPEND is given, but may be used in the future. - -If VERBATIM is given then all arguments to the commands will be -escaped properly for the build tool so that the invoked command -receives each argument unchanged. Note that one level of escapes is -still used by the CMake language processor before add_custom_command -even sees the arguments. Use of VERBATIM is recommended as it enables -correct behavior. When VERBATIM is not given the behavior is platform -specific because there is no protection of tool-specific special -characters. - -If the output of the custom command is not actually created as a file -on disk it should be marked as SYMBOLIC with -SET_SOURCE_FILES_PROPERTIES. - -The IMPLICIT_DEPENDS option requests scanning of implicit dependencies -of an input file. The language given specifies the programming -language whose corresponding dependency scanner should be used. -Currently only C and CXX language scanners are supported. The -language has to be specified for every file in the IMPLICIT_DEPENDS -list. Dependencies discovered from the scanning are added to those of -the custom command at build time. Note that the IMPLICIT_DEPENDS -option is currently supported only for Makefile generators and will be -ignored by other generators. - -If COMMAND specifies an executable target (created by ADD_EXECUTABLE) -it will automatically be replaced by the location of the executable -created at build time. Additionally a target-level dependency will be -added so that the executable target will be built before any target -using this custom command. However this does NOT add a file-level -dependency that would cause the custom command to re-run whenever the -executable is recompiled. - -Arguments to COMMAND may use "generator expressions" with the syntax -``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for -available expressions. - -References to target names in generator expressions imply target-level -dependencies, but NOT file-level dependencies. List target names with -the DEPENDS option to add file dependencies. - -The DEPENDS option specifies files on which the command depends. If -any dependency is an OUTPUT of another custom command in the same -directory (CMakeLists.txt file) CMake automatically brings the other -custom command into the target in which this command is built. If -DEPENDS is not specified the command will run whenever the OUTPUT is -missing; if the command does not actually create the OUTPUT then the -rule will always run. If DEPENDS specifies any target (created by an -ADD_* command) a target-level dependency is created to make sure the -target is built before any target using this custom command. -Additionally, if the target is an executable or library a file-level -dependency is created to cause the custom command to re-run whenever -the target is recompiled. - -Arguments to ``DEPENDS`` may use "generator expressions" with the syntax -``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for -available expressions. +``PRE_BUILD`` + Run before any other rules are executed within the target. + This is supported only on Visual Studio 7 or later. + For all other generators ``PRE_BUILD`` will be treated as + ``PRE_LINK``. +``PRE_LINK`` + Run after sources have been compiled but before linking the binary + or running the librarian or archiver tool of a static library. +``POST_BUILD`` + Run after all other rules within the target have been executed. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb88742da4e50bf2265799aae73c9e141757f87f commit cb88742da4e50bf2265799aae73c9e141757f87f Author: Brad King AuthorDate: Tue Aug 5 09:58:29 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 09:59:10 2014 -0400 Help: Remove stray content from 'add_custom_command' docs Remove leftover generator expression documentation that is now in the cmake-generator-expressions(7) manual. diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 028ca5a..a7390ef 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -116,30 +116,6 @@ Arguments to COMMAND may use "generator expressions" with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for available expressions. -Note that tgt is not added as a dependency of the target this -expression is evaluated on. - -:: - - $ = '1' if the policy was NEW when the 'head' target was created, else '0'. If the policy was not set, the warning message for the policy will be emitted. This generator expression only works for a subset of policies. - $ = Content of the install prefix when the target is exported via INSTALL(EXPORT) and empty otherwise. - -Boolean expressions: - -:: - - $ = '1' if all '?' are '1', else '0' - $ = '0' if all '?' are '0', else '1' - $ = '0' if '?' is '1', else '1' - -where '?' is always either '0' or '1'. - -Expressions with an implicit 'this' target: - -:: - - $ = The value of the property prop on the target on which the generator expression is evaluated. - References to target names in generator expressions imply target-level dependencies, but NOT file-level dependencies. List target names with the DEPENDS option to add file dependencies. ----------------------------------------------------------------------- Summary of changes: Help/command/add_custom_command.rst | 245 ++++++++++++++++++----------------- 1 file changed, 124 insertions(+), 121 deletions(-) hooks/post-receive -- CMake From bill.hoffman at kitware.com Tue Aug 5 10:28:01 2014 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Tue, 5 Aug 2014 10:28:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4781-g9f19254 Message-ID: <20140805142801.E21805148B@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, next has been updated via 9f192548e1f7d046b25927469f351ad8542568f8 (commit) via 2cac483e64835329e4eec2d2fad5001895d0e7fe (commit) from ca5ec0de3af93edcbaf5b79026b57fadf16bd123 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f192548e1f7d046b25927469f351ad8542568f8 commit 9f192548e1f7d046b25927469f351ad8542568f8 Merge: ca5ec0d 2cac483 Author: Bill Hoffman AuthorDate: Tue Aug 5 10:28:01 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 10:28:01 2014 -0400 Merge topic 'fix_value_not_used' into next 2cac483e Fix used value warning. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2cac483e64835329e4eec2d2fad5001895d0e7fe commit 2cac483e64835329e4eec2d2fad5001895d0e7fe Author: Bill Hoffman AuthorDate: Tue Aug 5 10:22:36 2014 -0400 Commit: Bill Hoffman CommitDate: Tue Aug 5 10:22:36 2014 -0400 Fix used value warning. packageFileName no longer has only one value in this function. Move the declaration into the loop and remove its initial and unused asignment. diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 9336bed..1461bb1 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -1049,7 +1049,6 @@ int cmCPackGenerator::DoPackage() const char* tempPackageFileName = this->GetOption( "CPACK_TEMPORARY_PACKAGE_FILE_NAME"); - const char* packageFileName = this->GetOption("CPACK_OUTPUT_FILE_PATH"); const char* tempDirectory = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl); @@ -1114,7 +1113,7 @@ int cmCPackGenerator::DoPackage() std::string tmpPF(this->GetOption("CPACK_OUTPUT_FILE_PREFIX")); tempPackageFileName = it->c_str(); tmpPF += "/"+cmSystemTools::GetFilenameName(*it); - packageFileName = tmpPF.c_str(); + const char* packageFileName = tmpPF.c_str(); cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy final package(s): " << (tempPackageFileName ? tempPackageFileName : "(NULL)" ) << " to " ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackGenerator.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 10:53:18 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 10:53:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4783-g903acbf Message-ID: <20140805145318.EF7395171A@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, next has been updated via 903acbf9ecd6fe2a2914bf013129cab3624d281a (commit) via 5d3d9a22b28e99894dab2fe4fac0279fb422ace4 (commit) from 9f192548e1f7d046b25927469f351ad8542568f8 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=903acbf9ecd6fe2a2914bf013129cab3624d281a commit 903acbf9ecd6fe2a2914bf013129cab3624d281a Merge: 9f19254 5d3d9a2 Author: Brad King AuthorDate: Tue Aug 5 10:53:18 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 10:53:18 2014 -0400 Merge topic 'vs-windows-phone-and-store' into next 5d3d9a22 Help: Add notes for topic 'vs-windows-phone-and-store' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d3d9a22b28e99894dab2fe4fac0279fb422ace4 commit 5d3d9a22b28e99894dab2fe4fac0279fb422ace4 Author: Brad King AuthorDate: Tue Aug 5 10:49:09 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 10:49:09 2014 -0400 Help: Add notes for topic 'vs-windows-phone-and-store' diff --git a/Help/release/dev/vs-windows-phone-and-store.rst b/Help/release/dev/vs-windows-phone-and-store.rst new file mode 100644 index 0000000..b44e276 --- /dev/null +++ b/Help/release/dev/vs-windows-phone-and-store.rst @@ -0,0 +1,10 @@ +vs-windows-phone-and-store +-------------------------- + +* Generators for Visual Studio 11 (2012) and above learned to generate + projects for Windows Phone and Windows Store. One may set the + :variable:`CMAKE_SYSTEM_NAME` variable to ``WindowsPhone`` + or ``WindowsStore`` on the :manual:`cmake(1)` command-line + or in a :variable:`CMAKE_TOOLCHAIN_FILE` to activate these platforms. + Also set :variable:`CMAKE_SYSTEM_VERSION` to ``8.0`` or ``8.1`` to + specify the version of Windows to be targeted. ----------------------------------------------------------------------- Summary of changes: Help/release/dev/vs-windows-phone-and-store.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Help/release/dev/vs-windows-phone-and-store.rst hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 10:53:28 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 10:53:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1634-g662daff Message-ID: <20140805145328.B260C51722@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 662daff0b230d7343feaa5de2f33199f6f7a0e7e (commit) via c1580a9217ee2447433c76eca2ad0e6be6347a57 (commit) via 29410df23d4783de9d90a6d8c24cf7c9c5aacc80 (commit) from 6548e171e36b91af6dcbbe8c5e265cd37b8a2a5f (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=662daff0b230d7343feaa5de2f33199f6f7a0e7e commit 662daff0b230d7343feaa5de2f33199f6f7a0e7e Merge: 6548e17 c1580a9 Author: Brad King AuthorDate: Tue Aug 5 10:53:27 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 10:53:27 2014 -0400 Merge topic 'vs-default-ignore-libs' c1580a92 VS: Always add IgnoreSpecificDefaultLibraries to .vcxproj files 29410df2 cmIDEOptions: Add an AppendFlag method to update multi-valued options ----------------------------------------------------------------------- Summary of changes: Source/cmIDEOptions.cxx | 7 +++++++ Source/cmIDEOptions.h | 1 + Source/cmVisualStudio10TargetGenerator.cxx | 2 ++ 3 files changed, 10 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 10:53:51 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 10:53:51 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4785-gad606d0 Message-ID: <20140805145351.5B45051727@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, next has been updated via ad606d0e3a4c0181bdbb722eef132c8804599ca8 (commit) via 662daff0b230d7343feaa5de2f33199f6f7a0e7e (commit) from 903acbf9ecd6fe2a2914bf013129cab3624d281a (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad606d0e3a4c0181bdbb722eef132c8804599ca8 commit ad606d0e3a4c0181bdbb722eef132c8804599ca8 Merge: 903acbf 662daff Author: Brad King AuthorDate: Tue Aug 5 10:55:05 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 10:55:05 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 11:31:02 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 11:31:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4787-g91dda06 Message-ID: <20140805153102.F3AE151546@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, next has been updated via 91dda067bb399fd4f54c91825cc15bfd7ae6b731 (commit) via f2ccc14b22a396710923d718fc5768ea7c021e04 (commit) from ad606d0e3a4c0181bdbb722eef132c8804599ca8 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=91dda067bb399fd4f54c91825cc15bfd7ae6b731 commit 91dda067bb399fd4f54c91825cc15bfd7ae6b731 Merge: ad606d0 f2ccc14 Author: Brad King AuthorDate: Tue Aug 5 11:31:02 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 11:31:02 2014 -0400 Merge topic 'ExternalData-drop-security-disclaimer' into next f2ccc14b ExternalData: Drop 'not security software' disclaimer (#15060) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2ccc14b22a396710923d718fc5768ea7c021e04 commit f2ccc14b22a396710923d718fc5768ea7c021e04 Author: Brad King AuthorDate: Tue Aug 5 11:30:14 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 11:31:47 2014 -0400 ExternalData: Drop 'not security software' disclaimer (#15060) Let clients do their own research on the current strength of each hash algorithm to choose what is best for their needs. Suggested-by: Nico Schl?mer diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake index 73a4990..79bb064 100644 --- a/Modules/ExternalData.cmake +++ b/Modules/ExternalData.cmake @@ -76,7 +76,7 @@ # SHA512 .sha512 US Secure Hash Algorithms, RFC 4634 # # Note that the hashes are used only for unique data identification and -# download verification. This is not security software. +# download verification. # # Example usage: # ----------------------------------------------------------------------- Summary of changes: Modules/ExternalData.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 11:40:49 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 11:40:49 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4791-g5cbbe85 Message-ID: <20140805154049.266765170B@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, next has been updated via 5cbbe85f0b7fed752c8b6c2a91771bacb5aa0afd (commit) via 0c44cb94b69172d6e4b701aa50e07e7a6c0bc726 (commit) via 08bfe04bba37f4275b4070feebd7991a98adfbec (commit) via 0a2f1636bc735b73f9e79e358217cf651263abc9 (commit) from 91dda067bb399fd4f54c91825cc15bfd7ae6b731 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cbbe85f0b7fed752c8b6c2a91771bacb5aa0afd commit 5cbbe85f0b7fed752c8b6c2a91771bacb5aa0afd Merge: 91dda06 0c44cb9 Author: Brad King AuthorDate: Tue Aug 5 11:40:48 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 11:40:48 2014 -0400 Merge topic 'vs-special-source-file-properties' into next 0c44cb94 VS: Add a source file property to set the hlsl shader type 08bfe04b VS: Add a source file property to mark content for Windows App deployment 0a2f1636 VS: Re-arrange WriteExtraSource to support tool configuration http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c44cb94b69172d6e4b701aa50e07e7a6c0bc726 commit 0c44cb94b69172d6e4b701aa50e07e7a6c0bc726 Author: Brad King AuthorDate: Tue Jul 29 14:48:20 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 11:39:15 2014 -0400 VS: Add a source file property to set the hlsl shader type Create a VS_SHADER_TYPE source file property. Inspired-by: Gilles Khouzam diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 3b7436a..81b00fa 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -288,6 +288,7 @@ Properties on Source Files /prop_sf/OBJECT_OUTPUTS /prop_sf/SYMBOLIC /prop_sf/VS_DEPLOYMENT_CONTENT + /prop_sf/VS_SHADER_TYPE /prop_sf/WRAP_EXCLUDE /prop_sf/XCODE_EXPLICIT_FILE_TYPE /prop_sf/XCODE_LAST_KNOWN_FILE_TYPE diff --git a/Help/prop_sf/VS_SHADER_TYPE.rst b/Help/prop_sf/VS_SHADER_TYPE.rst new file mode 100644 index 0000000..6880256 --- /dev/null +++ b/Help/prop_sf/VS_SHADER_TYPE.rst @@ -0,0 +1,4 @@ +VS_SHADER_TYPE +-------------- + +Set the VS shader type of a ``.hlsl`` source file. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 70bce08..0062b4a 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1020,11 +1020,22 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { bool toolHasSettings = false; std::string tool = "None"; + std::string shaderType; std::string const& ext = sf->GetExtension(); if(ext == "appxmanifest") { tool = "AppxManifest"; } + else if(ext == "hlsl") + { + tool = "FXCompile"; + // Figure out the type of shader compiler to use. + if(const char* st = sf->GetProperty("VS_SHADER_TYPE")) + { + shaderType = st; + toolHasSettings = true; + } + } else if(ext == "jpg" || ext == "png") { @@ -1078,6 +1089,12 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) } } } + if(!shaderType.empty()) + { + this->WriteString("", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(shaderType) + << "\n"; + } this->WriteString("BuildFileStream) << tool << ">\n"; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=08bfe04bba37f4275b4070feebd7991a98adfbec commit 08bfe04bba37f4275b4070feebd7991a98adfbec Author: Brad King AuthorDate: Tue Jul 29 14:03:35 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 11:38:29 2014 -0400 VS: Add a source file property to mark content for Windows App deployment Create a VS_DEPLOYMENT_CONTENT source file property, supporting generator expressions, to compute whether a source file should be marked as DeploymentContent or ExcludedFromBuild in Windows Phone and Windows Store projects. Inspired-by: Minmin Gong diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 17dadc2..3b7436a 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -287,6 +287,7 @@ Properties on Source Files /prop_sf/OBJECT_DEPENDS /prop_sf/OBJECT_OUTPUTS /prop_sf/SYMBOLIC + /prop_sf/VS_DEPLOYMENT_CONTENT /prop_sf/WRAP_EXCLUDE /prop_sf/XCODE_EXPLICIT_FILE_TYPE /prop_sf/XCODE_LAST_KNOWN_FILE_TYPE diff --git a/Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst b/Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst new file mode 100644 index 0000000..9fb3ba3 --- /dev/null +++ b/Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst @@ -0,0 +1,11 @@ +VS_DEPLOYMENT_CONTENT +--------------------- + +Mark a source file as content for deployment with a Windows Phone or +Windows Store application when built with a Visual Studio generator. +The value must evaluate to either ``1`` or ``0`` and may use +:manual:`generator expressions ` +to make the choice based on the build configuration. +The ``.vcxproj`` file entry for the source file will be +marked either ``DeploymentContent`` or ``ExcludedFromBuild`` +for values ``1`` and ``0``, respectively. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 4bd8824..70bce08 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1035,10 +1035,50 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) tool = "XML"; } + std::string deployContent; + if(this->GlobalGenerator->TargetsWindowsPhone() || + this->GlobalGenerator->TargetsWindowsStore()) + { + const char* content = sf->GetProperty("VS_DEPLOYMENT_CONTENT"); + if(content && *content) + { + toolHasSettings = true; + deployContent = content; + } + } + if(toolHasSettings) { this->WriteSource(tool, sf, ">\n"); + if(!deployContent.empty()) + { + std::vector const* configs = + this->GlobalGenerator->GetConfigurations(); + cmGeneratorExpression ge; + cmsys::auto_ptr cge = + ge.Parse(deployContent); + for(size_t i = 0; i != configs->size(); ++i) + { + if(0 == strcmp(cge->Evaluate(this->Makefile, (*configs)[i]), "1")) + { + this->WriteString("BuildFileStream) << (*configs)[i] << "|" + << this->Platform << "'\">true"; + this->WriteString("\n", 0); + } + else + { + this->WriteString("BuildFileStream) << (*configs)[i] << "|" + << this->Platform << "'\">true"; + this->WriteString("\n", 0); + } + } + } + this->WriteString("BuildFileStream) << tool << ">\n"; } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a2f1636bc735b73f9e79e358217cf651263abc9 commit 0a2f1636bc735b73f9e79e358217cf651263abc9 Author: Brad King AuthorDate: Tue Jul 29 14:41:03 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 11:19:19 2014 -0400 VS: Re-arrange WriteExtraSource to support tool configuration Add a code path to write the tool open and close elements separately so that we can add content in between to configure it. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 291827a..4bd8824 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1018,6 +1018,7 @@ void cmVisualStudio10TargetGenerator::WriteHeaderSource(cmSourceFile const* sf) void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { + bool toolHasSettings = false; std::string tool = "None"; std::string const& ext = sf->GetExtension(); if(ext == "appxmanifest") @@ -1033,7 +1034,18 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { tool = "XML"; } - this->WriteSource(tool, sf); + + if(toolHasSettings) + { + this->WriteSource(tool, sf, ">\n"); + + this->WriteString("BuildFileStream) << tool << ">\n"; + } + else + { + this->WriteSource(tool, sf); + } } void cmVisualStudio10TargetGenerator::WriteSource( ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 2 + Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst | 11 +++++ Help/prop_sf/VS_SHADER_TYPE.rst | 4 ++ Source/cmVisualStudio10TargetGenerator.cxx | 71 +++++++++++++++++++++++++++- 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst create mode 100644 Help/prop_sf/VS_SHADER_TYPE.rst hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 13:11:38 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 13:11:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.0-1636-g2c5c0fc Message-ID: <20140805171138.F271451201@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 2c5c0fc42bf7a31c8f2ca86e150291812f087055 (commit) via 76acc128a272b1fae303215a985410faec87c3e0 (commit) from 662daff0b230d7343feaa5de2f33199f6f7a0e7e (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: hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 13:11:39 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 13:11:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.0-4793-g0eef684 Message-ID: <20140805171139.2683151209@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, next has been updated via 0eef684a7f76e18adfc874641ebf50ae81024e6f (commit) via 2c5c0fc42bf7a31c8f2ca86e150291812f087055 (commit) from 5cbbe85f0b7fed752c8b6c2a91771bacb5aa0afd (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0eef684a7f76e18adfc874641ebf50ae81024e6f commit 0eef684a7f76e18adfc874641ebf50ae81024e6f Merge: 5cbbe85 2c5c0fc Author: Brad King AuthorDate: Tue Aug 5 13:12:53 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 13:12:53 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 13:11:39 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 13:11:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.0.0-30-g76acc12 Message-ID: <20140805171139.3698A5121C@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 76acc128a272b1fae303215a985410faec87c3e0 (commit) from 2eda7499d11990b0bcae115031d6e6d427ea74bc (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 brad.king at kitware.com Tue Aug 5 13:11:43 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 13:11:43 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.0.1, created. v3.0.1 Message-ID: <20140805171143.6609E5121C@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.0.1 has been created at 3ce76df0e6ffe5ec616cf7373bda57a5c2d84933 (tag) tagging 76acc128a272b1fae303215a985410faec87c3e0 (commit) replaces v3.0.0 tagged by Brad King on Mon Aug 4 13:13:34 2014 -0400 - Log ----------------------------------------------------------------- CMake 3.0.1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJT379BAAoJEOyP7zp7+07aa2MQAMyrRutpt+06P4Iymh3LlkZV Ib18LG/Ee3eimbCIW34fwtpJjtEH2SScsbxK0gwKMmploDTFz9c6welNPJ7pDVao 5UyrjnWPhKcXCAXLTpuaoYTe/xP3nDHg5aVCsROMt7ZUQxj7BidM48ZV5jp747b8 jkgPz9ar0xvpMpX1SFFMIwJS0im+SDTAx3uWhkV68w/xSGQm+Dakx8EyYQAS5ccq BdqYqS+/c0qYgZPC3b1pRbn7fV78tnrhIDgsOGvSlhDZSWL381AxBuP5IGFbpnah g6TpVFbE+EDWfacQYOXFVrzviMZhxs4LVNmGhs7VIcll726z2WXFR0dPN3DjpGeE duMIrAZBobYAj0/8KWuo+IBgE3LyChYMPyY8mwwztGaBOYPaXNfw5J8vPr6/qcAh LpZLDdkcqN8VSSoBiuBfIh7GcFi9XbzfHyrzuCkVf5dzAiKWRnDGXQekofi8mZQL t/KM7ZnO0VAlkysbr4jomR7Jzzmb7vTTua6/xbZx6jjuYEUNtTqMstIoiK4ZUXoH kUoPwHUKCjSzIf96yR7fg4uXE7Y2zkV1duIyyIMeajToTg0XZW+lW7gA0UwAibL/ 9qB/2GK11KQl2JEQHx4rr8LflejCqVvfIserV2hWmTb5DgnDE04LbLB3ZqPVao6M RYFjuR/qS1rwZ1ye389w =nfjy -----END PGP SIGNATURE----- Adam Strzelecki (1): Ninja: Remove CMake includes from explicit depends (#14972) Bob E (1): KWSys SystemInformation: No SA_RESTART on QNX Brad King (24): cmake: Fix read-after-free while checking command-line arguments Merge branch 'backport-fix-read-after-free' into release Merge branch 'ninja-avoid-double-phony' into release Fortran: Add support for GNU >= 4.9 compressed modules (#14975) Merge branch 'gfortran-compressed-modules' into release bootstrap: Clarify name of configured source directory bootstrap: Fix "make test" and "make package" targets (#14989) Merge branch 'bootstrap-cmake-locations' into release UseSWIG: Fix check for noproxy flag (#14990) Merge branch 'UseSWIG-fix-noproxy-check' into release CMakeExpandImportedTargets: Do not read property on non-target (#15008) Merge branch 'CMakeExpandImportedTargets-CMP0045' into release Merge branch 'install-cfbundle-directory' into release MSVC: Fix linking of DLLs on WinCE (#15013) Merge branch 'wince-fix-dll-linking' into release Merge branch 'fix-QCC-compile-flags' into release Merge branch 'compile-with-cray' into release Merge branch 'backport-kwsys-qnx-fix' into release Xcode: Fix static library creation for Xcode 6 (#15038) Merge branch 'xcode-6-librarian-flags' into release Merge branch 'FindQt4-more-plugins' into release Check*CompilerFlag: Avoid ';' in common pattern (#15048) Merge branch 'check-flag-avoid-semicolon' into release CMake 3.0.1 Chuck Atkins (1): cmcurl: Fix a build failure with the Cray compiler on Linux (#15026) Mathieu MARACHE (1): FindQt4: Add nativewifi and qtga plugins Stephen Kelly (1): QNX: Add missing flags for configurations and artifact creation. Tim Blechmann (1): OS X: Install CFBundles as complete directories ----------------------------------------------------------------------- hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 5 15:14:37 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Aug 2014 15:14:37 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4767-g65fd43e Message-ID: <20140805191437.997EE510AE@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, next has been updated via 65fd43e000b469d063f1fac64f3c25c8eaab1224 (commit) via c9863435713048c86d5936cc9361aec0140f8b17 (commit) via 60383cc9a0fbd6d31253baa3ae2326aef447dcdb (commit) via 77cafaf0319acb9272c70b347e01efedf78c1e3f (commit) from 0eef684a7f76e18adfc874641ebf50ae81024e6f (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65fd43e000b469d063f1fac64f3c25c8eaab1224 commit 65fd43e000b469d063f1fac64f3c25c8eaab1224 Merge: 0eef684 c986343 Author: Brad King AuthorDate: Tue Aug 5 15:14:36 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 5 15:14:36 2014 -0400 Merge topic 'vs-windows-sdk-desktop-arm' into next c9863435 MSVC: Select default standard libraries for ARM platform 60383cc9 VS: Fix generation of desktop applications for ARM 77cafaf0 CMakeDetermineCompilerId: Fix detection for VS ARM platform http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9863435713048c86d5936cc9361aec0140f8b17 commit c9863435713048c86d5936cc9361aec0140f8b17 Author: Brad King AuthorDate: Tue Aug 5 15:02:49 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 15:03:26 2014 -0400 MSVC: Select default standard libraries for ARM platform For Windows ARM targets, only kernel32.lib and user32.lib are standard. diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 9d4aca2..0c2e21b 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -167,13 +167,17 @@ elseif(WINDOWS_PHONE OR WINDOWS_STORE) set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc") if(WINDOWS_PHONE) set(CMAKE_C_STANDARD_LIBRARIES_INIT "WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib") + elseif(MSVC_C_ARCHITECTURE_ID STREQUAL ARM OR MSVC_CXX_ARCHITECTURE_ID STREQUAL ARM) + set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib") else() set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib") endif() else() set(_PLATFORM_DEFINES "/DWIN32") - if(MSVC_VERSION GREATER 1310) + if(MSVC_C_ARCHITECTURE_ID STREQUAL ARM OR MSVC_CXX_ARCHITECTURE_ID STREQUAL ARM) + set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib") + elseif(MSVC_VERSION GREATER 1310) set(_RTC1 "/RTC1") set(_FLAGS_CXX " /GR /EHsc") set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib") http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60383cc9a0fbd6d31253baa3ae2326aef447dcdb commit 60383cc9a0fbd6d31253baa3ae2326aef447dcdb Author: Gilles Khouzam AuthorDate: Tue Aug 5 15:00:09 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 15:00:32 2014 -0400 VS: Fix generation of desktop applications for ARM Add WindowsSDKDesktopARMSupport to the .vcxproj to avoid 'error MSB8022: Compiling Desktop applications for the ARM platform is not supported.' from VS. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 0062b4a..6989c51 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2202,4 +2202,9 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() "\n", 2); } } + if (this->Platform == "ARM") + { + this->WriteString("true" + "", 2); + } } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=77cafaf0319acb9272c70b347e01efedf78c1e3f commit 77cafaf0319acb9272c70b347e01efedf78c1e3f Author: Brad King AuthorDate: Tue Aug 5 14:44:12 2014 -0400 Commit: Brad King CommitDate: Tue Aug 5 14:45:07 2014 -0400 CMakeDetermineCompilerId: Fix detection for VS ARM platform Add WindowsSDKDesktopARMSupport to the compiler id .vcxproj to avoid 'error MSB8022: Compiling Desktop applications for the ARM platform is not supported.' from VS. Inspired-by: Minmin Gong Inspired-by: Gilles Khouzam diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index a780fa6..1fca55d 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -180,6 +180,11 @@ Id flags: ${testflags} else() set(id_system_version "") endif() + if(id_platform STREQUAL ARM) + set(id_WindowsSDKDesktopARMSupport "true") + else() + set(id_WindowsSDKDesktopARMSupport "") + endif() if(CMAKE_VS_WINCE_VERSION) set(id_entrypoint "mainACRTStartup") if("${vs_version}" VERSION_LESS 9) diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index bacbca4..a17d03d 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -12,6 +12,7 @@ Win32Proj @id_system@ @id_system_version@ + @id_WindowsSDKDesktopARMSupport@ ----------------------------------------------------------------------- Summary of changes: Modules/CMakeDetermineCompilerId.cmake | 5 +++++ Modules/CompilerId/VS-10.vcxproj.in | 1 + Modules/Platform/Windows-MSVC.cmake | 6 +++++- Source/cmVisualStudio10TargetGenerator.cxx | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Aug 6 00:01:15 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 6 Aug 2014 00:01:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1607-g4ec6ff8 Message-ID: <20140806040115.AF187518FB@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 4ec6ff8f9f38d02e300b3fc6bf75c2743eb70f97 (commit) from 2c5c0fc42bf7a31c8f2ca86e150291812f087055 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ec6ff8f9f38d02e300b3fc6bf75c2743eb70f97 commit 4ec6ff8f9f38d02e300b3fc6bf75c2743eb70f97 Author: Kitware Robot AuthorDate: Wed Aug 6 00:01:14 2014 -0400 Commit: Kitware Robot CommitDate: Wed Aug 6 00:01:14 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 17ec35b..358d674 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 0) -set(CMake_VERSION_PATCH 20140805) +set(CMake_VERSION_PATCH 20140806) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 09:17:55 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 09:17:55 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4770-g98b9b0f Message-ID: <20140806131755.E8F0251888@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, next has been updated via 98b9b0f7b436be12609b99fb7514c810bcff7124 (commit) via c6acbc90630064aaac0d0c23ea4d7afaceac48db (commit) via 4ec6ff8f9f38d02e300b3fc6bf75c2743eb70f97 (commit) from 65fd43e000b469d063f1fac64f3c25c8eaab1224 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98b9b0f7b436be12609b99fb7514c810bcff7124 commit 98b9b0f7b436be12609b99fb7514c810bcff7124 Merge: 65fd43e c6acbc9 Author: Brad King AuthorDate: Wed Aug 6 09:17:55 2014 -0400 Commit: CMake Topic Stage CommitDate: Wed Aug 6 09:17:55 2014 -0400 Merge topic 'genex-context-makefile-non-null' into next c6acbc90 Genex: Remove unnecessary check of context->Makefile 4ec6ff8f CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6acbc90630064aaac0d0c23ea4d7afaceac48db commit c6acbc90630064aaac0d0c23ea4d7afaceac48db Author: Brad King AuthorDate: Wed Aug 6 09:11:41 2014 -0400 Commit: Brad King CommitDate: Wed Aug 6 09:11:41 2014 -0400 Genex: Remove unnecessary check of context->Makefile The context->Makefile is never NULL, but our checks for it convince Clang scan-build that it might be NULL. Then it warns about later unchecked uses. Drop the unnecessary checks. diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 35a9fcb..70f33b7 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -394,9 +394,8 @@ struct CompilerIdNode : public cmGeneratorExpressionNode cmGeneratorExpressionDAGChecker *, const std::string &lang) const { - const char *compilerId = context->Makefile ? - context->Makefile->GetSafeDefinition( - "CMAKE_" + lang + "_COMPILER_ID") : ""; + const char *compilerId = + context->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER_ID"); if (parameters.size() == 0) { return compilerId ? compilerId : ""; @@ -500,9 +499,8 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode cmGeneratorExpressionDAGChecker *, const std::string &lang) const { - const char *compilerVersion = context->Makefile ? - context->Makefile->GetSafeDefinition( - "CMAKE_" + lang + "_COMPILER_VERSION") : ""; + const char *compilerVersion = context->Makefile->GetSafeDefinition( + "CMAKE_" + lang + "_COMPILER_VERSION"); if (parameters.size() == 0) { return compilerVersion ? compilerVersion : ""; @@ -583,9 +581,8 @@ struct PlatformIdNode : public cmGeneratorExpressionNode const GeneratorExpressionContent *, cmGeneratorExpressionDAGChecker *) const { - const char *platformId = context->Makefile ? - context->Makefile->GetSafeDefinition( - "CMAKE_SYSTEM_NAME") : ""; + const char *platformId = + context->Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME"); if (parameters.size() == 0) { return platformId ? platformId : ""; ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Source/cmGeneratorExpressionEvaluator.cxx | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 09:21:31 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 09:21:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4772-g37ed2fd Message-ID: <20140806132131.C5802519E3@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, next has been updated via 37ed2fdab4745c0e3d9c139ee6a1938935111327 (commit) via 93ad72c39bd2ebf267a6f9160ed0cff5dd7434d3 (commit) from 98b9b0f7b436be12609b99fb7514c810bcff7124 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=37ed2fdab4745c0e3d9c139ee6a1938935111327 commit 37ed2fdab4745c0e3d9c139ee6a1938935111327 Merge: 98b9b0f 93ad72c Author: Brad King AuthorDate: Wed Aug 6 09:21:30 2014 -0400 Commit: CMake Topic Stage CommitDate: Wed Aug 6 09:21:30 2014 -0400 Merge topic 'file-strings-encoding' into next 93ad72c3 Help: Add notes for topic 'file-strings-encoding' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93ad72c39bd2ebf267a6f9160ed0cff5dd7434d3 commit 93ad72c39bd2ebf267a6f9160ed0cff5dd7434d3 Author: Brad King AuthorDate: Wed Aug 6 09:21:30 2014 -0400 Commit: Brad King CommitDate: Wed Aug 6 09:21:30 2014 -0400 Help: Add notes for topic 'file-strings-encoding' diff --git a/Help/release/dev/file-strings-encoding.rst b/Help/release/dev/file-strings-encoding.rst new file mode 100644 index 0000000..9da3e47 --- /dev/null +++ b/Help/release/dev/file-strings-encoding.rst @@ -0,0 +1,5 @@ +file-strings-encoding +--------------------- + +* The :command:`file(STRINGS)` command gained a new ``ENCODING`` + option to enable extraction of ``UTF-8`` strings. ----------------------------------------------------------------------- Summary of changes: Help/release/dev/file-strings-encoding.rst | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Help/release/dev/file-strings-encoding.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 09:24:10 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 09:24:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4775-gcd68050 Message-ID: <20140806132410.5640D50C16@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, next has been updated via cd680503072b7627fc5f79ceacac62ada9f6d6d2 (commit) via 5b30ec28f9610b0e6d12b017d83fc362b0ef9ecf (commit) via ffa373e71114727dd70f1a051414de573debb767 (commit) from 37ed2fdab4745c0e3d9c139ee6a1938935111327 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cd680503072b7627fc5f79ceacac62ada9f6d6d2 commit cd680503072b7627fc5f79ceacac62ada9f6d6d2 Merge: 37ed2fd 5b30ec2 Author: Brad King AuthorDate: Wed Aug 6 09:24:09 2014 -0400 Commit: CMake Topic Stage CommitDate: Wed Aug 6 09:24:09 2014 -0400 Merge topic 'file-strings-encoding' into next 5b30ec28 file: Add ENCODING option to file(STRINGS) command (#10519) ffa373e7 file: Refactor internal implementation of file(STRINGS) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b30ec28f9610b0e6d12b017d83fc362b0ef9ecf commit 5b30ec28f9610b0e6d12b017d83fc362b0ef9ecf Author: Clinton Stimpson AuthorDate: Mon Aug 4 10:47:22 2014 -0600 Commit: Brad King CommitDate: Wed Aug 6 09:23:47 2014 -0400 file: Add ENCODING option to file(STRINGS) command (#10519) Support extraction of UTF-8 strings. diff --git a/Help/command/file.rst b/Help/command/file.rst index 58e3a26..dbc4149 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -64,6 +64,9 @@ Parse a list of ASCII strings from ```` and store it in ``REGEX `` Consider only strings that match the given regular expression. +``ENCODING `` + Consider strings of a given encoding. "UTF-8" is currently supported. + For example, the code .. code-block:: cmake diff --git a/Help/release/dev/file-strings-encoding.rst b/Help/release/dev/file-strings-encoding.rst new file mode 100644 index 0000000..9da3e47 --- /dev/null +++ b/Help/release/dev/file-strings-encoding.rst @@ -0,0 +1,5 @@ +file-strings-encoding +--------------------- + +* The :command:`file(STRINGS)` command gained a new ``ENCODING`` + option to enable extraction of ``UTF-8`` strings. diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index b99b1c7..1325cec 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -428,7 +428,8 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) arg_length_minimum, arg_length_maximum, arg__maximum, - arg_regex }; + arg_regex, + arg_encoding }; unsigned int minlen = 0; unsigned int maxlen = 0; int limit_input = -1; @@ -438,6 +439,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) bool have_regex = false; bool newline_consume = false; bool hex_conversion_enabled = true; + bool utf8_encoding = false; int arg_mode = arg_none; for(unsigned int i=3; i < args.size(); ++i) { @@ -475,6 +477,10 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) hex_conversion_enabled = false; arg_mode = arg_none; } + else if(args[i] == "ENCODING") + { + arg_mode = arg_encoding; + } else if(arg_mode == arg_limit_input) { if(sscanf(args[i].c_str(), "%d", &limit_input) != 1 || @@ -556,6 +562,22 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) have_regex = true; arg_mode = arg_none; } + else if(arg_mode == arg_encoding) + { + if(args[i] == "UTF-8") + { + utf8_encoding = true; + } + else + { + cmOStringStream e; + e << "STRINGS option ENCODING \"" + << args[i] << "\" not recognized."; + this->SetError(e.str()); + return false; + } + arg_mode = arg_none; + } else { cmOStringStream e; @@ -618,6 +640,52 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) // c is guaranteed to fit in char by the above if... current_str += static_cast(c); } + else if(utf8_encoding) + { + // Check for UTF-8 encoded string (up to 4 octets) + static const unsigned char utf8_check_table[3][2] = + { + {0xE0, 0xC0}, + {0xF0, 0xE0}, + {0xF8, 0xF0}, + }; + + // how many octets are there? + unsigned int num_utf8_bytes = 0; + for(unsigned int j=0; num_utf8_bytes == 0 && j<3; j++) + { + if((c & utf8_check_table[j][0]) == utf8_check_table[j][1]) + num_utf8_bytes = j+2; + } + + // get subsequent octets and check that they are valid + for(unsigned int j=0; j(c)); + break; + } + } + current_str += static_cast(c); + } + + // if this was an invalid utf8 sequence, discard the data, and put + // back subsequent characters + if((current_str.length() != num_utf8_bytes)) + { + for(unsigned int j=0; j(c)); + } + current_str = ""; + } + } + if(c == '\n' && !newline_consume) { diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt index 4fa5a86..683f969 100644 --- a/Tests/StringFileTest/CMakeLists.txt +++ b/Tests/StringFileTest/CMakeLists.txt @@ -55,6 +55,16 @@ else() "file(STRINGS) incorrectly read from srec file [${infile_strings}]") endif() +#this file has utf-8 content +file(STRINGS test.utf8 infile_strings ENCODING UTF-8) +list(LENGTH infile_strings content_len) +if(content_len MATCHES "3") + message("file(STRINGS) correctly read from utf8 file [${infile_strings}]") +else() + message(SEND_ERROR + "file(STRINGS) incorrectly read from utf8 file [${infile_strings}]") +endif() + # String test string(REGEX MATCH "[cC][mM][aA][kK][eE]" rmvar "CMake is great") string(REGEX MATCHALL "[cC][mM][aA][kK][eE]" rmallvar "CMake is better than cmake or CMake") diff --git a/Tests/StringFileTest/test.utf8 b/Tests/StringFileTest/test.utf8 new file mode 100644 index 0000000..6c29170 --- /dev/null +++ b/Tests/StringFileTest/test.utf8 @@ -0,0 +1,3 @@ +The value of ?? (pi) is 3.141593 +Line mixed with binary partially matches valid utf8: ?? is ?93.1593 +? \ No newline at end of file http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ffa373e71114727dd70f1a051414de573debb767 commit ffa373e71114727dd70f1a051414de573debb767 Author: Clinton Stimpson AuthorDate: Mon Aug 4 10:45:13 2014 -0600 Commit: Brad King CommitDate: Wed Aug 6 09:23:15 2014 -0400 file: Refactor internal implementation of file(STRINGS) Make room for encoding support. diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index e47365a..b99b1c7 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -596,11 +596,29 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) int output_size = 0; std::vector strings; std::string s; - int c; while((!limit_count || strings.size() < limit_count) && (limit_input < 0 || static_cast(fin.tellg()) < limit_input) && - (c = fin.get(), fin)) + fin) { + std::string current_str; + + int c = fin.get(); + + if(c == '\r') + { + // Ignore CR character to make output always have UNIX newlines. + continue; + } + + else if((c >= 0x20 && c < 0x7F) || c == '\t' || + (c == '\n' && newline_consume)) + { + // This is an ASCII character that may be part of a string. + // Cast added to avoid compiler warning. Cast is ok because + // c is guaranteed to fit in char by the above if... + current_str += static_cast(c); + } + if(c == '\n' && !newline_consume) { // The current line has been terminated. Check if the current @@ -621,26 +639,13 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) // Reset the string to empty. s = ""; } - else if(c == '\r') - { - // Ignore CR character to make output always have UNIX newlines. - } - else if((c >= 0x20 && c < 0x7F) || c == '\t' || - (c == '\n' && newline_consume)) + else if(current_str.empty()) { - // This is an ASCII character that may be part of a string. - // Cast added to avoid compiler warning. Cast is ok because - // c is guaranteed to fit in char by the above if... - s += static_cast(c); - } - else - { - // TODO: Support ENCODING option. See issue #10519. // A non-string character has been found. Check if the current // string matches the requirements. We require that the length // be at least one no matter what the user specified. if(s.length() >= minlen && s.length() >= 1 && - (!have_regex || regex.find(s.c_str()))) + (!have_regex || regex.find(s.c_str()))) { output_size += static_cast(s.size()) + 1; if(limit_output >= 0 && output_size >= limit_output) @@ -654,10 +659,15 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) // Reset the string to empty. s = ""; } + else + { + s += current_str; + } + - // Terminate a string if the maximum length is reached. if(maxlen > 0 && s.size() == maxlen) { + // Terminate a string if the maximum length is reached. if(s.length() >= minlen && (!have_regex || regex.find(s.c_str()))) { ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 09:26:30 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 09:26:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1610-g78efe8d Message-ID: <20140806132630.1119D51B23@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 78efe8d4fd95feba45c41c6ecf9cdde0bfb19e51 (commit) via 5b30ec28f9610b0e6d12b017d83fc362b0ef9ecf (commit) via ffa373e71114727dd70f1a051414de573debb767 (commit) from 4ec6ff8f9f38d02e300b3fc6bf75c2743eb70f97 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78efe8d4fd95feba45c41c6ecf9cdde0bfb19e51 commit 78efe8d4fd95feba45c41c6ecf9cdde0bfb19e51 Merge: 4ec6ff8 5b30ec2 Author: Brad King AuthorDate: Wed Aug 6 09:26:28 2014 -0400 Commit: CMake Topic Stage CommitDate: Wed Aug 6 09:26:28 2014 -0400 Merge topic 'file-strings-encoding' 5b30ec28 file: Add ENCODING option to file(STRINGS) command (#10519) ffa373e7 file: Refactor internal implementation of file(STRINGS) ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 3 + Help/release/dev/file-strings-encoding.rst | 5 ++ Source/cmFileCommand.cxx | 116 +++++++++++++++++++++++----- Tests/StringFileTest/CMakeLists.txt | 10 +++ Tests/StringFileTest/test.utf8 | 3 + 5 files changed, 118 insertions(+), 19 deletions(-) create mode 100644 Help/release/dev/file-strings-encoding.rst create mode 100644 Tests/StringFileTest/test.utf8 hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 09:26:31 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 09:26:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1612-g3d18dbd Message-ID: <20140806132631.C2A6F51B2B@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 3d18dbd1d3a1dea926a9c2c8b9e928cd0a15d9df (commit) via bf89f9103410036c6b09aba79330bb41ad300bcf (commit) from 78efe8d4fd95feba45c41c6ecf9cdde0bfb19e51 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d18dbd1d3a1dea926a9c2c8b9e928cd0a15d9df commit 3d18dbd1d3a1dea926a9c2c8b9e928cd0a15d9df Merge: 78efe8d bf89f91 Author: Brad King AuthorDate: Wed Aug 6 09:26:30 2014 -0400 Commit: CMake Topic Stage CommitDate: Wed Aug 6 09:26:30 2014 -0400 Merge topic 'CheckIncludeFiles-main-prototype' bf89f910 CheckIncludeFiles: Use modern C declaration for 'main' (#15058) ----------------------------------------------------------------------- Summary of changes: Modules/CheckIncludeFiles.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 09:26:33 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 09:26:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1616-ga16a344 Message-ID: <20140806132633.7E1D251B22@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 a16a344b4bc2618e4f31a1a4a169c0a378c6b431 (commit) via 5bf1c5cce17fe76727ea4487fd500d7f9a4b5da4 (commit) via 2a58c872d7764e9a4c618662ae49da289789e44f (commit) via cb88742da4e50bf2265799aae73c9e141757f87f (commit) from 3d18dbd1d3a1dea926a9c2c8b9e928cd0a15d9df (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a16a344b4bc2618e4f31a1a4a169c0a378c6b431 commit a16a344b4bc2618e4f31a1a4a169c0a378c6b431 Merge: 3d18dbd 5bf1c5c Author: Brad King AuthorDate: Wed Aug 6 09:26:32 2014 -0400 Commit: CMake Topic Stage CommitDate: Wed Aug 6 09:26:32 2014 -0400 Merge topic 'doc-add_custom_command' 5bf1c5cc Help: Document add_custom_command PRE_BUILD/PRE_LINK for exe/lib only (#15059) 2a58c872 Help: Revise and format 'add_custom_command' docs cb88742d Help: Remove stray content from 'add_custom_command' docs ----------------------------------------------------------------------- Summary of changes: Help/command/add_custom_command.rst | 245 ++++++++++++++++++----------------- 1 file changed, 124 insertions(+), 121 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 09:26:35 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 09:26:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1618-ge56db93 Message-ID: <20140806132635.337EB51B36@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 e56db93a7b5cb8784cf1f52362684f2d1961372b (commit) via 2cac483e64835329e4eec2d2fad5001895d0e7fe (commit) from a16a344b4bc2618e4f31a1a4a169c0a378c6b431 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e56db93a7b5cb8784cf1f52362684f2d1961372b commit e56db93a7b5cb8784cf1f52362684f2d1961372b Merge: a16a344 2cac483 Author: Brad King AuthorDate: Wed Aug 6 09:26:34 2014 -0400 Commit: CMake Topic Stage CommitDate: Wed Aug 6 09:26:34 2014 -0400 Merge topic 'fix_value_not_used' 2cac483e Fix used value warning. ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackGenerator.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 09:26:36 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 09:26:36 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1620-gebd8fa2 Message-ID: <20140806132636.CDCE151B36@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 ebd8fa2256c9293b3887f6aeecc9aa7ee718137d (commit) via f2ccc14b22a396710923d718fc5768ea7c021e04 (commit) from e56db93a7b5cb8784cf1f52362684f2d1961372b (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ebd8fa2256c9293b3887f6aeecc9aa7ee718137d commit ebd8fa2256c9293b3887f6aeecc9aa7ee718137d Merge: e56db93 f2ccc14 Author: Brad King AuthorDate: Wed Aug 6 09:26:35 2014 -0400 Commit: CMake Topic Stage CommitDate: Wed Aug 6 09:26:35 2014 -0400 Merge topic 'ExternalData-drop-security-disclaimer' f2ccc14b ExternalData: Drop 'not security software' disclaimer (#15060) ----------------------------------------------------------------------- Summary of changes: Modules/ExternalData.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 09:26:53 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 09:26:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4781-g1568528 Message-ID: <20140806132653.0A75A51B2D@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, next has been updated via 1568528e5d39bb3d0b5d07610a996277e59ec59f (commit) via ebd8fa2256c9293b3887f6aeecc9aa7ee718137d (commit) via e56db93a7b5cb8784cf1f52362684f2d1961372b (commit) via a16a344b4bc2618e4f31a1a4a169c0a378c6b431 (commit) via 3d18dbd1d3a1dea926a9c2c8b9e928cd0a15d9df (commit) via 78efe8d4fd95feba45c41c6ecf9cdde0bfb19e51 (commit) from cd680503072b7627fc5f79ceacac62ada9f6d6d2 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1568528e5d39bb3d0b5d07610a996277e59ec59f commit 1568528e5d39bb3d0b5d07610a996277e59ec59f Merge: cd68050 ebd8fa2 Author: Brad King AuthorDate: Wed Aug 6 09:28:13 2014 -0400 Commit: Brad King CommitDate: Wed Aug 6 09:28:13 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 09:34:16 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 09:34:16 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4783-g978e9ed Message-ID: <20140806133416.A283751CA2@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, next has been updated via 978e9ed4cfc55cbd1c253a863e50dbd18dde4acd (commit) via 770bd58a8c3021e838a22bfe6a278954693af466 (commit) from 1568528e5d39bb3d0b5d07610a996277e59ec59f (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=978e9ed4cfc55cbd1c253a863e50dbd18dde4acd commit 978e9ed4cfc55cbd1c253a863e50dbd18dde4acd Merge: 1568528 770bd58 Author: Brad King AuthorDate: Wed Aug 6 09:34:15 2014 -0400 Commit: CMake Topic Stage CommitDate: Wed Aug 6 09:34:15 2014 -0400 Merge topic 'vs-special-source-file-properties' into next 770bd58a Help: Add notes for topic 'vs-special-source-file-properties' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=770bd58a8c3021e838a22bfe6a278954693af466 commit 770bd58a8c3021e838a22bfe6a278954693af466 Author: Brad King AuthorDate: Wed Aug 6 09:35:24 2014 -0400 Commit: Brad King CommitDate: Wed Aug 6 09:35:24 2014 -0400 Help: Add notes for topic 'vs-special-source-file-properties' diff --git a/Help/release/dev/vs-special-source-file-properties.rst b/Help/release/dev/vs-special-source-file-properties.rst new file mode 100644 index 0000000..166c4b3 --- /dev/null +++ b/Help/release/dev/vs-special-source-file-properties.rst @@ -0,0 +1,11 @@ +vs-special-source-file-properties +--------------------------------- + +* A :prop_sf:`VS_DEPLOYMENT_CONTENT` source file property was added + to tell the Visual Studio generators to mark content for deployment + in Windows Phone and Windows Store projects. + +* The Visual Studio generators learned to treat ``.hlsl`` source + files as High Level Shading Language sources (using ``FXCompile`` + in ``.vcxproj`` files). A :prop_sf:`VS_SHADER_TYPE` source file + property was added to specify the Shader Type. ----------------------------------------------------------------------- Summary of changes: Help/release/dev/vs-special-source-file-properties.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Help/release/dev/vs-special-source-file-properties.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 10:20:08 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 10:20:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4785-ged40f50 Message-ID: <20140806142008.37DC95192A@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, next has been updated via ed40f502eccba0087c460e5fb5c246d061254630 (commit) via 3f476beaf7ffc20a27d97fbf04f6699791996f7f (commit) from 978e9ed4cfc55cbd1c253a863e50dbd18dde4acd (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed40f502eccba0087c460e5fb5c246d061254630 commit ed40f502eccba0087c460e5fb5c246d061254630 Merge: 978e9ed 3f476be Author: Brad King AuthorDate: Wed Aug 6 10:20:07 2014 -0400 Commit: CMake Topic Stage CommitDate: Wed Aug 6 10:20:07 2014 -0400 Merge topic 'genex-build-property-no-head' into next 3f476bea Genex: Do not consider 'head' when evaluating build properties http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f476beaf7ffc20a27d97fbf04f6699791996f7f commit 3f476beaf7ffc20a27d97fbf04f6699791996f7f Author: Brad King AuthorDate: Wed Aug 6 09:51:08 2014 -0400 Commit: Brad King CommitDate: Wed Aug 6 10:13:04 2014 -0400 Genex: Do not consider 'head' when evaluating build properties When $ names a build property like COMPILE_DEFINITIONS but not the usage requirement (INTERFACE_) version of it, the value should be that used to build the target. It should not be influenced by a dependent 'head' target like usage requirements are. Extend the CompileDefinitions test with a case covering the corrected behavior. Reviewed-by: Stephen Kelly diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 35a9fcb..1c9cfac 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -1081,7 +1081,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode } } #undef POPULATE_INTERFACE_PROPERTY_NAME - cmTarget const* headTarget = context->HeadTarget + cmTarget const* headTarget = context->HeadTarget && isInterfaceProperty ? context->HeadTarget : target; if(isInterfaceProperty) @@ -1103,7 +1103,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode { linkedTargetsContent = getLinkedTargetsContent(impl->Libraries, target, - headTarget, + target, context, &dagChecker, interfacePropertyName); } diff --git a/Tests/CompileDefinitions/target_prop/CMakeLists.txt b/Tests/CompileDefinitions/target_prop/CMakeLists.txt index 2ca2869..311975c 100644 --- a/Tests/CompileDefinitions/target_prop/CMakeLists.txt +++ b/Tests/CompileDefinitions/target_prop/CMakeLists.txt @@ -53,3 +53,8 @@ set_property(TARGET target_prop_mixed_executable APPEND PROPERTY COMPILE_DEFINIT "LINK_LANGUAGE_IS_$" "C_EXECUTABLE_LINK_LANGUAGE_IS_$" ) + +add_library(tgt STATIC IMPORTED) +set_property(TARGET tgt APPEND PROPERTY COMPILE_DEFINITIONS TGT_DEF TGT_TYPE_$) +add_executable(usetgt usetgt.c) +target_compile_definitions(usetgt PRIVATE $) diff --git a/Tests/CompileDefinitions/target_prop/usetgt.c b/Tests/CompileDefinitions/target_prop/usetgt.c new file mode 100644 index 0000000..6672a3e --- /dev/null +++ b/Tests/CompileDefinitions/target_prop/usetgt.c @@ -0,0 +1,10 @@ +#ifndef TGT_DEF +# error TGT_DEF incorrectly not defined +#endif +#ifndef TGT_TYPE_STATIC_LIBRARY +# error TGT_TYPE_STATIC_LIBRARY incorrectly not defined +#endif +#ifdef TGT_TYPE_EXECUTABLE +# error TGT_TYPE_EXECUTABLE incorrectly defined +#endif +int main(void) { return 0; } ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorExpressionEvaluator.cxx | 4 ++-- Tests/CompileDefinitions/target_prop/CMakeLists.txt | 5 +++++ Tests/CompileDefinitions/target_prop/usetgt.c | 10 ++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 Tests/CompileDefinitions/target_prop/usetgt.c hooks/post-receive -- CMake From brad.king at kitware.com Wed Aug 6 13:26:20 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 6 Aug 2014 13:26:20 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4789-g5e24839 Message-ID: <20140806172620.E1B9451D04@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, next has been updated via 5e24839e32d401f3f975cd4d2a8d0c2f6adf8303 (commit) via 194b412b4a83137268edd68b2da5a28a98f67511 (commit) via 82382479f7d43158d12f75c5ee8dda53edacd8c4 (commit) via 3040ab8f557b8d8e0e09f4ff569263d429afdb6d (commit) from ed40f502eccba0087c460e5fb5c246d061254630 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e24839e32d401f3f975cd4d2a8d0c2f6adf8303 commit 5e24839e32d401f3f975cd4d2a8d0c2f6adf8303 Merge: ed40f50 194b412 Author: Brad King AuthorDate: Wed Aug 6 13:26:19 2014 -0400 Commit: CMake Topic Stage CommitDate: Wed Aug 6 13:26:19 2014 -0400 Merge topic 'cpack-ifw-generator' into next 194b412b CPackIFW: Refactor and revise this generator 82382479 Doxygen: Add STRIP_FROM_PATH variable to doxyfile.in 3040ab8f Doxygen: Add CPack/IFW subdir to doxyfile.in INPUT section http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=194b412b4a83137268edd68b2da5a28a98f67511 commit 194b412b4a83137268edd68b2da5a28a98f67511 Author: Konstantin Podsvirov AuthorDate: Wed Aug 6 11:23:00 2014 -0400 Commit: Brad King CommitDate: Wed Aug 6 13:27:03 2014 -0400 CPackIFW: Refactor and revise this generator Split the monolithic cmCPackIFWGenerator source into three parts: cmCPackIFWGenerator, cmCPackIFWInstaller, and cmCPackIFWPackage to isolate the implementations somewhat. Add a COMMON option to the cpack_ifw_configure_component command to make the data component common to its parent group. Change the default packaging method to ONE_PACKAGE_PER_COMPONENT. This is not incompatible because the CPack IFW generator has not yet been in a release. diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index 1f6de8f..29a0047 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -123,6 +123,7 @@ # :: # # cpack_ifw_configure_component( +# [COMMON] # [VERSION ] # [SCRIPT " << std::endl; + } + + // Dependencies + std::set compDepSet; + for(std::set::iterator ait = AlienDependencies.begin(); + ait != AlienDependencies.end(); ++ait) + { + compDepSet.insert(*(*ait)); + } + for(std::set::iterator it = Dependencies.begin(); + it != Dependencies.end(); ++it) + { + compDepSet.insert(DependenceStruct((*it)->Name)); + } + // Write dependencies + if (!compDepSet.empty()) + { + xout << " "; + std::set::iterator it = compDepSet.begin(); + xout << it->NameWithCompare(); + ++it; + while(it != compDepSet.end()) + { + xout << "," << it->NameWithCompare(); + ++it; + } + xout << "" << std::endl; + } + + // Licenses (copy to meta dir) + std::vector licenses = Licenses; + for(size_t i = 1; i < licenses.size(); i += 2) + { + std::string name = cmSystemTools::GetFilenameName(licenses[i]); + std::string path = Directory + "/meta/" + name; + cmsys::SystemTools::CopyFileIfDifferent(licenses[i].data(), path.data()); + licenses[i] = name; + } + if(!licenses.empty()) + { + xout << " " << std::endl; + for(size_t i = 0; i < licenses.size(); i += 2) + { + xout << " " <" << std::endl; + } + + if (!ForcedInstallation.empty()) + { + xout << " " << ForcedInstallation + << "" << std::endl; + } + + if (!Virtual.empty()) + { + xout << " " << Virtual << "" << std::endl; + } + else if (!Default.empty()) + { + xout << " " << Default << "" << std::endl; + } + + // Priority + if(!SortingPriority.empty()) + { + xout << " " << SortingPriority + << "" << std::endl; + } + + xout << "" << std::endl; +} diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h new file mode 100644 index 0000000..e58a78a --- /dev/null +++ b/Source/CPack/IFW/cmCPackIFWPackage.h @@ -0,0 +1,133 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2009 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef cmCPackIFWPackage_h +#define cmCPackIFWPackage_h + +#include +#include +#include + +class cmCPackComponent; +class cmCPackComponentGroup; +class cmCPackIFWInstaller; +class cmCPackIFWGenerator; + +/** \class cmCPackIFWPackage + * \brief A single component to be installed by CPack IFW generator + */ +class cmCPackIFWPackage +{ +public: // Types + enum CompareTypes + { + CompareNone = 0x0, + CompareEqual = 0x1, + CompareLess = 0x2, + CompareLessOrEqual = 0x3, + CompareGreater = 0x4, + CompareGreaterOrEqual = 0x5 + }; + + struct CompareStruct + { + CompareStruct(); + + unsigned int Type; + std::string Value; + }; + + struct DependenceStruct + { + DependenceStruct(); + DependenceStruct(const std::string &dependence); + + std::string Name; + CompareStruct Compare; + + std::string NameWithCompare() const; + + bool operator < (const DependenceStruct &other) const + { + return Name < other.Name; + } + }; + +public: // [Con|De]structor + + /** + * Construct package + */ + cmCPackIFWPackage(); + +public: // Configuration + + /// Human-readable name of the component + std::string DisplayName; + + /// Human-readable description of the component + std::string Description; + + /// Version number of the component + std::string Version; + + /// Date when this component version was released + std::string ReleaseDate; + + /// Domain-like identification for this component + std::string Name; + + /// File name of a script being loaded + std::string Script; + + /// List of license agreements to be accepted by the installing user + std::vector Licenses; + + /// Priority of the component in the tree + std::string SortingPriority; + + /// Set to true to preselect the component in the installer + std::string Default; + + /// Set to true to hide the component from the installer + std::string Virtual; + + /// Determines that the package must always be installed + std::string ForcedInstallation; + +public: // Internal implementation + + const char* GetOption(const std::string& op) const; + + std::string GetComponentName(cmCPackComponent *component); + + void DefaultConfiguration(); + + int ConfigureFromOptions(); + int ConfigureFromComponent(cmCPackComponent *component); + int ConfigureFromComponentGroup(cmCPackComponentGroup *group); + + void GeneratePackageFile(); + + // Pointer to generator + cmCPackIFWGenerator* Generator; + // Pointer to installer + cmCPackIFWInstaller* Installer; + // Collection of dependencies + std::set Dependencies; + // Collection of unresolved dependencies + std::set AlienDependencies; + // Patch to package directory + std::string Directory; +}; + +#endif // cmCPackIFWPackage_h diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index da97657..c8737f4 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -21,7 +21,7 @@ #include "cmCPack7zGenerator.h" #include "cmCPackSTGZGenerator.h" #include "cmCPackNSISGenerator.h" -#include "cmCPackIFWGenerator.h" +#include "IFW/cmCPackIFWGenerator.h" #ifdef __APPLE__ # include "cmCPackDragNDropGenerator.h" diff --git a/Source/CPack/cmCPackIFWGenerator.cxx b/Source/CPack/cmCPackIFWGenerator.cxx deleted file mode 100644 index 3a7f539..0000000 --- a/Source/CPack/cmCPackIFWGenerator.cxx +++ /dev/null @@ -1,909 +0,0 @@ -/*============================================================================ - CMake - Cross Platform Makefile Generator - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ - -#include "cmCPackIFWGenerator.h" - -#include "cmGlobalGenerator.h" -#include "cmLocalGenerator.h" -#include "cmSystemTools.h" -#include "cmMakefile.h" -#include "cmGeneratedFileStream.h" -#include "cmCPackLog.h" -#include "cmCPackComponentGroup.h" -#include "cmTimestamp.h" - -#include -#include -#include -#include -#include - -//---------------------------------------------------------------------- -cmCPackIFWGenerator::cmCPackIFWGenerator() -{ -} - -//---------------------------------------------------------------------- -cmCPackIFWGenerator::~cmCPackIFWGenerator() -{ -} - -//---------------------------------------------------------------------- -int cmCPackIFWGenerator::PackageFiles() -{ - cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Configuration" << std::endl); - - if (!IfwCreateConfigFile()) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "CPack error: Could not create IFW \"config.xml\" file." - << std::endl); - return false; - } - - if (Components.empty() && !IfwCreatePackageFile()) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "CPack error: Could not create IFW " - "\"root/meta/package.xml\" file." - << std::endl); - return false; - } - - std::string ifwTLD = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); - std::string ifwTmpFile = ifwTLD; - ifwTmpFile += "/IFWOutput.log"; - - std::set ifwDependsComponents; - std::string ifwBinaryComponents; - std::string ifwDownloadedComponents; - - // Create groups meta information - std::map::iterator groupIt; - for(groupIt = this->ComponentGroups.begin(); - groupIt != this->ComponentGroups.end(); - ++groupIt - ) - { - std::string macroPrefix = "CPACK_IFW_COMPONENT_GROUP_" - + cmsys::SystemTools::UpperCase(groupIt->second.Name); - - std::string groupId = IfwGetGroupId(&groupIt->second); - - if(!ifwBinaryComponents.empty()) ifwBinaryComponents += ","; - ifwBinaryComponents += groupId; - - std::string pkgMetaDir = this->toplevel + "/packages/" - + groupId - + "/meta"; - - std::string pkgXmlFileName = pkgMetaDir - + "/package.xml"; - - cmGeneratedFileStream pkgXml(pkgXmlFileName.data()); - pkgXml << "" << std::endl; - pkgXml << "" << std::endl; - pkgXml << " " << groupIt->second.DisplayName - << "" << std::endl; - pkgXml << " " << groupIt->second.Description - << "" << std::endl; - pkgXml << " " << groupId << "" << std::endl; - - // Version - const char* ifwPackageVersion = this->GetOption("CPACK_PACKAGE_VERSION"); - const char* ifwGroupVersion = this->GetOption(macroPrefix + "_VERSION"); - pkgXml << " " - << (ifwGroupVersion ? ifwGroupVersion : ifwPackageVersion) - << "" << std::endl; - pkgXml << " " << IfwCreateCurrentDate() - << "" << std::endl; - - // Licenses - std::vector licenses; - if(IfwParseLicenses(licenses, macroPrefix + "_LICENSES", pkgMetaDir)) - { - pkgXml << " " << std::endl; - for(size_t i = 0; i < licenses.size(); i += 2) - { - pkgXml << " " <" << std::endl; - } - - // Priority - if(const char* ifwGroupPriority = - this->GetOption(macroPrefix + "_PRIORITY")) - { - pkgXml << " " << ifwGroupPriority - << "" << std::endl; - } - pkgXml << "" << std::endl; - } - - // Create components meta information - std::map::iterator compIt; - for (compIt = this->Components.begin(); - compIt != this->Components.end(); - ++compIt) - { - // Component id - std::string ifwCompId = IfwGetComponentId(&compIt->second); - - std::string pkgMetaDir = this->toplevel + "/" - + GetComponentInstallDirNamePrefix(compIt->second.Name) - + ifwCompId + "/meta"; - std::string pkgXmlFileName = pkgMetaDir + "/package.xml"; - cmGeneratedFileStream pkgXml(pkgXmlFileName.data()); - - // Check IFW version for component - std::string macroPrefix = "CPACK_IFW_COMPONENT_" - + cmsys::SystemTools::UpperCase(compIt->second.Name); - - pkgXml << "" << std::endl; - pkgXml << "" << std::endl; - pkgXml << " " << compIt->second.DisplayName - << "" << std::endl; - pkgXml << " " << compIt->second.Description - << "" << std::endl; - pkgXml << " " << ifwCompId << "" << std::endl; - - // Version - const char* ifwPackageVersion = this->GetOption("CPACK_PACKAGE_VERSION"); - const char* ifwCompVersion = - this->GetOption(macroPrefix + "_VERSION"); - pkgXml << " " - << (ifwCompVersion ? ifwCompVersion : ifwPackageVersion) - << "" << std::endl; - - pkgXml << " " << IfwCreateCurrentDate() - << "" << std::endl; - - // Script - const char* ifwCompScript = - this->GetOption(macroPrefix + "_SCRIPT"); - if (ifwCompScript) - { - // Copy file - std::string ifwCompScriptFile = pkgMetaDir + "/operations.qs"; - cmsys::SystemTools::CopyFileIfDifferent(ifwCompScript, - ifwCompScriptFile.data()); - pkgXml << " " << std::endl; - } - - // Check dependencies - std::set compDepSet; - // CMake dependencies - if (!compIt->second.Dependencies.empty()) - { - std::vector::iterator depCompIt; - for(depCompIt = compIt->second.Dependencies.begin(); - depCompIt != compIt->second.Dependencies.end(); - ++depCompIt) - { - compDepSet.insert(IfwGetComponentId(*depCompIt)); - } - } - // QtIFW dependencies - if(const char *ifwCompDepsStr = this->GetOption(macroPrefix + "_DEPENDS")) - { - std::vector ifwCompDepsVector; - cmSystemTools::ExpandListArgument(ifwCompDepsStr, - ifwCompDepsVector); - for(std::vector::iterator - depCompIt = ifwCompDepsVector.begin(); - depCompIt != ifwCompDepsVector.end(); ++depCompIt) - { - compDepSet.insert(*depCompIt); - ifwDependsComponents.insert(*depCompIt); - } - } - - // Write dependencies - if (!compDepSet.empty()) - { - pkgXml << " "; - std::set::iterator it = compDepSet.begin(); - pkgXml << *it; - ++it; - while(it != compDepSet.end()) - { - pkgXml << "," << *it; - ++it; - } - pkgXml << "" << std::endl; - } - - // Licenses - std::vector licenses; - if(IfwParseLicenses(licenses, macroPrefix + "_LICENSES", pkgMetaDir)) - { - pkgXml << " " << std::endl; - for(size_t i = 0; i < licenses.size(); i += 2) - { - pkgXml << " " <" << std::endl; - } - - // TODO: Check how enable virtual component (now it's allways disabled) - if (compIt->second.IsRequired) { - pkgXml << " true" - << std::endl; - } else if (compIt->second.IsDisabledByDefault) { - pkgXml << " false" << std::endl; - } else if (compIt->second.IsHidden) { - pkgXml << " true" << std::endl; - } else { - pkgXml << " true" << std::endl; - } - - // Priority - if(const char* ifwCompPriority = - this->GetOption(macroPrefix + "_PRIORITY")) - { - pkgXml << " " << ifwCompPriority - << "" << std::endl; - } - - pkgXml << "" << std::endl; - - // Downloaded - if (compIt->second.IsDownloaded) - { - if (!ifwDownloadedComponents.empty()) ifwDownloadedComponents += ","; - ifwDownloadedComponents += ifwCompId; - } - else - { - if (!ifwBinaryComponents.empty()) ifwBinaryComponents += ","; - ifwBinaryComponents += ifwCompId; - } - } - - // Run repogen - if (!ifwDownloadSite.empty()) - { - std::string ifwCmd = ifwRepoGen; - ifwCmd += " -c " + this->toplevel + "/config/config.xml"; - ifwCmd += " -p " + this->toplevel + "/packages"; - - if(!ifwPkgsDirsVector.empty()) - { - for(std::vector::iterator it = ifwPkgsDirsVector.begin(); - it != ifwPkgsDirsVector.end(); ++it) - { - ifwCmd += " -p " + *it; - } - } - - if (!ifwOnlineOnly && !ifwDownloadedComponents.empty()) { - ifwCmd += " -i " + ifwDownloadedComponents; - } - ifwCmd += " " + this->toplevel + "/repository"; - cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << ifwCmd - << std::endl); - std::string output; - int retVal = 1; - cmCPackLogger(cmCPackLog::LOG_OUTPUT, - "- Generate repository" << std::endl); - bool res = cmSystemTools::RunSingleCommand( - ifwCmd.c_str(), &output, &retVal, 0, this->GeneratorVerbose, 0); - if ( !res || retVal ) - { - cmGeneratedFileStream ofs(ifwTmpFile.c_str()); - ofs << "# Run command: " << ifwCmd << std::endl - << "# Output:" << std::endl - << output << std::endl; - cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running IFW command: " - << ifwCmd << std::endl - << "Please check " << ifwTmpFile << " for errors" - << std::endl); - return 0; - } - } - - // Run binary creator - { - std::string ifwCmd = ifwBinCreator; - ifwCmd += " -c " + this->toplevel + "/config/config.xml"; - ifwCmd += " -p " + this->toplevel + "/packages"; - - if(!ifwPkgsDirsVector.empty()) - { - for(std::vector::iterator it = ifwPkgsDirsVector.begin(); - it != ifwPkgsDirsVector.end(); ++it) - { - ifwCmd += " -p " + *it; - } - } - - if (ifwOnlineOnly) - { - ifwCmd += " --online-only"; - } - else if (!ifwDownloadedComponents.empty() && !ifwDownloadSite.empty()) - { - ifwCmd += " -e " + ifwDownloadedComponents; - } - else if (!ifwDependsComponents.empty()) - { - ifwCmd += " -i "; - std::set::iterator it = ifwDependsComponents.begin(); - ifwCmd += *it; - ++it; - while(it != ifwDependsComponents.end()) - { - ifwCmd += "," + (*it); - ++it; - } - - ifwCmd += "," + ifwBinaryComponents; - } - // TODO: set correct name for multipackages - if (this->packageFileNames.size() > 0) - { - ifwCmd += " " + packageFileNames[0]; - } - else - { - ifwCmd += " installer"; - } - cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << ifwCmd - << std::endl); - std::string output; - int retVal = 1; - cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Generate package" << std::endl); - bool res = cmSystemTools::RunSingleCommand( - ifwCmd.c_str(), &output, &retVal, 0, this->GeneratorVerbose, 0); - if ( !res || retVal ) - { - cmGeneratedFileStream ofs(ifwTmpFile.c_str()); - ofs << "# Run command: " << ifwCmd << std::endl - << "# Output:" << std::endl - << output << std::endl; - cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running IFW command: " - << ifwCmd << std::endl - << "Please check " << ifwTmpFile << " for errors" - << std::endl); - return 0; - } - } - - return 1; -} - -//---------------------------------------------------------------------- -const char *cmCPackIFWGenerator::GetPackagingInstallPrefix() -{ - const char *defPrefix = cmCPackGenerator::GetPackagingInstallPrefix(); - - std::string tmpPref = defPrefix ? defPrefix : ""; - - if(this->Components.empty()) - { - tmpPref += "packages/root/data"; - } - - this->SetOption("CPACK_IFW_PACKAGING_INSTALL_PREFIX", tmpPref.c_str()); - - return this->GetOption("CPACK_IFW_PACKAGING_INSTALL_PREFIX"); -} - -//---------------------------------------------------------------------- -const char *cmCPackIFWGenerator::GetOutputExtension() -{ - const char *suffix = this->GetOption("CMAKE_EXECUTABLE_SUFFIX"); - return suffix ? suffix : ""; -} - -//---------------------------------------------------------------------- -std::string cmCPackIFWGenerator::IfwGetGroupId(cmCPackComponentGroup *group) -{ - std::string ifwGroupId; - std::string ifwGroupName; - std::list groups; - while(group) - { - groups.push_front(group); - group = group->ParentGroup; - } - std::list::iterator it = groups.begin(); - if(it != groups.end()) - { - ifwGroupId = IfwGetGroupName(*it); - ++it; - } - while(it != groups.end()) - { - ifwGroupName = IfwGetGroupName(*it); - - if(ifwResolveDuplicateNames) - { - if(ifwGroupName.substr(0, ifwGroupId.size()) == ifwGroupId) - { - ifwGroupId = ifwGroupName; - ++it; - continue; - } - } - - ifwGroupId += "." + ifwGroupName; - - ++it; - } - - return ifwGroupId; -} - -//---------------------------------------------------------------------- -std::string cmCPackIFWGenerator::IfwGetComponentId(cmCPackComponent *component) -{ - std::string ifwCompId; - if(component) { - ifwCompId = IfwGetGroupId(component->Group); - if(!ifwCompId.empty()) ifwCompId += "."; - std::string ifwCompName = IfwGetComponentName(component); - if(ifwResolveDuplicateNames && - (ifwCompName.substr(0, ifwCompId.size()) == ifwCompId)) - { - ifwCompId = ifwCompName; - } - else - { - ifwCompId += ifwCompName; - } - } - return ifwCompId; -} - -//---------------------------------------------------------------------- -std::string cmCPackIFWGenerator::IfwGetGroupName(cmCPackComponentGroup *group) -{ - std::string ifwGroupName = group->Name; - if(const char* name = - this->GetOption("CPACK_IFW_COMPONENT_GROUP_" - + cmsys::SystemTools::UpperCase(group->Name) + "_NAME")) - { - ifwGroupName = name; - } - return ifwGroupName; -} - -//---------------------------------------------------------------------- -std::string -cmCPackIFWGenerator::IfwGetComponentName(cmCPackComponent *component) -{ - return IfwGetComponentName(component->Name); -} - -//---------------------------------------------------------------------- -std::string -cmCPackIFWGenerator::IfwGetComponentName(const std::string &componentName) -{ - std::string ifwCompName = componentName; - if(const char* name = - this->GetOption("CPACK_IFW_COMPONENT_" - + cmsys::SystemTools::UpperCase(componentName) + "_NAME")) - { - ifwCompName = name; - } - return ifwCompName; -} - -//---------------------------------------------------------------------- -int cmCPackIFWGenerator::InitializeInternal() -{ - // Search Qt Installer Framework tools - - if(!this->IsOn("CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND") || - !this->IsOn("CPACK_IFW_REPOGEN_EXECUTABLE_FOUND")) - { - this->ReadListFile("CPackIFW.cmake"); - } - - // Look 'binarycreator' executable (needs) - - if(this->IsOn("CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND")) - { - const char *ifwBinCreatorStr = - this->GetOption("CPACK_IFW_BINARYCREATOR_EXECUTABLE"); - ifwBinCreator = ifwBinCreatorStr ? ifwBinCreatorStr : ""; - } - else - { - ifwBinCreator = ""; - } - - if (ifwBinCreator.empty()) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Cannot find QtIFW compiler \"binarycreator\": " - "likely it is not installed, or not in your PATH" - << std::endl); - return 0; - } - - // Look 'repogen' executable (optional) - - if(this->IsOn("CPACK_IFW_REPOGEN_EXECUTABLE_FOUND")) - { - const char *ifwRepoGenStr = - this->GetOption("CPACK_IFW_REPOGEN_EXECUTABLE"); - ifwRepoGen = ifwRepoGenStr ? ifwRepoGenStr : ""; - } - else - { - ifwRepoGen = ""; - } - - // // Variables that Change Behavior - - // Resolve duplicate names - ifwResolveDuplicateNames = this->IsOn("CPACK_IFW_RESOLVE_DUPLICATE_NAMES"); - - // Additional packages dirs - ifwPkgsDirsVector.clear(); - if(const char* dirs = this->GetOption("CPACK_IFW_PACKAGES_DIRECTORIES")) - { - cmSystemTools::ExpandListArgument(dirs, - ifwPkgsDirsVector); - } - - // Remote repository - - if (const char *site = this->GetOption("CPACK_DOWNLOAD_SITE")) - { - ifwDownloadSite = site; - } - - ifwOnlineOnly = this->IsOn("CPACK_DOWNLOAD_ALL") ? true : false; - - if (!ifwDownloadSite.empty() && ifwRepoGen.empty()) { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Cannot find QtIFW repository generator \"repogen\": " - "likely it is not installed, or not in your PATH" - << std::endl); - return 0; - } - - return this->Superclass::InitializeInternal(); -} - -//---------------------------------------------------------------------- -std::string -cmCPackIFWGenerator::GetComponentInstallDirNamePrefix( - const std::string& /*componentName*/) -{ - return "packages/"; -} - -//---------------------------------------------------------------------- -std::string -cmCPackIFWGenerator::GetComponentInstallDirNameSuffix( - const std::string& componentName) -{ - std::map::iterator - compIt = this->Components.find(componentName); - - cmCPackComponent *comp = - compIt != this->Components.end() ? &compIt->second : 0; - - const std::string prefix = GetComponentInstallDirNamePrefix(componentName); - const std::string suffix = "/data"; - - if (componentPackageMethod == ONE_PACKAGE_PER_COMPONENT) { - return prefix + IfwGetComponentId(comp) + suffix; - } - - if (componentPackageMethod == ONE_PACKAGE) { - return std::string(prefix + "ALL_COMPONENTS_IN_ONE" + suffix); - } - - return prefix + IfwGetComponentId(comp) + suffix; -} - -//---------------------------------------------------------------------- -bool cmCPackIFWGenerator::GetListOfSubdirectories( - const char* topdir, std::vector& dirs) -{ - cmsys::Directory dir; - dir.Load(topdir); - size_t fileNum; - for (fileNum = 0; fileNum < dir.GetNumberOfFiles(); ++fileNum) - { - if (strcmp(dir.GetFile(static_cast(fileNum)),".") && - strcmp(dir.GetFile(static_cast(fileNum)),"..")) - { - cmsys_stl::string fullPath = topdir; - fullPath += "/"; - fullPath += dir.GetFile(static_cast(fileNum)); - if(cmsys::SystemTools::FileIsDirectory(fullPath.c_str()) && - !cmsys::SystemTools::FileIsSymlink(fullPath.c_str())) - { - if (!this->GetListOfSubdirectories(fullPath.c_str(), dirs)) - { - return false; - } - } - } - } - dirs.push_back(topdir); - return true; -} - -//---------------------------------------------------------------------- -enum cmCPackGenerator::CPackSetDestdirSupport -cmCPackIFWGenerator::SupportsSetDestdir() const -{ - return cmCPackGenerator::SETDESTDIR_SHOULD_NOT_BE_USED; -} - -//---------------------------------------------------------------------- -bool cmCPackIFWGenerator::SupportsAbsoluteDestination() const -{ - return false; -} - -//---------------------------------------------------------------------- -bool cmCPackIFWGenerator::SupportsComponentInstallation() const -{ - return true; -} - -//---------------------------------------------------------------------- -int cmCPackIFWGenerator::IfwCreateConfigFile() -{ - cmGeneratedFileStream cfg((this->toplevel + "/config/config.xml").data()); - - std::string ifwPkgName; - if (const char *name = this->GetOption("CPACK_PACKAGE_NAME")) - { - ifwPkgName = name; - } - else - { - ifwPkgName = "Your package"; - } - - std::string pkgTitle; - if (const char *title = this->GetOption("CPACK_IFW_PACKAGE_TITLE")) - { - pkgTitle = title; - } - else if (const char *description = - this->GetOption("CPACK_PACKAGE_DESCRIPTION_SUMMARY")) - { - pkgTitle = description; - } - else - { - pkgTitle = "Your package description"; - } - - std::string ifwPkgVersion; - if (const char *version = this->GetOption("CPACK_PACKAGE_VERSION")) - { - ifwPkgVersion = version; - } - else - { - ifwPkgVersion = "1.0.0"; - } - - const char *ifwPkgInstDir = - this->GetOption("CPACK_PACKAGE_INSTALL_DIRECTORY"); - const char *ifwTargetDir = - this->GetOption("CPACK_IFW_TARGET_DIRECTORY"); - const char *ifwAdminTargetDir = - this->GetOption("CPACK_IFW_ADMIN_TARGET_DIRECTORY"); - - cfg << "" << std::endl; - cfg << "" << std::endl; - cfg << " " << cmXMLSafe(ifwPkgName).str() << "" << std::endl; - cfg << " " << ifwPkgVersion << "" << std::endl; - cfg << " " << cmXMLSafe(pkgTitle).str() << "" - << std::endl; - - // Publisher - std::string ifwPublisher; - if(const char *publisher = GetOption("CPACK_IFW_PACKAGE_PUBLISHER")) - { - ifwPublisher = publisher; - } - else if(const char *vendor = GetOption("CPACK_PACKAGE_VENDOR")) - { - ifwPublisher = vendor; - } - if(!ifwPublisher.empty()) - { - cfg << " " << cmXMLSafe(ifwPublisher).str() - << "" << std::endl; - } - - // ProductUrl - if(const char *url = GetOption("CPACK_IFW_PRODUCT_URL")) - { - cfg << " " << url << "" << std::endl; - } - - // ApplicationIcon - const char *pkgApplicationIcon = GetOption("CPACK_IFW_PACKAGE_ICON"); - if(pkgApplicationIcon && cmSystemTools::FileExists(pkgApplicationIcon)) - { - std::string name = cmSystemTools::GetFilenameName(pkgApplicationIcon); - std::string path = this->toplevel + "/config/" + name; - name = cmSystemTools::GetFilenameWithoutExtension(name); - cmsys::SystemTools::CopyFileIfDifferent(pkgApplicationIcon, path.data()); - cfg << " " << name - << "" << std::endl; - } - - // WindowIcon - const char *pkgWindowIcon = GetOption("CPACK_IFW_PACKAGE_WINDOW_ICON"); - if(pkgWindowIcon && cmSystemTools::FileExists(pkgWindowIcon)) - { - std::string name = cmSystemTools::GetFilenameName(pkgWindowIcon); - std::string path = this->toplevel + "/config/" + name; - cmsys::SystemTools::CopyFileIfDifferent(pkgWindowIcon, path.data()); - cfg << " " << name - << "" << std::endl; - } - - // Logo - const char *pkgLogo = GetOption("CPACK_IFW_PACKAGE_LOGO"); - if(pkgLogo && cmSystemTools::FileExists(pkgLogo)) - { - std::string name = cmSystemTools::GetFilenameName(pkgLogo); - std::string path = this->toplevel + "/config/" + name; - cmsys::SystemTools::CopyFileIfDifferent(pkgLogo, path.data()); - cfg << " " << name << "" << std::endl; - } - - // Default target directory for installation - if (ifwTargetDir) - { - cfg << " " << ifwTargetDir << "" << std::endl; - } - else if (ifwPkgInstDir) - { - cfg << " @ApplicationsDir@/" << ifwPkgInstDir - << "" << std::endl; - } - else - { - cfg << " @RootDir@/usr/local" << std::endl; - } - - // Default target directory for installation with administrator rights - if (ifwAdminTargetDir) - { - cfg << " " << ifwAdminTargetDir - << "" << std::endl; - } - - if (!ifwDownloadSite.empty()) - { - cfg << " " << std::endl; - cfg << " " << std::endl; - cfg << " " << ifwDownloadSite << "" << std::endl; - // These properties can now be set from "cpack_configure_downloads" - // 1 - // user - // password - // Example repository - cfg << " " << std::endl; - cfg << " " << std::endl; - } - - // CPack IFW default policy - cfg << " " << std::endl; - cfg << " true" - << std::endl; - cfg << " true" << std::endl; - - cfg << "" << std::endl; - - return 1; -} - -//---------------------------------------------------------------------- -// Create default package file -int cmCPackIFWGenerator::IfwCreatePackageFile() -{ - std::string ifwPkgName; - if (const char *name = this->GetOption("CPACK_PACKAGE_NAME")) - { - ifwPkgName = name; - } - else - { - ifwPkgName = "Your package"; - } - - std::string ifwPkgDescription; - if (const char *name = this->GetOption("CPACK_PACKAGE_DESCRIPTION_SUMMARY")) - { - ifwPkgDescription = name; - } - else - { - ifwPkgDescription = "Your package description"; - } - - cmGeneratedFileStream - pkgXml((this->toplevel + "/packages/root/meta/package.xml").data()); - pkgXml << "" << std::endl; - pkgXml << "" << std::endl; - - pkgXml << " " << ifwPkgName << "" << std::endl; - pkgXml << " " << ifwPkgDescription - << "" << std::endl; - pkgXml << " " << "root" << "" << std::endl; - pkgXml << " " << this->GetOption("CPACK_PACKAGE_VERSION") - << "" << std::endl; - pkgXml << " " << IfwCreateCurrentDate() << "" - << std::endl; - - pkgXml << " true" << std::endl; - pkgXml << " true" << std::endl; - - pkgXml << "" << std::endl; - - return 1; -} - -//---------------------------------------------------------------------- -std::string cmCPackIFWGenerator::IfwCreateCurrentDate() -{ - cmTimestamp timestamp; - return timestamp.CurrentTime("%Y-%m-%d", false); -} - -//---------------------------------------------------------------------- -bool cmCPackIFWGenerator::IfwParseLicenses(std::vector &licenses, - const std::string &variable, - const std::string &metaDir) -{ - if (const char *option = this->GetOption(variable)) - { - if(!licenses.empty()) licenses.clear(); - cmSystemTools::ExpandListArgument( option, licenses ); - } - else - { - return false; - } - - if ( licenses.size() % 2 != 0 ) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, variable - << " should contain pairs of and ." - << std::endl); - return false; - } - - for(size_t i = 1; i < licenses.size(); i += 2) - { - std::string name = cmSystemTools::GetFilenameName(licenses[i]); - std::string path = metaDir + "/" + name; - cmsys::SystemTools::CopyFileIfDifferent(licenses[i].data(), path.data()); - licenses[i] = name; - } - - return licenses.size() > 1; -} diff --git a/Source/CPack/cmCPackIFWGenerator.h b/Source/CPack/cmCPackIFWGenerator.h deleted file mode 100644 index d70e52d..0000000 --- a/Source/CPack/cmCPackIFWGenerator.h +++ /dev/null @@ -1,82 +0,0 @@ -/*============================================================================ - CMake - Cross Platform Makefile Generator - Copyright 2000-2009 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ - -#ifndef cmCPackIFWGenerator_h -#define cmCPackIFWGenerator_h - - -#include "cmCPackGenerator.h" -#include - -/** \class cmCPackIFWGenerator - * \brief A generator for Qt Installer Framework tools - * - * http://qt-project.org/doc/qtinstallerframework/index.html - */ -class cmCPackIFWGenerator : public cmCPackGenerator -{ -public: - cmCPackTypeMacro(cmCPackIFWGenerator, cmCPackGenerator); - - /** - * Construct generator - */ - cmCPackIFWGenerator(); - virtual ~cmCPackIFWGenerator(); - -protected: - virtual int InitializeInternal(); - virtual int PackageFiles(); - virtual const char* GetPackagingInstallPrefix(); - - virtual const char* GetOutputExtension(); - - std::string IfwGetGroupId(cmCPackComponentGroup *group); - std::string IfwGetComponentId(cmCPackComponent *component); - - std::string IfwGetGroupName(cmCPackComponentGroup *group); - - std::string IfwGetComponentName(cmCPackComponent *component); - std::string IfwGetComponentName(const std::string &componentName); - - virtual std::string GetComponentInstallDirNamePrefix( - const std::string& componentName); - - virtual std::string GetComponentInstallDirNameSuffix( - const std::string& componentName); - - bool GetListOfSubdirectories(const char* dir, - std::vector& dirs); - - enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir() const; - virtual bool SupportsAbsoluteDestination() const; - virtual bool SupportsComponentInstallation() const; - -private: - int IfwCreateConfigFile(); - int IfwCreatePackageFile(); - std::string IfwCreateCurrentDate(); - bool IfwParseLicenses(std::vector &licenses, - const std::string &variable, - const std::string &metaDir); - - std::string ifwRepoGen; - std::string ifwBinCreator; - - std::string ifwDownloadSite; - - bool ifwOnlineOnly; - bool ifwResolveDuplicateNames; - std::vector ifwPkgsDirsVector; -}; - -#endif http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82382479f7d43158d12f75c5ee8dda53edacd8c4 commit 82382479f7d43158d12f75c5ee8dda53edacd8c4 Author: Konstantin Podsvirov AuthorDate: Wed Aug 6 11:07:06 2014 +0400 Commit: Brad King CommitDate: Wed Aug 6 12:49:27 2014 -0400 Doxygen: Add STRIP_FROM_PATH variable to doxyfile.in This helps to better perceive information diff --git a/Utilities/Doxygen/doxyfile.in b/Utilities/Doxygen/doxyfile.in index 063ec26..2c131f5 100644 --- a/Utilities/Doxygen/doxyfile.in +++ b/Utilities/Doxygen/doxyfile.in @@ -6,6 +6,10 @@ PROJECT_NAME = CMake FULL_PATH_NAMES = YES +STRIP_FROM_PATH = \ + "@CMake_SOURCE_DIR@/Source/" \ + "@CMake_BINARY_DIR@/Source/" + WARN_IF_UNDOCUMENTED = NO GENERATE_TREEVIEW = NO http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3040ab8f557b8d8e0e09f4ff569263d429afdb6d commit 3040ab8f557b8d8e0e09f4ff569263d429afdb6d Author: Konstantin Podsvirov AuthorDate: Wed Aug 6 09:54:45 2014 +0400 Commit: Brad King CommitDate: Wed Aug 6 11:26:02 2014 -0400 Doxygen: Add CPack/IFW subdir to doxyfile.in INPUT section diff --git a/Utilities/Doxygen/doxyfile.in b/Utilities/Doxygen/doxyfile.in index 9743af7..063ec26 100644 --- a/Utilities/Doxygen/doxyfile.in +++ b/Utilities/Doxygen/doxyfile.in @@ -40,6 +40,7 @@ OUTPUT_DIRECTORY = "@CMake_BINARY_DIR@/Utilities/Doxygen/doc" INPUT = \ "@CMake_SOURCE_DIR@/Source" \ "@CMake_SOURCE_DIR@/Source/CPack" \ + "@CMake_SOURCE_DIR@/Source/CPack/IFW" \ "@CMake_SOURCE_DIR@/Source/CTest" \ "@CMake_SOURCE_DIR@/Source/CursesDialog" \ "@CMake_SOURCE_DIR@/Source/MFCDialog" \ ----------------------------------------------------------------------- Summary of changes: Modules/CPackIFW.cmake | 18 +- Source/CMakeLists.txt | 4 +- Source/CPack/IFW/cmCPackIFWGenerator.cxx | 538 ++++++++++++++++++ Source/CPack/IFW/cmCPackIFWGenerator.h | 139 +++++ Source/CPack/IFW/cmCPackIFWInstaller.cxx | 289 ++++++++++ Source/CPack/IFW/cmCPackIFWInstaller.h | 85 +++ Source/CPack/IFW/cmCPackIFWPackage.cxx | 486 ++++++++++++++++ Source/CPack/IFW/cmCPackIFWPackage.h | 133 +++++ Source/CPack/cmCPackGeneratorFactory.cxx | 2 +- Source/CPack/cmCPackIFWGenerator.cxx | 909 ------------------------------ Source/CPack/cmCPackIFWGenerator.h | 82 --- Utilities/Doxygen/doxyfile.in | 5 + 12 files changed, 1694 insertions(+), 996 deletions(-) create mode 100644 Source/CPack/IFW/cmCPackIFWGenerator.cxx create mode 100644 Source/CPack/IFW/cmCPackIFWGenerator.h create mode 100644 Source/CPack/IFW/cmCPackIFWInstaller.cxx create mode 100644 Source/CPack/IFW/cmCPackIFWInstaller.h create mode 100644 Source/CPack/IFW/cmCPackIFWPackage.cxx create mode 100644 Source/CPack/IFW/cmCPackIFWPackage.h delete mode 100644 Source/CPack/cmCPackIFWGenerator.cxx delete mode 100644 Source/CPack/cmCPackIFWGenerator.h hooks/post-receive -- CMake From kwrobot at kitware.com Thu Aug 7 00:01:12 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 7 Aug 2014 00:01:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1621-g029edcd Message-ID: <20140807040112.C1D315286E@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 029edcdf3e713521f95ee9f2f41485d24e342c89 (commit) from ebd8fa2256c9293b3887f6aeecc9aa7ee718137d (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=029edcdf3e713521f95ee9f2f41485d24e342c89 commit 029edcdf3e713521f95ee9f2f41485d24e342c89 Author: Kitware Robot AuthorDate: Thu Aug 7 00:01:10 2014 -0400 Commit: Kitware Robot CommitDate: Thu Aug 7 00:01:10 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 358d674..97a439f 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 0) -set(CMake_VERSION_PATCH 20140806) +set(CMake_VERSION_PATCH 20140807) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From daniele.domenichelli at gmail.com Thu Aug 7 05:03:08 2014 From: daniele.domenichelli at gmail.com (Daniele E. Domenichelli) Date: Thu, 7 Aug 2014 05:03:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4792-gd54e69b Message-ID: <20140807090308.18BFC52946@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, next has been updated via d54e69bbb941449f0e2f44fe7254b0434d472b91 (commit) via b7d5b51714ae41bfd079469075fa7b864f33b5c0 (commit) via 9e5178a1d4edbde8627c8f1ba7ce6b2f234f98f8 (commit) from 5e24839e32d401f3f975cd4d2a8d0c2f6adf8303 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d54e69bbb941449f0e2f44fe7254b0434d472b91 commit d54e69bbb941449f0e2f44fe7254b0434d472b91 Merge: 5e24839 b7d5b51 Author: Daniele E. Domenichelli AuthorDate: Thu Aug 7 05:03:07 2014 -0400 Commit: CMake Topic Stage CommitDate: Thu Aug 7 05:03:07 2014 -0400 Merge topic 'CMakePackageConfigHelpers-INSTALL_PREFIX' into next b7d5b517 CMakePackageConfigHelpers: Ensure that INSTALL_PREFIX is an absolute path 9e5178a1 fixup! CMakePackageConfigHelpers: Add INSTALL_PREFIX option http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7d5b51714ae41bfd079469075fa7b864f33b5c0 commit b7d5b51714ae41bfd079469075fa7b864f33b5c0 Author: Daniele E. Domenichelli AuthorDate: Thu Aug 7 10:56:13 2014 +0200 Commit: Daniele E. Domenichelli CommitDate: Thu Aug 7 11:00:58 2014 +0200 CMakePackageConfigHelpers: Ensure that INSTALL_PREFIX is an absolute path diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index db9b5b0..c6dc141 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -78,11 +78,12 @@ # only if the absolute location is a subdirectory of ``INSTALL_PREFIX``. # # If the ``INSTALL_PREFIX`` argument is passed, this is used as base path to -# calculate all the relative paths. If this argument is not passed, the -# :variable:`CMAKE_INSTALL_PREFIX` variable will be used instead. The default -# value is good when generating a FooConfig.cmake file to use your package from -# the install tree. When generating a FooConfig.cmake file to use your package -# from the build tree this option should be used. +# calculate all the relative paths. The ```` argument must be an absolute +# path. If this argument is not passed, the :variable:`CMAKE_INSTALL_PREFIX` +# variable will be used instead. The default value is good when generating a +# FooConfig.cmake file to use your package from the install tree. When +# generating a FooConfig.cmake file to use your package from the build tree this +# option should be used. # # By default ``configure_package_config_file`` also generates two helper macros, # ``set_and_check()`` and ``check_required_components()`` into the @@ -231,7 +232,11 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) endif() if(DEFINED CCF_INSTALL_PREFIX) - set(installPrefix "${CCF_INSTALL_PREFIX}") + if(IS_ABSOLUTE "${CCF_INSTALL_PREFIX}") + set(installPrefix "${CCF_INSTALL_PREFIX}") + else() + message(FATAL_ERROR "INSTALL_PREFIX must be an absolute path") + endif() else() set(installPrefix "${CMAKE_INSTALL_PREFIX}") endif() http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9e5178a1d4edbde8627c8f1ba7ce6b2f234f98f8 commit 9e5178a1d4edbde8627c8f1ba7ce6b2f234f98f8 Author: Daniele E. Domenichelli AuthorDate: Thu Aug 7 11:00:21 2014 +0200 Commit: Daniele E. Domenichelli CommitDate: Thu Aug 7 11:00:58 2014 +0200 fixup! CMakePackageConfigHelpers: Add INSTALL_PREFIX option diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 6534583..db9b5b0 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -90,7 +90,7 @@ # # ``set_and_check()`` should be used instead of the normal ``set()`` command for # setting directories and file locations. Additionally to setting the variable -# it also checks that the referenced file or directory actually exists and fails? +# it also checks that the referenced file or directory actually exists and fails # with a ``FATAL_ERROR`` otherwise. This makes sure that the created # ``FooConfig.cmake`` file does not contain wrong references. # When using the ``NO_SET_AND_CHECK_MACRO``, this macro is not generated ----------------------------------------------------------------------- Summary of changes: Modules/CMakePackageConfigHelpers.cmake | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Aug 7 09:31:40 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 7 Aug 2014 09:31:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4794-g1441745 Message-ID: <20140807133140.0C41C540BF@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, next has been updated via 14417456592263921366f058201a12516f2767fe (commit) via 2d1dd9af4f18a0ac2e0c36dad0dd2a2a82dae60a (commit) from d54e69bbb941449f0e2f44fe7254b0434d472b91 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14417456592263921366f058201a12516f2767fe commit 14417456592263921366f058201a12516f2767fe Merge: d54e69b 2d1dd9a Author: Brad King AuthorDate: Thu Aug 7 09:31:38 2014 -0400 Commit: CMake Topic Stage CommitDate: Thu Aug 7 09:31:38 2014 -0400 Merge topic 'cpack-ifw-generator' into next 2d1dd9af CPackIFW: Include standard headers through cmStandardIncludes.h http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d1dd9af4f18a0ac2e0c36dad0dd2a2a82dae60a commit 2d1dd9af4f18a0ac2e0c36dad0dd2a2a82dae60a Author: Brad King AuthorDate: Thu Aug 7 09:30:26 2014 -0400 Commit: Brad King CommitDate: Thu Aug 7 09:30:26 2014 -0400 CPackIFW: Include standard headers through cmStandardIncludes.h Otherwise standard interfaces affected by large file support macros may not be defined consistently with other translation units. diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index 1a16784..9c571e8 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -18,8 +18,6 @@ #include "cmCPackIFWPackage.h" #include "cmCPackIFWInstaller.h" -#include - /** \class cmCPackIFWGenerator * \brief A generator for Qt Installer Framework tools * diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h index 4956f69..02cd07b 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.h +++ b/Source/CPack/IFW/cmCPackIFWInstaller.h @@ -13,8 +13,7 @@ #ifndef cmCPackIFWInstaller_h #define cmCPackIFWInstaller_h -#include -#include +#include "cmStandardIncludes.h" class cmCPackIFWPackage; class cmCPackIFWGenerator; diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h index e58a78a..868c15d 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.h +++ b/Source/CPack/IFW/cmCPackIFWPackage.h @@ -13,9 +13,7 @@ #ifndef cmCPackIFWPackage_h #define cmCPackIFWPackage_h -#include -#include -#include +#include "cmStandardIncludes.h" class cmCPackComponent; class cmCPackComponentGroup; ----------------------------------------------------------------------- Summary of changes: Source/CPack/IFW/cmCPackIFWGenerator.h | 2 -- Source/CPack/IFW/cmCPackIFWInstaller.h | 3 +-- Source/CPack/IFW/cmCPackIFWPackage.h | 4 +--- 3 files changed, 2 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Aug 7 10:01:46 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 7 Aug 2014 10:01:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4796-g09916ec Message-ID: <20140807140146.3A21653CC4@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, next has been updated via 09916ec6ab40019294d02ffa2a96c0f684a8b4c4 (commit) via 2a9f8c08fe90d80a6091c6617d3dfc3bd1c0ed72 (commit) from 14417456592263921366f058201a12516f2767fe (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09916ec6ab40019294d02ffa2a96c0f684a8b4c4 commit 09916ec6ab40019294d02ffa2a96c0f684a8b4c4 Merge: 1441745 2a9f8c0 Author: Brad King AuthorDate: Thu Aug 7 10:01:45 2014 -0400 Commit: CMake Topic Stage CommitDate: Thu Aug 7 10:01:45 2014 -0400 Merge topic 'cpack-ifw-generator' into next 2a9f8c08 CPackIFW: Fix doxygen method argument names in cmCPackIFWGenerator http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a9f8c08fe90d80a6091c6617d3dfc3bd1c0ed72 commit 2a9f8c08fe90d80a6091c6617d3dfc3bd1c0ed72 Author: Brad King AuthorDate: Thu Aug 7 10:02:30 2014 -0400 Commit: Brad King CommitDate: Thu Aug 7 10:02:30 2014 -0400 CPackIFW: Fix doxygen method argument names in cmCPackIFWGenerator diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index 9c571e8..e871f7c 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -66,7 +66,7 @@ protected: // cmCPackGenerator reimplementation /** * @brief Get Component * @param projectName Project name - * @param name Component name + * @param componentName Component name * * This method calls the base implementation. * @@ -79,7 +79,7 @@ protected: // cmCPackGenerator reimplementation /** * @brief Get group of component * @param projectName Project name - * @param name Component group name + * @param groupName Component group name * * This method calls the base implementation. * ----------------------------------------------------------------------- Summary of changes: Source/CPack/IFW/cmCPackIFWGenerator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Aug 7 10:07:50 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 7 Aug 2014 10:07:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1623-gdf08d85 Message-ID: <20140807140750.BE4EA54521@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 df08d8575b56699c592ba8dec747dc7f6329b1b7 (commit) via c6acbc90630064aaac0d0c23ea4d7afaceac48db (commit) from 029edcdf3e713521f95ee9f2f41485d24e342c89 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df08d8575b56699c592ba8dec747dc7f6329b1b7 commit df08d8575b56699c592ba8dec747dc7f6329b1b7 Merge: 029edcd c6acbc9 Author: Brad King AuthorDate: Thu Aug 7 10:07:49 2014 -0400 Commit: CMake Topic Stage CommitDate: Thu Aug 7 10:07:49 2014 -0400 Merge topic 'genex-context-makefile-non-null' c6acbc90 Genex: Remove unnecessary check of context->Makefile ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorExpressionEvaluator.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Aug 7 10:07:52 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 7 Aug 2014 10:07:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1625-g6f0d1a3 Message-ID: <20140807140752.AA74A54520@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 6f0d1a38c8eee267cf16c4b6bae90ddf218f3088 (commit) via 3f476beaf7ffc20a27d97fbf04f6699791996f7f (commit) from df08d8575b56699c592ba8dec747dc7f6329b1b7 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f0d1a38c8eee267cf16c4b6bae90ddf218f3088 commit 6f0d1a38c8eee267cf16c4b6bae90ddf218f3088 Merge: df08d85 3f476be Author: Brad King AuthorDate: Thu Aug 7 10:07:51 2014 -0400 Commit: CMake Topic Stage CommitDate: Thu Aug 7 10:07:51 2014 -0400 Merge topic 'genex-build-property-no-head' 3f476bea Genex: Do not consider 'head' when evaluating build properties ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorExpressionEvaluator.cxx | 4 ++-- Tests/CompileDefinitions/target_prop/CMakeLists.txt | 5 +++++ Tests/CompileDefinitions/target_prop/usetgt.c | 10 ++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 Tests/CompileDefinitions/target_prop/usetgt.c hooks/post-receive -- CMake From brad.king at kitware.com Thu Aug 7 10:08:08 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 7 Aug 2014 10:08:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4800-g979ee20 Message-ID: <20140807140808.582455453F@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, next has been updated via 979ee2084090ef56386f4edf80344bf80fcb6923 (commit) via 6f0d1a38c8eee267cf16c4b6bae90ddf218f3088 (commit) via df08d8575b56699c592ba8dec747dc7f6329b1b7 (commit) via 029edcdf3e713521f95ee9f2f41485d24e342c89 (commit) from 09916ec6ab40019294d02ffa2a96c0f684a8b4c4 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=979ee2084090ef56386f4edf80344bf80fcb6923 commit 979ee2084090ef56386f4edf80344bf80fcb6923 Merge: 09916ec 6f0d1a3 Author: Brad King AuthorDate: Thu Aug 7 10:09:26 2014 -0400 Commit: Brad King CommitDate: Thu Aug 7 10:09:26 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Aug 7 11:26:55 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 7 Aug 2014 11:26:55 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4802-g0e3015f Message-ID: <20140807152655.B1995545EA@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, next has been updated via 0e3015f3add67ecd9596b3805f42a9388fbf2db0 (commit) via 70796ef026e8d10a4e50c8e26472d469a45f7dd5 (commit) from 979ee2084090ef56386f4edf80344bf80fcb6923 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e3015f3add67ecd9596b3805f42a9388fbf2db0 commit 0e3015f3add67ecd9596b3805f42a9388fbf2db0 Merge: 979ee20 70796ef Author: Brad King AuthorDate: Thu Aug 7 11:26:55 2014 -0400 Commit: CMake Topic Stage CommitDate: Thu Aug 7 11:26:55 2014 -0400 Merge topic 'fix-CMP0047-IS_GNU-vars' into next 70796ef0 CMP0047: Fix CMAKE_COMPILER_IS_GNU(CC|CXX) in OLD behavior http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70796ef026e8d10a4e50c8e26472d469a45f7dd5 commit 70796ef026e8d10a4e50c8e26472d469a45f7dd5 Author: Brad King AuthorDate: Thu Aug 7 11:16:24 2014 -0400 Commit: Brad King CommitDate: Thu Aug 7 11:24:57 2014 -0400 CMP0047: Fix CMAKE_COMPILER_IS_GNU(CC|CXX) in OLD behavior The implementation of CMP0047 detects the QNX compiler id internally, then changes it to GNU after the language is fully enabled. This is too late to correctly set the old IS_GNU variables, so set them as part of the policy OLD behavior. Reported-by: Mike Lattanzio diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 38ba5d1..3f948b5 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -844,6 +844,14 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf, case cmPolicies::OLD: // OLD behavior is to convert QCC to GNU. mf->AddDefinition(compilerIdVar, "GNU"); + if(lang == "C") + { + mf->AddDefinition("CMAKE_COMPILER_IS_GNUCC", "1"); + } + else if(lang == "CXX") + { + mf->AddDefinition("CMAKE_COMPILER_IS_GNUCXX", "1"); + } break; case cmPolicies::REQUIRED_IF_USED: case cmPolicies::REQUIRED_ALWAYS: ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalGenerator.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Aug 7 13:59:39 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 7 Aug 2014 13:59:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4804-ga3a81de Message-ID: <20140807175940.0DCDE55E89@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, next has been updated via a3a81ded931ccffe858bcc284789f3521ea5c9c2 (commit) via 810f5ccefc113987fc6f68c073ab9c84fc278b32 (commit) from 0e3015f3add67ecd9596b3805f42a9388fbf2db0 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3a81ded931ccffe858bcc284789f3521ea5c9c2 commit a3a81ded931ccffe858bcc284789f3521ea5c9c2 Merge: 0e3015f 810f5cc Author: Brad King AuthorDate: Thu Aug 7 13:59:37 2014 -0400 Commit: CMake Topic Stage CommitDate: Thu Aug 7 13:59:37 2014 -0400 Merge topic 'BundleUtilities-os9-newlines' into next 810f5cce BundleUtilities: Allow Info.plist files which use CR line endings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=810f5ccefc113987fc6f68c073ab9c84fc278b32 commit 810f5ccefc113987fc6f68c073ab9c84fc278b32 Author: Tim Blechmann AuthorDate: Thu Aug 7 19:30:27 2014 +0200 Commit: Brad King CommitDate: Thu Aug 7 14:00:01 2014 -0400 BundleUtilities: Allow Info.plist files which use CR line endings Convert \r to our internal end-of-line character just as we do \n. Signed-off-by: Tim Blechmann diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 0c733fa..0046c97 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -237,6 +237,7 @@ function(get_bundle_main_executable bundle result_var) file(READ "${bundle}/Contents/Info.plist" info_plist) string(REPLACE ";" "\\;" info_plist "${info_plist}") string(REPLACE "\n" "${eol_char};" info_plist "${info_plist}") + string(REPLACE "\r" "${eol_char};" info_plist "${info_plist}") # Scan the lines for "CFBundleExecutable" - the line after that # is the name of the main executable. ----------------------------------------------------------------------- Summary of changes: Modules/BundleUtilities.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Aug 7 16:13:14 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 7 Aug 2014 16:13:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4807-g3fca129 Message-ID: <20140807201314.4AB52552DE@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, next has been updated via 3fca1291167226c610f1d9f215fe10a4f4fa9b69 (commit) via 45ab21ee6ebb2727bfb79548811eaf642a46a691 (commit) via 3c0bb28162e1b2d05e913f874dba23b556109a97 (commit) from a3a81ded931ccffe858bcc284789f3521ea5c9c2 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3fca1291167226c610f1d9f215fe10a4f4fa9b69 commit 3fca1291167226c610f1d9f215fe10a4f4fa9b69 Merge: a3a81de 45ab21e Author: Brad King AuthorDate: Thu Aug 7 16:13:12 2014 -0400 Commit: CMake Topic Stage CommitDate: Thu Aug 7 16:13:12 2014 -0400 Merge topic 'update-kwiml' into next 45ab21ee Merge branch 'upstream-kwiml' into update-kwiml 3c0bb281 KWIML: Teach ABI.h about OpenRISC 1000 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=45ab21ee6ebb2727bfb79548811eaf642a46a691 commit 45ab21ee6ebb2727bfb79548811eaf642a46a691 Merge: 6f0d1a3 3c0bb28 Author: Brad King AuthorDate: Thu Aug 7 16:13:26 2014 -0400 Commit: Brad King CommitDate: Thu Aug 7 16:13:26 2014 -0400 Merge branch 'upstream-kwiml' into update-kwiml http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c0bb28162e1b2d05e913f874dba23b556109a97 commit 3c0bb28162e1b2d05e913f874dba23b556109a97 Author: Christian Svensson AuthorDate: Fri May 23 01:05:56 2014 +0200 Commit: Brad King CommitDate: Thu Aug 7 16:12:19 2014 -0400 KWIML: Teach ABI.h about OpenRISC 1000 It defines __or1k__ and is big endian. diff --git a/ABI.h.in b/ABI.h.in index b71cdfb..21c9139 100644 --- a/ABI.h.in +++ b/ABI.h.in @@ -398,6 +398,10 @@ suppression macro @KWIML at _ABI_NO_VERIFY was defined. #elif defined(__mips) || defined(__mips__) || defined(__MIPS__) # define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG +/* OpenRISC 1000 */ +#elif defined(__or1k__) +# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG + /* RS/6000 */ #elif defined(__THW_RS600) || defined(_IBMR2) || defined(_POWER) # define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG ----------------------------------------------------------------------- Summary of changes: Utilities/KWIML/ABI.h.in | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Aug 8 00:01:13 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 8 Aug 2014 00:01:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1626-ga99b42a Message-ID: <20140808040113.DF65656DDC@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 a99b42a4101dfa29ef3ebbfcbac58226879fd2f3 (commit) from 6f0d1a38c8eee267cf16c4b6bae90ddf218f3088 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a99b42a4101dfa29ef3ebbfcbac58226879fd2f3 commit a99b42a4101dfa29ef3ebbfcbac58226879fd2f3 Author: Kitware Robot AuthorDate: Fri Aug 8 00:01:12 2014 -0400 Commit: Kitware Robot CommitDate: Fri Aug 8 00:01:12 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 97a439f..31399f0 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 0) -set(CMake_VERSION_PATCH 20140807) +set(CMake_VERSION_PATCH 20140808) #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 Sat Aug 9 00:01:17 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 9 Aug 2014 00:01:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1627-g35a8355 Message-ID: <20140809040117.1C99D5AFE3@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 35a8355b6101dbb82582f9737ba1c3a67930de59 (commit) from a99b42a4101dfa29ef3ebbfcbac58226879fd2f3 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35a8355b6101dbb82582f9737ba1c3a67930de59 commit 35a8355b6101dbb82582f9737ba1c3a67930de59 Author: Kitware Robot AuthorDate: Sat Aug 9 00:01:12 2014 -0400 Commit: Kitware Robot CommitDate: Sat Aug 9 00:01:12 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 31399f0..c4bfefe 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 0) -set(CMake_VERSION_PATCH 20140808) +set(CMake_VERSION_PATCH 20140809) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Sat Aug 9 09:09:38 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Sat, 9 Aug 2014 09:09:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4810-ga4afd72 Message-ID: <20140809130938.4A1F55C636@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, next has been updated via a4afd728837d220977c22bdf05b768b70e7ae599 (commit) via d6576d56bd269f83cd0c3c7f8b7e9479e73e733f (commit) via a99b42a4101dfa29ef3ebbfcbac58226879fd2f3 (commit) from 3fca1291167226c610f1d9f215fe10a4f4fa9b69 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a4afd728837d220977c22bdf05b768b70e7ae599 commit a4afd728837d220977c22bdf05b768b70e7ae599 Merge: 3fca129 d6576d5 Author: Nils Gladitz AuthorDate: Sat Aug 9 09:09:36 2014 -0400 Commit: CMake Topic Stage CommitDate: Sat Aug 9 09:09:36 2014 -0400 Merge topic 'wix-acl' into next d6576d56 CPackWIX: Implement CPACK_WIX_ACL (Access Control List) property a99b42a4 CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d6576d56bd269f83cd0c3c7f8b7e9479e73e733f commit d6576d56bd269f83cd0c3c7f8b7e9479e73e733f Author: Nils Gladitz AuthorDate: Sat Aug 9 14:50:49 2014 +0200 Commit: Nils Gladitz CommitDate: Sat Aug 9 14:50:49 2014 +0200 CPackWIX: Implement CPACK_WIX_ACL (Access Control List) property diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 17dadc2..9faf99a 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -312,6 +312,7 @@ Properties on Installed Files /prop_inst/CPACK_NEVER_OVERWRITE.rst /prop_inst/CPACK_PERMANENT.rst + /prop_inst/CPACK_WIX_ACL.rst Deprecated Properties on Directories diff --git a/Help/prop_inst/CPACK_WIX_ACL.rst b/Help/prop_inst/CPACK_WIX_ACL.rst new file mode 100644 index 0000000..edc7571 --- /dev/null +++ b/Help/prop_inst/CPACK_WIX_ACL.rst @@ -0,0 +1,16 @@ +CPACK_WIX_ACL +------------- + +Specifies access permissions for installed files. + +The property can contain multiple list entries, +each of which has to match the following format. + +:: + [@]=[,] + +```` and ```` specify the windows user and domain for which the +```` element should be generated. + +```` is any of the YesNoType attributes listed here: +http://wixtoolset.org/documentation/manual/v3/xsd/wix/permission.html diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 7f36bb2..ac23430 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -604,13 +604,14 @@ endif() if(WIN32) set(CPACK_SRCS ${CPACK_SRCS} CPack/WiX/cmCPackWIXGenerator.cxx - CPack/WiX/cmWIXSourceWriter.cxx + CPack/WiX/cmWIXAccessControlList.cxx CPack/WiX/cmWIXDirectoriesSourceWriter.cxx CPack/WiX/cmWIXFeaturesSourceWriter.cxx CPack/WiX/cmWIXFilesSourceWriter.cxx - CPack/WiX/cmWIXRichTextFormatWriter.cxx CPack/WiX/cmWIXPatch.cxx CPack/WiX/cmWIXPatchParser.cxx + CPack/WiX/cmWIXRichTextFormatWriter.cxx + CPack/WiX/cmWIXSourceWriter.cxx ) endif() diff --git a/Source/CPack/WiX/cmWIXAccessControlList.cxx b/Source/CPack/WiX/cmWIXAccessControlList.cxx new file mode 100644 index 0000000..aeec968 --- /dev/null +++ b/Source/CPack/WiX/cmWIXAccessControlList.cxx @@ -0,0 +1,149 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Kitware, Inc. + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#include "cmWIXAccessControlList.h" + +#include + +#include + +cmWIXAccessControlList::cmWIXAccessControlList( + cmCPackLog *logger, + cmInstalledFile const& installedFile, + cmWIXSourceWriter &sourceWriter): + Logger(logger), + InstalledFile(installedFile), + SourceWriter(sourceWriter) +{ + +} + +bool cmWIXAccessControlList::Apply() +{ + std::vector entries; + this->InstalledFile.GetPropertyAsList("CPACK_WIX_ACL", entries); + + for(size_t i = 0; i < entries.size(); ++i) + { + this->CreatePermissionElement(entries[i]); + } + + return true; +} + +void cmWIXAccessControlList::CreatePermissionElement( + std::string const& entry) +{ + std::string::size_type pos = entry.find('='); + if(pos == std::string::npos) + { + this->ReportError(entry, "Did not find mandatory '='"); + return; + } + + std::string user_and_domain = entry.substr(0, pos); + std::string permission_string = entry.substr(pos + 1); + + pos = user_and_domain.find('@'); + std::string user; + std::string domain; + if(pos != std::string::npos) + { + user = user_and_domain.substr(0, pos); + domain = user_and_domain.substr(pos + 1); + } + else + { + user = user_and_domain; + } + + std::vector permissions = + cmSystemTools::tokenize(permission_string, ","); + + this->SourceWriter.BeginElement("Permission"); + this->SourceWriter.AddAttribute("User", user); + if(domain.size()) + { + this->SourceWriter.AddAttribute("Domain", domain); + } + for(size_t i = 0; i < permissions.size(); ++i) + { + this->EmitBooleanAttribute(entry, + cmSystemTools::TrimWhitespace(permissions[i])); + } + this->SourceWriter.EndElement("Permission"); +} + +void cmWIXAccessControlList::ReportError( + std::string const& entry, + std::string const& message) +{ + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Failed processing ACL entry '" << entry << + "': " << message << std::endl); +} + +bool cmWIXAccessControlList::IsBooleanAttribute(std::string const& name) +{ + static const char* validAttributes[] = + { + "Append", + "ChangePermission", + "CreateChild", + "CreateFile", + "CreateLink", + "CreateSubkeys", + "Delete", + "DeleteChild", + "EnumerateSubkeys", + "Execute", + "FileAllRights", + "GenericAll", + "GenericExecute", + "GenericRead", + "GenericWrite", + "Notify", + "Read", + "ReadAttributes", + "ReadExtendedAttributes", + "ReadPermission", + "SpecificRightsAll", + "Synchronize", + "TakeOwnership", + "Traverse", + "Write", + "WriteAttributes", + "WriteExtendedAttributes", + 0 + }; + + size_t i = 0; + while(validAttributes[i]) + { + if(name == validAttributes[i++]) return true; + } + + return false; +} + +void cmWIXAccessControlList::EmitBooleanAttribute( + std::string const& entry, std::string const& name) +{ + if(!this->IsBooleanAttribute(name)) + { + std::stringstream message; + message << "Unknown boolean attribute '" << name << "'"; + this->ReportError(entry, message.str()); + } + + this->SourceWriter.AddAttribute(name, "yes"); +} diff --git a/Source/CPack/WiX/cmWIXAccessControlList.h b/Source/CPack/WiX/cmWIXAccessControlList.h new file mode 100644 index 0000000..20902f7 --- /dev/null +++ b/Source/CPack/WiX/cmWIXAccessControlList.h @@ -0,0 +1,46 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Kitware, Inc. + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef cmWIXAccessControlList_h +#define cmWIXAccessControlList_h + +#include +#include + +#include "cmWIXSourceWriter.h" + +class cmWIXAccessControlList +{ +public: + cmWIXAccessControlList( + cmCPackLog *logger, + cmInstalledFile const& installedFile, + cmWIXSourceWriter &sourceWriter); + + bool Apply(); + +private: + void CreatePermissionElement(std::string const& entry); + + void ReportError(std::string const& entry, std::string const& message); + + bool IsBooleanAttribute(std::string const& name); + + void EmitBooleanAttribute( + std::string const& entry, std::string const& name); + + cmCPackLog* Logger; + cmInstalledFile const& InstalledFile; + cmWIXSourceWriter &SourceWriter; +}; + +#endif diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx index 451188e..0ad5d0c 100644 --- a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx @@ -11,6 +11,7 @@ ============================================================================*/ #include "cmWIXFilesSourceWriter.h" +#include "cmWIXAccessControlList.h" #include @@ -175,6 +176,12 @@ std::string cmWIXFilesSourceWriter::EmitComponentFile( AddAttribute("ReadOnly", "yes"); } + if(installedFile) + { + cmWIXAccessControlList acl(Logger, *installedFile, *this); + acl.Apply(); + } + patch.ApplyFragment(fileId, *this); EndElement("File"); diff --git a/Source/CPack/WiX/cmWIXSourceWriter.h b/Source/CPack/WiX/cmWIXSourceWriter.h index 65b7240..3957d96 100644 --- a/Source/CPack/WiX/cmWIXSourceWriter.h +++ b/Source/CPack/WiX/cmWIXSourceWriter.h @@ -45,6 +45,9 @@ public: static std::string WindowsCodepageToUtf8(std::string const& value); +protected: + cmCPackLog* Logger; + private: enum State { @@ -58,8 +61,6 @@ private: static std::string EscapeAttributeValue(std::string const& value); - cmCPackLog* Logger; - cmsys::ofstream File; State State; diff --git a/Source/cmInstalledFile.cxx b/Source/cmInstalledFile.cxx index 7813fcc..3483ecc 100644 --- a/Source/cmInstalledFile.cxx +++ b/Source/cmInstalledFile.cxx @@ -111,3 +111,14 @@ bool cmInstalledFile::GetPropertyAsBool(const std::string& prop) const bool isSet = this->GetProperty(prop, value); return isSet && cmSystemTools::IsOn(value.c_str()); } + +//---------------------------------------------------------------------------- +void cmInstalledFile::GetPropertyAsList(const std::string& prop, + std::vector& list) const +{ + std::string value; + this->GetProperty(prop, value); + + list.clear(); + cmSystemTools::ExpandListArgument(value, list); +} diff --git a/Source/cmInstalledFile.h b/Source/cmInstalledFile.h index df28221..0292cd1 100644 --- a/Source/cmInstalledFile.h +++ b/Source/cmInstalledFile.h @@ -66,6 +66,9 @@ public: bool GetPropertyAsBool(const std::string& prop) const; + void GetPropertyAsList(const std::string& prop, + std::vector& list) const; + void SetName(cmMakefile* mf, const std::string& name); std::string const& GetName() const; ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/prop_inst/CPACK_WIX_ACL.rst | 16 +++ Source/CMakeLists.txt | 5 +- Source/CMakeVersion.cmake | 2 +- Source/CPack/WiX/cmWIXAccessControlList.cxx | 149 +++++++++++++++++++++++++++ Source/CPack/WiX/cmWIXAccessControlList.h | 46 +++++++++ Source/CPack/WiX/cmWIXFilesSourceWriter.cxx | 7 ++ Source/CPack/WiX/cmWIXSourceWriter.h | 5 +- Source/cmInstalledFile.cxx | 11 ++ Source/cmInstalledFile.h | 3 + 10 files changed, 240 insertions(+), 5 deletions(-) create mode 100644 Help/prop_inst/CPACK_WIX_ACL.rst create mode 100644 Source/CPack/WiX/cmWIXAccessControlList.cxx create mode 100644 Source/CPack/WiX/cmWIXAccessControlList.h hooks/post-receive -- CMake From nilsgladitz at gmail.com Sat Aug 9 09:30:05 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Sat, 9 Aug 2014 09:30:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4812-g7ac9b41 Message-ID: <20140809133005.DB01B5DF16@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, next has been updated via 7ac9b41abcc47f02d64b80d2a7f465f3ab8700da (commit) via ff81e009263f07095f9255db558e5f157387f56a (commit) from a4afd728837d220977c22bdf05b768b70e7ae599 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ac9b41abcc47f02d64b80d2a7f465f3ab8700da commit 7ac9b41abcc47f02d64b80d2a7f465f3ab8700da Merge: a4afd72 ff81e00 Author: Nils Gladitz AuthorDate: Sat Aug 9 09:30:05 2014 -0400 Commit: CMake Topic Stage CommitDate: Sat Aug 9 09:30:05 2014 -0400 Merge topic 'wix-acl' into next ff81e009 CPackWIX: Documentation fixes http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff81e009263f07095f9255db558e5f157387f56a commit ff81e009263f07095f9255db558e5f157387f56a Author: Nils Gladitz AuthorDate: Sat Aug 9 15:29:31 2014 +0200 Commit: Nils Gladitz CommitDate: Sat Aug 9 15:29:31 2014 +0200 CPackWIX: Documentation fixes diff --git a/Help/prop_inst/CPACK_WIX_ACL.rst b/Help/prop_inst/CPACK_WIX_ACL.rst index edc7571..e7d526a 100644 --- a/Help/prop_inst/CPACK_WIX_ACL.rst +++ b/Help/prop_inst/CPACK_WIX_ACL.rst @@ -1,12 +1,13 @@ CPACK_WIX_ACL ------------- -Specifies access permissions for installed files. +Specifies access permissions for files installed by a WiX installer. The property can contain multiple list entries, each of which has to match the following format. :: + [@]=[,] ```` and ```` specify the windows user and domain for which the ----------------------------------------------------------------------- Summary of changes: Help/prop_inst/CPACK_WIX_ACL.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Sat Aug 9 09:30:43 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Sat, 9 Aug 2014 09:30:43 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4814-g715af63 Message-ID: <20140809133043.9A1235E1EB@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, next has been updated via 715af63ea643821fb20f45020e00e1d77059534a (commit) via 12418f5c264ef8e66724cbb19e1304416452c7f8 (commit) from 7ac9b41abcc47f02d64b80d2a7f465f3ab8700da (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=715af63ea643821fb20f45020e00e1d77059534a commit 715af63ea643821fb20f45020e00e1d77059534a Merge: 7ac9b41 12418f5 Author: Nils Gladitz AuthorDate: Sat Aug 9 09:30:42 2014 -0400 Commit: CMake Topic Stage CommitDate: Sat Aug 9 09:30:42 2014 -0400 Merge topic 'wix-acl' into next 12418f5c CPackWIX: Implement CPACK_WIX_ACL (Access Control List) property http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12418f5c264ef8e66724cbb19e1304416452c7f8 commit 12418f5c264ef8e66724cbb19e1304416452c7f8 Author: Nils Gladitz AuthorDate: Sat Aug 9 14:50:49 2014 +0200 Commit: Nils Gladitz CommitDate: Sat Aug 9 15:30:21 2014 +0200 CPackWIX: Implement CPACK_WIX_ACL (Access Control List) property diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 17dadc2..9faf99a 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -312,6 +312,7 @@ Properties on Installed Files /prop_inst/CPACK_NEVER_OVERWRITE.rst /prop_inst/CPACK_PERMANENT.rst + /prop_inst/CPACK_WIX_ACL.rst Deprecated Properties on Directories diff --git a/Help/prop_inst/CPACK_WIX_ACL.rst b/Help/prop_inst/CPACK_WIX_ACL.rst new file mode 100644 index 0000000..e7d526a --- /dev/null +++ b/Help/prop_inst/CPACK_WIX_ACL.rst @@ -0,0 +1,17 @@ +CPACK_WIX_ACL +------------- + +Specifies access permissions for files installed by a WiX installer. + +The property can contain multiple list entries, +each of which has to match the following format. + +:: + + [@]=[,] + +```` and ```` specify the windows user and domain for which the +```` element should be generated. + +```` is any of the YesNoType attributes listed here: +http://wixtoolset.org/documentation/manual/v3/xsd/wix/permission.html diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 7f36bb2..ac23430 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -604,13 +604,14 @@ endif() if(WIN32) set(CPACK_SRCS ${CPACK_SRCS} CPack/WiX/cmCPackWIXGenerator.cxx - CPack/WiX/cmWIXSourceWriter.cxx + CPack/WiX/cmWIXAccessControlList.cxx CPack/WiX/cmWIXDirectoriesSourceWriter.cxx CPack/WiX/cmWIXFeaturesSourceWriter.cxx CPack/WiX/cmWIXFilesSourceWriter.cxx - CPack/WiX/cmWIXRichTextFormatWriter.cxx CPack/WiX/cmWIXPatch.cxx CPack/WiX/cmWIXPatchParser.cxx + CPack/WiX/cmWIXRichTextFormatWriter.cxx + CPack/WiX/cmWIXSourceWriter.cxx ) endif() diff --git a/Source/CPack/WiX/cmWIXAccessControlList.cxx b/Source/CPack/WiX/cmWIXAccessControlList.cxx new file mode 100644 index 0000000..aeec968 --- /dev/null +++ b/Source/CPack/WiX/cmWIXAccessControlList.cxx @@ -0,0 +1,149 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Kitware, Inc. + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#include "cmWIXAccessControlList.h" + +#include + +#include + +cmWIXAccessControlList::cmWIXAccessControlList( + cmCPackLog *logger, + cmInstalledFile const& installedFile, + cmWIXSourceWriter &sourceWriter): + Logger(logger), + InstalledFile(installedFile), + SourceWriter(sourceWriter) +{ + +} + +bool cmWIXAccessControlList::Apply() +{ + std::vector entries; + this->InstalledFile.GetPropertyAsList("CPACK_WIX_ACL", entries); + + for(size_t i = 0; i < entries.size(); ++i) + { + this->CreatePermissionElement(entries[i]); + } + + return true; +} + +void cmWIXAccessControlList::CreatePermissionElement( + std::string const& entry) +{ + std::string::size_type pos = entry.find('='); + if(pos == std::string::npos) + { + this->ReportError(entry, "Did not find mandatory '='"); + return; + } + + std::string user_and_domain = entry.substr(0, pos); + std::string permission_string = entry.substr(pos + 1); + + pos = user_and_domain.find('@'); + std::string user; + std::string domain; + if(pos != std::string::npos) + { + user = user_and_domain.substr(0, pos); + domain = user_and_domain.substr(pos + 1); + } + else + { + user = user_and_domain; + } + + std::vector permissions = + cmSystemTools::tokenize(permission_string, ","); + + this->SourceWriter.BeginElement("Permission"); + this->SourceWriter.AddAttribute("User", user); + if(domain.size()) + { + this->SourceWriter.AddAttribute("Domain", domain); + } + for(size_t i = 0; i < permissions.size(); ++i) + { + this->EmitBooleanAttribute(entry, + cmSystemTools::TrimWhitespace(permissions[i])); + } + this->SourceWriter.EndElement("Permission"); +} + +void cmWIXAccessControlList::ReportError( + std::string const& entry, + std::string const& message) +{ + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Failed processing ACL entry '" << entry << + "': " << message << std::endl); +} + +bool cmWIXAccessControlList::IsBooleanAttribute(std::string const& name) +{ + static const char* validAttributes[] = + { + "Append", + "ChangePermission", + "CreateChild", + "CreateFile", + "CreateLink", + "CreateSubkeys", + "Delete", + "DeleteChild", + "EnumerateSubkeys", + "Execute", + "FileAllRights", + "GenericAll", + "GenericExecute", + "GenericRead", + "GenericWrite", + "Notify", + "Read", + "ReadAttributes", + "ReadExtendedAttributes", + "ReadPermission", + "SpecificRightsAll", + "Synchronize", + "TakeOwnership", + "Traverse", + "Write", + "WriteAttributes", + "WriteExtendedAttributes", + 0 + }; + + size_t i = 0; + while(validAttributes[i]) + { + if(name == validAttributes[i++]) return true; + } + + return false; +} + +void cmWIXAccessControlList::EmitBooleanAttribute( + std::string const& entry, std::string const& name) +{ + if(!this->IsBooleanAttribute(name)) + { + std::stringstream message; + message << "Unknown boolean attribute '" << name << "'"; + this->ReportError(entry, message.str()); + } + + this->SourceWriter.AddAttribute(name, "yes"); +} diff --git a/Source/CPack/WiX/cmWIXAccessControlList.h b/Source/CPack/WiX/cmWIXAccessControlList.h new file mode 100644 index 0000000..20902f7 --- /dev/null +++ b/Source/CPack/WiX/cmWIXAccessControlList.h @@ -0,0 +1,46 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Kitware, Inc. + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef cmWIXAccessControlList_h +#define cmWIXAccessControlList_h + +#include +#include + +#include "cmWIXSourceWriter.h" + +class cmWIXAccessControlList +{ +public: + cmWIXAccessControlList( + cmCPackLog *logger, + cmInstalledFile const& installedFile, + cmWIXSourceWriter &sourceWriter); + + bool Apply(); + +private: + void CreatePermissionElement(std::string const& entry); + + void ReportError(std::string const& entry, std::string const& message); + + bool IsBooleanAttribute(std::string const& name); + + void EmitBooleanAttribute( + std::string const& entry, std::string const& name); + + cmCPackLog* Logger; + cmInstalledFile const& InstalledFile; + cmWIXSourceWriter &SourceWriter; +}; + +#endif diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx index 451188e..0ad5d0c 100644 --- a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx @@ -11,6 +11,7 @@ ============================================================================*/ #include "cmWIXFilesSourceWriter.h" +#include "cmWIXAccessControlList.h" #include @@ -175,6 +176,12 @@ std::string cmWIXFilesSourceWriter::EmitComponentFile( AddAttribute("ReadOnly", "yes"); } + if(installedFile) + { + cmWIXAccessControlList acl(Logger, *installedFile, *this); + acl.Apply(); + } + patch.ApplyFragment(fileId, *this); EndElement("File"); diff --git a/Source/CPack/WiX/cmWIXSourceWriter.h b/Source/CPack/WiX/cmWIXSourceWriter.h index 65b7240..3957d96 100644 --- a/Source/CPack/WiX/cmWIXSourceWriter.h +++ b/Source/CPack/WiX/cmWIXSourceWriter.h @@ -45,6 +45,9 @@ public: static std::string WindowsCodepageToUtf8(std::string const& value); +protected: + cmCPackLog* Logger; + private: enum State { @@ -58,8 +61,6 @@ private: static std::string EscapeAttributeValue(std::string const& value); - cmCPackLog* Logger; - cmsys::ofstream File; State State; diff --git a/Source/cmInstalledFile.cxx b/Source/cmInstalledFile.cxx index 7813fcc..3483ecc 100644 --- a/Source/cmInstalledFile.cxx +++ b/Source/cmInstalledFile.cxx @@ -111,3 +111,14 @@ bool cmInstalledFile::GetPropertyAsBool(const std::string& prop) const bool isSet = this->GetProperty(prop, value); return isSet && cmSystemTools::IsOn(value.c_str()); } + +//---------------------------------------------------------------------------- +void cmInstalledFile::GetPropertyAsList(const std::string& prop, + std::vector& list) const +{ + std::string value; + this->GetProperty(prop, value); + + list.clear(); + cmSystemTools::ExpandListArgument(value, list); +} diff --git a/Source/cmInstalledFile.h b/Source/cmInstalledFile.h index df28221..0292cd1 100644 --- a/Source/cmInstalledFile.h +++ b/Source/cmInstalledFile.h @@ -66,6 +66,9 @@ public: bool GetPropertyAsBool(const std::string& prop) const; + void GetPropertyAsList(const std::string& prop, + std::vector& list) const; + void SetName(cmMakefile* mf, const std::string& name); std::string const& GetName() const; ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Sun Aug 10 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 10 Aug 2014 00:01:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1628-g58aca7b Message-ID: <20140810040110.208A05F77E@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 58aca7be5651646e1cb02d5a8a29062e38d9c2f5 (commit) from 35a8355b6101dbb82582f9737ba1c3a67930de59 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=58aca7be5651646e1cb02d5a8a29062e38d9c2f5 commit 58aca7be5651646e1cb02d5a8a29062e38d9c2f5 Author: Kitware Robot AuthorDate: Sun Aug 10 00:01:08 2014 -0400 Commit: Kitware Robot CommitDate: Sun Aug 10 00:01:08 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c4bfefe..3dc3607 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 0) -set(CMake_VERSION_PATCH 20140809) +set(CMake_VERSION_PATCH 20140810) #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 Aug 11 00:01:08 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 11 Aug 2014 00:01:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1629-g3b0d634 Message-ID: <20140811040108.E1196612D3@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 3b0d634f70db6af5469e83bb7c14f687bfafda74 (commit) from 58aca7be5651646e1cb02d5a8a29062e38d9c2f5 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b0d634f70db6af5469e83bb7c14f687bfafda74 commit 3b0d634f70db6af5469e83bb7c14f687bfafda74 Author: Kitware Robot AuthorDate: Mon Aug 11 00:01:07 2014 -0400 Commit: Kitware Robot CommitDate: Mon Aug 11 00:01:07 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 3dc3607..e685083 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 0) -set(CMake_VERSION_PATCH 20140810) +set(CMake_VERSION_PATCH 20140811) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:32:14 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:32:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4822-gfa20d53 Message-ID: <20140811133214.1BBF96148B@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, next has been updated via fa20d537ee6957e8bc5ff9be4fbb45db50cf8dde (commit) via 6c32d43ce2d8db87e348b281d9afe981d6ebc15d (commit) via 137a0251aaa643f39d3e804bd9a9c3e8f1519ce0 (commit) via 51c82c3a66f02192df4db5d51d95f7311bc2181f (commit) via fe587db415b1cf728f42c5db55c3acbad7a9a529 (commit) via 3b0d634f70db6af5469e83bb7c14f687bfafda74 (commit) via 58aca7be5651646e1cb02d5a8a29062e38d9c2f5 (commit) via 35a8355b6101dbb82582f9737ba1c3a67930de59 (commit) from 715af63ea643821fb20f45020e00e1d77059534a (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa20d537ee6957e8bc5ff9be4fbb45db50cf8dde commit fa20d537ee6957e8bc5ff9be4fbb45db50cf8dde Merge: 715af63 6c32d43 Author: Brad King AuthorDate: Mon Aug 11 09:32:12 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 09:32:12 2014 -0400 Merge topic 'update-kwsys' into next 6c32d43c Merge branch 'upstream-kwsys' into update-kwsys 137a0251 KWSys 2014-08-11 (32023afd) 51c82c3a Merge branch 'upstream-kwsys' into update-kwsys fe587db4 KWSys 2014-08-07 (4d526097) 3b0d634f CMake Nightly Date Stamp 58aca7be CMake Nightly Date Stamp 35a8355b CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c32d43ce2d8db87e348b281d9afe981d6ebc15d commit 6c32d43ce2d8db87e348b281d9afe981d6ebc15d Merge: 51c82c3 137a025 Author: Brad King AuthorDate: Mon Aug 11 09:31:29 2014 -0400 Commit: Brad King CommitDate: Mon Aug 11 09:31:29 2014 -0400 Merge branch 'upstream-kwsys' into update-kwsys http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=137a0251aaa643f39d3e804bd9a9c3e8f1519ce0 commit 137a0251aaa643f39d3e804bd9a9c3e8f1519ce0 Author: KWSys Robot AuthorDate: Mon Aug 11 09:29:38 2014 -0400 Commit: Brad King CommitDate: Mon Aug 11 09:31:24 2014 -0400 KWSys 2014-08-11 (32023afd) Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ 32023afd | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 4d526097..32023afd Christian Svensson (1): 32023afd CPU: Add support for OpenRISC 1000 Change-Id: Ie926eea76838b4ce7bcd7b23235f80c0f66c9d4c diff --git a/CPU.h.in b/CPU.h.in index 2e1a584..626914b 100644 --- a/CPU.h.in +++ b/CPU.h.in @@ -80,6 +80,10 @@ #elif defined(__mips) || defined(__mips__) || defined(__MIPS__) # define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG +/* OpenRISC 1000 */ +#elif defined(__or1k__) +# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG + /* RS/6000 */ #elif defined(__THW_RS600) || defined(_IBMR2) || defined(_POWER) # define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51c82c3a66f02192df4db5d51d95f7311bc2181f commit 51c82c3a66f02192df4db5d51d95f7311bc2181f Merge: 3b0d634 fe587db Author: Brad King AuthorDate: Mon Aug 11 09:30:22 2014 -0400 Commit: Brad King CommitDate: Mon Aug 11 09:30:22 2014 -0400 Merge branch 'upstream-kwsys' into update-kwsys http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe587db415b1cf728f42c5db55c3acbad7a9a529 commit fe587db415b1cf728f42c5db55c3acbad7a9a529 Author: KWSys Robot AuthorDate: Thu Aug 7 09:55:30 2014 -0400 Commit: Brad King CommitDate: Mon Aug 11 09:30:16 2014 -0400 KWSys 2014-08-07 (4d526097) Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ 4d526097 | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' e787837a..4d526097 Brad King (2): 4791701a SystemTools: Remove ConvertWindowsCommandLineToUnixArguments method 4d526097 Add assert() to quiet Clang scan-build warnings Change-Id: I15e4ad710a8ad01f96761a89f2c1517f3c2aa835 diff --git a/ProcessUNIX.c b/ProcessUNIX.c index 241e295..ca9d424 100644 --- a/ProcessUNIX.c +++ b/ProcessUNIX.c @@ -68,6 +68,7 @@ do. #include /* sigaction */ #include /* DIR, dirent */ #include /* isspace */ +#include /* assert */ #if defined(__VMS) # define KWSYSPE_VMS_NONBLOCK , O_NONBLOCK @@ -450,6 +451,7 @@ int kwsysProcess_AddCommand(kwsysProcess* cp, char const* const* command) } for(i=0; i < n; ++i) { + assert(command[i]); /* Quiet Clang scan-build. */ newCommands[cp->NumberOfCommands][i] = strdup(command[i]); if(!newCommands[cp->NumberOfCommands][i]) { diff --git a/SystemTools.cxx b/SystemTools.cxx index dcfd49c..e34bb43 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -4600,111 +4600,6 @@ void SystemTools::Delay(unsigned int msec) #endif } -void SystemTools::ConvertWindowsCommandLineToUnixArguments( - const char *cmd_line, int *argc, char ***argv) -{ - if (!cmd_line || !argc || !argv) - { - return; - } - - // A space delimites an argument except when it is inside a quote - - (*argc) = 1; - - size_t cmd_line_len = strlen(cmd_line); - - size_t i; - for (i = 0; i < cmd_line_len; i++) - { - while (isspace(cmd_line[i]) && i < cmd_line_len) - { - i++; - } - if (i < cmd_line_len) - { - if (cmd_line[i] == '\"') - { - i++; - while (cmd_line[i] != '\"' && i < cmd_line_len) - { - i++; - } - (*argc)++; - } - else - { - while (!isspace(cmd_line[i]) && i < cmd_line_len) - { - i++; - } - (*argc)++; - } - } - } - - (*argv) = new char* [(*argc) + 1]; - (*argv)[(*argc)] = NULL; - - // Set the first arg to be the exec name - - (*argv)[0] = new char [1024]; -#ifdef _WIN32 - wchar_t tmp[1024]; - ::GetModuleFileNameW(0, tmp, 1024); - strcpy((*argv)[0], Encoding::ToNarrow(tmp).c_str()); -#else - (*argv)[0][0] = '\0'; -#endif - - // Allocate the others - - int j; - for (j = 1; j < (*argc); j++) - { - (*argv)[j] = new char [cmd_line_len + 10]; - } - - // Grab the args - - size_t pos; - int argc_idx = 1; - - for (i = 0; i < cmd_line_len; i++) - { - while (isspace(cmd_line[i]) && i < cmd_line_len) - { - i++; - } - if (i < cmd_line_len) - { - if (cmd_line[i] == '\"') - { - i++; - pos = i; - while (cmd_line[i] != '\"' && i < cmd_line_len) - { - i++; - } - memcpy((*argv)[argc_idx], &cmd_line[pos], i - pos); - (*argv)[argc_idx][i - pos] = '\0'; - argc_idx++; - } - else - { - pos = i; - while (!isspace(cmd_line[i]) && i < cmd_line_len) - { - i++; - } - memcpy((*argv)[argc_idx], &cmd_line[pos], i - pos); - (*argv)[argc_idx][i - pos] = '\0'; - argc_idx++; - } - } - } - } - kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion() { kwsys_stl::string res; diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in index 2514699..e88bc8f 100644 --- a/SystemTools.hxx.in +++ b/SystemTools.hxx.in @@ -856,15 +856,6 @@ public: */ static kwsys_stl::string GetOperatingSystemNameAndVersion(); - /** - * Convert windows-style arguments given as a command-line string - * into more traditional argc/argv arguments. - * Note that argv[0] will be assigned the executable name using - * the GetModuleFileName() function. - */ - static void ConvertWindowsCommandLineToUnixArguments( - const char *cmd_line, int *argc, char ***argv); - /** ----------------------------------------------------------------- * URL Manipulation Routines * ----------------------------------------------------------------- diff --git a/testCommandLineArguments1.cxx b/testCommandLineArguments1.cxx index 3b84c38..b65c37f 100644 --- a/testCommandLineArguments1.cxx +++ b/testCommandLineArguments1.cxx @@ -21,6 +21,7 @@ # include "kwsys_ios_iostream.h.in" #endif +#include /* assert */ #include /* strcmp */ int testCommandLineArguments1(int argc, char* argv[]) @@ -83,6 +84,7 @@ int testCommandLineArguments1(int argc, char* argv[]) } for ( cc = 0; cc < newArgc; ++ cc ) { + assert(newArgv[cc]); /* Quiet Clang scan-build. */ kwsys_ios::cout << "Unused argument[" << cc << "] = [" << newArgv[cc] << "]" << kwsys_ios::endl; if ( cc >= 9 ) diff --git a/testProcess.c b/testProcess.c index 3d62822..47c3fb0 100644 --- a/testProcess.c +++ b/testProcess.c @@ -20,6 +20,7 @@ # include "Encoding.h.in" #endif +#include #include #include #include @@ -104,6 +105,7 @@ static int test4(int argc, const char* argv[]) fprintf(stderr, "Output before crash on stderr from crash test.\n"); fflush(stdout); fflush(stderr); + assert(invalidAddress); /* Quiet Clang scan-build. */ /* Provoke deliberate crash by writing to the invalid address. */ *invalidAddress = 0; fprintf(stdout, "Output after crash on stdout from crash test.\n"); diff --git a/testSystemTools.cxx b/testSystemTools.cxx index 15123eb..04ab4fc 100644 --- a/testSystemTools.cxx +++ b/testSystemTools.cxx @@ -507,28 +507,6 @@ static bool CheckStringOperations() res = false; } - int targc; - char **targv; - kwsys::SystemTools::ConvertWindowsCommandLineToUnixArguments - ("\"Local Mojo\\Voodoo.asp\" -CastHex \"D:\\My Secret Mojo\\Voodoo.mp3\"", - &targc, &targv); - if (targc != 4 || strcmp(targv[1],"Local Mojo\\Voodoo.asp") || - strcmp(targv[2],"-CastHex") || - strcmp(targv[3],"D:\\My Secret Mojo\\Voodoo.mp3")) - { - kwsys_ios::cerr - << "Problem with ConvertWindowsCommandLineToUnixArguments" - << "\'\"Local Mojo\\Voodoo.asp\" " - << "-CastHex \"D:\\My Secret Mojo\\Voodoo.mp3\"\'" - << kwsys_ios::endl; - res = false; - } - for (;targc >=0; --targc) - { - delete [] targv[targc]; - } - delete [] targv; - return res; } ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Source/kwsys/CPU.h.in | 4 ++ Source/kwsys/ProcessUNIX.c | 2 + Source/kwsys/SystemTools.cxx | 105 ---------------------------- Source/kwsys/SystemTools.hxx.in | 9 --- Source/kwsys/testCommandLineArguments1.cxx | 2 + Source/kwsys/testProcess.c | 2 + Source/kwsys/testSystemTools.cxx | 22 ------ 8 files changed, 11 insertions(+), 137 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:37:40 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:37:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4826-gf34ca49 Message-ID: <20140811133740.8A68661540@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, next has been updated via f34ca490e3704aaa7712930cbdff102bd5aa1ecf (commit) via e3007c92e04416d7fba2db5de757c27d22d4af6b (commit) via d057bf85a6412bf79a1730b31338c4581e7940be (commit) via f3dd116cee96d37e039864a032886c73f05c1cda (commit) from fa20d537ee6957e8bc5ff9be4fbb45db50cf8dde (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f34ca490e3704aaa7712930cbdff102bd5aa1ecf commit f34ca490e3704aaa7712930cbdff102bd5aa1ecf Merge: fa20d53 e3007c9 Author: Brad King AuthorDate: Mon Aug 11 09:37:39 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 09:37:39 2014 -0400 Merge topic 'CMakePackageConfigHelpers-INSTALL_PREFIX' into next e3007c92 CMakePackageConfigHelpers: Add unit tests for INSTALL_PREFIX option d057bf85 CMakePackageConfigHelpers: Add INSTALL_PREFIX option f3dd116c CMakePackageConfigHelpers: restructure documentation and document commands http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3007c92e04416d7fba2db5de757c27d22d4af6b commit e3007c92e04416d7fba2db5de757c27d22d4af6b Author: Daniele E. Domenichelli AuthorDate: Tue Jul 15 19:51:16 2014 +0200 Commit: Brad King CommitDate: Mon Aug 11 09:38:29 2014 -0400 CMakePackageConfigHelpers: Add unit tests for INSTALL_PREFIX option diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index 092bf20..f311fb9 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -374,6 +374,7 @@ endif() include(CMakePackageConfigHelpers) +# Generate a config file ready to be installed. set(INCLUDE_INSTALL_DIR include ) set(SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/" ) set(CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" ) @@ -407,6 +408,43 @@ if(Relocatable_FOUND) message(SEND_ERROR "Relocatable_FOUND set to TRUE !") endif() +# Generate a config file for the build tree. +set(INCLUDE_INSTALL_DIR include ) +set(SHARE_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/share/" ) +set(CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" ) + +configure_package_config_file(RelocatableConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/RelocatableConfig.cmake" + INSTALL_DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" + PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR + INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}" + ) + +set(Relocatable_FIND_COMPONENTS AComp BComp CComp) +set(Relocatable_FIND_REQUIRED_BComp 1) +include("${CMAKE_CURRENT_BINARY_DIR}/RelocatableConfig.cmake") + +if(NOT "${RELOC_INCLUDE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/include") + message(SEND_ERROR "RELOC_INCLUDE_DIR set by configure_package_config_file() is set to \"${RELOC_INCLUDE_DIR}\" (expected \"${CMAKE_CURRENT_BINARY_DIR}/include\")") +endif() + +if(NOT "${RELOC_SHARE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/share/") + message(SEND_ERROR "RELOC_SHARE_DIR set by configure_package_config_file() is set to \"${RELOC_SHARE_DIR}\" (expected \"${CMAKE_CURRENT_BINARY_DIR}/share/\")") +endif() + +if(NOT "${RELOC_BUILD_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") + message(SEND_ERROR "RELOC_BUILD_DIR set by configure_package_config_file() is set to \"${RELOC_BUILD_DIR}\" (expected \"${CMAKE_CURRENT_BINARY_DIR}\")") +endif() + +if(NOT DEFINED Relocatable_FOUND) + message(SEND_ERROR "Relocatable_FOUND not defined !") +endif() + +if(Relocatable_FOUND) + message(SEND_ERROR "Relocatable_FOUND set to TRUE !") +endif() + + + #----------------------------------------------------------------------------- # Test write_basic_config_version_file(). http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d057bf85a6412bf79a1730b31338c4581e7940be commit d057bf85a6412bf79a1730b31338c4581e7940be Author: Daniele E. Domenichelli AuthorDate: Tue Jul 15 19:10:54 2014 +0200 Commit: Brad King CommitDate: Mon Aug 11 09:38:29 2014 -0400 CMakePackageConfigHelpers: Add INSTALL_PREFIX option This option instructs configure_package_config_file to consider paths that are not absolute as relative to the INSTALL_PREFIX directory instead of relative to the CMAKE_INSTALL_PREFIX directory. If this argument is not passed, the default behaviour is to use the CMAKE_INSTALL_PREFIX variable. The new signature is therefore: configure_package_config_file( INSTALL_DESTINATION [PATH_VARS ... ] [NO_SET_AND_CHECK_MACRO] [NO_CHECK_REQUIRED_COMPONENTS_MACRO] [INSTALL_PREFIX ]) diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 1e47f15..c6dc141 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -18,7 +18,8 @@ # configure_package_config_file( INSTALL_DESTINATION # [PATH_VARS ... ] # [NO_SET_AND_CHECK_MACRO] -# [NO_CHECK_REQUIRED_COMPONENTS_MACRO]) +# [NO_CHECK_REQUIRED_COMPONENTS_MACRO] +# [INSTALL_PREFIX ]) # # # ``configure_package_config_file()`` should be used instead of the plain @@ -64,8 +65,8 @@ # same way as in :command:`configure_file()`. # # The ```` given to ``INSTALL_DESTINATION`` must be the destination where -# the ``FooConfig.cmake`` file will be installed to. This can either be a -# relative or absolute path, both work. +# the ``FooConfig.cmake`` file will be installed to. This path can either be +# absolute, or relative to the ``INSTALL_PREFIX`` path. # # The variables ```` to ```` given as ``PATH_VARS`` are the # variables which contain install destinations. For each of them the macro will @@ -74,8 +75,15 @@ # They are calculated by ``configure_package_config_file`` so that they are # always relative to the installed location of the package. This works both for # relative and also for absolute locations. For absolute locations it works -# only if the absolute location is a subdirectory of -# :variable:`CMAKE_INSTALL_PREFIX`. +# only if the absolute location is a subdirectory of ``INSTALL_PREFIX``. +# +# If the ``INSTALL_PREFIX`` argument is passed, this is used as base path to +# calculate all the relative paths. The ```` argument must be an absolute +# path. If this argument is not passed, the :variable:`CMAKE_INSTALL_PREFIX` +# variable will be used instead. The default value is good when generating a +# FooConfig.cmake file to use your package from the install tree. When +# generating a FooConfig.cmake file to use your package from the build tree this +# option should be used. # # By default ``configure_package_config_file`` also generates two helper macros, # ``set_and_check()`` and ``check_required_components()`` into the @@ -210,7 +218,7 @@ endmacro() function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO) - set(oneValueArgs INSTALL_DESTINATION ) + set(oneValueArgs INSTALL_DESTINATION INSTALL_PREFIX) set(multiValueArgs PATH_VARS ) cmake_parse_arguments(CCF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -223,20 +231,30 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) message(FATAL_ERROR "No INSTALL_DESTINATION given to CONFIGURE_PACKAGE_CONFIG_FILE()") endif() + if(DEFINED CCF_INSTALL_PREFIX) + if(IS_ABSOLUTE "${CCF_INSTALL_PREFIX}") + set(installPrefix "${CCF_INSTALL_PREFIX}") + else() + message(FATAL_ERROR "INSTALL_PREFIX must be an absolute path") + endif() + else() + set(installPrefix "${CMAKE_INSTALL_PREFIX}") + endif() + if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}") set(absInstallDir "${CCF_INSTALL_DESTINATION}") else() - set(absInstallDir "${CMAKE_INSTALL_PREFIX}/${CCF_INSTALL_DESTINATION}") + set(absInstallDir "${installPrefix}/${CCF_INSTALL_DESTINATION}") endif() - file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_INSTALL_PREFIX}" ) + file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${installPrefix}" ) foreach(var ${CCF_PATH_VARS}) if(NOT DEFINED ${var}) message(FATAL_ERROR "Variable ${var} does not exist") else() if(IS_ABSOLUTE "${${var}}") - string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}" + string(REPLACE "${installPrefix}" "\${PACKAGE_PREFIX_DIR}" PACKAGE_${var} "${${var}}") else() set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}") @@ -262,7 +280,7 @@ get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE get_filename_component(_realCurr \"\${CMAKE_CURRENT_LIST_DIR}\" REALPATH) get_filename_component(_realOrig \"${absInstallDir}\" REALPATH) if(_realCurr STREQUAL _realOrig) - set(PACKAGE_PREFIX_DIR \"${CMAKE_INSTALL_PREFIX}\") + set(PACKAGE_PREFIX_DIR \"${installPrefix}\") endif() unset(_realOrig) unset(_realCurr) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f3dd116cee96d37e039864a032886c73f05c1cda commit f3dd116cee96d37e039864a032886c73f05c1cda Author: Daniele E. Domenichelli AuthorDate: Tue Jul 15 19:10:28 2014 +0200 Commit: Brad King CommitDate: Mon Aug 11 09:38:29 2014 -0400 CMakePackageConfigHelpers: restructure documentation and document commands diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 318382e..1e47f15 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -2,29 +2,35 @@ # CMakePackageConfigHelpers # ------------------------- # -# CONFIGURE_PACKAGE_CONFIG_FILE(), WRITE_BASIC_PACKAGE_VERSION_FILE() +# Helpers functions for creating config files that can be included by other +# projects to find and use a package. # +# Adds the :command:`configure_package_config_file()` and +# :command:`write_basic_package_version_file()` commands. # +# Generating a Package Configuration File +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# :: +# .. command:: configure_package_config_file # -# CONFIGURE_PACKAGE_CONFIG_FILE( INSTALL_DESTINATION +# Create a config file for a project:: +# +# configure_package_config_file( INSTALL_DESTINATION # [PATH_VARS ... ] # [NO_SET_AND_CHECK_MACRO] # [NO_CHECK_REQUIRED_COMPONENTS_MACRO]) # # +# ``configure_package_config_file()`` should be used instead of the plain +# :command:`configure_file()` command when creating the ``Config.cmake`` +# or ``-config.cmake`` file for installing a project or library. It helps +# making the resulting package relocatable by avoiding hardcoded paths in the +# installed ``Config.cmake`` file. # -# CONFIGURE_PACKAGE_CONFIG_FILE() should be used instead of the plain -# configure_file() command when creating the Config.cmake or -# -config.cmake file for installing a project or library. It -# helps making the resulting package relocatable by avoiding hardcoded -# paths in the installed Config.cmake file. -# -# In a FooConfig.cmake file there may be code like this to make the -# install destinations know to the using project: +# In a ``FooConfig.cmake`` file there may be code like this to make the install +# destinations know to the using project: # -# :: +# .. code-block:: cmake # # set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" ) # set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" ) @@ -32,121 +38,126 @@ # ...logic to determine installedPrefix from the own location... # set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" ) # -# All 4 options shown above are not sufficient, since the first 3 -# hardcode the absolute directory locations, and the 4th case works only -# if the logic to determine the installedPrefix is correct, and if -# CONFIG_INSTALL_DIR contains a relative path, which in general cannot -# be guaranteed. This has the effect that the resulting FooConfig.cmake -# file would work poorly under Windows and OSX, where users are used to -# choose the install location of a binary package at install time, -# independent from how CMAKE_INSTALL_PREFIX was set at build/cmake time. -# -# Using CONFIGURE_PACKAGE_CONFIG_FILE() helps. If used correctly, it -# makes the resulting FooConfig.cmake file relocatable. Usage: +# All 4 options shown above are not sufficient, since the first 3 hardcode the +# absolute directory locations, and the 4th case works only if the logic to +# determine the ``installedPrefix`` is correct, and if ``CONFIG_INSTALL_DIR`` +# contains a relative path, which in general cannot be guaranteed. This has the +# effect that the resulting ``FooConfig.cmake`` file would work poorly under +# Windows and OSX, where users are used to choose the install location of a +# binary package at install time, independent from how +# :variable:`CMAKE_INSTALL_PREFIX` was set at build/cmake time. # -# :: +# Using ``configure_package_config_file`` helps. If used correctly, it makes +# the resulting ``FooConfig.cmake`` file relocatable. Usage: # -# 1. write a FooConfig.cmake.in file as you are used to -# 2. insert a line containing only the string "@PACKAGE_INIT@" -# 3. instead of set(FOO_DIR "@SOME_INSTALL_DIR@"), use set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@") -# (this must be after the @PACKAGE_INIT@ line) -# 4. instead of using the normal configure_file(), use CONFIGURE_PACKAGE_CONFIG_FILE() +# 1. write a ``FooConfig.cmake.in`` file as you are used to +# 2. insert a line containing only the string ``@PACKAGE_INIT@`` +# 3. instead of ``set(FOO_DIR "@SOME_INSTALL_DIR@")``, use +# ``set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")`` (this must be after the +# ``@PACKAGE_INIT@`` line) +# 4. instead of using the normal :command:`configure_file()`, use +# ``configure_package_config_file()`` # # # -# The and arguments are the input and output file, the -# same way as in configure_file(). +# The ```` and ```` arguments are the input and output file, the +# same way as in :command:`configure_file()`. # -# The given to INSTALL_DESTINATION must be the destination where -# the FooConfig.cmake file will be installed to. This can either be a +# The ```` given to ``INSTALL_DESTINATION`` must be the destination where +# the ``FooConfig.cmake`` file will be installed to. This can either be a # relative or absolute path, both work. # -# The variables to given as PATH_VARS are the variables -# which contain install destinations. For each of them the macro will -# create a helper variable PACKAGE_. These helper variables -# must be used in the FooConfig.cmake.in file for setting the installed -# location. They are calculated by CONFIGURE_PACKAGE_CONFIG_FILE() so -# that they are always relative to the installed location of the -# package. This works both for relative and also for absolute -# locations. For absolute locations it works only if the absolute -# location is a subdirectory of CMAKE_INSTALL_PREFIX. -# -# By default configure_package_config_file() also generates two helper -# macros, set_and_check() and check_required_components() into the -# FooConfig.cmake file. -# -# set_and_check() should be used instead of the normal set() command for -# setting directories and file locations. Additionally to setting the -# variable it also checks that the referenced file or directory actually -# exists and fails with a FATAL_ERROR otherwise. This makes sure that -# the created FooConfig.cmake file does not contain wrong references. -# When using the NO_SET_AND_CHECK_MACRO, this macro is not generated -# into the FooConfig.cmake file. -# -# check_required_components() should be called at the end -# of the FooConfig.cmake file if the package supports components. This -# macro checks whether all requested, non-optional components have been -# found, and if this is not the case, sets the Foo_FOUND variable to -# FALSE, so that the package is considered to be not found. It does -# that by testing the Foo__FOUND variables for all requested -# required components. When using the NO_CHECK_REQUIRED_COMPONENTS -# option, this macro is not generated into the FooConfig.cmake file. +# The variables ```` to ```` given as ``PATH_VARS`` are the +# variables which contain install destinations. For each of them the macro will +# create a helper variable ``PACKAGE_``. These helper variables must be +# used in the ``FooConfig.cmake.in`` file for setting the installed location. +# They are calculated by ``configure_package_config_file`` so that they are +# always relative to the installed location of the package. This works both for +# relative and also for absolute locations. For absolute locations it works +# only if the absolute location is a subdirectory of +# :variable:`CMAKE_INSTALL_PREFIX`. +# +# By default ``configure_package_config_file`` also generates two helper macros, +# ``set_and_check()`` and ``check_required_components()`` into the +# ``FooConfig.cmake`` file. +# +# ``set_and_check()`` should be used instead of the normal ``set()`` command for +# setting directories and file locations. Additionally to setting the variable +# it also checks that the referenced file or directory actually exists and fails +# with a ``FATAL_ERROR`` otherwise. This makes sure that the created +# ``FooConfig.cmake`` file does not contain wrong references. +# When using the ``NO_SET_AND_CHECK_MACRO``, this macro is not generated +# into the ``FooConfig.cmake`` file. +# +# ``check_required_components()`` should be called at the end of +# the ``FooConfig.cmake`` file if the package supports components. This macro +# checks whether all requested, non-optional components have been found, and if +# this is not the case, sets the ``Foo_FOUND`` variable to ``FALSE``, so that +# the package is considered to be not found. It does that by testing the +# ``Foo__FOUND`` variables for all requested required components. +# When using the ``NO_CHECK_REQUIRED_COMPONENTS_MACRO`` option, this macro is +# not generated into the ``FooConfig.cmake`` file. # # For an example see below the documentation for -# WRITE_BASIC_PACKAGE_VERSION_FILE(). -# -# -# -# :: -# -# WRITE_BASIC_PACKAGE_VERSION_FILE( filename [VERSION major.minor.patch] COMPATIBILITY (AnyNewerVersion|SameMajorVersion|ExactVersion) ) -# -# -# -# Writes a file for use as ConfigVersion.cmake file to -# . See the documentation of find_package() for details on -# this. -# -# :: -# -# filename is the output filename, it should be in the build tree. -# major.minor.patch is the version number of the project to be installed -# -# If no ``VERSION`` is given, the :variable:`PROJECT_VERSION` variable -# is used. If this hasn't been set, it errors out. -# -# The COMPATIBILITY mode AnyNewerVersion means that the installed -# package version will be considered compatible if it is newer or -# exactly the same as the requested version. This mode should be used -# for packages which are fully backward compatible, also across major -# versions. If SameMajorVersion is used instead, then the behaviour -# differs from AnyNewerVersion in that the major version number must be -# the same as requested, e.g. version 2.0 will not be considered -# compatible if 1.0 is requested. This mode should be used for packages -# which guarantee backward compatibility within the same major version. -# If ExactVersion is used, then the package is only considered -# compatible if the requested version matches exactly its own version -# number (not considering the tweak version). For example, version -# 1.2.3 of a package is only considered compatible to requested version -# 1.2.3. This mode is for packages without compatibility guarantees. -# If your project has more elaborated version matching rules, you will -# need to write your own custom ConfigVersion.cmake file instead of -# using this macro. -# -# Internally, this macro executes configure_file() to create the -# resulting version file. Depending on the COMPATIBLITY, either the -# file BasicConfigVersion-SameMajorVersion.cmake.in or -# BasicConfigVersion-AnyNewerVersion.cmake.in is used. Please note that +# :command:`write_basic_package_version_file()`. +# +# Generating a Package Version File +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# .. command:: write_basic_package_version_file +# +# Create a version file for a project:: +# +# write_basic_package_version_file( +# [VERSION ] +# COMPATIBILITY ) +# +# +# Writes a file for use as ``ConfigVersion.cmake`` file to +# ````. See the documentation of :command:`find_package()` for +# details on this. +# +# ```` is the output filename, it should be in the build tree. +# ```` is the version number of the project to be installed. +# +# If no ``VERSION`` is given, the :variable:`PROJECT_VERSION` variable is used. +# If this hasn't been set, it errors out. +# +# The ``COMPATIBILITY`` mode ``AnyNewerVersion`` means that the installed +# package version will be considered compatible if it is newer or exactly the +# same as the requested version. This mode should be used for packages which +# are fully backward compatible, also across major versions. +# If ``SameMajorVersion`` is used instead, then the behaviour differs from +# ``AnyNewerVersion`` in that the major version number must be the same as +# requested, e.g. version 2.0 will not be considered compatible if 1.0 is +# requested. This mode should be used for packages which guarantee backward +# compatibility within the same major version. +# If ``ExactVersion`` is used, then the package is only considered compatible if +# the requested version matches exactly its own version number (not considering +# the tweak version). For example, version 1.2.3 of a package is only +# considered compatible to requested version 1.2.3. This mode is for packages +# without compatibility guarantees. +# If your project has more elaborated version matching rules, you will need to +# write your own custom ``ConfigVersion.cmake`` file instead of using this +# macro. +# +# Internally, this macro executes :command:`configure_file()` to create the +# resulting version file. Depending on the ``COMPATIBLITY``, either the file +# ``BasicConfigVersion-SameMajorVersion.cmake.in`` or +# ``BasicConfigVersion-AnyNewerVersion.cmake.in`` is used. Please note that # these two files are internal to CMake and you should not call -# configure_file() on them yourself, but they can be used as starting -# point to create more sophisticted custom ConfigVersion.cmake files. +# :command:`configure_file()` on them yourself, but they can be used as starting +# point to create more sophisticted custom ``ConfigVersion.cmake`` files. # +# Example Generating Package Files +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # +# Example using both :command:`configure_package_config_file` and +# ``write_basic_package_version_file()``: # -# Example using both configure_package_config_file() and -# write_basic_package_version_file(): CMakeLists.txt: +# ``CMakeLists.txt``: # -# :: +# .. code-block:: cmake # # set(INCLUDE_INSTALL_DIR include/ ... CACHE ) # set(LIB_INSTALL_DIR lib/ ... CACHE ) @@ -162,11 +173,9 @@ # install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake # DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake ) # +# ``FooConfig.cmake.in``: # -# -# With a FooConfig.cmake.in: -# -# :: +# .. code-block:: cmake # # set(FOO_VERSION x.y.z) # ... @@ -175,10 +184,6 @@ # set_and_check(FOO_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") # set_and_check(FOO_SYSCONFIG_DIR "@PACKAGE_SYSCONFIG_INSTALL_DIR@") # -# -# -# :: -# # check_required_components(Foo) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:39:50 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:39:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4828-g0c01a84 Message-ID: <20140811133950.99A494FC3C@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, next has been updated via 0c01a84d75ef20ad6509b70c84e5217c872573b1 (commit) via ebe8d51b11a2633857317aa1c8fe7ec0527c37eb (commit) from f34ca490e3704aaa7712930cbdff102bd5aa1ecf (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c01a84d75ef20ad6509b70c84e5217c872573b1 commit 0c01a84d75ef20ad6509b70c84e5217c872573b1 Merge: f34ca49 ebe8d51 Author: Brad King AuthorDate: Mon Aug 11 09:39:49 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 09:39:49 2014 -0400 Merge topic 'cpack-ifw-generator' into next ebe8d51b CPackIFW: Refactor and revise this generator http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ebe8d51b11a2633857317aa1c8fe7ec0527c37eb commit ebe8d51b11a2633857317aa1c8fe7ec0527c37eb Author: Konstantin Podsvirov AuthorDate: Wed Aug 6 11:23:00 2014 -0400 Commit: Brad King CommitDate: Mon Aug 11 09:40:28 2014 -0400 CPackIFW: Refactor and revise this generator Split the monolithic cmCPackIFWGenerator source into three parts: cmCPackIFWGenerator, cmCPackIFWInstaller, and cmCPackIFWPackage to isolate the implementations somewhat. Add a COMMON option to the cpack_ifw_configure_component command to make the data component common to its parent group. Change the default packaging method to ONE_PACKAGE_PER_COMPONENT. This is not incompatible because the CPack IFW generator has not yet been in a release. diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index 1f6de8f..29a0047 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -123,6 +123,7 @@ # :: # # cpack_ifw_configure_component( +# [COMMON] # [VERSION ] # [SCRIPT " << std::endl; + } + + // Dependencies + std::set compDepSet; + for(std::set::iterator ait = AlienDependencies.begin(); + ait != AlienDependencies.end(); ++ait) + { + compDepSet.insert(*(*ait)); + } + for(std::set::iterator it = Dependencies.begin(); + it != Dependencies.end(); ++it) + { + compDepSet.insert(DependenceStruct((*it)->Name)); + } + // Write dependencies + if (!compDepSet.empty()) + { + xout << " "; + std::set::iterator it = compDepSet.begin(); + xout << it->NameWithCompare(); + ++it; + while(it != compDepSet.end()) + { + xout << "," << it->NameWithCompare(); + ++it; + } + xout << "" << std::endl; + } + + // Licenses (copy to meta dir) + std::vector licenses = Licenses; + for(size_t i = 1; i < licenses.size(); i += 2) + { + std::string name = cmSystemTools::GetFilenameName(licenses[i]); + std::string path = Directory + "/meta/" + name; + cmsys::SystemTools::CopyFileIfDifferent(licenses[i].data(), path.data()); + licenses[i] = name; + } + if(!licenses.empty()) + { + xout << " " << std::endl; + for(size_t i = 0; i < licenses.size(); i += 2) + { + xout << " " <" << std::endl; + } + + if (!ForcedInstallation.empty()) + { + xout << " " << ForcedInstallation + << "" << std::endl; + } + + if (!Virtual.empty()) + { + xout << " " << Virtual << "" << std::endl; + } + else if (!Default.empty()) + { + xout << " " << Default << "" << std::endl; + } + + // Priority + if(!SortingPriority.empty()) + { + xout << " " << SortingPriority + << "" << std::endl; + } + + xout << "" << std::endl; +} diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h new file mode 100644 index 0000000..868c15d --- /dev/null +++ b/Source/CPack/IFW/cmCPackIFWPackage.h @@ -0,0 +1,131 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2009 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef cmCPackIFWPackage_h +#define cmCPackIFWPackage_h + +#include "cmStandardIncludes.h" + +class cmCPackComponent; +class cmCPackComponentGroup; +class cmCPackIFWInstaller; +class cmCPackIFWGenerator; + +/** \class cmCPackIFWPackage + * \brief A single component to be installed by CPack IFW generator + */ +class cmCPackIFWPackage +{ +public: // Types + enum CompareTypes + { + CompareNone = 0x0, + CompareEqual = 0x1, + CompareLess = 0x2, + CompareLessOrEqual = 0x3, + CompareGreater = 0x4, + CompareGreaterOrEqual = 0x5 + }; + + struct CompareStruct + { + CompareStruct(); + + unsigned int Type; + std::string Value; + }; + + struct DependenceStruct + { + DependenceStruct(); + DependenceStruct(const std::string &dependence); + + std::string Name; + CompareStruct Compare; + + std::string NameWithCompare() const; + + bool operator < (const DependenceStruct &other) const + { + return Name < other.Name; + } + }; + +public: // [Con|De]structor + + /** + * Construct package + */ + cmCPackIFWPackage(); + +public: // Configuration + + /// Human-readable name of the component + std::string DisplayName; + + /// Human-readable description of the component + std::string Description; + + /// Version number of the component + std::string Version; + + /// Date when this component version was released + std::string ReleaseDate; + + /// Domain-like identification for this component + std::string Name; + + /// File name of a script being loaded + std::string Script; + + /// List of license agreements to be accepted by the installing user + std::vector Licenses; + + /// Priority of the component in the tree + std::string SortingPriority; + + /// Set to true to preselect the component in the installer + std::string Default; + + /// Set to true to hide the component from the installer + std::string Virtual; + + /// Determines that the package must always be installed + std::string ForcedInstallation; + +public: // Internal implementation + + const char* GetOption(const std::string& op) const; + + std::string GetComponentName(cmCPackComponent *component); + + void DefaultConfiguration(); + + int ConfigureFromOptions(); + int ConfigureFromComponent(cmCPackComponent *component); + int ConfigureFromComponentGroup(cmCPackComponentGroup *group); + + void GeneratePackageFile(); + + // Pointer to generator + cmCPackIFWGenerator* Generator; + // Pointer to installer + cmCPackIFWInstaller* Installer; + // Collection of dependencies + std::set Dependencies; + // Collection of unresolved dependencies + std::set AlienDependencies; + // Patch to package directory + std::string Directory; +}; + +#endif // cmCPackIFWPackage_h diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index da97657..c8737f4 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -21,7 +21,7 @@ #include "cmCPack7zGenerator.h" #include "cmCPackSTGZGenerator.h" #include "cmCPackNSISGenerator.h" -#include "cmCPackIFWGenerator.h" +#include "IFW/cmCPackIFWGenerator.h" #ifdef __APPLE__ # include "cmCPackDragNDropGenerator.h" diff --git a/Source/CPack/cmCPackIFWGenerator.cxx b/Source/CPack/cmCPackIFWGenerator.cxx deleted file mode 100644 index 3a7f539..0000000 --- a/Source/CPack/cmCPackIFWGenerator.cxx +++ /dev/null @@ -1,909 +0,0 @@ -/*============================================================================ - CMake - Cross Platform Makefile Generator - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ - -#include "cmCPackIFWGenerator.h" - -#include "cmGlobalGenerator.h" -#include "cmLocalGenerator.h" -#include "cmSystemTools.h" -#include "cmMakefile.h" -#include "cmGeneratedFileStream.h" -#include "cmCPackLog.h" -#include "cmCPackComponentGroup.h" -#include "cmTimestamp.h" - -#include -#include -#include -#include -#include - -//---------------------------------------------------------------------- -cmCPackIFWGenerator::cmCPackIFWGenerator() -{ -} - -//---------------------------------------------------------------------- -cmCPackIFWGenerator::~cmCPackIFWGenerator() -{ -} - -//---------------------------------------------------------------------- -int cmCPackIFWGenerator::PackageFiles() -{ - cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Configuration" << std::endl); - - if (!IfwCreateConfigFile()) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "CPack error: Could not create IFW \"config.xml\" file." - << std::endl); - return false; - } - - if (Components.empty() && !IfwCreatePackageFile()) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "CPack error: Could not create IFW " - "\"root/meta/package.xml\" file." - << std::endl); - return false; - } - - std::string ifwTLD = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); - std::string ifwTmpFile = ifwTLD; - ifwTmpFile += "/IFWOutput.log"; - - std::set ifwDependsComponents; - std::string ifwBinaryComponents; - std::string ifwDownloadedComponents; - - // Create groups meta information - std::map::iterator groupIt; - for(groupIt = this->ComponentGroups.begin(); - groupIt != this->ComponentGroups.end(); - ++groupIt - ) - { - std::string macroPrefix = "CPACK_IFW_COMPONENT_GROUP_" - + cmsys::SystemTools::UpperCase(groupIt->second.Name); - - std::string groupId = IfwGetGroupId(&groupIt->second); - - if(!ifwBinaryComponents.empty()) ifwBinaryComponents += ","; - ifwBinaryComponents += groupId; - - std::string pkgMetaDir = this->toplevel + "/packages/" - + groupId - + "/meta"; - - std::string pkgXmlFileName = pkgMetaDir - + "/package.xml"; - - cmGeneratedFileStream pkgXml(pkgXmlFileName.data()); - pkgXml << "" << std::endl; - pkgXml << "" << std::endl; - pkgXml << " " << groupIt->second.DisplayName - << "" << std::endl; - pkgXml << " " << groupIt->second.Description - << "" << std::endl; - pkgXml << " " << groupId << "" << std::endl; - - // Version - const char* ifwPackageVersion = this->GetOption("CPACK_PACKAGE_VERSION"); - const char* ifwGroupVersion = this->GetOption(macroPrefix + "_VERSION"); - pkgXml << " " - << (ifwGroupVersion ? ifwGroupVersion : ifwPackageVersion) - << "" << std::endl; - pkgXml << " " << IfwCreateCurrentDate() - << "" << std::endl; - - // Licenses - std::vector licenses; - if(IfwParseLicenses(licenses, macroPrefix + "_LICENSES", pkgMetaDir)) - { - pkgXml << " " << std::endl; - for(size_t i = 0; i < licenses.size(); i += 2) - { - pkgXml << " " <" << std::endl; - } - - // Priority - if(const char* ifwGroupPriority = - this->GetOption(macroPrefix + "_PRIORITY")) - { - pkgXml << " " << ifwGroupPriority - << "" << std::endl; - } - pkgXml << "" << std::endl; - } - - // Create components meta information - std::map::iterator compIt; - for (compIt = this->Components.begin(); - compIt != this->Components.end(); - ++compIt) - { - // Component id - std::string ifwCompId = IfwGetComponentId(&compIt->second); - - std::string pkgMetaDir = this->toplevel + "/" - + GetComponentInstallDirNamePrefix(compIt->second.Name) - + ifwCompId + "/meta"; - std::string pkgXmlFileName = pkgMetaDir + "/package.xml"; - cmGeneratedFileStream pkgXml(pkgXmlFileName.data()); - - // Check IFW version for component - std::string macroPrefix = "CPACK_IFW_COMPONENT_" - + cmsys::SystemTools::UpperCase(compIt->second.Name); - - pkgXml << "" << std::endl; - pkgXml << "" << std::endl; - pkgXml << " " << compIt->second.DisplayName - << "" << std::endl; - pkgXml << " " << compIt->second.Description - << "" << std::endl; - pkgXml << " " << ifwCompId << "" << std::endl; - - // Version - const char* ifwPackageVersion = this->GetOption("CPACK_PACKAGE_VERSION"); - const char* ifwCompVersion = - this->GetOption(macroPrefix + "_VERSION"); - pkgXml << " " - << (ifwCompVersion ? ifwCompVersion : ifwPackageVersion) - << "" << std::endl; - - pkgXml << " " << IfwCreateCurrentDate() - << "" << std::endl; - - // Script - const char* ifwCompScript = - this->GetOption(macroPrefix + "_SCRIPT"); - if (ifwCompScript) - { - // Copy file - std::string ifwCompScriptFile = pkgMetaDir + "/operations.qs"; - cmsys::SystemTools::CopyFileIfDifferent(ifwCompScript, - ifwCompScriptFile.data()); - pkgXml << " " << std::endl; - } - - // Check dependencies - std::set compDepSet; - // CMake dependencies - if (!compIt->second.Dependencies.empty()) - { - std::vector::iterator depCompIt; - for(depCompIt = compIt->second.Dependencies.begin(); - depCompIt != compIt->second.Dependencies.end(); - ++depCompIt) - { - compDepSet.insert(IfwGetComponentId(*depCompIt)); - } - } - // QtIFW dependencies - if(const char *ifwCompDepsStr = this->GetOption(macroPrefix + "_DEPENDS")) - { - std::vector ifwCompDepsVector; - cmSystemTools::ExpandListArgument(ifwCompDepsStr, - ifwCompDepsVector); - for(std::vector::iterator - depCompIt = ifwCompDepsVector.begin(); - depCompIt != ifwCompDepsVector.end(); ++depCompIt) - { - compDepSet.insert(*depCompIt); - ifwDependsComponents.insert(*depCompIt); - } - } - - // Write dependencies - if (!compDepSet.empty()) - { - pkgXml << " "; - std::set::iterator it = compDepSet.begin(); - pkgXml << *it; - ++it; - while(it != compDepSet.end()) - { - pkgXml << "," << *it; - ++it; - } - pkgXml << "" << std::endl; - } - - // Licenses - std::vector licenses; - if(IfwParseLicenses(licenses, macroPrefix + "_LICENSES", pkgMetaDir)) - { - pkgXml << " " << std::endl; - for(size_t i = 0; i < licenses.size(); i += 2) - { - pkgXml << " " <" << std::endl; - } - - // TODO: Check how enable virtual component (now it's allways disabled) - if (compIt->second.IsRequired) { - pkgXml << " true" - << std::endl; - } else if (compIt->second.IsDisabledByDefault) { - pkgXml << " false" << std::endl; - } else if (compIt->second.IsHidden) { - pkgXml << " true" << std::endl; - } else { - pkgXml << " true" << std::endl; - } - - // Priority - if(const char* ifwCompPriority = - this->GetOption(macroPrefix + "_PRIORITY")) - { - pkgXml << " " << ifwCompPriority - << "" << std::endl; - } - - pkgXml << "" << std::endl; - - // Downloaded - if (compIt->second.IsDownloaded) - { - if (!ifwDownloadedComponents.empty()) ifwDownloadedComponents += ","; - ifwDownloadedComponents += ifwCompId; - } - else - { - if (!ifwBinaryComponents.empty()) ifwBinaryComponents += ","; - ifwBinaryComponents += ifwCompId; - } - } - - // Run repogen - if (!ifwDownloadSite.empty()) - { - std::string ifwCmd = ifwRepoGen; - ifwCmd += " -c " + this->toplevel + "/config/config.xml"; - ifwCmd += " -p " + this->toplevel + "/packages"; - - if(!ifwPkgsDirsVector.empty()) - { - for(std::vector::iterator it = ifwPkgsDirsVector.begin(); - it != ifwPkgsDirsVector.end(); ++it) - { - ifwCmd += " -p " + *it; - } - } - - if (!ifwOnlineOnly && !ifwDownloadedComponents.empty()) { - ifwCmd += " -i " + ifwDownloadedComponents; - } - ifwCmd += " " + this->toplevel + "/repository"; - cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << ifwCmd - << std::endl); - std::string output; - int retVal = 1; - cmCPackLogger(cmCPackLog::LOG_OUTPUT, - "- Generate repository" << std::endl); - bool res = cmSystemTools::RunSingleCommand( - ifwCmd.c_str(), &output, &retVal, 0, this->GeneratorVerbose, 0); - if ( !res || retVal ) - { - cmGeneratedFileStream ofs(ifwTmpFile.c_str()); - ofs << "# Run command: " << ifwCmd << std::endl - << "# Output:" << std::endl - << output << std::endl; - cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running IFW command: " - << ifwCmd << std::endl - << "Please check " << ifwTmpFile << " for errors" - << std::endl); - return 0; - } - } - - // Run binary creator - { - std::string ifwCmd = ifwBinCreator; - ifwCmd += " -c " + this->toplevel + "/config/config.xml"; - ifwCmd += " -p " + this->toplevel + "/packages"; - - if(!ifwPkgsDirsVector.empty()) - { - for(std::vector::iterator it = ifwPkgsDirsVector.begin(); - it != ifwPkgsDirsVector.end(); ++it) - { - ifwCmd += " -p " + *it; - } - } - - if (ifwOnlineOnly) - { - ifwCmd += " --online-only"; - } - else if (!ifwDownloadedComponents.empty() && !ifwDownloadSite.empty()) - { - ifwCmd += " -e " + ifwDownloadedComponents; - } - else if (!ifwDependsComponents.empty()) - { - ifwCmd += " -i "; - std::set::iterator it = ifwDependsComponents.begin(); - ifwCmd += *it; - ++it; - while(it != ifwDependsComponents.end()) - { - ifwCmd += "," + (*it); - ++it; - } - - ifwCmd += "," + ifwBinaryComponents; - } - // TODO: set correct name for multipackages - if (this->packageFileNames.size() > 0) - { - ifwCmd += " " + packageFileNames[0]; - } - else - { - ifwCmd += " installer"; - } - cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << ifwCmd - << std::endl); - std::string output; - int retVal = 1; - cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Generate package" << std::endl); - bool res = cmSystemTools::RunSingleCommand( - ifwCmd.c_str(), &output, &retVal, 0, this->GeneratorVerbose, 0); - if ( !res || retVal ) - { - cmGeneratedFileStream ofs(ifwTmpFile.c_str()); - ofs << "# Run command: " << ifwCmd << std::endl - << "# Output:" << std::endl - << output << std::endl; - cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running IFW command: " - << ifwCmd << std::endl - << "Please check " << ifwTmpFile << " for errors" - << std::endl); - return 0; - } - } - - return 1; -} - -//---------------------------------------------------------------------- -const char *cmCPackIFWGenerator::GetPackagingInstallPrefix() -{ - const char *defPrefix = cmCPackGenerator::GetPackagingInstallPrefix(); - - std::string tmpPref = defPrefix ? defPrefix : ""; - - if(this->Components.empty()) - { - tmpPref += "packages/root/data"; - } - - this->SetOption("CPACK_IFW_PACKAGING_INSTALL_PREFIX", tmpPref.c_str()); - - return this->GetOption("CPACK_IFW_PACKAGING_INSTALL_PREFIX"); -} - -//---------------------------------------------------------------------- -const char *cmCPackIFWGenerator::GetOutputExtension() -{ - const char *suffix = this->GetOption("CMAKE_EXECUTABLE_SUFFIX"); - return suffix ? suffix : ""; -} - -//---------------------------------------------------------------------- -std::string cmCPackIFWGenerator::IfwGetGroupId(cmCPackComponentGroup *group) -{ - std::string ifwGroupId; - std::string ifwGroupName; - std::list groups; - while(group) - { - groups.push_front(group); - group = group->ParentGroup; - } - std::list::iterator it = groups.begin(); - if(it != groups.end()) - { - ifwGroupId = IfwGetGroupName(*it); - ++it; - } - while(it != groups.end()) - { - ifwGroupName = IfwGetGroupName(*it); - - if(ifwResolveDuplicateNames) - { - if(ifwGroupName.substr(0, ifwGroupId.size()) == ifwGroupId) - { - ifwGroupId = ifwGroupName; - ++it; - continue; - } - } - - ifwGroupId += "." + ifwGroupName; - - ++it; - } - - return ifwGroupId; -} - -//---------------------------------------------------------------------- -std::string cmCPackIFWGenerator::IfwGetComponentId(cmCPackComponent *component) -{ - std::string ifwCompId; - if(component) { - ifwCompId = IfwGetGroupId(component->Group); - if(!ifwCompId.empty()) ifwCompId += "."; - std::string ifwCompName = IfwGetComponentName(component); - if(ifwResolveDuplicateNames && - (ifwCompName.substr(0, ifwCompId.size()) == ifwCompId)) - { - ifwCompId = ifwCompName; - } - else - { - ifwCompId += ifwCompName; - } - } - return ifwCompId; -} - -//---------------------------------------------------------------------- -std::string cmCPackIFWGenerator::IfwGetGroupName(cmCPackComponentGroup *group) -{ - std::string ifwGroupName = group->Name; - if(const char* name = - this->GetOption("CPACK_IFW_COMPONENT_GROUP_" - + cmsys::SystemTools::UpperCase(group->Name) + "_NAME")) - { - ifwGroupName = name; - } - return ifwGroupName; -} - -//---------------------------------------------------------------------- -std::string -cmCPackIFWGenerator::IfwGetComponentName(cmCPackComponent *component) -{ - return IfwGetComponentName(component->Name); -} - -//---------------------------------------------------------------------- -std::string -cmCPackIFWGenerator::IfwGetComponentName(const std::string &componentName) -{ - std::string ifwCompName = componentName; - if(const char* name = - this->GetOption("CPACK_IFW_COMPONENT_" - + cmsys::SystemTools::UpperCase(componentName) + "_NAME")) - { - ifwCompName = name; - } - return ifwCompName; -} - -//---------------------------------------------------------------------- -int cmCPackIFWGenerator::InitializeInternal() -{ - // Search Qt Installer Framework tools - - if(!this->IsOn("CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND") || - !this->IsOn("CPACK_IFW_REPOGEN_EXECUTABLE_FOUND")) - { - this->ReadListFile("CPackIFW.cmake"); - } - - // Look 'binarycreator' executable (needs) - - if(this->IsOn("CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND")) - { - const char *ifwBinCreatorStr = - this->GetOption("CPACK_IFW_BINARYCREATOR_EXECUTABLE"); - ifwBinCreator = ifwBinCreatorStr ? ifwBinCreatorStr : ""; - } - else - { - ifwBinCreator = ""; - } - - if (ifwBinCreator.empty()) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Cannot find QtIFW compiler \"binarycreator\": " - "likely it is not installed, or not in your PATH" - << std::endl); - return 0; - } - - // Look 'repogen' executable (optional) - - if(this->IsOn("CPACK_IFW_REPOGEN_EXECUTABLE_FOUND")) - { - const char *ifwRepoGenStr = - this->GetOption("CPACK_IFW_REPOGEN_EXECUTABLE"); - ifwRepoGen = ifwRepoGenStr ? ifwRepoGenStr : ""; - } - else - { - ifwRepoGen = ""; - } - - // // Variables that Change Behavior - - // Resolve duplicate names - ifwResolveDuplicateNames = this->IsOn("CPACK_IFW_RESOLVE_DUPLICATE_NAMES"); - - // Additional packages dirs - ifwPkgsDirsVector.clear(); - if(const char* dirs = this->GetOption("CPACK_IFW_PACKAGES_DIRECTORIES")) - { - cmSystemTools::ExpandListArgument(dirs, - ifwPkgsDirsVector); - } - - // Remote repository - - if (const char *site = this->GetOption("CPACK_DOWNLOAD_SITE")) - { - ifwDownloadSite = site; - } - - ifwOnlineOnly = this->IsOn("CPACK_DOWNLOAD_ALL") ? true : false; - - if (!ifwDownloadSite.empty() && ifwRepoGen.empty()) { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Cannot find QtIFW repository generator \"repogen\": " - "likely it is not installed, or not in your PATH" - << std::endl); - return 0; - } - - return this->Superclass::InitializeInternal(); -} - -//---------------------------------------------------------------------- -std::string -cmCPackIFWGenerator::GetComponentInstallDirNamePrefix( - const std::string& /*componentName*/) -{ - return "packages/"; -} - -//---------------------------------------------------------------------- -std::string -cmCPackIFWGenerator::GetComponentInstallDirNameSuffix( - const std::string& componentName) -{ - std::map::iterator - compIt = this->Components.find(componentName); - - cmCPackComponent *comp = - compIt != this->Components.end() ? &compIt->second : 0; - - const std::string prefix = GetComponentInstallDirNamePrefix(componentName); - const std::string suffix = "/data"; - - if (componentPackageMethod == ONE_PACKAGE_PER_COMPONENT) { - return prefix + IfwGetComponentId(comp) + suffix; - } - - if (componentPackageMethod == ONE_PACKAGE) { - return std::string(prefix + "ALL_COMPONENTS_IN_ONE" + suffix); - } - - return prefix + IfwGetComponentId(comp) + suffix; -} - -//---------------------------------------------------------------------- -bool cmCPackIFWGenerator::GetListOfSubdirectories( - const char* topdir, std::vector& dirs) -{ - cmsys::Directory dir; - dir.Load(topdir); - size_t fileNum; - for (fileNum = 0; fileNum < dir.GetNumberOfFiles(); ++fileNum) - { - if (strcmp(dir.GetFile(static_cast(fileNum)),".") && - strcmp(dir.GetFile(static_cast(fileNum)),"..")) - { - cmsys_stl::string fullPath = topdir; - fullPath += "/"; - fullPath += dir.GetFile(static_cast(fileNum)); - if(cmsys::SystemTools::FileIsDirectory(fullPath.c_str()) && - !cmsys::SystemTools::FileIsSymlink(fullPath.c_str())) - { - if (!this->GetListOfSubdirectories(fullPath.c_str(), dirs)) - { - return false; - } - } - } - } - dirs.push_back(topdir); - return true; -} - -//---------------------------------------------------------------------- -enum cmCPackGenerator::CPackSetDestdirSupport -cmCPackIFWGenerator::SupportsSetDestdir() const -{ - return cmCPackGenerator::SETDESTDIR_SHOULD_NOT_BE_USED; -} - -//---------------------------------------------------------------------- -bool cmCPackIFWGenerator::SupportsAbsoluteDestination() const -{ - return false; -} - -//---------------------------------------------------------------------- -bool cmCPackIFWGenerator::SupportsComponentInstallation() const -{ - return true; -} - -//---------------------------------------------------------------------- -int cmCPackIFWGenerator::IfwCreateConfigFile() -{ - cmGeneratedFileStream cfg((this->toplevel + "/config/config.xml").data()); - - std::string ifwPkgName; - if (const char *name = this->GetOption("CPACK_PACKAGE_NAME")) - { - ifwPkgName = name; - } - else - { - ifwPkgName = "Your package"; - } - - std::string pkgTitle; - if (const char *title = this->GetOption("CPACK_IFW_PACKAGE_TITLE")) - { - pkgTitle = title; - } - else if (const char *description = - this->GetOption("CPACK_PACKAGE_DESCRIPTION_SUMMARY")) - { - pkgTitle = description; - } - else - { - pkgTitle = "Your package description"; - } - - std::string ifwPkgVersion; - if (const char *version = this->GetOption("CPACK_PACKAGE_VERSION")) - { - ifwPkgVersion = version; - } - else - { - ifwPkgVersion = "1.0.0"; - } - - const char *ifwPkgInstDir = - this->GetOption("CPACK_PACKAGE_INSTALL_DIRECTORY"); - const char *ifwTargetDir = - this->GetOption("CPACK_IFW_TARGET_DIRECTORY"); - const char *ifwAdminTargetDir = - this->GetOption("CPACK_IFW_ADMIN_TARGET_DIRECTORY"); - - cfg << "" << std::endl; - cfg << "" << std::endl; - cfg << " " << cmXMLSafe(ifwPkgName).str() << "" << std::endl; - cfg << " " << ifwPkgVersion << "" << std::endl; - cfg << " " << cmXMLSafe(pkgTitle).str() << "" - << std::endl; - - // Publisher - std::string ifwPublisher; - if(const char *publisher = GetOption("CPACK_IFW_PACKAGE_PUBLISHER")) - { - ifwPublisher = publisher; - } - else if(const char *vendor = GetOption("CPACK_PACKAGE_VENDOR")) - { - ifwPublisher = vendor; - } - if(!ifwPublisher.empty()) - { - cfg << " " << cmXMLSafe(ifwPublisher).str() - << "" << std::endl; - } - - // ProductUrl - if(const char *url = GetOption("CPACK_IFW_PRODUCT_URL")) - { - cfg << " " << url << "" << std::endl; - } - - // ApplicationIcon - const char *pkgApplicationIcon = GetOption("CPACK_IFW_PACKAGE_ICON"); - if(pkgApplicationIcon && cmSystemTools::FileExists(pkgApplicationIcon)) - { - std::string name = cmSystemTools::GetFilenameName(pkgApplicationIcon); - std::string path = this->toplevel + "/config/" + name; - name = cmSystemTools::GetFilenameWithoutExtension(name); - cmsys::SystemTools::CopyFileIfDifferent(pkgApplicationIcon, path.data()); - cfg << " " << name - << "" << std::endl; - } - - // WindowIcon - const char *pkgWindowIcon = GetOption("CPACK_IFW_PACKAGE_WINDOW_ICON"); - if(pkgWindowIcon && cmSystemTools::FileExists(pkgWindowIcon)) - { - std::string name = cmSystemTools::GetFilenameName(pkgWindowIcon); - std::string path = this->toplevel + "/config/" + name; - cmsys::SystemTools::CopyFileIfDifferent(pkgWindowIcon, path.data()); - cfg << " " << name - << "" << std::endl; - } - - // Logo - const char *pkgLogo = GetOption("CPACK_IFW_PACKAGE_LOGO"); - if(pkgLogo && cmSystemTools::FileExists(pkgLogo)) - { - std::string name = cmSystemTools::GetFilenameName(pkgLogo); - std::string path = this->toplevel + "/config/" + name; - cmsys::SystemTools::CopyFileIfDifferent(pkgLogo, path.data()); - cfg << " " << name << "" << std::endl; - } - - // Default target directory for installation - if (ifwTargetDir) - { - cfg << " " << ifwTargetDir << "" << std::endl; - } - else if (ifwPkgInstDir) - { - cfg << " @ApplicationsDir@/" << ifwPkgInstDir - << "" << std::endl; - } - else - { - cfg << " @RootDir@/usr/local" << std::endl; - } - - // Default target directory for installation with administrator rights - if (ifwAdminTargetDir) - { - cfg << " " << ifwAdminTargetDir - << "" << std::endl; - } - - if (!ifwDownloadSite.empty()) - { - cfg << " " << std::endl; - cfg << " " << std::endl; - cfg << " " << ifwDownloadSite << "" << std::endl; - // These properties can now be set from "cpack_configure_downloads" - // 1 - // user - // password - // Example repository - cfg << " " << std::endl; - cfg << " " << std::endl; - } - - // CPack IFW default policy - cfg << " " << std::endl; - cfg << " true" - << std::endl; - cfg << " true" << std::endl; - - cfg << "" << std::endl; - - return 1; -} - -//---------------------------------------------------------------------- -// Create default package file -int cmCPackIFWGenerator::IfwCreatePackageFile() -{ - std::string ifwPkgName; - if (const char *name = this->GetOption("CPACK_PACKAGE_NAME")) - { - ifwPkgName = name; - } - else - { - ifwPkgName = "Your package"; - } - - std::string ifwPkgDescription; - if (const char *name = this->GetOption("CPACK_PACKAGE_DESCRIPTION_SUMMARY")) - { - ifwPkgDescription = name; - } - else - { - ifwPkgDescription = "Your package description"; - } - - cmGeneratedFileStream - pkgXml((this->toplevel + "/packages/root/meta/package.xml").data()); - pkgXml << "" << std::endl; - pkgXml << "" << std::endl; - - pkgXml << " " << ifwPkgName << "" << std::endl; - pkgXml << " " << ifwPkgDescription - << "" << std::endl; - pkgXml << " " << "root" << "" << std::endl; - pkgXml << " " << this->GetOption("CPACK_PACKAGE_VERSION") - << "" << std::endl; - pkgXml << " " << IfwCreateCurrentDate() << "" - << std::endl; - - pkgXml << " true" << std::endl; - pkgXml << " true" << std::endl; - - pkgXml << "" << std::endl; - - return 1; -} - -//---------------------------------------------------------------------- -std::string cmCPackIFWGenerator::IfwCreateCurrentDate() -{ - cmTimestamp timestamp; - return timestamp.CurrentTime("%Y-%m-%d", false); -} - -//---------------------------------------------------------------------- -bool cmCPackIFWGenerator::IfwParseLicenses(std::vector &licenses, - const std::string &variable, - const std::string &metaDir) -{ - if (const char *option = this->GetOption(variable)) - { - if(!licenses.empty()) licenses.clear(); - cmSystemTools::ExpandListArgument( option, licenses ); - } - else - { - return false; - } - - if ( licenses.size() % 2 != 0 ) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, variable - << " should contain pairs of and ." - << std::endl); - return false; - } - - for(size_t i = 1; i < licenses.size(); i += 2) - { - std::string name = cmSystemTools::GetFilenameName(licenses[i]); - std::string path = metaDir + "/" + name; - cmsys::SystemTools::CopyFileIfDifferent(licenses[i].data(), path.data()); - licenses[i] = name; - } - - return licenses.size() > 1; -} diff --git a/Source/CPack/cmCPackIFWGenerator.h b/Source/CPack/cmCPackIFWGenerator.h deleted file mode 100644 index d70e52d..0000000 --- a/Source/CPack/cmCPackIFWGenerator.h +++ /dev/null @@ -1,82 +0,0 @@ -/*============================================================================ - CMake - Cross Platform Makefile Generator - Copyright 2000-2009 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ - -#ifndef cmCPackIFWGenerator_h -#define cmCPackIFWGenerator_h - - -#include "cmCPackGenerator.h" -#include - -/** \class cmCPackIFWGenerator - * \brief A generator for Qt Installer Framework tools - * - * http://qt-project.org/doc/qtinstallerframework/index.html - */ -class cmCPackIFWGenerator : public cmCPackGenerator -{ -public: - cmCPackTypeMacro(cmCPackIFWGenerator, cmCPackGenerator); - - /** - * Construct generator - */ - cmCPackIFWGenerator(); - virtual ~cmCPackIFWGenerator(); - -protected: - virtual int InitializeInternal(); - virtual int PackageFiles(); - virtual const char* GetPackagingInstallPrefix(); - - virtual const char* GetOutputExtension(); - - std::string IfwGetGroupId(cmCPackComponentGroup *group); - std::string IfwGetComponentId(cmCPackComponent *component); - - std::string IfwGetGroupName(cmCPackComponentGroup *group); - - std::string IfwGetComponentName(cmCPackComponent *component); - std::string IfwGetComponentName(const std::string &componentName); - - virtual std::string GetComponentInstallDirNamePrefix( - const std::string& componentName); - - virtual std::string GetComponentInstallDirNameSuffix( - const std::string& componentName); - - bool GetListOfSubdirectories(const char* dir, - std::vector& dirs); - - enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir() const; - virtual bool SupportsAbsoluteDestination() const; - virtual bool SupportsComponentInstallation() const; - -private: - int IfwCreateConfigFile(); - int IfwCreatePackageFile(); - std::string IfwCreateCurrentDate(); - bool IfwParseLicenses(std::vector &licenses, - const std::string &variable, - const std::string &metaDir); - - std::string ifwRepoGen; - std::string ifwBinCreator; - - std::string ifwDownloadSite; - - bool ifwOnlineOnly; - bool ifwResolveDuplicateNames; - std::vector ifwPkgsDirsVector; -}; - -#endif ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:45:53 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:45:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4830-g7ac5bd6 Message-ID: <20140811134553.25FDE606A4@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, next has been updated via 7ac5bd61143da98e376e73dcb7706c67f6737c9b (commit) via 975dc87174294d59f60ffa0e52608f8fbf429737 (commit) from 0c01a84d75ef20ad6509b70c84e5217c872573b1 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ac5bd61143da98e376e73dcb7706c67f6737c9b commit 7ac5bd61143da98e376e73dcb7706c67f6737c9b Merge: 0c01a84 975dc87 Author: Brad King AuthorDate: Mon Aug 11 09:45:52 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 09:45:52 2014 -0400 Merge topic 'wix-acl' into next 975dc871 Help: Add notes for topic 'wix-acl' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=975dc87174294d59f60ffa0e52608f8fbf429737 commit 975dc87174294d59f60ffa0e52608f8fbf429737 Author: Brad King AuthorDate: Mon Aug 11 09:47:09 2014 -0400 Commit: Brad King CommitDate: Mon Aug 11 09:47:09 2014 -0400 Help: Add notes for topic 'wix-acl' diff --git a/Help/release/dev/wix-acl.rst b/Help/release/dev/wix-acl.rst new file mode 100644 index 0000000..bf146d0 --- /dev/null +++ b/Help/release/dev/wix-acl.rst @@ -0,0 +1,6 @@ +wix-acl +------- + +* The :manual:`cpack(1)` ``WiX`` generator learned to support + a :prop_inst:`CPACK_WIX_ACL` installed file property to + specify an Access Control List. ----------------------------------------------------------------------- Summary of changes: Help/release/dev/wix-acl.rst | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Help/release/dev/wix-acl.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:49:38 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:49:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4832-g96eba9b Message-ID: <20140811134938.5D0B360A32@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, next has been updated via 96eba9b34bd17e72d478af09b9e5bf5a95b35043 (commit) via 704830ae1f7f6b620f2df00ba168c0f3b060c6e2 (commit) from 7ac5bd61143da98e376e73dcb7706c67f6737c9b (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=96eba9b34bd17e72d478af09b9e5bf5a95b35043 commit 96eba9b34bd17e72d478af09b9e5bf5a95b35043 Merge: 7ac5bd6 704830a Author: Brad King AuthorDate: Mon Aug 11 09:49:37 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 09:49:37 2014 -0400 Merge topic 'CMakePackageConfigHelpers-INSTALL_PREFIX' into next 704830ae Help: Add notes for topic 'CMakePackageConfigHelpers-INSTALL_PREFIX' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=704830ae1f7f6b620f2df00ba168c0f3b060c6e2 commit 704830ae1f7f6b620f2df00ba168c0f3b060c6e2 Author: Brad King AuthorDate: Mon Aug 11 09:49:14 2014 -0400 Commit: Brad King CommitDate: Mon Aug 11 09:49:14 2014 -0400 Help: Add notes for topic 'CMakePackageConfigHelpers-INSTALL_PREFIX' diff --git a/Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst b/Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst new file mode 100644 index 0000000..da8d7c3 --- /dev/null +++ b/Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst @@ -0,0 +1,7 @@ +CMakePackageConfigHelpers-INSTALL_PREFIX +---------------------------------------- + +* The :module:`CMakePackageConfigHelpers` module + :command:`configure_package_config_file` command learned a new + ``INSTALL_PREFIX`` option to generate package configuration files + meant for a prefix other than :variable:`CMAKE_INSTALL_PREFIX`. ----------------------------------------------------------------------- Summary of changes: Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:54:09 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:54:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1635-g5258405 Message-ID: <20140811135409.5AC5B60CFE@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 52584050c2bb0d65b60b0164af6a28c2761d1598 (commit) via 704830ae1f7f6b620f2df00ba168c0f3b060c6e2 (commit) via e3007c92e04416d7fba2db5de757c27d22d4af6b (commit) via d057bf85a6412bf79a1730b31338c4581e7940be (commit) via f3dd116cee96d37e039864a032886c73f05c1cda (commit) via 64eca30dc4d584fb6acf8f6486c016eed50eb7ae (commit) from 3b0d634f70db6af5469e83bb7c14f687bfafda74 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52584050c2bb0d65b60b0164af6a28c2761d1598 commit 52584050c2bb0d65b60b0164af6a28c2761d1598 Merge: 3b0d634 704830a Author: Brad King AuthorDate: Mon Aug 11 09:54:08 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 09:54:08 2014 -0400 Merge topic 'CMakePackageConfigHelpers-INSTALL_PREFIX' 704830ae Help: Add notes for topic 'CMakePackageConfigHelpers-INSTALL_PREFIX' e3007c92 CMakePackageConfigHelpers: Add unit tests for INSTALL_PREFIX option d057bf85 CMakePackageConfigHelpers: Add INSTALL_PREFIX option f3dd116c CMakePackageConfigHelpers: restructure documentation and document commands 64eca30d CMakePackageConfigHelpers: Remove unused variable ----------------------------------------------------------------------- Summary of changes: .../CMakePackageConfigHelpers-INSTALL_PREFIX.rst | 7 + Modules/CMakePackageConfigHelpers.cmake | 293 +++++++++++--------- Tests/FindPackageTest/CMakeLists.txt | 38 +++ 3 files changed, 202 insertions(+), 136 deletions(-) create mode 100644 Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:54:11 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:54:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1639-g2fdd5d8 Message-ID: <20140811135411.EB1CD60CFF@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 2fdd5d88a16f816ac5fc0f3ff0d22bf5bbe8a12d (commit) via ebe8d51b11a2633857317aa1c8fe7ec0527c37eb (commit) via 82382479f7d43158d12f75c5ee8dda53edacd8c4 (commit) via 3040ab8f557b8d8e0e09f4ff569263d429afdb6d (commit) from 52584050c2bb0d65b60b0164af6a28c2761d1598 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2fdd5d88a16f816ac5fc0f3ff0d22bf5bbe8a12d commit 2fdd5d88a16f816ac5fc0f3ff0d22bf5bbe8a12d Merge: 5258405 ebe8d51 Author: Brad King AuthorDate: Mon Aug 11 09:54:10 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 09:54:10 2014 -0400 Merge topic 'cpack-ifw-generator' ebe8d51b CPackIFW: Refactor and revise this generator 82382479 Doxygen: Add STRIP_FROM_PATH variable to doxyfile.in 3040ab8f Doxygen: Add CPack/IFW subdir to doxyfile.in INPUT section ----------------------------------------------------------------------- Summary of changes: Modules/CPackIFW.cmake | 18 +- Source/CMakeLists.txt | 4 +- Source/CPack/IFW/cmCPackIFWGenerator.cxx | 538 ++++++++++++++++++ Source/CPack/IFW/cmCPackIFWGenerator.h | 137 +++++ Source/CPack/IFW/cmCPackIFWInstaller.cxx | 289 ++++++++++ Source/CPack/IFW/cmCPackIFWInstaller.h | 84 +++ Source/CPack/IFW/cmCPackIFWPackage.cxx | 486 ++++++++++++++++ Source/CPack/IFW/cmCPackIFWPackage.h | 131 +++++ Source/CPack/cmCPackGeneratorFactory.cxx | 2 +- Source/CPack/cmCPackIFWGenerator.cxx | 909 ------------------------------ Source/CPack/cmCPackIFWGenerator.h | 82 --- Utilities/Doxygen/doxyfile.in | 5 + 12 files changed, 1689 insertions(+), 996 deletions(-) create mode 100644 Source/CPack/IFW/cmCPackIFWGenerator.cxx create mode 100644 Source/CPack/IFW/cmCPackIFWGenerator.h create mode 100644 Source/CPack/IFW/cmCPackIFWInstaller.cxx create mode 100644 Source/CPack/IFW/cmCPackIFWInstaller.h create mode 100644 Source/CPack/IFW/cmCPackIFWPackage.cxx create mode 100644 Source/CPack/IFW/cmCPackIFWPackage.h delete mode 100644 Source/CPack/cmCPackIFWGenerator.cxx delete mode 100644 Source/CPack/cmCPackIFWGenerator.h hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:54:13 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:54:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1641-g348999a Message-ID: <20140811135413.C1F8460CFF@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 348999a125f3cf6936a2d5ab4f276b813443f1be (commit) via 70796ef026e8d10a4e50c8e26472d469a45f7dd5 (commit) from 2fdd5d88a16f816ac5fc0f3ff0d22bf5bbe8a12d (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=348999a125f3cf6936a2d5ab4f276b813443f1be commit 348999a125f3cf6936a2d5ab4f276b813443f1be Merge: 2fdd5d8 70796ef Author: Brad King AuthorDate: Mon Aug 11 09:54:12 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 09:54:12 2014 -0400 Merge topic 'fix-CMP0047-IS_GNU-vars' 70796ef0 CMP0047: Fix CMAKE_COMPILER_IS_GNU(CC|CXX) in OLD behavior ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalGenerator.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:54:15 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:54:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1643-gf85dee2 Message-ID: <20140811135415.C105060D22@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 f85dee25fbf1c5f4db9ecea5fb47910f38fd1ade (commit) via 810f5ccefc113987fc6f68c073ab9c84fc278b32 (commit) from 348999a125f3cf6936a2d5ab4f276b813443f1be (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f85dee25fbf1c5f4db9ecea5fb47910f38fd1ade commit f85dee25fbf1c5f4db9ecea5fb47910f38fd1ade Merge: 348999a 810f5cc Author: Brad King AuthorDate: Mon Aug 11 09:54:14 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 09:54:14 2014 -0400 Merge topic 'BundleUtilities-os9-newlines' 810f5cce BundleUtilities: Allow Info.plist files which use CR line endings ----------------------------------------------------------------------- Summary of changes: Modules/BundleUtilities.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:54:18 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:54:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1646-g8b61070 Message-ID: <20140811135418.326CB60B7C@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 8b61070748ce7de7c7ad3a21b9fa6b3bc5281e4f (commit) via 45ab21ee6ebb2727bfb79548811eaf642a46a691 (commit) via 3c0bb28162e1b2d05e913f874dba23b556109a97 (commit) from f85dee25fbf1c5f4db9ecea5fb47910f38fd1ade (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b61070748ce7de7c7ad3a21b9fa6b3bc5281e4f commit 8b61070748ce7de7c7ad3a21b9fa6b3bc5281e4f Merge: f85dee2 45ab21e Author: Brad King AuthorDate: Mon Aug 11 09:54:17 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 09:54:17 2014 -0400 Merge topic 'update-kwiml' 45ab21ee Merge branch 'upstream-kwiml' into update-kwiml 3c0bb281 KWIML: Teach ABI.h about OpenRISC 1000 ----------------------------------------------------------------------- Summary of changes: Utilities/KWIML/ABI.h.in | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:54:21 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:54:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1649-g401d82b Message-ID: <20140811135421.200B660CFE@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 401d82b3db7253d29e51ecc7c7cdbaee70a38166 (commit) via 975dc87174294d59f60ffa0e52608f8fbf429737 (commit) via 12418f5c264ef8e66724cbb19e1304416452c7f8 (commit) from 8b61070748ce7de7c7ad3a21b9fa6b3bc5281e4f (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=401d82b3db7253d29e51ecc7c7cdbaee70a38166 commit 401d82b3db7253d29e51ecc7c7cdbaee70a38166 Merge: 8b61070 975dc87 Author: Brad King AuthorDate: Mon Aug 11 09:54:19 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 09:54:19 2014 -0400 Merge topic 'wix-acl' 975dc871 Help: Add notes for topic 'wix-acl' 12418f5c CPackWIX: Implement CPACK_WIX_ACL (Access Control List) property ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/prop_inst/CPACK_WIX_ACL.rst | 17 +++ Help/release/dev/wix-acl.rst | 6 ++ Source/CMakeLists.txt | 5 +- Source/CPack/WiX/cmWIXAccessControlList.cxx | 149 +++++++++++++++++++++++++++ Source/CPack/WiX/cmWIXAccessControlList.h | 46 +++++++++ Source/CPack/WiX/cmWIXFilesSourceWriter.cxx | 7 ++ Source/CPack/WiX/cmWIXSourceWriter.h | 5 +- Source/cmInstalledFile.cxx | 11 ++ Source/cmInstalledFile.h | 3 + 10 files changed, 246 insertions(+), 4 deletions(-) create mode 100644 Help/prop_inst/CPACK_WIX_ACL.rst create mode 100644 Help/release/dev/wix-acl.rst create mode 100644 Source/CPack/WiX/cmWIXAccessControlList.cxx create mode 100644 Source/CPack/WiX/cmWIXAccessControlList.h hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 09:54:47 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 09:54:47 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4839-g6a10e3c Message-ID: <20140811135447.4462060D0C@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, next has been updated via 6a10e3ccb60fcb4ed7dd65e39b65f8c98c4c7762 (commit) via 401d82b3db7253d29e51ecc7c7cdbaee70a38166 (commit) via 8b61070748ce7de7c7ad3a21b9fa6b3bc5281e4f (commit) via f85dee25fbf1c5f4db9ecea5fb47910f38fd1ade (commit) via 348999a125f3cf6936a2d5ab4f276b813443f1be (commit) via 2fdd5d88a16f816ac5fc0f3ff0d22bf5bbe8a12d (commit) via 52584050c2bb0d65b60b0164af6a28c2761d1598 (commit) from 96eba9b34bd17e72d478af09b9e5bf5a95b35043 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a10e3ccb60fcb4ed7dd65e39b65f8c98c4c7762 commit 6a10e3ccb60fcb4ed7dd65e39b65f8c98c4c7762 Merge: 96eba9b 401d82b Author: Brad King AuthorDate: Mon Aug 11 09:56:06 2014 -0400 Commit: Brad King CommitDate: Mon Aug 11 09:56:06 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 10:01:22 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 10:01:22 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1655-gffc1935 Message-ID: <20140811140122.F303D6140C@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 ffc1935a73267cfe74e5d5492c9621ccf6c66112 (commit) via 81a4ca57f858ad8ea7e042f60300aa5322541578 (commit) via 4988b174923dd20620d1c7ee9feec6d04386cbc4 (commit) via c6f1c5585aabdd2f670e3fc5390ffef43232456f (commit) via 00ad505b374f80c72e6576bb0cb3829521964239 (commit) via 59c3695edd8795b9c3b8eb7cacd3991b6a9860f6 (commit) from 401d82b3db7253d29e51ecc7c7cdbaee70a38166 (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: hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 10:01:23 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 10:01:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4846-g2e4f89e Message-ID: <20140811140123.3A9106140D@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, next has been updated via 2e4f89e45d407c33f08a004b6fd083f54f52548b (commit) via ffc1935a73267cfe74e5d5492c9621ccf6c66112 (commit) via 81a4ca57f858ad8ea7e042f60300aa5322541578 (commit) via 4988b174923dd20620d1c7ee9feec6d04386cbc4 (commit) via c6f1c5585aabdd2f670e3fc5390ffef43232456f (commit) via 00ad505b374f80c72e6576bb0cb3829521964239 (commit) via 59c3695edd8795b9c3b8eb7cacd3991b6a9860f6 (commit) from 6a10e3ccb60fcb4ed7dd65e39b65f8c98c4c7762 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e4f89e45d407c33f08a004b6fd083f54f52548b commit 2e4f89e45d407c33f08a004b6fd083f54f52548b Merge: 6a10e3c ffc1935 Author: Brad King AuthorDate: Mon Aug 11 10:02:22 2014 -0400 Commit: Brad King CommitDate: Mon Aug 11 10:02:22 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 10:01:23 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 10:01:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.0.1-7-g81a4ca5 Message-ID: <20140811140123.8D89061415@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 81a4ca57f858ad8ea7e042f60300aa5322541578 (commit) via 4988b174923dd20620d1c7ee9feec6d04386cbc4 (commit) via c6f1c5585aabdd2f670e3fc5390ffef43232456f (commit) via 00ad505b374f80c72e6576bb0cb3829521964239 (commit) via 59c3695edd8795b9c3b8eb7cacd3991b6a9860f6 (commit) via 71a11252e95797113ecb1a969386f496b7d4861b (commit) via 261acd91093ba5f2bf79f38a9632887ab2dd5f1c (commit) from 76acc128a272b1fae303215a985410faec87c3e0 (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/BundleUtilities.cmake | 1 + Source/cmGlobalGenerator.cxx | 8 ++++++++ Source/cmQtAutoGenerators.cxx | 13 +++++++++---- Source/cmQtAutoGenerators.h | 2 +- Tests/QtAutogen/CMakeLists.txt | 4 ++-- Tests/QtAutogen/resourcetester.cpp | 2 ++ .../{not_generated_file.qrc => second_resource.qrc} | 2 +- Tests/QtAutogen/second_widget.cpp | 14 ++++++++++++++ Tests/QtAutogen/second_widget.h | 19 +++++++++++++++++++ Tests/QtAutogen/{calwidget.ui => second_widget.ui} | 8 ++++---- 10 files changed, 61 insertions(+), 12 deletions(-) copy Tests/QtAutogen/{not_generated_file.qrc => second_resource.qrc} (71%) create mode 100644 Tests/QtAutogen/second_widget.cpp create mode 100644 Tests/QtAutogen/second_widget.h copy Tests/QtAutogen/{calwidget.ui => second_widget.ui} (84%) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 10:33:37 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 10:33:37 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4848-g120be8c Message-ID: <20140811143337.B8FC6613CF@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, next has been updated via 120be8c8a323841d3d70bb8137d629b60b047cb0 (commit) via 0578c283e88c40957c7f43c653dd8c75d8c7782e (commit) from 2e4f89e45d407c33f08a004b6fd083f54f52548b (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=120be8c8a323841d3d70bb8137d629b60b047cb0 commit 120be8c8a323841d3d70bb8137d629b60b047cb0 Merge: 2e4f89e 0578c28 Author: Brad King AuthorDate: Mon Aug 11 10:33:36 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 10:33:36 2014 -0400 Merge topic 'fujitsu-compiler-id' into next 0578c283 Add Fujitsu compiler detection http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0578c283e88c40957c7f43c653dd8c75d8c7782e commit 0578c283e88c40957c7f43c653dd8c75d8c7782e Author: Erik Lindahl AuthorDate: Sun Aug 10 22:55:44 2014 +0200 Commit: Brad King CommitDate: Mon Aug 11 10:31:06 2014 -0400 Add Fujitsu compiler detection The Fujitsu C/C++ compilers are the default ones for K computer. Detect both native and cross compilers by looking for the __FUJITSU preprocessor definition. diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake index e247885..19bcbcc 100644 --- a/Modules/CMakeCompilerIdDetection.cmake +++ b/Modules/CMakeCompilerIdDetection.cmake @@ -74,6 +74,7 @@ function(compiler_id_detection outvar lang) PGI Cray TI + Fujitsu ) if (lang STREQUAL C) list(APPEND ordered_compilers diff --git a/Modules/Compiler/Fujitsu-DetermineCompiler.cmake b/Modules/Compiler/Fujitsu-DetermineCompiler.cmake new file mode 100644 index 0000000..73ee38c --- /dev/null +++ b/Modules/Compiler/Fujitsu-DetermineCompiler.cmake @@ -0,0 +1,2 @@ + +set(_compiler_id_pp_test "defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)") ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCompilerIdDetection.cmake | 1 + Modules/Compiler/Fujitsu-DetermineCompiler.cmake | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 Modules/Compiler/Fujitsu-DetermineCompiler.cmake hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 12:59:23 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 12:59:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4850-g9d9cc68 Message-ID: <20140811165923.4B02360D2E@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, next has been updated via 9d9cc68308d7d08a3b3df35a2ad17430dd9f2ce9 (commit) via c5e3c7c3c7fad6e7c6638a768cee3995b0a518a6 (commit) from 120be8c8a323841d3d70bb8137d629b60b047cb0 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d9cc68308d7d08a3b3df35a2ad17430dd9f2ce9 commit 9d9cc68308d7d08a3b3df35a2ad17430dd9f2ce9 Merge: 120be8c c5e3c7c Author: Brad King AuthorDate: Mon Aug 11 12:59:21 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 12:59:21 2014 -0400 Merge topic 'add-CheckFortranSourceCompiles' into next c5e3c7c3 Add CheckFortranSourceCompiles module (#14656) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c5e3c7c3c7fad6e7c6638a768cee3995b0a518a6 commit c5e3c7c3c7fad6e7c6638a768cee3995b0a518a6 Author: Brad King AuthorDate: Wed Aug 6 10:27:17 2014 -0400 Commit: Brad King CommitDate: Wed Aug 6 10:45:40 2014 -0400 Add CheckFortranSourceCompiles module (#14656) Copy the CheckCSourceCompiles module and port it to Fortran. Extend the FortranOnly test to try using the new module. Suggested-by: Nicolas Bock diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 91fffe9..c279d50 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -23,6 +23,7 @@ All Modules /module/CheckCXXSourceRuns /module/CheckCXXSymbolExists /module/CheckFortranFunctionExists + /module/CheckFortranSourceCompiles /module/CheckFunctionExists /module/CheckIncludeFileCXX /module/CheckIncludeFile diff --git a/Help/module/CheckFortranSourceCompiles.rst b/Help/module/CheckFortranSourceCompiles.rst new file mode 100644 index 0000000..b749a2a --- /dev/null +++ b/Help/module/CheckFortranSourceCompiles.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/CheckFortranSourceCompiles.cmake diff --git a/Help/release/dev/add-CheckFortranSourceCompiles.rst b/Help/release/dev/add-CheckFortranSourceCompiles.rst new file mode 100644 index 0000000..b78c747 --- /dev/null +++ b/Help/release/dev/add-CheckFortranSourceCompiles.rst @@ -0,0 +1,5 @@ +add-CheckFortranSourceCompiles +------------------------------ + +* The :module:`CheckFortranSourceCompiles` module was added to + provide a ``CHECK_Fortran_SOURCE_COMPILES`` macro. diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake new file mode 100644 index 0000000..63e4539 --- /dev/null +++ b/Modules/CheckFortranSourceCompiles.cmake @@ -0,0 +1,110 @@ +#.rst: +# CheckFortranSourceCompiles +# -------------------------- +# +# Check if given Fortran source compiles and links into an executable:: +# +# CHECK_Fortran_SOURCE_COMPILES( [FAIL_REGEX ]) +# +# The arguments are: +# +# ```` +# Source code to try to compile. It must define a PROGRAM entry point. +# ```` +# Variable to store whether the source code compiled. +# ```` +# Fail if test output matches this regex. +# +# The following variables may be set before calling this macro to modify +# the way the check is run:: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link +# CMAKE_REQUIRED_QUIET = execute quietly without messages + +#============================================================================= +# Copyright 2005-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + + + +macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR) + if(NOT DEFINED "${VAR}") + set(_FAIL_REGEX) + set(_key) + foreach(arg ${ARGN}) + if("${arg}" MATCHES "^(FAIL_REGEX)$") + set(_key "${arg}") + elseif(_key) + list(APPEND _${_key} "${arg}") + else() + message(FATAL_ERROR "Unknown argument:\n ${arg}\n") + endif() + endforeach() + set(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") + if(CMAKE_REQUIRED_LIBRARIES) + set(CHECK_Fortran_SOURCE_COMPILES_ADD_LIBRARIES + LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) + else() + set(CHECK_Fortran_SOURCE_COMPILES_ADD_LIBRARIES) + endif() + if(CMAKE_REQUIRED_INCLUDES) + set(CHECK_Fortran_SOURCE_COMPILES_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + else() + set(CHECK_Fortran_SOURCE_COMPILES_ADD_INCLUDES) + endif() + file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.F" + "${SOURCE}\n") + + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Performing Test ${VAR}") + endif() + try_compile(${VAR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.F + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + ${CHECK_Fortran_SOURCE_COMPILES_ADD_LIBRARIES} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${CHECK_Fortran_SOURCE_COMPILES_ADD_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + + foreach(_regex ${_FAIL_REGEX}) + if("${OUTPUT}" MATCHES "${_regex}") + set(${VAR} 0) + endif() + endforeach() + + if(${VAR}) + set(${VAR} 1 CACHE INTERNAL "Test ${VAR}") + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Performing Test ${VAR} - Success") + endif() + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing Fortran SOURCE FILE Test ${VAR} succeded with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + else() + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Performing Test ${VAR} - Failed") + endif() + set(${VAR} "" CACHE INTERNAL "Test ${VAR}") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing Fortran SOURCE FILE Test ${VAR} failed with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + endif() + endif() +endmacro() diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt index d57a8b2..ef151d7 100644 --- a/Tests/FortranOnly/CMakeLists.txt +++ b/Tests/FortranOnly/CMakeLists.txt @@ -43,3 +43,14 @@ add_custom_target(checksayhello ALL COMMAND ${CMAKE_COMMAND} -P ${FortranOnly_SOURCE_DIR}/checksayhello.cmake ) add_dependencies(checksayhello sayhello) + +include(CheckFortranSourceCompiles) +unset(HAVE_PRINT CACHE) +CHECK_Fortran_SOURCE_COMPILES([[ + PROGRAM TEST_HAVE_PRINT + PRINT *, 'Hello' + END +]] HAVE_PRINT) +if(NOT HAVE_PRINT) + message(SEND_ERROR "CHECK_Fortran_SOURCE_COMPILES for HAVE_PRINT failed!") +endif() ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-modules.7.rst | 1 + Help/module/CheckFortranSourceCompiles.rst | 1 + .../release/dev/add-CheckFortranSourceCompiles.rst | 5 +++ ...iles.cmake => CheckFortranSourceCompiles.cmake} | 46 ++++++++++---------- Tests/FortranOnly/CMakeLists.txt | 11 +++++ 5 files changed, 41 insertions(+), 23 deletions(-) create mode 100644 Help/module/CheckFortranSourceCompiles.rst create mode 100644 Help/release/dev/add-CheckFortranSourceCompiles.rst copy Modules/{CheckCSourceCompiles.cmake => CheckFortranSourceCompiles.cmake} (72%) hooks/post-receive -- CMake From brad.king at kitware.com Mon Aug 11 13:08:01 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 11 Aug 2014 13:08:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4852-gdcd9e96 Message-ID: <20140811170801.777796142C@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, next has been updated via dcd9e9671e260bf7453bde45cf8205d9808640cb (commit) via 150c2125ddad4e5e6986dc168ccf3b35625f1cf5 (commit) from 9d9cc68308d7d08a3b3df35a2ad17430dd9f2ce9 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcd9e9671e260bf7453bde45cf8205d9808640cb commit dcd9e9671e260bf7453bde45cf8205d9808640cb Merge: 9d9cc68 150c212 Author: Brad King AuthorDate: Mon Aug 11 13:08:00 2014 -0400 Commit: CMake Topic Stage CommitDate: Mon Aug 11 13:08:00 2014 -0400 Merge topic 'FindMPI-mpiexec-MPI_HOME' into next 150c2125 FindMPI: Honor MPI_HOME for MPIEXEC (#14347) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=150c2125ddad4e5e6986dc168ccf3b35625f1cf5 commit 150c2125ddad4e5e6986dc168ccf3b35625f1cf5 Author: Marcel Loose AuthorDate: Mon Aug 11 13:07:20 2014 -0400 Commit: Brad King CommitDate: Mon Aug 11 13:09:02 2014 -0400 FindMPI: Honor MPI_HOME for MPIEXEC (#14347) We already use MPI_HOME and ENV{MPI_HOME} as hints for the location of the MPI compilers. Do the same for mpiexec, and then use the location of mpiexec as a hint to find the compilers. diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 6e15f3b..3be5e3c 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -522,6 +522,7 @@ endfunction() # Most mpi distros have some form of mpiexec which gives us something we can reliably look for. find_program(MPIEXEC NAMES ${_MPI_EXEC_NAMES} + HINTS ${MPI_HOME} $ENV{MPI_HOME} PATHS ${_MPI_PREFIX_PATH} PATH_SUFFIXES bin DOC "Executable for running MPI programs.") @@ -584,7 +585,9 @@ foreach (lang C CXX Fortran) find_program(MPI_${lang}_COMPILER NAMES ${_MPI_${lang}_COMPILER_NAMES} - PATHS "${MPI_HOME}/bin" "$ENV{MPI_HOME}/bin" ${_MPI_PREFIX_PATH}) + HINTS ${_MPI_BASE_DIR}/bin + PATHS ${_MPI_PREFIX_PATH} + ) interrogate_mpi_compiler(${lang} ${try_libs}) mark_as_advanced(MPI_${lang}_COMPILER) ----------------------------------------------------------------------- Summary of changes: Modules/FindMPI.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Aug 12 00:01:15 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 12 Aug 2014 00:01:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1656-g9c103ae Message-ID: <20140812040115.5983464EFD@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 9c103ae80a15b0eccabec8b74812f0f9e9c17123 (commit) from ffc1935a73267cfe74e5d5492c9621ccf6c66112 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c103ae80a15b0eccabec8b74812f0f9e9c17123 commit 9c103ae80a15b0eccabec8b74812f0f9e9c17123 Author: Kitware Robot AuthorDate: Tue Aug 12 00:01:14 2014 -0400 Commit: Kitware Robot CommitDate: Tue Aug 12 00:01:14 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e685083..dffdbd1 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 0) -set(CMake_VERSION_PATCH 20140811) +set(CMake_VERSION_PATCH 20140812) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 09:45:15 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 09:45:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4854-g3ff95a9 Message-ID: <20140812134515.CADF265BF2@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, next has been updated via 3ff95a9e0cfc1d0f4a9ecfbd4a0845fd6e04b934 (commit) via 33d0f64a44f30c5630e80cb265266349cfd11dbb (commit) from dcd9e9671e260bf7453bde45cf8205d9808640cb (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ff95a9e0cfc1d0f4a9ecfbd4a0845fd6e04b934 commit 3ff95a9e0cfc1d0f4a9ecfbd4a0845fd6e04b934 Merge: dcd9e96 33d0f64 Author: Brad King AuthorDate: Tue Aug 12 09:45:14 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 12 09:45:14 2014 -0400 Merge topic 'add-CheckFortranSourceCompiles' into next 33d0f64a Tests/FortranOnly: Print CMakeError.log on HAVE_PRINT failure http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33d0f64a44f30c5630e80cb265266349cfd11dbb commit 33d0f64a44f30c5630e80cb265266349cfd11dbb Author: Brad King AuthorDate: Tue Aug 12 09:46:04 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 09:46:04 2014 -0400 Tests/FortranOnly: Print CMakeError.log on HAVE_PRINT failure diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt index ef151d7..da6a7dd 100644 --- a/Tests/FortranOnly/CMakeLists.txt +++ b/Tests/FortranOnly/CMakeLists.txt @@ -44,6 +44,8 @@ add_custom_target(checksayhello ALL ) add_dependencies(checksayhello sayhello) +set(err_log ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log) +file(REMOVE "${err_log}") include(CheckFortranSourceCompiles) unset(HAVE_PRINT CACHE) CHECK_Fortran_SOURCE_COMPILES([[ @@ -52,5 +54,10 @@ CHECK_Fortran_SOURCE_COMPILES([[ END ]] HAVE_PRINT) if(NOT HAVE_PRINT) - message(SEND_ERROR "CHECK_Fortran_SOURCE_COMPILES for HAVE_PRINT failed!") + if(EXISTS "${err_log}") + file(READ "${err_log}" err) + endif() + string(REPLACE "\n" "\n " err " ${err}") + message(SEND_ERROR "CHECK_Fortran_SOURCE_COMPILES for HAVE_PRINT failed:\n" + "${err}") endif() ----------------------------------------------------------------------- Summary of changes: Tests/FortranOnly/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 09:48:31 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 09:48:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1661-g354c792 Message-ID: <20140812134831.8D2B465CB7@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 354c792c9de5759a4484dc157a206e06012e83c6 (commit) via 6c32d43ce2d8db87e348b281d9afe981d6ebc15d (commit) via 137a0251aaa643f39d3e804bd9a9c3e8f1519ce0 (commit) via 51c82c3a66f02192df4db5d51d95f7311bc2181f (commit) via fe587db415b1cf728f42c5db55c3acbad7a9a529 (commit) from 9c103ae80a15b0eccabec8b74812f0f9e9c17123 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=354c792c9de5759a4484dc157a206e06012e83c6 commit 354c792c9de5759a4484dc157a206e06012e83c6 Merge: 9c103ae 6c32d43 Author: Brad King AuthorDate: Tue Aug 12 09:48:30 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 12 09:48:30 2014 -0400 Merge topic 'update-kwsys' 6c32d43c Merge branch 'upstream-kwsys' into update-kwsys 137a0251 KWSys 2014-08-11 (32023afd) 51c82c3a Merge branch 'upstream-kwsys' into update-kwsys fe587db4 KWSys 2014-08-07 (4d526097) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CPU.h.in | 4 ++ Source/kwsys/ProcessUNIX.c | 2 + Source/kwsys/SystemTools.cxx | 105 ---------------------------- Source/kwsys/SystemTools.hxx.in | 9 --- Source/kwsys/testCommandLineArguments1.cxx | 2 + Source/kwsys/testProcess.c | 2 + Source/kwsys/testSystemTools.cxx | 22 ------ 7 files changed, 10 insertions(+), 136 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 09:48:33 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 09:48:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1663-ge01cb16 Message-ID: <20140812134833.DAE5665CC0@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 e01cb16cdbeac38c1b23e651137efc29116d2c48 (commit) via 0578c283e88c40957c7f43c653dd8c75d8c7782e (commit) from 354c792c9de5759a4484dc157a206e06012e83c6 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e01cb16cdbeac38c1b23e651137efc29116d2c48 commit e01cb16cdbeac38c1b23e651137efc29116d2c48 Merge: 354c792 0578c28 Author: Brad King AuthorDate: Tue Aug 12 09:48:32 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 12 09:48:32 2014 -0400 Merge topic 'fujitsu-compiler-id' 0578c283 Add Fujitsu compiler detection ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCompilerIdDetection.cmake | 1 + Modules/Compiler/Fujitsu-DetermineCompiler.cmake | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 Modules/Compiler/Fujitsu-DetermineCompiler.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 09:48:58 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 09:48:58 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4858-gf995368 Message-ID: <20140812134858.28E6C65CC0@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, next has been updated via f995368714dcc9d9d770b3a3c4f7163abda58027 (commit) via e01cb16cdbeac38c1b23e651137efc29116d2c48 (commit) via 354c792c9de5759a4484dc157a206e06012e83c6 (commit) via 9c103ae80a15b0eccabec8b74812f0f9e9c17123 (commit) from 3ff95a9e0cfc1d0f4a9ecfbd4a0845fd6e04b934 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f995368714dcc9d9d770b3a3c4f7163abda58027 commit f995368714dcc9d9d770b3a3c4f7163abda58027 Merge: 3ff95a9 e01cb16 Author: Brad King AuthorDate: Tue Aug 12 09:50:14 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 09:50:14 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 09:50:07 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 09:50:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1667-g755891c Message-ID: <20140812135007.45BC465D17@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 755891c3d92b684e7884ccb3016e5a1da89bbbde (commit) via 8db3c79f63841e8cabd7e84968da72522f656cb1 (commit) via ef120655fcaedca08f8782455551efba488ef507 (commit) via d061248791db8cd3c6030c4b29ce780cb8bc84da (commit) from e01cb16cdbeac38c1b23e651137efc29116d2c48 (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: hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 09:50:07 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 09:50:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4863-g971b990 Message-ID: <20140812135007.7522965D07@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, next has been updated via 971b990718b75dd8848e795a07294d8f7594b9a7 (commit) via 755891c3d92b684e7884ccb3016e5a1da89bbbde (commit) via 8db3c79f63841e8cabd7e84968da72522f656cb1 (commit) via ef120655fcaedca08f8782455551efba488ef507 (commit) via d061248791db8cd3c6030c4b29ce780cb8bc84da (commit) from f995368714dcc9d9d770b3a3c4f7163abda58027 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=971b990718b75dd8848e795a07294d8f7594b9a7 commit 971b990718b75dd8848e795a07294d8f7594b9a7 Merge: f995368 755891c Author: Brad King AuthorDate: Tue Aug 12 09:51:08 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 09:51:08 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 09:50:07 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 09:50:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.0.1-10-g8db3c79 Message-ID: <20140812135007.89CB565D19@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 8db3c79f63841e8cabd7e84968da72522f656cb1 (commit) via ef120655fcaedca08f8782455551efba488ef507 (commit) via d061248791db8cd3c6030c4b29ce780cb8bc84da (commit) from 81a4ca57f858ad8ea7e042f60300aa5322541578 (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/kwsys/CPU.h.in | 4 ++++ Utilities/KWIML/ABI.h.in | 4 ++++ 2 files changed, 8 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 10:03:04 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 10:03:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1680-g7365a9f Message-ID: <20140812140304.894B866244@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 7365a9fe929c935a194987d3a4a68aff77129a2b (commit) via 5d3d9a22b28e99894dab2fe4fac0279fb422ace4 (commit) via 401a00d9f98aff9c2f15315945cd4c392ff36d9f (commit) via 709cebde66a4251e1a1ed7a90c072f06be691bee (commit) via 72395ab23eee5ed7ff5a8800632869d6ef66f805 (commit) via 2074f5813889680d32c784c3dbdb1bf41be1405f (commit) via c72f0887cee6c3c47f50efb44256476045cf801f (commit) via 1c94558abb653968de6da2cb4672006f31ca0d14 (commit) via 592098e2d5a00d396e84d7a5e51ae6c550a21fc6 (commit) via aa42a78f523f3db5e849663a7c55d949dd25bfb0 (commit) via b94ddf6cd70e811e4bc3f3c28ef7195bcf2bb0cf (commit) via d7938bff37bfa05f34b9ad5a46ae3aff54955eea (commit) via 3abd150ce9df03e24a903dedc952339b58ba79cb (commit) from 755891c3d92b684e7884ccb3016e5a1da89bbbde (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7365a9fe929c935a194987d3a4a68aff77129a2b commit 7365a9fe929c935a194987d3a4a68aff77129a2b Merge: 755891c 5d3d9a2 Author: Brad King AuthorDate: Tue Aug 12 10:03:03 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 12 10:03:03 2014 -0400 Merge topic 'vs-windows-phone-and-store' 5d3d9a22 Help: Add notes for topic 'vs-windows-phone-and-store' 401a00d9 VS: Set WindowsPhone and WindowsStore min VS version required 709cebde VS: Generate WindowsPhone and WindowsStore application types 72395ab2 VS: Add .sln "Deploy" mark for WindowsPhone and WindowsStore binaries 2074f581 MSVC: Add system libs for WindowsPhone and WindowsStore c72f0887 MSVC: Add default WindowsPhone and WindowsStore compile flags 1c94558a MSVC: Disable incremental linking for WindowsPhone and WindowsStore 592098e2 Define 'WINDOWS_PHONE' and 'WINDOWS_STORE' variables aa42a78f Add WindowsPhone and WindowsStore platform information modules b94ddf6c CMakeDetermineCompilerId: Recognize WindowsPhone and WindowsStore d7938bff VS: Select WindowsPhone and WindowsStore default toolsets 3abd150c VS: Save WindowsPhone and WindowsStore system internally ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 2 + Help/release/dev/vs-windows-phone-and-store.rst | 10 +++ Help/variable/WINDOWS_PHONE.rst | 5 ++ Help/variable/WINDOWS_STORE.rst | 5 ++ Modules/CMakeDetermineCompilerId.cmake | 12 ++++ Modules/CompilerId/VS-10.vcxproj.in | 2 + Modules/Platform/Windows-MSVC.cmake | 18 ++++-- Modules/Platform/Windows.cmake | 4 ++ ...wsCE-MSVC-C.cmake => WindowsPhone-MSVC-C.cmake} | 0 ...-MSVC-CXX.cmake => WindowsPhone-MSVC-CXX.cmake} | 0 .../{WindowsCE.cmake => WindowsPhone.cmake} | 0 ...wsCE-MSVC-C.cmake => WindowsStore-MSVC-C.cmake} | 0 ...-MSVC-CXX.cmake => WindowsStore-MSVC-CXX.cmake} | 0 .../{WindowsCE.cmake => WindowsStore.cmake} | 0 Source/cmGlobalVisualStudio10Generator.cxx | 38 +++++++++++- Source/cmGlobalVisualStudio10Generator.h | 14 +++++ Source/cmGlobalVisualStudio11Generator.cxx | 64 ++++++++++++++++++++ Source/cmGlobalVisualStudio11Generator.h | 7 +++ Source/cmGlobalVisualStudio12Generator.cxx | 50 +++++++++++++++ Source/cmGlobalVisualStudio12Generator.h | 4 ++ Source/cmVisualStudio10TargetGenerator.cxx | 34 +++++++++++ Source/cmVisualStudio10TargetGenerator.h | 1 + 22 files changed, 265 insertions(+), 5 deletions(-) create mode 100644 Help/release/dev/vs-windows-phone-and-store.rst create mode 100644 Help/variable/WINDOWS_PHONE.rst create mode 100644 Help/variable/WINDOWS_STORE.rst copy Modules/Platform/{WindowsCE-MSVC-C.cmake => WindowsPhone-MSVC-C.cmake} (100%) copy Modules/Platform/{WindowsCE-MSVC-CXX.cmake => WindowsPhone-MSVC-CXX.cmake} (100%) copy Modules/Platform/{WindowsCE.cmake => WindowsPhone.cmake} (100%) copy Modules/Platform/{WindowsCE-MSVC-C.cmake => WindowsStore-MSVC-C.cmake} (100%) copy Modules/Platform/{WindowsCE-MSVC-CXX.cmake => WindowsStore-MSVC-CXX.cmake} (100%) copy Modules/Platform/{WindowsCE.cmake => WindowsStore.cmake} (100%) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 10:03:22 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 10:03:22 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4865-g3e510c4 Message-ID: <20140812140322.2DA3565D1C@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, next has been updated via 3e510c4e348f3d029cf56f3774eec97b609aa544 (commit) via 7365a9fe929c935a194987d3a4a68aff77129a2b (commit) from 971b990718b75dd8848e795a07294d8f7594b9a7 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e510c4e348f3d029cf56f3774eec97b609aa544 commit 3e510c4e348f3d029cf56f3774eec97b609aa544 Merge: 971b990 7365a9f Author: Brad King AuthorDate: Tue Aug 12 10:04:40 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:04:40 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 10:14:35 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 10:14:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4873-g2ba239f Message-ID: <20140812141435.A9E26657D5@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, next has been updated via 2ba239f0a6fffcb3e165aa3c4dc69893566a071c (commit) via aa21001bd3c723f79e74407a2ba315d5988804a0 (commit) via 6fe770e163daf005cd151798c18b89ad50c17125 (commit) via 9b4dc2ad4a82b233520015fdc5cbf5df1ed540f7 (commit) via f063a914c649b1dfbcd1a02d381b4e94ad01ceaa (commit) via 2b20110f681d180f12f4c200df1489eeb242d1b2 (commit) via 2dfcf0ed079119cb25f6520100083270873503f5 (commit) via dbb5a7ee315948b4f16e5c6a549db090e266e51d (commit) from 3e510c4e348f3d029cf56f3774eec97b609aa544 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2ba239f0a6fffcb3e165aa3c4dc69893566a071c commit 2ba239f0a6fffcb3e165aa3c4dc69893566a071c Merge: 3e510c4 aa21001 Author: Brad King AuthorDate: Tue Aug 12 10:14:34 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 12 10:14:34 2014 -0400 Merge topic 'vs-special-source-file-properties' into next aa21001b Help: Add notes for topic 'vs-special-source-file-properties' 6fe770e1 VS: Add a source file property to set the hlsl shader type 9b4dc2ad VS: Add a source file property to mark content for Windows App deployment f063a914 VS: Re-arrange WriteExtraSource to support tool configuration 2b20110f MSVC: Select default standard libraries for ARM platform 2dfcf0ed VS: Fix generation of desktop applications for ARM dbb5a7ee CMakeDetermineCompilerId: Fix detection for VS ARM platform http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa21001bd3c723f79e74407a2ba315d5988804a0 commit aa21001bd3c723f79e74407a2ba315d5988804a0 Author: Brad King AuthorDate: Wed Aug 6 09:35:24 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:09:20 2014 -0400 Help: Add notes for topic 'vs-special-source-file-properties' diff --git a/Help/release/dev/vs-special-source-file-properties.rst b/Help/release/dev/vs-special-source-file-properties.rst new file mode 100644 index 0000000..166c4b3 --- /dev/null +++ b/Help/release/dev/vs-special-source-file-properties.rst @@ -0,0 +1,11 @@ +vs-special-source-file-properties +--------------------------------- + +* A :prop_sf:`VS_DEPLOYMENT_CONTENT` source file property was added + to tell the Visual Studio generators to mark content for deployment + in Windows Phone and Windows Store projects. + +* The Visual Studio generators learned to treat ``.hlsl`` source + files as High Level Shading Language sources (using ``FXCompile`` + in ``.vcxproj`` files). A :prop_sf:`VS_SHADER_TYPE` source file + property was added to specify the Shader Type. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fe770e163daf005cd151798c18b89ad50c17125 commit 6fe770e163daf005cd151798c18b89ad50c17125 Author: Brad King AuthorDate: Tue Jul 29 14:48:20 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:08:49 2014 -0400 VS: Add a source file property to set the hlsl shader type Create a VS_SHADER_TYPE source file property. Inspired-by: Gilles Khouzam diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 3b7436a..81b00fa 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -288,6 +288,7 @@ Properties on Source Files /prop_sf/OBJECT_OUTPUTS /prop_sf/SYMBOLIC /prop_sf/VS_DEPLOYMENT_CONTENT + /prop_sf/VS_SHADER_TYPE /prop_sf/WRAP_EXCLUDE /prop_sf/XCODE_EXPLICIT_FILE_TYPE /prop_sf/XCODE_LAST_KNOWN_FILE_TYPE diff --git a/Help/prop_sf/VS_SHADER_TYPE.rst b/Help/prop_sf/VS_SHADER_TYPE.rst new file mode 100644 index 0000000..6880256 --- /dev/null +++ b/Help/prop_sf/VS_SHADER_TYPE.rst @@ -0,0 +1,4 @@ +VS_SHADER_TYPE +-------------- + +Set the VS shader type of a ``.hlsl`` source file. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 01a3b37..6989c51 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1020,11 +1020,22 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { bool toolHasSettings = false; std::string tool = "None"; + std::string shaderType; std::string const& ext = sf->GetExtension(); if(ext == "appxmanifest") { tool = "AppxManifest"; } + else if(ext == "hlsl") + { + tool = "FXCompile"; + // Figure out the type of shader compiler to use. + if(const char* st = sf->GetProperty("VS_SHADER_TYPE")) + { + shaderType = st; + toolHasSettings = true; + } + } else if(ext == "jpg" || ext == "png") { @@ -1078,6 +1089,12 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) } } } + if(!shaderType.empty()) + { + this->WriteString("", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(shaderType) + << "\n"; + } this->WriteString("BuildFileStream) << tool << ">\n"; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b4dc2ad4a82b233520015fdc5cbf5df1ed540f7 commit 9b4dc2ad4a82b233520015fdc5cbf5df1ed540f7 Author: Brad King AuthorDate: Tue Jul 29 14:03:35 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:08:47 2014 -0400 VS: Add a source file property to mark content for Windows App deployment Create a VS_DEPLOYMENT_CONTENT source file property, supporting generator expressions, to compute whether a source file should be marked as DeploymentContent or ExcludedFromBuild in Windows Phone and Windows Store projects. Inspired-by: Minmin Gong diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 17dadc2..3b7436a 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -287,6 +287,7 @@ Properties on Source Files /prop_sf/OBJECT_DEPENDS /prop_sf/OBJECT_OUTPUTS /prop_sf/SYMBOLIC + /prop_sf/VS_DEPLOYMENT_CONTENT /prop_sf/WRAP_EXCLUDE /prop_sf/XCODE_EXPLICIT_FILE_TYPE /prop_sf/XCODE_LAST_KNOWN_FILE_TYPE diff --git a/Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst b/Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst new file mode 100644 index 0000000..9fb3ba3 --- /dev/null +++ b/Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst @@ -0,0 +1,11 @@ +VS_DEPLOYMENT_CONTENT +--------------------- + +Mark a source file as content for deployment with a Windows Phone or +Windows Store application when built with a Visual Studio generator. +The value must evaluate to either ``1`` or ``0`` and may use +:manual:`generator expressions ` +to make the choice based on the build configuration. +The ``.vcxproj`` file entry for the source file will be +marked either ``DeploymentContent`` or ``ExcludedFromBuild`` +for values ``1`` and ``0``, respectively. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 3dadd52..01a3b37 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1035,10 +1035,50 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) tool = "XML"; } + std::string deployContent; + if(this->GlobalGenerator->TargetsWindowsPhone() || + this->GlobalGenerator->TargetsWindowsStore()) + { + const char* content = sf->GetProperty("VS_DEPLOYMENT_CONTENT"); + if(content && *content) + { + toolHasSettings = true; + deployContent = content; + } + } + if(toolHasSettings) { this->WriteSource(tool, sf, ">\n"); + if(!deployContent.empty()) + { + std::vector const* configs = + this->GlobalGenerator->GetConfigurations(); + cmGeneratorExpression ge; + cmsys::auto_ptr cge = + ge.Parse(deployContent); + for(size_t i = 0; i != configs->size(); ++i) + { + if(0 == strcmp(cge->Evaluate(this->Makefile, (*configs)[i]), "1")) + { + this->WriteString("BuildFileStream) << (*configs)[i] << "|" + << this->Platform << "'\">true"; + this->WriteString("\n", 0); + } + else + { + this->WriteString("BuildFileStream) << (*configs)[i] << "|" + << this->Platform << "'\">true"; + this->WriteString("\n", 0); + } + } + } + this->WriteString("BuildFileStream) << tool << ">\n"; } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f063a914c649b1dfbcd1a02d381b4e94ad01ceaa commit f063a914c649b1dfbcd1a02d381b4e94ad01ceaa Author: Brad King AuthorDate: Tue Jul 29 14:41:03 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:08:44 2014 -0400 VS: Re-arrange WriteExtraSource to support tool configuration Add a code path to write the tool open and close elements separately so that we can add content in between to configure it. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 1e9e8e8..3dadd52 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1018,6 +1018,7 @@ void cmVisualStudio10TargetGenerator::WriteHeaderSource(cmSourceFile const* sf) void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { + bool toolHasSettings = false; std::string tool = "None"; std::string const& ext = sf->GetExtension(); if(ext == "appxmanifest") @@ -1033,7 +1034,18 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { tool = "XML"; } - this->WriteSource(tool, sf); + + if(toolHasSettings) + { + this->WriteSource(tool, sf, ">\n"); + + this->WriteString("BuildFileStream) << tool << ">\n"; + } + else + { + this->WriteSource(tool, sf); + } } void cmVisualStudio10TargetGenerator::WriteSource( http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2b20110f681d180f12f4c200df1489eeb242d1b2 commit 2b20110f681d180f12f4c200df1489eeb242d1b2 Author: Brad King AuthorDate: Tue Aug 5 15:02:49 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:08:42 2014 -0400 MSVC: Select default standard libraries for ARM platform For Windows ARM targets, only kernel32.lib and user32.lib are standard. diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 9d4aca2..0c2e21b 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -167,13 +167,17 @@ elseif(WINDOWS_PHONE OR WINDOWS_STORE) set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc") if(WINDOWS_PHONE) set(CMAKE_C_STANDARD_LIBRARIES_INIT "WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib") + elseif(MSVC_C_ARCHITECTURE_ID STREQUAL ARM OR MSVC_CXX_ARCHITECTURE_ID STREQUAL ARM) + set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib") else() set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib") endif() else() set(_PLATFORM_DEFINES "/DWIN32") - if(MSVC_VERSION GREATER 1310) + if(MSVC_C_ARCHITECTURE_ID STREQUAL ARM OR MSVC_CXX_ARCHITECTURE_ID STREQUAL ARM) + set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib") + elseif(MSVC_VERSION GREATER 1310) set(_RTC1 "/RTC1") set(_FLAGS_CXX " /GR /EHsc") set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib") http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2dfcf0ed079119cb25f6520100083270873503f5 commit 2dfcf0ed079119cb25f6520100083270873503f5 Author: Gilles Khouzam AuthorDate: Tue Aug 5 15:00:09 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:08:40 2014 -0400 VS: Fix generation of desktop applications for ARM Add WindowsSDKDesktopARMSupport to the .vcxproj to avoid 'error MSB8022: Compiling Desktop applications for the ARM platform is not supported.' from VS. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 291827a..1e9e8e8 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2133,4 +2133,9 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() "\n", 2); } } + if (this->Platform == "ARM") + { + this->WriteString("true" + "", 2); + } } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbb5a7ee315948b4f16e5c6a549db090e266e51d commit dbb5a7ee315948b4f16e5c6a549db090e266e51d Author: Brad King AuthorDate: Tue Aug 5 14:44:12 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:08:37 2014 -0400 CMakeDetermineCompilerId: Fix detection for VS ARM platform Add WindowsSDKDesktopARMSupport to the compiler id .vcxproj to avoid 'error MSB8022: Compiling Desktop applications for the ARM platform is not supported.' from VS. Inspired-by: Minmin Gong Inspired-by: Gilles Khouzam diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index a780fa6..1fca55d 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -180,6 +180,11 @@ Id flags: ${testflags} else() set(id_system_version "") endif() + if(id_platform STREQUAL ARM) + set(id_WindowsSDKDesktopARMSupport "true") + else() + set(id_WindowsSDKDesktopARMSupport "") + endif() if(CMAKE_VS_WINCE_VERSION) set(id_entrypoint "mainACRTStartup") if("${vs_version}" VERSION_LESS 9) diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index bacbca4..a17d03d 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -12,6 +12,7 @@ Win32Proj @id_system@ @id_system_version@ + @id_WindowsSDKDesktopARMSupport@ ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 10:17:23 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 10:17:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.0.1-1684-g1f8cfc3 Message-ID: <20140812141723.C5241658DA@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 1f8cfc3b5f4bd87216e48c6bf909b59f10b9065e (commit) via 2b20110f681d180f12f4c200df1489eeb242d1b2 (commit) via 2dfcf0ed079119cb25f6520100083270873503f5 (commit) via dbb5a7ee315948b4f16e5c6a549db090e266e51d (commit) from 7365a9fe929c935a194987d3a4a68aff77129a2b (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f8cfc3b5f4bd87216e48c6bf909b59f10b9065e commit 1f8cfc3b5f4bd87216e48c6bf909b59f10b9065e Merge: 7365a9f 2b20110 Author: Brad King AuthorDate: Tue Aug 12 10:17:22 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 12 10:17:22 2014 -0400 Merge topic 'vs-windows-sdk-desktop-arm' 2b20110f MSVC: Select default standard libraries for ARM platform 2dfcf0ed VS: Fix generation of desktop applications for ARM dbb5a7ee CMakeDetermineCompilerId: Fix detection for VS ARM platform ----------------------------------------------------------------------- Summary of changes: Modules/CMakeDetermineCompilerId.cmake | 5 +++++ Modules/CompilerId/VS-10.vcxproj.in | 1 + Modules/Platform/Windows-MSVC.cmake | 6 +++++- Source/cmVisualStudio10TargetGenerator.cxx | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 10:17:39 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 10:17:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4875-g6b923df Message-ID: <20140812141739.DF1C6658E6@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, next has been updated via 6b923df4c355496816aefbe5793d892d4ac907d1 (commit) via 1f8cfc3b5f4bd87216e48c6bf909b59f10b9065e (commit) from 2ba239f0a6fffcb3e165aa3c4dc69893566a071c (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b923df4c355496816aefbe5793d892d4ac907d1 commit 6b923df4c355496816aefbe5793d892d4ac907d1 Merge: 2ba239f 1f8cfc3 Author: Brad King AuthorDate: Tue Aug 12 10:18:59 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:18:59 2014 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 10:20:52 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 10:20:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4881-g561267f Message-ID: <20140812142052.C9ED965A9F@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, next has been updated via 561267f15216de102807a42e043b9aebe1ea5388 (commit) via 962d179d46462ac6fb4c1076f33b69bda65dbbb0 (commit) via 19880cc55d5913c53692b78ca53bbd15360cef50 (commit) via 34729294e5a5c6e23ba1d41127c5ca6f1832596d (commit) via a934a846438beb31d664caf7fc93c965aaf3ca50 (commit) via 9ef7e0863706f629c8e6360ff599003082bca4cf (commit) from 6b923df4c355496816aefbe5793d892d4ac907d1 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=561267f15216de102807a42e043b9aebe1ea5388 commit 561267f15216de102807a42e043b9aebe1ea5388 Merge: 6b923df 962d179 Author: Brad King AuthorDate: Tue Aug 12 10:20:51 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 12 10:20:51 2014 -0400 Merge topic 'vs-masm' into next 962d179d VS: Add test for MASM support 19880cc5 VS: Add MASM support to VS 8 and 9 (#8170, #14984) 34729294 VS: Move internal MasmEnabled member up to VS 7 generator a934a846 VS: Fix ASM_MASM support in VS >= 10 9ef7e086 cmLocalVisualStudio7Generator: Rename local 'lang' var http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=962d179d46462ac6fb4c1076f33b69bda65dbbb0 commit 962d179d46462ac6fb4c1076f33b69bda65dbbb0 Author: Brad King AuthorDate: Thu Aug 7 14:53:57 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:06:36 2014 -0400 VS: Add test for MASM support It is now expected to work with VS >= 8 and MSVC >= 13.0 for i386. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index ca7fcdc..691e503 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1679,6 +1679,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/MFC") endif() + if(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 4 + AND NOT MSVC60 AND NOT CMAKE_GENERATOR MATCHES "Visual Studio [67]( |$)") + ADD_TEST_MACRO(VSMASM VSMASM) + endif() + if(${CMAKE_GENERATOR} MATCHES "Visual Studio") if(NOT MSVC60) ADD_TEST_MACRO(SBCS SBCS) diff --git a/Tests/VSMASM/CMakeLists.txt b/Tests/VSMASM/CMakeLists.txt new file mode 100644 index 0000000..62e818d --- /dev/null +++ b/Tests/VSMASM/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 2.8.12) +project(VSMASM C ASM_MASM) +if(NOT CMAKE_SIZEOF_VOID_P EQUAL 4) + message(FATAL_ERROR "This test works only with i386 architecture.") +endif() +add_executable(VSMASM main.c foo.asm) diff --git a/Tests/VSMASM/foo.asm b/Tests/VSMASM/foo.asm new file mode 100644 index 0000000..2a4519c --- /dev/null +++ b/Tests/VSMASM/foo.asm @@ -0,0 +1,8 @@ +.386 +.model flat, c +.code +foo proc public + mov eax,0 + ret +foo endp +end diff --git a/Tests/VSMASM/main.c b/Tests/VSMASM/main.c new file mode 100644 index 0000000..570ba16 --- /dev/null +++ b/Tests/VSMASM/main.c @@ -0,0 +1,2 @@ +extern int foo(void); +int main(void) { return foo(); } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19880cc55d5913c53692b78ca53bbd15360cef50 commit 19880cc55d5913c53692b78ca53bbd15360cef50 Author: Brad King AuthorDate: Thu Aug 7 15:20:49 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:06:36 2014 -0400 VS: Add MASM support to VS 8 and 9 (#8170, #14984) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 29165f8..d2b2bf7 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -862,6 +862,14 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, } } fout << "/>\n"; // end of IsMasmEnabled() && !this->FortranProject) + { + fout << + "\t\t\t\n" + ; + } tool = "VCCustomBuildTool"; if(this->FortranProject) { @@ -1700,6 +1708,7 @@ bool cmLocalVisualStudio7Generator { aCompilerTool = "VFFortranCompilerTool"; } + std::string const& lang = (*sf)->GetLanguage(); std::string ext = (*sf)->GetExtension(); ext = cmSystemTools::LowerCase(ext); if(ext == "idl") @@ -1727,6 +1736,11 @@ bool cmLocalVisualStudio7Generator aCompilerTool = "VFCustomBuildTool"; } } + if (gg->IsMasmEnabled() && !this->FortranProject && + lang == "ASM_MASM") + { + aCompilerTool = "MASM"; + } for(std::map::const_iterator fci = fcinfo.FileConfigMap.begin(); fci != fcinfo.FileConfigMap.end(); ++fci) @@ -2095,6 +2109,16 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout, << "\t\n" << "\t\tGetPlatformName() << "\"/>\n" << "\t\n"; + if(gg->IsMasmEnabled()) + { + fout << + "\t\n" + "\t\t\n" + "\t\n" + ; + } } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34729294e5a5c6e23ba1d41127c5ca6f1832596d commit 34729294e5a5c6e23ba1d41127c5ca6f1832596d Author: Brad King AuthorDate: Thu Aug 7 12:58:25 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:06:34 2014 -0400 VS: Move internal MasmEnabled member up to VS 7 generator Move the member from cmGlobalVisualStudio10Generator to cmGlobalVisualStudio7Generator to make it useful for earlier versions of VS. Set the member to true only starting with cmGlobalVisualStudio8Generator since we will not implement MASM support for versions less than VS 8. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index c708a08..19aa52c 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -99,7 +99,6 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( "ProductDir", vc10Express, cmSystemTools::KeyWOW64_32); this->SystemIsWindowsPhone = false; this->SystemIsWindowsStore = false; - this->MasmEnabled = false; this->MSBuildCommandInitialized = false; } @@ -257,15 +256,6 @@ void cmGlobalVisualStudio10Generator ::EnableLanguage(std::vectorconst & lang, cmMakefile *mf, bool optional) { - for(std::vector::const_iterator it = lang.begin(); - it != lang.end(); ++it) - { - if(*it == "ASM_MASM") - { - this->MasmEnabled = true; - } - } - cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); } diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 6245b28..11fa954 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -58,9 +58,6 @@ public: /** Is the installed VS an Express edition? */ bool IsExpressEdition() const { return this->ExpressEdition; } - /** Is the Microsoft Assembler enabled? */ - bool IsMasmEnabled() const { return this->MasmEnabled; } - /** The toolset name for the target platform. */ const char* GetPlatformToolset() const; @@ -123,7 +120,6 @@ protected: bool SystemIsWindowsPhone; bool SystemIsWindowsStore; bool ExpressEdition; - bool MasmEnabled; bool UseFolderProperty(); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 3d79357..e312ff1 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -23,6 +23,7 @@ cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator( { this->IntelProjectVersion = 0; this->DevEnvCommandInitialized = false; + this->MasmEnabled = false; if (platformName.empty()) { diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 390b97c..7e3ed23 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -102,6 +102,9 @@ public: virtual void FindMakeProgram(cmMakefile*); + /** Is the Microsoft Assembler enabled? */ + bool IsMasmEnabled() const { return this->MasmEnabled; } + // Encoding for Visual Studio files virtual std::string Encoding(); @@ -173,6 +176,7 @@ protected: // There is one SLN file per project. std::string CurrentProject; std::string PlatformName; + bool MasmEnabled; private: char* IntelProjectVersion; diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 6bfef68..c91730f 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -136,6 +136,14 @@ void cmGlobalVisualStudio8Generator ::EnableLanguage(std::vectorconst & lang, cmMakefile *mf, bool optional) { + for(std::vector::const_iterator it = lang.begin(); + it != lang.end(); ++it) + { + if(*it == "ASM_MASM") + { + this->MasmEnabled = true; + } + } this->AddPlatformDefinitions(mf); cmGlobalVisualStudio7Generator::EnableLanguage(lang, mf, optional); } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a934a846438beb31d664caf7fc93c965aaf3ca50 commit a934a846438beb31d664caf7fc93c965aaf3ca50 Author: Brad King AuthorDate: Thu Aug 7 14:47:43 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:05:20 2014 -0400 VS: Fix ASM_MASM support in VS >= 10 Fix a typo introduced by commit ce511435 (stringapi: Use strings for the languages, 2014-02-03) to check the language name correctly. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 291827a..108a24b 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1123,7 +1123,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources() { tool = "ClCompile"; } - else if (lang == "ASM_NASM" && + else if (lang == "ASM_MASM" && this->GlobalGenerator->IsMasmEnabled()) { tool = "MASM"; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ef7e0863706f629c8e6360ff599003082bca4cf commit 9ef7e0863706f629c8e6360ff599003082bca4cf Author: Brad King AuthorDate: Thu Aug 7 15:18:27 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 10:05:19 2014 -0400 cmLocalVisualStudio7Generator: Rename local 'lang' var In the WriteGroup method, rename the 'lang' var to 'ppLang' since it is specifically for the preprocessor definitions language selection. diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 3ed4a48..29165f8 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1695,7 +1695,7 @@ bool cmLocalVisualStudio7Generator else if(!fcinfo.FileConfigMap.empty()) { const char* aCompilerTool = "VCCLCompilerTool"; - const char* lang = "CXX"; + const char* ppLang = "CXX"; if(this->FortranProject) { aCompilerTool = "VFFortranCompilerTool"; @@ -1713,7 +1713,7 @@ bool cmLocalVisualStudio7Generator if(ext == "rc") { aCompilerTool = "VCResourceCompilerTool"; - lang = "RC"; + ppLang = "RC"; if(this->FortranProject) { aCompilerTool = "VFResourceCompilerTool"; @@ -1763,7 +1763,7 @@ bool cmLocalVisualStudio7Generator fileOptions.OutputFlagMap(fout, "\t\t\t\t\t"); fileOptions.OutputPreprocessorDefinitions(fout, "\t\t\t\t\t", "\n", - lang); + ppLang); } if(!fc.AdditionalDeps.empty()) { ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio10Generator.cxx | 10 ---------- Source/cmGlobalVisualStudio10Generator.h | 4 ---- Source/cmGlobalVisualStudio7Generator.cxx | 1 + Source/cmGlobalVisualStudio7Generator.h | 4 ++++ Source/cmGlobalVisualStudio8Generator.cxx | 8 ++++++++ Source/cmLocalVisualStudio7Generator.cxx | 30 +++++++++++++++++++++++++--- Source/cmVisualStudio10TargetGenerator.cxx | 2 +- Tests/CMakeLists.txt | 5 +++++ Tests/VSMASM/CMakeLists.txt | 6 ++++++ Tests/VSMASM/foo.asm | 8 ++++++++ Tests/VSMASM/main.c | 2 ++ 11 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 Tests/VSMASM/CMakeLists.txt create mode 100644 Tests/VSMASM/foo.asm create mode 100644 Tests/VSMASM/main.c hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 13:58:12 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 13:58:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4883-gd905333 Message-ID: <20140812175812.5BB3965D99@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, next has been updated via d905333fad73754b594872e67e0e979f31a1b0ab (commit) via fbf7a9297571b7e26739009d7026fbe21c3ccbc7 (commit) from 561267f15216de102807a42e043b9aebe1ea5388 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d905333fad73754b594872e67e0e979f31a1b0ab commit d905333fad73754b594872e67e0e979f31a1b0ab Merge: 561267f fbf7a92 Author: Brad King AuthorDate: Tue Aug 12 13:58:11 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 12 13:58:11 2014 -0400 Merge topic 'makefile-assign-escape-octothorpe' into next fbf7a929 Makefile: Handle '#' in COMPILE_OPTIONS (#15070) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fbf7a9297571b7e26739009d7026fbe21c3ccbc7 commit fbf7a9297571b7e26739009d7026fbe21c3ccbc7 Author: Brad King AuthorDate: Tue Aug 12 13:26:03 2014 -0400 Commit: Brad King CommitDate: Tue Aug 12 13:56:21 2014 -0400 Makefile: Handle '#' in COMPILE_OPTIONS (#15070) Teach the Makefile generators to escape '#' characters on the right hand side of variable assignments in flags.make. This is needed for flags like '-Wno-error=#warnings'. Otherwise the make tool treats them as comments and leaves them out of the _FLAGS variable value. Add a case to the CompileOptions test covering '#' in a COMPILE_OPTIONS value, at least on compilers where it is known to be supported. diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 758c8e4..7849d12 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -361,9 +361,13 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags() for(std::set::const_iterator l = languages.begin(); l != languages.end(); ++l) { - *this->FlagFileStream << *l << "_FLAGS = " << this->GetFlags(*l) << "\n\n"; - *this->FlagFileStream << *l << "_DEFINES = " << this->GetDefines(*l) << - "\n\n"; + std::string flags = this->GetFlags(*l); + std::string defines = this->GetDefines(*l); + // Escape comment characters so they do not terminate assignment. + cmSystemTools::ReplaceString(flags, "#", "\\#"); + cmSystemTools::ReplaceString(defines, "#", "\\#"); + *this->FlagFileStream << *l << "_FLAGS = " << flags << "\n\n"; + *this->FlagFileStream << *l << "_DEFINES = " << defines << "\n\n"; } } diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt index 9b6c9c2..05a5f82 100644 --- a/Tests/CompileOptions/CMakeLists.txt +++ b/Tests/CompileOptions/CMakeLists.txt @@ -22,6 +22,12 @@ set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS ${cxx_tests} ) +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|Borland") + set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS + "-DTEST_OCTOTHORPE=\"#\"" + ) +endif() + target_link_libraries(CompileOptions testlib) if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") diff --git a/Tests/CompileOptions/main.cpp b/Tests/CompileOptions/main.cpp index 42f4cca..f3c1355 100644 --- a/Tests/CompileOptions/main.cpp +++ b/Tests/CompileOptions/main.cpp @@ -17,6 +17,9 @@ int main() { return (strcmp(NEEDS_ESCAPE, "E$CAPE") == 0 +#ifdef TEST_OCTOTHORPE + && strcmp(TEST_OCTOTHORPE, "#") == 0 +#endif && strcmp(EXPECTED_C_COMPILER_VERSION, TEST_C_COMPILER_VERSION) == 0 && strcmp(EXPECTED_CXX_COMPILER_VERSION, TEST_CXX_COMPILER_VERSION) == 0 && TEST_C_COMPILER_VERSION_EQUALITY == 1 ----------------------------------------------------------------------- Summary of changes: Source/cmMakefileTargetGenerator.cxx | 10 +++++++--- Tests/CompileOptions/CMakeLists.txt | 6 ++++++ Tests/CompileOptions/main.cpp | 3 +++ 3 files changed, 16 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Aug 12 15:21:16 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 12 Aug 2014 15:21:16 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.0.1-4885-ge0d54b0 Message-ID: <20140812192116.EF0B1674AB@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, next has been updated via e0d54b040c808bc7337e01ade615f01f6497a73b (commit) via e6496b6023a8f3c471e81b1938580d50b52d3222 (commit) from d905333fad73754b594872e67e0e979f31a1b0ab (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0d54b040c808bc7337e01ade615f01f6497a73b commit e0d54b040c808bc7337e01ade615f01f6497a73b Merge: d905333 e6496b6 Author: Brad King AuthorDate: Tue Aug 12 15:21:16 2014 -0400 Commit: CMake Topic Stage CommitDate: Tue Aug 12 15:21:16 2014 -0400 Merge topic 'cpack-ifw-generator' into next e6496b60 CPackIFW: Revise this generator http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6496b6023a8f3c471e81b1938580d50b52d3222 commit e6496b6023a8f3c471e81b1938580d50b52d3222 Author: Konstantin Podsvirov AuthorDate: Tue Aug 12 22:44:02 2014 +0400 Commit: Brad King CommitDate: Tue Aug 12 15:20:59 2014 -0400 CPackIFW: Revise this generator CPack IFW generator updates: - Group now can have script; - Root package (for monolithic or one package installers) can be configured from group. CMake updates: - Native installation (no Unspecified component). diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake index b27cd69..66ec900 100644 --- a/CMakeCPack.cmake +++ b/CMakeCPack.cmake @@ -65,16 +65,9 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") endif() endif() - # default component for IFW - if(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME) - set(_CPACK_IFW_COMPONENT_NAME ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}) - else() - set(_CPACK_IFW_COMPONENT_NAME Unspecified) - endif() - string(TOUPPER ${_CPACK_IFW_COMPONENT_NAME} _CPACK_IFW_COMPONENT_UNAME) - if(${CMAKE_SYSTEM_NAME} MATCHES Windows) - set(_CPACK_IFW_PACKAGE_ICON "set(CPACK_IFW_PACKAGE_ICON \"${CMake_SOURCE_DIR}/Source/QtDialog/CMakeSetup.ico\")") + set(_CPACK_IFW_PACKAGE_ICON + "set(CPACK_IFW_PACKAGE_ICON \"${CMake_SOURCE_DIR}/Source/QtDialog/CMakeSetup.ico\")") if(BUILD_QtDialog) set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/bin/cmake-gui.exe\", \"@StartMenuDir@/CMake (cmake-gui).lnk\");\n") endif() @@ -87,7 +80,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") install(FILES "${CMake_SOURCE_DIR}/Source/QtIFW/cmake.org.html" DESTINATION "." ) - set(_CPACK_IFW_COMPONENT_SCRIPT "set(CPACK_IFW_COMPONENT_${_CPACK_IFW_COMPONENT_UNAME}_SCRIPT \"${CMake_BINARY_DIR}/installscript.qs\")") + set(_CPACK_IFW_PACKAGE_SCRIPT "set(CPACK_IFW_COMPONENT_GROUP_CMAKE_SCRIPT \"${CMake_BINARY_DIR}/installscript.qs\")") endif() if(${CMAKE_SYSTEM_NAME} MATCHES Linux) diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 5127220..57ed4ca 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -32,22 +32,25 @@ endif() include("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL) if(CPACK_GENERATOR MATCHES "IFW") - # Version with QtIFW limitations - set(CPACK_PACKAGE_VERSION "@_CPACK_IFW_PACKAGE_VERSION@") # Installer configuration set(CPACK_IFW_PACKAGE_TITLE "CMake Build Tool") set(CPACK_IFW_PRODUCT_URL "http://www.cmake.org") @_CPACK_IFW_PACKAGE_ICON@ - set(CPACK_IFW_PACKAGE_WINDOW_ICON "@CMake_SOURCE_DIR@/Source/QtDialog/CMakeSetup128.png") - # Enable install default component - set(CPACK_COMPONENTS_ALL "@_CPACK_IFW_COMPONENT_NAME@") - # Component configuration - set(CPACK_COMPONENT_ at _CPACK_IFW_COMPONENT_UNAME@_DISPLAY_NAME "@CPACK_PACKAGE_NAME@") - set(CPACK_COMPONENT_ at _CPACK_IFW_COMPONENT_UNAME@_DESCRIPTION "@CPACK_PACKAGE_DESCRIPTION_SUMMARY@") - # IFW component onfiguration - set(CPACK_IFW_COMPONENT_ at _CPACK_IFW_COMPONENT_UNAME@_NAME "@CPACK_PACKAGE_NAME@") - set(CPACK_IFW_COMPONENT_ at _CPACK_IFW_COMPONENT_UNAME@_LICENSES "@CPACK_PACKAGE_NAME@ Copyright" "@CPACK_RESOURCE_FILE_LICENSE@") - @_CPACK_IFW_COMPONENT_SCRIPT@ + set(CPACK_IFW_PACKAGE_WINDOW_ICON + "@CMake_SOURCE_DIR@/Source/QtDialog/CMakeSetup128.png") + # Package configuration group + set(CPACK_IFW_PACKAGE_GROUP CMake) + # Group configuration + set(CPACK_COMPONENT_GROUP_CMAKE_DISPLAY_NAME + "@CPACK_PACKAGE_NAME@") + set(CPACK_COMPONENT_GROUP_CMAKE_DESCRIPTION + "@CPACK_PACKAGE_DESCRIPTION_SUMMARY@") + # IFW group configuration + set(CPACK_IFW_COMPONENT_GROUP_CMAKE_VERSION + "@_CPACK_IFW_PACKAGE_VERSION@") + set(CPACK_IFW_COMPONENT_GROUP_CMAKE_LICENSES + "@CPACK_PACKAGE_NAME@ Copyright" "@CPACK_RESOURCE_FILE_LICENSE@") + @_CPACK_IFW_PACKAGE_SCRIPT@ endif() if(CPACK_GENERATOR MATCHES "CygwinSource") diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index 29a0047..8463b5d 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -74,6 +74,15 @@ # # You can use predefined variables. # +# .. variable:: CPACK_IFW_PACKAGE_GROUP +# +# The group, which will be used to configure the root package +# +# .. variable:: CPACK_IFW_PACKAGE_NAME +# +# The root package name, which will be used if configuration group is not +# specified +# # Components # """""""""" # @@ -122,11 +131,10 @@ # # :: # -# cpack_ifw_configure_component( -# [COMMON] +# cpack_ifw_configure_component( [COMMON] +# [NAME ] # [VERSION ] # [SCRIPT