From kwrobot at kitware.com Sat Oct 1 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 1 Oct 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1272-g541394f Message-ID: <20161001040108.13101F5DB6@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 541394f30a5cec3eb3745ec72ca2f11712439ac2 (commit) from 8491a539cf316f14abaf70d7be04f8929119e501 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=541394f30a5cec3eb3745ec72ca2f11712439ac2 commit 541394f30a5cec3eb3745ec72ca2f11712439ac2 Author: Kitware Robot AuthorDate: Sat Oct 1 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Sat Oct 1 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 3c36419..3e27338 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 6) -set(CMake_VERSION_PATCH 20160930) +set(CMake_VERSION_PATCH 20161001) #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 Sat Oct 1 08:20:26 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 1 Oct 2016 08:20:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1274-gb73080b Message-ID: <20161001122026.8C667F586F@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 b73080b0c2c663c38c2d118aab1d9f990a4ea535 (commit) via d56f9237d7205cbc2db24fa5fbdc27000454291f (commit) from 541394f30a5cec3eb3745ec72ca2f11712439ac2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b73080b0c2c663c38c2d118aab1d9f990a4ea535 commit b73080b0c2c663c38c2d118aab1d9f990a4ea535 Merge: 541394f d56f923 Author: Brad King AuthorDate: Sat Oct 1 08:20:23 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 1 08:20:23 2016 -0400 Merge topic 'cmake-server-test-wait' d56f9237 Tests: Teach Server test to wait for server exit ----------------------------------------------------------------------- Summary of changes: Tests/Server/server-test.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Sat Oct 1 08:20:29 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 1 Oct 2016 08:20:29 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1276-gb4235b7 Message-ID: <20161001122029.EE4E9F5874@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 b4235b7590554af75ea84a765f82a996ba4de1f8 (commit) via 130784e03938b760353b3d3e46fc1b803a5bbeb3 (commit) from b73080b0c2c663c38c2d118aab1d9f990a4ea535 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b4235b7590554af75ea84a765f82a996ba4de1f8 commit b4235b7590554af75ea84a765f82a996ba4de1f8 Merge: b73080b 130784e Author: Brad King AuthorDate: Sat Oct 1 08:20:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 1 08:20:27 2016 -0400 Merge topic 'add-setup-projects-tests-module' 130784e0 AndroidTestUtilities: Add module to help drive Android device tests ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-modules.7.rst | 1 + Help/module/AndroidTestUtilities.rst | 1 + .../dev/add-android-test-utilities-module.rst | 5 + Modules/AndroidTestUtilities.cmake | 157 ++++++++++++++++++ .../AndroidTestUtilities/PushToAndroidDevice.cmake | 174 ++++++++++++++++++++ .../CMakeLists.txt | 0 .../AndroidTestUtilities/RunCMakeTest.cmake | 20 +++ .../RunCMake/AndroidTestUtilities/SetupTest1.cmake | 17 ++ .../SetupTest1Build-check.cmake | 5 + .../RunCMake/AndroidTestUtilities/SetupTest2.cmake | 30 ++++ .../SetupTest2Build-check.cmake | 7 + .../RunCMake/AndroidTestUtilities/SetupTest3.cmake | 33 ++++ .../SetupTest3Build-check.cmake | 6 + Tests/RunCMake/AndroidTestUtilities/check.cmake | 20 +++ Tests/RunCMake/AndroidTestUtilities/data/a.txt | 1 + .../RunCMake/AndroidTestUtilities/data/proto.proto | 1 + .../AndroidTestUtilities/data/subfolder/b.txt | 1 + .../data/subfolder/protobuffer.p | 1 + .../AndroidTestUtilities/libs/exampleLib.so | 1 + .../AndroidTestUtilities/libs/exampleLib.txt | 1 + Tests/RunCMake/CMakeLists.txt | 1 + 21 files changed, 483 insertions(+) create mode 100644 Help/module/AndroidTestUtilities.rst create mode 100644 Help/release/dev/add-android-test-utilities-module.rst create mode 100644 Modules/AndroidTestUtilities.cmake create mode 100644 Modules/AndroidTestUtilities/PushToAndroidDevice.cmake copy Tests/RunCMake/{Android => AndroidTestUtilities}/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/AndroidTestUtilities/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest1.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest1Build-check.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest2.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest2Build-check.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest3.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest3Build-check.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/check.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/data/a.txt create mode 100644 Tests/RunCMake/AndroidTestUtilities/data/proto.proto create mode 100644 Tests/RunCMake/AndroidTestUtilities/data/subfolder/b.txt create mode 100644 Tests/RunCMake/AndroidTestUtilities/data/subfolder/protobuffer.p create mode 100644 Tests/RunCMake/AndroidTestUtilities/libs/exampleLib.so create mode 100644 Tests/RunCMake/AndroidTestUtilities/libs/exampleLib.txt hooks/post-receive -- CMake From brad.king at kitware.com Sat Oct 1 08:20:32 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 1 Oct 2016 08:20:32 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1278-gde486a6 Message-ID: <20161001122032.CD938F58CF@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 de486a68950677512f33ce832e80ab334b501a61 (commit) via 50b27de4219e2afa665f31a505439e6b9526bb02 (commit) from b4235b7590554af75ea84a765f82a996ba4de1f8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de486a68950677512f33ce832e80ab334b501a61 commit de486a68950677512f33ce832e80ab334b501a61 Merge: b4235b7 50b27de Author: Brad King AuthorDate: Sat Oct 1 08:20:30 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 1 08:20:30 2016 -0400 Merge topic 'aux_source_directory-sort' 50b27de4 aux_source_directory: Sort results to make it deterministic ----------------------------------------------------------------------- Summary of changes: Source/cmAuxSourceDirectoryCommand.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Oct 1 08:20:36 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 1 Oct 2016 08:20:36 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1281-g8202816 Message-ID: <20161001122036.493EEF58AE@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 8202816a36ec010b13ac212ca2efdf958828fb84 (commit) via bcafc399c581974c21631275adc2bba3e0e7d535 (commit) via 98b11f252c821e60da6492b2f27a84c68d6f2a2b (commit) from de486a68950677512f33ce832e80ab334b501a61 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8202816a36ec010b13ac212ca2efdf958828fb84 commit 8202816a36ec010b13ac212ca2efdf958828fb84 Merge: de486a6 bcafc39 Author: Brad King AuthorDate: Sat Oct 1 08:20:33 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 1 08:20:33 2016 -0400 Merge topic 'autogen-empty-qrc' bcafc399 QtAutogen: Add test for empty qrc file 98b11f25 QtAutogen: Allow .qrc files that do not contain any file reference ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutoGeneratorInitializer.cxx | 67 ++++++++++---------- Tests/QtAutogen/CMakeLists.txt | 6 ++ Tests/QtAutogen/{rcconly.cpp => rcc_empty.cpp} | 4 +- .../{sameName/data.qrc => rcc_empty_resource.qrc} | 1 - 4 files changed, 41 insertions(+), 37 deletions(-) copy Tests/QtAutogen/{rcconly.cpp => rcc_empty.cpp} (50%) copy Tests/QtAutogen/{sameName/data.qrc => rcc_empty_resource.qrc} (73%) hooks/post-receive -- CMake From brad.king at kitware.com Sat Oct 1 08:20:39 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 1 Oct 2016 08:20:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1283-gf564e4a Message-ID: <20161001122039.22A86F58CA@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 f564e4ab01d05fa1920c341ee852cb10a056d6ef (commit) via a189d019dd2cc3a56fc57ae1162b752ff0811551 (commit) from 8202816a36ec010b13ac212ca2efdf958828fb84 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f564e4ab01d05fa1920c341ee852cb10a056d6ef commit f564e4ab01d05fa1920c341ee852cb10a056d6ef Merge: 8202816 a189d01 Author: Brad King AuthorDate: Sat Oct 1 08:20:36 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 1 08:20:36 2016 -0400 Merge topic 'autogen-fix-cmake-error' a189d019 QtAutogen: Use cmSystemTools::Error instead of std::cerr ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutoGeneratorInitializer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Oct 1 08:20:42 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 1 Oct 2016 08:20:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1285-g38a4e58 Message-ID: <20161001122042.291B4F58AE@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 38a4e5883f1503cdde2f32c6dd1074d6386d3e4f (commit) via 27c51865eb44c33049a3759cbc90abaeb4105660 (commit) from f564e4ab01d05fa1920c341ee852cb10a056d6ef (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38a4e5883f1503cdde2f32c6dd1074d6386d3e4f commit 38a4e5883f1503cdde2f32c6dd1074d6386d3e4f Merge: f564e4a 27c5186 Author: Brad King AuthorDate: Sat Oct 1 08:20:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 1 08:20:39 2016 -0400 Merge topic 'doc-compilers-dropped' 27c51865 Help: Add release note about compilers that no longer build CMake itself ----------------------------------------------------------------------- Summary of changes: Help/release/dev/doc-compilers-dropped.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Help/release/dev/doc-compilers-dropped.rst hooks/post-receive -- CMake From brad.king at kitware.com Sat Oct 1 08:20:45 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 1 Oct 2016 08:20:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1287-g9921b2f Message-ID: <20161001122045.24C8EF58C9@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 9921b2f8c897d6981e9003353962529d0d52f580 (commit) via 39c898a107269a488b9dcb72bf99c545ab35e54c (commit) from 38a4e5883f1503cdde2f32c6dd1074d6386d3e4f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9921b2f8c897d6981e9003353962529d0d52f580 commit 9921b2f8c897d6981e9003353962529d0d52f580 Merge: 38a4e58 39c898a Author: Brad King AuthorDate: Sat Oct 1 08:20:43 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 1 08:20:43 2016 -0400 Merge topic 'doc-cmake-A-link' 39c898a1 Help: Clarify that `cmake -A` option sets VS IDE target architecture ----------------------------------------------------------------------- Summary of changes: Help/generator/Visual Studio 10 2010.rst | 2 +- Help/generator/Visual Studio 11 2012.rst | 2 +- Help/generator/Visual Studio 12 2013.rst | 2 +- Help/generator/Visual Studio 14 2015.rst | 2 +- Help/generator/Visual Studio 15.rst | 2 +- Help/manual/OPTIONS_BUILD.txt | 8 +++++--- 6 files changed, 10 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Oct 1 08:21:58 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 1 Oct 2016 08:21:58 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2679-gf175f46 Message-ID: <20161001122158.B562BF58F2@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 f175f4656bcc2cbcd7637d2adc4832936e384344 (commit) via 9921b2f8c897d6981e9003353962529d0d52f580 (commit) via 38a4e5883f1503cdde2f32c6dd1074d6386d3e4f (commit) via f564e4ab01d05fa1920c341ee852cb10a056d6ef (commit) via 8202816a36ec010b13ac212ca2efdf958828fb84 (commit) via de486a68950677512f33ce832e80ab334b501a61 (commit) via b4235b7590554af75ea84a765f82a996ba4de1f8 (commit) via b73080b0c2c663c38c2d118aab1d9f990a4ea535 (commit) via 541394f30a5cec3eb3745ec72ca2f11712439ac2 (commit) from 75d86bdf8a9e3eb9f72a832dbe45be05b7e2c341 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f175f4656bcc2cbcd7637d2adc4832936e384344 commit f175f4656bcc2cbcd7637d2adc4832936e384344 Merge: 75d86bd 9921b2f Author: Brad King AuthorDate: Sat Oct 1 08:21:27 2016 -0400 Commit: Brad King CommitDate: Sat Oct 1 08:21:27 2016 -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 Sat Oct 1 08:25:06 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 1 Oct 2016 08:25:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2681-g74665a9 Message-ID: <20161001122506.D868EF5B53@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 74665a9d1de70d2f7f0888a84472cd0e36402b7e (commit) via 1b43f9d12dc3d605056fcb8af442b8f0d07ff901 (commit) from f175f4656bcc2cbcd7637d2adc4832936e384344 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74665a9d1de70d2f7f0888a84472cd0e36402b7e commit 74665a9d1de70d2f7f0888a84472cd0e36402b7e Merge: f175f46 1b43f9d Author: Brad King AuthorDate: Sat Oct 1 08:25:06 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 1 08:25:06 2016 -0400 Merge topic 'cmake-server-teardown-file-monitor' into next 1b43f9d1 cmake-server: Stop the file monitor on client disconnect https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1b43f9d12dc3d605056fcb8af442b8f0d07ff901 commit 1b43f9d12dc3d605056fcb8af442b8f0d07ff901 Author: Brad King AuthorDate: Fri Sep 30 15:01:29 2016 -0400 Commit: Brad King CommitDate: Fri Sep 30 15:05:42 2016 -0400 cmake-server: Stop the file monitor on client disconnect When the client disconnects we need to remove all events from our loop. Prior to the introduction of the file monitor we only needed to remove the client pipes. Now we need to remove the file monitor events too. Without this the event loop may continue to block on file monitor events. If one does eventually come in then the event handler may try to report it to the disconnected client and crash because our internal structures for writing to the client have been freed. This addresses a failure of the `Server` test on some machines. diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx index c62ca3c..c9822d3 100644 --- a/Source/cmServerConnection.cxx +++ b/Source/cmServerConnection.cxx @@ -164,6 +164,7 @@ void cmServerConnection::ReadData(const std::string& data) void cmServerConnection::HandleEof() { + this->FileMonitor()->StopMonitoring(); this->TearDown(); } ----------------------------------------------------------------------- Summary of changes: Source/cmServerConnection.cxx | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Sat Oct 1 08:25:40 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 1 Oct 2016 08:25:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2684-g91e2236 Message-ID: <20161001122540.DDF8EF5B7F@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 91e2236d803f28c3de15b6387b388abd5c3055e8 (commit) via 64e63da0d17e000343b324f2d7ebadbd484f0860 (commit) via e82c33b88c566cd5388f4ce26a1d82b3ecafcc12 (commit) from 74665a9d1de70d2f7f0888a84472cd0e36402b7e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=91e2236d803f28c3de15b6387b388abd5c3055e8 commit 91e2236d803f28c3de15b6387b388abd5c3055e8 Merge: 74665a9 64e63da Author: Brad King AuthorDate: Sat Oct 1 08:25:38 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 1 08:25:38 2016 -0400 Merge topic 'doc-3.7-relnotes' into next 64e63da0 Help: Organize and revise 3.7 release notes e82c33b8 Help: Consolidate 3.7 release notes https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64e63da0d17e000343b324f2d7ebadbd484f0860 commit 64e63da0d17e000343b324f2d7ebadbd484f0860 Author: Brad King AuthorDate: Thu Sep 29 08:46:35 2016 -0400 Commit: Brad King CommitDate: Sat Oct 1 08:25:17 2016 -0400 Help: Organize and revise 3.7 release notes Add section headers similar to the 3.6 release notes and move each individual bullet into an appropriate section. Revise a few bullets. diff --git a/Help/release/3.7.rst b/Help/release/3.7.rst index 1152188..97c6f7c 100644 --- a/Help/release/3.7.rst +++ b/Help/release/3.7.rst @@ -7,78 +7,118 @@ CMake 3.7 Release Notes Changes made since CMake 3.6 include the following. -* The :command:`install` command gained an ``EXPORT_ANDROID_MK`` - subcommand to install ``Android.mk`` files referencing installed - libraries as prebuilts for the Android NDK build system. - -* The :command:`export` command gained an ``ANDROID_MK`` option - to generate ``Android.mk`` files referencing CMake-built - libraries as prebuilts for the Android NDK build system. - -* A :module:`AndroidTestUtilities` module was added to manage transfer of - test data to an Android device. - -* The :command:`if` command gained new boolean comparison operations - ``LESS_EQUAL``, ``GREATER_EQUAL``, ``STRLESS_EQUAL``, ``STRGREATER_EQUAL``, - ``VERSION_LESS_EQUAL``, and ``VERSION_GREATER_EQUAL``. +New Features +============ -* The Clang compiler is now supported on AIX. +Platforms +--------- * CMake now supports :ref:`Cross Compiling for Android` with simple toolchain files. -* On Apple platforms the :prop_tgt:`BUNDLE_EXTENSION` now also applies to - Frameworks and App Bundles. - -* The :module:`FindBZip2` module now provides imported targets. +* The Clang compiler is now supported on AIX. -* :manual:`ccmake(1)` learned to support vim-like navigation bindings. +Generators +---------- -* The :module:`CheckFortranSourceCompiles` module macro - ``CHECK_Fortran_SOURCE_COMPILES`` gained a ``SRC_EXT`` option - to specify a custom test Fortran source file extension. +* The :generator:`Ninja` generator learned to conditionally support + Fortran when using a ``ninja`` tool that has the necessary features. + See generator documentation for details. -* :manual:`cmake(1)` gained a ``-E capabilities`` option to provide a - machine-readable (JSON) description of the capabilities of the - cmake tool (available generators, etc.). +* The :generator:`Ninja` generator learned to produce phony targets + of the form ``sub/dir/{test,install,package}`` to drive the build + of a subdirectory installation, test or packaging target. + This is equivalent to ``cd sub/dir; make {test,install,package}`` + with :ref:`Makefile Generators`. -* :manual:`cmake-gui(1)` gained a button to open the generated project file - for :ref:`Visual Studio Generators` and the :generator:`Xcode` generator. +* The :generator:`Visual Studio 15` generator was added. This is + experimental and based on Preview 4 because this version of VS + has not been released. -* A new :manual:`cmake-server(7)` mode was added to provide semantic - information about a CMake-generated buildsystem to clients through - a JSON protocol. +* :ref:`Visual Studio Generators` for VS 2010 and above learned to + place ``.natvis`` source files into VS project files properly. -* The :manual:`cmake(1)` command learned a ``--trace-source=`` option. +* The :generator:`Xcode` generator's rudimentary Swift language support + learned to honor a new :variable:`CMAKE_Swift_LANGUAGE_VERSION` variable + to tell Xcode what version of Swift is used by the source. * The :generator:`CodeLite` generator gained a new :variable:`CMAKE_CODELITE_USE_TARGETS` option to change project creation from projects to targets. -* The :module:`CPackDeb` module learned to support long file names - when archive format is set to GNU tar. - See :variable:`CPACK_DEBIAN_ARCHIVE_TYPE` +Commands +-------- -* CPack gained a new :variable:`CPACK_PACKAGE_CHECKSUM` variable to - enable generation of a checksum file for each package file. +* The :command:`add_custom_command` command gained a new ``DEPFILE`` + option that works with the :generator:`Ninja` generator to provide + implicit dependency information to the build tool. -* The :module:`CPackRPM` module learned to generate debuginfo - packages on demand. See :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` - and its per component version. +* The :command:`cmake_parse_arguments` command gained a new ``PARSE_ARGV`` + mode to read arguments directly from ``ARGC`` and ``ARGV#`` + variables inside a :command:`function` body. -* The :module:`CPackRPM` module learned to generate source rpm - (SRPM) packages on demand. See :variable:`CPACK_RPM_PACKAGE_SOURCES`, - :variable:`CPACK_RPM_SOURCE_PKG_BUILD_PARAMS` and - :variable:`CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX`. +* The :command:`export` command gained an ``ANDROID_MK`` option + to generate ``Android.mk`` files referencing CMake-built + libraries as prebuilts for the Android NDK build system. -* The :command:`ctest_configure`, :command:`ctest_build`, - :command:`ctest_test`, :command:`ctest_coverage`, and :command:`ctest_upload` - commands gained a new ``CAPTURE_CMAKE_ERROR`` option to capture any errors - that occur as the commands run into a variable and avoid affecting the return - code of the :manual:`ctest(1)` process. +* The :command:`file(DOWNLOAD)` and :command:`file(UPLOAD)` commands gained + ``HTTPHEADER `` and ``USERPWD :`` options. -* A :prop_dir:`SOURCE_DIR` directory property was added to get the - absolute path to the source directory associated with a directory. +* The :command:`find_library` and :command:`find_package` commands learned + to search in ``lib32/`` directories when the build targets a 32-bit + architecture. See the :prop_gbl:`FIND_LIBRARY_USE_LIB32_PATHS` global + property. + +* The :command:`find_package` command gained the possibility of + sorting compatible libraries by ``NAME`` or by ``NATURAL`` sorting by + setting the two new variables :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` + and :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION`. + +* The :command:`if` command gained new boolean comparison operations + ``LESS_EQUAL``, ``GREATER_EQUAL``, ``STRLESS_EQUAL``, ``STRGREATER_EQUAL``, + ``VERSION_LESS_EQUAL``, and ``VERSION_GREATER_EQUAL``. + +* The :command:`install` command gained an ``EXPORT_ANDROID_MK`` + subcommand to install ``Android.mk`` files referencing installed + libraries as prebuilts for the Android NDK build system. + +* The :command:`string(TIMESTAMP)` and :command:`file(TIMESTAMP)` + commands gained support for the ``%a`` and ``%b`` placeholders. + These are the abbreviated weekday and month names. + +* The :command:`try_compile` command source file signature now honors + configuration-specific flags (e.g. :variable:`CMAKE__FLAGS_DEBUG`) + in the generated test project. Previously only the default such flags + for the current toolchain were used. See policy :policy:`CMP0066`. + +Variables +--------- + +* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` was added to control + the sorting mode of the :command:`find_package` command. + +* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION` was added to control + the sorting direction the :command:`find_package` command. + +* :variable:`Toolchain files ` may now set a + :variable:`CMAKE__FLAGS_INIT` variable to initialize the + :variable:`CMAKE__FLAGS` cache entry the first time a language is + enabled in a build tree. + +* :variable:`Toolchain files ` may now set + :variable:`CMAKE_EXE_LINKER_FLAGS_INIT`, + :variable:`CMAKE_SHARED_LINKER_FLAGS_INIT`, and + :variable:`CMAKE_MODULE_LINKER_FLAGS_INIT` variables to initialize the + :variable:`CMAKE_EXE_LINKER_FLAGS`, + :variable:`CMAKE_SHARED_LINKER_FLAGS`, and + :variable:`CMAKE_MODULE_LINKER_FLAGS` cache entries the first time + a language is enabled in a build tree. + +Properties +---------- + +* On Apple platforms the :prop_tgt:`BUNDLE_EXTENSION` target property + now also applies to Frameworks and App Bundles. * A :prop_dir:`BINARY_DIR` directory property was added to get the absolute path to the binary directory corresponding to the source @@ -88,19 +128,39 @@ Changes made since CMake 3.6 include the following. get the list of logical buildsystem target names added by the project in a directory. +* A :prop_tgt:`LINK_WHAT_YOU_USE` target property and supporting + :variable:`CMAKE_LINK_WHAT_YOU_USE` variable were introduced + to detect (on UNIX) shared libraries that are linked but not + needed by running ``ldd -r -u``. + +* A :prop_dir:`SOURCE_DIR` directory property was added to get the + absolute path to the source directory associated with a directory. + * A :prop_dir:`SUBDIRECTORIES` directory property was added to get the list of subdirectories added by a project in a directory. -* Support for building CMake itself with some compilers was dropped: +* A :prop_tgt:`VS_SDK_REFERENCES` target property was added to tell + :ref:`Visual Studio Generators` to reference the named SDKs. - * Visual Studio 7.1 and 2005 -- superseded by VS 2008 and above - * MinGW.org mingw32 -- superseded by MSYS2 mingw32 and mingw64 +* A :prop_sf:`VS_TOOL_OVERRIDE` source file property was created to tell + :ref:`Visual Studio Generators` what tool to use for a source file. - CMake still supports generating build systems for other projects using - these compilers. +* The :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property now applies + to executable targets with the :prop_tgt:`ENABLE_EXPORTS` property set. -* We no longer provide Linux i386 binaries for download from ``cmake.org`` - for new versions of CMake. +* A :prop_sf:`XCODE_FILE_ATTRIBUTES` source file property was + added to tell the :generator:`Xcode` generator to generate + custom content in the Xcode project attributes for the file. + +Modules +------- + +* An :module:`AndroidTestUtilities` module was added to manage transfer + of test data to an Android device. + +* The :module:`CheckFortranSourceCompiles` module macro + ``CHECK_Fortran_SOURCE_COMPILES`` gained a ``SRC_EXT`` option + to specify a custom test Fortran source file extension. * The :module:`ExternalProject` module gained ``HTTP_USERNAME`` and ``HTTP_PASSWORD`` options to set http download credentials. @@ -108,23 +168,14 @@ Changes made since CMake 3.6 include the following. * The :module:`ExternalProject` module gained a ``HTTP_HEADER`` option to add http download headers. -* The :command:`file(DOWNLOAD)` and :command:`file(UPLOAD)` commands - gained a ``HTTPHEADER `` option. - -* The :command:`file(DOWNLOAD)` and :command:`file(UPLOAD)` commands - gained a ``USERPWD :`` option. - * The :module:`FindBISON` module ``BISON_TARGET`` macro learned a new ``REPORT_FILE`` option to specify the bison ``--report-file=`` option. +* The :module:`FindBZip2` module now provides imported targets. + * A :module:`FindICU` module was introduced to find the International Components for Unicode (ICU) libraries and programs. -* The :command:`find_library` and :command:`find_package` commands learned - to search in ``lib32/`` directories when the build targets a 32-bit - architecture. See the :prop_gbl:`FIND_LIBRARY_USE_LIB32_PATHS` global - property. - * The :module:`FindMatlab` module learned to find a SIMULINK component. * The :module:`FindOpenCL` module now provides imported targets. @@ -132,24 +183,8 @@ Changes made since CMake 3.6 include the following. * The :module:`FindOpenMP` module learned to detect the OpenMP version (specification date) from the compiler. -* The :command:`find_package` command gained the possibility of - sorting compatible libraries by ``NAME`` or by ``NATURAL`` sorting by - setting the two new variables :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` - and :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION`. - -* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` was added to control - the sorting mode of the :command:`find_package` command. - -* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION` was added to control - the sorting direction the :command:`find_package` command. - * A :module:`FindVulkan` module was added. -* The Fortran dependency scanner learned to support the syntax of - `Fortran Submodules`_. - -.. _`Fortran Submodules`: http://fortranwiki.org/fortran/show/Submodules - * The :module:`GenerateExportHeader` module learned a new ``CUSTOM_CONTENT_FROM_VARIABLE`` option to specify a variable containing custom content for inclusion in the generated header. @@ -157,44 +192,12 @@ Changes made since CMake 3.6 include the following. * The :module:`GNUInstallDirs` module gained a new :command:`GNUInstallDirs_get_absolute_install_dir` command. -* The :module:`CPackIFW` module gained a new - :command:`cpack_ifw_add_package_resources` command to include additional - resources in the installer binary. - -* The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and - :command:`cpack_ifw_configure_component_group` commands gained a new - ``USER_INTERFACES`` option to add a list of additonal pages to the IFW - installer. - * The :module:`UseJava` module gained APIs to "export" jar targets for use by external CMake projects. See the ``install_jar_exports`` and ``export_jars`` functions. -* A :prop_tgt:`LINK_WHAT_YOU_USE` target property and supporting - :variable:`CMAKE_LINK_WHAT_YOU_USE` variable were introduced - to detect (on UNIX) shared libraries that are linked but not - needed by running ``ldd -r -u``. - -* The :command:`add_custom_command` command gained a new ``DEPFILE`` - option that works with the :generator:`Ninja` generator to provide - implicit dependency information to the build tool. - -* The :generator:`Ninja` generator learned to produce phony targets - of the form ``sub/dir/{test,install,package}`` to drive the build - of a subdirectory installation, test or packaging target. - This is equivalent to ``cd sub/dir; make {test,install,package}`` - with :ref:`Makefile Generators`. - -* The :generator:`Ninja` generator learned to conditionally support - Fortran when using a ``ninja`` tool that has the necessary features. - See generator documentation for details. - -* The :command:`cmake_parse_arguments` command gained a new - mode to read arguments directly from ``ARGC`` and ``ARGV#`` - variables inside a :command:`function` body. - -* CPack gained a ``productbuild`` generator on OS X, configured by - the :module:`CPackProductBuild` module. +CTest +----- * CTest now supports test fixtures through the new :prop_test:`FIXTURES_SETUP`, :prop_test:`FIXTURES_CLEANUP` and :prop_test:`FIXTURES_REQUIRED` test @@ -202,51 +205,42 @@ Changes made since CMake 3.6 include the following. the tests to be run, a fixture's setup and cleanup tests will automatically be added to the execution set if any test requires that fixture. -* The :command:`string(TIMESTAMP)` and :command:`file(TIMESTAMP)` - commands gained support for the ``%a`` and ``%b`` placeholders. - These are the abbreviated weekday and month names. - -* :variable:`Toolchain files ` may now set a - :variable:`CMAKE__FLAGS_INIT` variable to initialize the - :variable:`CMAKE__FLAGS` cache entry the first time a language is - enabled in a build tree. - -* :variable:`Toolchain files ` may now set - :variable:`CMAKE_EXE_LINKER_FLAGS_INIT`, - :variable:`CMAKE_SHARED_LINKER_FLAGS_INIT`, and - :variable:`CMAKE_MODULE_LINKER_FLAGS_INIT` variables to initialize the - :variable:`CMAKE_EXE_LINKER_FLAGS`, - :variable:`CMAKE_SHARED_LINKER_FLAGS`, and - :variable:`CMAKE_MODULE_LINKER_FLAGS` cache entries the first time - a language is enabled in a build tree. - -* The :command:`try_compile` command source file signature now honors - configuration-specific flags (e.g. :variable:`CMAKE__FLAGS_DEBUG`) - in the generated test project. Previously only the default such flags - for the current toolchain were used. See policy :policy:`CMP0066`. +* The :command:`ctest_configure`, :command:`ctest_build`, + :command:`ctest_test`, :command:`ctest_coverage`, and :command:`ctest_upload` + commands gained a new ``CAPTURE_CMAKE_ERROR`` option to capture any errors + that occur as the commands run into a variable and avoid affecting the return + code of the :manual:`ctest(1)` process. -* Vim support files ``indent/cmake.vim`` and ``syntax/cmake.vim`` - from the `vim-cmake-syntax`_ project are now distributed with CMake. +CPack +----- -* Vim support files ``cmake-indent.vim``, ``cmake-syntax.vim``, and - ``cmake-help.vim`` have been removed in favor of the files now provided - from the `vim-cmake-syntax`_ project. +* CPack gained a ``productbuild`` generator on OS X, configured by + the :module:`CPackProductBuild` module. -.. _`vim-cmake-syntax`: https://github.com/pboettch/vim-cmake-syntax +* CPack gained a new :variable:`CPACK_PACKAGE_CHECKSUM` variable to + enable generation of a checksum file for each package file. -* The :generator:`Visual Studio 15` generator was added. +* The :module:`CPackDeb` module learned to support long file names + when archive format is set to GNU tar. + See :variable:`CPACK_DEBIAN_ARCHIVE_TYPE` -* :ref:`Visual Studio Generators` for VS 2010 and above learned to - place ``.natvis`` source files into VS project files properly. +* The :module:`CPackIFW` module gained a new + :command:`cpack_ifw_add_package_resources` command to include additional + resources in the installer binary. -* A :prop_tgt:`VS_SDK_REFERENCES` target property was added to tell - :ref:`Visual Studio Generators` to reference the named SDKs. +* The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and + :command:`cpack_ifw_configure_component_group` commands gained a new + ``USER_INTERFACES`` option to add a list of additonal pages to the IFW + installer. -* A :prop_sf:`VS_TOOL_OVERRIDE` source file property was created to tell - :ref:`Visual Studio Generators` what tool to use for a source file. +* The :module:`CPackRPM` module learned to generate debuginfo + packages on demand. See :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` + and its per component version. -* The :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property now applies - to executable targets with the :prop_tgt:`ENABLE_EXPORTS` property set. +* The :module:`CPackRPM` module learned to generate source rpm + (SRPM) packages on demand. See :variable:`CPACK_RPM_PACKAGE_SOURCES`, + :variable:`CPACK_RPM_SOURCE_PKG_BUILD_PARAMS` and + :variable:`CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX`. * The CPack WIX generator now supports :variable:`CPACK_WIX_SKIP_PROGRAM_FOLDER` to allow specification @@ -257,18 +251,59 @@ Changes made since CMake 3.6 include the following. :variable:`CPACK_COMPONENT__DISABLED`. This can be used to deselect a component from being installed by default. -* The CPack WIX generator now supports - CPACK_WIX_PATCH_FILE fragments for Feature elements. +* The CPack WIX generator now supports :variable:`CPACK_WIX_PATCH_FILE` + fragments for Feature elements. * The CPack WIX generator now supports :variable:`CPACK_WIX_ROOT_FEATURE_TITLE` and :variable:`CPACK_WIX_ROOT_FEATURE_DESCRIPTION` to allow the specification of a custom title and description for the root feature element. -* A :prop_sf:`XCODE_FILE_ATTRIBUTES` source file property was - added to tell the :generator:`Xcode` generator to generate - custom content in the Xcode project attributes for the file. +Other +----- -* The :generator:`Xcode` generator's rudimentary Swift language support - learned to honor a new :variable:`CMAKE_Swift_LANGUAGE_VERSION` variable - to tell Xcode what version of Swift is used by the source. +* :manual:`cmake(1)` gained a ``-E capabilities`` option to provide a + machine-readable (JSON) description of the capabilities of the + cmake tool (available generators, etc.). + +* A new :manual:`cmake-server(7)` mode was added to provide semantic + information about a CMake-generated buildsystem to clients through + a JSON protocol. Currently all protocols are experimental and subject + to change. + +* The :manual:`cmake(1)` command learned a ``--trace-source=`` option. + +* :manual:`ccmake(1)` learned to support vim-like navigation bindings. + +* :manual:`cmake-gui(1)` gained a button to open the generated project file + for :ref:`Visual Studio Generators` and the :generator:`Xcode` generator. + +Deprecated and Removed Features +=============================== + +* We no longer provide Linux i386 binaries for download from ``cmake.org`` + for new versions of CMake. + +* Vim support files ``cmake-indent.vim``, ``cmake-syntax.vim``, and + ``cmake-help.vim`` have been removed in favor of the files now provided + from the `vim-cmake-syntax`_ project. + +* Support for building CMake itself with some compilers was dropped: + + * Visual Studio 7.1 and 2005 -- superseded by VS 2008 and above + * MinGW.org mingw32 -- superseded by MSYS2 mingw32 and mingw64 + + CMake still supports generating build systems for other projects using + these compilers. + +Other Changes +============= + +* The Fortran dependency scanner learned to support the syntax of + `Fortran Submodules`_. + +* Vim support files ``indent/cmake.vim`` and ``syntax/cmake.vim`` + from the `vim-cmake-syntax`_ project are now distributed with CMake. + +.. _`Fortran Submodules`: http://fortranwiki.org/fortran/show/Submodules +.. _`vim-cmake-syntax`: https://github.com/pboettch/vim-cmake-syntax https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e82c33b88c566cd5388f4ce26a1d82b3ecafcc12 commit e82c33b88c566cd5388f4ce26a1d82b3ecafcc12 Author: Brad King AuthorDate: Thu Sep 29 08:19:46 2016 -0400 Commit: Brad King CommitDate: Sat Oct 1 08:25:17 2016 -0400 Help: Consolidate 3.7 release notes Move all development release notes into a new version-specific document: tail -q -n +3 Help/release/dev/* > Help/release/3.7.rst git rm -- Help/release/dev/* except the sample topic: git checkout HEAD -- Help/release/dev/0-sample-topic.rst Reference the new document from the release notes index document. Add a title and intro sentence to the new document by hand. diff --git a/Help/release/3.7.rst b/Help/release/3.7.rst new file mode 100644 index 0000000..1152188 --- /dev/null +++ b/Help/release/3.7.rst @@ -0,0 +1,274 @@ +CMake 3.7 Release Notes +*********************** + +.. only:: html + + .. contents:: + +Changes made since CMake 3.6 include the following. + +* The :command:`install` command gained an ``EXPORT_ANDROID_MK`` + subcommand to install ``Android.mk`` files referencing installed + libraries as prebuilts for the Android NDK build system. + +* The :command:`export` command gained an ``ANDROID_MK`` option + to generate ``Android.mk`` files referencing CMake-built + libraries as prebuilts for the Android NDK build system. + +* A :module:`AndroidTestUtilities` module was added to manage transfer of + test data to an Android device. + +* The :command:`if` command gained new boolean comparison operations + ``LESS_EQUAL``, ``GREATER_EQUAL``, ``STRLESS_EQUAL``, ``STRGREATER_EQUAL``, + ``VERSION_LESS_EQUAL``, and ``VERSION_GREATER_EQUAL``. + +* The Clang compiler is now supported on AIX. + +* CMake now supports :ref:`Cross Compiling for Android` with simple + toolchain files. + +* On Apple platforms the :prop_tgt:`BUNDLE_EXTENSION` now also applies to + Frameworks and App Bundles. + +* The :module:`FindBZip2` module now provides imported targets. + +* :manual:`ccmake(1)` learned to support vim-like navigation bindings. + +* The :module:`CheckFortranSourceCompiles` module macro + ``CHECK_Fortran_SOURCE_COMPILES`` gained a ``SRC_EXT`` option + to specify a custom test Fortran source file extension. + +* :manual:`cmake(1)` gained a ``-E capabilities`` option to provide a + machine-readable (JSON) description of the capabilities of the + cmake tool (available generators, etc.). + +* :manual:`cmake-gui(1)` gained a button to open the generated project file + for :ref:`Visual Studio Generators` and the :generator:`Xcode` generator. + +* A new :manual:`cmake-server(7)` mode was added to provide semantic + information about a CMake-generated buildsystem to clients through + a JSON protocol. + +* The :manual:`cmake(1)` command learned a ``--trace-source=`` option. + +* The :generator:`CodeLite` generator gained a new + :variable:`CMAKE_CODELITE_USE_TARGETS` option + to change project creation from projects to targets. + +* The :module:`CPackDeb` module learned to support long file names + when archive format is set to GNU tar. + See :variable:`CPACK_DEBIAN_ARCHIVE_TYPE` + +* CPack gained a new :variable:`CPACK_PACKAGE_CHECKSUM` variable to + enable generation of a checksum file for each package file. + +* The :module:`CPackRPM` module learned to generate debuginfo + packages on demand. See :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` + and its per component version. + +* The :module:`CPackRPM` module learned to generate source rpm + (SRPM) packages on demand. See :variable:`CPACK_RPM_PACKAGE_SOURCES`, + :variable:`CPACK_RPM_SOURCE_PKG_BUILD_PARAMS` and + :variable:`CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX`. + +* The :command:`ctest_configure`, :command:`ctest_build`, + :command:`ctest_test`, :command:`ctest_coverage`, and :command:`ctest_upload` + commands gained a new ``CAPTURE_CMAKE_ERROR`` option to capture any errors + that occur as the commands run into a variable and avoid affecting the return + code of the :manual:`ctest(1)` process. + +* A :prop_dir:`SOURCE_DIR` directory property was added to get the + absolute path to the source directory associated with a directory. + +* A :prop_dir:`BINARY_DIR` directory property was added to get the + absolute path to the binary directory corresponding to the source + directory on which the property is read. + +* A :prop_dir:`BUILDSYSTEM_TARGETS` directory property was added to + get the list of logical buildsystem target names added by the + project in a directory. + +* A :prop_dir:`SUBDIRECTORIES` directory property was added to + get the list of subdirectories added by a project in a directory. + +* Support for building CMake itself with some compilers was dropped: + + * Visual Studio 7.1 and 2005 -- superseded by VS 2008 and above + * MinGW.org mingw32 -- superseded by MSYS2 mingw32 and mingw64 + + CMake still supports generating build systems for other projects using + these compilers. + +* We no longer provide Linux i386 binaries for download from ``cmake.org`` + for new versions of CMake. + +* The :module:`ExternalProject` module gained ``HTTP_USERNAME`` and + ``HTTP_PASSWORD`` options to set http download credentials. + +* The :module:`ExternalProject` module gained a ``HTTP_HEADER`` + option to add http download headers. + +* The :command:`file(DOWNLOAD)` and :command:`file(UPLOAD)` commands + gained a ``HTTPHEADER `` option. + +* The :command:`file(DOWNLOAD)` and :command:`file(UPLOAD)` commands + gained a ``USERPWD :`` option. + +* The :module:`FindBISON` module ``BISON_TARGET`` macro learned a new + ``REPORT_FILE`` option to specify the bison ``--report-file=`` option. + +* A :module:`FindICU` module was introduced to find the International + Components for Unicode (ICU) libraries and programs. + +* The :command:`find_library` and :command:`find_package` commands learned + to search in ``lib32/`` directories when the build targets a 32-bit + architecture. See the :prop_gbl:`FIND_LIBRARY_USE_LIB32_PATHS` global + property. + +* The :module:`FindMatlab` module learned to find a SIMULINK component. + +* The :module:`FindOpenCL` module now provides imported targets. + +* The :module:`FindOpenMP` module learned to detect the OpenMP + version (specification date) from the compiler. + +* The :command:`find_package` command gained the possibility of + sorting compatible libraries by ``NAME`` or by ``NATURAL`` sorting by + setting the two new variables :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` + and :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION`. + +* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` was added to control + the sorting mode of the :command:`find_package` command. + +* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION` was added to control + the sorting direction the :command:`find_package` command. + +* A :module:`FindVulkan` module was added. + +* The Fortran dependency scanner learned to support the syntax of + `Fortran Submodules`_. + +.. _`Fortran Submodules`: http://fortranwiki.org/fortran/show/Submodules + +* The :module:`GenerateExportHeader` module learned a new + ``CUSTOM_CONTENT_FROM_VARIABLE`` option to specify a variable + containing custom content for inclusion in the generated header. + +* The :module:`GNUInstallDirs` module gained a new + :command:`GNUInstallDirs_get_absolute_install_dir` command. + +* The :module:`CPackIFW` module gained a new + :command:`cpack_ifw_add_package_resources` command to include additional + resources in the installer binary. + +* The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and + :command:`cpack_ifw_configure_component_group` commands gained a new + ``USER_INTERFACES`` option to add a list of additonal pages to the IFW + installer. + +* The :module:`UseJava` module gained APIs to "export" jar targets + for use by external CMake projects. See the ``install_jar_exports`` + and ``export_jars`` functions. + +* A :prop_tgt:`LINK_WHAT_YOU_USE` target property and supporting + :variable:`CMAKE_LINK_WHAT_YOU_USE` variable were introduced + to detect (on UNIX) shared libraries that are linked but not + needed by running ``ldd -r -u``. + +* The :command:`add_custom_command` command gained a new ``DEPFILE`` + option that works with the :generator:`Ninja` generator to provide + implicit dependency information to the build tool. + +* The :generator:`Ninja` generator learned to produce phony targets + of the form ``sub/dir/{test,install,package}`` to drive the build + of a subdirectory installation, test or packaging target. + This is equivalent to ``cd sub/dir; make {test,install,package}`` + with :ref:`Makefile Generators`. + +* The :generator:`Ninja` generator learned to conditionally support + Fortran when using a ``ninja`` tool that has the necessary features. + See generator documentation for details. + +* The :command:`cmake_parse_arguments` command gained a new + mode to read arguments directly from ``ARGC`` and ``ARGV#`` + variables inside a :command:`function` body. + +* CPack gained a ``productbuild`` generator on OS X, configured by + the :module:`CPackProductBuild` module. + +* CTest now supports test fixtures through the new :prop_test:`FIXTURES_SETUP`, + :prop_test:`FIXTURES_CLEANUP` and :prop_test:`FIXTURES_REQUIRED` test + properties. When using regular expressions or ``--rerun-failed`` to limit + the tests to be run, a fixture's setup and cleanup tests will automatically + be added to the execution set if any test requires that fixture. + +* The :command:`string(TIMESTAMP)` and :command:`file(TIMESTAMP)` + commands gained support for the ``%a`` and ``%b`` placeholders. + These are the abbreviated weekday and month names. + +* :variable:`Toolchain files ` may now set a + :variable:`CMAKE__FLAGS_INIT` variable to initialize the + :variable:`CMAKE__FLAGS` cache entry the first time a language is + enabled in a build tree. + +* :variable:`Toolchain files ` may now set + :variable:`CMAKE_EXE_LINKER_FLAGS_INIT`, + :variable:`CMAKE_SHARED_LINKER_FLAGS_INIT`, and + :variable:`CMAKE_MODULE_LINKER_FLAGS_INIT` variables to initialize the + :variable:`CMAKE_EXE_LINKER_FLAGS`, + :variable:`CMAKE_SHARED_LINKER_FLAGS`, and + :variable:`CMAKE_MODULE_LINKER_FLAGS` cache entries the first time + a language is enabled in a build tree. + +* The :command:`try_compile` command source file signature now honors + configuration-specific flags (e.g. :variable:`CMAKE__FLAGS_DEBUG`) + in the generated test project. Previously only the default such flags + for the current toolchain were used. See policy :policy:`CMP0066`. + +* Vim support files ``indent/cmake.vim`` and ``syntax/cmake.vim`` + from the `vim-cmake-syntax`_ project are now distributed with CMake. + +* Vim support files ``cmake-indent.vim``, ``cmake-syntax.vim``, and + ``cmake-help.vim`` have been removed in favor of the files now provided + from the `vim-cmake-syntax`_ project. + +.. _`vim-cmake-syntax`: https://github.com/pboettch/vim-cmake-syntax + +* The :generator:`Visual Studio 15` generator was added. + +* :ref:`Visual Studio Generators` for VS 2010 and above learned to + place ``.natvis`` source files into VS project files properly. + +* A :prop_tgt:`VS_SDK_REFERENCES` target property was added to tell + :ref:`Visual Studio Generators` to reference the named SDKs. + +* A :prop_sf:`VS_TOOL_OVERRIDE` source file property was created to tell + :ref:`Visual Studio Generators` what tool to use for a source file. + +* The :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property now applies + to executable targets with the :prop_tgt:`ENABLE_EXPORTS` property set. + +* The CPack WIX generator now supports + :variable:`CPACK_WIX_SKIP_PROGRAM_FOLDER` to allow specification + of a custom absolute installation prefix outside + of the ProgramFiles folders. + +* The CPack WIX generator now supports + :variable:`CPACK_COMPONENT__DISABLED`. + This can be used to deselect a component from being installed by default. + +* The CPack WIX generator now supports + CPACK_WIX_PATCH_FILE fragments for Feature elements. + +* The CPack WIX generator now supports + :variable:`CPACK_WIX_ROOT_FEATURE_TITLE` and + :variable:`CPACK_WIX_ROOT_FEATURE_DESCRIPTION` to allow the specification + of a custom title and description for the root feature element. + +* A :prop_sf:`XCODE_FILE_ATTRIBUTES` source file property was + added to tell the :generator:`Xcode` generator to generate + custom content in the Xcode project attributes for the file. + +* The :generator:`Xcode` generator's rudimentary Swift language support + learned to honor a new :variable:`CMAKE_Swift_LANGUAGE_VERSION` variable + to tell Xcode what version of Swift is used by the source. diff --git a/Help/release/dev/CheckFortranSourceCompiles-custom-ext.rst b/Help/release/dev/CheckFortranSourceCompiles-custom-ext.rst deleted file mode 100644 index bf62812..0000000 --- a/Help/release/dev/CheckFortranSourceCompiles-custom-ext.rst +++ /dev/null @@ -1,6 +0,0 @@ -CheckFortranSourceCompiles-custom-ext -------------------------------------- - -* The :module:`CheckFortranSourceCompiles` module macro - ``CHECK_Fortran_SOURCE_COMPILES`` gained a ``SRC_EXT`` option - to specify a custom test Fortran source file extension. diff --git a/Help/release/dev/ExternalProject-HTTP_HEADER.rst b/Help/release/dev/ExternalProject-HTTP_HEADER.rst deleted file mode 100644 index 927d1b2..0000000 --- a/Help/release/dev/ExternalProject-HTTP_HEADER.rst +++ /dev/null @@ -1,5 +0,0 @@ -ExternalProject-HTTP_HEADER ---------------------------- - -* The :module:`ExternalProject` module gained a ``HTTP_HEADER`` - option to add http download headers. diff --git a/Help/release/dev/ExternalProject-http-credentials.rst b/Help/release/dev/ExternalProject-http-credentials.rst deleted file mode 100644 index e3a362a..0000000 --- a/Help/release/dev/ExternalProject-http-credentials.rst +++ /dev/null @@ -1,5 +0,0 @@ -ExternalProject-http-credentials --------------------------------- - -* The :module:`ExternalProject` module gained ``HTTP_USERNAME`` and - ``HTTP_PASSWORD`` options to set http download credentials. diff --git a/Help/release/dev/FindBISON-report-file.rst b/Help/release/dev/FindBISON-report-file.rst deleted file mode 100644 index 0b59128..0000000 --- a/Help/release/dev/FindBISON-report-file.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindBISON-report-file ---------------------- - -* The :module:`FindBISON` module ``BISON_TARGET`` macro learned a new - ``REPORT_FILE`` option to specify the bison ``--report-file=`` option. diff --git a/Help/release/dev/FindMatlab-simulink.rst b/Help/release/dev/FindMatlab-simulink.rst deleted file mode 100644 index cd25412..0000000 --- a/Help/release/dev/FindMatlab-simulink.rst +++ /dev/null @@ -1,4 +0,0 @@ -FindMatlab-simulink -------------------- - -* The :module:`FindMatlab` module learned to find a SIMULINK component. diff --git a/Help/release/dev/FindOpenCL-imported-target.rst b/Help/release/dev/FindOpenCL-imported-target.rst deleted file mode 100644 index 259c745..0000000 --- a/Help/release/dev/FindOpenCL-imported-target.rst +++ /dev/null @@ -1,4 +0,0 @@ -FindOpenCL-imported-target --------------------------- - -* The :module:`FindOpenCL` module now provides imported targets. diff --git a/Help/release/dev/FindOpenMP-updates.rst b/Help/release/dev/FindOpenMP-updates.rst deleted file mode 100644 index cb29a71..0000000 --- a/Help/release/dev/FindOpenMP-updates.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindOpenMP-updates ------------------- - -* The :module:`FindOpenMP` module learned to detect the OpenMP - version (specification date) from the compiler. diff --git a/Help/release/dev/FindVulkan.rst b/Help/release/dev/FindVulkan.rst deleted file mode 100644 index bb5447e..0000000 --- a/Help/release/dev/FindVulkan.rst +++ /dev/null @@ -1,4 +0,0 @@ -FindVulkan ----------- - -* A :module:`FindVulkan` module was added. diff --git a/Help/release/dev/GNUInstallDirs-function.rst b/Help/release/dev/GNUInstallDirs-function.rst deleted file mode 100644 index 65ea7fb..0000000 --- a/Help/release/dev/GNUInstallDirs-function.rst +++ /dev/null @@ -1,5 +0,0 @@ -GNUInstallDirs-function ------------------------ - -* The :module:`GNUInstallDirs` module gained a new - :command:`GNUInstallDirs_get_absolute_install_dir` command. diff --git a/Help/release/dev/GenerateExportHeader-custom-content.rst b/Help/release/dev/GenerateExportHeader-custom-content.rst deleted file mode 100644 index 161261c..0000000 --- a/Help/release/dev/GenerateExportHeader-custom-content.rst +++ /dev/null @@ -1,6 +0,0 @@ -GenerateExportHeader-custom-content ------------------------------------ - -* The :module:`GenerateExportHeader` module learned a new - ``CUSTOM_CONTENT_FROM_VARIABLE`` option to specify a variable - containing custom content for inclusion in the generated header. diff --git a/Help/release/dev/add-android-test-utilities-module.rst b/Help/release/dev/add-android-test-utilities-module.rst deleted file mode 100644 index 998b3cd..0000000 --- a/Help/release/dev/add-android-test-utilities-module.rst +++ /dev/null @@ -1,5 +0,0 @@ -add-android-test-utilities-module ---------------------------------- - -* A :module:`AndroidTestUtilities` module was added to manage transfer of - test data to an Android device. diff --git a/Help/release/dev/add-extra-boolean-comparisons.rst b/Help/release/dev/add-extra-boolean-comparisons.rst deleted file mode 100644 index a928994..0000000 --- a/Help/release/dev/add-extra-boolean-comparisons.rst +++ /dev/null @@ -1,6 +0,0 @@ -add-extra-boolean-comparisons ------------------------------ - -* The :command:`if` command gained new boolean comparison operations - ``LESS_EQUAL``, ``GREATER_EQUAL``, ``STRLESS_EQUAL``, ``STRGREATER_EQUAL``, - ``VERSION_LESS_EQUAL``, and ``VERSION_GREATER_EQUAL``. diff --git a/Help/release/dev/add_androidmk_generator.rst b/Help/release/dev/add_androidmk_generator.rst deleted file mode 100644 index dd7867c..0000000 --- a/Help/release/dev/add_androidmk_generator.rst +++ /dev/null @@ -1,10 +0,0 @@ -add_androidmk_generator ------------------------ - -* The :command:`install` command gained an ``EXPORT_ANDROID_MK`` - subcommand to install ``Android.mk`` files referencing installed - libraries as prebuilts for the Android NDK build system. - -* The :command:`export` command gained an ``ANDROID_MK`` option - to generate ``Android.mk`` files referencing CMake-built - libraries as prebuilts for the Android NDK build system. diff --git a/Help/release/dev/aix-clang.rst b/Help/release/dev/aix-clang.rst deleted file mode 100644 index 2ff53bf..0000000 --- a/Help/release/dev/aix-clang.rst +++ /dev/null @@ -1,4 +0,0 @@ -aix-clang ---------- - -* The Clang compiler is now supported on AIX. diff --git a/Help/release/dev/android-platform-modules.rst b/Help/release/dev/android-platform-modules.rst deleted file mode 100644 index 79ae992..0000000 --- a/Help/release/dev/android-platform-modules.rst +++ /dev/null @@ -1,5 +0,0 @@ -android-platform-modules ------------------------- - -* CMake now supports :ref:`Cross Compiling for Android` with simple - toolchain files. diff --git a/Help/release/dev/app-framework-bundle-extension.rst b/Help/release/dev/app-framework-bundle-extension.rst deleted file mode 100644 index 01855a2..0000000 --- a/Help/release/dev/app-framework-bundle-extension.rst +++ /dev/null @@ -1,5 +0,0 @@ -app-framework-bundle-extension ------------------------------- - -* On Apple platforms the :prop_tgt:`BUNDLE_EXTENSION` now also applies to - Frameworks and App Bundles. diff --git a/Help/release/dev/bzip2-imported-targets.rst b/Help/release/dev/bzip2-imported-targets.rst deleted file mode 100644 index be58b96..0000000 --- a/Help/release/dev/bzip2-imported-targets.rst +++ /dev/null @@ -1,4 +0,0 @@ -bzip2-imported-targets ----------------------- - -* The :module:`FindBZip2` module now provides imported targets. diff --git a/Help/release/dev/ccmake-vim-navigation.rst b/Help/release/dev/ccmake-vim-navigation.rst deleted file mode 100644 index 8fc1416..0000000 --- a/Help/release/dev/ccmake-vim-navigation.rst +++ /dev/null @@ -1,4 +0,0 @@ -ccmake-vim-navigation ---------------------- - -* :manual:`ccmake(1)` learned to support vim-like navigation bindings. diff --git a/Help/release/dev/cmake-capabilities.rst b/Help/release/dev/cmake-capabilities.rst deleted file mode 100644 index 7abb973..0000000 --- a/Help/release/dev/cmake-capabilities.rst +++ /dev/null @@ -1,6 +0,0 @@ -cmake-capabilities ------------------- - -* :manual:`cmake(1)` gained a ``-E capabilities`` option to provide a - machine-readable (JSON) description of the capabilities of the - cmake tool (available generators, etc.). diff --git a/Help/release/dev/cmake-gui-open-project.rst b/Help/release/dev/cmake-gui-open-project.rst deleted file mode 100644 index 32f0f0f..0000000 --- a/Help/release/dev/cmake-gui-open-project.rst +++ /dev/null @@ -1,5 +0,0 @@ -cmake-gui-open-project ----------------------- - -* :manual:`cmake-gui(1)` gained a button to open the generated project file - for :ref:`Visual Studio Generators` and the :generator:`Xcode` generator. diff --git a/Help/release/dev/cmake-server-basic.rst b/Help/release/dev/cmake-server-basic.rst deleted file mode 100644 index 0b97660..0000000 --- a/Help/release/dev/cmake-server-basic.rst +++ /dev/null @@ -1,6 +0,0 @@ -cmake-server-basic ------------------- - -* A new :manual:`cmake-server(7)` mode was added to provide semantic - information about a CMake-generated buildsystem to clients through - a JSON protocol. diff --git a/Help/release/dev/cmake-trace-source.rst b/Help/release/dev/cmake-trace-source.rst deleted file mode 100644 index 9b17f6c..0000000 --- a/Help/release/dev/cmake-trace-source.rst +++ /dev/null @@ -1,4 +0,0 @@ -cmake-trace-source ------------------- - -* The :manual:`cmake(1)` command learned a ``--trace-source=`` option. diff --git a/Help/release/dev/codelite-organize-by-target.rst b/Help/release/dev/codelite-organize-by-target.rst deleted file mode 100644 index 0979228..0000000 --- a/Help/release/dev/codelite-organize-by-target.rst +++ /dev/null @@ -1,6 +0,0 @@ -codelite-organize-by-target ---------------------------- - -* The :generator:`CodeLite` generator gained a new - :variable:`CMAKE_CODELITE_USE_TARGETS` option - to change project creation from projects to targets. diff --git a/Help/release/dev/cpack-deb-long-filenames.rst b/Help/release/dev/cpack-deb-long-filenames.rst deleted file mode 100644 index 6113eaf..0000000 --- a/Help/release/dev/cpack-deb-long-filenames.rst +++ /dev/null @@ -1,6 +0,0 @@ -cpack-deb-long-filenames ------------------------- - -* The :module:`CPackDeb` module learned to support long file names - when archive format is set to GNU tar. - See :variable:`CPACK_DEBIAN_ARCHIVE_TYPE` diff --git a/Help/release/dev/cpack-rpm-debuginfo-pkg.rst b/Help/release/dev/cpack-rpm-debuginfo-pkg.rst deleted file mode 100644 index 8b37fe4..0000000 --- a/Help/release/dev/cpack-rpm-debuginfo-pkg.rst +++ /dev/null @@ -1,6 +0,0 @@ -cpack-rpm-debuginfo-pkg ------------------------ - -* The :module:`CPackRPM` module learned to generate debuginfo - packages on demand. See :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` - and its per component version. diff --git a/Help/release/dev/cpack-rpm-srpm-package.rst b/Help/release/dev/cpack-rpm-srpm-package.rst deleted file mode 100644 index 803b9fc..0000000 --- a/Help/release/dev/cpack-rpm-srpm-package.rst +++ /dev/null @@ -1,7 +0,0 @@ -cpack-rpm-srpm-package ----------------------- - -* The :module:`CPackRPM` module learned to generate source rpm - (SRPM) packages on demand. See :variable:`CPACK_RPM_PACKAGE_SOURCES`, - :variable:`CPACK_RPM_SOURCE_PKG_BUILD_PARAMS` and - :variable:`CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX`. diff --git a/Help/release/dev/cpack.hash_computing.rst b/Help/release/dev/cpack.hash_computing.rst deleted file mode 100644 index 9780bb2..0000000 --- a/Help/release/dev/cpack.hash_computing.rst +++ /dev/null @@ -1,5 +0,0 @@ -cpack.hash_computing --------------------- - -* CPack gained a new :variable:`CPACK_PACKAGE_CHECKSUM` variable to - enable generation of a checksum file for each package file. diff --git a/Help/release/dev/ctest-capture-error.rst b/Help/release/dev/ctest-capture-error.rst deleted file mode 100644 index 5a286c7..0000000 --- a/Help/release/dev/ctest-capture-error.rst +++ /dev/null @@ -1,8 +0,0 @@ -ctest-capture-error -------------------- - -* The :command:`ctest_configure`, :command:`ctest_build`, - :command:`ctest_test`, :command:`ctest_coverage`, and :command:`ctest_upload` - commands gained a new ``CAPTURE_CMAKE_ERROR`` option to capture any errors - that occur as the commands run into a variable and avoid affecting the return - code of the :manual:`ctest(1)` process. diff --git a/Help/release/dev/directory-list-targets-and-subdirs.rst b/Help/release/dev/directory-list-targets-and-subdirs.rst deleted file mode 100644 index 85f2c82..0000000 --- a/Help/release/dev/directory-list-targets-and-subdirs.rst +++ /dev/null @@ -1,16 +0,0 @@ -directory-list-targets-and-subdirs ----------------------------------- - -* A :prop_dir:`SOURCE_DIR` directory property was added to get the - absolute path to the source directory associated with a directory. - -* A :prop_dir:`BINARY_DIR` directory property was added to get the - absolute path to the binary directory corresponding to the source - directory on which the property is read. - -* A :prop_dir:`BUILDSYSTEM_TARGETS` directory property was added to - get the list of logical buildsystem target names added by the - project in a directory. - -* A :prop_dir:`SUBDIRECTORIES` directory property was added to - get the list of subdirectories added by a project in a directory. diff --git a/Help/release/dev/doc-compilers-dropped.rst b/Help/release/dev/doc-compilers-dropped.rst deleted file mode 100644 index 0bde632..0000000 --- a/Help/release/dev/doc-compilers-dropped.rst +++ /dev/null @@ -1,10 +0,0 @@ -doc-compilers-dropped ---------------------- - -* Support for building CMake itself with some compilers was dropped: - - * Visual Studio 7.1 and 2005 -- superseded by VS 2008 and above - * MinGW.org mingw32 -- superseded by MSYS2 mingw32 and mingw64 - - CMake still supports generating build systems for other projects using - these compilers. diff --git a/Help/release/dev/drop-linux-i386-binary.rst b/Help/release/dev/drop-linux-i386-binary.rst deleted file mode 100644 index 60aa74e..0000000 --- a/Help/release/dev/drop-linux-i386-binary.rst +++ /dev/null @@ -1,5 +0,0 @@ -drop-linux-i386-binary ----------------------- - -* We no longer provide Linux i386 binaries for download from ``cmake.org`` - for new versions of CMake. diff --git a/Help/release/dev/file-curl-httpheader.rst b/Help/release/dev/file-curl-httpheader.rst deleted file mode 100644 index 2147d40..0000000 --- a/Help/release/dev/file-curl-httpheader.rst +++ /dev/null @@ -1,5 +0,0 @@ -file-curl-httpheader --------------------- - -* The :command:`file(DOWNLOAD)` and :command:`file(UPLOAD)` commands - gained a ``HTTPHEADER `` option. diff --git a/Help/release/dev/file-curl-userpw.rst b/Help/release/dev/file-curl-userpw.rst deleted file mode 100644 index 4ae1fee..0000000 --- a/Help/release/dev/file-curl-userpw.rst +++ /dev/null @@ -1,5 +0,0 @@ -file-curl-userpw ----------------- - -* The :command:`file(DOWNLOAD)` and :command:`file(UPLOAD)` commands - gained a ``USERPWD :`` option. diff --git a/Help/release/dev/find-lib32.rst b/Help/release/dev/find-lib32.rst deleted file mode 100644 index 00818dc..0000000 --- a/Help/release/dev/find-lib32.rst +++ /dev/null @@ -1,7 +0,0 @@ -find-lib32 ----------- - -* The :command:`find_library` and :command:`find_package` commands learned - to search in ``lib32/`` directories when the build targets a 32-bit - architecture. See the :prop_gbl:`FIND_LIBRARY_USE_LIB32_PATHS` global - property. diff --git a/Help/release/dev/find_package-dir-sort.rst b/Help/release/dev/find_package-dir-sort.rst deleted file mode 100644 index 67b93eb..0000000 --- a/Help/release/dev/find_package-dir-sort.rst +++ /dev/null @@ -1,13 +0,0 @@ -find_package-dir-sort ---------------------- - -* The :command:`find_package` command gained the possibility of - sorting compatible libraries by ``NAME`` or by ``NATURAL`` sorting by - setting the two new variables :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` - and :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION`. - -* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` was added to control - the sorting mode of the :command:`find_package` command. - -* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION` was added to control - the sorting direction the :command:`find_package` command. diff --git a/Help/release/dev/findicu.rst b/Help/release/dev/findicu.rst deleted file mode 100644 index 0950327..0000000 --- a/Help/release/dev/findicu.rst +++ /dev/null @@ -1,5 +0,0 @@ -findicu -------- - -* A :module:`FindICU` module was introduced to find the International - Components for Unicode (ICU) libraries and programs. diff --git a/Help/release/dev/fortran-submodules.rst b/Help/release/dev/fortran-submodules.rst deleted file mode 100644 index e4e9657..0000000 --- a/Help/release/dev/fortran-submodules.rst +++ /dev/null @@ -1,7 +0,0 @@ -fortran-submodules ------------------- - -* The Fortran dependency scanner learned to support the syntax of - `Fortran Submodules`_. - -.. _`Fortran Submodules`: http://fortranwiki.org/fortran/show/Submodules diff --git a/Help/release/dev/ifw-package-resources.rst b/Help/release/dev/ifw-package-resources.rst deleted file mode 100644 index 28ea5c4..0000000 --- a/Help/release/dev/ifw-package-resources.rst +++ /dev/null @@ -1,6 +0,0 @@ -ifw-package-resources ---------------------- - -* The :module:`CPackIFW` module gained a new - :command:`cpack_ifw_add_package_resources` command to include additional - resources in the installer binary. diff --git a/Help/release/dev/ifw-user-interfaces.rst b/Help/release/dev/ifw-user-interfaces.rst deleted file mode 100644 index 26e241a..0000000 --- a/Help/release/dev/ifw-user-interfaces.rst +++ /dev/null @@ -1,7 +0,0 @@ -ifw-user-interfaces -------------------- - -* The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and - :command:`cpack_ifw_configure_component_group` commands gained a new - ``USER_INTERFACES`` option to add a list of additonal pages to the IFW - installer. diff --git a/Help/release/dev/java-export-targets.rst b/Help/release/dev/java-export-targets.rst deleted file mode 100644 index 5b70e97..0000000 --- a/Help/release/dev/java-export-targets.rst +++ /dev/null @@ -1,6 +0,0 @@ -java-export-targets -------------------- - -* The :module:`UseJava` module gained APIs to "export" jar targets - for use by external CMake projects. See the ``install_jar_exports`` - and ``export_jars`` functions. diff --git a/Help/release/dev/link_what_you_use.rst b/Help/release/dev/link_what_you_use.rst deleted file mode 100644 index 8d1e598..0000000 --- a/Help/release/dev/link_what_you_use.rst +++ /dev/null @@ -1,7 +0,0 @@ -link_what_you_use ------------------ - -* A :prop_tgt:`LINK_WHAT_YOU_USE` target property and supporting - :variable:`CMAKE_LINK_WHAT_YOU_USE` variable were introduced - to detect (on UNIX) shared libraries that are linked but not - needed by running ``ldd -r -u``. diff --git a/Help/release/dev/ninja-add_custom_command-depfile.rst b/Help/release/dev/ninja-add_custom_command-depfile.rst deleted file mode 100644 index c8099fe..0000000 --- a/Help/release/dev/ninja-add_custom_command-depfile.rst +++ /dev/null @@ -1,6 +0,0 @@ -ninja-add_custom_command-depfile --------------------------------- - -* The :command:`add_custom_command` command gained a new ``DEPFILE`` - option that works with the :generator:`Ninja` generator to provide - implicit dependency information to the build tool. diff --git a/Help/release/dev/ninja-directory-targets.rst b/Help/release/dev/ninja-directory-targets.rst deleted file mode 100644 index c4269d8..0000000 --- a/Help/release/dev/ninja-directory-targets.rst +++ /dev/null @@ -1,8 +0,0 @@ -ninja-directory-targets ------------------------ - -* The :generator:`Ninja` generator learned to produce phony targets - of the form ``sub/dir/{test,install,package}`` to drive the build - of a subdirectory installation, test or packaging target. - This is equivalent to ``cd sub/dir; make {test,install,package}`` - with :ref:`Makefile Generators`. diff --git a/Help/release/dev/ninja-fortran.rst b/Help/release/dev/ninja-fortran.rst deleted file mode 100644 index 612b1ff..0000000 --- a/Help/release/dev/ninja-fortran.rst +++ /dev/null @@ -1,6 +0,0 @@ -ninja-fortran -------------- - -* The :generator:`Ninja` generator learned to conditionally support - Fortran when using a ``ninja`` tool that has the necessary features. - See generator documentation for details. diff --git a/Help/release/dev/parse_arguments_argv_n.rst b/Help/release/dev/parse_arguments_argv_n.rst deleted file mode 100644 index 758b72a..0000000 --- a/Help/release/dev/parse_arguments_argv_n.rst +++ /dev/null @@ -1,6 +0,0 @@ -parse_arguments_argv_n ----------------------- - -* The :command:`cmake_parse_arguments` command gained a new - mode to read arguments directly from ``ARGC`` and ``ARGV#`` - variables inside a :command:`function` body. diff --git a/Help/release/dev/productbuild.rst b/Help/release/dev/productbuild.rst deleted file mode 100644 index ebe213b..0000000 --- a/Help/release/dev/productbuild.rst +++ /dev/null @@ -1,5 +0,0 @@ -productbuild ------------- - -* CPack gained a ``productbuild`` generator on OS X, configured by - the :module:`CPackProductBuild` module. diff --git a/Help/release/dev/test-fixtures.rst b/Help/release/dev/test-fixtures.rst deleted file mode 100644 index a466c46..0000000 --- a/Help/release/dev/test-fixtures.rst +++ /dev/null @@ -1,8 +0,0 @@ -test-fixtures -------------- - -* CTest now supports test fixtures through the new :prop_test:`FIXTURES_SETUP`, - :prop_test:`FIXTURES_CLEANUP` and :prop_test:`FIXTURES_REQUIRED` test - properties. When using regular expressions or ``--rerun-failed`` to limit - the tests to be run, a fixture's setup and cleanup tests will automatically - be added to the execution set if any test requires that fixture. diff --git a/Help/release/dev/timestamp-names.rst b/Help/release/dev/timestamp-names.rst deleted file mode 100644 index ea54b5c..0000000 --- a/Help/release/dev/timestamp-names.rst +++ /dev/null @@ -1,6 +0,0 @@ -timestamp-names ---------------- - -* The :command:`string(TIMESTAMP)` and :command:`file(TIMESTAMP)` - commands gained support for the ``%a`` and ``%b`` placeholders. - These are the abbreviated weekday and month names. diff --git a/Help/release/dev/toolchain-flag-init.rst b/Help/release/dev/toolchain-flag-init.rst deleted file mode 100644 index 37e363d..0000000 --- a/Help/release/dev/toolchain-flag-init.rst +++ /dev/null @@ -1,16 +0,0 @@ -toolchain-flag-init -------------------- - -* :variable:`Toolchain files ` may now set a - :variable:`CMAKE__FLAGS_INIT` variable to initialize the - :variable:`CMAKE__FLAGS` cache entry the first time a language is - enabled in a build tree. - -* :variable:`Toolchain files ` may now set - :variable:`CMAKE_EXE_LINKER_FLAGS_INIT`, - :variable:`CMAKE_SHARED_LINKER_FLAGS_INIT`, and - :variable:`CMAKE_MODULE_LINKER_FLAGS_INIT` variables to initialize the - :variable:`CMAKE_EXE_LINKER_FLAGS`, - :variable:`CMAKE_SHARED_LINKER_FLAGS`, and - :variable:`CMAKE_MODULE_LINKER_FLAGS` cache entries the first time - a language is enabled in a build tree. diff --git a/Help/release/dev/try_compile-config-flags.rst b/Help/release/dev/try_compile-config-flags.rst deleted file mode 100644 index ebfd6a4..0000000 --- a/Help/release/dev/try_compile-config-flags.rst +++ /dev/null @@ -1,7 +0,0 @@ -try_compile-config-flags ------------------------- - -* The :command:`try_compile` command source file signature now honors - configuration-specific flags (e.g. :variable:`CMAKE__FLAGS_DEBUG`) - in the generated test project. Previously only the default such flags - for the current toolchain were used. See policy :policy:`CMP0066`. diff --git a/Help/release/dev/vim-cmake-syntax.rst b/Help/release/dev/vim-cmake-syntax.rst deleted file mode 100644 index 1757f9c..0000000 --- a/Help/release/dev/vim-cmake-syntax.rst +++ /dev/null @@ -1,11 +0,0 @@ -vim-cmake-syntax ----------------- - -* Vim support files ``indent/cmake.vim`` and ``syntax/cmake.vim`` - from the `vim-cmake-syntax`_ project are now distributed with CMake. - -* Vim support files ``cmake-indent.vim``, ``cmake-syntax.vim``, and - ``cmake-help.vim`` have been removed in favor of the files now provided - from the `vim-cmake-syntax`_ project. - -.. _`vim-cmake-syntax`: https://github.com/pboettch/vim-cmake-syntax diff --git a/Help/release/dev/vs-15-generator.rst b/Help/release/dev/vs-15-generator.rst deleted file mode 100644 index be40cbc..0000000 --- a/Help/release/dev/vs-15-generator.rst +++ /dev/null @@ -1,4 +0,0 @@ -vs-15-generator ---------------- - -* The :generator:`Visual Studio 15` generator was added. diff --git a/Help/release/dev/vs-natvis.rst b/Help/release/dev/vs-natvis.rst deleted file mode 100644 index 7cc9844..0000000 --- a/Help/release/dev/vs-natvis.rst +++ /dev/null @@ -1,5 +0,0 @@ -vs-natvis ---------- - -* :ref:`Visual Studio Generators` for VS 2010 and above learned to - place ``.natvis`` source files into VS project files properly. diff --git a/Help/release/dev/vs-sdk-refs.rst b/Help/release/dev/vs-sdk-refs.rst deleted file mode 100644 index 55232e3..0000000 --- a/Help/release/dev/vs-sdk-refs.rst +++ /dev/null @@ -1,5 +0,0 @@ -vs-sdk-refs ------------ - -* A :prop_tgt:`VS_SDK_REFERENCES` target property was added to tell - :ref:`Visual Studio Generators` to reference the named SDKs. diff --git a/Help/release/dev/vs-tool-override.rst b/Help/release/dev/vs-tool-override.rst deleted file mode 100644 index e1177c8..0000000 --- a/Help/release/dev/vs-tool-override.rst +++ /dev/null @@ -1,5 +0,0 @@ -vs-tool-override ----------------- - -* A :prop_sf:`VS_TOOL_OVERRIDE` source file property was created to tell - :ref:`Visual Studio Generators` what tool to use for a source file. diff --git a/Help/release/dev/windows-export-all-from-exe.rst b/Help/release/dev/windows-export-all-from-exe.rst deleted file mode 100644 index 48c16ec..0000000 --- a/Help/release/dev/windows-export-all-from-exe.rst +++ /dev/null @@ -1,5 +0,0 @@ -windows-export-all-from-exe ---------------------------- - -* The :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property now applies - to executable targets with the :prop_tgt:`ENABLE_EXPORTS` property set. diff --git a/Help/release/dev/wix-custom-install-dir.rst b/Help/release/dev/wix-custom-install-dir.rst deleted file mode 100644 index cd12a88..0000000 --- a/Help/release/dev/wix-custom-install-dir.rst +++ /dev/null @@ -1,7 +0,0 @@ -wix-custom-install-dir ----------------------- - -* The CPack WIX generator now supports - :variable:`CPACK_WIX_SKIP_PROGRAM_FOLDER` to allow specification - of a custom absolute installation prefix outside - of the ProgramFiles folders. diff --git a/Help/release/dev/wix-disabled-components.rst b/Help/release/dev/wix-disabled-components.rst deleted file mode 100644 index a7e4d5f..0000000 --- a/Help/release/dev/wix-disabled-components.rst +++ /dev/null @@ -1,6 +0,0 @@ -wix-disabled-components ------------------------ - -* The CPack WIX generator now supports - :variable:`CPACK_COMPONENT__DISABLED`. - This can be used to deselect a component from being installed by default. diff --git a/Help/release/dev/wix-feature-patch.rst b/Help/release/dev/wix-feature-patch.rst deleted file mode 100644 index 0b1cbe3..0000000 --- a/Help/release/dev/wix-feature-patch.rst +++ /dev/null @@ -1,5 +0,0 @@ -wix-feature-patch ------------------ - -* The CPack WIX generator now supports - CPACK_WIX_PATCH_FILE fragments for Feature elements. diff --git a/Help/release/dev/wix-root-description.rst b/Help/release/dev/wix-root-description.rst deleted file mode 100644 index 24afed2..0000000 --- a/Help/release/dev/wix-root-description.rst +++ /dev/null @@ -1,7 +0,0 @@ -wix-root-description --------------------- - -* The CPack WIX generator now supports - :variable:`CPACK_WIX_ROOT_FEATURE_TITLE` and - :variable:`CPACK_WIX_ROOT_FEATURE_DESCRIPTION` to allow the specification - of a custom title and description for the root feature element. diff --git a/Help/release/dev/xcode-file-attributes.rst b/Help/release/dev/xcode-file-attributes.rst deleted file mode 100644 index 35824fa..0000000 --- a/Help/release/dev/xcode-file-attributes.rst +++ /dev/null @@ -1,6 +0,0 @@ -xcode-file-attributes ---------------------- - -* A :prop_sf:`XCODE_FILE_ATTRIBUTES` source file property was - added to tell the :generator:`Xcode` generator to generate - custom content in the Xcode project attributes for the file. diff --git a/Help/release/dev/xcode-swift-version.rst b/Help/release/dev/xcode-swift-version.rst deleted file mode 100644 index 5dff23c..0000000 --- a/Help/release/dev/xcode-swift-version.rst +++ /dev/null @@ -1,6 +0,0 @@ -xcode-swift-version -------------------- - -* The :generator:`Xcode` generator's rudimentary Swift language support - learned to honor a new :variable:`CMAKE_Swift_LANGUAGE_VERSION` variable - to tell Xcode what version of Swift is used by the source. diff --git a/Help/release/index.rst b/Help/release/index.rst index e93b880..30decd5 100644 --- a/Help/release/index.rst +++ b/Help/release/index.rst @@ -13,6 +13,7 @@ Releases .. toctree:: :maxdepth: 1 + 3.7 <3.7> 3.6 <3.6> 3.5 <3.5> 3.4 <3.4> ----------------------------------------------------------------------- Summary of changes: Help/release/3.7.rst | 309 ++++++++++++++++++++ .../dev/CheckFortranSourceCompiles-custom-ext.rst | 6 - Help/release/dev/ExternalProject-HTTP_HEADER.rst | 5 - .../dev/ExternalProject-http-credentials.rst | 5 - Help/release/dev/FindBISON-report-file.rst | 5 - Help/release/dev/FindMatlab-simulink.rst | 4 - Help/release/dev/FindOpenCL-imported-target.rst | 4 - Help/release/dev/FindOpenMP-updates.rst | 5 - Help/release/dev/FindVulkan.rst | 4 - Help/release/dev/GNUInstallDirs-function.rst | 5 - .../dev/GenerateExportHeader-custom-content.rst | 6 - .../dev/add-android-test-utilities-module.rst | 5 - Help/release/dev/add-extra-boolean-comparisons.rst | 6 - Help/release/dev/add_androidmk_generator.rst | 10 - Help/release/dev/aix-clang.rst | 4 - Help/release/dev/android-platform-modules.rst | 5 - .../release/dev/app-framework-bundle-extension.rst | 5 - Help/release/dev/bzip2-imported-targets.rst | 4 - Help/release/dev/ccmake-vim-navigation.rst | 4 - Help/release/dev/cmake-capabilities.rst | 6 - Help/release/dev/cmake-gui-open-project.rst | 5 - Help/release/dev/cmake-server-basic.rst | 6 - Help/release/dev/cmake-trace-source.rst | 4 - Help/release/dev/codelite-organize-by-target.rst | 6 - Help/release/dev/cpack-deb-long-filenames.rst | 6 - Help/release/dev/cpack-rpm-debuginfo-pkg.rst | 6 - Help/release/dev/cpack-rpm-srpm-package.rst | 7 - Help/release/dev/cpack.hash_computing.rst | 5 - Help/release/dev/ctest-capture-error.rst | 8 - .../dev/directory-list-targets-and-subdirs.rst | 16 - Help/release/dev/doc-compilers-dropped.rst | 10 - Help/release/dev/drop-linux-i386-binary.rst | 5 - Help/release/dev/file-curl-httpheader.rst | 5 - Help/release/dev/file-curl-userpw.rst | 5 - Help/release/dev/find-lib32.rst | 7 - Help/release/dev/find_package-dir-sort.rst | 13 - Help/release/dev/findicu.rst | 5 - Help/release/dev/fortran-submodules.rst | 7 - Help/release/dev/ifw-package-resources.rst | 6 - Help/release/dev/ifw-user-interfaces.rst | 7 - Help/release/dev/java-export-targets.rst | 6 - Help/release/dev/link_what_you_use.rst | 7 - .../dev/ninja-add_custom_command-depfile.rst | 6 - Help/release/dev/ninja-directory-targets.rst | 8 - Help/release/dev/ninja-fortran.rst | 6 - Help/release/dev/parse_arguments_argv_n.rst | 6 - Help/release/dev/productbuild.rst | 5 - Help/release/dev/test-fixtures.rst | 8 - Help/release/dev/timestamp-names.rst | 6 - Help/release/dev/toolchain-flag-init.rst | 16 - Help/release/dev/try_compile-config-flags.rst | 7 - Help/release/dev/vim-cmake-syntax.rst | 11 - Help/release/dev/vs-15-generator.rst | 4 - Help/release/dev/vs-natvis.rst | 5 - Help/release/dev/vs-sdk-refs.rst | 5 - Help/release/dev/vs-tool-override.rst | 5 - Help/release/dev/windows-export-all-from-exe.rst | 5 - Help/release/dev/wix-custom-install-dir.rst | 7 - Help/release/dev/wix-disabled-components.rst | 6 - Help/release/dev/wix-feature-patch.rst | 5 - Help/release/dev/wix-root-description.rst | 7 - Help/release/dev/xcode-file-attributes.rst | 6 - Help/release/dev/xcode-swift-version.rst | 6 - Help/release/index.rst | 1 + 64 files changed, 310 insertions(+), 390 deletions(-) create mode 100644 Help/release/3.7.rst delete mode 100644 Help/release/dev/CheckFortranSourceCompiles-custom-ext.rst delete mode 100644 Help/release/dev/ExternalProject-HTTP_HEADER.rst delete mode 100644 Help/release/dev/ExternalProject-http-credentials.rst delete mode 100644 Help/release/dev/FindBISON-report-file.rst delete mode 100644 Help/release/dev/FindMatlab-simulink.rst delete mode 100644 Help/release/dev/FindOpenCL-imported-target.rst delete mode 100644 Help/release/dev/FindOpenMP-updates.rst delete mode 100644 Help/release/dev/FindVulkan.rst delete mode 100644 Help/release/dev/GNUInstallDirs-function.rst delete mode 100644 Help/release/dev/GenerateExportHeader-custom-content.rst delete mode 100644 Help/release/dev/add-android-test-utilities-module.rst delete mode 100644 Help/release/dev/add-extra-boolean-comparisons.rst delete mode 100644 Help/release/dev/add_androidmk_generator.rst delete mode 100644 Help/release/dev/aix-clang.rst delete mode 100644 Help/release/dev/android-platform-modules.rst delete mode 100644 Help/release/dev/app-framework-bundle-extension.rst delete mode 100644 Help/release/dev/bzip2-imported-targets.rst delete mode 100644 Help/release/dev/ccmake-vim-navigation.rst delete mode 100644 Help/release/dev/cmake-capabilities.rst delete mode 100644 Help/release/dev/cmake-gui-open-project.rst delete mode 100644 Help/release/dev/cmake-server-basic.rst delete mode 100644 Help/release/dev/cmake-trace-source.rst delete mode 100644 Help/release/dev/codelite-organize-by-target.rst delete mode 100644 Help/release/dev/cpack-deb-long-filenames.rst delete mode 100644 Help/release/dev/cpack-rpm-debuginfo-pkg.rst delete mode 100644 Help/release/dev/cpack-rpm-srpm-package.rst delete mode 100644 Help/release/dev/cpack.hash_computing.rst delete mode 100644 Help/release/dev/ctest-capture-error.rst delete mode 100644 Help/release/dev/directory-list-targets-and-subdirs.rst delete mode 100644 Help/release/dev/doc-compilers-dropped.rst delete mode 100644 Help/release/dev/drop-linux-i386-binary.rst delete mode 100644 Help/release/dev/file-curl-httpheader.rst delete mode 100644 Help/release/dev/file-curl-userpw.rst delete mode 100644 Help/release/dev/find-lib32.rst delete mode 100644 Help/release/dev/find_package-dir-sort.rst delete mode 100644 Help/release/dev/findicu.rst delete mode 100644 Help/release/dev/fortran-submodules.rst delete mode 100644 Help/release/dev/ifw-package-resources.rst delete mode 100644 Help/release/dev/ifw-user-interfaces.rst delete mode 100644 Help/release/dev/java-export-targets.rst delete mode 100644 Help/release/dev/link_what_you_use.rst delete mode 100644 Help/release/dev/ninja-add_custom_command-depfile.rst delete mode 100644 Help/release/dev/ninja-directory-targets.rst delete mode 100644 Help/release/dev/ninja-fortran.rst delete mode 100644 Help/release/dev/parse_arguments_argv_n.rst delete mode 100644 Help/release/dev/productbuild.rst delete mode 100644 Help/release/dev/test-fixtures.rst delete mode 100644 Help/release/dev/timestamp-names.rst delete mode 100644 Help/release/dev/toolchain-flag-init.rst delete mode 100644 Help/release/dev/try_compile-config-flags.rst delete mode 100644 Help/release/dev/vim-cmake-syntax.rst delete mode 100644 Help/release/dev/vs-15-generator.rst delete mode 100644 Help/release/dev/vs-natvis.rst delete mode 100644 Help/release/dev/vs-sdk-refs.rst delete mode 100644 Help/release/dev/vs-tool-override.rst delete mode 100644 Help/release/dev/windows-export-all-from-exe.rst delete mode 100644 Help/release/dev/wix-custom-install-dir.rst delete mode 100644 Help/release/dev/wix-disabled-components.rst delete mode 100644 Help/release/dev/wix-feature-patch.rst delete mode 100644 Help/release/dev/wix-root-description.rst delete mode 100644 Help/release/dev/xcode-file-attributes.rst delete mode 100644 Help/release/dev/xcode-swift-version.rst hooks/post-receive -- CMake From kwrobot at kitware.com Sun Oct 2 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 2 Oct 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1288-g52fb3d7 Message-ID: <20161002040107.CD234F5C60@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 52fb3d78d3fee0e86b3ae7871efbd811df181e7f (commit) from 9921b2f8c897d6981e9003353962529d0d52f580 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52fb3d78d3fee0e86b3ae7871efbd811df181e7f commit 52fb3d78d3fee0e86b3ae7871efbd811df181e7f Author: Kitware Robot AuthorDate: Sun Oct 2 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Sun Oct 2 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 3e27338..3047b23 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 6) -set(CMake_VERSION_PATCH 20161001) +set(CMake_VERSION_PATCH 20161002) #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 Oct 3 00:01:05 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 3 Oct 2016 00:01:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1289-g2d4aeb1 Message-ID: <20161003040105.A480EF6251@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 2d4aeb1ff1550f11ea84346fbe81b8bc34cc5ba7 (commit) from 52fb3d78d3fee0e86b3ae7871efbd811df181e7f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d4aeb1ff1550f11ea84346fbe81b8bc34cc5ba7 commit 2d4aeb1ff1550f11ea84346fbe81b8bc34cc5ba7 Author: Kitware Robot AuthorDate: Mon Oct 3 00:01:02 2016 -0400 Commit: Kitware Robot CommitDate: Mon Oct 3 00:01:02 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 3047b23..51a0fff 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 6) -set(CMake_VERSION_PATCH 20161002) +set(CMake_VERSION_PATCH 20161003) #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 Oct 3 08:55:59 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 08:55:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2686-g3e92ad3 Message-ID: <20161003125559.CCD4AF5D89@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 3e92ad333b98fbc21a222aad966b3e5f2e653670 (commit) via 07bb27240fa3971c9944a9d461382eb7074358da (commit) from 91e2236d803f28c3de15b6387b388abd5c3055e8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e92ad333b98fbc21a222aad966b3e5f2e653670 commit 3e92ad333b98fbc21a222aad966b3e5f2e653670 Merge: 91e2236 07bb272 Author: Brad King AuthorDate: Mon Oct 3 08:55:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 3 08:55:58 2016 -0400 Merge topic 'doc-target_link_libraries-flags' into next 07bb2724 Help: Clarify treatment of link flags in target_link_libraries https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07bb27240fa3971c9944a9d461382eb7074358da commit 07bb27240fa3971c9944a9d461382eb7074358da Author: John Beard AuthorDate: Fri Sep 30 14:53:52 2016 +0800 Commit: Brad King CommitDate: Mon Oct 3 08:53:43 2016 -0400 Help: Clarify treatment of link flags in target_link_libraries diff --git a/Help/command/target_link_libraries.rst b/Help/command/target_link_libraries.rst index d903d05..90b6575 100644 --- a/Help/command/target_link_libraries.rst +++ b/Help/command/target_link_libraries.rst @@ -62,6 +62,12 @@ Each ```` may be: dependencies, so they are generally safe to specify only as private link items that will not propagate to dependents. + Link flags specified here are inserted into the link command in the same + place as the link libraries. This might not be correct, depending on + the linker. Use the :prop_tgt:`LINK_FLAGS` target property to add link + flags explicitly. The flags will then be placed at the toolchain-defined + flag position in the link command. + * A ``debug``, ``optimized``, or ``general`` keyword immediately followed by another ````. The item following such a keyword will be used only for the corresponding build configuration. The ``debug`` keyword ----------------------------------------------------------------------- Summary of changes: Help/command/target_link_libraries.rst | 6 ++++++ 1 file changed, 6 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 08:57:50 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 08:57:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2689-g52e9b36 Message-ID: <20161003125750.BF633F5DBC@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 52e9b368b43108d8aa99f2847e23e82d49f45e18 (commit) via 2d4aeb1ff1550f11ea84346fbe81b8bc34cc5ba7 (commit) via 52fb3d78d3fee0e86b3ae7871efbd811df181e7f (commit) from 3e92ad333b98fbc21a222aad966b3e5f2e653670 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52e9b368b43108d8aa99f2847e23e82d49f45e18 commit 52e9b368b43108d8aa99f2847e23e82d49f45e18 Merge: 3e92ad3 2d4aeb1 Author: Brad King AuthorDate: Mon Oct 3 08:57:43 2016 -0400 Commit: Brad King CommitDate: Mon Oct 3 08:57:43 2016 -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 Oct 3 08:58:46 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 08:58:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2691-g7d8bc04 Message-ID: <20161003125846.17A7BF5E28@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 7d8bc044f054bb11a6c32e37fe4041c7c93de63c (commit) via a997cac8323dc1764e092b8691857dd9af70956e (commit) from 52e9b368b43108d8aa99f2847e23e82d49f45e18 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d8bc044f054bb11a6c32e37fe4041c7c93de63c commit 7d8bc044f054bb11a6c32e37fe4041c7c93de63c Merge: 52e9b36 a997cac Author: Brad King AuthorDate: Mon Oct 3 08:58:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 3 08:58:45 2016 -0400 Merge topic 'FindBoost-1.62' into next a997cac8 FindBoost: Add 1.62 and 1.62.0 as supported versions https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a997cac8323dc1764e092b8691857dd9af70956e commit a997cac8323dc1764e092b8691857dd9af70956e Author: Roger Leigh AuthorDate: Mon Oct 3 12:19:33 2016 +0100 Commit: Roger Leigh CommitDate: Mon Oct 3 12:19:33 2016 +0100 FindBoost: Add 1.62 and 1.62.0 as supported versions diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index a66aa8f..184fb05 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -944,7 +944,7 @@ else() # _Boost_COMPONENT_HEADERS. See the instructions at the top of # _Boost_COMPONENT_DEPENDENCIES. set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.61.0" "1.61" "1.60.0" "1.60" + "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1" ----------------------------------------------------------------------- Summary of changes: Modules/FindBoost.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 09:01:53 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 09:01:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1291-gbed8d6b Message-ID: <20161003130153.E03C9F5E6D@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 bed8d6b887637eb3c79906d54bfb8e9e0427f65c (commit) via 1b43f9d12dc3d605056fcb8af442b8f0d07ff901 (commit) from 2d4aeb1ff1550f11ea84346fbe81b8bc34cc5ba7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bed8d6b887637eb3c79906d54bfb8e9e0427f65c commit bed8d6b887637eb3c79906d54bfb8e9e0427f65c Merge: 2d4aeb1 1b43f9d Author: Brad King AuthorDate: Mon Oct 3 09:01:51 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 3 09:01:51 2016 -0400 Merge topic 'cmake-server-teardown-file-monitor' 1b43f9d1 cmake-server: Stop the file monitor on client disconnect ----------------------------------------------------------------------- Summary of changes: Source/cmServerConnection.cxx | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 09:01:56 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 09:01:56 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1293-g5cdeb66 Message-ID: <20161003130156.A30B8F5E73@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 5cdeb661ea3d6a66128ddec45ef0701730755eac (commit) via 07bb27240fa3971c9944a9d461382eb7074358da (commit) from bed8d6b887637eb3c79906d54bfb8e9e0427f65c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cdeb661ea3d6a66128ddec45ef0701730755eac commit 5cdeb661ea3d6a66128ddec45ef0701730755eac Merge: bed8d6b 07bb272 Author: Brad King AuthorDate: Mon Oct 3 09:01:54 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 3 09:01:54 2016 -0400 Merge topic 'doc-target_link_libraries-flags' 07bb2724 Help: Clarify treatment of link flags in target_link_libraries ----------------------------------------------------------------------- Summary of changes: Help/command/target_link_libraries.rst | 6 ++++++ 1 file changed, 6 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 09:01:59 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 09:01:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1295-g5ad6d4d Message-ID: <20161003130159.68538F5E76@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 5ad6d4d7a19917a62f800348c2a1c33a24c994da (commit) via a997cac8323dc1764e092b8691857dd9af70956e (commit) from 5cdeb661ea3d6a66128ddec45ef0701730755eac (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ad6d4d7a19917a62f800348c2a1c33a24c994da commit 5ad6d4d7a19917a62f800348c2a1c33a24c994da Merge: 5cdeb66 a997cac Author: Brad King AuthorDate: Mon Oct 3 09:01:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 3 09:01:57 2016 -0400 Merge topic 'FindBoost-1.62' a997cac8 FindBoost: Add 1.62 and 1.62.0 as supported versions ----------------------------------------------------------------------- Summary of changes: Modules/FindBoost.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 09:02:02 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 09:02:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1298-gb99bbfe Message-ID: <20161003130202.6E4CAF5E2D@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 b99bbfe88d1bb02dc903507f3e1bbe716ac04c12 (commit) via 64e63da0d17e000343b324f2d7ebadbd484f0860 (commit) via e82c33b88c566cd5388f4ce26a1d82b3ecafcc12 (commit) from 5ad6d4d7a19917a62f800348c2a1c33a24c994da (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b99bbfe88d1bb02dc903507f3e1bbe716ac04c12 commit b99bbfe88d1bb02dc903507f3e1bbe716ac04c12 Merge: 5ad6d4d 64e63da Author: Brad King AuthorDate: Mon Oct 3 09:02:00 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 3 09:02:00 2016 -0400 Merge topic 'doc-3.7-relnotes' 64e63da0 Help: Organize and revise 3.7 release notes e82c33b8 Help: Consolidate 3.7 release notes ----------------------------------------------------------------------- Summary of changes: Help/release/3.7.rst | 309 ++++++++++++++++++++ .../dev/CheckFortranSourceCompiles-custom-ext.rst | 6 - Help/release/dev/ExternalProject-HTTP_HEADER.rst | 5 - .../dev/ExternalProject-http-credentials.rst | 5 - Help/release/dev/FindBISON-report-file.rst | 5 - Help/release/dev/FindMatlab-simulink.rst | 4 - Help/release/dev/FindOpenCL-imported-target.rst | 4 - Help/release/dev/FindOpenMP-updates.rst | 5 - Help/release/dev/FindVulkan.rst | 4 - Help/release/dev/GNUInstallDirs-function.rst | 5 - .../dev/GenerateExportHeader-custom-content.rst | 6 - .../dev/add-android-test-utilities-module.rst | 5 - Help/release/dev/add-extra-boolean-comparisons.rst | 6 - Help/release/dev/add_androidmk_generator.rst | 10 - Help/release/dev/aix-clang.rst | 4 - Help/release/dev/android-platform-modules.rst | 5 - .../release/dev/app-framework-bundle-extension.rst | 5 - Help/release/dev/bzip2-imported-targets.rst | 4 - Help/release/dev/ccmake-vim-navigation.rst | 4 - Help/release/dev/cmake-capabilities.rst | 6 - Help/release/dev/cmake-gui-open-project.rst | 5 - Help/release/dev/cmake-server-basic.rst | 6 - Help/release/dev/cmake-trace-source.rst | 4 - Help/release/dev/codelite-organize-by-target.rst | 6 - Help/release/dev/cpack-deb-long-filenames.rst | 6 - Help/release/dev/cpack-rpm-debuginfo-pkg.rst | 6 - Help/release/dev/cpack-rpm-srpm-package.rst | 7 - Help/release/dev/cpack.hash_computing.rst | 5 - Help/release/dev/ctest-capture-error.rst | 8 - .../dev/directory-list-targets-and-subdirs.rst | 16 - Help/release/dev/doc-compilers-dropped.rst | 10 - Help/release/dev/drop-linux-i386-binary.rst | 5 - Help/release/dev/file-curl-httpheader.rst | 5 - Help/release/dev/file-curl-userpw.rst | 5 - Help/release/dev/find-lib32.rst | 7 - Help/release/dev/find_package-dir-sort.rst | 13 - Help/release/dev/findicu.rst | 5 - Help/release/dev/fortran-submodules.rst | 7 - Help/release/dev/ifw-package-resources.rst | 6 - Help/release/dev/ifw-user-interfaces.rst | 7 - Help/release/dev/java-export-targets.rst | 6 - Help/release/dev/link_what_you_use.rst | 7 - .../dev/ninja-add_custom_command-depfile.rst | 6 - Help/release/dev/ninja-directory-targets.rst | 8 - Help/release/dev/ninja-fortran.rst | 6 - Help/release/dev/parse_arguments_argv_n.rst | 6 - Help/release/dev/productbuild.rst | 5 - Help/release/dev/test-fixtures.rst | 8 - Help/release/dev/timestamp-names.rst | 6 - Help/release/dev/toolchain-flag-init.rst | 16 - Help/release/dev/try_compile-config-flags.rst | 7 - Help/release/dev/vim-cmake-syntax.rst | 11 - Help/release/dev/vs-15-generator.rst | 4 - Help/release/dev/vs-natvis.rst | 5 - Help/release/dev/vs-sdk-refs.rst | 5 - Help/release/dev/vs-tool-override.rst | 5 - Help/release/dev/windows-export-all-from-exe.rst | 5 - Help/release/dev/wix-custom-install-dir.rst | 7 - Help/release/dev/wix-disabled-components.rst | 6 - Help/release/dev/wix-feature-patch.rst | 5 - Help/release/dev/wix-root-description.rst | 7 - Help/release/dev/xcode-file-attributes.rst | 6 - Help/release/dev/xcode-swift-version.rst | 6 - Help/release/index.rst | 1 + 64 files changed, 310 insertions(+), 390 deletions(-) create mode 100644 Help/release/3.7.rst delete mode 100644 Help/release/dev/CheckFortranSourceCompiles-custom-ext.rst delete mode 100644 Help/release/dev/ExternalProject-HTTP_HEADER.rst delete mode 100644 Help/release/dev/ExternalProject-http-credentials.rst delete mode 100644 Help/release/dev/FindBISON-report-file.rst delete mode 100644 Help/release/dev/FindMatlab-simulink.rst delete mode 100644 Help/release/dev/FindOpenCL-imported-target.rst delete mode 100644 Help/release/dev/FindOpenMP-updates.rst delete mode 100644 Help/release/dev/FindVulkan.rst delete mode 100644 Help/release/dev/GNUInstallDirs-function.rst delete mode 100644 Help/release/dev/GenerateExportHeader-custom-content.rst delete mode 100644 Help/release/dev/add-android-test-utilities-module.rst delete mode 100644 Help/release/dev/add-extra-boolean-comparisons.rst delete mode 100644 Help/release/dev/add_androidmk_generator.rst delete mode 100644 Help/release/dev/aix-clang.rst delete mode 100644 Help/release/dev/android-platform-modules.rst delete mode 100644 Help/release/dev/app-framework-bundle-extension.rst delete mode 100644 Help/release/dev/bzip2-imported-targets.rst delete mode 100644 Help/release/dev/ccmake-vim-navigation.rst delete mode 100644 Help/release/dev/cmake-capabilities.rst delete mode 100644 Help/release/dev/cmake-gui-open-project.rst delete mode 100644 Help/release/dev/cmake-server-basic.rst delete mode 100644 Help/release/dev/cmake-trace-source.rst delete mode 100644 Help/release/dev/codelite-organize-by-target.rst delete mode 100644 Help/release/dev/cpack-deb-long-filenames.rst delete mode 100644 Help/release/dev/cpack-rpm-debuginfo-pkg.rst delete mode 100644 Help/release/dev/cpack-rpm-srpm-package.rst delete mode 100644 Help/release/dev/cpack.hash_computing.rst delete mode 100644 Help/release/dev/ctest-capture-error.rst delete mode 100644 Help/release/dev/directory-list-targets-and-subdirs.rst delete mode 100644 Help/release/dev/doc-compilers-dropped.rst delete mode 100644 Help/release/dev/drop-linux-i386-binary.rst delete mode 100644 Help/release/dev/file-curl-httpheader.rst delete mode 100644 Help/release/dev/file-curl-userpw.rst delete mode 100644 Help/release/dev/find-lib32.rst delete mode 100644 Help/release/dev/find_package-dir-sort.rst delete mode 100644 Help/release/dev/findicu.rst delete mode 100644 Help/release/dev/fortran-submodules.rst delete mode 100644 Help/release/dev/ifw-package-resources.rst delete mode 100644 Help/release/dev/ifw-user-interfaces.rst delete mode 100644 Help/release/dev/java-export-targets.rst delete mode 100644 Help/release/dev/link_what_you_use.rst delete mode 100644 Help/release/dev/ninja-add_custom_command-depfile.rst delete mode 100644 Help/release/dev/ninja-directory-targets.rst delete mode 100644 Help/release/dev/ninja-fortran.rst delete mode 100644 Help/release/dev/parse_arguments_argv_n.rst delete mode 100644 Help/release/dev/productbuild.rst delete mode 100644 Help/release/dev/test-fixtures.rst delete mode 100644 Help/release/dev/timestamp-names.rst delete mode 100644 Help/release/dev/toolchain-flag-init.rst delete mode 100644 Help/release/dev/try_compile-config-flags.rst delete mode 100644 Help/release/dev/vim-cmake-syntax.rst delete mode 100644 Help/release/dev/vs-15-generator.rst delete mode 100644 Help/release/dev/vs-natvis.rst delete mode 100644 Help/release/dev/vs-sdk-refs.rst delete mode 100644 Help/release/dev/vs-tool-override.rst delete mode 100644 Help/release/dev/windows-export-all-from-exe.rst delete mode 100644 Help/release/dev/wix-custom-install-dir.rst delete mode 100644 Help/release/dev/wix-disabled-components.rst delete mode 100644 Help/release/dev/wix-feature-patch.rst delete mode 100644 Help/release/dev/wix-root-description.rst delete mode 100644 Help/release/dev/xcode-file-attributes.rst delete mode 100644 Help/release/dev/xcode-swift-version.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 09:02:26 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 09:02:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2696-g4b948d6 Message-ID: <20161003130226.78BBFF5D39@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 4b948d6a13576c4191bfffc43b17b451382997df (commit) via b99bbfe88d1bb02dc903507f3e1bbe716ac04c12 (commit) via 5ad6d4d7a19917a62f800348c2a1c33a24c994da (commit) via 5cdeb661ea3d6a66128ddec45ef0701730755eac (commit) via bed8d6b887637eb3c79906d54bfb8e9e0427f65c (commit) from 7d8bc044f054bb11a6c32e37fe4041c7c93de63c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b948d6a13576c4191bfffc43b17b451382997df commit 4b948d6a13576c4191bfffc43b17b451382997df Merge: 7d8bc04 b99bbfe Author: Brad King AuthorDate: Mon Oct 3 09:02:16 2016 -0400 Commit: Brad King CommitDate: Mon Oct 3 09:02:16 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From cmake-commits at cmake.org Mon Oct 3 09:16:07 2016 From: cmake-commits at cmake.org (cmake-commits at cmake.org) Date: Mon, 3 Oct 2016 09:16:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1302-g0c09a6a Message-ID: <20161003131607.9D006F3D87@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 0c09a6ab1dc8cc5556aa3ccb852d5146ed8e2424 (commit) via 7e6b88fc2f8549ebc75006603a4add98125af7b2 (commit) via 46f3306f6a642b7112ffad6f41076e5baead5a30 (commit) via 2aea7099e1994eef0849c202e860564d5fba1c4e (commit) from b99bbfe88d1bb02dc903507f3e1bbe716ac04c12 (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 +- Utilities/Release/upload_release.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From cmake-commits at cmake.org Mon Oct 3 09:16:10 2016 From: cmake-commits at cmake.org (cmake-commits at cmake.org) Date: Mon, 3 Oct 2016 09:16:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1303-g6680593 Message-ID: <20161003131610.8A421F3D8C@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 discards 4b948d6a13576c4191bfffc43b17b451382997df (commit) discards 7d8bc044f054bb11a6c32e37fe4041c7c93de63c (commit) discards 52e9b368b43108d8aa99f2847e23e82d49f45e18 (commit) discards 3e92ad333b98fbc21a222aad966b3e5f2e653670 (commit) discards 91e2236d803f28c3de15b6387b388abd5c3055e8 (commit) discards 74665a9d1de70d2f7f0888a84472cd0e36402b7e (commit) discards f175f4656bcc2cbcd7637d2adc4832936e384344 (commit) discards 75d86bdf8a9e3eb9f72a832dbe45be05b7e2c341 (commit) discards 7ae67cb5a78707dd9dd4bf9d102f835442ed1f83 (commit) discards ba976bc7d8d36ce4c2fe7cb91c7a26d001c44d41 (commit) discards e3625859c0ec0360a64a0de3088a82695aa931f9 (commit) discards 07a88834c000c88e5a27fb67a7bfe6674ca5202e (commit) discards 983074c1b638e933d1530374075cb63ba1ed70e2 (commit) discards 9dbd7615358850db6121ab78eba14a1a14154159 (commit) discards d80c9cf25a5d19a7d29c21abe5faadd23c91593d (commit) discards 85863e9f451e9a829d6459a58901de59ac95bef0 (commit) discards 7a615de1c279b12dc0419571f4a6b1a82e1d9cdc (commit) discards 4d42faf205e28bf47a38ac2168e24842f44f9219 (commit) discards 1b199a944ad58e12b8f10fc8ca482769b8edf647 (commit) discards 8510d2a3260c0296b09633dccd1fc8f83a6aa292 (commit) discards 435b28e6b3bce2738dd8b4be688acc1a6d8dd239 (commit) discards 2da1a6f9447110fd2a554c3a705f44819f6c485f (commit) discards e0be49ae53da14f9ed610dbb50fb5ff2432c9c90 (commit) discards c800b7ab9bd02f9df7666cfc909e76d24b5f47fa (commit) discards 1e6aedd75ec89b3ed7c5a9da8cecf9f3e64266ff (commit) discards 5bfdb484927012543c6703ce82864c49365c241f (commit) discards 05541949dce624d7e67d44f03606a1afa16f0ee6 (commit) discards 517c8e0444b05c717520642ac2f4dd25cd5562f3 (commit) discards b643ce7a898addbacc915f16b7e916c51afc43f1 (commit) discards bf2e8129d8a1856fe217d3ff2a53db8c6b5e5230 (commit) discards 9a4a2c1c6252167654e5b142772b21a72dc8294a (commit) discards ba395cd6d7ac726a9f74f04478c949ea4b0ee4a5 (commit) discards 9b129dc83e1e7d558f34923533a8fad412052e0e (commit) discards 58db1137860a859865472dec91f04e6aefcb6366 (commit) discards 1eef12074c6345fae69ec16a66e3ce90ec254fc5 (commit) discards 8680d930a5328314c88ec0e8d190ef5fe9f9a9e2 (commit) discards ce21787e01ef9762ea64154eeb9be16e107c3dbc (commit) discards b14a22a7b64fedabef98580d976793774b964c72 (commit) discards 2d08affd8e32537aefcb3418315cc5a3a0d62592 (commit) discards 253f35d2c894cd11be5952458f107c40526ed076 (commit) discards 1735255f48c2e03306ad4bb092434a630cdd6577 (commit) discards 51b80629c0e9fbd7cda9a1ee940a628063dac0e5 (commit) discards fc5eef544936995b4768f400d6473ce9e082bc78 (commit) discards 0f57aafd2b4aacb93436fdf2c55504c105e8fd31 (commit) discards 35b9138e764b5ec7fcb7c81df57fe74a541c1490 (commit) discards c9a1b59ba672301b4f4a9484d578ec5b320dd883 (commit) discards 20413cb015b36a8eb653bbed5958056b75995f3c (commit) discards a537a44bcfd45e3d21b696eb21e162bcf64f8b40 (commit) discards 15b19da7315b135a6b0026024eed8b7a17851229 (commit) discards 2949343dc340b4fba6a019bebc56a19117cf85a8 (commit) discards 6250c24bf4834747d625a66a0a1b89e87d26eca2 (commit) discards 9f26f85fc82352486088c5820345ac7928f08468 (commit) discards be4409380f0aea73c6816554fd8c7228a65a527f (commit) discards 99e236c5eaf4b97fc2ca54ad3c4c848948bcb9e7 (commit) discards 58733dc407fb648a26a11cc4a0f4ecf45d6b7bbb (commit) discards 60ecbf7a7b513e0f4650f88bdbf9537029728f2d (commit) discards ce2544721c6290f413a10bd382afb310da83bdd6 (commit) discards b834963b30bdb36d4f401a581cbe79eaaac5a9ed (commit) discards 7936f112b7f00097e9e7919fff9c89ad12ab6c75 (commit) discards ec794f43e489b5ac5dc6c780f5205b388f77a308 (commit) discards 56c95aa47614bd5434b2a3a17517c9a25d07ea70 (commit) discards 31e7e337941e817c63de9d32972afd9d6cd17eed (commit) discards bc8145d21f9ce7246459774af4a9bd8c812c286b (commit) discards 247c290af678ddb4e8d138c795e912539970dc3f (commit) discards 2136775e1ffbd2ccf9b355181d58fa594eb2b2d3 (commit) discards 29c433076f24abce950e4b5c6e8eca90cbd21bd6 (commit) discards f1a15af9af00486f927870f149b4e30f185b64e4 (commit) discards ec9b84d509dfb3e9b7ea0e7bb358c3fb3d2f722d (commit) discards 3476af802f745e3f928f60648f699439fb46cf51 (commit) discards 8c7612cfc4cd098202b3ac31c49b9a4fec4163b8 (commit) discards f144c2a7497a44235b24f20c246dec1f3bb3911a (commit) discards cdaf32edb833a9cdfd71b99e2a013206c2a5bc42 (commit) discards c1d108a9f207225c7b1342a60cd88fd325fa7ced (commit) discards ed5809dd7da5b11f65ecb3996adc37d9cfecf145 (commit) discards e924a8ef1d469760c614617cb16ed9801dcbd941 (commit) discards f73fc9bc9e5e0d13da64695e4b2209e00632f874 (commit) discards 022bd40319d609099d836bd40fd67ce58f3ce7b2 (commit) discards 56e7dc9d98c964ca7ce87c2484597e12982af2a2 (commit) discards 8b91d5f6730301176bcef83f689267ec433887ef (commit) discards 8d1e65638c349d7a8ed59aca8bd8bd260c1eda72 (commit) discards c58cd7e03fca3d1e2ea9e3884afc5aabf2935dee (commit) discards 4649607c3cce63e4479a67765645f11b0d345b9a (commit) discards db7f1f0474b06143d7987840cfb33aa445097da6 (commit) discards 4994d675cfc9cc52c180dcf7b7fb1b0c8ec9bf40 (commit) discards 930dec1e95061983dac19004e0bf5740339fe46b (commit) discards 5729779fb802ef3dc8fb00ada2d284edd580c022 (commit) discards 519b3173245cc53bd33b22e0b6bfe3780faf9160 (commit) discards 5e2813bc7a5fc95e09da993384bad8801df476ee (commit) discards 7bfd5b7fa568862ec4b31539b1ba705f1c9f6bd0 (commit) discards 16fddd040338061d5ed3b652fdbb1f6fc3d99240 (commit) discards 6330c8f70b69e8aac2d05846ad509d9972df2090 (commit) discards d068b65db17fa6a07970e6640cb69e265746d1ae (commit) discards afe788b028034d796f0fc121eee557930fa73e75 (commit) discards 3f376968376366e0eb1b31145a2db94f53216f18 (commit) discards 54dbd51b5bee3e51cce3b1dc14f5a2d06308f866 (commit) discards b9488840e0a654f46aab074f4fd45be2f116b1ed (commit) discards faf942d8f24416635e776aec909ba356b2cd1d9e (commit) discards ccf06ce07151b3e67e8673976d74f03a081eb9de (commit) discards db5b6bf630ddcee02f97bdf368440692250c8d34 (commit) discards a76645452f07c807260d975ffdbdeba605682d0f (commit) discards f02e7401a832abd8ce3c5a78b2849e0795219503 (commit) discards 65b9baea26f205a1f09451e365d48377fd654508 (commit) discards 0efe6cbf628effab159d286c8e5fe059eba13476 (commit) discards e4d782024d3c654c216bbd32d6ad80f43dde5c29 (commit) discards 3c63947c9d645a7b9763b116610cc2c58024f5ab (commit) discards d1bc55fd7228dd433eb457ec2d2dd38721694151 (commit) discards 7ee381d0f5f46674cab4e9554236d6249010655d (commit) discards 05e6d18bebfa01059ebb43505c0eba6f6c56af73 (commit) discards ac947c5134adb8bf9a100843082b45c4a7ed7097 (commit) discards 7d1b5207e474eb1828e7bdff4034acf7a3682115 (commit) discards 69a613221109a2a5c77e0469a49a95291e3a841d (commit) discards 9f79eb5caa5e25b987df8a9ff53b5fc4d84f5e74 (commit) discards 767ee352d0d06913b0a4d013bbdd07a28ba9200e (commit) discards d706b72896951ceaeca3696e4269f72259666fc3 (commit) discards 9b1ea67715caba54f89de2d3b5acaa9628d2dee1 (commit) discards 9a417c2f68666a8002ef0116bdd2a4ae398d72cc (commit) discards 18840638560e6826e01e00a88b6949e137f04dfc (commit) discards 6294b8bf002dfc7e2ae4edb671c3a87c8affae80 (commit) discards 784abda5e5995c4e29c6ded3d3f72619d3510a14 (commit) discards afb7f17e888484cdd3db4e16c7a473a557fbe53a (commit) discards b4b740b6003f25d36799af6de429151c65f7b49b (commit) discards 9041fb2470a9df8ce922bb0c8e591e99b98fd5fd (commit) discards ffa78c37c8efccc0d73ceae0fd0c31eabca1633d (commit) discards 3c6d4f69016e6ce48430b3d49c63857aaeb14b76 (commit) discards 061e0e1b30ad8db23e9c416c983627c618cb2737 (commit) discards a2bf3ec9f86a3395ba79764167bd44690a379766 (commit) discards b09e900006ba1960ce16f09b73767b9d3a2a171b (commit) discards 0c95231744091d1bcd430cd263374ca90db9efe8 (commit) discards 9c066f0082a2b4cb35e668cd7262cba6d65d21fc (commit) discards 18f452c66038a971713e369d6dbc582fef077f1c (commit) discards 4d7b5dceb90d80e650ed64af491d8a1765d1c60d (commit) discards 72ec88f5f9a2ca10548b393e1884baa0a22ae061 (commit) discards e32d2f7b343eb697ac7ddcdcff68d3dd4234d767 (commit) discards 7c1646a208a13e5d187543c9ab5fef75aa218780 (commit) discards 11f0a95ba2158377a11836bef561517d9781d898 (commit) discards 3bb5115ac5b7a0b2179ef0d890783b67f285d312 (commit) discards 37c31ff4b4ee7576e6e93d86ca79ceeb537a9f1d (commit) discards 149103458f16b9776d88a4e6287a14eb13ef24d1 (commit) discards af0dd7f74b8ec0e00ac57a66d25ea8b0e20a4d7f (commit) discards 36ab1194b924d7b1702993bd250003167bb3ecb1 (commit) discards e677ecdf19c64fff2f0307ffcc5becf7a7d8b63f (commit) discards a11ba9ee3bc679320d48f207535584cbb14a0e8a (commit) discards 04310070588df956f8a925e3ca873ca290a3bd99 (commit) discards 11d9a18decaffe6cd8941f7e578c54b0b77c579f (commit) discards fea1abfaa20f9c290c9f695a461bc0be5ce1ada3 (commit) discards 9c109672631853c5393b68de5febd3a59ee57760 (commit) discards 513509a2e233824225ce57a6487c26c2e28847fb (commit) discards c7addcd588a34eca30e97e7465833a5cf6642376 (commit) discards d5a8aafd0b82170d54353dca0c17a5d3027b88e7 (commit) discards 30236d7e4ec1d23d2d668f698fa643414ec1b3a1 (commit) discards d805f1e55d5ea409b307aa3fa1af5e05430768b8 (commit) discards 1adf3f2e5b00272d55fee15c7540b3e2532cff53 (commit) discards 748a9d781c57464e9916ec83a8c44b6f1693c9e9 (commit) discards 2195bcc4a615dfc1a6af67c912a8e924abc95b32 (commit) discards 1232e641a96fcfaf007da6a5990d8a2f0f0e4d30 (commit) discards e24c561adf0377a62c284868aeb385828bfd7cdf (commit) discards 33dcda0ef0bf4046c01ef53324d320c5166f6f6e (commit) discards 29a323fdab56e4bdc13f44fc8695c6de456d9ec1 (commit) discards 7801a00c680f57811b7659a9e32cd54a6a591fba (commit) discards ee12245acbc487aaaaa6a54717b80baaf8a4b5c0 (commit) discards cf461cac04b4a51fed7972987eaefb813c9edb8a (commit) discards e098b19c810ba1fb0b38f0fcfa9b71033da227bf (commit) discards 1304fcaa55baae94a675855d5df4c6551ec12cd3 (commit) discards ea85b4e1c149a9b3b5fa446833d61ce16b13fa62 (commit) discards b0e23de782c19caefdfbbb96a1582eed5817d8cc (commit) discards dea14afba41ae1af58be0b897557bd0a7c0b3329 (commit) discards e893a4c791898dc49281d04dc56a0354afc6ca1a (commit) discards e2e7e5be65c5e69086ebca8d7f0229f8134b8d27 (commit) discards 132255bfb6e1e00ed121e544f902323f44cb8cfe (commit) discards 431d1dcc4b658141a045cdc44348a3525af1fe24 (commit) discards aa70241e58025d750ddca67f37426d5f0ddf4331 (commit) discards 01c4baa07c8dd13d9efdcead8750964322efef4c (commit) discards 689a431e907879bc181ac450af0dde56c4c6c5a9 (commit) discards 760279161ce7c614fc1d95d70979d5046a3fbecf (commit) discards e713f05af166c0f359c0ffb361503df37c330056 (commit) discards ccd5f19c24fec74584f4148b0fa27b4ad46d4211 (commit) discards 41124690a9d66963ec4d80f53d74be1b00da2fd7 (commit) discards b46a0a0ee1951a42c45b56eb2b20d682efc66d80 (commit) discards 1124b34078738afe54e184ef97c638645523cfef (commit) discards 92361799e2db5eb94c29d3161ee9c06253b11021 (commit) discards 6d95d6d798eb00ce9176a8a5357c9b1143442347 (commit) discards 7dfef4ea098d48fa69fce26d95ab728c9ed262da (commit) discards dbeba3cf4b6a4d9d5e247c0be577b48e629860c3 (commit) discards 23e06aa9e3967be3c4b3a44df30753730482e538 (commit) discards 38cf4b108d015c59a3aac7465406f25f43e676f1 (commit) discards 6ffb1606b239c7c1f82bb2b618ad3bec78737121 (commit) discards a2056927f5162132f7890bd2b5271fc8d860f810 (commit) discards 0d306b9be1de7469a7fa7f13238816c0ce3982d8 (commit) discards d3f76a6c9333e7f4e36dbeb520d07455659d4e4f (commit) discards c569163f4fab72d1e8f7c1f066fe864dcc9335fe (commit) discards 1bb31cc2f89de873ddf84bec65c02266625e84fa (commit) discards 056a10260dbf914602c7162c8c6d7b5addace1bb (commit) discards 0ba6b21650c0f9db147c390c76c0495b2c445a6e (commit) discards 2040474e9dbc9fe8a3cc955c3564d48f0afb3664 (commit) discards bea9335bf363d030d72882c3a5cf01f4dd4af3c3 (commit) discards 89a7552ae80c2c4f3a4cdaae8a5d706b3ce2fc43 (commit) discards 27a57c93a6c64c2c3aaa5201e57f4ebde3034f64 (commit) discards ddd22ec40f664fe612c8a0d7d2d482ae6bd4e9c0 (commit) discards a317614e1efd3b5de4af155c0045a198a9f175d4 (commit) discards d2e3e49991fbbde1192df6156a7bfe70dd9f3319 (commit) discards 0cd64d7028d5f5e53707f38adbd609119285e765 (commit) discards 0aadff19246870b38b048ca9876ec1dd59c69d69 (commit) discards af9d23d180be79559e266bbdeccb49f8d28516c7 (commit) discards 828f247c9bb36f6e378c773497b6ce0b333839b5 (commit) discards 3e3ebeab9cc64e236d0c1c6d1de19869291fbcb2 (commit) discards 98220cb3c9dc8a01db12ecfb224ffbd45052fc7b (commit) discards b5fa39ca3bdbcae327a04d4efb1cbe2477acc413 (commit) discards 27d1525298d909d3272f287e479ec401d78cf29a (commit) discards 5ab46ba2c0c10cac05269f1a30c6021c182310ae (commit) discards 253d0ee84d3b86d8594bd7b82ed60f5464150295 (commit) discards 7696577b49c993f43dd779554c6d03eb9f65ae74 (commit) discards 527d18227d142c212568de19c844cf01afa690ea (commit) discards e827f616b9cf26d7ca98e06fbb6d439203ec9b39 (commit) discards 8c5f1c8b636270a4d75d6a1dff2f29671a096880 (commit) discards 8da72b129f119e5e03e58164e0ca3c279fedde84 (commit) discards bd17b5db0ea713558c2eb6f17082e0346b40f754 (commit) discards 74546d2fad1f329d26ea78b8dd79fb7c0983f333 (commit) discards 9c75197a6a074ca39ef4ac812a0d006097f9595d (commit) discards c4cdb97b64167f6413f877b630d2e4affe783fc3 (commit) discards 6f0b87d59589dc4416666e6408a4884cb464e361 (commit) discards 29332ff96a1d237e55e367f4a335b51a095158e7 (commit) discards cc72d3dd553f0764ec74d76bd5d181875d9531f5 (commit) discards 2ea0de3749ed34091ef4e3a6bfcc20a5c46d4575 (commit) discards b861903f601cba1b4f2f77c82dd33aedf3ac8f78 (commit) discards 7c8a64c710f8ba74c0688c2ba3d8276c05811a78 (commit) discards fbec0e8a0523909ffac9bdc0a6961724acdf65d6 (commit) discards 3e1b1556227b87bd7dafd46e65611eafc15c323c (commit) discards 5e87fe3fa4fa0246c34a98c803f67873cb3d18ce (commit) discards a215ad8b1def445b86b457fe85026bfd9395ea1b (commit) discards c026b3ab9f409474c207a4e28d982d135e5c182f (commit) discards 52e967ce80d0e5e56c3c028dcf6b3346d0386907 (commit) discards 2b5471bd742db73bc45b97cfdcba9109f5aeda33 (commit) discards ae94988166f856e3ef03ba58f16efba93ffa7994 (commit) discards b84b2d40fe7f0b88b919633893351c32762385c8 (commit) discards 9027ac7ab915f4c75892bc771130dbbaae93c5d2 (commit) discards e395f3182bfc487cca2d6a9b17d8b2d459fa3935 (commit) discards 6c394bcb384ded1d609111fda2726ee35303f0fc (commit) discards 7f61763a42b466927d4711d4ad6830c88c1c248f (commit) discards 6119bd7af7dab090ba153cb1752e848282e9c47e (commit) discards 919d278d895b6b5b298d38f63da02ed1baa06d96 (commit) discards 7981172fb6d1e6649dbec0952a4a358b9782d578 (commit) discards e704fca68009272ccdd4d76b46600a23dc45d640 (commit) discards 0a1923e940eb0f874a743baa18c676b78a299706 (commit) discards 6712a5c28983e31d6142d8e1ba95c65cd77ea401 (commit) discards 57835589018e7fbd70a97cc8c063d74e59ee8070 (commit) discards ca997ba3cbda973ab509f7e66df97e00204ca825 (commit) discards 8b59ace9aca2a629c9b4acbdae648ed0db2379b0 (commit) discards 0c1355ff6b6e05324b7d9d28d9b72d91e3ef9e20 (commit) discards 1366ab7171a995f35de6f1a91a80515057428730 (commit) discards 0b58897173d83f41f9805b297f24235e78df4b3a (commit) discards 52d2520d39abeefe97ce69ff3029f487bf285d53 (commit) discards e61400cafdfce42049cbd7c88cf56ddc4217b483 (commit) discards 92d14662cd0b5adebe17c3ae0c1662fc9ee5f728 (commit) discards 229c3f4b30b3cd49d12e2ad74fdf92c7503f0bdc (commit) discards cbf5c655855d6249a2d6c44c3fc6942777f9eb68 (commit) discards 5afd6505b59636275b4f5fef5d2d9d6ec496dc65 (commit) discards 4e952dabb663c8c65844d608d76f7bb7c691ab00 (commit) discards d4f89562594107111e197d4022546ec2c033fe4f (commit) discards fe8976265416da8333cd7497d8d41db177b23769 (commit) discards cade5c78ff25278826bc1690084230a04994a6e6 (commit) discards 5683e63cca186ef87e4601616be013421a8aad54 (commit) discards daf862ae62ad9c11e6352a02068922b42acf2919 (commit) discards 2ad43682e3f665a59e54746d039a7577b976ca6f (commit) discards 95ac2339588d0d16f21327c16b098f4c54b5d67b (commit) discards bcab65ad983297e1455f43ea9e06f38170e9bb75 (commit) discards aab066a87b18d6ca2be47fbd5c2a6b8dd8e287a9 (commit) discards ca466374c54031b22018519868d70c9e917df8d1 (commit) discards 0e9c972fc2cc3d4338890a5e4528bfd7a8b22fc1 (commit) discards ce2c74c4783f0de4493268c27b3aecd5ddecb135 (commit) discards 6f1f8f6299a8f7e05e839573b5f1ae4ce1ad1ea2 (commit) discards 8e1d9db85bd462c8226550f4bea988ff6b220ac5 (commit) discards c282b12f815a95135c2347f022263efcdea1544b (commit) discards 257265241a791b96a219133d0eba22b9e2b71468 (commit) discards 8f4b0756bd6bd8e5a1a6055af373972abf66de54 (commit) discards b25b70e36e2620b4e8480af62fb7d77babff59a4 (commit) discards 2fe53afb2ca99257143cb89e633b7a4fe84265cb (commit) discards 1b855d76829ea3633eea0ec608e5cbabf18c06ff (commit) discards 983421d8048c44f33704dba4b1302eeadd600463 (commit) discards 94a51b0185fde6210056cd3b3b5526bb5e0ed830 (commit) discards 5d3f0e12ed94c4048ef24025f1674692474b7602 (commit) discards 3d87bd9725341f76ba95f6063b177021dd84a583 (commit) discards 11ad1af8a35a744413b405c5c86e1dbdab38c430 (commit) discards 18d4ce24bba376cddd0f0430de906814535b9069 (commit) discards a1d30dcccfa79e3f79ab13c88749a8d0f04f14aa (commit) discards df4c1374fb8c4e1a966fc3610c4af0fc13d05fd5 (commit) discards 7a2e9e8cb77e7ceeb7a160c8e83ed974c3db10b2 (commit) discards f9224eb7b28c6c6456524906103e7f26b5afe17e (commit) discards 5991d310b7b631ab0716bfb9e182260fe836bd60 (commit) discards 9eedf92855a1af4a2a797ae2b4c4404f0e2e2b2d (commit) discards f5db532193c0e1396286ba4bb796f4be38e3a420 (commit) discards 58a3e2d186d1a7c94d1a94ae0cc9b80c86c57aa2 (commit) discards b9ddf9801cb6b481ed076aa63b7dc8e619633115 (commit) discards a6b04580f92ba926fac8b8feb401413824ee82d2 (commit) discards 7b30345dee7903d3793a79f9dc5db620ef95de87 (commit) discards 90c30da30240895a3cf717c7248b84f485771194 (commit) discards a1eca1500dcbac9eea6d8dd5e2f8c77b8fd30dd8 (commit) discards df86dcfb2054bbde8382d3d9dd34ef98bfc73412 (commit) discards 359bc8a176a8a8b8026fd078e075fd9cdc00b103 (commit) discards 85e43143d7ec8a8b04a1cc2d74649dbdf4e08b35 (commit) discards fcbed9bc37a32ad48dbf6839d020c55cc749310b (commit) discards 01ee277892e7846f2998f8101d4ea40596dcdc26 (commit) discards 56f7811ded77e0bed029b0232655ed4d4f4971d5 (commit) discards 48c68b9b5e6a1be92dcaaab66a53d11643ecb7b2 (commit) discards d23543af4435e56da3373dcaf53f5b61fcd831c1 (commit) discards cafd74b307f291f13ac950a3cb671c758676f0ad (commit) discards 0c73aea46ad9b453e69e0b9de331e1d28742a888 (commit) discards e53d142f05e8d4659638ffa513addeecdb4f154b (commit) discards 9db24a8ccd641c94574302d78b9e5b4fdaa84ee5 (commit) discards 2471d0eceab00020e76b20ed7cc06d4df0929726 (commit) discards eb8d2dca610df895a5e069b8377f425caa0a4e81 (commit) discards 726c80b6cbfdc4652f23c8f335def15c70686d81 (commit) discards d1f74eb70b945fcba223b7251dc9ff028bc4e5cb (commit) discards e2c31db68b79b9e2f4724f4fa776a872eed21f42 (commit) discards 81ff6a86c9eead0a376b71947f9d7323d886fc26 (commit) discards a1f57bd4f9a0dd918ca46279dfb3ea03cf0437ee (commit) discards 75b3842f0a5c1daf5b2e37a1ed0ae50639d605fc (commit) discards 838b4ee5b96789d03aa4621c4cb9077a0c8e83ad (commit) discards 036182dd9c03db921115d8baf6adafff7b2c1233 (commit) discards 2e27da53ac949ff3944933adb4e55b368e708b17 (commit) discards 202b5bc9b658502f0ca0b05b8d125011605ac449 (commit) discards 7dc47338642ae77b09dd10b8b34f766043167904 (commit) discards 0e742b994f51085188cdd0311b4de3c40b25c373 (commit) discards 7e2004bb40b7887bb5ba7fa0a4477f22ad6fd97a (commit) discards ec58cf7272fe24baf829b3cd3b0ff0d5eb6d4109 (commit) discards 3edc6014f0e16757501288912d6e1baf6c4d9e6f (commit) discards 2e5cea71bcf7a9a08569b0f2ba1eed36289e0402 (commit) discards 960d2557773ea70b5f9d9316a440634afeb114e0 (commit) discards c968768c5d6658f55550ab95df6e100bebacac32 (commit) discards 86aa6780f536bf360c73562f5b758cc7774b4e39 (commit) discards a37c0273b4c13741b5ab7277f1c672b2d20d2934 (commit) discards 12995aec6a806bc74591548e14a73ad2c71855cc (commit) discards 89d16bc6dad6d4dc3776571b4f90796e12f73607 (commit) discards 8bc030bb2542e02675bacf4dcb219a7f42bb7025 (commit) discards 722a08d1e829205e8ee91f7c5c9983eac047d0d5 (commit) discards d0cd09fd67005deb08f59b7ecc5276ea373afca8 (commit) discards 4ce64ff92d4a22e935fe3048bc7446c667c210f6 (commit) discards 63a47fe6c1a37b6f1d8d3cb57a2bfaef3684ecf7 (commit) discards e0a8a7b26a4f2cb2aef4cef31f1b61f71f7de2de (commit) discards 68157b1e88a1adcb2329c8cbe463c280c0609283 (commit) discards 603cfc410cb4907745719bfa555f7453cb385ecb (commit) discards 11c17bba362bdb958f80ade09d0fad7a8067c67d (commit) discards 1576d2dc40abc74a9ae9c9cf7951f3003cf4ed9b (commit) discards e8148b823b5dc6fabc65a705029540b125c496ed (commit) discards 12bb19867ed2daaa08ff848af7da33227bb90402 (commit) discards f886dc2825f1a6ab17d74d52e8bbfd776e496ace (commit) discards 9e722dc6a52b9c2e1c4960ace4e20a349eebcdcc (commit) discards 43eff66eec36e506acc34de58528b9885b647222 (commit) discards 911af875017d698f057d8cdcd5d26b8186b6631a (commit) discards e0fd7e8a0881bbc45add0e25ed2e9158abca2a93 (commit) discards fc3c18fa230681196ae29b72bf715b065945ad3e (commit) discards 9784f18e93be58286002a1d500b5ae2bf4cb4c2b (commit) discards 154dcb8a6ecea90335d13f7671b005ca520a63a1 (commit) discards 375be98a45b2f56c60724bf79518534b3ab5088f (commit) discards d3a223e4918e3c7eeba9ec2511309399f987cf7a (commit) discards b129f20547e849650e9aee1b3b2b0a6835c748e2 (commit) discards 7845d2aaf7e4f2080892107a4d2e73d6a966ba6f (commit) discards 579af61dae6e3346891f1b53f806d7889335364a (commit) discards 8f2476403501201d548e1225351cd1bcbe69beb0 (commit) discards 82c79051ec8c1790f98485b59caed1736fdf9d8e (commit) discards b07862c453ad0ea7308e2841316631886620a668 (commit) discards 23034b94d4722644d91047a5ba70d3f5f129d472 (commit) discards 1836176eaf5e06b30916e815d0f8badbe256e08e (commit) discards da0eaa8917027547cfcb082a076a60af104a2c5c (commit) discards aed1d8b3c44fb6e1eced38b8d568dd36a0103eb0 (commit) discards ca930ba20f364bd9613a2df1da0074b1260ddf0b (commit) discards e5a23b9d152d9114bfdb65caeb7c33c35ab21b59 (commit) discards 5ba3f1a9068a6504c8a3ae5987a090c6fe787b40 (commit) discards b727346b4081504076b8fd48550325fa7eb31496 (commit) discards b7142b44279f5099047bfdb63316cf85e9cb6903 (commit) discards fc45ed9c6a9eac8ff21348014e4a732e97fcdaff (commit) discards 9a6ada8bb11f910c752cc53a623bf21058b4ca70 (commit) discards ca8727ae1c08f29308875d06bee274c6e7c039f7 (commit) discards fc24ddfc9b93d8a7c4ca1ab8fe5c4a50804a0a56 (commit) discards 0d40713426baaf6368eea90012c431656501d28d (commit) discards c6d96a2f67c494ef9a918225cd95498d42dcc5a8 (commit) discards 68b616696283212ecc6fcbdbab16e84a5d773f33 (commit) discards deeb60ef1fb7d23d4a6a5579b6745197dc033411 (commit) discards 975f8c53e326f0afe1981947d1a601fd3696be87 (commit) discards f0d742bd3d3ef68cb52f17d1819325503557d463 (commit) discards 0068c91c95561c27005eba4a8f02ac48d3dc6757 (commit) discards a70a6138c3c27f2772990020fdebd36004b810c0 (commit) discards 997dd7fe2e6cb1369d6c8435bf34fd25f51728d9 (commit) discards 8154a4b097286c61d0a98703bd5662dd79bd9b97 (commit) discards a7316d4696dc3e6b4d5fae8b09132f0821c2e810 (commit) discards 70324a8882b6a93aef68549b3ccbb427feb908b2 (commit) discards f8fc47db59a6cbd16a4fdd3238e82f8a5561631f (commit) discards e42471b9d4e4e99f38200a87121f46a7991510cd (commit) discards e0aa392d59fed43a0de907fc31518adc8ca1d74e (commit) discards f74feae77f3e0eba265c0255af8cddb93b4482df (commit) discards 2758bf0877fb0c157aaa4b730e138bbad1bf12a3 (commit) discards 87f057e62a474c724580262edc803e043920cf5b (commit) discards 9e8dc649129b8ec711d6fb854d4f9576c0dd4dc9 (commit) discards 7d2e9dd88c154707c7434c27edb34de948a51d60 (commit) discards afee770b4bba3997c10d188c400c7376ab3b36ec (commit) discards 80b043a53de8a349d00632b52a5cb3b2292b1be8 (commit) discards db938513ff3c6d6bd0805da3a8256e6498fc58db (commit) discards 9aa619cbc14d2ab83ca2c00655cb8384bc752d3c (commit) discards ccc35f729ad4ce6fa23288ae77e14c87eb1ca0a0 (commit) discards 1ff6b5bd0fe83473ff25b48336329e90399ff4c4 (commit) discards e238ac6f443823896be5c95435e253971f152722 (commit) discards c0f629593ed05793666c23e1478d142bd6577d25 (commit) discards 4ca4ed50a47ff7136fed3337698b74e0ad91582f (commit) discards 2d65227983c95fe9e33efbdc507e9c9fbf605e0f (commit) discards fc294ee3521d42734791b04bc33d18deb5e39383 (commit) discards 93dba286bffe6f4267b29a67016d0e0dff3b1bd5 (commit) discards 9753c73bcf72c2dbba11c93406501126e93a5baa (commit) discards 804588e64dcbe7075d4272edd26975bf76a435d5 (commit) discards c17b7f72344fbd328c66d01689e47f1520677bef (commit) discards 740f009e4c4ad8b532f7b4e478d0863d4be1ce6a (commit) discards 0259faf1e8b19b72f54645817a0b4cd146d9ca26 (commit) discards 59edc3fb74ca1eb857601c63bb01c682c1a8466b (commit) discards 905f5f00754d5e3e632b829e4f4f2e4db6f64f52 (commit) discards befb6a645026bd7f64b6dc1dc1d370114f501375 (commit) discards 3dde29bc72ad3b3f4cba6fc300df077fd4dc2a5c (commit) discards d803aae6f865545c4cc0702a52f73871aaf1de0e (commit) discards b3e62a0507a3cd749d9add0a5c926aa823e91827 (commit) discards 3fad31b0c32aecf07dc29857e26ee3a803ec154b (commit) discards b4ab772483a971880e4e2baa844dfa40124e8332 (commit) discards d63ea37483c7f4b21e9b6e0f792c57ed7d567584 (commit) discards 30d13fa92cafd44e84a5e3b95373a21f2373afce (commit) discards efe622be144df37eeb0d09c924cd9ccd38b91b09 (commit) discards 6f43ab3049540f3a0c62c50d9e6b43f10fa57897 (commit) discards b00a344d11386940bb57c9e4321d95a82555f044 (commit) discards 37d5107091a9713090f73406b87053a05817c882 (commit) discards 28d08a9e6b7eb2f45773dc5754828eb8de35aa0a (commit) discards efcbc372ca2b964154bcdcb7f43e382aafd22d2d (commit) discards 951d17d1883a8853d5054dc7bb4771e1006a78eb (commit) discards 6b56c21dc954629c65f4586dda1fc0578c7061d2 (commit) discards 51f085974000d064b2bc1040aff7b934520c7656 (commit) discards 279bd661894dc24b19e83e0d5de07ec2061e7552 (commit) discards ac75ecc1800c224c803b1de2af49f071b6aee36c (commit) discards 6dfacdc467dc87ef45a61359039003ba2f4a5d79 (commit) discards 11d249a583a14be654790ab6c8ecc5814018b2a4 (commit) discards 5a9e906925cf7a4512fa8765be35b0d15feccd7f (commit) discards cd4e485a98ef3e1f5151461a3e89955c7f1d10a6 (commit) discards ed92af3a7a746dfeb395b9fd783791fcae2b062f (commit) discards 35447174ccece96d1b4e6304b94a31e03064500b (commit) discards 15928265868c8bb7afba6d4ce9f2f27b56d685d5 (commit) discards 331f211b3779db266082828c0febd51e0d94a3e9 (commit) discards de88d33585aa66b163f280c4d2224437b53e6972 (commit) discards cd86f89237cbe29cc8eadb8e608e2c613a974f8b (commit) discards 930d0f6c8cf7ad0a6ffea015d31491589600937e (commit) discards f8c222228d78472a1135800e3a51580186909027 (commit) discards 8a695f895a2799b84ee65e05d664483370c627a5 (commit) discards 10ca7096fadc19f2f005a7f5efc3c71ecc7448ec (commit) discards 9343a6d101cfdf5489bcc09435a16d36ea858539 (commit) discards 0aeffa8d1ffc19161fb49220441e39121872da5b (commit) discards a3fed59970d77338db0f4bda4c2e90ebccbe9159 (commit) discards 1a7490c01445a431a0467f8bd0132f98c343ea9b (commit) discards 48a3bf498b9ae3d558067639fa0a6daa028d26ca (commit) discards e9c23dd91637f50b0b4a352a86f0126365e128e0 (commit) discards 343ef96f1091e7ccab80d65f6ef9a225aa6d6064 (commit) discards cb44094bc5b30993d00e5bea055a02323b6dbee5 (commit) discards 70d052f71ddbf15754073f0d3ba5621f5dc06524 (commit) discards 45c6d45ad795580eb861ca13b4d81f8f6d35943b (commit) discards 87a9ffca5fca9f6098e6098060b762a20a630a0c (commit) discards 65f031a4cd25ec5d1ef3dcba9b6bb3d60fc5ae06 (commit) discards 017e5a49c0b5014fe1652f9f509a96acd0557f18 (commit) discards 797ab8a07f04ace93957097bfab082d0d9030e4e (commit) discards ea86f387bd68596159f38b18863072769cf3df58 (commit) discards 25899e8a9dcc633b6e7495a87299354a14cb834a (commit) discards ce7f0cbce58b4688991df6db0e00b944443b53d2 (commit) discards a1fc9467271de8614be7c44e4b42613c7e5e2c58 (commit) discards 345e669b0663a23876c815d46463ea90685bd110 (commit) discards 9afe1ed94c46071b5ec0b3ef288493d355de75db (commit) discards d7cc6846e9bfce3f59161ee1485b181039276d6a (commit) discards 246539626a1dc8558202bd0b9a343b3e0af1f426 (commit) discards b1590ed97f354ba39106a56656fd5829395a0fdf (commit) discards 13ecb9960b84fe12059630e8e677eff6ee9f1715 (commit) discards 85ce7bb6a15ad2d2b13635c04806ed62b2a1c32e (commit) discards f06dd2a0451d2ad6546a1be7894a27f901a12577 (commit) discards c5ad71bf6fb6db3530c060cd1d741c664b8e601a (commit) discards d16d98e86a084508666fd9768b779ae0ce96763a (commit) discards 87a944984abeacbc984e3197f7bcfe54faf6aaad (commit) discards ed5cd9993461fabf38e9986dc52b304cd5f2830b (commit) discards d3c1b906906bd6abab1d42fc1166e117b7ce8567 (commit) discards 8752d765ae63edd5153a0547727989a4efe4d809 (commit) discards 425a1248b7c91f3bd1d2a4facbfca2b7889878a6 (commit) discards 8d52b94262c0201b37aab554d306a037a48e0ca3 (commit) discards cb33be0a1655e5b9bd8abd609ac3c463182ac586 (commit) discards 00b16a866aa3994263d7536a862225150c8dce1e (commit) discards 83d0c9351f516f3793551e8b6ef8fcea054dc9f5 (commit) discards 9e42dba027b1e2860a21dcf3617f13c8adac7204 (commit) discards a7083a7af8037617200f7283e8167f315f13acf6 (commit) discards 87998458c98ed15d77a0dd129ad1bea4968247c8 (commit) discards f63cc7a5a50f65d8d087658a4cf7d780bbb3b041 (commit) discards 66afffaff5060f50c97db78c212ca8ccfa38c01d (commit) discards 462bb6d997f8726cb035bf6a8e79302b41d1d2a5 (commit) discards 0dd4aabd64ec6aeeeee8cd94276c247139882bf2 (commit) discards 6b3464e88428f1c3856c610901265bc5cf4b71f0 (commit) discards 6bca9d652806b40346e7e80726784d16c7634640 (commit) discards 40cbdc24ce4fa2171ed001ccb09e4ddbe6689909 (commit) discards 083f1806004094f87741ba58655d7536dc05aa1d (commit) discards 0d7c9712e7f60e3c7b7652d3fad45f7b4ffa7e23 (commit) discards ed02aa4047c6e5aff30d1cb20ab29678399379c4 (commit) discards e42a39918f784d671ce7f51d9269cc754e263e44 (commit) discards b8ececb4b62f0fe2bb3fa7000bf00df327d76de5 (commit) discards dfa796fc2815c89ed7a1fcc119b12bcf6afc8294 (commit) discards 5871837d2774cf2f6bf50d284fb705c6210640b2 (commit) discards 081ad4fd9577fac940884baf7fb875fdf36a0961 (commit) discards cd275e331a9406bc479d325b429717b1a643358a (commit) discards 8eb648208f91d66b26bb7a9177e1d5d1fad25575 (commit) discards 54df8a8b0a1148254ba838fe6901fe2f2bf173d9 (commit) discards 0c0137edc49ed3612afda8482f0d4509269e0842 (commit) discards 4f045166ca6731971fe852f501c4a266031786ac (commit) discards 25e5ed190800415a6423e98e3de023a6b4b3251f (commit) discards 3e380ba055818d14064c42080ffe00b216b92b1b (commit) discards 2c0c7856e20026c74311d927a63338e26cfeb727 (commit) discards 623c50b9ac306808df37f5cb1bfddc5883d83f79 (commit) discards e57f054dd843dfaf3e286b56ebbbad267d9297e1 (commit) discards 6bfda4fcb221fb439ca6b6349a7935e34cbfbcff (commit) discards 4cb699fda5a6f70e1641deba4730a87fd287c6bb (commit) discards 27e09e87e102af3e13c0912dcf83169ce4670e73 (commit) discards b567cbc8f72240d87354a016a046796cd7c68cef (commit) discards 5d7a57d5c193c6b3395b5897d62331f922b2aea5 (commit) discards 99cd51f2873a67511dbe7be81b73845c42d13ad9 (commit) discards 2d3a0bc9bf0ffe388bfb93c6e696c46140f55bcd (commit) discards da60667b7cb4e60036736d782592766ef8ef62e4 (commit) discards 6e3215e77b4d73acf662ddcddbaf9f762dde77e6 (commit) discards c9121b67058dbb5bc2a4d57b8546e5b058d43871 (commit) discards 78e78d1c87dfc70be70d58a6ba2ec949df01ef6a (commit) discards 00e4052d40f668ea99b8dad204135ce2095483a1 (commit) discards 093a63a40a455b357f3c607d271c240b08b7f2bb (commit) discards 5ae80febe60a0f15532ec439a742f30b5101f552 (commit) discards b61a64b3018b4be126f459348773f58d21f72a23 (commit) discards dea9826731fa7bc9c9b9cf58f64c9de2a64a22b3 (commit) discards 655237678cf45b6e5f957b7eddb4576b72944747 (commit) discards baaf49013308cac99f67e6430a0553213c31b922 (commit) discards 4aec72dd1907952bb874e0e7485a7b89a1ff6426 (commit) discards 68be8cd53896acb0652261fef080155dc1a5248c (commit) discards af8e08dd4a1ce3a78ed604a9ffc1adca056ab125 (commit) discards e623fc98ca6bfeb4f4fda75b21542aefbcefd78b (commit) discards 48b32fae344ca8bab5f0b93b0570e4d8b7ef1eca (commit) discards 1ec2259fe60a0d147bd85ce171120a5bdafa6fbe (commit) discards 62c369ab85c290d28165b6cd176f797e919688bd (commit) discards da6f1e440ef5804656ff085761233d6208bb613a (commit) discards 0bacb0f108a2e2b0670d5a17c031cb75b8d09428 (commit) discards 4db1df2da06cfa05b1f26546ca7deba40477b4e6 (commit) discards 635a4f5a4fb965ab98cc60d068101ecb03d6b8d7 (commit) discards e30f686be781bdd2925b9b072d1426e53d21494d (commit) discards 638b4a01bd13db022e54361de717e9b9e924bfb2 (commit) discards 6f3d37eb3efbfdeb8c947604cacde7a3aacf2164 (commit) discards fc6661363956d97e4f726623f0b551bc4292cac5 (commit) discards e12a6f7e80e034970286d208fef20031d8052a19 (commit) discards 521b38f8014025b4e5b3e3eeda4f7dd3cd88946b (commit) discards 6bcb5de0c65497edab68a1cd3e3ebfde36e11910 (commit) discards e19e1a85857ea93ea4aa2e0c68e14d5de8efa939 (commit) discards 24e158baed042535c40ec9d19edf7b5326269861 (commit) discards 24658dbbe973d747c9ca85471e5391fd830d3fcb (commit) discards 3ebb968dbc9ddd3fbadde1f251aaf2c3165a4512 (commit) discards fee8fafd78db49852ee44a1d8eb0a441cd52ccd1 (commit) discards 53f189c917de7b6657524f08e18502f445693712 (commit) discards 46de2f5b1cf1faa3bc18659b592306753c61f66c (commit) discards 67dba415e6f3a9d45d84c7790c4447625f917999 (commit) discards b93f03c8e15a8a2dde9cdfb9d239d304adbaee8d (commit) discards 9fdc122bdbda2057f6b44c3122b3199e33ce8bc7 (commit) discards d9fa27a6b1a4088095d8f20da8ca0542a857e989 (commit) discards c2addd198fc7d6b417fa25e28d2d1f127e1e3288 (commit) discards 908cfab96a7cb0edbde586e6b31d28f36623577f (commit) discards c01d364e2bd3ce04cc251e44aa21022204d69176 (commit) discards ca0497c945460a10d2bb273be1f39e35c9c88742 (commit) discards 50ecee5c02947588ad55575ec41d033e318087ba (commit) discards 7cb415ef8b47a1f0ac6a40c2e7e2a6885a30c78d (commit) discards 698e66225604dfd7b2419d2459bddcbc08c609b9 (commit) discards da28ae1b3d79b91d94fa39aa7228b0717374f972 (commit) discards 755bc1d12bcfe2c4cac7fc488810d7064f774acf (commit) discards 01ab6482024e10c64bf435b4e7bd58cc79a2213a (commit) discards f631705425da0a343b6c27de77be88fcacff34e6 (commit) discards 05979c39509615e10a3b2bd4a5b4224dfde4c3eb (commit) discards 320f5bdc1cce81292367b04ebcb733375ab81d61 (commit) discards 819f23c6ce515c1b8faa390a9bc850bea3eb4072 (commit) discards 8ccd6aab9a0b2f3df48abdc6ed5086dcca576224 (commit) discards 9470d1e8bbcdd258fae66165f9cfdb76b7175179 (commit) discards f7e7afe9d54fac4527c70e0b8a9c463aae3cc4de (commit) discards 9c041eab42520c99c753b9e5be3c52943a834e21 (commit) discards 94b028b48a1d7f1fe753bd4e626f24d4240c7436 (commit) discards ef65af0eeccf9a0137c258e5d5efa7e729cb2072 (commit) discards fdeb50d6b51a8e189ebdb4da88b464cd981e0ad4 (commit) discards a9cc3756b63bb064850b3d56e60edf755738fcaa (commit) discards 7a64c3a1859fa90ee44909a412fafcbf7de6a6e7 (commit) discards 38069fd6637b062806a812bbc490bd2ee3406913 (commit) discards 98c49311ea16241edfb240eced28628677cc18cb (commit) discards 40b8e22e55c20d2ecf31fe51ebc22453ec28996f (commit) discards 50eca8d02d62159621925b248b6525df2e974892 (commit) discards 062a47f11cbdd8de610c82aa94f3fc5307817e80 (commit) discards 39c455a26827178bf2b2cc585dc59fad3329b5ee (commit) discards 0dd8dc67bc08d52744d501bdbedd077d2a1641a9 (commit) discards 9cc5a4dd1f6d764830c7da33fa0c735124b6cd80 (commit) discards d71230b33fea484a758726f12dc98bed95b5336c (commit) discards f4028af43e062cb4b01e743236fd3efc3d0ff47d (commit) discards e5d8ff5cf57be72c60911b6e2bf5e47dd8ad4c04 (commit) discards 32389a10550df33224522978f5b9d6794c628d55 (commit) discards 9040d96d3dad86d081f76f957e9dfc54b7379406 (commit) discards 799348a2d38e6237561168184fcab801262ffe3a (commit) discards ef50bcbd7b73dab0bd20ec0b9ae72aab01511bc6 (commit) discards 0bfbf20d0abf33e79f29b30989681b93905b71bb (commit) discards e638beafc895732f2e1ebb91bd6f5c8ea7989f28 (commit) discards 8770a8e095d9c6a8da636054bdf0ac72f3659e42 (commit) discards 25cb07603b4381a857f39189bd96e3dfec9bef20 (commit) discards effa38cd6f4ef4b71e04733002871c492bc203e5 (commit) discards d34a12ad76c1566ecc4fe02ed25670b0d679540f (commit) discards 1e3dba183f2b00b25ef9a8ce3b02b8ee3f0fc256 (commit) discards fa8df52d0e03b45cb8a46f2c6e9647cee33fd60a (commit) discards 0a47e1d9ac4ffac21874daae332422e125e3aa41 (commit) discards 1bf869716b00f925b6a315737d8c5553b2d04a26 (commit) discards 8be68b73457470bf886b9d633142c8d3e91f1d80 (commit) discards d7bc7c89771a582fb390d2f8c922515acddaa2b5 (commit) discards 5761b1dd875d857991a0827e65b7128b73d7f8f7 (commit) discards 16dad45d29f6fc8a84c2ff5ae2ca7c098b532c9c (commit) discards e80e6644bb7f4eaf681390b5071a01856d6545d4 (commit) discards ab07619914e3857c213d733c8c46a1a439a85ed1 (commit) discards 85997982e51177c966c691dcd660b133b74f6229 (commit) discards e0cb8675975b1ca4d3576c1f0847ff9a6bad1b1e (commit) discards 638f907bc6f61935714d688df20611fc65385c27 (commit) discards 11a80af5b291997c173df0451fddfa3aaa4f4752 (commit) discards 62f19fc531e2d3cc292005bcfaedc341966c01e9 (commit) discards a0d49a9213400b3bbb9f2505d09e47c3680a4680 (commit) discards 8bdd65e82731fc93ad9a9c63658b104c50fca82b (commit) discards 4812110823f42f84573a23c87459afa91349995f (commit) discards dc0edf29b65c50d25da84ecca0c48131f5da69c0 (commit) discards 978941f83ab3e4bd80ac52100a13c68a85bb8ce0 (commit) discards 99483b9f9828e459e3e7887cea02d82aae887866 (commit) discards 677090f0749b78f9cc44e33c7a77c6eda977be0f (commit) discards ad4b7e05980bd53686fd48ba341c954985ad3056 (commit) discards 2b114c41b54c4d14745b2b98c57ccc7c92111f7e (commit) discards 1fc076d1fe196d2112da45a6aced04ca39594401 (commit) discards 738e3e9d9af191e7f118e182bb3ba3690430e2af (commit) discards 6ad153786f119e994662c2ec05059cdf46d9dbad (commit) discards a11a408a6edcb956fe9ba7a141cfbfd8e94078d6 (commit) discards bfa30fa10056b0ee07a58b7d09bc87617fbb7cd2 (commit) discards 12520e0f723916bb803946d6ba6f5f929bba0120 (commit) discards f9d90d054510548490d0a7555b186201ae9f1a45 (commit) discards f57933cac8dfd8d4c64d970b1991c263154b0a82 (commit) discards bed34f1bd81edd04d55a46cf43658b8339aac1de (commit) discards 861e2da31d76947b8358930c9f43eed0aa15b642 (commit) discards bb1985c5408ac6c130c3f94197fcd987b7e7edc2 (commit) discards 8c020fc541e6a00736c9897f791e1a3ea76ef0d6 (commit) discards e3da80d92561e8a5fdc65fb0a5db18e09cf9ef1e (commit) discards fe916d26c37622ee0c6198385dcf86ea7fb545dc (commit) discards e7c62e41461995c3ad73be65cb7a9f63e77081b9 (commit) discards fcb3a56802c4bf8757424375baf3c4fe053aafbd (commit) discards 9a296bc30b860e3360fbc4b7adaa1113461a1c89 (commit) discards e99e08cc167535daf324d81d510ca8f818ce924c (commit) discards ca4bddc08179c8c9c1585f1949bbc840869c1d9f (commit) discards be096139cf7380f89d8aaad3ea283559b27b2614 (commit) discards 064724040af65c7edc985877b637560620136565 (commit) discards 61cdf5d4af56e5e5f7d30448828cc7a35a8ae4a7 (commit) discards c583e887954417fd07e64061039da5184d35ee69 (commit) discards 037fa07721e5c990f30e8116d987916d87fddd56 (commit) discards 7184f486f54f39fd1584a876ca67c27da07e97b2 (commit) discards 82e65010ed8cbc807604fc618baa7fc176613a8b (commit) discards c3bcd014a7452256dcbf738d753944a8d7ed3d78 (commit) discards 87ff791424b715b1edd31c45b834fddf92a38646 (commit) discards fd22d5bb476eac37896bfc43cdd4bfa4bdd4fae5 (commit) discards 795c4172d8c78c66cf56e1728543967d0f81226c (commit) discards 86255f8911796de904245682e3b0de2adfa571dc (commit) discards 26b134edb36b913f45a63896a2e4c06993cc0779 (commit) discards f0a0e4559c17020101e3e0be18bac54e27a263cb (commit) discards 7a7da5c4909f2836bbc52d86b02ac14a4c8719fa (commit) discards a9d5f76bc76295966223211ca15d07e3b91a3387 (commit) discards 7159a29e50c3ce63b70994e6bbc915f38bb09851 (commit) discards 9a429125465a38a75d23b85f6e1f55a9cb5e83fb (commit) discards 8c94b5b004606dc021e153e0a4a824a3d9db6750 (commit) discards 031a9c4558879f4f5b5b4f5122623a78066e4638 (commit) discards 4a5c14a5a15bc82e8ea045fe1c8522682b17cbdd (commit) discards 81bb94aff906c89cd7bc0cf070df1c34c0a4086b (commit) discards 11ad59ca59a7d1372588f14f681211a2ab3ea71f (commit) discards 33ab8bdd0aad3e44e8d85a730daca64c26ad71b1 (commit) discards cc4220e76c9a88baa0232b2ff525900e297b3827 (commit) discards b2a031f4cb9f1d9180caa990fc13697c04459488 (commit) discards bde497f83d311371731b737cfdb9ced75af840c8 (commit) discards 9c57ac5ad8f048dfdae7d5e28885ca7bfa70b938 (commit) discards 98ca133e64258f812a2359e356b13759775a0af0 (commit) discards 33a62bb0e07dbb345fffff0387a34ef2305ab2fc (commit) discards 04abc90dfdc88b3759829a27f95fd8bb35727c10 (commit) discards b19a5e3ebc1c53fb1c4b7c2881e2ef0ca57ff60f (commit) discards 362e42d39e9b451b7e8aef05644bc26ffe964abf (commit) discards d08a3b2ea3f9ea4b254a9bd70d66e05e60c82814 (commit) discards 98aabffff41aeef2b549c3a4e2cd0962c48d59bf (commit) discards 738b10e44733c713961c3c54d35134434ee010cb (commit) discards dbc3fb0a90ef09e1b1b31da0a26a14bb1f804f3d (commit) discards f0df3d4a123545d4e0d0c1dddb7f0b524efb403d (commit) discards 0cb012e03cd6ad6b12adf3b0547eb91fadbe7292 (commit) discards 5a38fe2135c8f421e79027ff0f5d6525c6c4449f (commit) discards a6d9d783b45dcec84dd16b2fb0f0bef53c0b2487 (commit) discards f80a4113e66cc5e83367af25c96faeaaa95d7a46 (commit) discards d89838e180cf2d1f6aab2c403135d599c775e9af (commit) discards 7ea8c85db1c15f2fec85203a6807c6f06555716e (commit) discards 5eb9be54067af197934fa74a2686d152904fed77 (commit) discards cd4b2e96fbc1f25f215baec95e10c6b338e7adc9 (commit) discards aebd6167111f2fc6247dc173ff16917316bbe660 (commit) discards d708b54d0dc44340c71b7288a719f846c4b27a39 (commit) discards 826dd1ed9908ac29fb375b7af232e7a13eaa647a (commit) discards b290832699d3baefa7588fc25fd03513d2af82bc (commit) discards 430090e0a6c186291491cdece2bb2e349343a331 (commit) discards 61a017f8810c9478009fe9e24e2968798bd13b59 (commit) discards a668268d9bc890b5ec0bcc6670e399a33670674e (commit) discards e1f3f613573bc2a000ea94485be12dcfed588761 (commit) discards bf1c52ecfbd2d5abd1ca6e761c284aa9fdd3cc48 (commit) discards 9e0ce22cee97be5f6aa2a62f5b46284d3c4b1148 (commit) discards 96199676e0d3a8d14480b781b5e0534b2d342006 (commit) discards f1e447467da748ba794f001c72cb0df5aea175d7 (commit) discards d64488359696c8ad9519daff699ac9f1d93b2b4f (commit) discards d0c8e915ef09b5596befa7b7b05e2b1ae189141d (commit) discards a03507820e8b11bc65bd678433c173b92b3549f6 (commit) discards 182a9161f714d4f122cc4c2d31abc0d795f2f9e4 (commit) discards 0ad6db5d64d0a4554c57603f3e5be4c4d9ce2f7e (commit) discards c6eb99abd626f42c980712ac9732eae0489149fa (commit) discards 873ec699047784aa9072e8fb471aa597e573d084 (commit) discards 1c66f23abbcf9c9cef4b72e601893336553bc186 (commit) discards 29332a3ba6593ebc2406ffda9cbf6c9e3d33a875 (commit) discards 2d315d2f59e3bbd4544cc33b718750f1f3a6cea5 (commit) discards c37d2ef32fff9f9d991ef78905ed2097718489c1 (commit) discards 850a4ae4abbb5d5a61862bd26bdc1e9ecdb3a6e6 (commit) discards 075c74e6b33c652222d0c63fc35010c211a4caab (commit) discards 6b3d7f642cab71d8ac0fa7fba01739d86d909ac3 (commit) discards 15d79ad650d39c88120c897c40dec40ef756948f (commit) discards 05a67e9379ad46bae5a2146c1530f33d888590d3 (commit) discards dbd83843c85a8d6db2a41f4b12c0ad22162cb18e (commit) discards 89a08c97932ddd3f5083996a8fcc530ea88077aa (commit) discards e4ad8dc8cb379cd5875f079c6dea21fa89c79611 (commit) discards bbc5b5cbd9beeb0091fd8b07de4d4b2ef0b48f91 (commit) discards ab1846f43b8eff95eba073a9df2414f24601d7a5 (commit) discards d8fbb7d2d33ddbfa69f13e86c9da293591bf8d5f (commit) discards 43edf727670912226bfbb7d9b4579e28013b42be (commit) discards 91e3176521915a83fa1bbe3efbd03042a906bcc2 (commit) discards 8007742a3a19ff7d9fded4ee7a8aeec8201dce1f (commit) discards ae39fdb6abaf63e7011652de801fbd4b478b2002 (commit) discards e8da83dac6744b6c72fc19ca6372ea0feb2ccbdd (commit) discards 4d3dd12b9e27f4675d07b907a313c942c7b4cffe (commit) discards 4f3bc561c7c08a06ecab628d5492212a399ac6a3 (commit) discards 8a5c096810ffeed47062c20555f3e138459a76ed (commit) discards c37e43220147d6cc2e677088953c5ffb510dc8ff (commit) discards a19d6dc8f66ca81b9e9e8b0ca329ec04ff6879d2 (commit) discards ef255b495f0258451eb53ba6f6525f58a4b5f60b (commit) discards 683a63143a68a9ef50c659e86693a16ccc210c8d (commit) discards 9c9dd3f3ab771a24254960784e77975f4f1d3a7e (commit) discards 617af35806961859b3ef479e793cb6d48be6c30d (commit) discards a9b8668f4306023f2a046221c8c27e486484b1ae (commit) discards 916478fcca7cf98494207507e1567360b07dbddd (commit) discards 188dba7ceae98682307541495294e54d3c6824aa (commit) discards 41b3c6b77a37839c5bbf93c2f4b2a19de55ab19b (commit) discards d10f2d8b29f54388f74beaaf4a56275d881f5b85 (commit) discards 6a1e4d673a8ecf9aaf3d7335c84d454c40f417f9 (commit) discards a0fbdb8b2c928306848dd19de0ceaf5a90c741a7 (commit) discards cdf7e5800504307b820f742fc3944391d6e37292 (commit) discards 3932f9cf5e3ffad641988e6f36abd69c02667fe7 (commit) discards cca431403460e5d23b38ad528812dadd03e8c82c (commit) discards 1cca31b2f5b2ac7ba21711fbe612b37d1ecc6b6c (commit) discards ccb9a992dc78d04112075f4667792c89239b74d1 (commit) discards 951bc07441bdf29dde92ff7e0a58ec5b21a847f5 (commit) discards 250091ffa36ef6df3f4fb9429aefaef95bf70661 (commit) discards 2e928b19d912dcb7db0c6b10a89a35c5b5e2462d (commit) discards 03d5ae0b37adc3fd12fa2bdb6b96252182f48d2a (commit) discards 08f570b7fb76c1895663ae8665d2494c988069b4 (commit) discards 15df44b216c93a123bcb005b33795e20e49f11f8 (commit) discards 253e20a8ccdf6fd9287faf8cde8af74ecd13c471 (commit) discards c541113797bcb0da4a9fbfdde8e7eb72d609a005 (commit) discards 6138f98f924c11df5ca309861930f564a0fd5fea (commit) discards 644cdf712be93436cbd3401d72852f5d4bdb0e2a (commit) discards 12924660b9881d24b60ff13da840d7312fa0486f (commit) discards 2b7105307a5d47cf29bf03d1d1bcc21b16b476bd (commit) discards 10792e106aac2e5e3675c96b943818541620aa7c (commit) discards 662661b2b462946f8ba6c82af22f014a18619756 (commit) discards 11d0fcfcfecdcef2e21a1acb550979d208e43aa0 (commit) discards bbafe31c4f905a77622f6da7307c05dba838ac80 (commit) discards 1dde35c113c24ec4d47e1a624ee68ae797e6a2c6 (commit) discards 8bc1788a12d60261a957b98254694c4a776ce62a (commit) discards 0a8182399db73fc85a98802faae8e534e4d22767 (commit) discards bf26fa0d1e1eea567b656366e0510e9018b530cd (commit) discards 1b6398fea8e3606984decc76dc0d38092985fbd7 (commit) discards cac8c6542a38c2a234e39af7a99e46e8ad5ab336 (commit) discards 7a4d3516aedece0736be4c1ad1702522a3526dd6 (commit) discards eaccde1e472baaadce7f8417dbc46ee41cde09ad (commit) discards 7d693f72615cdef461fc3f22b5aefc7c5d6a93f1 (commit) discards a63f6c7ac7e406abe9c12a524bf3f11b1666f74f (commit) discards b3969f32b26ac79586431b90bb0f3cfc5e426b7f (commit) discards c1b34ccff27b65a058d7c880941dd57a144e9541 (commit) discards 2cd471cea4e4101180871087aa4d3080e0a040ac (commit) discards 4f29b3241f92887edc055c98b033953d2adea973 (commit) discards 7dbdc8675b1235e2f416c05dbb9b00f07c956ade (commit) discards df237068ee8618e19354d2fec3f0f99b5a9fee85 (commit) discards 5afd0cbd9173fde8a7c73c2810a44d0e76c4a294 (commit) discards 934a2ecf613e22360ae0aac25294a79a7acab112 (commit) discards b2d8050a9bc4ade6a4ca5b41af91c61cb1bd33ab (commit) discards 48137ebcf2e3a03e804223bbbb409421a424a9ea (commit) discards 0529ab5c59664c55c70f3e294374161e93fb1e4f (commit) discards 36f230df30f4308a6b8db51aad38cbd0028ebdc8 (commit) discards 14b4657dcceb1a7025e895fb55a61c14e62b6d1e (commit) discards 57090700171551a723a1a25628b6bf806a358d02 (commit) discards 1c9b455c48aed37ef0992f40fd4cf189e648c45f (commit) discards 1b020c5d0ce1085199bf3d68654ee02eb401d5ac (commit) discards 8bbcf863e5d24a91a371ee9dec87381d6e09da9f (commit) discards c0566538859b568a58f23eabe12e49ff2370a140 (commit) discards a15e3696ff5b80792bc6de10a27b1826735f1825 (commit) discards 0ed4b78da380e9c0f2ed5c2489863bfe47124c09 (commit) discards 1554a1b92f5fbdde852bc08e5e3534e42a914691 (commit) discards daf8cd4836854ba7640edeb629d9049e9f89a8f3 (commit) discards f38a17f8898caca1019d5b1952760315bab7aeca (commit) discards 62a18526df331e96c3e3e5a3fc4dcaec24657f80 (commit) discards abfa2025ae10de25d5135b6ad010750c0addd3f7 (commit) discards 81666a6fb2567c8f71649db3c45ac00bdc7287ca (commit) discards 56bac0ae7c1e982e995546e8458a0f73b0f477b5 (commit) discards f692f66d492eca3a4f28a6fd496c9e3e859538d0 (commit) discards 04b220a713c10791a2e576d620f7189421ca5749 (commit) discards c84623b72dae79f9bf61d7e31b0d851e65a9ff1d (commit) discards 4b4bafda73b0f7221498153e7bed69b9d44e7982 (commit) discards 096d0ba6919cf78b127408cf5bb5b5404a77bb80 (commit) discards c6da78dfa74d2dbab57535d864d2d1772763d008 (commit) discards 83273ca5a1d36a6f05695d4c90a9e30c2874a087 (commit) discards c9477b66889974bf27c435ef951435a557bfd1b7 (commit) discards 55e72872796d6649b17edf4dbca2d2641274c5c4 (commit) discards d8a2506da003e45b84c1f8e09960b60037be7434 (commit) discards 970eaed46afef12f003b51bdb51f5abf62214b19 (commit) discards d20a9735cddbdceda3ee3122711feaab7cb74818 (commit) discards c758d6a57f6f8ee85be063b12123560fa4d174c3 (commit) discards 3e16d885e07a30f644ebc4cf2397bcc1ab0a635a (commit) discards e10f5fc665ea07d533a9fcd3ee6f519a650491f0 (commit) discards 20f0028cc656e0065db09058888e2a4905c0cdc7 (commit) discards 71d0308a6f400bd9d2cd993f71461c55a1c3d57d (commit) discards 3e2cd04ba67acbd3962e98374a357bc2c45810ff (commit) discards 06217388de8014f32173cea9244fd5a43b40fd3a (commit) discards ecb6df52a1137c6e176e54263ea1b6f9a0848a31 (commit) discards e52f1401237c7aa646ca6ecbe7f1eb78b018607f (commit) discards 37507ffb11c441380ce6d6635b3992e09937f090 (commit) discards 20b89cd9be9f35c547e4cebc1fbbda251cad954b (commit) discards dd46b956f2feabbf8041dd8cedf086dca5b54622 (commit) discards 717ece197f2931fe9d633b0fe1074aa3416eed0c (commit) discards 4a5e3beb82eca0e2a1358c3eddfe41939ebdcdb8 (commit) discards 00d115a1dc184ae5921040d493200090a9dddaeb (commit) discards 4e757ba79f569463d57ddbe327ab21882214db70 (commit) discards 25bd0c3824b55ba10c23bc837ca28879487686bc (commit) discards 8c38d8ed5f41f8b57e94b1e9dff923462f992d87 (commit) discards 48dc6343bba3b3f296d35ab060681c50f0eb8cde (commit) discards 8872cd142ba7ad8e3eb36f06e92bda35475a9e90 (commit) discards 435e2ab79c7f293254eab39a5a4150883e9066ca (commit) discards 05c29d64b440766b28622db87d5ab91069ec2af7 (commit) discards f4cc3c36d7a704951d87abfd3031182871aa0d41 (commit) discards 7e29fda9fc6f0081825d1961249d3e572f460b9f (commit) discards 721ea794cd31ba2c2e96d35eb7b15d97db5c4642 (commit) discards 3e5ed14eddd17e6f98aa6c3acdc342d4cb2b9c8a (commit) discards f6773d23c4ca2cf59726734aba131f2be36307f0 (commit) discards 388147085e26ec8e8589640f2492cccfe14f3f8b (commit) discards a67e5b8ce377c119914fa8e0983defbbd3daf146 (commit) discards 144396b37723d63ddfbe3c6245adea884beb227a (commit) discards 448c5887d042e2cd6ce938e939602134c1a7830a (commit) discards 5d4a3eda276b5dc2f98b61d5ed532e199e4c0ca8 (commit) discards 13ce471eee787ca728646f4eec102f5ffc327efa (commit) discards f07f592ef88d4db60780a737c78b2fc0aae3fec7 (commit) discards 74da9df98805c96d2846be6c7f735aa9bd0f8030 (commit) discards 7b960cc5502785e6bf4e7e0a4d166c71330bda55 (commit) discards 636110ae1f022f80fba39365240e1153b8633332 (commit) discards 41a8b8826b8977446cf5a95b77c59949674ab63a (commit) discards d2594605c46f3f388b9a13f9cea69ca774fa0f78 (commit) discards c4f92c25d9222a8f6c6bcc112146b6784c61bb29 (commit) discards b9b234532cf6602938d843ae24915222af7b11ac (commit) discards 22a76e3b9116497edf0585ede878f7ce28cba690 (commit) discards 51985a880bf3a93b161159cac04e8a2edb268010 (commit) discards 55c3ee103dcac6bc4659993deee069b53bcc008b (commit) discards 57addbd3e72f7f16595ba2245a12da9eeac12535 (commit) discards bfefab9fe5a3d517d4aadd02ecde2b064c438fb4 (commit) discards 034caa27f1e377ea44a613bc2851a172d9e2afbb (commit) discards bc44627b671c48e58dd835115baddb62352f40ab (commit) discards 9587f55249c7f5c0f1dff25f0181f1e8427448a9 (commit) discards db8d5405a0bb2fe72d87aab7c984be3cd7386368 (commit) discards 972a121a3cac7a461f40c531e9a107af677b2d42 (commit) discards d867f8a05a3fd748fbf360de2baf96f8136c5a27 (commit) discards c6e3049340f37d3a8feb19afc184e335e41fa70e (commit) discards d30c1c1e65d3a3cb2599c2b161600f196c059b49 (commit) discards dc1dbedc733126da4ed0fff03cefab71b0692d22 (commit) discards e6bfb7d0d6a053aeb105a2480687519095b35b70 (commit) discards 567b83acbae9f986bbbe0d85770810be4b88836a (commit) discards 7b3e38b04e7abd7144b33938f839c61aa92e6660 (commit) discards 174049de9c674d86052f6f091f6dfe1c9259266d (commit) discards 49fc180cabb53ac734b335cdf0d05c22192690c8 (commit) discards 18d4165a60d8f36d32b0eab09306d84a4cce4b0b (commit) discards c751592abd68d027235597b20bf3ae4143a4a73c (commit) discards 62452bbd410a93493f9d6d5f668a5f4a3062d941 (commit) discards 5b6200ee7c0c1b5930fb8b40f544b9611c43a35e (commit) discards 91237c3208e4bccd1f587d639c3540146e6d0505 (commit) discards b76fd38ba8d4718faa0e0766823bbaefaa3af5c5 (commit) discards 55ac87c6778b86f37338db13a2acbf052fc7c8e4 (commit) discards 7140cb5ba763f473ac0717b4dd080337916259e1 (commit) discards 1cc3c5f70e71d12671fdad6d6c7b3bebfef33741 (commit) discards a135841da3110538f92f9aa51923e51157f31f1b (commit) discards 412f76c6b8a713a158396f385bc0521cd3d39f7c (commit) discards 67849b913481d1e686742d8e543d0dc97495553e (commit) discards fe54ce57545ae1292a94b28405c4fa65e19f5748 (commit) discards 10aeccbfbd4d34050a470f59757a81cd553f0eb2 (commit) discards e752540b9f56d82cc5527c681c3883df66730c48 (commit) discards 9e301f70e0f665aed783977a239d2712775a0aa0 (commit) discards b8ef638e8d7bccb3109e87770f9ac6a4b3482726 (commit) discards 858f96eab547ea0970bc087d6d0b77c26f4a377a (commit) discards 2855b6583f0bcb2a5664e45e427e660d82145db3 (commit) discards 3074cb55fc55ac274f387f1855c1e8aeb15a2436 (commit) discards be4e2d8c81a4d3299ed5f748b79cb2a20b1394c8 (commit) discards 6d7ce1c93a510a105a2de202e2d8f562ce62a1b1 (commit) discards 5eebafdd1a249036204aca4444a1f4e81bc25ddd (commit) discards 6125cb89387ad20437bdb658bbd1f507a017ab5d (commit) discards cb6558209baee2c3c9c41c8b3d71d0cd177983c3 (commit) discards 585f2fe0d62c40a68c0a9440372a7062b477c67f (commit) discards 54f9c388896fb8b9d5054801ac1327de43fe245a (commit) discards 93f61c33346611db0f83529a8901bea84195f277 (commit) discards 48ce4c6d0c7b1b5bab33a4722a63d1116a22f84d (commit) discards a8bc5771cce91e8bb9ccff9aa82039dd60245ac3 (commit) discards fc0ef29399c7a03fc5ec11289826e9392a0bb803 (commit) discards e4b2afdb3f87ee54d3d1b16724ccbc1efbcb22c7 (commit) discards d5be5b5f444f165229cfd699eed28fe25bff4342 (commit) discards 7b67f599ae400030ec5f833a7c681bdfab4b71a8 (commit) discards f70568b0bec005bae9ebef98214b6b508c98f03c (commit) discards db57986bf5722035dd62103dd8124aa7f67acb9e (commit) discards e5ec5abd9bc13ee4b6a780e36e14887bb582d542 (commit) discards 88ffcdd31eb075e4ae6f21a2af33e73a5520c570 (commit) discards cfb5d446180c6f1772f177d2b81f5b39f171e0bf (commit) discards 1443db369652a44978546d74b70392c4ccde940b (commit) discards 065fed946d82bf349df37ddc069e54f6297cc17e (commit) discards 4c52c4c24d9cd809546c309f7f41e3b43cf55169 (commit) discards c4b65e3e67d9e3a23060a0b7352a1845846ea1ae (commit) discards f2049beeb1459e131f10cd94ac09abbd0529094e (commit) discards 86353043c7772dce08e170ad6f21be1a2b56c0eb (commit) discards 02acec06c0766f3922619e2bcc5c88f4cf512a73 (commit) discards 41da93010df18cb1ecec68c9334305d1bdfb77f6 (commit) discards 927ab805e5a07d266b272e56af52835f52f2c64f (commit) discards 554e8273ee4a697420a3f427361f15c97813d590 (commit) discards 467a182d46a3ff7caf822f287f947ce9ad214cde (commit) discards 5617062f3a26b09b45b1ea1887e746420c4bed20 (commit) discards e263196db9415eaee607a4cbbccd137ae9788635 (commit) discards 91ec400aec135c60e6d22b6c17405a88cc352de9 (commit) discards d2a5bf08e9c46931b79307ed616c8ac4a61ae09d (commit) discards a488216886d67e7c964a5670f0cd0165575ba2bb (commit) discards b0f86b5f5abfb50a4c93ec93e2f9b82ea7e16733 (commit) discards abaec3872e181abb8d0757e06d431b6089805c11 (commit) discards b761ed2fa8a2c61607178ea720bfa18f8f04cb34 (commit) discards b5d5b8736e53719adfa739796c1110743456682a (commit) discards 057f21aef2824abfb92c85f932c937e28feec817 (commit) discards d0724013c1c10641afa9e22b95c1057819d1dedb (commit) discards 01e1f69466a2d2ac1f9edb7193be15fc84566600 (commit) discards 2aa32677691bea08274631f0107b7524f531801c (commit) discards d17e0c5c0546f161921a169f96a3fe9b37a42bfe (commit) discards 2f4d3394ca8f2e1616464614313f56c3e7c153b5 (commit) discards 2b95ef842e92152ec763d6708ad7d852c2a3001d (commit) discards 5a25a64ed408bfdeb7a3b4932188415f93f3580e (commit) discards 6a43e55d6d563ec65fe1ba8a4aa83c0f187be6b2 (commit) discards fe98d04da7cd71bfe820d2706f864e3bce42fc18 (commit) discards cc5a78ab201574ac6557f2973f279fbe0dc93397 (commit) discards 75164f2a170ebf250e3012c2a764902f5c78bb32 (commit) discards 9f21d80c9be659c39a49d13de5c00e3a0a43167a (commit) discards e9aeb8a4f8358253bce52f0aee64ccac792d5c58 (commit) discards a2cf135c9bf7d10e941c96ada22414a9b76a3e92 (commit) discards c25f7fc8bcec7cca6804f47b7a48ea66fa802597 (commit) discards d0a5f2376f221009da1de5b38f997fb04f1a2e0f (commit) discards dd96dd9740d83a1de6e7071862f09f0e8c0e38c6 (commit) discards 26dea7c28b9eb1a747253e9ffffe9beb3f985c1a (commit) discards d9606452ce72c28ea5fad450702ad732780b1a3e (commit) discards 42b2616776dca55084ef1bb1d23507e6baa2726b (commit) discards 85506455c1b2cb839d65451743aba8e8fa4076f8 (commit) discards 4126c1355dcda9c9cd04d976fc9c453319aeb117 (commit) discards be52df6ff5e8d66014d0ad8904702169b8b1bb5e (commit) discards 89c5939e56eb4f13a09cace84dc1347e8e93c917 (commit) discards 010197d9156e54542b1e2a1d5b3be1bc1244ccbc (commit) discards 2656cb2519350f8aec7a08b8d31df1d1a53b581b (commit) discards e8deca398385c587e4aa902577870176ae13f133 (commit) discards ea24f62591b976b3f5301867c2d5d854033a5678 (commit) discards d74b00328fb8c51ca3e1f06114fbd3aa72472901 (commit) discards fad84ee6e436fe2fe820dc58a22f6b84eab618e5 (commit) discards 7ed0ced61e19c057e0dc3427b47b15914a6c329d (commit) discards 3068a61110162f6972a0392c2821aa3c5c91a69b (commit) discards 33aaf5180f12918392bd158c1c7278f4c83bc922 (commit) discards 7650a137f25afc846e64a3ce9fd3da04a401a9ec (commit) discards 1f35c2a1c083c4dacf00178e3f375f06e641a096 (commit) discards fb6b92b265bb3456a9f76372d623d9f603bcd9f1 (commit) discards 8e80c686d5610ba93b5011ce6fbaf822442a7824 (commit) discards 1b9b42e76080adb45bb395bd2b8cdc312b7fcb2e (commit) discards 347ab9b4d07a0472f895e8ac1715dfe280ef0b99 (commit) discards 342c1cdbc848d88486934a9515d88b4668aec250 (commit) discards c6f41dcae7e25fe184133695087a84d0e6922e0f (commit) discards de9b400c8f1f1d6dc923f13f1b33fbf85f65387e (commit) discards f4053736f27e15046f0f130d8559414c3bee0c9d (commit) discards 0d7f858b7a6e8f1d0e49fadce08b57ea56eab062 (commit) discards 1b41da0475c854d82d09d7b631112982984b282f (commit) discards 0b7c209610d1d24db3e8569b4fe8df98d138d6bb (commit) discards ad634507d0155978a0744b5d3b896e696aecc5e1 (commit) discards 49df5d480045ea77295825f2968ec57c4146b5d8 (commit) discards 4ba010d93f20335ca5e643c0f1ec196a5a6efc6b (commit) discards 2c7b8fca4f37ccf4030e7df1173e7836363c4024 (commit) discards ad1626818f052371af2401857806cd67d7660b31 (commit) discards 4fd926b7feab3d7f36ae9316a5f36e4e9aed1da9 (commit) discards a7d2852634aa40cbd6e7177587b42607986aca6b (commit) discards 230ad0d96f390c5e4b300f4cb3103e341556f542 (commit) discards 7f3c28a4acfee737db0079a98a76eafc5f3af7e2 (commit) discards cfdb1592487c71e046d4f08d63d828d54b712e94 (commit) discards 18e430bee9d9f446d6aa07707001931fbe879742 (commit) discards b7f5b9abc529c6de5848106a49f0625ae1218f2f (commit) discards dd87ef3f66520d6704f99c0bd145d55811603fb5 (commit) discards 303a047030056ecbc5981bcc3c749968085e828d (commit) discards c843e6b4fc49803fa5d0078a002ea5a8db983bb7 (commit) discards aa841acb8a29d8c33cb829ba0dcecb5238eef901 (commit) discards 657882fbdfc426a8a1608372503d9cc383fa0394 (commit) discards 83acd621676ea63da5d2789300a56ec54494f225 (commit) discards 2ee9ca0c62312f1054ac59a7393d3d9cde81a912 (commit) discards 4328891e82e4231f513a60aa77afad829c67f8bc (commit) discards a3ef069702fde5d688118031d938bc0774c348a5 (commit) discards aa0b737046e16fe873dc82e1bb8edbada6ac3b34 (commit) discards 2f77bbd188fe154580f07070eb10bcec244e494a (commit) discards 45376cb2b6913a96691c36167361459df0d20939 (commit) discards 4e7f2d49c7e12cdfc58940cf14d085d7f422e970 (commit) discards 5eaa0b9459487a8dccc8fd7b4202dfc8ac7c69d7 (commit) discards e57276271be7605ba5de06ff243bdcab2739a37c (commit) discards 9346e4b83a7a4acbc45d2936af73465439511b94 (commit) discards 91b5bee8a4aac38478c566de3da619f25fcf9057 (commit) discards ac0dcb715f3d5d0b208743535d376ef1bc6f072d (commit) discards 3e47c845526db353ae27b508c7582736382c4ae7 (commit) discards a45df67e9885f506a256acb37334aa943eca3e82 (commit) discards 6da96457e0a3c423283b9d0e342599a3f1bb7fc0 (commit) discards 3708bfd2346681e36e0bc57bbf1d169912e02af6 (commit) discards b598877d2c045325fdd9df15576c24c63720dff3 (commit) discards f1571a63d51a19cd18c419229cc1cd5373637d45 (commit) discards d845baf36b440bcb1276585637921d2babab3ba7 (commit) discards f23c91e0ede8de852c9d63d5ae8d878294712a79 (commit) discards a7732165b12033c54d93d3a98b5e473ce4f2711c (commit) discards 79384df8ec5f234d3a08da089393f12a6518218b (commit) discards 4785596ab3978721be92df4ca9ac04d66ba69e7f (commit) discards 2a9e24aedfa5bc67a4166d0f26ad539c67e62c14 (commit) discards 6682db6c2e7f8ebcd0e3448b93d2786d250104f0 (commit) discards fa3c295dfe87fafd698c79c931d0a3558f42458b (commit) discards 97ac2eacf44d7b2314271c6bdc37e0ec165c73dc (commit) discards 6d89ece6dd81dd1aa223ff11dc0420439a53f43a (commit) discards 43305eff6fc66b3e4191e5cc5fcd98c6a41ac860 (commit) discards f6cf0b1505d619e90c08983f2ac8598341de5cf1 (commit) discards 7bb73610186700b8e09935ec959d807cd330dc87 (commit) discards 603d1e542663bc45ff0169dd513d2db40e02901c (commit) discards d2bca3540bcd9d1982a07e9cbf2b4cdef3b10e97 (commit) discards 351936c1829419558ee4d2e694b2594b2d79c437 (commit) discards c10166242c786deb944855d43c9d38d9ff12f85e (commit) discards f5287ad5eb7e591396375b4a42cc00061c5d3407 (commit) discards 01c100d512b1abba64687c4bd5550cba5ac30f9d (commit) discards 76b98ecf780347502ce65eadf46ddc45611a0d61 (commit) discards 29bf7af78d44c6dfe0b9802c314a243ae3ec463d (commit) discards 98fe585982b088dd3b8dfdb158b0fa7a4c2187ef (commit) discards e78a4f017e1414e2b5083e8ee972fcc05278c287 (commit) discards 9f24ff5406f8644bc5245df26d0c26adcad3e091 (commit) discards ff33e839df4fc09d9066538bb326a6c4f54a928a (commit) discards c998e16c851fe0134903227d615caf16488150c0 (commit) discards 53c8b78e1687596fe5f871e4262a9382904ca4cc (commit) discards 8849bbfe1de702e4c8cf8163bce37fe3a560f808 (commit) discards b47b0a9c02550b01322fd7c2563e4e5b39f1e300 (commit) discards eae7dc325d5f68d2fd09340286439d8c04f45549 (commit) discards 210d3b38dfc195bf35d3a66054713b13642ebdf9 (commit) discards 4d69023253723eec011bb5a6b8c62c9351148915 (commit) discards 4856cde243efc07419d7027497457a858f2b5d4f (commit) discards a1695a8cbfd24765b7d372aaabcff6a38869012a (commit) discards e6474f61a96dc4abb68094fed11243db1dc00ed2 (commit) discards d2541c763f55bc4f31d7a42c77d9488f6e81c31e (commit) discards 4969b98f735f715d6d9b8fac7e1eb6b8d403afb3 (commit) discards 4f12695240947fde7b43529ecd5a2f3322668e3b (commit) discards 0af69996b1944f385633bcfa3a2416bafc005873 (commit) discards 7eff8e758d971032110a02cd1c550ff4bf0b4671 (commit) discards 4c202912b77571d5a1e1e6b78b345ee0901fc475 (commit) discards 78f240b14508f0410dc81fcea285a88adffec8fc (commit) discards 08fba24802e8db6b1769ce43c85d481571902239 (commit) discards 4e7bb44e4d6ba33cd5495913f73985f5b6d80825 (commit) discards f723860ff359eedfff8a0371eba7691027676e29 (commit) discards b0a9768ab3486798b0713a40bfa145462b824566 (commit) discards 4edd80fc87dada543e506c748391dc0b7c8a563a (commit) discards 3dfef7bab08f978ef0d81b18fe39633666c0fd83 (commit) discards b89f500cc4832b304b4cf604e4955fdaf63a1b13 (commit) discards 586ec3aaf0ed4c357e06d9baa99d553fa4ad6934 (commit) discards 567fdf09bb8b533f930e0fe8099159ac7bbd9886 (commit) discards e2d8a27ef2bec64118c541622cf6d353f788db96 (commit) discards d4342c4143c6f58019f5900f897336fadaaa013a (commit) discards b33f276ed81bdbcf25ee6c5e3a7f051c5c2773ee (commit) discards a10cf4ec311bbb17f20d334ed5d7530cf3fe247f (commit) discards 3caf8ce1fea07b10b0d9ee40d3d1366ac3a59aaa (commit) discards 50c0cf86316fa416cb711da4f69dab9f18dafcea (commit) discards e0a1084ce058cff10e6359f85f86752e85437e16 (commit) discards 724554c78f73c871c3b67a9498c1db15fd1c43f7 (commit) discards 0462af8138566f7d9d47cdfa087f65c89cb70a26 (commit) discards 4572d36b1eb9527a7a23e7d777b1b7a5227bc960 (commit) discards f4613f70efb1762d6ce69ba3066186a1cd3e53a3 (commit) discards 2aa8e005a3f6e2fa357f5d11549a609213f738e5 (commit) discards ee6edc8a23c67c90844ab00ae4f49cf6764c8fd7 (commit) discards 7e95a34b611d999af534ffcc40f08f675bba5a1c (commit) discards 2110a7afb53b91c35bec0007fb7973bf204436d9 (commit) discards b809547abb3d4afdce3a5e64021f4bc81d6aef37 (commit) discards 5836fda70dc97328a920ff32c0676a2e8da767e7 (commit) discards 6af458cedec9585ce13d3afc3ff78f1683343e38 (commit) discards c664b95b08f793808d881ed08919bfa1a7fce409 (commit) discards 0172bc17b57d7a0b7b3a244124b41cb71cdbc4fa (commit) discards 29f8f5f6c24a1f513644c564098ba5be09cd33f0 (commit) discards d6409f1f4ed7a4aab1ba7f48c9e2c3aabfffc342 (commit) discards c2b11d8dcb21a881e3b8df37bf54aca8c3dad6c8 (commit) discards db92ed4ef202cabc08e89e30ddf9d5253b196980 (commit) discards fb2f66b6933a95d22f7ca1df9e9be45b771f3640 (commit) discards 9d1b5b13d3ae39e617b8b14cee52d8f251ea6669 (commit) discards e8f75bf026daa0fa0a9781ae1140004ea79b2519 (commit) discards e7df754963dadf6c40f946f0ed5bd52809e7df2a (commit) discards 98deb55dd1887ae6f7961c128ab875dde22f40b4 (commit) discards 53172138c490efe4e0b446c15af40fce00d09558 (commit) discards e593f58b19c63036eacc983d3c8e2c077dab08b5 (commit) discards d3f7f4ee06beddd42de105c917906fc732eb9462 (commit) discards 3d6e7707773f0586086a05ec3e274fc04eb6a22d (commit) discards 7bd79ca3946f372030565d361c791bdc1e41a083 (commit) discards a74e12fbdcafb8fd7a7fda3ba702cc28a02d86e9 (commit) discards 54294f3210cfafc502f8b7738a4ec42b69456483 (commit) discards 7bab8262928c5199710573c232f4fc51bc5688e7 (commit) discards 5f6168306bfb69924c742a9c950a1c292f136a57 (commit) discards 3202c190f01eaa8f3ed8ef06148406bdd4087d5e (commit) discards 56b88e20cd8dfdb1cd2abb8ff300b4c48ec06714 (commit) discards 76e61c487c40540d7a7bd58a4aaf375d4241b09a (commit) discards 7c3610bebb186a62583783fa6a7cf53475f0b6a7 (commit) discards 7a0201ef70ea7b405dfb275fd117bc2419e7e27e (commit) discards 2152e11e7a4f9d5bb80e224265e3aba40c92a060 (commit) discards e301be8c4f82aeab9a5693e611d93b22a901866e (commit) discards 3b9d0962e79e8bdeec8a92684d62172197c1ae6d (commit) discards 1721529fa69b60ec2717e85ef8730de549e226b1 (commit) discards 41a51131f9a253459577cbe4562be5dd368a517d (commit) discards 8fd49ae83957bf1504a94a5ed2c8ccf89dbc5f09 (commit) discards 272f159ea60d27ff817bd32335a8edcf2a994fcd (commit) discards f8955baf557a8653e1a2b8e0667b6689931c287b (commit) discards c480bac574a2fb8bc93ab35e052720d003cfd808 (commit) discards 6c530851d68c439ff8829f7028e629a52049e7fa (commit) discards 410d4e47205070ae170a5af5a51badc5ccd66b90 (commit) discards 57bc2684095458eb0841958c7a0d69d18abc0394 (commit) discards 94c1645bd423442f23dd8a08858b3310ea34150d (commit) discards 622d3b3f10d01ba1ee8dd221ef45675761b9f8da (commit) discards 69a6db4c5e145a7b6e6b267135f3c3ed14f0e388 (commit) discards 6c354f79f218d1115d8e3d7fb97f77b0ec43081d (commit) discards 4c9925b963a164d6795a9db331830bb9c1dce34a (commit) discards afe8322bd245326bd854f9e77a78f6e3b82079d9 (commit) discards 043ff34edae862eba1f70be23b611224f5002c54 (commit) discards 08ef8efb0370c9a3d15894a9e0361cc251a4323d (commit) discards 224e19516a08a700d8d7c11a7185e37b00001603 (commit) discards a01cf9762452f7a975a7f88eb310e4a6663cc299 (commit) discards 091a267c61c929edaf36be4bedcda88e32a4236b (commit) discards 0bd64de2fb518c06732dbea7573e89bd0df6ecf1 (commit) discards 6718a8fee3aded84425a229812133d9adf4f20b7 (commit) discards 4bb7a7f03527c0b02419d2a961859d7d0f8cd3cb (commit) discards 8d5c192eebf9ab065f614779038184ccf14320d0 (commit) discards 493ed129d6d77bda6e18cc3877bc7794b624f9ac (commit) discards dbfd55d78af161f004c9f6280ee26909643b1007 (commit) discards 47efd87bb75016721bdb98ec6e0d27da6e49190b (commit) discards 68af37d8efa1f3ba19c8cc2482bd544f83a40ece (commit) discards 7b03bc30216a72c45f085ce530b3723d8c4d0455 (commit) discards 5a31ea440efecb10bf4489f2022089ae2a7d6afa (commit) discards 726ec69c205b49f265066664dca65645c04bcbb8 (commit) discards 4835cb445ad64ee3ae9cc39dd87522446ff20e54 (commit) discards 8773905db61f266558ec0c949e0e05e11b7dd496 (commit) discards 3ee00ccc05b5b967e1a7e5c60789b1f4621ea4bd (commit) discards ccb00d3533c7c7b0ac972ecd34e41e2759ed5c98 (commit) discards e4245846bc26d5d95c12c59a19d3cfe9d2d82a57 (commit) discards 93627769d05ed77b83e75ce59c41e1fb4a10b6c4 (commit) discards caed279cbb6079b122b48802da4a968502829a5d (commit) discards 80756fc67a757c3daa43b51102624680e9c3559d (commit) discards 5c863804bae75118e2c06b75c817f7afd9bb372b (commit) discards c0c34e04c3e00dae9c16d9cf0d4b47d3d752d482 (commit) discards 22c6146d55d52bffaea126e1c439f124e502ae4d (commit) discards ccc6270df9842666d1b679c002e63eb073641466 (commit) discards 6f8e4c7361a20da3e73c60c93f3c63753923205d (commit) discards 5788e4c44d269df999ad2f8a316d99a7a664b156 (commit) discards c2e6d50125529f38b0c50e424f689e28672d085f (commit) discards a05cf7f124d3952a026e36ac66f2b5b9f3eca849 (commit) discards 17a75254e3bfb589326027d953a5a2d305e13cd8 (commit) discards 2e6a91d3e1ba4671e548366c319b033372704497 (commit) discards fb6f64d32c1bbd80b67a4b242e0a8507640e6f8d (commit) discards 229816beecaf86129b718f982050056c50b1f578 (commit) discards 35b918568d2d6ed631eeb778ec60f47bc64c47ba (commit) discards e2120b15558e0d5767bda8154d54e0e639d2fb1f (commit) discards b661d4a77011f4407b4770a7ee166b557b61893e (commit) discards 4a104822359a60795f237f848ec00c736638eac9 (commit) discards 5c6ffd2d6dcc1954966638ee0044f4481fb47cb6 (commit) discards 828c035c635523af3348082650c2a47d53619239 (commit) discards fb6d38349b79206a6381293cd34e6ec299cf5f20 (commit) discards 702c681d7b9222898fd2862ebdf80aaeb38867d3 (commit) discards bb9d46a0c05ba8ee02686eb2bb6b54653154efac (commit) discards c4b7479bd0583670302562c9d1841fa13b3c8fea (commit) discards 3213b747a84a4e584e9edc6bd8c114b809b18bec (commit) discards 449e74eba7e64a4f83aca3c8d8321269c5967541 (commit) discards f1fe8c18ac1fbc0e8c482064319d51812dabc615 (commit) discards af3d9d44d0d2b5b78c736add58d39467094b4100 (commit) discards 3817aa9ae5796ac3cf971b843b85b5b2ee12d9d1 (commit) discards 64157fa555be822bf8c7654a0a91b132a888657b (commit) discards 94a1d960cc2815334c8131ad468ed937cdd4502e (commit) discards eb217761a34c70cebee0fc0aeae1bfcb820bff8a (commit) discards 74bef6fb560e0b0689070572bd10aa96f5a34538 (commit) discards e8815ce7d7e0d22b759627bd5c97ee46b83d05dc (commit) discards a1ae0230af90ee6d08664413e7dd1c4848880f65 (commit) discards ef86b0e3e0337d502fa49ed8a0778668ba27a07e (commit) discards 0a8079e9bf5c6281bcaf1552307bdf62b47c739e (commit) discards cc24cf98b5e068e75454f5fc36ddf963b5d6e248 (commit) discards 67d41ab4747fb6233780e20ada47d4f8f2720625 (commit) discards f6ee4acab57e455997829739c665e89533e5335b (commit) discards cee12ececd5171e3255aedf4c920bf74fa18a5a1 (commit) discards 8a827d1b19a8f88238eac6077ad6d5aee4ef03f0 (commit) discards 541633c9ddc26fc44454b3b7eea74ec19115b81b (commit) discards a094bf658b0ee0d2a35e09a8fd7dfaad8442adca (commit) discards f5a72455d8ff5805fe65b338e43731c346ac8809 (commit) discards 10d5ba9d3dc0a9dceb30eaac6d672c5a5f94ac5b (commit) discards d932507155630bde86637e87ec7fb75a45606c37 (commit) discards ef0d8c3e5f5d46a183d9a65b38d05ccff8c991dc (commit) discards 85bdd3582b2a771107b1552c978aac50deff0868 (commit) discards e6326db0c3870691e085df32e9af117f7c27ee2a (commit) discards 7f71c4e28b43f1eaa78a0227f97eac653eabebe0 (commit) discards a48f911ac7ec28e5301314482ae7f317d15fc3d8 (commit) discards 6493db09edb969b292538b4011bd9075d956063d (commit) discards a3e364aab92c1bdda63b39e3a7973a46919e3b6a (commit) discards c3e9f7396581ff316be231fdd85bb0dfd2503596 (commit) discards d0adee7c496d08e8702a378ab841989568cd0f27 (commit) discards 6ba4954cb9787ea034f3f8d56003aad8130e4465 (commit) discards 3d41797a9bbfede841844606eda168c5b18cd49d (commit) discards e1c8567cdc8bdaa8a205dde67f42eea1022d3a17 (commit) discards 7fa9190d606b4f97d0929562f1f5854d7a3d8693 (commit) discards 27fcb61ba413811df0649cbf4244081564ebc614 (commit) discards 52572a26dfdfb7eaa0d28870e215bd00dcc1ec55 (commit) discards 590681ade20a66d7ec2750c4acd510dcdad26e3e (commit) discards 18ebcf28426e7d5b80b5005d1505588566009697 (commit) discards b8ae6f14b838e364960540bc51c88f751e88395e (commit) discards 7e690ba25ee08522f769350cce87a51a7e8e4148 (commit) discards 6c212eb38d32ddbd7a79a767726ef0f89b71217e (commit) discards 99beaa936fa48e567cc72311ff2401eb9799820f (commit) discards f0d607ee9c24950978d8a2535cf45355020b5e34 (commit) discards 947c899afda22a7b432c85cdf9bec6807b383311 (commit) discards e1f12493456067dac78ca8d612b379844a30ea38 (commit) discards 14050cfb2b3bb266284f27064cd15d2ef919e79e (commit) discards be786eb44c782c8502c2c5253c5658a33e91eb5a (commit) discards 5ce786e3d810391c2ed259e2ac0bad2d8ac5a9eb (commit) discards ff2a74b6fa5c9d13647e61cee90d0699661416c4 (commit) discards f190b069db2e430fd94b25e6287cd7fbc28661e3 (commit) discards 6efb9214e46763a2a731938e3948fc8751f51167 (commit) discards 68b0ed4e365c77d1eb2109b17fa11d358f1a575b (commit) discards 853f85da0ad03271cd0a3a1bdbfc0aa7d2910b3f (commit) discards 41ecb26fc477d763a455738f0ab0485770149d7c (commit) discards 5dee16eaa9ee30b81f857f9262ab378e8f424aee (commit) discards 481a468b16e20f1fe1d47894777514edc8ce48ee (commit) discards 27e95b679253b90b657dc8a9321e73b95ef280f3 (commit) discards c563a2b5e188497f89af55d0bc758172c0505350 (commit) discards 6c1abff0e1ef111768af8bf5aae5241c506e8648 (commit) discards 54b5c65ae5030ef0f78b6e8b78ed5566c2e9740e (commit) discards 0f2e7908d5e10d59e801cb78ea4ef15daf7e5740 (commit) discards 86b38f887c22e3f7b609afe9e1c0fb2866d3bf7b (commit) discards 1f0675890c0aeb0bd7fe81b5ccee9a6d9bc6fa52 (commit) discards 421691a406c08f8b892d99fd5ca1ef0c13ecd508 (commit) discards 3e90ac3243394441001e232620e31850d1d25865 (commit) discards ce3b106ac2c149d1d4653dc1d417b261101acdea (commit) discards 18a6666882ebb3cd24618530eef4793a882babd9 (commit) discards 613d87392f7ee2d11165adc3aae96c6f4597d4c6 (commit) discards 8bdf697d2c9811c61ee9727648c61692089a08c7 (commit) discards d42d169fe452bbf41cd34a86ba169fc7407ec582 (commit) discards 91cb4389fb3baabbdd0b00d39ce794643b4bb006 (commit) discards ff55f7c75c495605547a97d3bac88ddaaa263a69 (commit) discards 109df55042f80220a995c41e9b59a42728a4479d (commit) discards 5ec42eaf96b0088cd5b3e989e7458b73b65e5951 (commit) discards f6355822b1bb2874cf6130dbd0f8bd10654bb9d3 (commit) discards 8a9711a3d307443e65110e182ab3f76a4ddfb909 (commit) discards 20e110da3b45da35124ac4db4794f1186ac1cf7a (commit) discards fba0b6b15f0528bf88da45b3fdaca304552bd255 (commit) discards 25aa576db0294187a20f478ad83aa101d7d57801 (commit) discards 1e493167950e427062417500f225862904c145dc (commit) discards b79bab4ecdd50c17a7f8b21b1c2839d5a19d4ce5 (commit) discards 0d3c95e99e875c846381c472e6e1f066d42eb019 (commit) discards 5537355afc62328bd3c8dce879862887190e9821 (commit) discards b3ba006100b776351c62d8e2b53beadff771bf13 (commit) discards 1dffee9afe54314b9522f8cfcf72bb48baad6fbc (commit) discards 8d4ed32eff88dddddfb708a3e403641c28eedd42 (commit) discards 91a77cfaa78364affc99562cfdc357a70f972ca9 (commit) discards 2a942b6eab0521bd22e8841a52b3c7f22d069059 (commit) discards 63bc1a824aa06ec90bde12603d6bfaa612a80462 (commit) discards b70f00924338bd5efe4144076bd7994223ef3195 (commit) discards 8e5e6692033451fedac9241d05000b781059bf58 (commit) discards d8979d1d9c3ac37b3879e2983c1b04f1866fb9c9 (commit) discards 4c87011e0c4139fa8bc51a81249c39e94b7179f3 (commit) discards 2876335d95c5f9c16d14979041754b8ae70d7e42 (commit) discards 2a0c400fafb2a45a452e249a134fe3ffc9bb92d8 (commit) discards 7b4b6e82de18ab6fc8156f047f900b57fd3c4fff (commit) discards f3a1b9ac463d290948700ae3e2ebf8a74cb31d44 (commit) discards 80c3bc166b338baf37a8be17c30b993dc9934ab1 (commit) discards 4c906353577e6b6687ae77f550a496f30ec89894 (commit) discards bd2b051d2d3dddbfadfb7d37001071d2e3fd9e76 (commit) discards 77bb2d46d6359a99b9391e026a679845e9326bb9 (commit) discards a4782168d211581fea2fbf7a896e7e46d9a253f0 (commit) discards a30ab870553df2fa8df99aaf1ba850cf664e384a (commit) discards 280b763a661d588b54a3be0363b27d21c8583a36 (commit) discards 3a467d7ee12fafd0373a977ebdbb580204d15ab9 (commit) discards 2f0b2d660ba137205b02303ebb1c72fcf694b2c4 (commit) discards 4ba7c3978904cbeb9fd91041f223e16bffb4771e (commit) discards a1064ff6ae876d4e239484f9cfe29701648e1e8f (commit) discards ed95d2c9aed1241d30c45a32fce775a8977cba77 (commit) discards d6df33e4f52f1cc2302df0a6ebdfdfb45cea3d9a (commit) discards 6d1e598aa41352087b2e113e05897820f566b881 (commit) discards 6fc549fd0f5c1ad49aab7beb0c9a8ea90d7f1aed (commit) discards 78dddcaf7e33e7d70516901699c7315ed53e7eca (commit) discards ecc7973fdaa488110cc96cd8377b9fd33ba35185 (commit) discards 74ee264c0bcd5f5a003cc8e3ebf8f1b38e2ac3e5 (commit) discards c0253804aed4f21ba5b9dede973a59bc65f65e47 (commit) discards a7791154ed2f30a0bf12eff52617a95c54e9b0e0 (commit) discards eacb75de484b3a8cc3be37d99f2489502270206e (commit) discards c8178a7772e103df57aea944d01d77b08c13bbb4 (commit) discards 8c63b7000d98ed82f83706253a0c73d19b9c354b (commit) discards dc7d397fe23dcf3dc6195af25da3bdb5f03dffa8 (commit) discards abdb88e7f742246be27bd4c13dbe72eef983d986 (commit) discards 846d2876bb6ad0345f77660ea6154e2af8efbdde (commit) discards ceb8b8371ad2426dec35210e0de96fda69bc6c9a (commit) discards 88ae1dea8b44cbd456e07ad372d8f0ee14b5d8a3 (commit) discards efe13e2f0b16754a1a87b04e75421d29bd223573 (commit) discards 89ae032fb010197715d8308697987421083d604a (commit) discards a8942cd2b555f72c39fdac6df54ecff52d58e975 (commit) discards bcd209460fb45bc04ed0e99d23fac5c3c2e2c213 (commit) discards 29dd8a8ff8ca44b8bcc6af4ad0496106cd72c5c3 (commit) discards e50c9bfaa1afea809b4a4c385f5d1ed1bbf5ff63 (commit) discards bb186170a4954d219bc2e799df8d7caa77a88ac0 (commit) discards d337cb414e1534322eb284fb3a1c73d68593a313 (commit) discards 937e6f484223ebe17fb729a01b5494c3ed1f6cd2 (commit) discards cc1cbdb4f8647f55712abc2a1f74c43c9fe8f083 (commit) discards e7dbcb39f983dd6640bcc5336601a0d327c1209f (commit) discards c9281fd5147ba30d4da375ddbfa27bc1854b0220 (commit) discards b0c65f3621b8778a777a408bfb07d43e0c8d6539 (commit) discards 62fdf5d4646b6ca5a005cdea2804a47c7331e88a (commit) discards c20fa7c4fe805c2d9b38b7c35a4c7d4a3af77299 (commit) discards e0e77e695ed98884f93ed81679c9ade5802ac5a8 (commit) discards 85dca2c756691ae8f954f6e4d4d002655ebdd206 (commit) discards ad0f722461761a9bf2a63ae1a124ed7b7a572ffb (commit) discards 6085b855edf0b9406cc40728e790784016c78dd3 (commit) discards ca701b2c12979cf70f7f824d93e735c8d78a564f (commit) discards 7c99e0fa021fcade3968d3ab75fb0bff5b04d809 (commit) discards 6692961580b44e1483f7994b4a590ed2ef76d5cf (commit) discards bcce79e9b7de4ae5fba7e7a1139586ccdf5c77e3 (commit) discards 1537d2234f098b87dc96cdb8940567822c5e245e (commit) discards 03a75bf379f0af616975da7421ea95ee669ee8b9 (commit) discards 24d7e3ea16e7cb687010c03a35621053f8ed74fb (commit) discards 7e7dd8ba118242cb86a944d130b91f7464028499 (commit) discards 19eb5feb9d2e7e3b33b3402b1e5fb0c80560e647 (commit) discards eafbc7f85efac1598c8a738366a5596cfdf4a981 (commit) discards 6455c5c0afeba7e9f7f5ecc8f04b25f1462157f8 (commit) discards 19a0a85e3adc229a995846611bbc461be352635b (commit) discards 6c7dd8eb8ae00a1a0b8c628e4d6e3c7b5f3ea1f9 (commit) discards 5780391f96f58561e08ed115d1fd8a0c4e9695d8 (commit) discards 0b5f5857d3cbf5ce77c78fcaef36c4cd001cd4f0 (commit) discards 7160c8c8dea75dda8f016823ed0a0ff2e922fdef (commit) discards 8d01befb1cf953911e6356aee4cd7752a2a09fba (commit) discards 9a4fa800379b26bfbae3a9a98ed94baf58166713 (commit) discards 15e1ee72d6d13ab02cbfd727a5702a7ce8bd18a2 (commit) discards fcd706a47df8800fb7ad6cfac783ea40f184f4e5 (commit) discards cdc2c6a7a48b66f043a832d0417a1475b53cb63f (commit) discards cc1e6e0201104624db1adf736f7c8a2519c98a3b (commit) discards 9b3bbc0720dc2482a8d8b7af7840eb287df2777b (commit) discards be12b9ab1246bd1d7a31dc90515f33d8fff455f1 (commit) discards 627ad82ba68588053570af6d5926e85a7ae00337 (commit) discards 1cc2c0d0f7d9670de22a72d146aba68fadd4fea4 (commit) discards fe0d2241ca04bbb3ddf28a2dc45f3cec60902f1c (commit) discards ec9b42e9e29c11f41f13f70ded93debc61eafcb0 (commit) discards 288fb3ee6fb5340f808d0a5ca9cc708dc039e9aa (commit) discards 15ecac966da9656101847cf8cc213e0ff2fa3691 (commit) discards f6ae3ecd3763d255c91f3831ecaabd9f8d86eef9 (commit) discards 9095b13b1caa941bf0109f62ceab07495aff37cd (commit) discards 7f2a735a10a3180a6614ce10d3705e521421bb22 (commit) discards ad2630e2526f5761385bc1164b6919d2556a3be6 (commit) discards d05f19671b8a98ec6c258efc1de1ef4786403b3c (commit) discards f352b0d4508d02e037d154ba855b9b95bc504cfc (commit) discards 8a1e2f6dbf35f45b4ac38e4fc5817340337eb528 (commit) discards a201a80e5f4fc5a0869a72c752ae0a4f82805dc5 (commit) discards 637a971ccb4a59962fa93ef8eda15d5c156a9068 (commit) discards e3da4f1c6489432a7c16f0de1dacb0d62f800900 (commit) discards 9c5196216d44b63f6cad64a3088c68cdd133b5a8 (commit) discards 53d7c926741f54e8d556ffe3f0b415625e1f5293 (commit) discards cd496d077c10648bb0aecd7bde539c624346a137 (commit) discards b4841ed22b7700662090a24df3872aa19f74fa98 (commit) discards c832015679e14bfa943cf9c1229aacaf19263b71 (commit) discards a9e9f67a466bbcb59f06b4792ff920ac59b6181e (commit) discards b7fa61ce446cd8c7ae20722761c9055698e2b812 (commit) discards f31490f47121e48836ed3c9aa24c4c4e1d6f7615 (commit) discards c5745395db3c01e228dc3c27aed628c151176afd (commit) discards 1b50ffca9ef02a75fec381319ba4f83d9e4e6b61 (commit) discards 92be3722167d1aafe48714a4ae114fbd4545270f (commit) discards 7095d70521fc80d9936c0840d597fda37a98174b (commit) discards 328b91e76b5ac6cfc45ca601e6cd03c216a7df9e (commit) discards aac033f37386fbb263279cbe76349d69697b671d (commit) discards e2d3d7558cbeb3db7e48bbb9c9dda1f503622b34 (commit) discards b60e7becd4273f15895b34c63b7ff8ff9dda27c6 (commit) discards 7eea22de2d9b5055601dea903293b49ee6962e86 (commit) discards 119b0d9795267a83aeb8902aa103750778d427a0 (commit) discards b746bd5c9941cf4747fedd4822ea9660d10a00c5 (commit) discards 68e77a5f3048019731b59e91b1e303f7a13f83a7 (commit) discards 667fa6f4fad2141543bca97b74fb956df4d5a9ec (commit) discards a53a9b28e905650205db7e02499f8484b216d3ad (commit) discards f84fce7f22efd0066fef03ccc91a9bdb71ed71ea (commit) discards 49849d2584448a6a2eaa34327a51b25140c1ebce (commit) discards aa578154373931c19d08c5e2d9b74e72cbe23a33 (commit) discards 941bf80e869f2b9d4ba401afff4d801c739b73e5 (commit) discards 360d3fe80a6769a42c7b1279d7b0501d6eb2f764 (commit) discards 9acba5e6d650906234bf8e4eead1507a10e6ca6c (commit) discards a8adcbd4283935a34d600f0a69e1019c8336a92b (commit) discards ea4d09f24085efe2b0832da0a500da983ee80505 (commit) discards 3b08749b65d107cf9e64670be5a7fa91ad8115b2 (commit) discards 09bb6f89aa3c7f2b5dfcc52bd0d59f97c28503eb (commit) discards ddd74ff94ba85c04382f33e01915350d65464682 (commit) discards 9c77135bd53cfe4cd60df3ce6a2761ca77521c4e (commit) discards 9f6fe2f9ba059566b665466fdcb2b0caf6d8e4fc (commit) discards 36ec325b71c4dcc5c65ae3c44c43b75efdf1500c (commit) discards e3d868ac2ff6360e72f95cc9b75ea31f8c75098c (commit) via 66805932ee04c275c2f9fce35be66d4d8c6c3a08 (commit) via 0c09a6ab1dc8cc5556aa3ccb852d5146ed8e2424 (commit) via 7e6b88fc2f8549ebc75006603a4add98125af7b2 (commit) via 46f3306f6a642b7112ffad6f41076e5baead5a30 (commit) via 2aea7099e1994eef0849c202e860564d5fba1c4e (commit) This update added new revisions after undoing existing revisions. That is to say, the old revision is not a strict subset of the new revision. This situation occurs when you --force push a change and generate a repository containing something like this: * -- * -- B -- O -- O -- O (4b948d6a13576c4191bfffc43b17b451382997df) \ N -- N -- N (66805932ee04c275c2f9fce35be66d4d8c6c3a08) When this happens we assume that you've already had alert emails for all of the O revisions, and so we here report only the revisions in the N branch from the common base, B. Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66805932ee04c275c2f9fce35be66d4d8c6c3a08 commit 66805932ee04c275c2f9fce35be66d4d8c6c3a08 Merge: 7e6b88f 0c09a6a Author: Brad King AuthorDate: Mon Oct 3 09:14:02 2016 -0400 Commit: Brad King CommitDate: Mon Oct 3 09:14:02 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Utilities/Release/upload_release.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From cmake-commits at cmake.org Mon Oct 3 09:16:13 2016 From: cmake-commits at cmake.org (cmake-commits at cmake.org) Date: Mon, 3 Oct 2016 09:16:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.6.2-1300-g46f3306 Message-ID: <20161003131613.C60AAF43A6@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 46f3306f6a642b7112ffad6f41076e5baead5a30 (commit) via 2aea7099e1994eef0849c202e860564d5fba1c4e (commit) via b99bbfe88d1bb02dc903507f3e1bbe716ac04c12 (commit) via 5ad6d4d7a19917a62f800348c2a1c33a24c994da (commit) via 5cdeb661ea3d6a66128ddec45ef0701730755eac (commit) via bed8d6b887637eb3c79906d54bfb8e9e0427f65c (commit) via 07bb27240fa3971c9944a9d461382eb7074358da (commit) via a997cac8323dc1764e092b8691857dd9af70956e (commit) via 2d4aeb1ff1550f11ea84346fbe81b8bc34cc5ba7 (commit) via 52fb3d78d3fee0e86b3ae7871efbd811df181e7f (commit) via 64e63da0d17e000343b324f2d7ebadbd484f0860 (commit) via e82c33b88c566cd5388f4ce26a1d82b3ecafcc12 (commit) via 9921b2f8c897d6981e9003353962529d0d52f580 (commit) via 38a4e5883f1503cdde2f32c6dd1074d6386d3e4f (commit) via f564e4ab01d05fa1920c341ee852cb10a056d6ef (commit) via 8202816a36ec010b13ac212ca2efdf958828fb84 (commit) via de486a68950677512f33ce832e80ab334b501a61 (commit) via b4235b7590554af75ea84a765f82a996ba4de1f8 (commit) via b73080b0c2c663c38c2d118aab1d9f990a4ea535 (commit) via 541394f30a5cec3eb3745ec72ca2f11712439ac2 (commit) via 1b43f9d12dc3d605056fcb8af442b8f0d07ff901 (commit) via 27c51865eb44c33049a3759cbc90abaeb4105660 (commit) via 130784e03938b760353b3d3e46fc1b803a5bbeb3 (commit) via 39c898a107269a488b9dcb72bf99c545ab35e54c (commit) via 50b27de4219e2afa665f31a505439e6b9526bb02 (commit) via a189d019dd2cc3a56fc57ae1162b752ff0811551 (commit) via bcafc399c581974c21631275adc2bba3e0e7d535 (commit) via 98b11f252c821e60da6492b2f27a84c68d6f2a2b (commit) via d56f9237d7205cbc2db24fa5fbdc27000454291f (commit) via 8491a539cf316f14abaf70d7be04f8929119e501 (commit) via 9c932109a29afbaf10aa9dd9fa7b2f421f8db6fd (commit) via b90aa96c783e0e581517012605c34d746916d415 (commit) via dd0ba564e4aa10f608c91de5e0f225e4c9405757 (commit) via 7246e0c2efea17737b7f93921df61a319624e681 (commit) via 4e34f042504f1c62f36a0f16e137e137a7bf1e72 (commit) via 262500028cb5e6c278cbc0f0a2694b50833dc3ec (commit) via 0d96e1932937b866343ae8b52c20e0a8c058f3b2 (commit) via f9cab9e38df8adeac5f83f80722dedff25affdcd (commit) via 66ac1febc41967599d5bdaab912d786879ce6813 (commit) via 957e72c0c5503130157f9ae1579860d1fd9caefa (commit) via 64934f20697e91a07221d1acc137a830d6e63132 (commit) via ec0bf63823ff459d742a54fae4c8582b5b87d1dd (commit) via 523f8ec82c5fb62f5f67c962ff59886396abd8fd (commit) via 6b97a5efc6c41a440ed5d9eb5ba9aed834d0bd40 (commit) via a8334961997767ecc31333b52537aa5e5b6c561c (commit) via 97b6e17c336f36556981e9371af78f08f4d304bb (commit) via 6fe45e989d9b35dce812203b368b0a5d7fdacca6 (commit) via 0ab471adf18924a3a85a81fec79052e191bfcf94 (commit) via 5d29506811c5b75ae48e12de6c317f6440874215 (commit) via 48cd0f74059f243d57d7032578a474452265b546 (commit) via 26b30c58d0cd674a50f5b5c5df9ee7d6968c57d1 (commit) via b53a12c29cff61d8f97997a63a00e7ca59b566ba (commit) via 7cea3479d647ecf1957a4ed1f127a25197ac519e (commit) via 4f719f23041cef87003b03e5fe722da06091f07f (commit) via 11c5871c1cb53f72a547db16d2e75702b312b18c (commit) via 0a61704f9f89d790e32d332cc5ee0c1c99582266 (commit) via f4162856313a21fd1b7fe7b28836a741da269849 (commit) via 09a6bd820eb04570226b16ebd8cd7dcb49dac5d8 (commit) via dfe7af3613f6fff87b2a33c7527d5d24a2fd2d10 (commit) via 03bd9895e3f0bcdc97f051733728ca8869f8fb9e (commit) via 66c70cd9f1eb69b03cefe7fbe8e238aaa4630f47 (commit) via 41291b20f3881cac781e5e628f8b892b29c7b39c (commit) via 71a505870c1f5a4fc89a8ad4e4dc3bb008a35118 (commit) via 7b1e60f26e284e223be8638744ba3a3b0efdee63 (commit) via 84553a6e709ea810f3e7fc5ece5daa1c53be5cda (commit) via ead71873b2025a28df1208bbd3f2f8e1918a120c (commit) via 2cbfb5c7a4000f27e93fde178ce3659dca0dbb6e (commit) via 32ee69c56241e4991269a8d114339878363ead61 (commit) via 3f300b84f312c340e92ff010c18dfebbeb4edff4 (commit) via 9c5238dfd6a3aa1d7e0ba30f302e75ffbc893851 (commit) via 40c0482153b54f60cd2f2e573cc1183df56e8a76 (commit) via af35ddc80821d6fff54c5e9ede9dc24653f0253f (commit) via 8f25f37676cb860348738eff4dfb1c3b8bae0b59 (commit) via 93300f36237372cdf3c84be725acf7d2eae0a65c (commit) via c1f97af640231ff0cb90e4a1d9a567a2ee85daa5 (commit) via 8021f64029d0805efa17fe439d7ce1356bec7938 (commit) via a71a172ebf59ce997d971a45b707f7742f07d368 (commit) via cd89d1998a3312887536451485609e8ab09181ef (commit) via 9a9b9d445a81aa24fa5ceccca5eaf7fdf151b5e3 (commit) via 19671831cfd7f06496fa035f965e2aea6b7a45b1 (commit) via 756169ac99e65e34a4b5bb1f7348b14eea2e3521 (commit) via 845d86bce391b0028ecda8747c365cb8b57824a0 (commit) via 86578eccf2e82286248796bad1032cd0e3a5e1e2 (commit) via b7180cfee503d9b86f9e516c9e02a4272a3ac380 (commit) via 7feb4eccec51d7a3815cd21dd53974bc9115547e (commit) via 78f77f6038e92d3067472750f32b452fee697c67 (commit) via 681e0429fc7b262dd9d7ad48bcbed25dc3a3fbc2 (commit) via 956054aeca0cff2ef5a8c92586e992cc9ad51d7d (commit) via 59eb75d9d2b538f3b1810635f193366e9aeef5d1 (commit) via cb8db285595138df513432294d55c1a8364454e5 (commit) via 1adcf4917e86fadcaf49ed5ad19d9f353febad53 (commit) via a9cb60a9513531c7f8e50bc0e81683ad4008f84d (commit) via 069d0e2431294606b160d1e1cee4677bf6a2747a (commit) via ded15f26b8f9b6407ee93e11d9239f1ab5dfcc99 (commit) via e8ff565d94baf45df145dfef46e8cd40aedc08ff (commit) via e56eca3f6838d715fa10623a5ca538b3c9476493 (commit) via 45fff9328d7b75366614be60ca3a7a52bc3aeed1 (commit) via c3cce73e39f0c57ec4e13b9a0dd4da73e33ac961 (commit) via 150d9955f639b716dc37549219b66ba3b6a7bf39 (commit) via 4207aa47243eb268efcd77f3428a818d0f303829 (commit) via 39c7d62cbc130cd8b08884349b8d12bd1a86938f (commit) via dd3c938a0fb1c15e8ddce4c1fcb8f4c92c2caf74 (commit) via b78fcf0d2f3f8144d167068fcfa834ea8062ebf5 (commit) via 144cc6f1f9020433cb4a94f072fc74f1202ce1f3 (commit) via 20786869e8b60b1917aa2f7681971e6ecd1f6393 (commit) via cda8c782db80a1352ec6737b783558e35238bf17 (commit) via 89c20300ed55e06459325a981eb1ae0f6bb8378a (commit) via 965eb50cda15a2b991684fce2d9e64556ca38523 (commit) via 890432672bc9fe91365e5e5305285ab193e9060a (commit) via 0a8ad6700eb7f54961271b3ee7b41add61eb0be5 (commit) via 544f65f44de0bb63a0b427150eb5e2bc90f58396 (commit) via 82104cc7a8e831ad20cb87d126c2ff00a851bedc (commit) via 33ec71f343f8b508b16437cc282607d77b996df1 (commit) via cbe488792746377396a9f38aeb2999750ade518a (commit) via 1a5fddfe6d56733528ace3d15899b0739ea28054 (commit) via 1798e49595ca5b8aa113f98a8266ef5df582a207 (commit) via d15b7603aeff5e7c47ce240329414b6a0db60720 (commit) via a721830767c6a7819ed82cda5f910b732201f885 (commit) via 4d6f0a55731e462a53feb0956484c104ab8c1018 (commit) via 806017cab8c0dececc2bf61a4bf54c8cb031c8b6 (commit) via d5fbb19b4995c9ed9dfc44b4b8e391ede21d3849 (commit) via c6f07d06c610a9b1e6062d70ffc78c04bdf48ee4 (commit) via d57a6493fc667f8a6ffa9fad2566a0cbea785ec5 (commit) via e6a38a84d63b0c247a8f52bb5df76820db32f45e (commit) via e6380b11e9d900c9b60ad6fbd46171092bf0136e (commit) via 67480c05e3f6819d867680775ca0cbc6f03f28da (commit) via 06dea230ae7bb082a4b8fd38226791d0025792a8 (commit) via b35568f3f9f9b8f4b5b2a2e6f4d524540980c3ae (commit) via 63c25013b143e1e945eeb35d419407fa1d4d24de (commit) via 540815eec2b83a8b43689580c54e8950d9f5868b (commit) via 9bb8ac8ed28811f6097233b1065b71833a017c0f (commit) via 02277aef1081478192cc4669093665a01febc7ef (commit) via 1ef45a30aae240a89893e86e2509d5400da9753f (commit) via 08147a7feabba4113c29f8e898ebe3047180e4bf (commit) via 92207752dfaeeffe674946a7139475777ad90eac (commit) via b941f3bfe7ba3bffd535372c2a4d9d668bc83356 (commit) via a5a7771a428a1d4a9bb671e56ea6d497361bc753 (commit) via 6ed564577dd0fffdd7dabfaa0ba14e2518c26048 (commit) via 49d50ad40719722236c7867bd69e7ab414224c49 (commit) via b36408a092b946568abbe935062e14aedadc161b (commit) via 7274fd9c1934d617464b752210ff16ee4f3c96fb (commit) via ccd1341ac935d6ba479f3dc27b6041bff0c1c970 (commit) via aaf4014c28d0d0bf5180dffd5c4a628406a5e7a1 (commit) via b66bc6606e87c79e3adef55aa963570a5b8f78f2 (commit) via 6757e6608992354300d635a96fed29800a4856c3 (commit) via 3a883a9f7dd8c9f5e67475fcdce25ebd066636db (commit) via 961536dc85b41f77db3d2d220cbf720d0056369a (commit) via c60fe3307591a76d498b4eae7ab8d801c65a709d (commit) via e9cae187c38ffef4da0b486980491d87e1d91507 (commit) via aec5bf8edb1b4fb4a13689992abfd9cba54046e8 (commit) via 0314f26412d3944f7ead47656e9347440141e815 (commit) via 785f875426ec7aebb6583419515bf4e4c3975464 (commit) via d0a27ae998e5ff313937f346b53d672c6353bd74 (commit) via eb8cd35684f2dc2f53d205d7738e1c01a12a493f (commit) via a41c8724d155f1cd74ce36cdfbd10da0eac5b389 (commit) via 1ec5097d4d15cfb2d24a8f23cb6accf38f870981 (commit) via d7bd2efbc4ffeb56cc1f9ddafffc49a8e42d09c2 (commit) via 4d3874d5ad25d1907a56a92aba7ae94768726c72 (commit) via 86d2e4276d934c0e04ad129881d1cc9d2916d121 (commit) via 330581502a7c7332a8f3ec15d57e1c21f7ff1ca8 (commit) via 59aae29214b727944978b8e545a552f96c88b883 (commit) via 39ebfc79e614dc395d5ace2ad5818b3ba75ca478 (commit) via 9a77680eed49939f8ba418af96eefd42ecea0ae1 (commit) via 0f331d7893bee523e61109661d4e51566f41c350 (commit) via d3e0b64b1432700a71a10ddf06084f7bb8500694 (commit) via 8eca59a175b551c2d4c98fd9523e6aca6c51a82b (commit) via a57d1bb7122be79101cc17a4b8a04bd0ac5a041e (commit) via 0488ae63ea8dfa8ac455e36b7cc41e81620a080f (commit) via f0a23aa3dbbe2751bbb4969e1371380561b566ee (commit) via 764775c4dd7b97e753d566d363c7ce9968343b5b (commit) via e22d30e25a264c309bd819edde3eacb1184da800 (commit) via cc576c2c7f3272ec5370dc3cb45838c20d1837f9 (commit) via 277ffa2881d4073a660490f959cb58ad0dcb3f82 (commit) via f4475eb92beade22fca16f21b40df19b48c6559b (commit) via 3e14e594b41fe66d0366eadd5691c9a53e7e13c9 (commit) via 1d601c6cb978a3b6b6143fdf64e284fb3a098d1e (commit) via 0d8c5ba42a075184f4383c62bd91e67fd5c4ccf0 (commit) via 555ef1e235e62236870b27adb1b6c384313bd792 (commit) via 2c2ffd3874f749979d723d7a788d45e3830952d6 (commit) via eca2af6e66343c51389f6605df79f7e6ce60cf37 (commit) via 1657fa0795fe6109780593a265a240d9ef73ef77 (commit) via 63fbcd6799e9d2786c6862a6cb41931543bfbff2 (commit) via 0ebd7554bc836009e405ac818f367ff175ce9fc5 (commit) via ca4eec29f916aa0af38378afd6a32f669bb12aae (commit) via 68f7a476e78089ff83a3945431908a57106fb59a (commit) via 37c1863764d338f87700be7b082b9814f95d7393 (commit) via cb851a7c1285537ef9e6cee174a49000e047bee9 (commit) via 4fb2b41a58fa3bd82649d8b19ecbe038e594e753 (commit) via 537efe0561ef6a690fd7aac34ce1e4a46614f2e4 (commit) via ca7799482cbbb38b667fd5d045a0fc95d09a8cf2 (commit) via 70b8ba9a0f4403729b9d68719503243982b883f4 (commit) via adf1e32fa2da7a7131e65809fe20111b9611e87d (commit) via 73f47c9e46d42513cd7eeb08e27c4d1a424949ad (commit) via d328dc6853e211dc05c4abcf62cc64b9c91235a2 (commit) via 9ac2e189607433b45b252a1e2261ccfaf11e492b (commit) via df4aeb312148128469c43d064dcd8eb27b82960f (commit) via b5ac8b8aa778c7ad612a20deb04a2efafa386d9d (commit) via bdcc1f517ed8a513f8c156d83f0244c1b9e98703 (commit) via 3876e2976ed5ca7b2505decb22b3b001944fd027 (commit) via 9783ed1e6eaf87bea54633599a2025026343bbc9 (commit) via 501f9c93671cdbed546bb92382240cc704cf6e6a (commit) via 144a24dcdcbb075d60d31171e0bda0654e613287 (commit) via 7b5f85677c8aa067a5fef1cc68f4d8c8600693fa (commit) via 1777570fe5eb194d930f6716865bc909269da57e (commit) via 6b8812c27e6df1d10fa4bfc30cb3eadd08d7966b (commit) via 5c1ebec8430fe755f9ef2b0ba3316f424113ecbf (commit) via 290d48ebc7e3842dc4ddd2dfa0da1025cda00646 (commit) via 9dc5bd961146332644880e2b949854e13dbd0b8c (commit) via 8d83c9d100b8952ec0793e4cb0e30d5b3ec8f164 (commit) via 8b0f246694e5e7a7e71187204ba30ddcc537b32f (commit) via 6a9b30aea32e4347c94f1afe6a458ceab88c50c3 (commit) via 83ec894ffd7747e36245615f3332a9bc5bed9ba0 (commit) via 160a7ad64092299096f79b2ff1adf5bbcc8cad77 (commit) via 7df8a8f2769de784c24dc6baeb55ad2038aa059f (commit) via edb3f6eee4babe2efab6d50b8bec75d839b6a1c5 (commit) via d9cec8adca37965ee7c0742688b0f1de7edd9173 (commit) via 891e0ebdcea547b10689eee9fd008a27e4afd3b9 (commit) via 9034a7acc5540cc068b696d86e122a2ac66329fc (commit) via 6429d6d9dd94523c75e982fa875028e3e32a0629 (commit) via ad79061720b8f68cd8e406aadd240d233d2a1073 (commit) via 4cf707b08316be6afb15435ce57c67b467fc47b3 (commit) via 3d12ffbf5b49cbbec2bc00fe58e5298c00fee527 (commit) via 4d69ac7697929a12e0be1273dfc627ec56fe7acd (commit) via e7c895674620afc51cf525e85b71601165eb4c05 (commit) via dc510919443eced785ea972c2a7433c440dacd4f (commit) via 76833149ec9f7d8605df901deceedc4b9c1c673a (commit) via dc95020efa8cd29f199e6bac5ec3e556ab8584b7 (commit) via 1825f876a7467a97b1cb3f6dd60f95c173d9e61b (commit) via 25c39ac28b42234d08c3906ce24ac739f6111506 (commit) via 516e79ba2722adb662000773e742187815723702 (commit) via e13e519e1c3f76b826365b5fa72a50dba180c191 (commit) via 34c6e995f9ac1c62540b68dd50934c8c0be98b7f (commit) via 839c65bca032b80cfa7fe0de2ad35c2448421092 (commit) via 21b5fdf9a39f739c3566f3e77a4c5244da1b7e3a (commit) via f1d845ae74dd9ba0520b1f97c851e439f1c4df07 (commit) via 0a98c74c1ba025957b2a3933d9897750109390bf (commit) via 495e26ae57fc8f6a38f77ea0d0984fa2a3abe6c1 (commit) via 4f68b2070fb90c50eb677dc74298f30ca13648a6 (commit) via d0be1e15c383f17502d0f47a36d16ba3571b0b79 (commit) via cbca65826c2bf49ba8c99efe8fa315d2942c4836 (commit) via 7a4b8d0dc2f1e780f14e35e1c7ea32dde90576a4 (commit) via b807cd9b54e4a9324ddd64281254b6fe80be5b24 (commit) via 089868a244e623f75c1ffbe9297d3228bef9a8f1 (commit) via 5e6716dbacb9fd4ef7537db5578ac15a0fae04f8 (commit) via 1c63aa4d43f101a0d58b5b88d3119c72cadf5517 (commit) via 4682b42bdb5a9b7ca9f6ef5f65c019eec4f92a62 (commit) via 5c87b92b1b7888ee032e3c2a75f35f1f94f4dfa5 (commit) via 7263667c24cecf4bb155fc0cbf687dee8b57f5f7 (commit) via 0f424c3d07a613820950e04e00431d57ba7f829f (commit) via 5adde4e79d18dea7e73307e25deb2197833569a8 (commit) via b63c1f6ce75d82028efc364cff8277c77854dcc3 (commit) via d341d077c5fb5c3df3732210b836a9ba6cb53873 (commit) via b13d3e0d0b3c644242ef8dc4977d35da73398a9d (commit) via cd049f012ef22f8f1214b35e351fda823d534b92 (commit) via 419ad0510193eb2b2e227095a4dd167cd9b3df80 (commit) via ec5114f997a7a8cde5b734823eefa97d5c37ff69 (commit) via 995d6be1282cb1f7c92bb136be10163a704e7d10 (commit) via 31d63ac88c32c6313570777a6c18bad88b88d502 (commit) via 34b49df564be8b779ea8a3d5d4a3c3a70bc51510 (commit) via 0a4d15a9e2c6605ad22b61fd3ede697bef17b366 (commit) via 4c40cf681b8a5aa821e051c83af151209b60740e (commit) via b4ea74c5ca58d4327823c78dce1b6906fda72c7e (commit) via 009bb0139deb32d7ab9d08f15a7364b4c37c5960 (commit) via e7d3f154f001966f49add5b8b962833bb0664032 (commit) via 92d76b50aa50df14491685f049b7ba109f0d8697 (commit) via ea23db00f46356c7ed36a3c49db5de8e300db44e (commit) via c7b312cf13125b04e442cdcc2eb8725e8dfa5cbf (commit) via 8dac3af03c0685d61ff10e1d1adc4bbf6d096966 (commit) via 84039a6aa2b1bbc606dbb8bbccf956296a2c153b (commit) via ca504042d1e28bfafa100d1be825928640cca7f6 (commit) via 6afd35b98a2316685a071a43d0e56448e7ab9ed5 (commit) via 8d47a20f131147d4cf38e63df0c382ec5844a833 (commit) via 149af87b86362449a99301860af5aac1a3b4b20c (commit) via 4171b86ca351a26b8824ee8af0db5145232710f1 (commit) via 3fab1fef23476b27274cddf4bb8f6cbe8d36c712 (commit) via 7b94a7adb32d1a8966628d2b194cfc5de04d7ecc (commit) via 782fcbb92e096a28f899c89eed6fe23f29cd997c (commit) via 809ca6c81fa23cec111a9e97529d71538c55f9eb (commit) via 516f8edb2e061749c56b6f9a58332fbf59e45a1a (commit) via d9f5d3c50fe376423382d6445f7fb2906a43469e (commit) via 3fda10945132fdd2dc11ea074a96789a4afa86bc (commit) via aa50cdac439121f9e40ff2638368dc913a0e2361 (commit) via 0310cb1094e198d91e99e4ffd58549c274d4d011 (commit) via a327b20694f81c281b2f803acf75a73b95eeb76b (commit) via c2f0f41f6372a6a810f43cab3ebba70261231c70 (commit) via 00fd64d1263901f96935e15c8d90ee8a338cee1a (commit) via 60ebd0acf843bbe87f94b39d6807a072532cdb07 (commit) via cf0e005202b3d17ad1f3c17536065c5589b97f93 (commit) via 4356bd7fe382585e59033287dcc43386689e5dc2 (commit) via 38a378e10d93740c11ac713c6035e26d6838ad96 (commit) via 3efb3c0012a05ce1f19c99fb27b835c3ec057270 (commit) via 6f1b80bec03fbe19e3d8f56fdee84a8ca6e4fe93 (commit) via 554655bfd91450e7e4e7feb9bd3a383d769a5528 (commit) via a098ca0d7ac25455a9a1304ecedb8fd8790c6ca7 (commit) via d9c600c504408c79393b9f5b4e334cecca30e67a (commit) via 3bb18e708da186927f59bbc94875e27b57278fcf (commit) via 73f648f167e9b11739c4dbbdbd5c024baf1e39ad (commit) via 9353d991a4a9df1c7bdededaf0b11fc96227f805 (commit) via fa3897b24eb9a5cbc4926659b11f8cb6087789a1 (commit) via 916d84450d2caa7cadc82662039602849cdb118d (commit) via 8f6cb36695df3ded9e242c35c4b0e79850d24a31 (commit) via 6e06a53ebf58f41cd570d1bbaed7a1c62eac7ed0 (commit) via 6a189675809aa3f43534fde47e5a094464892ead (commit) via c3507b54968cf5c1594b44f758da2c06c68b0717 (commit) via 72dfca30b94ba1e85533c61a7b5a330dfbc04da5 (commit) via 31be918b0b2dd445bdf85d72a8eaa29841137bc8 (commit) via 9cbd04be5fa86c2363c7c7f65b6a00969bc87d1d (commit) via a788cf309257ee0a9cd8cdd1ed5d4665d34a9580 (commit) via 7aa97b948f854cf4797db8707969173efb786249 (commit) via 46ded385c00c71a932c624efdecda7283492d41d (commit) via 5d17e995801dd916446c232eb36f1b330106578f (commit) via 7c92c84302827b33ea47f7fb6ca5b2ff98451d44 (commit) via ae783c9ba92f42ec252085e407c0b7e5d00aa59a (commit) via 010140311a0aa9336b7e2a2d22c177d445ee1c32 (commit) via b7dcadac44b26c50ba9e765e97c59035dd03c33f (commit) via 6f31436c9116b6c41928d4eab3225f0428b5d466 (commit) via e0e047fe4b15addb053b56195f584ecb568a973d (commit) via 62a79dccc5f30e0e80904e83dada288b78d80182 (commit) via 0063b6b43c77741944fc2d55fbab05a0750e321b (commit) via 0b282335ab2dd9788d7203cc2f94d4f695d686a4 (commit) via f129dc752b09fbfea70b6cfc69acdfb752d3b659 (commit) via de1493176b936e960165d9110944636bcb9fd798 (commit) via e1ca117332fbf6adf3a467a420804e9cb1891582 (commit) via 100817dc5d190ec7b8b4fe3ef822b6df9e5e7c67 (commit) via 7a2e114dd8ab55bc9ef9e1106ae352d2fea558d3 (commit) via 00e78c19903c24bb7cc969f3b825b2502661f3c0 (commit) via 9d11bd50661a1fb0a079c7c17120273f21ea9a8c (commit) via d97513d842c51e4fb996d42e1f04a9c291e3d5bf (commit) via 4ebb4ae6cfab256631dea866f787003e419fb911 (commit) via cc770e7670800819231ac428b75d8fc87a229116 (commit) via d4d0c9422695e3ba67d933566c69034ed814d9ea (commit) via 152bbe5068fc125351f728f04a14113e08f87671 (commit) via a6d3f5418c4f2c1bd99272a9fac1cf4e33b1df09 (commit) via 04d94fbe92535f57177777bc8715fb41a2d7dcc0 (commit) via d28e4467aae44db2b15a785e6f061917798cfcd4 (commit) via e4fc770fa39f8433147cae4849923286e5b3511a (commit) via b80d6136321fb6c2be019dec4af4b1e486389e2c (commit) via c31573b9641e0f1bc7a34149506db51f3494323b (commit) via 884943251b16d3e34901a6533944e6b78ef8eb03 (commit) via ea69e03afaeff76d2141ab4a330f3489297a3a41 (commit) via e9dbb272e0075516f8d6a970a6eb70be6234c4b6 (commit) via 171ea5d3cf58c40807ad9afaf80c0100993f98cb (commit) via b93623550dceac981aa4cc49f9e892c497aee49a (commit) via 35e3836589535bae12208a403011c7e95e589a85 (commit) via 321c1799620fdb0251f070f2258470ae95c34e7c (commit) via abeb42f1d9efc113ab16600d354f8ad1dd85281f (commit) via 989ca432e4d842e50f07a1ff05dc4a65fc9881cb (commit) via 1ca2d5d1db5117058e884bcfb226e17e090f29d0 (commit) via 1f8613e9bab142a839ec3c4dafd1aff1ba7487c7 (commit) via 385e6a274da286befb38a0d540845383f393b79f (commit) via e5ba1041be862212a3ad66bd51930fc7beeb8140 (commit) via 42ce9f1e7178b3535726c0c885cc7c9f760cc8b6 (commit) via 07f69bd5cc9b6b4bc040327f315620c736ec15ba (commit) via 112f758223737464959a593084a357ba5d572e8b (commit) via 994e98bf415183a6b360f05a43cedf53778e5a7a (commit) via f51f4ee9a34faeeb6ed22ea4e894dbac7572abc7 (commit) via 2fbd3094491fbedf3dea6b864f34dd2f85a12b57 (commit) via 5b85a3e26c5426dd563787a3460d53e6e751de28 (commit) via 8a56e311ec244a5e9c44457de0cb90643958e0ad (commit) via 6a9ed3d4aeee576dd87af77fe51a781c5fe64b79 (commit) via e952f1bdc7e5da3e50b9b36aeed6005c8d947ca6 (commit) via 1ba87fd1749ee3f46d9da1a5eb9798584a280676 (commit) via 3e58b9af57074ded65566330c33999bdfac191a8 (commit) via 410add400803340581eccf5ac1c83c8d4e40ad5a (commit) via b35311ca44b7e8b40cc48aaac6cefbe8ca4ddba8 (commit) via 751f7b5255d861abc3105d3d971164293b3dec60 (commit) via a7305ef00a70518f7abb66211ef09b0ca6d4af71 (commit) via 4f349a8656e4652edacad787d38834255f13a0a5 (commit) via c73967cb4a0217b2d0825f67d6fd56af2b4d6b7f (commit) via 366e38284d0a111542a5c87ded6ad21fa641cb2c (commit) via 9370b697e994e3b85549f07cbd54223e3e5d714f (commit) via 612d6f29f8743ec100f135aed55d0920b3ea9fda (commit) via ce76abb4c49a85d491a99318637c6e9e37729f6e (commit) via 8f95b93b41622d428522ae10cfe1bc2fde13c78c (commit) via 03bae46865f2abb3a74728986f523a30d79eb095 (commit) via b3b238c3cc8cfd1f320faf0233ae860dcfcbfda0 (commit) via a3aaf0a1815c99bed1acf4578c3aef34d6ef3cdc (commit) via f27f6f8f3fa571d656edba6f254bf47cea0bb6d8 (commit) via 58e56607c12789b41a722e03576c090584da4bf6 (commit) via 71a70c0e6c9aac54d61107fe9f1f1bf7c211821b (commit) via 73128b823c2fe8f63fcdc4c8c92c3672b6f05f3c (commit) via 8f324c7cefea75a12c0f58977177edf263f42e9f (commit) via db915a3785186d7fe208825cc47121fbf377aa21 (commit) via 5088765a2c3620bc652db538ae0054941cc23406 (commit) via 4e3166ae1a2f83ee7917a5ac0b9b98da38d8fd7c (commit) via d90432c335ae4695c520d304c385fb75c8ab0956 (commit) via 4dd997da541be93b0cfacdd8483eaec8dd2a76d5 (commit) via 79eba4b7abf940501a5b2060e8aaa3048d743652 (commit) via 069cac584f3fccfad54b4fcce8d7e8584a009c51 (commit) via e9ce050342c34b92e0eaa281a4e454c9b78a41d9 (commit) via d5e4cdc0f8c846cdf17f3276d77d352a7644bc88 (commit) via 2572b824d4b81de83a1b16dee84d8754e846522c (commit) via c40cbccf7d51c2d12a26c3cfc333199fad482c5b (commit) via c58022717341eddb7dfa490c78e4d4d6a2f95af8 (commit) via 46cf4151c4c95627ce57363f128ba17aa2d647b8 (commit) via 7c05f1371c95102efac91dcf71acd08f570a446f (commit) via 188a42a72fb313521d1f2d459af45ac00d519c3e (commit) via c6d83a15d8ac11cba1388e853a9b321ca4e9c87a (commit) via 6a497bb0a3a92ac13d637ee200db4d6cd43cb121 (commit) via 861f1b3da65d3eda55e0e1f29d628aa3fb643f70 (commit) via c0bccc51df0eda22b4a7aa5833e1204412b39fc8 (commit) via d62a5dfc86a4d0f48f93494065f7a835c9140bb6 (commit) via cc6b948e5ea86996fe65014ce8f97bf92b46e4c0 (commit) via 52052ef88b6f46a12c8430395ae8b419971fcb35 (commit) via 3b3622305bb950f16f238f030c8f32786ad3511a (commit) via 5d3b5bef11bc29bb00a14103433fea81e4dcc340 (commit) via ad42eb33b61ad262315bfa087dc7f4f0ddbca5fe (commit) via cb299acc27d5f80b2fc801f0f57358ec9f0303d1 (commit) via d5257063b04a95aca3d144f860698a3c7181e554 (commit) via f81b9475f3724eef5d9e81b9190e30f5df09c808 (commit) via 258b7b283379a10e9fd527c2d863f1ddc7c5fa74 (commit) via f2c98e125fe0d7d59ce3ff58928d20ad41066685 (commit) via e83b96b793dbe9d525fc878f7e8df8304079e35d (commit) via aa6682802eecd0434088c16b51d198fea619b76d (commit) via 52b95d8893fb288a4a787d668b8456c12e887d5c (commit) via 695f0d0d3a2db22d2ee3a426df8a1ec502cd471b (commit) via 1619fb46a88accd1e6864f0c9de27ae2fd46541a (commit) via f506489d1ed222761f9ce752144a458290020e55 (commit) via 988b3806b6ad2f28ebd6b582ce18928407d0b011 (commit) via 04657ee2f83cb446c5595090f256273a23be94a2 (commit) via 4c674eba7ab7d431f535639553be8dcce14276c4 (commit) via 1031e5d99385317e74a4667da9865aebcb48bcbe (commit) via 5d0d9b36f26221e2de96bce2afb6334f2b8e8454 (commit) via bdc679a8aee4e6b9a8aea795bdbda2341d1e5d08 (commit) via f9973166e82c3f5d8e05e2ab57aceb15ff267295 (commit) via 024eecd9106a4d3a6adebd918c0afdceb02cd4bb (commit) via e214ceaf0c74f322d2cb89b5030dd0efc1e46fbc (commit) via 4dda1812f0c4d31eb587204098b05b20f796e67d (commit) via 7f7e5eafd8bc00259c9922a68a60c06ab67c91a9 (commit) via 866533251369604c03c32e1f657b4164b5c12348 (commit) via 85bfec7572f84ba259e0eabe383f6dcb0bd45d9b (commit) via 4469e986ee2189378f9054231b796249e6db54e1 (commit) via bb000ba4fa53a91354f6630f0ef0666ef31eda4c (commit) via 6137054744e262cf8b1ddebfa4a08e00a0feffed (commit) via 48b33b0633f61d453146e2ce4813b9731c6f0836 (commit) via 17a24dc3b9ed5e09b5382deb97343496af902ec0 (commit) via 332b089ad213a1aa89658fffd8f68c9064c6d3db (commit) via f76bcee9a6a95b566e36b533a5fa45b496eb456b (commit) via 21ace9d9c4317c2fb13066ec73b6119e1643321b (commit) via d47c7bf608d3ca23c8d518ff98a42d6d5f449a70 (commit) via 290e4ce8a89819d6617fa404513d8a1629cafea7 (commit) via f1ad71d7f8c066a7e0d0c11bb1ce9d5a5719ec5e (commit) via d28da906fed16ab7f45440db65c8c84e15b53996 (commit) via 8c65a5017fe6a6dfe6d57018e28decd7649588d4 (commit) via f70c71c5a9759324d9e610bc919832b7500fd116 (commit) via e11cd31fa0cce8210577ee46b6a33ee371f4fe64 (commit) via 1bc33257d48bb4b54333b755951967c6c3fa1df6 (commit) via a8936656faa14b27173f90046fef6259dceaa321 (commit) via 042aca557defd72d7205becb7e54c9f93793b496 (commit) via 21346d3f12f6ec35680574df44430c7bfb2efecb (commit) via a756c74da58196f670633c1d08840dc6e3d62fea (commit) via 8317ea01aa3cf9319ef907e127fa6dbf9666cc53 (commit) via 9109ba434782a3514f1bc6a5fd3c063d231008f2 (commit) via cdc911dc53bca22ca56acf2b9a4a0d69e3120c9a (commit) via 19255a3516e230da77b18c051d89012bcabcd254 (commit) via eb226b366f40da2d284bb60d57c2d8bcb85de607 (commit) via 933fc4ac4708b79c23b4bb1a6c829af4efca7efa (commit) via 62c5f9afc3bbe1e83ee63a1a8b9fe56b30c4849c (commit) via 29768b03eabcff13b332497caf2fb0e1c1ca717b (commit) via 77279153953fb9e757481ac9eb299608f6f2aeba (commit) via 0039ffa2163665856be1e772146442f2c7418c6c (commit) via 1a9de8035c35cdb3e0501ce2cf2f816e4220bea0 (commit) via 72ecdd34cf6dbec293fe020e1aeed0a17a499061 (commit) via fc3dab0ea956db618fe2b77778ac413db846b422 (commit) via 4feba34d02fe42fd20209e5b247f91d8e0f7a2ac (commit) via 4f83077e2d3fffed1d86b1e14ea34343db62cc3a (commit) via 750789af426a2ae7f8374069f792371968281420 (commit) via 4ffdd564eb32be6147cb8610bbf6c0b5496fc56a (commit) via f6fd0abc5bbfa7d677cd090ba8e2894d96afdde8 (commit) via f6428725bb0ae7e64866e3eca16a5ad8f007f916 (commit) via 60dcaaea133931a323180c30eafabe4576e72cb8 (commit) via fb357e5fef2e7803f2f745b6aa4cf63935628ed6 (commit) via 32f756c8226e2026d51307c4722aa6b98939c9e6 (commit) via bfdf1322e7638687c96b323b1df20fd9c08b3044 (commit) via 4da61391eec301ab564ac8e3e5ee9dc7ffd4f8de (commit) via 44efb0a747593f4c6ac463e2d0221ab05dd49c6d (commit) via 61b99cdeaa189647362c5375560b238279b36742 (commit) via efed6468eda950644014ccfada85300710e05009 (commit) via bd3d0eafbb362fbc0f140c228da85791a473e44e (commit) via 3838a0d5fbed480c007b1667eddf2d6797a24344 (commit) via 54140848181e15acfda9c385e6cdc5c8b4f2a1d6 (commit) via 3f9c4cdf89ce00ae72a1176dbf5e68b5f1f1720e (commit) via c03a7b4f517fc4395a68cdfd143254b0a56622af (commit) via 87e76f899693fb3c29f280b417303e899c3a38dd (commit) via 1eb3ed06cbec8693572398700986cdd970212d4f (commit) via e47bb0183700c64b90e44fb6b087d41713bbc04a (commit) via ee45fce4a48bf464fbc13d55abc0ca93a32645ee (commit) via 0ba0c67ba3af352c2e53da03136d1d032b4e41c4 (commit) via 228f4e9b336757ddbf3085637e47962692278c45 (commit) via b481ddb3df21e02e16038854ec7d256601717018 (commit) via cb3e091a45bfdb24115ef68fa36341cf93419681 (commit) via 0cbaaf2dc3e250fe0f4b056e229e3fcfbe6a8534 (commit) via 3825a564930ffe09fd681632a905ab9c91c41d98 (commit) via 0c46750d2c4cee401f1cda047a71b0e349678077 (commit) via d7ca93f6194fa2b848945df630222b75b404b15a (commit) via 06b7789d4dfcfeedce6fa9a163e8f8d66b188c32 (commit) via d5bdcee737f428b09c6b390655e0ac485cd0b21a (commit) via fc695a776b5a4d61c3bfd3253ff9d40c3f30f6b9 (commit) via 900ee0b80077b38b81e5da47cd79c38f044c3a03 (commit) via 6442709bae306903084e0bd710b4cea41d0b2500 (commit) via 901a06021e169bdfa19633370192870385868a7d (commit) via 3bd55dba7c889776bd094c6c29045c567b9000e2 (commit) via 0a2d0b126ca01a7d989a887c71693989e9d15224 (commit) via a9affa07cdeea6b66c920e4826abfe59854f7ffa (commit) via 7a25220776202998904d979ebf64c008fc4c4d24 (commit) via 0820c7850805e7c41fd54292fa4ebd13b28b51fa (commit) via 5b1f9cd12703eca0505ee0b6d9d2a0e53ed86f67 (commit) via 6f8b93983a3bfb4a9262cae8e9b989edb61e8a4b (commit) via 59d559af2e35d3521c7cffc4a0c7c33ffaf2c744 (commit) via df32e564aed43470e304cf21d8c9ac1d5a01d055 (commit) via 39ac889d636ee8ce083e00ab2c8351c6148150ef (commit) via 7cf369fe276e011d4c9322153ae7c77d5124ca7e (commit) via 075cae5147bdca011841a9ebaf166636ab3e410f (commit) via 9a53af4068fd7f7627f8af193f551c1f2b5d4ac4 (commit) via 219f741128bfe1f34a97d71fa3bcdf8588d3d890 (commit) via 8a5beef32e007e69a8b348afa8ed2bddd760199a (commit) via e56aa462976f80762712519a4cf653b8c45bf3db (commit) via 551d5aedbffc0020793c2b6b374f1fa2be3e91d8 (commit) via f4f8074bec408ba0cab0f08ce1c48ad312fc0b24 (commit) via a63aaaed051a51592f9ddc738febd58a4d99928a (commit) via 9130b53a5e949da07e10414e13b79d7abad2b4fa (commit) via b52afa4655737f442af6017bab8d44158bdd466d (commit) via 05dbc204cdb4c7d81f40f2e2174c51df7e3294b9 (commit) via 75139374f07cff43eeab6b4302d560a077440d76 (commit) via 95dcc4e474b8ad10fea47c68df88678a6ae10fac (commit) via 13b7e7587d50a52bb422852eb4d71a93eb8f18a6 (commit) via d96416fe482e17bc9f5a741d71d4a51a9b44f65e (commit) via 3a713eaaf7d289b130acf0007b197553a6528112 (commit) via 3800fc299fe7703c4a3976f9ba9028e1ebeb3d3e (commit) via 3e8615ef9c6097c1b0249ff3b8e3dd2609c7af96 (commit) via 9bbf1dc06ebb891498747768736442b22058c49e (commit) via 1dda2ec55a07f2a51d09f7b1604707e690e884b5 (commit) via ed1758f8eb58a4e52acf0f3885f82403814f5ffd (commit) via d6f96207c377e0492929592f9408a2fb3cafab93 (commit) via b82d027b457db00b1a48ca225444d9c977cfc6f9 (commit) via e3a4c2e02ceacd302e8bc6a7dc1bc02b29ab2cfc (commit) via ef58e97362d10877780aed7b6806dd02ce2f4303 (commit) via 388a40942bbe87206547bd9eb27273f80ef2aa9f (commit) via 918cb5b1f095cc05a8823fa218a59edf0e536384 (commit) via 048d1adb4ede50e49dce00873a5961e424e149f9 (commit) via bf09271b656bb8110c40cd2d456acfaa3b4e4741 (commit) via 57d121fbb1f2e9e2ac0622dd4049dedc3968d894 (commit) via b38aa000334c35193140c6b544067b0b30d916c5 (commit) via 4ce52abc03e3fe5475a8dd22014b9a9eb00a184d (commit) via 4332131dcca03b262e0dd51352eb2e27522887c8 (commit) via 5aca066c5bbb7263624eb140378dd2f49e9d80ec (commit) via 146bf9267ca88831d7cff4d121f414a3a73e26de (commit) via 58ba87f892316b9f9cbb7851a940ec808527e36a (commit) via e80314d7a8208214ac85bf9b2e769a7e3b5aaa04 (commit) via 563ac22a1646f1287d1baac755e13cbe33c1fe7b (commit) via 08be47cf939c3adfe653809c46c7b23b7a912a39 (commit) via 564d3a1dc8e19f16db6ddccca38e21d89634c1b4 (commit) via 95a659f1801701b02528c22f0287bb57056dc627 (commit) via a8c7ccb1839d912edc972384de6641f3c17ad8ff (commit) via 5ad25ef4b690252a4251e8824e00b053ea61d000 (commit) via ac46384171c54a0fb9c47c32642fbca4ff1e925b (commit) via 998d9ee967f6795c71ff23cf16601f7e974b21ba (commit) via ee49f006cf657fa6f1c2d112f44d762441fd5cf1 (commit) via 51f7dcb0a55874e71e4695f5154548a41c87ad56 (commit) via ba4ba7c39de82b805652efbb7dc5e1659c53f36b (commit) via e804d410cd4e391cd81ff3d8981cfba1fae28742 (commit) via 2722c4dcc55605b7946f3c9bfa4b2fe5ce4161cb (commit) via 112c87b28afac71617bcbb552ae1f2027bb548b6 (commit) via cd351ef2c427284eea0ab494eba5d4f24bc0e050 (commit) via fbd83948675f4b1cb487d59390cfe1689f801fc0 (commit) via c341f4679ad00cb65c7660b474ddabd13d0ef498 (commit) via 6960516b6b053816313d2ff5ee4e9375a84829cb (commit) via e0fd2d0446101847dd40cfe4cc451667d04ddcd9 (commit) via ad70a236f4368c21c08bcd4ea4d28425176c4e17 (commit) via e3ca17e13b8d2aecc6d97ac800d65c6c35378a98 (commit) via 0bbdbd95c9515a4714ef1d57a17c7271bc4d1774 (commit) via 9440d5776bf48778d452e2d3a48d4e93d7b6f7a7 (commit) via 897346032b33ebd033cda9bcb5d094f1c112f37d (commit) via a749ab8f3ddaf2eab470d1d567be69acab359f63 (commit) via 38995d19b806e8cc1d43fab0422beefd4c23431f (commit) via 21c946eef4e11e6161cc46b265fbeb128ea1baf7 (commit) via 41f03f5fa794e05745ff2975b7d8854e3a4a7792 (commit) via 135c78554944250e9a15efe2bc60e9f8197ff2a1 (commit) via d65584f7a3074ff9887a4e540cfdbd48a4628c22 (commit) via da7111e1a34bd8b85a98ed1ebc14f65c499748be (commit) via 426f97d35300555fc5360698b6a6f0da2ba18169 (commit) via 24e7ccb7ef486191ebb9fca916c70e367c41b2fb (commit) via ff88df48e8a693f213a44aee3ad2474f500857b5 (commit) via bc8c0add7f799ad5775e4f229256832e17156b68 (commit) via 20d7da5276704864569fb08259278a08c5f9e725 (commit) via 4ef8a205edf66b652418aa5491436d26fd806175 (commit) via cd344e3a62e3a6728e5b749cb923104c2c09949c (commit) via 98caa14cc84cc659c2c5b51f84c6547b57c89c30 (commit) via a79abb82fe1c90b65f124a8dd31e4a0227583ce4 (commit) via ce8fadc717b001b39b3208f8069cb0048073f975 (commit) via d1ee1cb81351cc9bd84cd7c3b755d0c4a5e45f6f (commit) via d8b70f62cb1a5ea7231c4236bed57206068a946c (commit) via 1462576bcba68310395a7185e4b77da38e1e6b33 (commit) via 421012a330989a64b24a3289379bb4938e6ed3ea (commit) via 14a8d61fd49a9b990cbef7e1495e4763f31c55f2 (commit) via 2af853deb5225a9c8cb3d1e6311680c3fb7d86aa (commit) via 33bb9cfa365f494bb76ff9c2c78ad625e77152ec (commit) via 38491644540a203ee6465dd0bf179afb426aa835 (commit) via f325ae186d5d235cb90f4fb002a8df56abc050f8 (commit) via d6734eeb875ceca5d810e829ca90541918dca2b4 (commit) via 81c3e637ccc135068a06fa3dc72f23733f003db5 (commit) via dcb2e39fda75ef20b950fe293bbc989e95adbdec (commit) via db7de303c2a1e35b672016833db4bf85148c98c2 (commit) via 86f1d70445f8a192fbc518cac83e0d6e8db70eef (commit) via 828e763260c257920d91037395c7f88e59243367 (commit) via 7bc6dccc0a993ddb3681100e28405189be09ff72 (commit) via fcc532470aa56e7a2e345f7f2396774787feb2ce (commit) via 96de37092a29cb2e7a92e9cb10b0ef47bca32732 (commit) via ccddb454b8e7ae3ae075db5fd3233ce86c8c70cb (commit) via 4a2a66e31c4b7fbcc6bbe41219a6c7f0624dc165 (commit) via 21a7809bfaa02ec3d11620676636e65b47065b62 (commit) via 5c8b69b0f5408bb59a92ff3f061bd76efa773eff (commit) via 1d858dc017560b99206b542c42b2a7adaa344cb8 (commit) via 2986ca5ecc0120790c7fc8801647078f3475be18 (commit) via a71ca1f0b3a405e6ff1ea4b09badcc345581ddba (commit) via 828d6c137d703ea095008fc6da794904a15c4ebd (commit) via 00a583ac6833bdb2909d1bab1bffb28fb6c2b245 (commit) via 5cbb54880742c23658991edec91a514f3582ed2b (commit) via ff5c89de0c23c0568afcbabd63974388ca045aa3 (commit) via 7b637ebdc97655462d08d8ff70bee5d4f32e4681 (commit) via c2f561e58c799cc82df7db70710ae2f79b8b6b64 (commit) via 6b84df8da98169af43d4173dfbd1dedf5979dcb2 (commit) via d7d4083025f3007b862dd500c8f5fc64e105055b (commit) via b22294bc41c3ce62e561c7123c3f489a750dcb66 (commit) via 15cc50fbb505b526e28c708e4e1b16e79a66799c (commit) via 2dc9a754b539bb215ad2360a27327a629ad26627 (commit) via 9bd0643a771b19131d14613e963d61d4b32106ee (commit) via aec06dd4922187ce5346d20a9f0d53f01b6ce9fc (commit) via ef13efab56464890f171c2a2142b64b728f4f2e8 (commit) via 797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1 (commit) via 762131fe8d585ced6b259a451ccde8fded2a8ca4 (commit) via d15a502f8eec903bd25ab5e1e5ce646eff68a4fc (commit) via f29d18477360388cf66be5f1c17e2aae5fb14453 (commit) via 68b51a57e535f67a6837bc0af5e3b00a225f2154 (commit) via 74ee03a2628753cd6c8919277b3c3331caca70f0 (commit) via 020c3e409d6a64ac0562c1a1f972c56ad2c875e8 (commit) via 8142698e7a9752bf849945cf147fcf4ae609359f (commit) via 03d0e6b9bb5e046c424966f9ad06c7a7c7434abe (commit) via 7b6349da4dc968691f1a374211fcc153c8b4f1c6 (commit) via 50ad1e0a144ae1f2267a4966789e5a16372f458e (commit) via 7f97a6c94b59be7e7eba7362ce3eecdcff79ab70 (commit) via 4988b914e1fb7ca215436738ab08ed199a6f63d2 (commit) via 11e0ceaeab905075d93e279b87470b99c6401929 (commit) via 373b2e483d983136415190dcc838e636077e5991 (commit) via 27591a541c3ee7c0a941295f25610631bf18ca74 (commit) via 481c9003fa41e75731bc463cdfa4310e91d5ea4c (commit) via 67a7dcef45fef6172514d6df1bea3ca94a04735a (commit) via 29593b79a236f9bd6653ed0ab874444ae4f38f00 (commit) via c700d11d259af9c00680321804669fadbe378a22 (commit) via 5d1690725bdbd5840e1188e9025121ac2f9878ed (commit) via 76ff725ae7a38b4044cc3d5dc6f8e76cbd6c20aa (commit) via b4556b47a82f09d2dc40118e1e6cb41b69ece529 (commit) via 25c01cf0b0b940bbfb2d27410efdb4091479bcda (commit) via e3ac68cfbf04e48a089b6d3cb4f4091e559dc5a0 (commit) via 4a22c06e7fe8bcfb3c7243c5b8d98cc34df13f06 (commit) via f21a823598c672efd73de09b826acaeba231946c (commit) via 0966f1c5489591ba049b43f9e56a9f4e34778789 (commit) via 65120d180b6e7658e296fd2c4c85a23f337c06dc (commit) via e7b842e18955d13f6d9c021bab4a8935bf282744 (commit) via a2af850ba6dbee7797484ec5f6696525123023fc (commit) via 7ded655f7ba82ea72a82d0555449f2df5ef38594 (commit) via 49ad7f9af84dd46e5527e6fefaa47d8bde748bca (commit) via 1d408dc10f492d060b8b9546c3ed3521d7051fd8 (commit) via e240a7c0176450e092e2398148c1e13f8940c239 (commit) via 074d098ffb001c6e6c03483746c7bb6e02ab4484 (commit) via 447b142b6a5ae8ee1669cb1a424619af808f1c17 (commit) via a8345d65f359d75efb057d22976cfb92b4d477cf (commit) via ea51b71a4f76597ada400d8bdea75cc9548530a3 (commit) via c18dc6fbe5b68312be52353aa0a493106584ffe7 (commit) via 6b07972fbdf7e8687577a430597e40e7e0b4831d (commit) via 2bdba83e4bbd5435ee6faf5a2eedec4f0d0dfb0a (commit) via 8ba204a69602ca8744aeec4ca3d808c964715ed5 (commit) via 7fe5c79dd07da5d23fc61070884a1efa95c0fafd (commit) via 33d4aff50d50907d05b49c92ed01376264d84389 (commit) via d47abe40b6532095fa28f5f1305e2ecad5feb6b7 (commit) via 61a607e8d43e0d02ff80cca6e60441f56a6741b5 (commit) via 272a2bf19d26bb325ae5c9dda9a885c64016918d (commit) via 5726af681a9eb9b1c8d2a1bee4c5c93e61f6e109 (commit) via 77c171a37ce005399c8b81b32721f6e167a78913 (commit) via b6a3102a9f8da05b50d4f4e96dd9f42ace37aa9b (commit) via d1e3cec2aa17a2f07f22c64c3bd29c765d69d9d2 (commit) via 504db72d99fc2302de605fd9c2f845c1b8865500 (commit) via fa6325782112063b5d425714a37c8ebd01b90d7c (commit) via 6299693f8aa5f5a61cec82215b73a2040a8d8603 (commit) via 29b51379de352980dd453243bea7ed37ed300c62 (commit) via 7d9b49fbdf55b28d2979af89a8192607df487ca1 (commit) via 4389664a26be4d1f96a55c34e5fac9ac1248e5f0 (commit) via 328191f65f7fb58ece6f749fbfc3462539c7afc1 (commit) via 9e032304ea4133dd6c59b2c0f3b686d4a7aac2a5 (commit) via fde59c4d882e104459dbdf8a07a22899427b6657 (commit) via 52b6effd817ae44577f86df4f382b0c98df7402a (commit) via 8e0cb45e5591cc778b054780f9e6290c3f239815 (commit) via d5e7d5f3ebb42e1a8b38e4bd30f717cdac81ed77 (commit) via 64be1ae4a3ae98e63cf35d495f0ca06c77cdf923 (commit) via 47866770cee381851ccc8070f64459909a838288 (commit) via 735f168bf08a4fdf1d9e245035d2dbcadbed652f (commit) via c148803a575ed1c3639123190b1d6a5d31578f34 (commit) via 1aa5c1bec82537ccbff8e05ae989b8befbdd286e (commit) via aab1f6e984e81f732ec2dd5c33ff8f7bf604a0f2 (commit) via f99df80794df7acc383d93d47b5da3ac8450e117 (commit) via f203694bb848e7a4bd2c623348053532b1b4e589 (commit) via 3c4d2e84d2659459eeecd2b9da0fceb22a2fb852 (commit) via e4f508e42397549cd966e47349d4030cb793c354 (commit) via 4e9b97d7397fd526e6b4e4ce43dd305cb8341ac8 (commit) via 41c9e14afb0bc7e68e4530f76329b7c11cdfa0e4 (commit) via 3c3b37b0bbd3fb78aa60a2b38184b6397d2ea47f (commit) via 0a5dd3c700f1873be217707aa89a805d009bac3e (commit) via 3a5f609cbb4ae63fca1eb87918767a4296d16e5f (commit) via f582dba6664e5ea814f3b33c71ae4d83db17b996 (commit) via 74f0d4abcd8de84283858fe144772e688669e46a (commit) via 94c29976d0020b48a5c565234b71f8f6abaf08be (commit) via 50ada755e3c133149f76dddfd0921eb7a9d32506 (commit) via 655d242b90a06c5904b67ce063361dfb646e85b3 (commit) via e01c576338ae448d9cbf18cc065567fde5c89f3b (commit) via 627ffb4bd768609019014828d7480c22997cda0c (commit) via f4cec30b5326804b7c82c09dad85e78ce8fa3b32 (commit) via 4887640b7a69ee1febc19c50add55f8e07bb42b8 (commit) via 5aabfec9308bb8b85f19077c2514a0c34f1dbb87 (commit) via 677e73cb8a7c6f3e598375cb4ff29a24e43a1492 (commit) via 0278989405eea53ca7e5f1bfa6af9aea7a0b49c5 (commit) via a88c99f1bc301276a1780fec683d5061ca13f66f (commit) via 93ac2a78d5e0dbb6607105cc8d2a3f19ebdd8583 (commit) via e9c984267e5539b798a2b1af8431e5715f261cfd (commit) via c7a319ab057172071bf8fb909c4498ca87b1235a (commit) via 02d177c9cc05514baccfa530ab85eec65374fbcb (commit) via 4689d16e8aa90e57a8456357251b6575131529d7 (commit) via a5b73e719a744a75be6ccf149360b14aaebbb273 (commit) via a8c819659be76426804abc28bb6221a2dc3bf333 (commit) via 892ffe4ebd5ca0fd36255671efe37edc9448b470 (commit) via 982b4cd602fc125c9d2165145100d5e574644bf9 (commit) via 551b4c90626357ee9b6048e89c7406f3b4063fbb (commit) via 3a7be4f3943e160b1c0c144d914d3dd2ba42819e (commit) via 5f3c8f6ab2c6633bdbfc083b9e96b477c1700c80 (commit) via 955c2a630aae9b925b468e98e7c323384d943cb0 (commit) via ee9d4feb67f01686c270d3db584dfccaefd14b47 (commit) via 9bb2faf62a495539a81da7968921b8f95870e03f (commit) via 314a953982f50f355bf552d07a9d404cc8c5ec87 (commit) via acf6fc6a7e95175796bb25c9be05ba26bf372b53 (commit) via 702a5489929afd1e16adf5a2123b906e4f398e2b (commit) via 88f2455f04ace2b5b9bf4462344bcfb52fabc85e (commit) via 17bbf6af1ecca15194a693d31fdd8163aacfd994 (commit) via 5a62e0c1721281503c8b4cd9d4d3d0de8abebf0f (commit) via 5a8b67b3de0e09abf5104bbf68e5eb4e74d34786 (commit) via 6da5fb8379dd1ced9a39c51c534e0252da111950 (commit) via 038e3a4f718bcf6936065beecf886f7c1fc178cc (commit) via fe7f117ad22c1f2884c47cb961ea33f1c88206a4 (commit) via 93b705a396c23f771ba203efb6f2f4934ae027b7 (commit) via baa60321692b4991fbee54e448e9bc420105fe68 (commit) via b06118f8f1f2dd13ee055f35d18068ece9ff6615 (commit) via 9bc62024ac30d2adc69fd86c88c6d772769b79ac (commit) via 4ada475ef5e15fa72a2f075ec1efafce321c313c (commit) via 8abca14034c22014aead0fd4f3be737cd3835ce4 (commit) via 6c0820a8748e24155d3b7ce6991a90f5a396f524 (commit) via 995b54256ede7752b5d6fde049097d15aa16c405 (commit) via 2df3719d2c6d3426f5a6562c11cd8b0ef9830184 (commit) via ac7c12eced7ab3ba6d70a2c6cb95bb0e6ebbe024 (commit) via 85d966dcd7a29a17e42fde7b1c109e642f063d82 (commit) via e555480c60e95073840fe1a5f52004fd8ce81f9c (commit) via 2c0e87fff3347189db7454cf55669eec45819d9a (commit) via ff386d1121ec52854d522d3bb9c86fab286d58ef (commit) via b602cb85c90bba26bff04d570bf108658016cf07 (commit) via 3e6ec47c421808123efac2cf67850f8b75839c67 (commit) via cd52a225d298dc1a4924b82ebac0ac74fccf3356 (commit) via a354f60ce07cd67bd60161824a4e74bf9068fea4 (commit) via 382c4fca6b895c2c7a68445918a8fd73a15e1f91 (commit) via c2bc47f2662ec7e80469bee634c2444ee3d28bcc (commit) via aabf8772fd3a2dde07d48d41658db728755e3041 (commit) via a85e2a89de3d394d084703b29cd7e0ef3bf8f570 (commit) via ec807f6edf7ddd49fc82638f176ac58d6eab6b80 (commit) via ef729c5bc2591542eacbe2aaf46bde9b4ae6d2ed (commit) via f8792c12b9e57dafcee2306e12dec268f9e147f2 (commit) via 7b65e49529bbc384b2f241685d647f26ac041d5b (commit) via 8ba870bad6210ae2c053ae4f7c19bcb9d8312eab (commit) via 573397bb540a1b1bbe991602d58835bb1a9f61e1 (commit) via 4b0e1dc0a4ae5f4fdb680e1ec27cd1f392d64ffb (commit) via 16e449cc7221cbf77a2bac02a91d986703fe6483 (commit) via a382c3013c7b98a95c6d4ceb833721093a5c9ff3 (commit) via 33fe4751e8ccc1ad5342cb16a192cb3a69479845 (commit) via 15a6ae5cb7d2d7b67ef5704acd01b6f6765fd5d9 (commit) via 7d7446c905623420482dda9eb6e10e0f604f6fd9 (commit) via e34e9c2705c9e0bb568f5f69a655a9d425ef8adb (commit) via 9a1b6c6037869edba1c44dcfa06da8201653ce1b (commit) via 31b6cf41c5a4e17ea97e0c94f0e81b9a18ce96b8 (commit) via 9970cdcb59e5d02da68c195799146f9bc91816e7 (commit) via 52aecc0c382384d5bea3c18d7894e80bc573d8d7 (commit) via 56539d89da4f8f0834a17faee14ef88f3b232048 (commit) via 16a3a73508e8109e453e35288c37fe545a8ab59e (commit) via 85e0314201005c923420eb650a9629e38356b77a (commit) via 35995fa6b5872b58f086d16b16ca90d7d259d9b0 (commit) via 6bc3073e23af70bde3e8a7659aa51a784deeec9c (commit) via f4e979b126e41384b14f0d5ff8b41d81b6f41a00 (commit) via fd59f9ad519c1c311c54569133797d9061e90558 (commit) via e29bfbf272dbf4ea5f6a89084ec1f503fcf0e4f7 (commit) via 55d9bfa9dd42912432eea3297507187084a7d154 (commit) via bdd9b1c73c8c43e45561a000cb9f5c61349528b7 (commit) via 5f99e61cadada755ad8c19ec1f114079c660b400 (commit) via 82388543d2b7984fb98583817a3683f789c84cdd (commit) via b1cd292335d4d760d2bbd5062e21fdb6d24fcbd8 (commit) via 5ec03c93fc92149708b4ec9d19384a015d845f8e (commit) via 88e1c54a7cd3213d87143558a8fddf39e7fdccc0 (commit) via bfac78d07479eb652405ee51548c4011766666ce (commit) via 2711c35a8d42e43c7600ef23bf586f2e068292e8 (commit) via 8427b8e11c9a98fb7f7875a1153ab4998e61d4c1 (commit) via 8b9cd61337501b6adb36fcd70e13ad59d1a63b34 (commit) via 963c4e4b909dd573f10aab21362c342431e6496d (commit) via 99f5a32c7ab6011ab826f11e4d48f018dfb758a6 (commit) via db713223a85eb7140c7a6800e4de6173f3d4b326 (commit) via 09a86b392e6eb7ffa1c697b225c436e07d21d7da (commit) via 7a649111cdea2b10f2ec57084416be619867fbfb (commit) via 5d0d980d9949daf596e10715d686adc95c1c232b (commit) via 73c618be7036c693cbff764b3765de1bf4626cfb (commit) via ca684ccb467d35cbebf7374746509788a5eb917d (commit) via 8f884f2146132a3815b0295ffffb1b6666fbfde1 (commit) via 3d57541d6d4fa094db0ceede2972d27d0a0a0246 (commit) via ffc7c24b2e91ce47718237e6cc90a21358833426 (commit) via d615d20a63ce4fae5ada3881f4d154bfc4385fd7 (commit) via cd7ed47c4ad5b9c2c7539a6f77bbe11a8510a718 (commit) via bca8be583eda435202f7a0eb6e288646ce70570f (commit) via 7decbe8ffb66a1a02b9ffab027f33558fa36873a (commit) via 2b57b139201f7fa1959702db0a8c18482452f903 (commit) via 8ac4e2cfa283d6a27ba11c9ce6e2cea44457b5cb (commit) via 3b3bd880a3de1d6348d746c15b6bc3b32757343a (commit) via 481f8cf1cc73f99d06ed75752715f2f9fbb8f0ba (commit) via ffa44a39c9d7e092f8c86a4648b976ccc64da4d6 (commit) via 29eeb9a8fd9a6417b99e7fbd8b406f72fc83f35f (commit) via 624b72159be327505c01f4d68ef6e67ac5f4335e (commit) via 8842a501cffe67a665b6fe70956e207193b3f76d (commit) via 4e88b1ec17fb61399dcf3e7f5f722905899daf27 (commit) via d504999d8656c49138020677d908330125907842 (commit) via 1fc340f0d4d9450d82631c876ab0f85bae220242 (commit) via 3e7689ec392e6e22f60f9568181629077f74c4b6 (commit) via 4c61e40cc59e176a175529ad73598b36690f3299 (commit) via 19ccd354730a6f9eeb70fa586c9b8bc4d32b3a07 (commit) via e09518ca50177d1dd0e1e156f481cd51562a394b (commit) via ad453f0502fe5d95ca1f050cdf52c2d32a892988 (commit) via 6f108f84d08a4cc12ef5bafc93d5aad903ba687a (commit) via f951d0adb4f7ca185804fba530a3dbc9b81f1cc5 (commit) via c63380b1955422d7116f7ea90c238ab8619e9bc4 (commit) via 134d5c1f7c82698b79d88ba92a7bd98b81dceaec (commit) via 2b909c08f526536d4dd84dfe68edf22682ae88ca (commit) via 7bfbcc75a3158677897b2a80b02500425620e714 (commit) via d6a6024e9eb993d94d24bb0d98f966c50079a525 (commit) via dbc0ec1648b493b237efd704bec38c757b6da5a5 (commit) via 059c230d89b2f5c82423fc6458302620f4b09599 (commit) via 13a6ff31becea16d567b23abc68bfa8aa75365ce (commit) via 500f67e5468878d5738dc633a0bb7165def825e1 (commit) via 850764fc701ce9e1190d5bb20af97ec511763f0b (commit) via e297e0455eb50243197bfe2f4f0594971ba9aab0 (commit) via f639fd8c5f78950638ee0142685faacff58b57d4 (commit) via a4498cc9aedcbd9833e23e3c52d0a39f6de19b86 (commit) via 811bcf543ceb04f72d0127ac42b7b198be4791dc (commit) via c7a7c655f0433c7ca4ea6ec5ce78b7f17cbf5140 (commit) via 34ba5c53481e7f2101dafa735504cb98f94ec6db (commit) via 1296a0eadae05acb03f1313242f937b785a9bcc3 (commit) via 8aa97fba9eb5d54d7141895c1db1ed8afe820d75 (commit) via 7ec32a00d74bca7ff1a4873c8133b4811edc7bba (commit) via e9849d35aa612bc49667a9db7dadc30f87653783 (commit) via 9ef2b2b164a92081bf3466af9ac0d0c28acae79d (commit) via 51d9e8ae3ecd1f188fe236a25b810597edf30af7 (commit) via df14a98e9c4af316cd5e75d6af8cc7b75da2db8f (commit) via 6a98785d8f76d78447716fa90f93a36060288b8f (commit) via 88ee36f93f2491a0e1220fd6bdc5018b85c10f24 (commit) via 788bb146643030ebed27db297af83fe15b1f5447 (commit) via eb7b5087f79527242a25c449c6ae837dcb4768ff (commit) via 34216023e6160908ae50721504924ef3ab3ed4f9 (commit) via 6a44e34630180250b865134c2a0ccbf9993339ca (commit) via 922bb1fd69f5a0cb6a2bd6a9f5186bca11070196 (commit) via 34efc0a539ac8ad595f5e5b5c0e3afc6a158456e (commit) via b1f87a50b3aee129d420b8d789ebec55068e4ec5 (commit) via 03407040d4d7d89fbb45e941a9dfb4257003a8a8 (commit) via bbb3216a2cac24ea18731141a3eadc62e11320d2 (commit) via 33b562aa728e081513ea029fccdedbe6e5ec596c (commit) via ab8d5d0fdb28966d8a2fe68ee97c3816544ffb4e (commit) via c42e63a97eab73c5125e4619df58779e6c28659e (commit) via ad2497aa054e40afa88b5288a59f2e6ad3a765c0 (commit) via 4bb3c4102fa40d802ab0b0d0500afe5c9887038f (commit) via 8a5472bd2fc043b3b0f68b080a86e0ed330d4638 (commit) via d0be6582057c71f1aaf4d313d4446ae29f56add3 (commit) via b224f431206339bd8cbff22b6948f30c28c87406 (commit) via b475599d587f9250d5062798832d1624ddde1805 (commit) via d290751d0e483c2e6d952925f73860033f36905d (commit) via 3cf455ba3d75d03121eb5736cf1f5aa8203c2da8 (commit) via ea6475334aff57633ad7bb80c013c8953328a909 (commit) via 564234912935ddb57c8553b7c9c97e8745a09ede (commit) via a6290cffaec49fc06875d6f0379af7d712b90bb3 (commit) via 5ec17e610609b8ca80cf8ce4f33f8c03ea48a090 (commit) via 0a6c227d6412b01cf2ca45cd21b90384e7fe99c3 (commit) via c8e59d2dfa7cc716d11b9e32fdc6f2302e4cbe69 (commit) via 595cbb493fcdbdae30ac5936c3bdfdedd75a19e7 (commit) via c59ec2b7c8f24de9eceba141ae7b379806c37948 (commit) via 0c3fc5a2513ecf2daff2223dc26bcc4dcadf9b09 (commit) via 8a98cf643235a4d2869e1c876f8769b3e6bcd86f (commit) via 58677c327fd4a47aa88efe121f290182b44d01f5 (commit) via 4db08807db2fc0db6ab0c4d438ddb3f20969d2fb (commit) via 43a68a6dcaa7a98d94a71b4f2ecc2e2c63c84688 (commit) via af0e1cd4cbb7029de0877de9db72ba37085abff2 (commit) via 6a077b5d63895489c2962af2f7302f52444045cc (commit) via a6bd08992e128f33b98add6bce714e97e058d7f6 (commit) via 4e427f4949fbc5d965acce7aebf21d738e39daa8 (commit) via 6f36dce0cf1eebd26a734b441c0e2412cafe6fc1 (commit) via 2fe520d2b0b106ee65e54d037245228269adb43c (commit) via 2364819d37a52c6dacad5d0091b1c755f9c2c84e (commit) via 4d3d28750edf75c44017d8297dcbda16c5d7b287 (commit) via f5c19a9dcce10a0f2a57c2836a364d2226b9c6b0 (commit) via 59f23193a7cb36496ca8038f26cbc71bc46c7a12 (commit) via 37d15c399e33f3140c1ab0259984c54084dc34f8 (commit) via 55c884ed3bf29069f3b74db7a0ba54ed62edb88f (commit) via aec3c79acbe86a2156e3929678ef05bc2840edfa (commit) via 9587011d142bd9d653b01e80e051eed0e267183e (commit) via 73e9f36ea6a64fa1a5f2f8ab39c5981b2a64aa5e (commit) via 9b588b2bdfc93d5cb0fe0c1753971e987addf68a (commit) via 8f1103c0fd5e51cbbfc6f66ada72fbead53297d6 (commit) via ec963f04cb713701dda9f12a433930845e5c2609 (commit) via 2aadb02f835313dd63a1f484f3c3c53c992932f1 (commit) via 5399280873c55c88e2d592541600395166cefd8b (commit) via 8ae035a569a0e548ca52f042e468477886a53240 (commit) via 53df6d5995bef4a4884ede870c7b904033395ce2 (commit) via 0e9e6aa85d729da6287f5519a89240ad55281096 (commit) via 2eec433f98f472eb902892ed11b68fae41376ce6 (commit) via 41c3c9a495b7d48f9388a0700cd294345e6dcccb (commit) via 291e41855c9afd473e3e5818c5432b684f225756 (commit) via 7a31a2717b69a32f0e79265dc997ca9cf215a13c (commit) via de1f4098442bc697bc49a78fe5b830cb43127f07 (commit) via 7f36d89595319f1fb800ddc688e50f5cf61b5ab8 (commit) via 64095e36ee6b37e9118e2e3fbc30d0eee4d7a2d6 (commit) via 4b726a3f5c8c323baa029fa6a39bfbb31aeba65d (commit) via 602d95d16d72f18cd9ee8badac763943b95e30bf (commit) via 40f24f0ec266c15f8e887cb7e2be957b23d32c6a (commit) via 43875ca59ce4084bd1bd857e4d3e1c18b682a466 (commit) via 83799aa934615a932a181518a539150aa8cd43fd (commit) via e3bff7b3af6257caff24a43e3afd59e087f4e9d8 (commit) via 4a63be15dd9f8afedda7f3b01d5ab80591806664 (commit) via 056db896e396b7fb15d8f813ad1989c67c6f623f (commit) via 49f5818d8a4d134ff9a6060596078d9da4c38f95 (commit) via 353222262a77e0c9f23dfde1dfb78bfb3fe96c31 (commit) via 047862d3919b490b7cb011a8128b7879d9920edf (commit) via b7a94fbb708c989034d54044c7e1891bb76ae690 (commit) via c376c5bca204a689b5bcfec88291b8bc7f226e7f (commit) via 507aa256e517e33aa109b854b444b08863447cf4 (commit) via 35284a63ea2451d725ca6776414b7cafddd8b9a7 (commit) via 9da725cb00d25c7d3f45e8ee8c943ec5241d6227 (commit) via 2005b960672d2d552585805ea398b02400a576b7 (commit) via 7af4bc69c5a7bbc373f704edddeb7d644c809825 (commit) via 7959d51847577e1411bde0cabb9e1ce687d60c6f (commit) via 566086187f21aef0686f0f21e97d06e93a205db8 (commit) via 03a50961f338462acc65db876c59e0045f0754d9 (commit) via 325288455eb4a0e7dad9689b6ebac1afe7ef7cc3 (commit) via b4811f3e57323540e644ad2ab81afd5bec78b459 (commit) via 4786ec515fe3f886cd3260e6cdd62026643ad4dc (commit) via 73a8c2b3d687a41079ff5c019ccee9c2e689a122 (commit) via 2c2e0abfb04ae9444617015f3b7bbe0860897921 (commit) via bf11980994f79ba97c408a2fb302f14f2994114b (commit) via af7da934a70d2d694cb378db9283eff1859b2747 (commit) via 972f24ea942d54b262ba9eed2b436bbd55ad5034 (commit) via 0ca8f3e699fc2936ccf65a78edf9c74aed0adb68 (commit) via 5553aab0bdc8cfb84c26b99b98779f4401e25a42 (commit) via ad7da08ac134dc1c7a14e028f0260860fa1d534b (commit) via afa26a43fd5d6f50fa8dc776677a5d10df6fbf19 (commit) via a66004bee06023e9da4e0895ee1afbceaff33bdb (commit) via cdde77e5f66cee933a7b7c538c22e8c323a91d09 (commit) via f2c1900a71a0717b96a0b263186767658de72baa (commit) via 7e53e6c9cc1b8266ccc06aca8184612256a3669d (commit) via 7c8c07d03c26304ea023b3d7ce828996088d49bd (commit) via 0bcb9efdff2feb0fcbcd8f6982bab956c105c52d (commit) via 73f480b0ad6a9fed1dcadab7ff2b1afb6547941a (commit) via f45befed3af7f24cf8aae1a29d3475ad6ae0b161 (commit) via 50adbfcacb27ea656f51a699af78828aad59bde6 (commit) via 8df2e68614b0de60f5d5fcfba63012903815adef (commit) via 0219743a01c1c89c5b67d18c1094731c4b609ffa (commit) via 06af626ef2ffb6a8c6b4b91bd372849798426b76 (commit) via 7d3fe197f8f4fc486b137a20e1e8b04a085744c2 (commit) via a351edd2452f191988253da3f7b537f8e505f794 (commit) via f8d4e3d7f822a506c7ed7152ea84fb0f5953ea5b (commit) via 8d330277d6497a91835ef8246c490bf016482b07 (commit) via 5de1d406f1bfc4f81ba55103a3d7bccc6f33dc6b (commit) via 57c337e2ef358c5eae2b2e364065e93bf58f0f64 (commit) via 4e11c9660ffd91646438bce4c8898fe62e6456bd (commit) via cb1a434ce093ea2530a7acd5692f4da8cfb9f8aa (commit) via 10a7459a228f2968681d064486d49942f6d5ecc3 (commit) via f9dbe22ca273501cf6d50585211c9d18a0e15f97 (commit) via 5a3ed0d780edde72877e462bc9c3d10017c904f9 (commit) via 909048e5342fa6369ae26470ee0ce82e2a62abfb (commit) via d169b139751693f2c4e97f131b8d8cf7f4efca54 (commit) via f8751753e39763dc005d442a1dcb1f31851935cd (commit) via 61fcd08a495a154e95add1a5e9d3ccc13dfb2486 (commit) via 7c67d4011e56fad3cf775818110fbd8d5d4be766 (commit) via 0076fb100b90f16163cccd06e89565b5c45316c1 (commit) via 30c5f94c5bbf1a5cd07858a9c037442f41b65d73 (commit) via 7c87ab755c96ad3f3fc6288d23c02cd0f4898785 (commit) via 6d8b9aa65ab06300a50f6c23897b9e37cadccc47 (commit) via 280d0a6947aee7d73404a3d5d0a795d490a781db (commit) via 898cb987b4a2ed027f7ec9308a128cab97feabf9 (commit) via b9eb3408b4bb750b2cc3f80803a5806d6ee46f13 (commit) via 7523267ca0e1a6c45f3b7eed332bca6e35f32752 (commit) via a24cd6525ad656901b663f4d7bc0990db4c8c8ec (commit) via b02814ed7464f11286db2d0038cc88c66ce18676 (commit) via 3643390d49b567214f9008091aa0e1f4ebe7782a (commit) via e1e54295e82ef93e9c88bccb097721f13537e16d (commit) via f7d23e675357c1ac895e81fda08957007794bb66 (commit) via aec1d43f5d4cdb289b67726f2b8e5151933fa16d (commit) via 4c476cc9b2441f7cf36fd87c7c7338c373905678 (commit) via 6e55605db199a4be4d3159c92c40a5e62b880fd5 (commit) via cff9c11de779e44f3deceaa46f4adf31491b44e8 (commit) via f408a5b1b9ebb7649537b78cf1303b46860eafee (commit) via 73a3c0cd9857b519350df09811f78c29e3fbd7be (commit) via b1883bc8b7bd4211037bcc181edffdcce646f43a (commit) via 2bef3774276e0b27718107edccd5e107fd72b292 (commit) via 21afc0291e9aa9ace69da008e267dfc3c278eca0 (commit) via b399d135683cfffcef727bc1b5bb795f0172036b (commit) via 0639e23920ee42797aad3900719e5c7f022565b7 (commit) via 2c759971e4b2a51a140e00c995bd9f062dd8df59 (commit) via 108c665877b68d02d96491436d179a33fd7116fa (commit) via 9e505285e3c5fc2556d8638c0e0d0228aaeee95d (commit) via cd1415b548cd19652d71056dff09f0c31a8260a0 (commit) via 60212979ea6cf92be7557358ef89484317ae0340 (commit) via e4d3914639d1e7b41337c9626b91458c4fe6ae95 (commit) via d4f524040e8b9573bd568e4bb6b6ddb70d6ab366 (commit) via bf969198067649a55752db21d03ae8a0fb443c6e (commit) via ca4276e435e251e1b2011a7a523aecdbf85c18ec (commit) via d38a37ea1539eafec6cec6ef59cc9419531cad91 (commit) via ec8f744a11dfcab9560387168cab76260aa0b777 (commit) via 7808ba0852708963a6c37c8027b3382c2157422e (commit) via b5ec5b0901177ebcd116d6ddd66ed114549014ec (commit) via d582c23a47ceef09e80435d6b986e3938f7f1521 (commit) via 8d79375818efbaa06858a8e2d176ab8a251bef63 (commit) via a9252441b3c03572808b15155f31b4e60b150d0e (commit) via 5e2c63807278ca036da30ca718af9177b2a3340d (commit) via cb93dc048f80d2724fa22881327d92a4b7e3f503 (commit) via db4ba61f3974258ad972a1594ee7b0d5b6f7a68c (commit) via 4e8480db5425e0acbbd6394593417aab2a1fc3e5 (commit) via 3f77655d060ae48fabd9dc5c445cad813a70db42 (commit) via b9b3ec4d98b03c180b2e6b9ad8edba7f75576353 (commit) via f05f5b01d0a690e5f3e06be2c702ee659433c326 (commit) via 843402b04a72ec1f99f0f712c4eb73abbcb67cba (commit) via 4bbfea17510d25c950747c4b0f877e5d5b1f528e (commit) via f91312175822e94d66a92cb919dc04096609a7a7 (commit) via f23d846a971b99ec23bee1ff2afaee845a846e5f (commit) via 1b021a64f8bf4d9544acb18628e3821f61f49e10 (commit) via 059a6ca07a6f8bb4e101e9b269d6bdb4c0281018 (commit) via 1d6909a287bb73b5ec7bf51ec56f7efcf2a869eb (commit) via 7287893d411dde3b9afc6a4c8896dd9d15db9e04 (commit) via b4b73f56a26c1e1d630e3f262d2d4bafee8231c4 (commit) via a7a92390964ea5aa7021f71ee69fcc71c4229516 (commit) via 9e2d6f0c4d19e1ae1652071ea783ad577ea93e28 (commit) via e2c0363bd70b3a9bb95ac54ff79d7e00dec14522 (commit) via d3544d023b7b118f5f9fcb70808546d7b3724f50 (commit) via 4adab7093a2a30caf053b149a3b57565235b05ca (commit) via fd36f4e024dbe45a7fb054bfcc62755d70f55414 (commit) via 9e073b884234994d8e106f918bf111d42b245006 (commit) via e6bc818deb07db5b82b022de2dcbdf8417cfc66d (commit) via 7647f6afa46b6b5020cc1d93b3f75d3358a28f8a (commit) via 5286110d6f106e03ee6c5bdeea48d62674656c9f (commit) via 09aa2c94186081267753dedb50acb102717a6577 (commit) via ea5477e43de4660343897e4669bc5809dc4ddabe (commit) via 99c873c835172d4aec14766a4cc8f606c06ecda7 (commit) via 2ca76a6651dd16586334067f6a41524a4015adc9 (commit) via c68cf9e4d111fa7c92973acec92d71ce6d187ff9 (commit) via 11c3a8dc11eae4305409afbb8d7fa66ee31d41de (commit) via aff1e77f480f72b1a517ae9b7d54e56b30fab4b3 (commit) via 3a0449439f03981865b8d43815ac9b6292574a47 (commit) via f05657de9d1ae7247a527186830d37702ec30de4 (commit) via 8bbd5db4c160927cf5e9a2eb2f45fe36a2c2d799 (commit) via c2c2a2f4c7e23192d3d8cd8d53a427d651ef3137 (commit) via 015876fa810f45c560c1feb7f0b8092301304db8 (commit) via f101d4eff3462acd90623ba801027d3e7b642fbd (commit) via 49a07d7a142c6ad4558b1ddf0d5d0561f9be5fd6 (commit) via 8b3ffbe4afd689488fe02eec6c3363761025c5fd (commit) via 46f49c918af040b92a63171388206adbb9a8b8bc (commit) via 68bb74d9e651fd44ddeeb81caa59096dbf1f0605 (commit) via 4561816b643e97090baf55fa898761cbeb6badd0 (commit) via 54e293db0655f2b741ede2186360b2694b6ecf8b (commit) via ed59f4ba677b2135f506844c3040adf518c59ff0 (commit) via 110270fbb6f8b9a679adac4dc80fc486e2de35f1 (commit) via 35a6cac2d3bf550edf5306e6270a80fc848deeb8 (commit) via de943c31280367a1219d5050298fd4be4dd7f3f7 (commit) via f65b2753d395e5deecd0209039848b32207ae03e (commit) via 8380f47cc90da2b2f1a573c4cb6fc15aedc6813a (commit) via cc9f6f3b98e6ebbb63b746ed66141515cb16ed3c (commit) via e260f30d23b3fd89fc7f47603adde3dc03d21601 (commit) via 91392a66e1dffac4b3bd5bfe1080e44f38ca6643 (commit) via 9cb685505ad86ecb560d1c71e7314f0ef98971f2 (commit) via 447f0618db3325de1a57f8a5bf9f7dcc9a3a55ab (commit) via 736ffc627c7b6c5310cf568c2131c372f1fcadfb (commit) via b70f18379bf6225ed821fdf530bf0dc4a244112f (commit) via 41925efe760a2e84e85b52f513668c9c46ed2744 (commit) via 4bb83514147fef6f96635a1e7940ddf568fde228 (commit) via 867b73e27554d9a6a0c33e76af4a06901504816f (commit) via 76c186b72fc233d96643c078b00756dfaa69fa66 (commit) via 8ddbd4c2806f3064f734377b48ec77131f6836dc (commit) via bdaadbdc2b6f7cb9eea1392043f225da85f51b5b (commit) via 191fc3a0f373d262e2f2e5a2ccb07979e227d683 (commit) via b86007e385fc0f4cc45149b68cafebad749bf6e8 (commit) via cde127b08441b23f7210bfe987812f8d253e960b (commit) via c23f89bc7651609865164c95ce3655ebd369c11e (commit) via 6509ad29f6efab56ce2dd3669ca0fbf798adbee2 (commit) via 6087b9e439fd74e82730657a104b7d991eb08d72 (commit) via eecd307e24a35b68d7ed4fa2f085c283d3e34461 (commit) via 3532cbce18f4021507a0fd8d23d0930aa09ae8e1 (commit) via 281c707b65dee100f09b4782a3d7e60bc8d29db8 (commit) via 92c67b9f01292741428eae12878aad52bf23b002 (commit) via cd1f1cb544267911829ac777214474f5ce3491f1 (commit) via fe27879c6b37d09084a740de843a54d39727c0f0 (commit) via ed05f11dd27d668791887f32e2c7be00753cfdb5 (commit) via c9fca42fd1e14536d68bd600fc4c394d2630f7f5 (commit) via 313e9667021a510151117d8222e958174b691261 (commit) via 5cc34162ad5d0ca174b44d37bcc32b7f4aa00a33 (commit) via 74fde783111ca7583b46015751dafe73b35e55e1 (commit) via efb6d317e3ed6b609c207be2f14866e0f472275a (commit) via e2d700bd9742431ed845c83dceab53ef7f4e5db4 (commit) via 95c5e00186cb4e6b267925c9bb95763810dbb3f5 (commit) via 711caeb3bda3c6423464c98b314a31f5721d175b (commit) via af0f1e4f228d8d03825ffa28266f9bf478b0de55 (commit) via 5f3bfab7b722f4ea8abe5d433f256507170eab20 (commit) via 5c7b2aafbd0e158ab659d68c4d0cf0afb7a9ba65 (commit) via f4c35c3dc2cd7204fc680d39a5c2f186f0badd6a (commit) via d6378091361623a9018925b9cfb2708f6a0183f4 (commit) via e36e5a2680f34c64773944b152e5337f8951a644 (commit) via 2e351f892e8eeaec2ecfe3b8a047c340a8718f10 (commit) via 0420cb42d1b67814824403284378e476aa74bdfc (commit) via 9ad10c8feb9ffd0adf0840379eedbae4df49ffd7 (commit) via 802b36fb62c7dc9a471bdb630536c82491e9cd0e (commit) via 3c488ce89955d00785bb4637c87b960da6c55ec8 (commit) via 5467e7945d46f5f8540a6e11933c9b6b584036a2 (commit) via 49f10f0d24420f7d96c5153ba64a16b3f43c4736 (commit) via 0392f72bef5f1394c2dba3740f2a701fe1a98f0d (commit) via b213a7f6ab0d4aa18e7b704bf1cf4994fae77254 (commit) via e63151ff543bb665fea255713e2e643e64527517 (commit) via 9e4725560493fdac423102469da6dbe1779383c4 (commit) via e4cb7d76095c429690255620a101b1a6f66f65df (commit) via 5889eb43eaad2e377cee36f813872ddb381b2e43 (commit) via 44f81be9348d3b628e6a6255865c1d0c9c093c8b (commit) via 9ef7ccdcf990d711d99794855e219d37d1713f59 (commit) via a0902efaa747d567fdd35729c8f0dac7b4fbee6d (commit) via 96242f8022fa4bc718ef36cda43f5dfe6236c066 (commit) via 8be00e443ff4ad6795ddd90d0f6d6873623aa1b3 (commit) via 27eb657d110123ee22b87fad1df7ebf64ecb47ba (commit) via 811f6c825271320259ed0ccdbe3c2d577ccbdcd4 (commit) via ef494edf766d622f87b82e601bf6ef7405bf29d0 (commit) via 82ebbf683e201af7b9bb493a221804992abf5a4a (commit) via 025edea019fa95581045ad6b83e7556a83d15f69 (commit) via d4283ca18b75a218642b8d446ba52be08e135852 (commit) via afd6cc6b923af63faebe9ccbad3a8ccd950e1782 (commit) via f3d76a88b7d95b9275839c8270941557797e79fe (commit) via a854e1795fbbde165d11a26301a08c2b332da09d (commit) via 0e523d0612f50373486c2c2360004bb8ce859f92 (commit) via 993991a07de48079233b3a04902a1f34ddfb97df (commit) via 290913fab871eddee22e6ebadd3eb7ef48c1485b (commit) via 84c0fdb192ccdad66dc00064b6113d7a1e63944a (commit) via 2701b519b17dc59b81bbf573095bfeb6fc03f326 (commit) via ce624540199a4685e04425a7668e8f2e0384267d (commit) via 1c2c629769e1bca0cee9e25293c88bfa060e692b (commit) via ffdc0a8e2877605f0c7f786ec0a2536db4a71f34 (commit) via e4eb88e21dab2f887b2a974ed89358f398418499 (commit) via 86bcdbcde52988fe32e017700d2d0f759a2c2570 (commit) via 83ae79442c8bc16cca72977e0671845efe191696 (commit) via d645b03e9c97856436b9fcd517b2c33b8aa3302c (commit) via 82ecc2a3a872a8db82ab1a8a5d2c35882b4a9757 (commit) via 909d51bece7d343f32a8f59351aad5c396101a2c (commit) via ed5fa48d50ea0605b47598ff5b1d765548e8d638 (commit) via 24ab29b882548d9eceeb20d3ecbc5b9cc918bb7c (commit) via ab8b77dd33e9a13551af402b2cf7ee3aaa5486b8 (commit) via eb79fa726090410dbfceb64e29604320cc65d92f (commit) via 90d114ed8c724ca49fa02444dd59d06fd9806f3b (commit) via 33f74dc5247328cc5b3d6239c65e869bcc35cd80 (commit) via 535ec2bf1a57375221259ed1041c6d8d35c79b91 (commit) via c3819acad22c1bc0f763f7222648e8cade777ca6 (commit) via 1bafa0b3f5195d9a9c952f6ca4115fb8503f769b (commit) via 5bbcf758a1a0c52836d313156788a10a232f1f9f (commit) via 262ce91e8ac3c6fc9b09605e652028db7229b9b8 (commit) via 905e738ffeb1ec1b5d1a376b99e300a8787f7255 (commit) via 0a9094cd1017057d3c5141fdacdc6a89fb14acfc (commit) via 8d80c8961fce8f4b38f412de664f773c213a69b8 (commit) via 919db25c3b54f0303a19abb4a9e4f16056a3c1b6 (commit) via ebf18df58083c90d4ba06ab896dfad8df9fe6ade (commit) via 0514fa2398b36a35a98a131af9091a6ce3f42e48 (commit) via 473634eb1cc4f664c8b7cdc12a103828560c225f (commit) via 42fe7d215092dd1251a9ec298ca83a6ad9e59b86 (commit) via 4e66ca1952c0ba9dfba6050f83f67c90884c8492 (commit) via 18e00ac7b918865c38a2e34ee584e18c1126c663 (commit) via 3b14a4bca417eeafac3daeb306a72dcbba47246e (commit) via 941fbe31f56e0841280288bf3e43de873aabe957 (commit) via ff1cce464d6e372cd2aced01fac28394c213aca9 (commit) via 6b0ab86eb5cfa14343180259fa56cd5b6d5c9a90 (commit) via 7ce354d3acc1b5b572c6c475b1ecc222c1bc12bc (commit) via 06ee543c00971cd6d52a41da146fdbc9317fd5f7 (commit) via 23f87e8157770c56d3aa568f3d1318f9b9070364 (commit) via 54c65d5fb22c3cc53ecd707687c2f25b1643726b (commit) via ea5324cd4b570ea757a6da96a7bc85538943e008 (commit) via df8c3130d6e31558469cd1f0daa63e65cec79af1 (commit) via 946d1e50dc80bfb593ad7b6d4bded279fa17ced9 (commit) via 096c7754b3b7edd2e69f79b81b06539e5c9314f3 (commit) via 0a4af0735f2aeec74a723dd6af31db585f1b664e (commit) via acf0c0f4446e6d3cee8b00a7ebc39d5d8040e42d (commit) via 757b0ff5dd08445ebac4f7ea50dd143a67f2e966 (commit) via d6e99fa8345f07a72308b8b33f4a31aa7fe9a0fd (commit) via a16bf141bc5d393b27d13d8235d95a1b034052c2 (commit) via bd9e551c1a13f566e6ffe8cdd1262b7628ed5330 (commit) via 896ad251de49f167f4ce3cbbcf9a6cce85a16681 (commit) via c5d71b28ec2682ec160dd35015e90dd5b81a5605 (commit) via 63c0e92c9395083a61fe31cd89bee7e3814f10e8 (commit) via 6eee24634bc1791a64f8146c0f79c769eb9dfb83 (commit) via 120899c6980fcd81aa2a0d7b733ae15332a7a133 (commit) via 7066218e792927cb6494ce73e834b8ddb3d275e6 (commit) via f62ed322dc0d859f595be5ddeff40904ee478f50 (commit) via 853b1bb4ba176e886e3682a2475f1de1932ee890 (commit) via 98aafb2ad64daa0617b3a71ec61f692d5aa205ce (commit) via ff4697fc94d74e8c08d165837add668ccb5a5fad (commit) via fbf461dde26aca7bb4b44d0f25e459ea30e3aa87 (commit) via 09e6c9eba7905b4af19dcdc18d8fe5c8d337218c (commit) via b29f1514d012fb3036fd4579ccfb4004c20d8771 (commit) via 5d078868f00ff8dd514c7c35542aaf2eb0b5ef5f (commit) via 1bde72a390fd734795a3f5f4d09a3e279b5d61b8 (commit) via 1f9b35da101ba12f5c6d8cdbe8e073fa8709709a (commit) via d9613b962e2ed5c908850c8a083630f753dac113 (commit) via 70d3bf85808d17dba8ec90e2975f2741383ef260 (commit) via d4b8e8135358024b6982100654a430358574efb2 (commit) via 7229ae728fa703390b70a9ded5606b01214c14de (commit) via e9bfe8da04c5486335d15c68b544f25f940c9c92 (commit) via 8f3bd1f454fe50a641fd9666ca5e5bc8064c09c7 (commit) via c21397b2df9470bde02d19175e393110871cee91 (commit) via 065bb0ffebb51c0a3b90e8be3958095afaf4231a (commit) via 01632c2552a5536415671f092a34ada76dccd002 (commit) via 5aa89a1ae0554c8bf428d079a0a716e9254e516f (commit) via e9da5192e5bd0c660bfe36fe5bdab57f7b13cdcb (commit) via 0bd91ad4058c006bb67b48801e1877e8a893ef4d (commit) via ceebac93f66c3927997b708caf6f2eb2d1827593 (commit) via 746a4245738c7b3c0b29754cb09b2230697f13fc (commit) via e937b4c3879e1ee0770b465c0cdcbb6a960ba892 (commit) via 39699947589e96b59d7f56d9c0b1dcb1bef27f8a (commit) via 9f25fc4dbb0fa3c027beb46c03c8b18507811cab (commit) via f9cc43ea37d8b4e2a482cb9004cec2bd8f824857 (commit) via 6e65808516994fe268c4ec87107fca6da6600a9c (commit) via 87ffd76d1a33885a4cddff70a9909ad88c2aeacc (commit) via fa169fe8a7f2066eaa40393b4b7979daf42065e4 (commit) via de4ee088e7ab60213b551ecf98bc9e1b512ee393 (commit) via b0d3e693f1ab466451c7a0d17bbbdd3cae76e93a (commit) via ba92e11f8b461513566d5cc3c0b53b2215bb85f7 (commit) via b8a00b6721948f0eebb1bf53cdfa9a242b26f03c (commit) via c3ba3a40a15ed8187d26dcfebf797b54158f96e3 (commit) via fb8b8dd1060f78729da7b79c7eea06601681b678 (commit) via 5804068c220e2f9870dbcb24ee68eb610c9b4ff4 (commit) via 5a13dc0b6e462745e12946e209b815131ea47f25 (commit) via 8632251b25c217e12ae8741e935d6b9aa03ac04b (commit) via 5572f5fffd040473c588215a7c87a12530e1548e (commit) via adf4df28caf621569d9d0d62011fc38773710319 (commit) via ea59867187e8bdb8a7ffda37ad58e7f8493ebf7c (commit) via 1cfc750150065ee3b65ad66d2b37a3b28a9e799d (commit) via 132b8989680b50cb9cc9c72e2ffb806cfb3534c2 (commit) via b86585d89a84fb1bdee1e751d0247f30d2315ed0 (commit) via 188baef00c3b19c6ee6ed8c3735817bae50f110e (commit) via 89df91b938f22e14f647244093b08d49ddb41385 (commit) via 95d84369b802473e22bcb662a86175621bba54c6 (commit) via 5341c0d84af50c2ac5e4041885ab96f8d157ddfe (commit) via d91ec04402bce94cb29662e0de548438876d86d5 (commit) via ff08a80af19530c95db4faa921168fb9ab346047 (commit) via 3b2844328c116cba71c71365507f33f98611e3dc (commit) via eeac8430bf014b4813f2326c9824acacdc0ea49a (commit) via 9b15a15fe96f099ac9a277c9d3722b9c1e4b6ff5 (commit) via 633d99dc6255901c2fbc9f7c80a1d24f357a4024 (commit) via 14de21d7d21db8aa177327f61e51c7c50a7e1ffa (commit) via fa277b29e41a8de43913f0a63b273bb3dbc759e8 (commit) via ba5fb16519d095051ea90e642cbf41a28be6a03d (commit) via d546456765072e6d4e6307eb6431de23f7bfe418 (commit) via 63e5eb5fd37691190e80bed142b7f08c3420f625 (commit) via c3b268e40d48e25e380ebf2d38edee9a5b604e0c (commit) via ab7d649faee0b3c945f5ab59aecd6cc0fbf49016 (commit) via fc45ecfc50913206f3058eefb85e8df3f7ae7d66 (commit) via 1503a67bf43cbf9aa4227a8865b512203299eabf (commit) via 6a22a7cf71c0f564a150717a31651f9730c808fc (commit) via 2e3c67d1b636f752eea35ef407c5243a79742d63 (commit) via c3a281fd327cce529ca3507f00a62608b26627ee (commit) via 3720d5f4a3c6edfdb1533ac60c9ade0adee92e09 (commit) via cf12e4abcd7e2b6af8a6232197f7c1f3b6e53d50 (commit) via 0663dbf1331fb848cf0c274e232d0a19d966158c (commit) via 9d16f64048ccaf228c135fe1236cb9eee56c50f3 (commit) via 2f1d82bd7b6f489af1b32857f95355e146c421e5 (commit) via 3d6638471a87c2d5f568097d5bda6e7021a45a38 (commit) via e3f763765998b25707c364151a270e70d16e1744 (commit) via 4b7834467c21539bc478ccb3cd4b814057aa6cdd (commit) via 6f1f7965af2d5a31f0cd47a84fe4399909cbc5a3 (commit) via 811831a958c91404193cc0a35d2d90f8351eb51c (commit) via 8b289db739c8d0a288e532c560b6dbcf4bd67c30 (commit) via c6220de27605f33b2793729680c32714cd126690 (commit) via 9ca8c7a99f193179ebfc893060966c37e3efabca (commit) via a7d1c4ec3f6e955262e3ae49e77430259e0bc12f (commit) via e847b6c86455682377dea8cd53e182c00a3e2d3c (commit) via f6c21894952fb07e50e511efaa3baded794d631f (commit) via 0c7951a9397f4703d61d346c64c27a99a30f4dac (commit) via f1ff6301eafe61f5e9d7376d3713a0f37d3a2015 (commit) via c6bcb6fa1e4c4d02f9da8ed42ac0cce7538bbb9d (commit) via b66d4739b5e0944a58d4a94431ed7ad042fad05d (commit) via 7f6b8d3399dd841b0d29bf74d2b31021738c4ef8 (commit) via 34d07d7cccc146b167e45f8d158204de049150d9 (commit) via 50a3d34005ec923db3d76d0a5d118437a7632617 (commit) via 2175e5bfa5a2f9f08d6f4f4db652b8f5fae08d79 (commit) via 18bfbc972fd3daf3e973f80072c4de09ec7e852b (commit) via d6754d37d593a0189809dcf98bc4fdf3a609f0a3 (commit) via b2ef225ab9de94e9d5e46549c9bce5c956973ca8 (commit) from eb1524869cba77e008b4d569dbc1b487f93e04e0 (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: .gitignore | 7 + .hooks-config.bash | 13 +- Auxiliary/CMakeLists.txt | 2 +- Auxiliary/bash-completion/cmake | 2 +- Auxiliary/cmake-help.vim | 21 - Auxiliary/cmake-indent.vim | 93 - Auxiliary/cmake-mode.el | 30 +- Auxiliary/cmake-syntax.vim | 89 - Auxiliary/cmake.m4 | 13 +- Auxiliary/vim/cmake.vim.in | 91 + Auxiliary/vim/extract-upper-case.pl | 141 + Auxiliary/vim/indent/cmake.vim | 83 + Auxiliary/vim/syntax/cmake.vim | 554 +++ CMakeCPack.cmake | 69 +- CMakeCPackOptions.cmake.in | 33 +- CMakeLists.txt | 110 +- CONTRIBUTING.rst | 24 +- CTestConfig.cmake | 14 +- CTestCustom.cmake.in | 8 + CompileFlags.cmake | 22 +- Copyright.txt | 85 +- DartConfig.cmake | 14 +- Help/command/add_custom_command.rst | 7 + Help/command/cmake_parse_arguments.rst | 11 + Help/command/ctest_build.rst | 5 + Help/command/ctest_configure.rst | 7 +- Help/command/ctest_coverage.rst | 5 + Help/command/ctest_test.rst | 5 + Help/command/ctest_upload.rst | 6 +- Help/command/export.rst | 15 + Help/command/file.rst | 6 + Help/command/find_library.rst | 7 + Help/command/find_package.rst | 35 +- Help/command/get_cmake_property.rst | 11 +- Help/command/if.rst | 59 +- Help/command/include.rst | 6 +- Help/command/install.rst | 14 +- Help/command/separate_arguments.rst | 12 +- Help/command/set.rst | 4 +- Help/command/string.rst | 8 +- Help/command/target_link_libraries.rst | 6 + Help/generator/CodeLite.rst | 6 +- Help/generator/Ninja.rst | 27 +- Help/generator/Visual Studio 10 2010.rst | 2 +- Help/generator/Visual Studio 11 2012.rst | 2 +- Help/generator/Visual Studio 12 2013.rst | 2 +- Help/generator/Visual Studio 14 2015.rst | 2 +- Help/generator/Visual Studio 15.rst | 16 + Help/index.rst | 1 + Help/manual/OPTIONS_BUILD.txt | 8 +- Help/manual/cmake-buildsystem.7.rst | 2 +- Help/manual/cmake-developer.7.rst | 74 +- Help/manual/cmake-generator-expressions.7.rst | 8 +- Help/manual/cmake-generators.7.rst | 1 + Help/manual/cmake-modules.7.rst | 4 + Help/manual/cmake-policies.7.rst | 8 + Help/manual/cmake-properties.7.rst | 12 + Help/manual/cmake-server.7.rst | 703 +++ Help/manual/cmake-toolchains.7.rst | 204 +- Help/manual/cmake-variables.7.rst | 32 +- Help/manual/cmake.1.rst | 45 + Help/manual/ctest.1.rst | 104 +- Help/module/AndroidTestUtilities.rst | 1 + Help/module/CPackProductBuild.rst | 1 + Help/module/FindICU.rst | 1 + Help/module/FindVulkan.rst | 1 + Help/policy/CMP0066.rst | 27 + Help/prop_dir/BINARY_DIR.rst | 5 + Help/prop_dir/BUILDSYSTEM_TARGETS.rst | 11 + Help/prop_dir/SOURCE_DIR.rst | 5 + Help/prop_dir/SUBDIRECTORIES.rst | 15 + Help/prop_gbl/FIND_LIBRARY_USE_LIB32_PATHS.rst | 10 + Help/prop_sf/VS_TOOL_OVERRIDE.rst | 5 + Help/prop_sf/XCODE_FILE_ATTRIBUTES.rst | 11 + Help/prop_test/DEPENDS.rst | 6 +- Help/prop_test/FIXTURES_CLEANUP.rst | 46 + Help/prop_test/FIXTURES_REQUIRED.rst | 94 + Help/prop_test/FIXTURES_SETUP.rst | 47 + Help/prop_test/RESOURCE_LOCK.rst | 3 + Help/prop_tgt/ANDROID_API.rst | 9 +- Help/prop_tgt/ANDROID_ARCH.rst | 3 +- Help/prop_tgt/ANDROID_GUI.rst | 4 +- Help/prop_tgt/ANDROID_STL_TYPE.rst | 32 +- Help/prop_tgt/AUTORCC.rst | 5 + Help/prop_tgt/BUNDLE_EXTENSION.rst | 7 +- Help/prop_tgt/LINK_WHAT_YOU_USE.rst | 15 + Help/prop_tgt/VS_SDK_REFERENCES.rst | 7 + Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst | 5 +- Help/release/3.7.rst | 309 ++ Help/release/index.rst | 1 + Help/variable/ANDROID.rst | 5 + Help/variable/CMAKE_ANDROID_API.rst | 10 +- Help/variable/CMAKE_ANDROID_ARCH.rst | 18 +- Help/variable/CMAKE_ANDROID_ARCH_ABI.rst | 17 + Help/variable/CMAKE_ANDROID_ARM_MODE.rst | 7 + Help/variable/CMAKE_ANDROID_ARM_NEON.rst | 6 + Help/variable/CMAKE_ANDROID_NDK.rst | 7 + .../CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION.rst | 13 + .../CMAKE_ANDROID_STANDALONE_TOOLCHAIN.rst | 6 + Help/variable/CMAKE_ANDROID_STL_TYPE.rst | 35 +- Help/variable/CMAKE_CODELITE_USE_TARGETS.rst | 7 + Help/variable/CMAKE_COMPILER_IS_GNUCC.rst | 5 + Help/variable/CMAKE_COMPILER_IS_GNUCXX.rst | 5 + Help/variable/CMAKE_COMPILER_IS_GNUG77.rst | 5 + Help/variable/CMAKE_COMPILER_IS_GNULANG.rst | 15 - .../CMAKE_EXE_LINKER_FLAGS_CONFIG_INIT.rst | 10 + Help/variable/CMAKE_EXE_LINKER_FLAGS_INIT.rst | 11 + .../variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION.rst | 16 + Help/variable/CMAKE_FIND_PACKAGE_SORT_ORDER.rst | 36 + Help/variable/CMAKE_INSTALL_PREFIX.rst | 2 +- .../CMAKE_LANG_ANDROID_TOOLCHAIN_PREFIX.rst | 11 + .../CMAKE_LANG_ANDROID_TOOLCHAIN_SUFFIX.rst | 7 + Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst | 10 + Help/variable/CMAKE_LANG_FLAGS_INIT.rst | 15 + Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst | 10 + Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst | 10 + .../CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst | 10 + Help/variable/CMAKE_LINK_WHAT_YOU_USE.rst | 6 + .../CMAKE_MODULE_LINKER_FLAGS_CONFIG_INIT.rst | 10 + Help/variable/CMAKE_MODULE_LINKER_FLAGS_INIT.rst | 11 + Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst | 2 + .../CMAKE_SHARED_LINKER_FLAGS_CONFIG_INIT.rst | 10 + Help/variable/CMAKE_SHARED_LINKER_FLAGS_INIT.rst | 11 + .../CMAKE_STATIC_LINKER_FLAGS_CONFIG_INIT.rst | 10 + Help/variable/CMAKE_STATIC_LINKER_FLAGS_INIT.rst | 11 + Help/variable/CMAKE_Swift_LANGUAGE_VERSION.rst | 5 + Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst | 6 +- Help/variable/CMAKE_VERSION.rst | 10 +- Help/variable/MSVC10.rst | 5 +- Help/variable/MSVC11.rst | 5 +- Help/variable/MSVC12.rst | 5 +- Help/variable/MSVC14.rst | 5 +- Help/variable/MSVC80.rst | 5 +- Help/variable/MSVC90.rst | 5 +- Help/variable/MSVC_VERSION.rst | 2 +- Help/variable/XCODE.rst | 4 + Licenses/LGPLv3.txt | 165 + Modules/AddFileDependencies.cmake | 16 +- Modules/AndroidTestUtilities.cmake | 157 + .../AndroidTestUtilities/PushToAndroidDevice.cmake | 174 + Modules/BundleUtilities.cmake | 16 +- Modules/CMake.cmake | 14 +- Modules/CMakeASM-ATTInformation.cmake | 14 +- Modules/CMakeASMInformation.cmake | 23 +- Modules/CMakeASM_MASMInformation.cmake | 14 +- Modules/CMakeASM_NASMInformation.cmake | 14 +- Modules/CMakeAddFortranSubdirectory.cmake | 17 +- Modules/CMakeBackwardCompatibilityC.cmake | 14 +- Modules/CMakeBackwardCompatibilityCXX.cmake | 18 +- Modules/CMakeBorlandFindMake.cmake | 14 +- Modules/CMakeCCompiler.cmake.in | 1 + Modules/CMakeCInformation.cmake | 23 +- Modules/CMakeCXXCompiler.cmake.in | 1 + Modules/CMakeCXXInformation.cmake | 23 +- Modules/CMakeCheckCompilerFlagCommonPatterns.cmake | 17 +- Modules/CMakeCommonLanguageInclude.cmake | 28 +- Modules/CMakeCompilerIdDetection.cmake | 22 +- Modules/CMakeDependentOption.cmake | 16 +- Modules/CMakeDetermineASM-ATTCompiler.cmake | 14 +- Modules/CMakeDetermineASMCompiler.cmake | 14 +- Modules/CMakeDetermineASM_MASMCompiler.cmake | 14 +- Modules/CMakeDetermineASM_NASMCompiler.cmake | 14 +- Modules/CMakeDetermineCCompiler.cmake | 17 +- Modules/CMakeDetermineCXXCompiler.cmake | 17 +- Modules/CMakeDetermineCompileFeatures.cmake | 14 +- Modules/CMakeDetermineCompiler.cmake | 14 +- Modules/CMakeDetermineCompilerABI.cmake | 14 +- Modules/CMakeDetermineCompilerId.cmake | 30 +- Modules/CMakeDetermineFortranCompiler.cmake | 21 +- Modules/CMakeDetermineJavaCompiler.cmake | 14 +- Modules/CMakeDetermineRCCompiler.cmake | 14 +- Modules/CMakeDetermineSwiftCompiler.cmake | 14 +- Modules/CMakeDetermineSystem.cmake | 15 +- Modules/CMakeDetermineVSServicePack.cmake | 18 +- Modules/CMakeExpandImportedTargets.cmake | 17 +- Modules/CMakeExportBuildSettings.cmake | 14 +- ...atorDetermineCompilerMacrosAndIncludeDirs.cmake | 14 +- Modules/CMakeFindBinUtils.cmake | 16 +- Modules/CMakeFindCodeBlocks.cmake | 14 +- Modules/CMakeFindDependencyMacro.cmake | 16 +- Modules/CMakeFindEclipseCDT4.cmake | 16 +- Modules/CMakeFindFrameworks.cmake | 20 +- Modules/CMakeFindJavaCommon.cmake | 14 +- Modules/CMakeFindKDevelop3.cmake | 14 +- Modules/CMakeFindKate.cmake | 14 +- Modules/CMakeFindPackageMode.cmake | 16 +- Modules/CMakeFindWMake.cmake | 14 +- Modules/CMakeFindXCode.cmake | 14 +- Modules/CMakeForceCompiler.cmake | 16 +- Modules/CMakeFortranCompiler.cmake.in | 4 + Modules/CMakeFortranInformation.cmake | 23 +- Modules/CMakeGenericSystem.cmake | 14 +- Modules/CMakeGraphVizOptions.cmake | 17 +- Modules/CMakeIOSInstallCombined.cmake | 28 +- Modules/CMakeImportBuildSettings.cmake | 14 +- Modules/CMakeJOMFindMake.cmake | 15 +- Modules/CMakeJavaInformation.cmake | 14 +- Modules/CMakeLanguageInformation.cmake | 14 +- Modules/CMakeMSYSFindMake.cmake | 14 +- Modules/CMakeMinGWFindMake.cmake | 14 +- Modules/CMakeNMakeFindMake.cmake | 15 +- Modules/CMakeNinjaFindMake.cmake | 14 +- Modules/CMakePackageConfigHelpers.cmake | 24 +- Modules/CMakeParseArguments.cmake | 16 +- Modules/CMakeParseImplicitLinkInfo.cmake | 60 +- Modules/CMakePrintHelpers.cmake | 28 +- Modules/CMakePrintSystemInformation.cmake | 16 +- Modules/CMakePushCheckState.cmake | 17 +- Modules/CMakeRCInformation.cmake | 19 +- Modules/CMakeSwiftInformation.cmake | 15 +- Modules/CMakeSystem.cmake.in | 2 +- Modules/CMakeSystemSpecificInformation.cmake | 14 +- Modules/CMakeSystemSpecificInitialize.cmake | 14 +- Modules/CMakeTestASM-ATTCompiler.cmake | 14 +- Modules/CMakeTestASMCompiler.cmake | 14 +- Modules/CMakeTestASM_MASMCompiler.cmake | 14 +- Modules/CMakeTestASM_NASMCompiler.cmake | 14 +- Modules/CMakeTestCCompiler.cmake | 14 +- Modules/CMakeTestCXXCompiler.cmake | 14 +- Modules/CMakeTestCompilerCommon.cmake | 14 +- Modules/CMakeTestFortranCompiler.cmake | 14 +- Modules/CMakeTestJavaCompiler.cmake | 14 +- Modules/CMakeTestRCCompiler.cmake | 14 +- Modules/CMakeTestSwiftCompiler.cmake | 14 +- Modules/CMakeUnixFindMake.cmake | 14 +- Modules/CMakeVS7BackwardCompatibility.cmake | 14 +- Modules/CMakeVerifyManifest.cmake | 17 +- Modules/CPack.cmake | 37 +- Modules/CPackBundle.cmake | 16 +- Modules/CPackComponent.cmake | 50 +- Modules/CPackCygwin.cmake | 16 +- Modules/CPackDMG.cmake | 16 +- Modules/CPackDeb.cmake | 54 +- Modules/CPackIFW.cmake | 272 +- Modules/CPackNSIS.cmake | 21 +- Modules/CPackPackageMaker.cmake | 16 +- Modules/CPackProductBuild.cmake | 28 + Modules/CPackRPM.cmake | 602 ++- Modules/CPackWIX.cmake | 46 +- Modules/CPackZIP.cmake | 14 +- Modules/CTest.cmake | 28 +- Modules/CTestCoverageCollectGCOV.cmake | 15 +- Modules/CTestScriptMode.cmake | 17 +- Modules/CTestTargets.cmake | 14 +- Modules/CTestUseLaunchers.cmake | 18 +- Modules/CheckCCompilerFlag.cmake | 18 +- Modules/CheckCSourceCompiles.cmake | 18 +- Modules/CheckCSourceRuns.cmake | 18 +- Modules/CheckCXXCompilerFlag.cmake | 18 +- Modules/CheckCXXSourceCompiles.cmake | 18 +- Modules/CheckCXXSourceRuns.cmake | 18 +- Modules/CheckCXXSymbolExists.cmake | 16 +- Modules/CheckFortranCompilerFlag.cmake | 19 +- Modules/CheckFortranFunctionExists.cmake | 18 +- Modules/CheckFortranSourceCompiles.cmake | 35 +- Modules/CheckFunctionExists.cmake | 18 +- Modules/CheckIncludeFile.cmake | 18 +- Modules/CheckIncludeFileCXX.cmake | 18 +- Modules/CheckIncludeFiles.cmake | 24 +- Modules/CheckLanguage.cmake | 16 +- Modules/CheckLibraryExists.cmake | 18 +- Modules/CheckPrototypeDefinition.cmake | 20 +- Modules/CheckSizeOf.cmake | 14 +- Modules/CheckStructHasMember.cmake | 18 +- Modules/CheckSymbolExists.cmake | 24 +- Modules/CheckTypeSize.cmake | 26 +- Modules/CheckVariableExists.cmake | 18 +- Modules/Compiler/ARMCC.cmake | 10 +- Modules/Compiler/Absoft-Fortran.cmake | 10 +- .../Compiler/AppleClang-DetermineCompiler.cmake | 2 +- Modules/Compiler/Bruce-C.cmake | 10 +- Modules/Compiler/Clang.cmake | 14 +- Modules/Compiler/G95-Fortran.cmake | 10 +- Modules/Compiler/GHS-C.cmake | 10 +- Modules/Compiler/GHS-CXX.cmake | 10 +- Modules/Compiler/GNU-Fortran.cmake | 7 +- Modules/Compiler/GNU.cmake | 26 +- Modules/Compiler/IAR.cmake | 5 +- Modules/Compiler/Intel-ASM.cmake | 11 +- Modules/Compiler/Intel-C.cmake | 11 +- Modules/Compiler/Intel-CXX.cmake | 11 +- Modules/Compiler/Intel-Fortran.cmake | 12 +- Modules/Compiler/Intel.cmake | 26 + Modules/Compiler/MSVC-CXX-FeatureTests.cmake | 3 + Modules/Compiler/NAG-Fortran.cmake | 1 + Modules/Compiler/PGI-C.cmake | 4 +- Modules/Compiler/PGI-CXX.cmake | 4 +- Modules/Compiler/PGI-Fortran.cmake | 4 +- Modules/Compiler/PGI.cmake | 24 +- Modules/Compiler/PathScale-C.cmake | 4 +- Modules/Compiler/PathScale-CXX.cmake | 4 +- Modules/Compiler/PathScale.cmake | 24 +- Modules/Compiler/QCC.cmake | 15 +- Modules/Compiler/SCO.cmake | 14 +- Modules/Compiler/SunPro-ASM.cmake | 10 +- Modules/Compiler/SunPro-C.cmake | 10 +- Modules/Compiler/SunPro-CXX.cmake | 10 +- Modules/Compiler/SunPro-Fortran.cmake | 13 +- Modules/Compiler/TinyCC-C.cmake | 10 +- Modules/Compiler/XL-ASM.cmake | 10 +- Modules/Compiler/XL-C.cmake | 6 +- Modules/Compiler/XL-CXX.cmake | 6 +- Modules/Compiler/XL-Fortran.cmake | 2 +- Modules/Compiler/XL.cmake | 22 +- Modules/CompilerId/Xcode-3.pbxproj.in | 1 + Modules/Dart.cmake | 18 +- Modules/DeployQt4.cmake | 20 +- Modules/Documentation.cmake | 16 +- Modules/ExternalData.cmake | 111 +- Modules/ExternalProject-download.cmake.in | 101 +- Modules/ExternalProject-verify.cmake.in | 15 +- Modules/ExternalProject.cmake | 133 +- Modules/FLTKCompatibility.cmake | 14 +- Modules/FeatureSummary.cmake | 695 ++- Modules/FindALSA.cmake | 17 +- Modules/FindASPELL.cmake | 17 +- Modules/FindAVIFile.cmake | 16 +- Modules/FindArmadillo.cmake | 17 +- Modules/FindBISON.cmake | 152 +- Modules/FindBLAS.cmake | 16 +- Modules/FindBZip2.cmake | 56 +- Modules/FindBacktrace.cmake | 17 +- Modules/FindBoost.cmake | 180 +- Modules/FindBullet.cmake | 17 +- Modules/FindCABLE.cmake | 16 +- Modules/FindCUDA.cmake | 234 +- Modules/FindCUDA/make2cmake.cmake | 2 +- Modules/FindCUDA/run_nvcc.cmake | 19 +- Modules/FindCUDA/select_compute_arch.cmake | 195 + Modules/FindCURL.cmake | 17 +- Modules/FindCVS.cmake | 16 +- Modules/FindCoin3D.cmake | 16 +- Modules/FindCups.cmake | 20 +- Modules/FindCurses.cmake | 16 +- Modules/FindCxxTest.cmake | 28 +- Modules/FindCygwin.cmake | 16 +- Modules/FindDCMTK.cmake | 18 +- Modules/FindDart.cmake | 16 +- Modules/FindDevIL.cmake | 17 +- Modules/FindDoxygen.cmake | 16 +- Modules/FindEXPAT.cmake | 24 +- Modules/FindFLEX.cmake | 17 +- Modules/FindFLTK.cmake | 16 +- Modules/FindFLTK2.cmake | 16 +- Modules/FindFreetype.cmake | 83 +- Modules/FindGCCXML.cmake | 16 +- Modules/FindGDAL.cmake | 16 +- Modules/FindGIF.cmake | 62 +- Modules/FindGLEW.cmake | 59 +- Modules/FindGLU.cmake | 14 +- Modules/FindGLUT.cmake | 16 +- Modules/FindGSL.cmake | 16 +- Modules/FindGTK.cmake | 16 +- Modules/FindGTK2.cmake | 17 +- Modules/FindGTest.cmake | 45 +- Modules/FindGettext.cmake | 17 +- Modules/FindGit.cmake | 17 +- Modules/FindGnuTLS.cmake | 19 +- Modules/FindGnuplot.cmake | 16 +- Modules/FindHDF5.cmake | 21 +- Modules/FindHSPELL.cmake | 17 +- Modules/FindHTMLHelp.cmake | 16 +- Modules/FindHg.cmake | 18 +- Modules/FindICU.cmake | 349 ++ Modules/FindIce.cmake | 60 +- Modules/FindIcotool.cmake | 16 +- Modules/FindImageMagick.cmake | 18 +- Modules/FindIntl.cmake | 16 +- Modules/FindJNI.cmake | 25 +- Modules/FindJPEG.cmake | 16 +- Modules/FindJasper.cmake | 18 +- Modules/FindJava.cmake | 20 +- Modules/FindKDE3.cmake | 17 +- Modules/FindKDE4.cmake | 17 +- Modules/FindLAPACK.cmake | 16 +- Modules/FindLATEX.cmake | 17 +- Modules/FindLTTngUST.cmake | 17 +- Modules/FindLibArchive.cmake | 16 +- Modules/FindLibLZMA.cmake | 20 +- Modules/FindLibXml2.cmake | 17 +- Modules/FindLibXslt.cmake | 17 +- Modules/FindLua.cmake | 134 +- Modules/FindLua50.cmake | 16 +- Modules/FindLua51.cmake | 16 +- Modules/FindMFC.cmake | 16 +- Modules/FindMPEG.cmake | 16 +- Modules/FindMPEG2.cmake | 16 +- Modules/FindMPI.cmake | 26 +- Modules/FindMatlab.cmake | 178 +- Modules/FindMotif.cmake | 16 +- Modules/FindOpenAL.cmake | 16 +- Modules/FindOpenCL.cmake | 43 +- Modules/FindOpenGL.cmake | 16 +- Modules/FindOpenMP.cmake | 140 +- Modules/FindOpenSSL.cmake | 83 +- Modules/FindOpenSceneGraph.cmake | 17 +- Modules/FindOpenThreads.cmake | 17 +- Modules/FindPHP4.cmake | 24 +- Modules/FindPNG.cmake | 31 +- Modules/FindPackageHandleStandardArgs.cmake | 34 +- Modules/FindPackageMessage.cmake | 16 +- Modules/FindPerl.cmake | 16 +- Modules/FindPerlLibs.cmake | 17 +- Modules/FindPhysFS.cmake | 16 +- Modules/FindPike.cmake | 16 +- Modules/FindPkgConfig.cmake | 29 +- Modules/FindPostgreSQL.cmake | 22 +- Modules/FindProducer.cmake | 16 +- Modules/FindProtobuf.cmake | 26 +- Modules/FindPythonInterp.cmake | 20 +- Modules/FindPythonLibs.cmake | 18 +- Modules/FindQt.cmake | 16 +- Modules/FindQt3.cmake | 16 +- Modules/FindQt4.cmake | 18 +- Modules/FindQuickTime.cmake | 16 +- Modules/FindRTI.cmake | 17 +- Modules/FindRuby.cmake | 17 +- Modules/FindSDL.cmake | 17 +- Modules/FindSDL_image.cmake | 17 +- Modules/FindSDL_mixer.cmake | 17 +- Modules/FindSDL_net.cmake | 17 +- Modules/FindSDL_sound.cmake | 21 +- Modules/FindSDL_ttf.cmake | 17 +- Modules/FindSWIG.cmake | 18 +- Modules/FindSelfPackers.cmake | 16 +- Modules/FindSquish.cmake | 18 +- Modules/FindSubversion.cmake | 17 +- Modules/FindTCL.cmake | 16 +- Modules/FindTIFF.cmake | 31 +- Modules/FindTclStub.cmake | 16 +- Modules/FindTclsh.cmake | 16 +- Modules/FindThreads.cmake | 17 +- Modules/FindUnixCommands.cmake | 16 +- Modules/FindVulkan.cmake | 75 + Modules/FindWget.cmake | 16 +- Modules/FindWish.cmake | 16 +- Modules/FindX11.cmake | 16 +- Modules/FindXCTest.cmake | 16 +- Modules/FindXMLRPC.cmake | 16 +- Modules/FindXalanC.cmake | 30 +- Modules/FindXercesC.cmake | 30 +- Modules/FindZLIB.cmake | 20 +- Modules/Findosg.cmake | 16 +- Modules/FindosgAnimation.cmake | 16 +- Modules/FindosgDB.cmake | 16 +- Modules/FindosgFX.cmake | 16 +- Modules/FindosgGA.cmake | 16 +- Modules/FindosgIntrospection.cmake | 16 +- Modules/FindosgManipulator.cmake | 16 +- Modules/FindosgParticle.cmake | 16 +- Modules/FindosgPresentation.cmake | 16 +- Modules/FindosgProducer.cmake | 16 +- Modules/FindosgQt.cmake | 16 +- Modules/FindosgShadow.cmake | 16 +- Modules/FindosgSim.cmake | 16 +- Modules/FindosgTerrain.cmake | 16 +- Modules/FindosgText.cmake | 16 +- Modules/FindosgUtil.cmake | 16 +- Modules/FindosgViewer.cmake | 16 +- Modules/FindosgVolume.cmake | 16 +- Modules/FindosgWidget.cmake | 16 +- Modules/Findosg_functions.cmake | 17 +- Modules/FindwxWidgets.cmake | 38 +- Modules/FindwxWindows.cmake | 19 +- Modules/FortranCInterface.cmake | 24 +- Modules/FortranCInterface/CMakeLists.txt | 12 +- Modules/FortranCInterface/Detect.cmake | 12 +- Modules/FortranCInterface/Verify/CMakeLists.txt | 12 +- Modules/GNUInstallDirs.cmake | 97 +- Modules/GenerateExportHeader.cmake | 40 +- Modules/GetPrerequisites.cmake | 30 +- Modules/ITKCompatibility.cmake | 14 +- Modules/InstallRequiredSystemLibraries.cmake | 16 +- Modules/KDE3Macros.cmake | 15 +- Modules/MacroAddFileDependencies.cmake | 16 +- Modules/MatlabTestsRedirect.cmake | 60 +- Modules/NSIS.template.in | 11 +- Modules/Platform/AIX-Clang-C.cmake | 1 + Modules/Platform/AIX-Clang-CXX.cmake | 1 + Modules/Platform/AIX-GNU-CXX.cmake | 1 + Modules/Platform/AIX-GNU.cmake | 21 +- Modules/Platform/AIX-XL.cmake | 20 +- Modules/Platform/ARTOS-GNU-C.cmake | 10 +- Modules/Platform/Android-Clang-C.cmake | 2 + Modules/Platform/Android-Clang-CXX.cmake | 2 + Modules/Platform/Android-Clang.cmake | 42 + Modules/Platform/Android-Common.cmake | 148 + Modules/Platform/Android-Determine-C.cmake | 2 + Modules/Platform/Android-Determine-CXX.cmake | 2 + Modules/Platform/Android-Determine.cmake | 291 ++ Modules/Platform/Android-GNU-C.cmake | 2 + Modules/Platform/Android-GNU-CXX.cmake | 2 + Modules/Platform/Android-GNU.cmake | 33 + Modules/Platform/Android-Initialize.cmake | 41 + Modules/Platform/Android.cmake | 2 + .../Platform/Android/Determine-Compiler-NDK.cmake | 246 + .../Android/Determine-Compiler-Standalone.cmake | 59 + Modules/Platform/Android/Determine-Compiler.cmake | 70 + Modules/Platform/Android/abi-arm64-v8a-Clang.cmake | 8 + Modules/Platform/Android/abi-arm64-v8a-GNU.cmake | 6 + Modules/Platform/Android/abi-armeabi-Clang.cmake | 20 + Modules/Platform/Android/abi-armeabi-GNU.cmake | 18 + .../Platform/Android/abi-armeabi-v6-Clang.cmake | 19 + Modules/Platform/Android/abi-armeabi-v6-GNU.cmake | 17 + .../Platform/Android/abi-armeabi-v7a-Clang.cmake | 29 + Modules/Platform/Android/abi-armeabi-v7a-GNU.cmake | 27 + Modules/Platform/Android/abi-common-Clang.cmake | 6 + Modules/Platform/Android/abi-common-GNU.cmake | 1 + Modules/Platform/Android/abi-common.cmake | 4 + Modules/Platform/Android/abi-mips-Clang.cmake | 8 + Modules/Platform/Android/abi-mips-GNU.cmake | 6 + Modules/Platform/Android/abi-mips64-Clang.cmake | 8 + Modules/Platform/Android/abi-mips64-GNU.cmake | 6 + Modules/Platform/Android/abi-x86-Clang.cmake | 8 + Modules/Platform/Android/abi-x86-GNU.cmake | 2 + Modules/Platform/Android/abi-x86_64-Clang.cmake | 8 + Modules/Platform/Android/abi-x86_64-GNU.cmake | 2 + Modules/Platform/Android/ndk-stl-c++.cmake | 13 + Modules/Platform/Android/ndk-stl-c++_shared.cmake | 4 + Modules/Platform/Android/ndk-stl-c++_static.cmake | 6 + Modules/Platform/Android/ndk-stl-gabi++.cmake | 7 + .../Platform/Android/ndk-stl-gabi++_shared.cmake | 4 + .../Platform/Android/ndk-stl-gabi++_static.cmake | 4 + Modules/Platform/Android/ndk-stl-gnustl.cmake | 9 + .../Platform/Android/ndk-stl-gnustl_shared.cmake | 4 + .../Platform/Android/ndk-stl-gnustl_static.cmake | 4 + Modules/Platform/Android/ndk-stl-none.cmake | 2 + Modules/Platform/Android/ndk-stl-stlport.cmake | 7 + .../Platform/Android/ndk-stl-stlport_shared.cmake | 4 + .../Platform/Android/ndk-stl-stlport_static.cmake | 4 + Modules/Platform/Android/ndk-stl-system.cmake | 6 + Modules/Platform/BlueGeneP-base.cmake | 15 +- Modules/Platform/BlueGeneP-dynamic-GNU-C.cmake | 15 +- Modules/Platform/BlueGeneP-dynamic-GNU-CXX.cmake | 15 +- .../Platform/BlueGeneP-dynamic-GNU-Fortran.cmake | 15 +- Modules/Platform/BlueGeneP-dynamic-XL-C.cmake | 15 +- Modules/Platform/BlueGeneP-dynamic-XL-CXX.cmake | 15 +- .../Platform/BlueGeneP-dynamic-XL-Fortran.cmake | 15 +- Modules/Platform/BlueGeneP-dynamic.cmake | 15 +- Modules/Platform/BlueGeneP-static-GNU-C.cmake | 15 +- Modules/Platform/BlueGeneP-static-GNU-CXX.cmake | 15 +- .../Platform/BlueGeneP-static-GNU-Fortran.cmake | 15 +- Modules/Platform/BlueGeneP-static-XL-C.cmake | 15 +- Modules/Platform/BlueGeneP-static-XL-CXX.cmake | 15 +- Modules/Platform/BlueGeneP-static-XL-Fortran.cmake | 15 +- Modules/Platform/BlueGeneP-static.cmake | 15 +- Modules/Platform/BlueGeneQ-base.cmake | 17 +- Modules/Platform/BlueGeneQ-dynamic-GNU-C.cmake | 15 +- Modules/Platform/BlueGeneQ-dynamic-GNU-CXX.cmake | 15 +- .../Platform/BlueGeneQ-dynamic-GNU-Fortran.cmake | 15 +- Modules/Platform/BlueGeneQ-dynamic-XL-C.cmake | 15 +- Modules/Platform/BlueGeneQ-dynamic-XL-CXX.cmake | 15 +- .../Platform/BlueGeneQ-dynamic-XL-Fortran.cmake | 15 +- Modules/Platform/BlueGeneQ-dynamic.cmake | 15 +- Modules/Platform/BlueGeneQ-static-GNU-C.cmake | 15 +- Modules/Platform/BlueGeneQ-static-GNU-CXX.cmake | 15 +- .../Platform/BlueGeneQ-static-GNU-Fortran.cmake | 15 +- Modules/Platform/BlueGeneQ-static-XL-C.cmake | 15 +- Modules/Platform/BlueGeneQ-static-XL-CXX.cmake | 15 +- Modules/Platform/BlueGeneQ-static-XL-Fortran.cmake | 15 +- Modules/Platform/BlueGeneQ-static.cmake | 15 +- ...CYGWIN-CXX.cmake => CYGWIN-Determine-CXX.cmake} | 0 Modules/Platform/CYGWIN-GNU.cmake | 16 +- Modules/Platform/Darwin-Absoft-Fortran.cmake | 15 +- Modules/Platform/Darwin-Clang.cmake | 14 +- ...Darwin-CXX.cmake => Darwin-Determine-CXX.cmake} | 0 Modules/Platform/Darwin-GNU-Fortran.cmake | 15 +- Modules/Platform/Darwin-GNU.cmake | 14 +- Modules/Platform/Darwin-Initialize.cmake | 6 +- Modules/Platform/Darwin-Intel-Fortran.cmake | 14 +- Modules/Platform/Darwin-Intel.cmake | 14 +- Modules/Platform/Darwin-NAG-Fortran.cmake | 15 +- Modules/Platform/GHS-MULTI-Initialize.cmake | 14 +- Modules/Platform/GHS-MULTI.cmake | 14 +- Modules/Platform/Generic-ADSP-C.cmake | 8 +- Modules/Platform/Generic-ADSP-CXX.cmake | 8 +- Modules/Platform/Generic-SDCC-C.cmake | 2 +- Modules/Platform/HP-UX-GNU-CXX.cmake | 1 + Modules/Platform/HP-UX-GNU.cmake | 15 +- Modules/Platform/HP-UX-HP-CXX.cmake | 8 +- Modules/Platform/HP-UX-HP.cmake | 16 +- .../{Linux-CXX.cmake => Linux-Determine-CXX.cmake} | 0 Modules/Platform/Linux-GNU.cmake | 14 +- Modules/Platform/Linux-Intel-Fortran.cmake | 2 +- Modules/Platform/Linux-Intel.cmake | 14 +- Modules/Platform/Linux-PGI.cmake | 14 +- Modules/Platform/Linux-PathScale.cmake | 14 +- Modules/Platform/Linux.cmake | 3 +- Modules/Platform/OpenBSD.cmake | 1 + Modules/Platform/SCO_SV.cmake | 1 + Modules/Platform/SunOS-GNU.cmake | 14 +- Modules/Platform/SunOS-PathScale.cmake | 14 +- Modules/Platform/UnixPaths.cmake | 17 +- Modules/Platform/Windows-Clang.cmake | 14 +- ...ndows-CXX.cmake => Windows-Determine-CXX.cmake} | 0 Modules/Platform/Windows-Embarcadero.cmake | 38 +- Modules/Platform/Windows-GNU.cmake | 14 +- Modules/Platform/Windows-Intel-Fortran.cmake | 10 +- Modules/Platform/Windows-Intel.cmake | 14 +- Modules/Platform/Windows-MSVC.cmake | 98 +- Modules/Platform/Windows-OpenWatcom-C.cmake | 1 + Modules/Platform/Windows-OpenWatcom-CXX.cmake | 1 + Modules/Platform/Windows-OpenWatcom.cmake | 129 + Modules/Platform/Windows-Watcom-C.cmake | 1 + Modules/Platform/Windows-Watcom-CXX.cmake | 1 + Modules/Platform/Windows-wcl386.cmake | 119 - Modules/Platform/WindowsPaths.cmake | 14 +- Modules/ProcessorCount.cmake | 16 +- Modules/Qt4ConfigDependentSettings.cmake | 17 +- Modules/Qt4Macros.cmake | 21 +- Modules/SelectLibraryConfigurations.cmake | 17 +- Modules/SquishTestScript.cmake | 16 +- Modules/SystemInformation.cmake | 14 +- Modules/TestBigEndian.cmake | 16 +- Modules/TestCXXAcceptsFlag.cmake | 16 +- Modules/TestForANSIForScope.cmake | 16 +- Modules/TestForANSIStreamHeaders.cmake | 16 +- Modules/TestForSSTREAM.cmake | 16 +- Modules/TestForSTDNamespace.cmake | 16 +- Modules/UseEcos.cmake | 16 +- Modules/UseJava.cmake | 187 +- Modules/UseJavaClassFilelist.cmake | 16 +- Modules/UseJavaSymlinks.cmake | 16 +- Modules/UsePkgConfig.cmake | 16 +- Modules/UseQt4.cmake | 16 +- Modules/UseSWIG.cmake | 29 +- Modules/Use_wxWindows.cmake | 19 +- Modules/UsewxWidgets.cmake | 19 +- Modules/VTKCompatibility.cmake | 14 +- Modules/WriteBasicConfigVersionFile.cmake | 17 +- Modules/WriteCompilerDetectionHeader.cmake | 72 +- Modules/ecos_clean.cmake | 14 +- Modules/exportheader.cmake.in | 2 +- Modules/javaTargets.cmake.in | 39 + Modules/kde3uic.cmake | 15 +- Source/.cvsignore | 5 - Source/.gitattributes | 2 + Source/CMakeInstallDestinations.cmake | 5 + Source/CMakeLists.txt | 76 +- Source/CMakeVersion.cmake | 6 +- Source/CMakeVersionCompute.cmake | 17 +- Source/CMakeVersionSource.cmake | 9 +- Source/CPack/IFW/cmCPackIFWGenerator.cxx | 98 +- Source/CPack/IFW/cmCPackIFWGenerator.h | 53 +- Source/CPack/IFW/cmCPackIFWInstaller.cxx | 117 +- Source/CPack/IFW/cmCPackIFWInstaller.h | 25 +- Source/CPack/IFW/cmCPackIFWPackage.cxx | 86 +- Source/CPack/IFW/cmCPackIFWPackage.h | 25 +- Source/CPack/IFW/cmCPackIFWRepository.cxx | 63 +- Source/CPack/IFW/cmCPackIFWRepository.h | 19 +- Source/CPack/OSXScriptLauncher.cxx | 15 +- Source/CPack/WiX/cmCPackWIXGenerator.cxx | 79 +- Source/CPack/WiX/cmCPackWIXGenerator.h | 16 +- Source/CPack/WiX/cmWIXAccessControlList.cxx | 16 +- Source/CPack/WiX/cmWIXAccessControlList.h | 14 +- Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx | 30 +- Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h | 18 +- Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx | 36 +- Source/CPack/WiX/cmWIXFeaturesSourceWriter.h | 24 +- Source/CPack/WiX/cmWIXFilesSourceWriter.cxx | 28 +- Source/CPack/WiX/cmWIXFilesSourceWriter.h | 17 +- Source/CPack/WiX/cmWIXPatch.cxx | 14 +- Source/CPack/WiX/cmWIXPatch.h | 14 +- Source/CPack/WiX/cmWIXPatchParser.cxx | 16 +- Source/CPack/WiX/cmWIXPatchParser.h | 14 +- Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx | 14 +- Source/CPack/WiX/cmWIXRichTextFormatWriter.h | 16 +- Source/CPack/WiX/cmWIXShortcut.cxx | 14 +- Source/CPack/WiX/cmWIXShortcut.h | 14 +- Source/CPack/WiX/cmWIXSourceWriter.cxx | 35 +- Source/CPack/WiX/cmWIXSourceWriter.h | 33 +- Source/CPack/cmCPack7zGenerator.cxx | 17 +- Source/CPack/cmCPack7zGenerator.h | 22 +- Source/CPack/cmCPackArchiveGenerator.cxx | 55 +- Source/CPack/cmCPackArchiveGenerator.h | 33 +- Source/CPack/cmCPackBundleGenerator.cxx | 22 +- Source/CPack/cmCPackBundleGenerator.h | 22 +- Source/CPack/cmCPackComponentGroup.cxx | 14 +- Source/CPack/cmCPackComponentGroup.h | 23 +- Source/CPack/cmCPackConfigure.h.in | 13 +- Source/CPack/cmCPackCygwinBinaryGenerator.cxx | 14 +- Source/CPack/cmCPackCygwinBinaryGenerator.h | 14 +- Source/CPack/cmCPackCygwinSourceGenerator.cxx | 14 +- Source/CPack/cmCPackCygwinSourceGenerator.h | 14 +- Source/CPack/cmCPackDebGenerator.cxx | 113 +- Source/CPack/cmCPackDebGenerator.h | 34 +- Source/CPack/cmCPackDragNDropGenerator.cxx | 21 +- Source/CPack/cmCPackDragNDropGenerator.h | 24 +- Source/CPack/cmCPackGenerator.cxx | 87 +- Source/CPack/cmCPackGenerator.h | 36 +- Source/CPack/cmCPackGeneratorFactory.cxx | 26 +- Source/CPack/cmCPackGeneratorFactory.h | 25 +- Source/CPack/cmCPackLog.cxx | 24 +- Source/CPack/cmCPackLog.h | 23 +- Source/CPack/cmCPackNSISGenerator.cxx | 88 +- Source/CPack/cmCPackNSISGenerator.h | 51 +- Source/CPack/cmCPackOSXX11Generator.cxx | 47 +- Source/CPack/cmCPackOSXX11Generator.h | 22 +- Source/CPack/cmCPackPKGGenerator.cxx | 357 ++ Source/CPack/cmCPackPKGGenerator.h | 86 + Source/CPack/cmCPackPackageMakerGenerator.cxx | 409 +- Source/CPack/cmCPackPackageMakerGenerator.h | 88 +- Source/CPack/cmCPackProductBuildGenerator.cxx | 222 + Source/CPack/cmCPackProductBuildGenerator.h | 48 + Source/CPack/cmCPackRPMGenerator.cxx | 44 +- Source/CPack/cmCPackRPMGenerator.h | 33 +- Source/CPack/cmCPackSTGZGenerator.cxx | 22 +- Source/CPack/cmCPackSTGZGenerator.h | 30 +- Source/CPack/cmCPackTGZGenerator.cxx | 17 +- Source/CPack/cmCPackTGZGenerator.h | 22 +- Source/CPack/cmCPackTXZGenerator.cxx | 17 +- Source/CPack/cmCPackTXZGenerator.h | 22 +- Source/CPack/cmCPackTarBZip2Generator.cxx | 17 +- Source/CPack/cmCPackTarBZip2Generator.h | 22 +- Source/CPack/cmCPackTarCompressGenerator.cxx | 17 +- Source/CPack/cmCPackTarCompressGenerator.h | 24 +- Source/CPack/cmCPackZIPGenerator.cxx | 17 +- Source/CPack/cmCPackZIPGenerator.h | 22 +- Source/CPack/cpack.cxx | 55 +- Source/CPack/cygwin.readme | 69 - Source/CTest/cmCTestBZR.cxx | 72 +- Source/CTest/cmCTestBZR.h | 39 +- Source/CTest/cmCTestBatchTestHandler.cxx | 26 +- Source/CTest/cmCTestBatchTestHandler.h | 27 +- Source/CTest/cmCTestBuildAndTestHandler.cxx | 41 +- Source/CTest/cmCTestBuildAndTestHandler.h | 33 +- Source/CTest/cmCTestBuildCommand.cxx | 36 +- Source/CTest/cmCTestBuildCommand.h | 36 +- Source/CTest/cmCTestBuildHandler.cxx | 61 +- Source/CTest/cmCTestBuildHandler.h | 31 +- Source/CTest/cmCTestCVS.cxx | 29 +- Source/CTest/cmCTestCVS.h | 34 +- Source/CTest/cmCTestCommand.h | 17 +- Source/CTest/cmCTestConfigureCommand.cxx | 37 +- Source/CTest/cmCTestConfigureCommand.h | 27 +- Source/CTest/cmCTestConfigureHandler.cxx | 20 +- Source/CTest/cmCTestConfigureHandler.h | 23 +- Source/CTest/cmCTestCoverageCommand.cxx | 17 +- Source/CTest/cmCTestCoverageCommand.h | 32 +- Source/CTest/cmCTestCoverageHandler.cxx | 80 +- Source/CTest/cmCTestCoverageHandler.h | 32 +- Source/CTest/cmCTestCurl.cxx | 64 +- Source/CTest/cmCTestCurl.h | 19 +- .../CTest/cmCTestEmptyBinaryDirectoryCommand.cxx | 19 +- Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h | 30 +- Source/CTest/cmCTestGIT.cxx | 66 +- Source/CTest/cmCTestGIT.h | 41 +- Source/CTest/cmCTestGenericHandler.cxx | 22 +- Source/CTest/cmCTestGenericHandler.h | 28 +- Source/CTest/cmCTestGlobalVC.cxx | 16 +- Source/CTest/cmCTestGlobalVC.h | 26 +- Source/CTest/cmCTestHG.cxx | 47 +- Source/CTest/cmCTestHG.h | 37 +- Source/CTest/cmCTestHandlerCommand.cxx | 139 +- Source/CTest/cmCTestHandlerCommand.h | 26 +- Source/CTest/cmCTestLaunch.cxx | 55 +- Source/CTest/cmCTestLaunch.h | 18 +- Source/CTest/cmCTestMemCheckCommand.cxx | 13 +- Source/CTest/cmCTestMemCheckCommand.h | 25 +- Source/CTest/cmCTestMemCheckHandler.cxx | 121 +- Source/CTest/cmCTestMemCheckHandler.h | 31 +- Source/CTest/cmCTestMultiProcessHandler.cxx | 65 +- Source/CTest/cmCTestMultiProcessHandler.h | 25 +- Source/CTest/cmCTestP4.cxx | 52 +- Source/CTest/cmCTestP4.h | 38 +- Source/CTest/cmCTestReadCustomFilesCommand.cxx | 19 +- Source/CTest/cmCTestReadCustomFilesCommand.h | 30 +- Source/CTest/cmCTestRunScriptCommand.cxx | 22 +- Source/CTest/cmCTestRunScriptCommand.h | 30 +- Source/CTest/cmCTestRunTest.cxx | 66 +- Source/CTest/cmCTestRunTest.h | 27 +- Source/CTest/cmCTestSVN.cxx | 70 +- Source/CTest/cmCTestSVN.h | 43 +- Source/CTest/cmCTestScriptHandler.cxx | 96 +- Source/CTest/cmCTestScriptHandler.h | 31 +- Source/CTest/cmCTestSleepCommand.cxx | 22 +- Source/CTest/cmCTestSleepCommand.h | 30 +- Source/CTest/cmCTestStartCommand.cxx | 31 +- Source/CTest/cmCTestStartCommand.h | 31 +- Source/CTest/cmCTestSubmitCommand.cxx | 24 +- Source/CTest/cmCTestSubmitCommand.h | 39 +- Source/CTest/cmCTestSubmitHandler.cxx | 95 +- Source/CTest/cmCTestSubmitHandler.h | 29 +- Source/CTest/cmCTestTestCommand.cxx | 21 +- Source/CTest/cmCTestTestCommand.h | 27 +- Source/CTest/cmCTestTestHandler.cxx | 313 +- Source/CTest/cmCTestTestHandler.h | 42 +- Source/CTest/cmCTestUpdateCommand.cxx | 21 +- Source/CTest/cmCTestUpdateCommand.h | 27 +- Source/CTest/cmCTestUpdateHandler.cxx | 45 +- Source/CTest/cmCTestUpdateHandler.h | 25 +- Source/CTest/cmCTestUploadCommand.cxx | 41 +- Source/CTest/cmCTestUploadCommand.h | 33 +- Source/CTest/cmCTestUploadHandler.cxx | 17 +- Source/CTest/cmCTestUploadHandler.h | 23 +- Source/CTest/cmCTestVC.cxx | 21 +- Source/CTest/cmCTestVC.h | 27 +- Source/CTest/cmParseBlanketJSCoverage.cxx | 21 +- Source/CTest/cmParseBlanketJSCoverage.h | 23 +- Source/CTest/cmParseCacheCoverage.cxx | 6 +- Source/CTest/cmParseCacheCoverage.h | 24 +- Source/CTest/cmParseCoberturaCoverage.cxx | 15 +- Source/CTest/cmParseCoberturaCoverage.h | 23 +- Source/CTest/cmParseDelphiCoverage.cxx | 5 +- Source/CTest/cmParseDelphiCoverage.h | 23 +- Source/CTest/cmParseGTMCoverage.cxx | 6 +- Source/CTest/cmParseGTMCoverage.h | 23 +- Source/CTest/cmParseJacocoCoverage.cxx | 15 +- Source/CTest/cmParseJacocoCoverage.h | 24 +- Source/CTest/cmParseMumpsCoverage.cxx | 32 +- Source/CTest/cmParseMumpsCoverage.h | 22 +- Source/CTest/cmParsePHPCoverage.cxx | 10 +- Source/CTest/cmParsePHPCoverage.h | 22 +- Source/CTest/cmProcess.cxx | 28 +- Source/CTest/cmProcess.h | 17 +- Source/Checks/cm_cxx11_unordered_map.cmake | 25 - Source/Checks/cm_cxx_auto_ptr.cxx | 18 + Source/Checks/cm_cxx_features.cmake | 45 + Source/Checks/cm_cxx_make_unique.cxx | 6 + Source/Checks/cm_cxx_nullptr.cxx | 14 + Source/Checks/cm_cxx_override.cxx | 24 + Source/Checks/cm_cxx_unique_ptr.cxx | 6 + ..._unordered_map.cpp => cm_cxx_unordered_map.cxx} | 0 Source/Checks/cm_cxx_unordered_set.cxx | 7 + Source/CursesDialog/CMakeLists.txt | 15 +- Source/CursesDialog/ccmake.cxx | 67 +- Source/CursesDialog/cmCursesBoolWidget.cxx | 33 +- Source/CursesDialog/cmCursesBoolWidget.h | 18 +- .../CursesDialog/cmCursesCacheEntryComposite.cxx | 30 +- Source/CursesDialog/cmCursesCacheEntryComposite.h | 21 +- Source/CursesDialog/cmCursesDummyWidget.cxx | 19 +- Source/CursesDialog/cmCursesDummyWidget.h | 18 +- Source/CursesDialog/cmCursesFilePathWidget.cxx | 16 +- Source/CursesDialog/cmCursesFilePathWidget.h | 15 +- Source/CursesDialog/cmCursesForm.cxx | 19 +- Source/CursesDialog/cmCursesForm.h | 15 +- Source/CursesDialog/cmCursesLabelWidget.cxx | 18 +- Source/CursesDialog/cmCursesLabelWidget.h | 22 +- Source/CursesDialog/cmCursesLongMessageForm.cxx | 37 +- Source/CursesDialog/cmCursesLongMessageForm.h | 27 +- Source/CursesDialog/cmCursesMainForm.cxx | 92 +- Source/CursesDialog/cmCursesMainForm.h | 33 +- Source/CursesDialog/cmCursesOptionsWidget.cxx | 64 +- Source/CursesDialog/cmCursesOptionsWidget.h | 21 +- Source/CursesDialog/cmCursesPathWidget.cxx | 17 +- Source/CursesDialog/cmCursesPathWidget.h | 26 +- Source/CursesDialog/cmCursesStandardIncludes.h | 19 +- Source/CursesDialog/cmCursesStringWidget.cxx | 52 +- Source/CursesDialog/cmCursesStringWidget.h | 24 +- Source/CursesDialog/cmCursesWidget.cxx | 17 +- Source/CursesDialog/cmCursesWidget.h | 18 +- Source/CursesDialog/form/CMakeLists.txt | 14 +- Source/CursesDialog/form/cmFormConfigure.h.in | 14 +- Source/CursesDialog/form/form.h | 4 - Source/Modules/FindJsonCpp.cmake | 16 +- Source/Modules/FindLibUV.cmake | 121 + Source/QtDialog/AddCacheEntry.cxx | 17 +- Source/QtDialog/AddCacheEntry.h | 14 +- Source/QtDialog/CMakeLists.txt | 25 +- Source/QtDialog/CMakeSetup.cxx | 35 +- Source/QtDialog/CMakeSetup64.png | Bin 0 -> 7213 bytes Source/QtDialog/CMakeSetupDialog.cxx | 64 +- Source/QtDialog/CMakeSetupDialog.h | 16 +- Source/QtDialog/CMakeSetupDialog.ui | 7 + Source/QtDialog/Compilers.h | 4 +- Source/QtDialog/FirstConfigure.cxx | 21 +- Source/QtDialog/QCMake.cxx | 14 +- Source/QtDialog/QCMake.h | 18 +- Source/QtDialog/QCMakeCacheView.cxx | 47 +- Source/QtDialog/QCMakeCacheView.h | 14 +- Source/QtDialog/QCMakeWidgets.cxx | 20 +- Source/QtDialog/QCMakeWidgets.h | 21 +- Source/QtDialog/RegexExplorer.cxx | 14 +- Source/QtDialog/RegexExplorer.h | 14 +- Source/QtDialog/WarningMessagesDialog.cxx | 14 +- Source/QtDialog/WarningMessagesDialog.h | 14 +- Source/QtIFW/CMake.DeveloperReference.HTML.qs.in | 21 + Source/QtIFW/installscript.qs.in | 3 +- Source/bindexplib.cxx | 17 +- Source/bindexplib.h | 16 +- Source/cmAddCompileOptionsCommand.cxx | 15 +- Source/cmAddCompileOptionsCommand.h | 21 +- Source/cmAddCustomCommandCommand.cxx | 38 +- Source/cmAddCustomCommandCommand.h | 21 +- Source/cmAddCustomTargetCommand.cxx | 17 +- Source/cmAddCustomTargetCommand.h | 21 +- Source/cmAddDefinitionsCommand.cxx | 15 +- Source/cmAddDefinitionsCommand.h | 21 +- Source/cmAddDependenciesCommand.cxx | 13 +- Source/cmAddDependenciesCommand.h | 21 +- Source/cmAddExecutableCommand.cxx | 13 +- Source/cmAddExecutableCommand.h | 21 +- Source/cmAddLibraryCommand.cxx | 15 +- Source/cmAddLibraryCommand.h | 21 +- Source/cmAddSubDirectoryCommand.cxx | 15 +- Source/cmAddSubDirectoryCommand.h | 21 +- Source/cmAddTestCommand.cxx | 13 +- Source/cmAddTestCommand.h | 21 +- Source/cmAlgorithms.h | 15 +- Source/cmArchiveWrite.cxx | 34 +- Source/cmArchiveWrite.h | 31 +- Source/cmAuxSourceDirectoryCommand.cxx | 25 +- Source/cmAuxSourceDirectoryCommand.h | 21 +- Source/cmBase32.cxx | 99 + Source/cmBase32.h | 33 + Source/cmBootstrapCommands1.cxx | 13 +- Source/cmBootstrapCommands2.cxx | 13 +- Source/cmBreakCommand.cxx | 15 +- Source/cmBreakCommand.h | 23 +- Source/cmBuildCommand.cxx | 42 +- Source/cmBuildCommand.h | 21 +- Source/cmBuildNameCommand.cxx | 15 +- Source/cmBuildNameCommand.h | 23 +- Source/cmCLocaleEnvironmentScope.cxx | 24 +- Source/cmCLocaleEnvironmentScope.h | 19 +- Source/cmCMakeHostSystemInformationCommand.cxx | 19 +- Source/cmCMakeHostSystemInformationCommand.h | 23 +- Source/cmCMakeMinimumRequired.cxx | 13 +- Source/cmCMakeMinimumRequired.h | 23 +- Source/cmCMakePolicyCommand.cxx | 30 +- Source/cmCMakePolicyCommand.h | 23 +- Source/cmCPackPropertiesGenerator.cxx | 7 +- Source/cmCPackPropertiesGenerator.h | 26 +- Source/cmCPluginAPI.cxx | 48 +- Source/cmCPluginAPI.h | 13 +- Source/cmCTest.cxx | 447 +- Source/cmCTest.h | 221 +- Source/cmCacheManager.cxx | 45 +- Source/cmCacheManager.h | 33 +- Source/cmCallVisualStudioMacro.cxx | 17 +- Source/cmCallVisualStudioMacro.h | 15 +- Source/cmCommand.h | 17 +- Source/cmCommandArgumentLexer.cxx | 26 +- Source/cmCommandArgumentLexer.h | 13 +- Source/cmCommandArgumentLexer.in.l | 13 +- Source/cmCommandArgumentParser.cxx | 26 +- Source/cmCommandArgumentParser.y | 13 +- Source/cmCommandArgumentParserHelper.cxx | 53 +- Source/cmCommandArgumentParserHelper.h | 18 +- Source/cmCommandArgumentParserTokens.h | 13 +- Source/cmCommandArgumentsHelper.cxx | 51 +- Source/cmCommandArgumentsHelper.h | 41 +- Source/cmCommands.cxx.in | 13 +- Source/cmCommands.h | 15 +- Source/cmCommandsForBootstrap.cxx | 13 +- Source/cmCommonTargetGenerator.cxx | 226 +- Source/cmCommonTargetGenerator.h | 41 +- Source/cmComputeComponentGraph.cxx | 13 +- Source/cmComputeComponentGraph.h | 16 +- Source/cmComputeLinkDepends.cxx | 28 +- Source/cmComputeLinkDepends.h | 24 +- Source/cmComputeLinkInformation.cxx | 46 +- Source/cmComputeLinkInformation.h | 28 +- Source/cmComputeTargetDepends.cxx | 28 +- Source/cmComputeTargetDepends.h | 22 +- Source/cmConditionEvaluator.cxx | 73 +- Source/cmConditionEvaluator.h | 13 +- Source/cmConfigure.cmake.h.in | 48 +- Source/cmConfigureFileCommand.cxx | 13 +- Source/cmConfigureFileCommand.h | 23 +- Source/cmContinueCommand.cxx | 13 +- Source/cmContinueCommand.h | 23 +- Source/cmCoreTryCompile.cxx | 55 +- Source/cmCoreTryCompile.h | 13 +- Source/cmCreateTestSourceList.cxx | 13 +- Source/cmCreateTestSourceList.h | 21 +- Source/cmCryptoHash.cxx | 160 +- Source/cmCryptoHash.h | 69 +- Source/cmCurl.cxx | 26 +- Source/cmCurl.h | 20 +- Source/cmCustomCommand.cxx | 29 +- Source/cmCustomCommand.h | 26 +- Source/cmCustomCommandGenerator.cxx | 26 +- Source/cmCustomCommandGenerator.h | 20 +- Source/cmCustomCommandLines.h | 29 + Source/cmDefinePropertyCommand.cxx | 15 +- Source/cmDefinePropertyCommand.h | 21 +- Source/cmDefinitions.cxx | 17 +- Source/cmDefinitions.h | 26 +- Source/cmDepends.cxx | 37 +- Source/cmDepends.h | 24 +- Source/cmDependsC.cxx | 60 +- Source/cmDependsC.h | 31 +- Source/cmDependsFortran.cxx | 116 +- Source/cmDependsFortran.h | 33 +- Source/cmDependsJava.cxx | 24 +- Source/cmDependsJava.h | 33 +- Source/cmDependsJavaLexer.cxx | 15 +- Source/cmDependsJavaLexer.h | 13 +- Source/cmDependsJavaLexer.in.l | 13 +- Source/cmDependsJavaParser.cxx | 13 +- Source/cmDependsJavaParser.y | 13 +- Source/cmDependsJavaParserHelper.cxx | 69 +- Source/cmDependsJavaParserHelper.h | 35 +- Source/cmDocumentation.cxx | 45 +- Source/cmDocumentation.h | 29 +- Source/cmDocumentationEntry.h | 36 + Source/cmDocumentationFormatter.cxx | 19 +- Source/cmDocumentationFormatter.h | 17 +- Source/cmDocumentationSection.cxx | 13 +- Source/cmDocumentationSection.h | 20 +- Source/cmDynamicLoader.cxx | 28 +- Source/cmDynamicLoader.h | 15 +- Source/cmELF.cxx | 112 +- Source/cmELF.h | 18 +- Source/cmElseCommand.cxx | 13 +- Source/cmElseCommand.h | 23 +- Source/cmElseIfCommand.cxx | 13 +- Source/cmElseIfCommand.h | 23 +- Source/cmEnableLanguageCommand.cxx | 15 +- Source/cmEnableLanguageCommand.h | 21 +- Source/cmEnableTestingCommand.cxx | 13 +- Source/cmEnableTestingCommand.h | 21 +- Source/cmEndForEachCommand.cxx | 13 +- Source/cmEndForEachCommand.h | 26 +- Source/cmEndFunctionCommand.cxx | 13 +- Source/cmEndFunctionCommand.h | 26 +- Source/cmEndIfCommand.cxx | 13 +- Source/cmEndIfCommand.h | 23 +- Source/cmEndMacroCommand.cxx | 13 +- Source/cmEndMacroCommand.h | 26 +- Source/cmEndWhileCommand.cxx | 13 +- Source/cmEndWhileCommand.h | 26 +- Source/cmExecProgramCommand.cxx | 23 +- Source/cmExecProgramCommand.h | 26 +- Source/cmExecuteProcessCommand.cxx | 24 +- Source/cmExecuteProcessCommand.h | 23 +- Source/cmExecutionStatus.h | 15 +- Source/cmExpandedCommandArgument.cxx | 14 +- Source/cmExpandedCommandArgument.h | 15 +- Source/cmExportBuildAndroidMKGenerator.cxx | 184 + Source/cmExportBuildAndroidMKGenerator.h | 60 + Source/cmExportBuildFileGenerator.cxx | 38 +- Source/cmExportBuildFileGenerator.h | 39 +- Source/cmExportCommand.cxx | 45 +- Source/cmExportCommand.h | 22 +- Source/cmExportFileGenerator.cxx | 83 +- Source/cmExportFileGenerator.h | 66 +- Source/cmExportInstallAndroidMKGenerator.cxx | 137 + Source/cmExportInstallAndroidMKGenerator.h | 64 + Source/cmExportInstallFileGenerator.cxx | 175 +- Source/cmExportInstallFileGenerator.h | 53 +- Source/cmExportLibraryDependenciesCommand.cxx | 27 +- Source/cmExportLibraryDependenciesCommand.h | 31 +- Source/cmExportSet.cxx | 14 +- Source/cmExportSet.h | 20 +- Source/cmExportSetMap.cxx | 16 +- Source/cmExportSetMap.h | 18 +- Source/cmExportTryCompileFileGenerator.cxx | 35 +- Source/cmExportTryCompileFileGenerator.h | 39 +- Source/cmExprLexer.cxx | 15 +- Source/cmExprLexer.h | 13 +- Source/cmExprLexer.in.l | 13 +- Source/cmExprParser.cxx | 13 +- Source/cmExprParser.y | 13 +- Source/cmExprParserHelper.cxx | 26 +- Source/cmExprParserHelper.h | 21 +- Source/cmExternalMakefileProjectGenerator.cxx | 68 +- Source/cmExternalMakefileProjectGenerator.h | 74 +- Source/cmExtraCodeBlocksGenerator.cxx | 138 +- Source/cmExtraCodeBlocksGenerator.h | 36 +- Source/cmExtraCodeLiteGenerator.cxx | 395 +- Source/cmExtraCodeLiteGenerator.h | 59 +- Source/cmExtraEclipseCDT4Generator.cxx | 93 +- Source/cmExtraEclipseCDT4Generator.h | 47 +- Source/cmExtraKateGenerator.cxx | 56 +- Source/cmExtraKateGenerator.h | 37 +- Source/cmExtraSublimeTextGenerator.cxx | 100 +- Source/cmExtraSublimeTextGenerator.h | 42 +- Source/cmFLTKWrapUICommand.cxx | 17 +- Source/cmFLTKWrapUICommand.h | 25 +- Source/cmFileCommand.cxx | 225 +- Source/cmFileCommand.h | 23 +- Source/cmFileLock.cxx | 14 +- Source/cmFileLock.h | 18 +- Source/cmFileLockPool.cxx | 19 +- Source/cmFileLockPool.h | 18 +- Source/cmFileLockResult.cxx | 15 +- Source/cmFileLockResult.h | 18 +- Source/cmFileLockUnix.cxx | 23 +- Source/cmFileLockWin32.cxx | 14 +- Source/cmFileMonitor.cxx | 389 ++ Source/cmFileMonitor.h | 28 + Source/cmFilePathUuid.cxx | 118 + Source/cmFilePathUuid.h | 69 + Source/cmFileTimeComparison.cxx | 59 +- Source/cmFileTimeComparison.h | 15 +- Source/cmFindBase.cxx | 16 +- Source/cmFindBase.h | 13 +- Source/cmFindCommon.cxx | 17 +- Source/cmFindCommon.h | 15 +- Source/cmFindFileCommand.cxx | 13 +- Source/cmFindFileCommand.h | 17 +- Source/cmFindLibraryCommand.cxx | 28 +- Source/cmFindLibraryCommand.h | 23 +- Source/cmFindPackageCommand.cxx | 268 +- Source/cmFindPackageCommand.h | 65 +- Source/cmFindPathCommand.cxx | 18 +- Source/cmFindPathCommand.h | 23 +- Source/cmFindProgramCommand.cxx | 16 +- Source/cmFindProgramCommand.h | 23 +- Source/cmForEachCommand.cxx | 27 +- Source/cmForEachCommand.h | 31 +- Source/cmFortranLexer.cxx | 2357 +++++----- Source/cmFortranLexer.h | 147 +- Source/cmFortranLexer.in.l | 43 +- Source/cmFortranParser.cxx | 668 +-- Source/cmFortranParser.h | 21 +- Source/cmFortranParser.y | 236 +- Source/cmFortranParserImpl.cxx | 98 +- Source/cmFortranParserTokens.h | 52 +- Source/cmFunctionBlocker.h | 15 +- Source/cmFunctionCommand.cxx | 37 +- Source/cmFunctionCommand.h | 31 +- Source/cmGeneratedFileStream.cxx | 21 +- Source/cmGeneratedFileStream.h | 18 +- Source/cmGeneratorExpression.cxx | 30 +- Source/cmGeneratorExpression.h | 47 +- Source/cmGeneratorExpressionContext.cxx | 16 +- Source/cmGeneratorExpressionContext.h | 13 +- Source/cmGeneratorExpressionDAGChecker.cxx | 24 +- Source/cmGeneratorExpressionDAGChecker.h | 26 +- Source/cmGeneratorExpressionEvaluationFile.cxx | 46 +- Source/cmGeneratorExpressionEvaluationFile.h | 29 +- Source/cmGeneratorExpressionEvaluator.cxx | 53 +- Source/cmGeneratorExpressionEvaluator.h | 35 +- Source/cmGeneratorExpressionLexer.cxx | 13 +- Source/cmGeneratorExpressionLexer.h | 17 +- Source/cmGeneratorExpressionNode.cxx | 355 +- Source/cmGeneratorExpressionNode.h | 33 +- Source/cmGeneratorExpressionParser.cxx | 17 +- Source/cmGeneratorExpressionParser.h | 18 +- Source/cmGeneratorTarget.cxx | 466 +- Source/cmGeneratorTarget.h | 41 +- Source/cmGetCMakePropertyCommand.cxx | 15 +- Source/cmGetCMakePropertyCommand.h | 23 +- Source/cmGetDirectoryPropertyCommand.cxx | 15 +- Source/cmGetDirectoryPropertyCommand.h | 23 +- Source/cmGetFilenameComponentCommand.cxx | 13 +- Source/cmGetFilenameComponentCommand.h | 23 +- Source/cmGetPropertyCommand.cxx | 58 +- Source/cmGetPropertyCommand.h | 23 +- Source/cmGetSourceFilePropertyCommand.cxx | 15 +- Source/cmGetSourceFilePropertyCommand.h | 24 +- Source/cmGetTargetPropertyCommand.cxx | 37 +- Source/cmGetTargetPropertyCommand.h | 21 +- Source/cmGetTestPropertyCommand.cxx | 15 +- Source/cmGetTestPropertyCommand.h | 21 +- Source/cmGhsMultiGpj.cxx | 13 +- Source/cmGhsMultiGpj.h | 15 +- Source/cmGhsMultiTargetGenerator.cxx | 16 +- Source/cmGhsMultiTargetGenerator.h | 17 +- Source/cmGlobalBorlandMakefileGenerator.cxx | 13 +- Source/cmGlobalBorlandMakefileGenerator.h | 13 +- Source/cmGlobalCommonGenerator.cxx | 15 +- Source/cmGlobalCommonGenerator.h | 19 +- Source/cmGlobalGenerator.cxx | 374 +- Source/cmGlobalGenerator.h | 109 +- Source/cmGlobalGeneratorFactory.h | 39 +- Source/cmGlobalGhsMultiGenerator.cxx | 14 +- Source/cmGlobalGhsMultiGenerator.h | 19 +- Source/cmGlobalJOMMakefileGenerator.cxx | 13 +- Source/cmGlobalJOMMakefileGenerator.h | 13 +- Source/cmGlobalKdevelopGenerator.cxx | 72 +- Source/cmGlobalKdevelopGenerator.h | 34 +- Source/cmGlobalMSYSMakefileGenerator.cxx | 13 +- Source/cmGlobalMSYSMakefileGenerator.h | 13 +- Source/cmGlobalMinGWMakefileGenerator.cxx | 13 +- Source/cmGlobalMinGWMakefileGenerator.h | 13 +- Source/cmGlobalNMakeMakefileGenerator.cxx | 13 +- Source/cmGlobalNMakeMakefileGenerator.h | 13 +- Source/cmGlobalNinjaGenerator.cxx | 705 ++- Source/cmGlobalNinjaGenerator.h | 134 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 72 +- Source/cmGlobalUnixMakefileGenerator3.h | 115 +- Source/cmGlobalVisualStudio10Generator.cxx | 58 +- Source/cmGlobalVisualStudio10Generator.h | 13 +- Source/cmGlobalVisualStudio11Generator.cxx | 24 +- Source/cmGlobalVisualStudio11Generator.h | 13 +- Source/cmGlobalVisualStudio12Generator.cxx | 24 +- Source/cmGlobalVisualStudio12Generator.h | 13 +- Source/cmGlobalVisualStudio14Generator.cxx | 24 +- Source/cmGlobalVisualStudio14Generator.h | 13 +- Source/cmGlobalVisualStudio15Generator.cxx | 142 + Source/cmGlobalVisualStudio15Generator.h | 37 + Source/cmGlobalVisualStudio71Generator.cxx | 14 +- Source/cmGlobalVisualStudio71Generator.h | 13 +- Source/cmGlobalVisualStudio7Generator.cxx | 50 +- Source/cmGlobalVisualStudio7Generator.h | 19 +- Source/cmGlobalVisualStudio8Generator.cxx | 25 +- Source/cmGlobalVisualStudio8Generator.h | 13 +- Source/cmGlobalVisualStudio9Generator.cxx | 24 +- Source/cmGlobalVisualStudio9Generator.h | 13 +- Source/cmGlobalVisualStudioGenerator.cxx | 20 +- Source/cmGlobalVisualStudioGenerator.h | 18 +- Source/cmGlobalWatcomWMakeGenerator.cxx | 17 +- Source/cmGlobalWatcomWMakeGenerator.h | 33 +- Source/cmGlobalXCodeGenerator.cxx | 221 +- Source/cmGlobalXCodeGenerator.h | 19 +- Source/cmGraphAdjacencyList.h | 15 +- Source/cmGraphVizWriter.cxx | 64 +- Source/cmGraphVizWriter.h | 25 +- Source/cmHexFileConverter.cxx | 28 +- Source/cmHexFileConverter.h | 15 +- Source/cmIDEFlagTable.h | 13 +- Source/cmIDEOptions.cxx | 13 +- Source/cmIDEOptions.h | 15 +- Source/cmIfCommand.cxx | 25 +- Source/cmIfCommand.h | 34 +- Source/cmIncludeCommand.cxx | 17 +- Source/cmIncludeCommand.h | 23 +- Source/cmIncludeDirectoryCommand.cxx | 15 +- Source/cmIncludeDirectoryCommand.h | 21 +- Source/cmIncludeExternalMSProjectCommand.cxx | 13 +- Source/cmIncludeExternalMSProjectCommand.h | 27 +- Source/cmIncludeRegularExpressionCommand.cxx | 15 +- Source/cmIncludeRegularExpressionCommand.h | 27 +- Source/cmInstallCommand.cxx | 186 +- Source/cmInstallCommand.h | 22 +- Source/cmInstallCommandArguments.cxx | 35 +- Source/cmInstallCommandArguments.h | 16 +- Source/cmInstallDirectoryGenerator.cxx | 33 +- Source/cmInstallDirectoryGenerator.h | 33 +- Source/cmInstallExportAndroidMKGenerator.cxx | 140 + Source/cmInstallExportAndroidMKGenerator.h | 37 + Source/cmInstallExportGenerator.cxx | 83 +- Source/cmInstallExportGenerator.h | 41 +- Source/cmInstallFilesCommand.cxx | 23 +- Source/cmInstallFilesCommand.h | 25 +- Source/cmInstallFilesGenerator.cxx | 27 +- Source/cmInstallFilesGenerator.h | 34 +- Source/cmInstallGenerator.cxx | 15 +- Source/cmInstallGenerator.h | 36 +- Source/cmInstallProgramsCommand.cxx | 23 +- Source/cmInstallProgramsCommand.h | 25 +- Source/cmInstallScriptGenerator.cxx | 18 +- Source/cmInstallScriptGenerator.h | 22 +- Source/cmInstallTargetGenerator.cxx | 44 +- Source/cmInstallTargetGenerator.h | 32 +- Source/cmInstallTargetsCommand.cxx | 30 +- Source/cmInstallTargetsCommand.h | 21 +- Source/cmInstallType.h | 13 +- Source/cmInstalledFile.cxx | 19 +- Source/cmInstalledFile.h | 22 +- Source/cmLinkDirectoriesCommand.cxx | 15 +- Source/cmLinkDirectoriesCommand.h | 21 +- Source/cmLinkItem.h | 18 +- Source/cmLinkLibrariesCommand.cxx | 15 +- Source/cmLinkLibrariesCommand.h | 21 +- Source/cmLinkedTree.h | 21 +- Source/cmListCommand.cxx | 13 +- Source/cmListCommand.h | 23 +- Source/cmListFileCache.cxx | 223 +- Source/cmListFileCache.h | 25 +- Source/cmListFileLexer.c | 13 +- Source/cmListFileLexer.h | 13 +- Source/cmListFileLexer.in.l | 13 +- Source/cmLoadCacheCommand.cxx | 15 +- Source/cmLoadCacheCommand.h | 21 +- Source/cmLoadCommandCommand.cxx | 39 +- Source/cmLoadCommandCommand.h | 21 +- Source/cmLocalCommonGenerator.cxx | 70 +- Source/cmLocalCommonGenerator.h | 34 +- Source/cmLocalGenerator.cxx | 285 +- Source/cmLocalGenerator.h | 72 +- Source/cmLocalGhsMultiGenerator.cxx | 13 +- Source/cmLocalGhsMultiGenerator.h | 13 +- Source/cmLocalNinjaGenerator.cxx | 82 +- Source/cmLocalNinjaGenerator.h | 54 +- Source/cmLocalUnixMakefileGenerator3.cxx | 267 +- Source/cmLocalUnixMakefileGenerator3.h | 89 +- Source/cmLocalVisualStudio10Generator.cxx | 15 +- Source/cmLocalVisualStudio10Generator.h | 13 +- Source/cmLocalVisualStudio7Generator.cxx | 59 +- Source/cmLocalVisualStudio7Generator.h | 13 +- Source/cmLocalVisualStudioGenerator.cxx | 30 +- Source/cmLocalVisualStudioGenerator.h | 20 +- Source/cmLocalXCodeGenerator.cxx | 14 +- Source/cmLocalXCodeGenerator.h | 13 +- Source/cmLocale.h | 17 +- Source/cmMachO.cxx | 13 +- Source/cmMachO.h | 13 +- Source/cmMacroCommand.cxx | 37 +- Source/cmMacroCommand.h | 31 +- Source/cmMakeDirectoryCommand.cxx | 13 +- Source/cmMakeDirectoryCommand.h | 23 +- Source/cmMakefile.cxx | 547 ++- Source/cmMakefile.h | 135 +- Source/cmMakefileExecutableTargetGenerator.cxx | 154 +- Source/cmMakefileExecutableTargetGenerator.h | 21 +- Source/cmMakefileLibraryTargetGenerator.cxx | 224 +- Source/cmMakefileLibraryTargetGenerator.h | 23 +- Source/cmMakefileTargetGenerator.cxx | 403 +- Source/cmMakefileTargetGenerator.h | 42 +- Source/cmMakefileUtilityTargetGenerator.cxx | 36 +- Source/cmMakefileUtilityTargetGenerator.h | 21 +- Source/cmMarkAsAdvancedCommand.cxx | 17 +- Source/cmMarkAsAdvancedCommand.h | 23 +- Source/cmMathCommand.cxx | 15 +- Source/cmMathCommand.h | 23 +- Source/cmMessageCommand.cxx | 33 +- Source/cmMessageCommand.h | 23 +- Source/cmMessenger.cxx | 203 + Source/cmMessenger.h | 39 + Source/cmNewLineStyle.cxx | 30 +- Source/cmNewLineStyle.h | 18 +- Source/cmNinjaNormalTargetGenerator.cxx | 114 +- Source/cmNinjaNormalTargetGenerator.h | 27 +- Source/cmNinjaTargetGenerator.cxx | 429 +- Source/cmNinjaTargetGenerator.h | 50 +- Source/cmNinjaTypes.h | 16 +- Source/cmNinjaUtilityTargetGenerator.cxx | 56 +- Source/cmNinjaUtilityTargetGenerator.h | 24 +- Source/cmOSXBundleGenerator.cxx | 39 +- Source/cmOSXBundleGenerator.h | 24 +- Source/cmObject.h | 15 +- Source/cmOptionCommand.cxx | 13 +- Source/cmOptionCommand.h | 23 +- Source/cmOrderDirectories.cxx | 27 +- Source/cmOrderDirectories.h | 26 +- Source/cmOutputConverter.cxx | 426 +- Source/cmOutputConverter.h | 100 +- Source/cmOutputRequiredFilesCommand.cxx | 42 +- Source/cmOutputRequiredFilesCommand.h | 21 +- Source/cmParseArgumentsCommand.cxx | 97 +- Source/cmParseArgumentsCommand.h | 24 +- Source/cmPathLabel.cxx | 14 +- Source/cmPathLabel.h | 15 +- Source/cmPolicies.cxx | 34 +- Source/cmPolicies.h | 22 +- Source/cmProcessTools.cxx | 28 +- Source/cmProcessTools.h | 27 +- Source/cmProjectCommand.cxx | 15 +- Source/cmProjectCommand.h | 21 +- Source/cmProperty.cxx | 17 +- Source/cmProperty.h | 17 +- Source/cmPropertyDefinition.cxx | 15 +- Source/cmPropertyDefinition.h | 17 +- Source/cmPropertyDefinitionMap.cxx | 23 +- Source/cmPropertyDefinitionMap.h | 19 +- Source/cmPropertyMap.cxx | 33 +- Source/cmPropertyMap.h | 21 +- Source/cmQTWrapCPPCommand.cxx | 15 +- Source/cmQTWrapCPPCommand.h | 21 +- Source/cmQTWrapUICommand.cxx | 17 +- Source/cmQTWrapUICommand.h | 21 +- Source/cmQtAutoGeneratorInitializer.cxx | 214 +- Source/cmQtAutoGeneratorInitializer.h | 22 +- Source/cmQtAutoGenerators.cxx | 199 +- Source/cmQtAutoGenerators.h | 24 +- Source/cmRST.cxx | 18 +- Source/cmRST.h | 20 +- Source/cmRemoveCommand.cxx | 15 +- Source/cmRemoveCommand.h | 23 +- Source/cmRemoveDefinitionsCommand.cxx | 15 +- Source/cmRemoveDefinitionsCommand.h | 21 +- Source/cmReturnCommand.cxx | 13 +- Source/cmReturnCommand.h | 23 +- Source/cmScriptGenerator.cxx | 25 +- Source/cmScriptGenerator.h | 19 +- Source/cmSearchPath.cxx | 26 +- Source/cmSearchPath.h | 21 +- Source/cmSeparateArgumentsCommand.cxx | 13 +- Source/cmSeparateArgumentsCommand.h | 23 +- Source/cmServer.cxx | 379 ++ Source/cmServer.h | 94 + Source/cmServerConnection.cxx | 304 ++ Source/cmServerConnection.h | 90 + Source/cmServerDictionary.h | 94 + Source/cmServerProtocol.cxx | 1077 +++++ Source/cmServerProtocol.h | 134 + Source/cmSetCommand.cxx | 28 +- Source/cmSetCommand.h | 23 +- Source/cmSetDirectoryPropertiesCommand.cxx | 18 +- Source/cmSetDirectoryPropertiesCommand.h | 29 +- Source/cmSetPropertyCommand.cxx | 23 +- Source/cmSetPropertyCommand.h | 23 +- Source/cmSetSourceFilesPropertiesCommand.cxx | 13 +- Source/cmSetSourceFilesPropertiesCommand.h | 27 +- Source/cmSetTargetPropertiesCommand.cxx | 13 +- Source/cmSetTargetPropertiesCommand.h | 21 +- Source/cmSetTestsPropertiesCommand.cxx | 15 +- Source/cmSetTestsPropertiesCommand.h | 21 +- Source/cmSiteNameCommand.cxx | 16 +- Source/cmSiteNameCommand.h | 23 +- Source/cmSourceFile.cxx | 29 +- Source/cmSourceFile.h | 25 +- Source/cmSourceFileLocation.cxx | 27 +- Source/cmSourceFileLocation.h | 17 +- Source/cmSourceGroup.cxx | 25 +- Source/cmSourceGroup.h | 21 +- Source/cmSourceGroupCommand.cxx | 17 +- Source/cmSourceGroupCommand.h | 21 +- Source/cmStandardIncludes.h | 97 +- Source/cmStandardLexer.h | 13 +- Source/cmState.cxx | 142 +- Source/cmState.h | 40 +- Source/cmStringCommand.cxx | 94 +- Source/cmStringCommand.h | 23 +- Source/cmSubdirCommand.cxx | 15 +- Source/cmSubdirCommand.h | 21 +- Source/cmSubdirDependsCommand.cxx | 13 +- Source/cmSubdirDependsCommand.h | 21 +- Source/cmSystemTools.cxx | 293 +- Source/cmSystemTools.h | 78 +- Source/cmTarget.cxx | 282 +- Source/cmTarget.h | 63 +- Source/cmTargetCompileDefinitionsCommand.cxx | 13 +- Source/cmTargetCompileDefinitionsCommand.h | 40 +- Source/cmTargetCompileFeaturesCommand.cxx | 13 +- Source/cmTargetCompileFeaturesCommand.h | 33 +- Source/cmTargetCompileOptionsCommand.cxx | 13 +- Source/cmTargetCompileOptionsCommand.h | 34 +- Source/cmTargetDepend.h | 15 +- Source/cmTargetExport.h | 15 +- Source/cmTargetIncludeDirectoriesCommand.cxx | 13 +- Source/cmTargetIncludeDirectoriesCommand.h | 46 +- Source/cmTargetLinkLibrariesCommand.cxx | 26 +- Source/cmTargetLinkLibrariesCommand.h | 21 +- Source/cmTargetLinkLibraryType.h | 13 + Source/cmTargetPropCommandBase.cxx | 14 +- Source/cmTargetPropCommandBase.h | 14 +- Source/cmTargetSourcesCommand.cxx | 13 +- Source/cmTargetSourcesCommand.h | 34 +- Source/cmTest.cxx | 19 +- Source/cmTest.h | 20 +- Source/cmTestGenerator.cxx | 26 +- Source/cmTestGenerator.h | 39 +- Source/cmTimestamp.cxx | 30 +- Source/cmTimestamp.h | 15 +- Source/cmTryCompileCommand.cxx | 13 +- Source/cmTryCompileCommand.h | 21 +- Source/cmTryRunCommand.cxx | 38 +- Source/cmTryRunCommand.h | 21 +- Source/cmTypeMacro.h | 31 + Source/cmUnsetCommand.cxx | 29 +- Source/cmUnsetCommand.h | 23 +- Source/cmUseMangledMesaCommand.cxx | 13 +- Source/cmUseMangledMesaCommand.h | 23 +- Source/cmUtilitySourceCommand.cxx | 17 +- Source/cmUtilitySourceCommand.h | 21 +- Source/cmUtils.hxx | 17 + Source/cmUuid.cxx | 26 +- Source/cmUuid.h | 18 +- Source/cmVS14CLFlagTable.h | 12 + Source/cmVS14LinkFlagTable.h | 17 +- Source/cmVariableRequiresCommand.cxx | 13 +- Source/cmVariableRequiresCommand.h | 21 +- Source/cmVariableWatch.cxx | 19 +- Source/cmVariableWatch.h | 30 +- Source/cmVariableWatchCommand.cxx | 15 +- Source/cmVariableWatchCommand.h | 27 +- Source/cmVersion.cxx | 15 +- Source/cmVersion.h | 15 +- Source/cmVersionConfig.h.in | 15 +- Source/cmVersionMacros.h | 13 +- Source/cmVisualStudio10TargetGenerator.cxx | 87 +- Source/cmVisualStudio10TargetGenerator.h | 15 +- Source/cmVisualStudioGeneratorOptions.cxx | 1 + Source/cmVisualStudioGeneratorOptions.h | 13 +- Source/cmVisualStudioSlnData.cxx | 13 +- Source/cmVisualStudioSlnData.h | 15 +- Source/cmVisualStudioSlnParser.cxx | 13 +- Source/cmVisualStudioSlnParser.h | 15 +- Source/cmVisualStudioWCEPlatformParser.cxx | 13 +- Source/cmVisualStudioWCEPlatformParser.h | 15 +- Source/cmWhileCommand.cxx | 23 +- Source/cmWhileCommand.h | 34 +- Source/cmWriteFileCommand.cxx | 13 +- Source/cmWriteFileCommand.h | 23 +- Source/cmXCode21Object.cxx | 13 +- Source/cmXCode21Object.h | 13 +- Source/cmXCodeObject.cxx | 29 +- Source/cmXCodeObject.h | 61 +- Source/cmXMLParser.cxx | 33 +- Source/cmXMLParser.h | 17 +- Source/cmXMLSafe.cxx | 15 +- Source/cmXMLSafe.h | 15 +- Source/cmXMLWriter.cxx | 19 +- Source/cmXMLWriter.h | 15 +- Source/cm_auto_ptr.hxx | 220 + Source/cm_get_date.c | 13 +- Source/cm_get_date.h | 13 +- Source/cm_sha2_mangle.h | 13 +- Source/cm_utf8.c | 13 +- Source/cm_utf8.h | 13 +- Source/cmake.cxx | 630 ++- Source/cmake.h | 101 +- Source/cmakemain.cxx | 71 +- Source/cmakexbuild.cxx | 13 +- Source/cmcldeps.cxx | 3 +- Source/cmcmd.cxx | 263 +- Source/cmcmd.h | 19 +- Source/cmparseMSBuildXML.py | 3 + Source/ctest.cxx | 38 +- Source/dir.dox | 7 + Source/dir.dox.in | 7 + Source/kwsys/CMakeLists.txt | 27 +- Source/kwsys/Configure.hxx.in | 7 +- Source/kwsys/ConsoleBuf.hxx.in | 348 ++ Source/kwsys/Directory.cxx | 31 +- Source/kwsys/FStream.hxx.in | 234 +- Source/kwsys/SystemInformation.cxx | 15 +- Source/kwsys/SystemTools.cxx | 390 +- Source/kwsys/SystemTools.hxx.in | 19 +- Source/kwsys/auto_ptr.hxx.in | 219 - Source/kwsys/kwsysPlatformTestsCXX.cxx | 5 + Source/kwsys/testAutoPtr.cxx | 166 - Source/kwsys/testConsoleBuf.cxx | 719 +++ Source/kwsys/testConsoleBuf.hxx | 25 + Source/kwsys/testConsoleBufChild.cxx | 63 + Source/kwsys/testSystemTools.cxx | 55 +- Templates/TestDriver.cxx.in | 10 +- Templates/cygwin-package.sh.in | 103 - Tests/AliasTarget/CMakeLists.txt | 15 +- Tests/AliasTarget/commandgenerator.cpp | 3 +- Tests/AliasTarget/targetgenerator.cpp | 3 +- Tests/CFBundleTest/CMakeLists.txt | 1 - Tests/CMakeLib/CMakeLists.txt | 1 + Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in | 32 +- Tests/CMakeLib/run_compile_commands.cxx | 39 +- Tests/CMakeLib/testFindPackageCommand.cxx | 67 + Tests/CMakeLib/testGeneratedFileStream.cxx | 20 +- Tests/CMakeLib/testRST.cxx | 22 +- Tests/CMakeLib/testSystemTools.cxx | 94 +- Tests/CMakeLib/testUTF8.cxx | 17 +- Tests/CMakeLib/testXMLParser.cxx | 2 +- Tests/CMakeLib/testXMLSafe.cxx | 23 +- Tests/CMakeLists.txt | 179 +- .../CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt | 2 +- .../CMakeOnly/CheckStructHasMember/CMakeLists.txt | 2 +- Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt | 2 +- Tests/CMakeOnly/find_library/CMakeLists.txt | 7 + .../CMakeOnly/find_library/lib/32/libtest5.a | 0 .../find_library/lib/A/{lib64 => lib32}/libtest3.a | 0 .../{lib/64 => lib32/A/lib}/libtest2.a | 0 .../find_library/lib32/A/lib32/libtest4.a | 0 .../CMakeOnly/find_library/lib32/A/libtest4.a | 0 .../CMakeOnly/find_library/lib32/libtest4.a | 0 Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in | 6 + Tests/CMakeTests/ModuleNoticesTest.cmake.in | 25 +- .../String-TIMESTAMP-MonthWeekNames.cmake | 11 + Tests/CMakeTests/StringTest.cmake.in | 3 + Tests/CMakeTests/VersionTest.cmake.in | 14 + Tests/CMakeTests/WhileTest.cmake.in | 6 +- Tests/CPackComponents/Issue 7470.html | 4 +- ...yResult-components-lintian-dpkgdeb-checks.cmake | 2 +- .../CPackComponentsDEB/RunCPackVerifyResult.cmake | 2 +- Tests/CTestLimitDashJ/CMakeLists.txt | 2 +- Tests/CTestTestStopTime/GetDate.cmake | 4 +- Tests/CTestUpdateBZR.cmake.in | 2 +- Tests/CTestUpdateCVS.cmake.in | 2 +- Tests/CTestUpdateCommon.cmake | 12 +- Tests/CTestUpdateGIT.cmake.in | 2 +- Tests/CTestUpdateHG.cmake.in | 2 +- Tests/CTestUpdateP4.cmake.in | 8 +- Tests/CTestUpdateSVN.cmake.in | 2 +- Tests/CheckFortran.cmake | 17 +- Tests/Complex/CMakeLists.txt | 12 +- Tests/Complex/Executable/CMakeLists.txt | 4 +- Tests/Complex/Executable/complex.cxx | 200 +- Tests/Complex/Library/CMakeLists.txt | 2 +- Tests/Complex/VarTests.cmake | 80 +- Tests/ComplexOneConfig/CMakeLists.txt | 6 +- Tests/ComplexOneConfig/Executable/CMakeLists.txt | 4 +- Tests/ComplexOneConfig/Executable/complex.cxx | 194 +- Tests/ComplexOneConfig/Library/CMakeLists.txt | 2 +- Tests/ComplexOneConfig/VarTests.cmake | 80 +- Tests/CustomCommand/CMakeLists.txt | 6 +- Tests/ExternalProjectSourceSubdir/CMakeLists.txt | 10 + .../Example/subdir/CMakeLists.txt | 2 + Tests/FindBZip2/CMakeLists.txt | 10 + Tests/FindBZip2/Test/CMakeLists.txt | 16 + Tests/FindBZip2/Test/main.c | 23 + Tests/FindICU/CMakeLists.txt | 10 + Tests/FindICU/Test/CMakeLists.txt | 14 + Tests/FindICU/Test/main.cpp | 24 + Tests/FindLibUV/CMakeLists.txt | 10 + Tests/FindLibUV/Test/CMakeLists.txt | 17 + Tests/FindLibUV/Test/main.c | 7 + Tests/FindMatlab/components_checks/CMakeLists.txt | 23 + Tests/FindOpenCL/CMakeLists.txt | 10 + Tests/FindOpenCL/Test/CMakeLists.txt | 14 + Tests/FindOpenCL/Test/main.c | 17 + .../lib/cmake/Baz}/BazConfig.cmake | 0 .../Baz 1.3/lib/cmake/Baz/BazConfigVersion.cmake | 7 + .../share/Baz 2}/BazConfig.cmake | 0 .../Baz 2.0/share/Baz 2/BazConfigVersion.cmake | 7 + .../lib/Baz 2/cmake}/BazConfig.cmake | 0 .../Baz 2.1/lib/Baz 2/cmake/BazConfigVersion.cmake | 7 + Tests/FindPackageTest/CMakeLists.txt | 44 +- .../SortLib-3.1.1/SortLibConfig.cmake | 2 + .../SortLib-3.1.1/SortLibConfigVersion.cmake | 9 + .../SortLib-3.10.1/SortLibConfig.cmake | 2 + .../SortLib-3.10.1/SortLibConfigVersion.cmake | 9 + Tests/FindTIFF/Test/CMakeLists.txt | 14 +- Tests/FindVulkan/CMakeLists.txt | 10 + Tests/FindVulkan/Test/CMakeLists.txt | 15 + Tests/FindVulkan/Test/main.c | 29 + Tests/Fortran/CMakeLists.txt | 89 +- Tests/Fortran/External/CMakeLists.txt | 4 - Tests/FortranModules/CMakeLists.txt | 111 + .../Executable/CMakeLists.txt | 0 .../Executable/main.f90 | 0 Tests/FortranModules/External/CMakeLists.txt | 3 + Tests/{Fortran => FortranModules}/External/a.f90 | 0 .../Library/CMakeLists.txt | 0 Tests/{Fortran => FortranModules}/Library/a.f90 | 0 Tests/{Fortran => FortranModules}/Library/b.f90 | 0 Tests/{Fortran => FortranModules}/Library/main.f90 | 0 .../Subdir/CMakeLists.txt | 0 .../{Fortran => FortranModules}/Subdir/subdir.f90 | 0 Tests/FortranModules/Submodules/CMakeLists.txt | 1 + Tests/FortranModules/Submodules/main.f90 | 5 + Tests/FortranModules/Submodules/provide.f90 | 57 + .../in_interface/main.f90 | 0 .../in_interface/module.f90 | 0 .../include/test_preprocess.h | 0 Tests/FortranModules/non_pp_include.f90 | 3 + .../test_module_implementation.f90 | 0 .../test_module_interface.f90 | 0 .../test_module_main.f90 | 0 Tests/FortranModules/test_non_pp_include_main.f90 | 5 + .../test_preprocess.F90 | 0 .../test_preprocess_module.F90 | 0 .../test_use_in_comment_fixedform.f | 0 .../test_use_in_comment_freeform.f90 | 0 Tests/IncludeDirectories/CMakeLists.txt | 8 +- .../SystemIncludeDirectories/CMakeLists.txt | 15 +- Tests/Java/A.java | 10 +- Tests/Java/HelloWorld.java | 14 +- Tests/JavaExportImport/BuildExport/CMakeLists.txt | 10 + Tests/JavaExportImport/BuildExport/Foo.java | 11 + Tests/JavaExportImport/CMakeLists.txt | 104 + Tests/JavaExportImport/Import/CMakeLists.txt | 14 + Tests/JavaExportImport/Import/Import.java | 10 + Tests/JavaExportImport/InitialCache.cmake.in | 5 + Tests/JavaExportImport/InstallExport/Bar.java | 11 + .../JavaExportImport/InstallExport/CMakeLists.txt | 14 + Tests/{ExportImport => JavaExportImport}/main.c | 0 Tests/MakeClean/CMakeLists.txt | 2 +- Tests/MathTest/CMakeLists.txt | 2 +- Tests/Module/ExternalData/CMakeLists.txt | 1 + Tests/Module/ExternalData/Data5/CMakeLists.txt | 22 + Tests/Module/ExternalData/Data5/Data5Check.cmake | 4 + Tests/Module/GenerateExportHeader/CMakeLists.txt | 139 - .../c_identifier/CMakeLists.txt | 13 - .../GenerateExportHeader/c_identifier/main.cpp | 8 - .../GenerateExportHeader/exportheader_test.cpp | 137 - .../lib_shared_and_static/CMakeLists.txt | 35 - .../lib_shared_and_static/libshared_and_static.cpp | 102 - .../lib_shared_and_static/libshared_and_static.h | 66 - .../GenerateExportHeader/libshared/CMakeLists.txt | 16 - .../GenerateExportHeader/libshared/libshared.cpp | 102 - .../GenerateExportHeader/libshared/libshared.h | 57 - .../GenerateExportHeader/libstatic/CMakeLists.txt | 18 - .../GenerateExportHeader/libstatic/libstatic.cpp | 97 - .../GenerateExportHeader/libstatic/libstatic.h | 57 - .../nodeprecated/CMakeLists.txt | 26 - .../nodeprecated/CMakeLists.txt.in | 15 - .../GenerateExportHeader/nodeprecated/src/main.cpp | 9 - Tests/Plugin/CMakeLists.txt | 2 +- Tests/Plugin/src/example_exe.cxx | 1 + Tests/Preprocess/CMakeLists.txt | 30 +- Tests/QtAutogen/CMakeLists.txt | 10 + Tests/QtAutogen/abc.cpp | 15 +- Tests/QtAutogen/abc.h | 15 +- Tests/QtAutogen/abc_p.h | 15 +- Tests/QtAutogen/bar.cpp | 15 +- Tests/QtAutogen/blub.cpp | 15 +- Tests/QtAutogen/blub.h | 15 +- Tests/QtAutogen/foo.cpp | 15 +- Tests/QtAutogen/foo.h | 15 +- Tests/QtAutogen/rcc_empty.cpp | 9 + Tests/QtAutogen/rcc_empty_resource.qrc | 4 + Tests/QtAutogen/sameName/CMakeLists.txt | 21 + Tests/QtAutogen/sameName/aaa/bbb/data.qrc | 6 + Tests/QtAutogen/sameName/aaa/bbb/item.cpp | 10 + Tests/QtAutogen/sameName/aaa/bbb/item.hpp | 18 + Tests/QtAutogen/sameName/aaa/data.qrc | 6 + Tests/QtAutogen/sameName/aaa/item.cpp | 8 + Tests/QtAutogen/sameName/aaa/item.hpp | 16 + Tests/QtAutogen/sameName/bbb/aaa/data.qrc | 6 + Tests/QtAutogen/sameName/bbb/aaa/item.cpp | 10 + Tests/QtAutogen/sameName/bbb/aaa/item.hpp | 18 + Tests/QtAutogen/sameName/bbb/data.qrc | 6 + Tests/QtAutogen/sameName/bbb/item.cpp | 8 + Tests/QtAutogen/sameName/bbb/item.hpp | 16 + Tests/QtAutogen/sameName/ccc/data.qrc | 6 + Tests/QtAutogen/sameName/ccc/item.cpp | 23 + Tests/QtAutogen/sameName/ccc/item.hpp | 16 + Tests/QtAutogen/sameName/data.qrc | 5 + Tests/QtAutogen/sameName/item.cpp | 5 + Tests/QtAutogen/sameName/item.hpp | 13 + Tests/QtAutogen/sameName/main.cpp | 16 + Tests/QtAutogen/sub/bar.h | 15 +- Tests/QtAutogen/xyz.cpp | 15 +- Tests/QtAutogen/xyz.h | 15 +- Tests/QtAutogen/yaf.cpp | 15 +- Tests/QtAutogen/yaf.h | 15 +- Tests/QtAutogen/yaf_p.h | 15 +- .../BadSYSROOT-result.txt} | 0 Tests/RunCMake/Android/BadSYSROOT-stderr.txt | 20 + .../RunCMake/Android/BadSYSROOT.cmake | 0 Tests/RunCMake/Android/CMakeLists.txt | 3 + Tests/RunCMake/Android/RunCMakeTest.cmake | 218 + Tests/RunCMake/Android/android.c | 6 + Tests/RunCMake/Android/android.cxx | 45 + Tests/RunCMake/Android/android.h | 103 + Tests/RunCMake/Android/common.cmake | 60 + Tests/RunCMake/Android/ndk-arm64-v8a-stdout.txt | 2 + Tests/RunCMake/Android/ndk-arm64-v8a.cmake | 1 + Tests/RunCMake/Android/ndk-armeabi-arm-stdout.txt | 3 + Tests/RunCMake/Android/ndk-armeabi-arm.cmake | 1 + .../RunCMake/Android/ndk-armeabi-thumb-stdout.txt | 3 + Tests/RunCMake/Android/ndk-armeabi-thumb.cmake | 1 + .../Android/ndk-armeabi-v7a-neon-stdout.txt | 3 + Tests/RunCMake/Android/ndk-armeabi-v7a-neon.cmake | 1 + Tests/RunCMake/Android/ndk-armeabi-v7a-stdout.txt | 3 + Tests/RunCMake/Android/ndk-armeabi-v7a.cmake | 1 + .../ndk-badabi-result.txt} | 0 Tests/RunCMake/Android/ndk-badabi-stderr.txt | 5 + .../RunCMake/Android/ndk-badabi.cmake | 0 .../ndk-badarm-result.txt} | 0 Tests/RunCMake/Android/ndk-badarm-stderr.txt | 6 + .../RunCMake/Android/ndk-badarm.cmake | 0 .../ndk-badneon-result.txt} | 0 Tests/RunCMake/Android/ndk-badneon-stderr.txt | 6 + .../RunCMake/Android/ndk-badneon.cmake | 0 .../ndk-badstl-result.txt} | 0 Tests/RunCMake/Android/ndk-badstl-stderr.txt | 9 + Tests/RunCMake/Android/ndk-badstl.cmake | 1 + .../ndk-badver-result.txt} | 0 Tests/RunCMake/Android/ndk-badver-stderr.txt | 12 + Tests/RunCMake/Android/ndk-badver.cmake | 1 + .../ndk-badvernum-result.txt} | 0 Tests/RunCMake/Android/ndk-badvernum-stderr.txt | 13 + Tests/RunCMake/Android/ndk-badvernum.cmake | 1 + Tests/RunCMake/Android/ndk-mips-stdout.txt | 2 + Tests/RunCMake/Android/ndk-mips.cmake | 1 + Tests/RunCMake/Android/ndk-mips64-stdout.txt | 2 + Tests/RunCMake/Android/ndk-mips64.cmake | 1 + .../Android/ndk-sysroot-armeabi-stdout.txt | 1 + .../RunCMake/Android/ndk-sysroot-armeabi.cmake | 0 Tests/RunCMake/Android/ndk-x86-stdout.txt | 2 + Tests/RunCMake/Android/ndk-x86.cmake | 1 + Tests/RunCMake/Android/ndk-x86_64-stdout.txt | 2 + Tests/RunCMake/Android/ndk-x86_64.cmake | 1 + Tests/RunCMake/Android/standalone-stdout.txt | 1 + .../RunCMake/Android/standalone-sysroot-stdout.txt | 1 + .../RunCMake/Android/standalone-sysroot.cmake | 0 Tests/RunCMake/Android/standalone.cmake | 1 + Tests/RunCMake/AndroidMK/AndroidMK-check.cmake | 30 + Tests/RunCMake/AndroidMK/AndroidMK.cmake | 11 + Tests/RunCMake/AndroidMK/CMakeLists.txt | 3 + Tests/RunCMake/AndroidMK/RunCMakeTest.cmake | 2 + .../RunCMake/AndroidMK/expectedBuildAndroidMK.txt | 23 + .../AndroidMK/expectedInstallAndroidMK.txt | 25 + .../foo.cpp => RunCMake/AndroidMK/foo.cxx} | 0 Tests/RunCMake/AndroidTestUtilities/CMakeLists.txt | 3 + .../AndroidTestUtilities/RunCMakeTest.cmake | 20 + .../RunCMake/AndroidTestUtilities/SetupTest1.cmake | 17 + .../SetupTest1Build-check.cmake | 5 + .../RunCMake/AndroidTestUtilities/SetupTest2.cmake | 30 + .../SetupTest2Build-check.cmake | 7 + .../RunCMake/AndroidTestUtilities/SetupTest3.cmake | 33 + .../SetupTest3Build-check.cmake | 6 + Tests/RunCMake/AndroidTestUtilities/check.cmake | 20 + Tests/RunCMake/AndroidTestUtilities/data/a.txt | 1 + .../RunCMake/AndroidTestUtilities/data/proto.proto | 1 + .../AndroidTestUtilities/data/subfolder/b.txt | 1 + .../data/subfolder/protobuffer.p | 1 + .../AndroidTestUtilities/libs/exampleLib.so | 1 + .../AndroidTestUtilities/libs/exampleLib.txt | 1 + Tests/RunCMake/AutoExportDll/AutoExport.cmake | 10 +- Tests/RunCMake/AutoExportDll/hello2.c | 8 + Tests/RunCMake/AutoExportDll/objlib.c | 4 + Tests/RunCMake/AutoExportDll/say.cxx | 10 + Tests/RunCMake/BuildDepends/check.cmake | 8 +- .../CMP0040/CMP0040-NEW-existing-target.cmake | 2 +- .../CMP0040/CMP0040-NEW-missing-target.cmake | 2 +- .../CMP0040/CMP0040-OLD-existing-target.cmake | 2 +- .../CMP0040/CMP0040-OLD-missing-target.cmake | 2 +- .../CMP0040/CMP0040-WARN-missing-target.cmake | 2 +- .../CMP0054/CMP0054-policy-while-scope.cmake | 4 +- Tests/RunCMake/CMP0065/WARN-ON-stderr.txt | 2 +- Tests/RunCMake/CMakeLists.txt | 40 +- Tests/RunCMake/CPack/CMakeLists.txt | 6 +- Tests/RunCMake/CPack/CPackTestHelpers.cmake | 55 +- Tests/RunCMake/CPack/DEB/Helpers.cmake | 10 +- .../CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake | 5 + .../CPack/DEB/LONG_FILENAMES-Prerequirements.cmake | 7 + .../CPack/DEB/LONG_FILENAMES-VerifyResult.cmake | 26 + .../CPack/DEB/LONG_FILENAMES-specifics.cmake | 3 + Tests/RunCMake/CPack/DEB/Prerequirements.cmake | 7 + Tests/RunCMake/CPack/DEBUGINFO.cmake | 34 + Tests/RunCMake/CPack/LONG_FILENAMES.cmake | 10 + Tests/RunCMake/CPack/PACKAGE_CHECKSUM.cmake | 4 + .../CPack/RPM/DEBUGINFO-ExpectedFiles.cmake | 14 + Tests/RunCMake/CPack/RPM/DEBUGINFO-stderr.txt | 3 + .../CPack/RPM/SOURCE_PACKAGE-ExpectedFiles.cmake | 5 + .../CPack/RPM/SOURCE_PACKAGE-VerifyResult.cmake | 63 + Tests/RunCMake/CPack/RunCMakeTest.cmake | 4 + Tests/RunCMake/CPack/SOURCE_PACKAGE.cmake | 9 + .../CPack/TGZ/PACKAGE_CHECKSUM-ExpectedFiles.cmake | 9 + .../CPack/TGZ/PACKAGE_CHECKSUM-VerifyResult.cmake | 14 + .../CPack/TGZ/PACKAGE_CHECKSUM-invalid-stderr.txt | 2 + Tests/RunCMake/CPack/VerifyResult.cmake | 12 +- Tests/RunCMake/CTest/BeforeProject-stderr.txt | 6 +- .../E_capabilities-arg-result.txt} | 0 .../CommandLine/E_capabilities-arg-stderr.txt | 1 + .../RunCMake/CommandLine/E_capabilities-stdout.txt | 1 + .../E_server-arg-result.txt} | 0 Tests/RunCMake/CommandLine/E_server-arg-stderr.txt | 1 + .../RunCMake/CommandLine/E_server-pipe-result.txt | 1 + .../RunCMake/CommandLine/E_server-pipe-stderr.txt | 1 + Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 8 + .../CommandLine/trace-only-this-file.cmake | 1 + Tests/RunCMake/CommandLine/trace-source-stderr.txt | 1 + Tests/RunCMake/CommandLine/trace-source.cmake | 3 + .../ContinueAfterError-result.txt} | 0 .../Configure/ContinueAfterError-stderr.txt | 13 + .../Configure/ContinueAfterError-stdout.txt | 11 + Tests/RunCMake/Configure/ContinueAfterError.cmake | 19 + Tests/RunCMake/Configure/RunCMakeTest.cmake | 1 + .../FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake | 11 +- .../FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake | 11 +- .../FindPkgConfig_NO_PKGCONFIG_PATH.cmake | 3 - .../FindPkgConfig_PKGCONFIG_PATH.cmake | 11 +- ..._PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake | 11 +- ...indPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake | 11 +- .../pkgconfig/.placeholder | 0 .../lib32}/pkgconfig/.placeholder | 0 Tests/RunCMake/Framework/RunCMakeTest.cmake | 2 +- Tests/RunCMake/GenerateExportHeader/CMakeLists.txt | 3 + .../GEH-build-stderr.txt} | 0 .../GenerateExportHeader/GEH-failures.cmake | 67 + .../GEH-link-error-result.txt} | 0 .../GEH-link-error-stderr.txt} | 0 Tests/RunCMake/GenerateExportHeader/GEH.cmake | 127 + .../GenerateExportHeader/RunCMakeTest.cmake | 27 + .../c_identifier/CMakeLists.txt | 11 + .../c_identifier/c_identifier_class.cpp | 0 .../c_identifier/c_identifier_class.h | 0 .../GenerateExportHeader/c_identifier/main.cpp | 8 + .../GenerateExportHeader/exportheader_test.cpp | 169 + .../lib_shared_and_static/CMakeLists.txt | 33 + .../lib_shared_and_static/libshared_and_static.cpp | 121 + .../lib_shared_and_static/libshared_and_static.h | 83 + .../GenerateExportHeader/libshared/CMakeLists.txt | 11 + .../GenerateExportHeader/libshared/libshared.cpp | 117 + .../GenerateExportHeader/libshared/libshared.h | 82 + .../GenerateExportHeader/libstatic/CMakeLists.txt | 13 + .../GenerateExportHeader/libstatic/libstatic.cpp | 125 + .../GenerateExportHeader/libstatic/libstatic.h | 86 + .../nodeprecated/CMakeLists.txt | 22 + .../nodeprecated/CMakeLists.txt.in | 15 + .../GenerateExportHeader/nodeprecated/src/main.cpp | 9 + .../nodeprecated/src/someclass.cpp | 0 .../nodeprecated/src/someclass.h | 0 .../reference/Empty/libshared_export.h | 0 .../reference/Empty/libstatic_export.h | 0 .../reference/MinGW/libshared_export.h | 0 .../reference/MinGW/libstatic_export.h | 0 .../reference/UNIX/libshared_export.h | 0 .../reference/UNIX/libstatic_export.h | 0 .../UNIX_DeprecatedOnly/libshared_export.h | 0 .../UNIX_DeprecatedOnly/libstatic_export.h | 0 .../reference/Win32-Clang/libshared_export.h | 0 .../reference/Win32-Clang/libstatic_export.h | 0 .../reference/Win32/libshared_export.h | 0 .../reference/Win32/libstatic_export.h | 0 .../reference/WinEmpty/libshared_export.h | 0 .../reference/WinEmpty/libstatic_export.h | 0 .../LINK_ONLY-not-linking-result.txt} | 0 .../LINK_ONLY-not-linking-stderr.txt | 8 + .../LINK_ONLY-not-linking.cmake | 1 + .../GeneratorExpression/RunCMakeTest.cmake | 1 + .../RunCMake/GeneratorPlatform/RunCMakeTest.cmake | 4 +- Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake | 4 +- Tests/RunCMake/LinkWhatYouUse/C-Build-stdout.txt | 2 + .../LinkWhatYouUse/C-launch-Build-stdout.txt | 2 + .../{ClangTidy => LinkWhatYouUse}/C-launch.cmake | 0 Tests/RunCMake/LinkWhatYouUse/C.cmake | 4 + .../CMakeLists.txt | 0 Tests/RunCMake/LinkWhatYouUse/CXX-Build-stdout.txt | 2 + .../LinkWhatYouUse/CXX-launch-Build-stdout.txt | 2 + .../{ClangTidy => LinkWhatYouUse}/CXX-launch.cmake | 0 Tests/RunCMake/LinkWhatYouUse/CXX.cmake | 4 + Tests/RunCMake/LinkWhatYouUse/RunCMakeTest.cmake | 21 + .../LinkWhatYouUse}/main.c | 0 .../{ClangTidy => LinkWhatYouUse}/main.cxx | 0 .../CustomCommandDepfile-ERROR-result.txt} | 0 .../Make/CustomCommandDepfile-ERROR-stderr.txt | 5 + .../RunCMake/Make/CustomCommandDepfile-ERROR.cmake | 8 + Tests/RunCMake/Make/RunCMakeTest.cmake | 2 + .../Ninja/CustomCommandDepfile-check.cmake | 5 + Tests/RunCMake/Ninja/CustomCommandDepfile.cmake | 11 + Tests/RunCMake/Ninja/RunCMakeTest.cmake | 8 + Tests/RunCMake/Ninja/SubDir-install-stdout.txt | 1 + Tests/RunCMake/Ninja/SubDir-test-stdout.txt | 1 + Tests/RunCMake/Ninja/SubDir.cmake | 5 + Tests/RunCMake/Ninja/SubDir/CMakeLists.txt | 4 + Tests/RunCMake/RunCMake.cmake | 6 +- Tests/RunCMake/Syntax/BOM-UTF-16-BE-stderr.txt | 6 +- Tests/RunCMake/Syntax/BOM-UTF-16-LE-stderr.txt | 6 +- Tests/RunCMake/Syntax/BOM-UTF-32-BE-stderr.txt | 6 +- Tests/RunCMake/Syntax/BOM-UTF-32-LE-stderr.txt | 6 +- Tests/RunCMake/Syntax/BracketComment4-stderr.txt | 11 +- Tests/RunCMake/Syntax/BracketNoSpace0-stderr.txt | 6 +- Tests/RunCMake/Syntax/BracketNoSpace1-stderr.txt | 6 +- Tests/RunCMake/Syntax/BracketNoSpace2-stderr.txt | 6 +- Tests/RunCMake/Syntax/BracketNoSpace3-stderr.txt | 6 +- Tests/RunCMake/Syntax/BracketNoSpace4-stderr.txt | 6 +- Tests/RunCMake/Syntax/BracketNoSpace5-stderr.txt | 6 +- .../CommandEOF-result.txt} | 0 Tests/RunCMake/Syntax/CommandEOF-stderr.txt | 6 + Tests/RunCMake/Syntax/CommandEOF.cmake | 1 + Tests/RunCMake/Syntax/CommandError0-stderr.txt | 12 +- Tests/RunCMake/Syntax/CommandError1-stderr.txt | 11 +- Tests/RunCMake/Syntax/CommandError2-stderr.txt | 12 +- Tests/RunCMake/Syntax/ParenInENV-stderr.txt | 8 +- Tests/RunCMake/Syntax/ParenNoSpace1-stderr.txt | 18 +- Tests/RunCMake/Syntax/RunCMakeTest.cmake | 1 + Tests/RunCMake/Syntax/StringNoSpace-stderr.txt | 12 +- .../Syntax/UnterminatedBracket0-stderr.txt | 13 +- .../Syntax/UnterminatedBracket1-stderr.txt | 13 +- .../Syntax/UnterminatedBracketComment-stderr.txt | 13 +- Tests/RunCMake/Syntax/UnterminatedCall1-stderr.txt | 11 +- Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt | 11 +- .../RunCMake/Syntax/UnterminatedString-stderr.txt | 13 +- Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt | 30 + .../ToolchainFile/FlagsInit-toolchain.cmake | 7 + Tests/RunCMake/ToolchainFile/FlagsInit.cmake | 7 + .../ToolchainFile/LinkFlagsInit-stdout.txt | 60 + .../ToolchainFile/LinkFlagsInit-toolchain.cmake | 5 + Tests/RunCMake/ToolchainFile/LinkFlagsInit.cmake | 7 + Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake | 2 + Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 21 +- .../XcodeAttributeLocation-check.cmake | 7 + .../XcodeProject/XcodeAttributeLocation.cmake | 3 + .../XcodeProject/XcodeBundles-install-check.cmake | 8 + Tests/RunCMake/XcodeProject/XcodeBundles.cmake | 40 + .../add_custom_command/AppendNotOutput-stderr.txt | 5 +- .../RunCMake/add_custom_target/RunCMakeTest.cmake | 14 + Tests/RunCMake/add_custom_target/TargetOrder.cmake | 31 + .../RunCMake/add_subdirectory/ExcludeFromAll.cmake | 6 + .../add_subdirectory/ExcludeFromAll/CMakeLists.txt | 4 + .../add_subdirectory/ExcludeFromAll/bar.cpp | 1 + .../add_subdirectory/ExcludeFromAll/foo.cpp | 6 + .../ExcludeFromAll}/foo.h | 0 Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake | 12 + Tests/RunCMake/add_subdirectory/main.cpp | 6 + Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake | 38 + .../BadArgvN1-result.txt} | 0 .../cmake_parse_arguments/BadArgvN1-stderr.txt | 5 + .../RunCMake/cmake_parse_arguments/BadArgvN1.cmake | 4 + .../BadArgvN2-result.txt} | 0 .../cmake_parse_arguments/BadArgvN2-stderr.txt | 5 + .../RunCMake/cmake_parse_arguments/BadArgvN2.cmake | 4 + .../BadArgvN3-result.txt} | 0 .../cmake_parse_arguments/BadArgvN3-stderr.txt | 4 + .../RunCMake/cmake_parse_arguments/BadArgvN3.cmake | 1 + .../BadArgvN4-result.txt} | 0 .../cmake_parse_arguments/BadArgvN4-stderr.txt | 4 + .../RunCMake/cmake_parse_arguments/BadArgvN4.cmake | 3 + .../cmake_parse_arguments/CornerCasesArgvN.cmake | 53 + .../cmake_parse_arguments/RunCMakeTest.cmake | 6 + Tests/RunCMake/cmake_parse_arguments/Utils.cmake | 1 + .../cmake_parse_arguments/test_utils.cmake | 44 +- Tests/RunCMake/continue/ContinueWhile.cmake | 2 +- .../CMakeLists.txt.in | 0 .../CTestCaptureErrorNonZero-stderr.txt | 4 + .../CTestCaptureErrorZero-stderr.txt | 4 + .../CTestCaptureErrorZero-stdout.txt | 1 + .../CTestConfig.cmake.in | 0 .../CoverageQuiet-stdout.txt | 0 .../RunCMake/ctest_cmake_error/RunCMakeTest.cmake | 10 + Tests/RunCMake/ctest_cmake_error/test.cmake.in | 22 + Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in | 81 + Tests/RunCMake/ctest_fixtures/CTestConfig.cmake.in | 1 + Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake | 36 + .../cyclicCleanup-result.txt} | 0 .../ctest_fixtures/cyclicCleanup-stderr.txt | 3 + .../ctest_fixtures/cyclicCleanup-stdout.txt | 1 + .../cyclicSetup-result.txt} | 0 .../RunCMake/ctest_fixtures/cyclicSetup-stderr.txt | 3 + .../RunCMake/ctest_fixtures/cyclicSetup-stdout.txt | 1 + Tests/RunCMake/ctest_fixtures/one-stdout.txt | 13 + Tests/RunCMake/ctest_fixtures/setupFoo-stdout.txt | 7 + Tests/RunCMake/ctest_fixtures/test.cmake.in | 16 + Tests/RunCMake/ctest_fixtures/three-stdout.txt | 17 + Tests/RunCMake/ctest_fixtures/two-stdout.txt | 11 + Tests/RunCMake/ctest_fixtures/wontRun-stdout.txt | 14 + .../DOWNLOAD-httpheader-not-set-result.txt} | 0 .../file/DOWNLOAD-httpheader-not-set-stderr.txt | 4 + .../file/DOWNLOAD-httpheader-not-set.cmake | 1 + .../DOWNLOAD-pass-not-set-result.txt} | 0 .../RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt | 4 + Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake | 1 + .../file/DOWNLOAD-unused-argument-result.txt | 0 .../file/DOWNLOAD-unused-argument-stderr.txt | 5 + Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake | 5 + .../RunCMake/file/DOWNLOAD-unused-argument.txt | 0 Tests/RunCMake/file/LOCK-lowercase.cmake | 11 + Tests/RunCMake/file/RunCMakeTest.cmake | 7 + .../UPLOAD-httpheader-not-set-result.txt} | 0 .../file/UPLOAD-httpheader-not-set-stderr.txt | 4 + .../RunCMake/file/UPLOAD-httpheader-not-set.cmake | 1 + .../UPLOAD-pass-not-set-result.txt} | 0 Tests/RunCMake/file/UPLOAD-pass-not-set-stderr.txt | 4 + Tests/RunCMake/file/UPLOAD-pass-not-set.cmake | 1 + .../file/UPLOAD-unused-argument-result.txt | 0 .../file/UPLOAD-unused-argument-stderr.txt | 5 + Tests/RunCMake/file/UPLOAD-unused-argument.cmake | 5 + .../RunCMake/file/UPLOAD-unused-argument.txt | 0 .../Foo.framework/Headers/Some/Dir}/Header.h | 0 .../find_path/FrameworksWithSubdirs-stdout.txt | 1 + .../RunCMake/find_path/FrameworksWithSubdirs.cmake | 3 + Tests/RunCMake/find_path/RunCMakeTest.cmake | 4 + .../get_filename_component/KnownComponents.cmake | 12 +- .../get_property/directory_properties-stderr.txt | 18 +- .../get_property/directory_properties.cmake | 15 + .../directory_properties/CMakeLists.txt | 6 + .../directory_properties/sub1/CMakeLists.txt | 0 .../directory_properties/sub2/CMakeLists.txt | 0 Tests/RunCMake/if/IsDirectoryLong.cmake | 2 +- .../include_external_msproject/check_utils.cmake | 6 +- .../install/DIRECTORY-MESSAGE_NEVER-check.cmake | 8 +- .../RunCMake/install/DIRECTORY-message-check.cmake | 12 +- .../install/DIRECTORY-message-lazy-check.cmake | 12 +- Tests/RunCMake/message/RunCMakeTest.cmake | 2 + .../message/message-internal-warning-stderr.txt | 13 + .../message/message-internal-warning.cmake | 5 + .../message/nomessage-internal-warning-stderr.txt | 0 .../message/nomessage-internal-warning.cmake | 5 + Tests/RunCMake/project/ExplicitRC.cmake | 1 + Tests/RunCMake/project/RunCMakeTest.cmake | 3 + Tests/RunCMake/try_compile/CMP0066-stderr.txt | 15 + Tests/RunCMake/try_compile/CMP0066-stdout.txt | 4 + Tests/RunCMake/try_compile/CMP0066.cmake | 58 + Tests/RunCMake/try_compile/RunCMakeTest.cmake | 1 + Tests/RunCMake/try_compile/src.c | 3 + Tests/Server/CMakeLists.txt | 26 + Tests/Server/buildsystem1/CMakeLists.txt | 22 + Tests/Server/buildsystem1/foo.cpp | 5 + .../buildsystem1}/main.cpp | 0 Tests/Server/buildsystem1/subdir/CMakeLists.txt | 5 + Tests/Server/buildsystem1/subdir/empty.cpp | 5 + Tests/Server/cmakelib.py | 198 + .../simple.cxx => Server/empty.cpp} | 0 Tests/Server/server-test.py | 119 + Tests/Server/tc_buildsystem1.json | 27 + Tests/Server/tc_globalSettings.json | 140 + Tests/Server/tc_handshake.json | 71 + Tests/SimpleInstall/CMakeLists.txt | 4 +- Tests/SimpleInstallS2/CMakeLists.txt | 4 +- Tests/SwiftOnly/CMakeLists.txt | 4 + Tests/TryCompile/CMakeLists.txt | 4 +- Tests/VSExternalInclude/CMakeLists.txt | 4 +- Tests/VSMASM/CMakeLists.txt | 2 +- Tests/VSWinStorePhone/CMakeLists.txt | 9 +- .../Direct3DApp1/Strings/en-US/Resources.resw | 123 + Utilities/CMakeLists.txt | 14 +- Utilities/Doxygen/CMakeLists.txt | 105 +- Utilities/Doxygen/DeveloperReference/mainpage.dox | 8 + Utilities/Doxygen/authors.txt | 17 - Utilities/Doxygen/doc_makeall.sh.in | 248 - Utilities/Doxygen/doxyfile.in | 35 +- Utilities/Git/commit-msg | 13 +- Utilities/Git/pre-commit | 13 +- Utilities/Git/prepare-commit-msg | 13 +- Utilities/KWIML/Copyright.txt | 2 +- Utilities/KWIML/include/kwiml/abi.h | 6 +- Utilities/KWIML/include/kwiml/int.h | 2 +- Utilities/KWIML/src/version.h.in | 2 +- Utilities/KWStyle/CMakeLists.txt | 13 +- Utilities/KWStyle/Headers/CMakeHeader.h | 11 - Utilities/Release/Cygwin/CMakeLists.txt | 25 - Utilities/Release/Cygwin/README.cygwin.in | 42 - Utilities/Release/Cygwin/cygwin-package.sh.in | 90 - Utilities/Release/Cygwin/cygwin-setup.hint.in | 5 - Utilities/Release/README | 3 - Utilities/Release/create-cmake-release.cmake | 3 - Utilities/Release/cygwin_release.cmake | 32 - Utilities/Release/linux32_release.cmake | 25 - Utilities/Release/linux64_release.cmake | 31 +- Utilities/Release/osx_release.cmake | 7 +- Utilities/Release/release_cmake.cmake | 4 - Utilities/Release/upload_release.cmake | 2 +- Utilities/Release/win32_release.cmake | 7 +- Utilities/Release/win64_release.cmake | 7 +- Utilities/Scripts/BoostScanDeps.cmake | 16 +- Utilities/Scripts/clang-format.bash | 2 +- Utilities/Scripts/update-curl.bash | 2 +- Utilities/Scripts/update-kwiml.bash | 2 +- Utilities/Scripts/update-liblzma.bash | 30 + Utilities/Scripts/update-libuv.bash | 26 + Utilities/Scripts/update-third-party.bash | 8 +- Utilities/Scripts/update-vim-syntax.bash | 24 + Utilities/Sphinx/CMakeLists.txt | 35 +- Utilities/Sphinx/cmake.py | 14 +- Utilities/Sphinx/conf.py.in | 14 +- Utilities/cmThirdParty.h.in | 14 +- Utilities/cm_bzlib.h | 13 +- Utilities/cm_curl.h | 13 +- Utilities/cm_expat.h | 13 +- Utilities/cm_jsoncpp_reader.h | 13 +- Utilities/cm_jsoncpp_value.h | 13 +- Utilities/cm_jsoncpp_writer.h | 13 +- Utilities/cm_kwiml.h | 13 +- Utilities/cm_libarchive.h | 13 +- Utilities/cm_lzma.h | 13 +- Utilities/cm_uv.h | 14 + Utilities/cm_xmlrpc.h | 13 +- Utilities/cm_zlib.h | 13 +- Utilities/cmlibarchive/libarchive/xxhash.c | 5 +- Utilities/cmliblzma/CMakeLists.txt | 6 +- Utilities/cmliblzma/README-CMake.txt | 66 - Utilities/cmliblzma/liblzma/api/lzma/block.h | 3 + Utilities/cmliblzma/liblzma/api/lzma/version.h | 2 +- Utilities/cmliblzma/liblzma/check/crc32_fast.c | 2 +- Utilities/cmliblzma/liblzma/check/sha256.c | 2 +- .../cmliblzma/liblzma/lzma/lzma_encoder_presets.c | 9 +- Utilities/{cmcurl => cmlibuv}/.gitattributes | 0 Utilities/cmlibuv/CMakeLists.txt | 236 + Utilities/cmlibuv/LICENSE | 70 + Utilities/cmlibuv/include/android-ifaddrs.h | 54 + Utilities/cmlibuv/include/pthread-barrier.h | 66 + Utilities/cmlibuv/include/stdint-msvc2008.h | 247 + Utilities/cmlibuv/include/tree.h | 768 ++++ Utilities/cmlibuv/include/uv-aix.h | 32 + Utilities/cmlibuv/include/uv-bsd.h | 34 + Utilities/cmlibuv/include/uv-darwin.h | 61 + Utilities/cmlibuv/include/uv-errno.h | 419 ++ Utilities/cmlibuv/include/uv-linux.h | 34 + Utilities/cmlibuv/include/uv-os390.h | 27 + Utilities/cmlibuv/include/uv-sunos.h | 44 + Utilities/cmlibuv/include/uv-threadpool.h | 37 + Utilities/cmlibuv/include/uv-unix.h | 371 ++ Utilities/cmlibuv/include/uv-version.h | 43 + Utilities/cmlibuv/include/uv-win.h | 660 +++ Utilities/cmlibuv/include/uv.h | 1499 ++++++ Utilities/cmlibuv/src/fs-poll.c | 256 ++ Utilities/cmlibuv/src/heap-inl.h | 245 + Utilities/cmlibuv/src/inet.c | 309 ++ Utilities/cmlibuv/src/queue.h | 108 + Utilities/cmlibuv/src/threadpool.c | 303 ++ Utilities/cmlibuv/src/unix/aix.c | 1154 +++++ Utilities/cmlibuv/src/unix/android-ifaddrs.c | 703 +++ Utilities/cmlibuv/src/unix/async.c | 290 ++ Utilities/cmlibuv/src/unix/atomic-ops.h | 88 + Utilities/cmlibuv/src/unix/core.c | 1238 +++++ Utilities/cmlibuv/src/unix/darwin-proctitle.c | 206 + Utilities/cmlibuv/src/unix/darwin.c | 335 ++ Utilities/cmlibuv/src/unix/dl.c | 80 + Utilities/cmlibuv/src/unix/freebsd.c | 460 ++ Utilities/cmlibuv/src/unix/fs.c | 1364 ++++++ Utilities/cmlibuv/src/unix/fsevents.c | 904 ++++ Utilities/cmlibuv/src/unix/getaddrinfo.c | 202 + Utilities/cmlibuv/src/unix/getnameinfo.c | 120 + Utilities/cmlibuv/src/unix/internal.h | 322 ++ Utilities/cmlibuv/src/unix/kqueue.c | 463 ++ Utilities/cmlibuv/src/unix/linux-core.c | 985 ++++ Utilities/cmlibuv/src/unix/linux-inotify.c | 285 ++ Utilities/cmlibuv/src/unix/linux-syscalls.c | 471 ++ Utilities/cmlibuv/src/unix/linux-syscalls.h | 151 + Utilities/cmlibuv/src/unix/loop-watcher.c | 68 + Utilities/cmlibuv/src/unix/loop.c | 159 + Utilities/cmlibuv/src/unix/netbsd.c | 380 ++ Utilities/cmlibuv/src/unix/openbsd.c | 396 ++ Utilities/cmlibuv/src/unix/os390.c | 42 + Utilities/cmlibuv/src/unix/pipe.c | 295 ++ Utilities/cmlibuv/src/unix/poll.c | 130 + Utilities/cmlibuv/src/unix/process.c | 563 +++ Utilities/cmlibuv/src/unix/proctitle.c | 105 + Utilities/cmlibuv/src/unix/pthread-barrier.c | 120 + Utilities/cmlibuv/src/unix/pthread-fixes.c | 56 + Utilities/cmlibuv/src/unix/signal.c | 467 ++ Utilities/cmlibuv/src/unix/spinlock.h | 53 + Utilities/cmlibuv/src/unix/stream.c | 1638 +++++++ Utilities/cmlibuv/src/unix/sunos.c | 821 ++++ Utilities/cmlibuv/src/unix/tcp.c | 395 ++ Utilities/cmlibuv/src/unix/thread.c | 605 +++ Utilities/cmlibuv/src/unix/timer.c | 172 + Utilities/cmlibuv/src/unix/tty.c | 333 ++ Utilities/cmlibuv/src/unix/udp.c | 895 ++++ Utilities/cmlibuv/src/uv-common.c | 654 +++ Utilities/cmlibuv/src/uv-common.h | 227 + Utilities/cmlibuv/src/version.c | 45 + Utilities/cmlibuv/src/win/async.c | 99 + Utilities/cmlibuv/src/win/atomicops-inl.h | 56 + Utilities/cmlibuv/src/win/core.c | 602 +++ Utilities/cmlibuv/src/win/detect-wakeup.c | 35 + Utilities/cmlibuv/src/win/dl.c | 118 + Utilities/cmlibuv/src/win/error.c | 170 + Utilities/cmlibuv/src/win/fs-event.c | 545 +++ Utilities/cmlibuv/src/win/fs.c | 2496 ++++++++++ Utilities/cmlibuv/src/win/getaddrinfo.c | 385 ++ Utilities/cmlibuv/src/win/getnameinfo.c | 150 + Utilities/cmlibuv/src/win/handle-inl.h | 179 + Utilities/cmlibuv/src/win/handle.c | 154 + Utilities/cmlibuv/src/win/internal.h | 398 ++ Utilities/cmlibuv/src/win/loop-watcher.c | 122 + Utilities/cmlibuv/src/win/pipe.c | 2130 +++++++++ Utilities/cmlibuv/src/win/poll.c | 646 +++ Utilities/cmlibuv/src/win/process-stdio.c | 510 +++ Utilities/cmlibuv/src/win/process.c | 1247 +++++ Utilities/cmlibuv/src/win/req-inl.h | 224 + Utilities/cmlibuv/src/win/req.c | 25 + Utilities/cmlibuv/src/win/signal.c | 356 ++ Utilities/cmlibuv/src/win/snprintf.c | 42 + Utilities/cmlibuv/src/win/stream-inl.h | 56 + Utilities/cmlibuv/src/win/stream.c | 249 + Utilities/cmlibuv/src/win/tcp.c | 1510 +++++++ Utilities/cmlibuv/src/win/thread.c | 697 +++ Utilities/cmlibuv/src/win/timer.c | 195 + Utilities/cmlibuv/src/win/tty.c | 2257 ++++++++++ Utilities/cmlibuv/src/win/udp.c | 928 ++++ Utilities/cmlibuv/src/win/util.c | 1389 ++++++ Utilities/cmlibuv/src/win/winapi.c | 159 + Utilities/cmlibuv/src/win/winapi.h | 4757 ++++++++++++++++++++ Utilities/cmlibuv/src/win/winsock.c | 561 +++ Utilities/cmlibuv/src/win/winsock.h | 191 + bootstrap | 49 +- 2225 files changed, 88305 insertions(+), 29428 deletions(-) create mode 100644 .gitignore delete mode 100644 Auxiliary/cmake-help.vim delete mode 100644 Auxiliary/cmake-indent.vim delete mode 100644 Auxiliary/cmake-syntax.vim create mode 100644 Auxiliary/vim/cmake.vim.in create mode 100755 Auxiliary/vim/extract-upper-case.pl create mode 100644 Auxiliary/vim/indent/cmake.vim create mode 100644 Auxiliary/vim/syntax/cmake.vim create mode 100644 Help/generator/Visual Studio 15.rst create mode 100644 Help/manual/cmake-server.7.rst create mode 100644 Help/module/AndroidTestUtilities.rst create mode 100644 Help/module/CPackProductBuild.rst create mode 100644 Help/module/FindICU.rst create mode 100644 Help/module/FindVulkan.rst create mode 100644 Help/policy/CMP0066.rst create mode 100644 Help/prop_dir/BINARY_DIR.rst create mode 100644 Help/prop_dir/BUILDSYSTEM_TARGETS.rst create mode 100644 Help/prop_dir/SOURCE_DIR.rst create mode 100644 Help/prop_dir/SUBDIRECTORIES.rst create mode 100644 Help/prop_gbl/FIND_LIBRARY_USE_LIB32_PATHS.rst create mode 100644 Help/prop_sf/VS_TOOL_OVERRIDE.rst create mode 100644 Help/prop_sf/XCODE_FILE_ATTRIBUTES.rst create mode 100644 Help/prop_test/FIXTURES_CLEANUP.rst create mode 100644 Help/prop_test/FIXTURES_REQUIRED.rst create mode 100644 Help/prop_test/FIXTURES_SETUP.rst create mode 100644 Help/prop_tgt/LINK_WHAT_YOU_USE.rst create mode 100644 Help/prop_tgt/VS_SDK_REFERENCES.rst create mode 100644 Help/release/3.7.rst create mode 100644 Help/variable/ANDROID.rst create mode 100644 Help/variable/CMAKE_ANDROID_ARCH_ABI.rst create mode 100644 Help/variable/CMAKE_ANDROID_ARM_MODE.rst create mode 100644 Help/variable/CMAKE_ANDROID_ARM_NEON.rst create mode 100644 Help/variable/CMAKE_ANDROID_NDK.rst create mode 100644 Help/variable/CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION.rst create mode 100644 Help/variable/CMAKE_ANDROID_STANDALONE_TOOLCHAIN.rst create mode 100644 Help/variable/CMAKE_CODELITE_USE_TARGETS.rst create mode 100644 Help/variable/CMAKE_COMPILER_IS_GNUCC.rst create mode 100644 Help/variable/CMAKE_COMPILER_IS_GNUCXX.rst create mode 100644 Help/variable/CMAKE_COMPILER_IS_GNUG77.rst delete mode 100644 Help/variable/CMAKE_COMPILER_IS_GNULANG.rst create mode 100644 Help/variable/CMAKE_EXE_LINKER_FLAGS_CONFIG_INIT.rst create mode 100644 Help/variable/CMAKE_EXE_LINKER_FLAGS_INIT.rst create mode 100644 Help/variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION.rst create mode 100644 Help/variable/CMAKE_FIND_PACKAGE_SORT_ORDER.rst create mode 100644 Help/variable/CMAKE_LANG_ANDROID_TOOLCHAIN_PREFIX.rst create mode 100644 Help/variable/CMAKE_LANG_ANDROID_TOOLCHAIN_SUFFIX.rst create mode 100644 Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst create mode 100644 Help/variable/CMAKE_LANG_FLAGS_INIT.rst create mode 100644 Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst create mode 100644 Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst create mode 100644 Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst create mode 100644 Help/variable/CMAKE_LINK_WHAT_YOU_USE.rst create mode 100644 Help/variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG_INIT.rst create mode 100644 Help/variable/CMAKE_MODULE_LINKER_FLAGS_INIT.rst create mode 100644 Help/variable/CMAKE_SHARED_LINKER_FLAGS_CONFIG_INIT.rst create mode 100644 Help/variable/CMAKE_SHARED_LINKER_FLAGS_INIT.rst create mode 100644 Help/variable/CMAKE_STATIC_LINKER_FLAGS_CONFIG_INIT.rst create mode 100644 Help/variable/CMAKE_STATIC_LINKER_FLAGS_INIT.rst create mode 100644 Help/variable/CMAKE_Swift_LANGUAGE_VERSION.rst create mode 100644 Help/variable/XCODE.rst create mode 100644 Licenses/LGPLv3.txt create mode 100644 Modules/AndroidTestUtilities.cmake create mode 100644 Modules/AndroidTestUtilities/PushToAndroidDevice.cmake create mode 100644 Modules/CPackProductBuild.cmake create mode 100644 Modules/Compiler/Intel.cmake create mode 100644 Modules/FindCUDA/select_compute_arch.cmake create mode 100644 Modules/FindICU.cmake create mode 100644 Modules/FindVulkan.cmake create mode 100644 Modules/Platform/AIX-Clang-C.cmake create mode 100644 Modules/Platform/AIX-Clang-CXX.cmake create mode 100644 Modules/Platform/Android-Clang-C.cmake create mode 100644 Modules/Platform/Android-Clang-CXX.cmake create mode 100644 Modules/Platform/Android-Clang.cmake create mode 100644 Modules/Platform/Android-Common.cmake create mode 100644 Modules/Platform/Android-Determine-C.cmake create mode 100644 Modules/Platform/Android-Determine-CXX.cmake create mode 100644 Modules/Platform/Android-Determine.cmake create mode 100644 Modules/Platform/Android-GNU-C.cmake create mode 100644 Modules/Platform/Android-GNU-CXX.cmake create mode 100644 Modules/Platform/Android-GNU.cmake create mode 100644 Modules/Platform/Android-Initialize.cmake create mode 100644 Modules/Platform/Android/Determine-Compiler-NDK.cmake create mode 100644 Modules/Platform/Android/Determine-Compiler-Standalone.cmake create mode 100644 Modules/Platform/Android/Determine-Compiler.cmake create mode 100644 Modules/Platform/Android/abi-arm64-v8a-Clang.cmake create mode 100644 Modules/Platform/Android/abi-arm64-v8a-GNU.cmake create mode 100644 Modules/Platform/Android/abi-armeabi-Clang.cmake create mode 100644 Modules/Platform/Android/abi-armeabi-GNU.cmake create mode 100644 Modules/Platform/Android/abi-armeabi-v6-Clang.cmake create mode 100644 Modules/Platform/Android/abi-armeabi-v6-GNU.cmake create mode 100644 Modules/Platform/Android/abi-armeabi-v7a-Clang.cmake create mode 100644 Modules/Platform/Android/abi-armeabi-v7a-GNU.cmake create mode 100644 Modules/Platform/Android/abi-common-Clang.cmake create mode 100644 Modules/Platform/Android/abi-common-GNU.cmake create mode 100644 Modules/Platform/Android/abi-common.cmake create mode 100644 Modules/Platform/Android/abi-mips-Clang.cmake create mode 100644 Modules/Platform/Android/abi-mips-GNU.cmake create mode 100644 Modules/Platform/Android/abi-mips64-Clang.cmake create mode 100644 Modules/Platform/Android/abi-mips64-GNU.cmake create mode 100644 Modules/Platform/Android/abi-x86-Clang.cmake create mode 100644 Modules/Platform/Android/abi-x86-GNU.cmake create mode 100644 Modules/Platform/Android/abi-x86_64-Clang.cmake create mode 100644 Modules/Platform/Android/abi-x86_64-GNU.cmake create mode 100644 Modules/Platform/Android/ndk-stl-c++.cmake create mode 100644 Modules/Platform/Android/ndk-stl-c++_shared.cmake create mode 100644 Modules/Platform/Android/ndk-stl-c++_static.cmake create mode 100644 Modules/Platform/Android/ndk-stl-gabi++.cmake create mode 100644 Modules/Platform/Android/ndk-stl-gabi++_shared.cmake create mode 100644 Modules/Platform/Android/ndk-stl-gabi++_static.cmake create mode 100644 Modules/Platform/Android/ndk-stl-gnustl.cmake create mode 100644 Modules/Platform/Android/ndk-stl-gnustl_shared.cmake create mode 100644 Modules/Platform/Android/ndk-stl-gnustl_static.cmake create mode 100644 Modules/Platform/Android/ndk-stl-none.cmake create mode 100644 Modules/Platform/Android/ndk-stl-stlport.cmake create mode 100644 Modules/Platform/Android/ndk-stl-stlport_shared.cmake create mode 100644 Modules/Platform/Android/ndk-stl-stlport_static.cmake create mode 100644 Modules/Platform/Android/ndk-stl-system.cmake rename Modules/Platform/{CYGWIN-CXX.cmake => CYGWIN-Determine-CXX.cmake} (100%) rename Modules/Platform/{Darwin-CXX.cmake => Darwin-Determine-CXX.cmake} (100%) rename Modules/Platform/{Linux-CXX.cmake => Linux-Determine-CXX.cmake} (100%) rename Modules/Platform/{Windows-CXX.cmake => Windows-Determine-CXX.cmake} (100%) create mode 100644 Modules/Platform/Windows-OpenWatcom-C.cmake create mode 100644 Modules/Platform/Windows-OpenWatcom-CXX.cmake create mode 100644 Modules/Platform/Windows-OpenWatcom.cmake create mode 100644 Modules/Platform/Windows-Watcom-C.cmake create mode 100644 Modules/Platform/Windows-Watcom-CXX.cmake delete mode 100644 Modules/Platform/Windows-wcl386.cmake create mode 100644 Modules/javaTargets.cmake.in delete mode 100644 Source/.cvsignore create mode 100644 Source/CPack/cmCPackPKGGenerator.cxx create mode 100644 Source/CPack/cmCPackPKGGenerator.h create mode 100644 Source/CPack/cmCPackProductBuildGenerator.cxx create mode 100644 Source/CPack/cmCPackProductBuildGenerator.h delete mode 100644 Source/CPack/cygwin.readme delete mode 100644 Source/Checks/cm_cxx11_unordered_map.cmake create mode 100644 Source/Checks/cm_cxx_auto_ptr.cxx create mode 100644 Source/Checks/cm_cxx_features.cmake create mode 100644 Source/Checks/cm_cxx_make_unique.cxx create mode 100644 Source/Checks/cm_cxx_nullptr.cxx create mode 100644 Source/Checks/cm_cxx_override.cxx create mode 100644 Source/Checks/cm_cxx_unique_ptr.cxx rename Source/Checks/{cm_cxx11_unordered_map.cpp => cm_cxx_unordered_map.cxx} (100%) create mode 100644 Source/Checks/cm_cxx_unordered_set.cxx create mode 100644 Source/Modules/FindLibUV.cmake create mode 100644 Source/QtDialog/CMakeSetup64.png create mode 100644 Source/QtIFW/CMake.DeveloperReference.HTML.qs.in create mode 100644 Source/cmBase32.cxx create mode 100644 Source/cmBase32.h create mode 100644 Source/cmCustomCommandLines.h create mode 100644 Source/cmDocumentationEntry.h create mode 100644 Source/cmExportBuildAndroidMKGenerator.cxx create mode 100644 Source/cmExportBuildAndroidMKGenerator.h create mode 100644 Source/cmExportInstallAndroidMKGenerator.cxx create mode 100644 Source/cmExportInstallAndroidMKGenerator.h create mode 100644 Source/cmFileMonitor.cxx create mode 100644 Source/cmFileMonitor.h create mode 100644 Source/cmFilePathUuid.cxx create mode 100644 Source/cmFilePathUuid.h create mode 100644 Source/cmGlobalVisualStudio15Generator.cxx create mode 100644 Source/cmGlobalVisualStudio15Generator.h create mode 100644 Source/cmInstallExportAndroidMKGenerator.cxx create mode 100644 Source/cmInstallExportAndroidMKGenerator.h create mode 100644 Source/cmMessenger.cxx create mode 100644 Source/cmMessenger.h create mode 100644 Source/cmServer.cxx create mode 100644 Source/cmServer.h create mode 100644 Source/cmServerConnection.cxx create mode 100644 Source/cmServerConnection.h create mode 100644 Source/cmServerDictionary.h create mode 100644 Source/cmServerProtocol.cxx create mode 100644 Source/cmServerProtocol.h create mode 100644 Source/cmTargetLinkLibraryType.h create mode 100644 Source/cmTypeMacro.h create mode 100644 Source/cmUtils.hxx create mode 100644 Source/cm_auto_ptr.hxx create mode 100644 Source/dir.dox create mode 100644 Source/dir.dox.in create mode 100644 Source/kwsys/ConsoleBuf.hxx.in delete mode 100644 Source/kwsys/auto_ptr.hxx.in delete mode 100644 Source/kwsys/testAutoPtr.cxx create mode 100644 Source/kwsys/testConsoleBuf.cxx create mode 100644 Source/kwsys/testConsoleBuf.hxx create mode 100644 Source/kwsys/testConsoleBufChild.cxx delete mode 100755 Templates/cygwin-package.sh.in create mode 100644 Tests/CMakeLib/testFindPackageCommand.cxx copy Modules/IntelVSImplicitPath/hello.f => Tests/CMakeOnly/find_library/lib/32/libtest5.a (100%) copy Tests/CMakeOnly/find_library/lib/A/{lib64 => lib32}/libtest3.a (100%) copy Tests/CMakeOnly/find_library/{lib/64 => lib32/A/lib}/libtest2.a (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/CMakeOnly/find_library/lib32/A/lib32/libtest4.a (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/CMakeOnly/find_library/lib32/A/libtest4.a (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/CMakeOnly/find_library/lib32/libtest4.a (100%) create mode 100644 Tests/CMakeTests/String-TIMESTAMP-MonthWeekNames.cmake create mode 100644 Tests/ExternalProjectSourceSubdir/CMakeLists.txt create mode 100644 Tests/ExternalProjectSourceSubdir/Example/subdir/CMakeLists.txt create mode 100644 Tests/FindBZip2/CMakeLists.txt create mode 100644 Tests/FindBZip2/Test/CMakeLists.txt create mode 100644 Tests/FindBZip2/Test/main.c create mode 100644 Tests/FindICU/CMakeLists.txt create mode 100644 Tests/FindICU/Test/CMakeLists.txt create mode 100644 Tests/FindICU/Test/main.cpp create mode 100644 Tests/FindLibUV/CMakeLists.txt create mode 100644 Tests/FindLibUV/Test/CMakeLists.txt create mode 100644 Tests/FindLibUV/Test/main.c create mode 100644 Tests/FindMatlab/components_checks/CMakeLists.txt create mode 100644 Tests/FindOpenCL/CMakeLists.txt create mode 100644 Tests/FindOpenCL/Test/CMakeLists.txt create mode 100644 Tests/FindOpenCL/Test/main.c copy Tests/FindPackageTest/{Baz 1.1 => Baz 1.3/lib/cmake/Baz}/BazConfig.cmake (100%) create mode 100644 Tests/FindPackageTest/Baz 1.3/lib/cmake/Baz/BazConfigVersion.cmake copy Tests/FindPackageTest/{Baz 1.1 => Baz 2.0/share/Baz 2}/BazConfig.cmake (100%) create mode 100644 Tests/FindPackageTest/Baz 2.0/share/Baz 2/BazConfigVersion.cmake copy Tests/FindPackageTest/{Baz 1.1 => Baz 2.1/lib/Baz 2/cmake}/BazConfig.cmake (100%) create mode 100644 Tests/FindPackageTest/Baz 2.1/lib/Baz 2/cmake/BazConfigVersion.cmake create mode 100644 Tests/FindPackageTest/SortLib-3.1.1/SortLibConfig.cmake create mode 100644 Tests/FindPackageTest/SortLib-3.1.1/SortLibConfigVersion.cmake create mode 100644 Tests/FindPackageTest/SortLib-3.10.1/SortLibConfig.cmake create mode 100644 Tests/FindPackageTest/SortLib-3.10.1/SortLibConfigVersion.cmake create mode 100644 Tests/FindVulkan/CMakeLists.txt create mode 100644 Tests/FindVulkan/Test/CMakeLists.txt create mode 100644 Tests/FindVulkan/Test/main.c delete mode 100644 Tests/Fortran/External/CMakeLists.txt create mode 100644 Tests/FortranModules/CMakeLists.txt rename Tests/{Fortran => FortranModules}/Executable/CMakeLists.txt (100%) rename Tests/{Fortran => FortranModules}/Executable/main.f90 (100%) create mode 100644 Tests/FortranModules/External/CMakeLists.txt rename Tests/{Fortran => FortranModules}/External/a.f90 (100%) rename Tests/{Fortran => FortranModules}/Library/CMakeLists.txt (100%) rename Tests/{Fortran => FortranModules}/Library/a.f90 (100%) rename Tests/{Fortran => FortranModules}/Library/b.f90 (100%) rename Tests/{Fortran => FortranModules}/Library/main.f90 (100%) rename Tests/{Fortran => FortranModules}/Subdir/CMakeLists.txt (100%) rename Tests/{Fortran => FortranModules}/Subdir/subdir.f90 (100%) create mode 100644 Tests/FortranModules/Submodules/CMakeLists.txt create mode 100644 Tests/FortranModules/Submodules/main.f90 create mode 100644 Tests/FortranModules/Submodules/provide.f90 rename Tests/{Fortran => FortranModules}/in_interface/main.f90 (100%) rename Tests/{Fortran => FortranModules}/in_interface/module.f90 (100%) rename Tests/{Fortran => FortranModules}/include/test_preprocess.h (100%) create mode 100644 Tests/FortranModules/non_pp_include.f90 rename Tests/{Fortran => FortranModules}/test_module_implementation.f90 (100%) rename Tests/{Fortran => FortranModules}/test_module_interface.f90 (100%) rename Tests/{Fortran => FortranModules}/test_module_main.f90 (100%) create mode 100644 Tests/FortranModules/test_non_pp_include_main.f90 rename Tests/{Fortran => FortranModules}/test_preprocess.F90 (100%) rename Tests/{Fortran => FortranModules}/test_preprocess_module.F90 (100%) rename Tests/{Fortran => FortranModules}/test_use_in_comment_fixedform.f (100%) rename Tests/{Fortran => FortranModules}/test_use_in_comment_freeform.f90 (100%) create mode 100644 Tests/JavaExportImport/BuildExport/CMakeLists.txt create mode 100644 Tests/JavaExportImport/BuildExport/Foo.java create mode 100644 Tests/JavaExportImport/CMakeLists.txt create mode 100644 Tests/JavaExportImport/Import/CMakeLists.txt create mode 100644 Tests/JavaExportImport/Import/Import.java create mode 100644 Tests/JavaExportImport/InitialCache.cmake.in create mode 100644 Tests/JavaExportImport/InstallExport/Bar.java create mode 100644 Tests/JavaExportImport/InstallExport/CMakeLists.txt copy Tests/{ExportImport => JavaExportImport}/main.c (100%) create mode 100644 Tests/Module/ExternalData/Data5/CMakeLists.txt create mode 100644 Tests/Module/ExternalData/Data5/Data5Check.cmake delete mode 100644 Tests/Module/GenerateExportHeader/CMakeLists.txt delete mode 100644 Tests/Module/GenerateExportHeader/c_identifier/CMakeLists.txt delete mode 100644 Tests/Module/GenerateExportHeader/c_identifier/main.cpp delete mode 100644 Tests/Module/GenerateExportHeader/exportheader_test.cpp delete mode 100644 Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt delete mode 100644 Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp delete mode 100644 Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h delete mode 100644 Tests/Module/GenerateExportHeader/libshared/CMakeLists.txt delete mode 100644 Tests/Module/GenerateExportHeader/libshared/libshared.cpp delete mode 100644 Tests/Module/GenerateExportHeader/libshared/libshared.h delete mode 100644 Tests/Module/GenerateExportHeader/libstatic/CMakeLists.txt delete mode 100644 Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp delete mode 100644 Tests/Module/GenerateExportHeader/libstatic/libstatic.h delete mode 100644 Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt delete mode 100644 Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt.in delete mode 100644 Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp create mode 100644 Tests/QtAutogen/rcc_empty.cpp create mode 100644 Tests/QtAutogen/rcc_empty_resource.qrc create mode 100644 Tests/QtAutogen/sameName/CMakeLists.txt create mode 100644 Tests/QtAutogen/sameName/aaa/bbb/data.qrc create mode 100644 Tests/QtAutogen/sameName/aaa/bbb/item.cpp create mode 100644 Tests/QtAutogen/sameName/aaa/bbb/item.hpp create mode 100644 Tests/QtAutogen/sameName/aaa/data.qrc create mode 100644 Tests/QtAutogen/sameName/aaa/item.cpp create mode 100644 Tests/QtAutogen/sameName/aaa/item.hpp create mode 100644 Tests/QtAutogen/sameName/bbb/aaa/data.qrc create mode 100644 Tests/QtAutogen/sameName/bbb/aaa/item.cpp create mode 100644 Tests/QtAutogen/sameName/bbb/aaa/item.hpp create mode 100644 Tests/QtAutogen/sameName/bbb/data.qrc create mode 100644 Tests/QtAutogen/sameName/bbb/item.cpp create mode 100644 Tests/QtAutogen/sameName/bbb/item.hpp create mode 100644 Tests/QtAutogen/sameName/ccc/data.qrc create mode 100644 Tests/QtAutogen/sameName/ccc/item.cpp create mode 100644 Tests/QtAutogen/sameName/ccc/item.hpp create mode 100644 Tests/QtAutogen/sameName/data.qrc create mode 100644 Tests/QtAutogen/sameName/item.cpp create mode 100644 Tests/QtAutogen/sameName/item.hpp create mode 100644 Tests/QtAutogen/sameName/main.cpp copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => Android/BadSYSROOT-result.txt} (100%) create mode 100644 Tests/RunCMake/Android/BadSYSROOT-stderr.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Android/BadSYSROOT.cmake (100%) create mode 100644 Tests/RunCMake/Android/CMakeLists.txt create mode 100644 Tests/RunCMake/Android/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/Android/android.c create mode 100644 Tests/RunCMake/Android/android.cxx create mode 100644 Tests/RunCMake/Android/android.h create mode 100644 Tests/RunCMake/Android/common.cmake create mode 100644 Tests/RunCMake/Android/ndk-arm64-v8a-stdout.txt create mode 100644 Tests/RunCMake/Android/ndk-arm64-v8a.cmake create mode 100644 Tests/RunCMake/Android/ndk-armeabi-arm-stdout.txt create mode 100644 Tests/RunCMake/Android/ndk-armeabi-arm.cmake create mode 100644 Tests/RunCMake/Android/ndk-armeabi-thumb-stdout.txt create mode 100644 Tests/RunCMake/Android/ndk-armeabi-thumb.cmake create mode 100644 Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stdout.txt create mode 100644 Tests/RunCMake/Android/ndk-armeabi-v7a-neon.cmake create mode 100644 Tests/RunCMake/Android/ndk-armeabi-v7a-stdout.txt create mode 100644 Tests/RunCMake/Android/ndk-armeabi-v7a.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => Android/ndk-badabi-result.txt} (100%) create mode 100644 Tests/RunCMake/Android/ndk-badabi-stderr.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Android/ndk-badabi.cmake (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => Android/ndk-badarm-result.txt} (100%) create mode 100644 Tests/RunCMake/Android/ndk-badarm-stderr.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Android/ndk-badarm.cmake (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => Android/ndk-badneon-result.txt} (100%) create mode 100644 Tests/RunCMake/Android/ndk-badneon-stderr.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Android/ndk-badneon.cmake (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => Android/ndk-badstl-result.txt} (100%) create mode 100644 Tests/RunCMake/Android/ndk-badstl-stderr.txt create mode 100644 Tests/RunCMake/Android/ndk-badstl.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => Android/ndk-badver-result.txt} (100%) create mode 100644 Tests/RunCMake/Android/ndk-badver-stderr.txt create mode 100644 Tests/RunCMake/Android/ndk-badver.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => Android/ndk-badvernum-result.txt} (100%) create mode 100644 Tests/RunCMake/Android/ndk-badvernum-stderr.txt create mode 100644 Tests/RunCMake/Android/ndk-badvernum.cmake create mode 100644 Tests/RunCMake/Android/ndk-mips-stdout.txt create mode 100644 Tests/RunCMake/Android/ndk-mips.cmake create mode 100644 Tests/RunCMake/Android/ndk-mips64-stdout.txt create mode 100644 Tests/RunCMake/Android/ndk-mips64.cmake create mode 100644 Tests/RunCMake/Android/ndk-sysroot-armeabi-stdout.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Android/ndk-sysroot-armeabi.cmake (100%) create mode 100644 Tests/RunCMake/Android/ndk-x86-stdout.txt create mode 100644 Tests/RunCMake/Android/ndk-x86.cmake create mode 100644 Tests/RunCMake/Android/ndk-x86_64-stdout.txt create mode 100644 Tests/RunCMake/Android/ndk-x86_64.cmake create mode 100644 Tests/RunCMake/Android/standalone-stdout.txt create mode 100644 Tests/RunCMake/Android/standalone-sysroot-stdout.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Android/standalone-sysroot.cmake (100%) create mode 100644 Tests/RunCMake/Android/standalone.cmake create mode 100644 Tests/RunCMake/AndroidMK/AndroidMK-check.cmake create mode 100644 Tests/RunCMake/AndroidMK/AndroidMK.cmake create mode 100644 Tests/RunCMake/AndroidMK/CMakeLists.txt create mode 100644 Tests/RunCMake/AndroidMK/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt create mode 100644 Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt copy Tests/{CTestCoverageCollectGCOV/TestProject/3rdparty/foo.cpp => RunCMake/AndroidMK/foo.cxx} (100%) create mode 100644 Tests/RunCMake/AndroidTestUtilities/CMakeLists.txt create mode 100644 Tests/RunCMake/AndroidTestUtilities/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest1.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest1Build-check.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest2.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest2Build-check.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest3.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/SetupTest3Build-check.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/check.cmake create mode 100644 Tests/RunCMake/AndroidTestUtilities/data/a.txt create mode 100644 Tests/RunCMake/AndroidTestUtilities/data/proto.proto create mode 100644 Tests/RunCMake/AndroidTestUtilities/data/subfolder/b.txt create mode 100644 Tests/RunCMake/AndroidTestUtilities/data/subfolder/protobuffer.p create mode 100644 Tests/RunCMake/AndroidTestUtilities/libs/exampleLib.so create mode 100644 Tests/RunCMake/AndroidTestUtilities/libs/exampleLib.txt create mode 100644 Tests/RunCMake/AutoExportDll/hello2.c create mode 100644 Tests/RunCMake/AutoExportDll/objlib.c create mode 100644 Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake create mode 100644 Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake create mode 100644 Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake create mode 100644 Tests/RunCMake/CPack/DEBUGINFO.cmake create mode 100644 Tests/RunCMake/CPack/LONG_FILENAMES.cmake create mode 100644 Tests/RunCMake/CPack/PACKAGE_CHECKSUM.cmake create mode 100644 Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/RPM/DEBUGINFO-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SOURCE_PACKAGE-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/RPM/SOURCE_PACKAGE-VerifyResult.cmake create mode 100644 Tests/RunCMake/CPack/SOURCE_PACKAGE.cmake create mode 100644 Tests/RunCMake/CPack/TGZ/PACKAGE_CHECKSUM-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/TGZ/PACKAGE_CHECKSUM-VerifyResult.cmake create mode 100644 Tests/RunCMake/CPack/TGZ/PACKAGE_CHECKSUM-invalid-stderr.txt copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_capabilities-arg-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_capabilities-arg-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/E_capabilities-stdout.txt copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_server-arg-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_server-arg-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/E_server-pipe-result.txt create mode 100644 Tests/RunCMake/CommandLine/E_server-pipe-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/trace-only-this-file.cmake create mode 100644 Tests/RunCMake/CommandLine/trace-source-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/trace-source.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => Configure/ContinueAfterError-result.txt} (100%) create mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stderr.txt create mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stdout.txt create mode 100644 Tests/RunCMake/Configure/ContinueAfterError.cmake copy Tests/RunCMake/FindPkgConfig/pc-bar/{lib/i386-linux-gnu => lib32}/pkgconfig/.placeholder (100%) copy Tests/RunCMake/FindPkgConfig/{pc-bar/lib/i386-linux-gnu => pc-foo/lib32}/pkgconfig/.placeholder (100%) create mode 100644 Tests/RunCMake/GenerateExportHeader/CMakeLists.txt copy Tests/RunCMake/{file/LOCK-error-timeout-stdout.txt => GenerateExportHeader/GEH-build-stderr.txt} (100%) create mode 100644 Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake copy Tests/RunCMake/{CMP0060/CMP0060-OLD-Build-result.txt => GenerateExportHeader/GEH-link-error-result.txt} (100%) copy Tests/RunCMake/{file/LOCK-error-timeout-stdout.txt => GenerateExportHeader/GEH-link-error-stderr.txt} (100%) create mode 100644 Tests/RunCMake/GenerateExportHeader/GEH.cmake create mode 100644 Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt rename Tests/{Module => RunCMake}/GenerateExportHeader/c_identifier/c_identifier_class.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/c_identifier/c_identifier_class.h (100%) create mode 100644 Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp create mode 100644 Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp create mode 100644 Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt create mode 100644 Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp create mode 100644 Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h create mode 100644 Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt create mode 100644 Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp create mode 100644 Tests/RunCMake/GenerateExportHeader/libshared/libshared.h create mode 100644 Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt create mode 100644 Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp create mode 100644 Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h create mode 100644 Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt create mode 100644 Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in create mode 100644 Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/src/someclass.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/src/someclass.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Empty/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Empty/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/MinGW/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/MinGW/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32-Clang/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/WinEmpty/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/WinEmpty/libstatic_export.h (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => GeneratorExpression/LINK_ONLY-not-linking-result.txt} (100%) create mode 100644 Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking-stderr.txt create mode 100644 Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking.cmake create mode 100644 Tests/RunCMake/LinkWhatYouUse/C-Build-stdout.txt create mode 100644 Tests/RunCMake/LinkWhatYouUse/C-launch-Build-stdout.txt copy Tests/RunCMake/{ClangTidy => LinkWhatYouUse}/C-launch.cmake (100%) create mode 100644 Tests/RunCMake/LinkWhatYouUse/C.cmake copy Tests/RunCMake/{AutoExportDll => LinkWhatYouUse}/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/LinkWhatYouUse/CXX-Build-stdout.txt create mode 100644 Tests/RunCMake/LinkWhatYouUse/CXX-launch-Build-stdout.txt copy Tests/RunCMake/{ClangTidy => LinkWhatYouUse}/CXX-launch.cmake (100%) create mode 100644 Tests/RunCMake/LinkWhatYouUse/CXX.cmake create mode 100644 Tests/RunCMake/LinkWhatYouUse/RunCMakeTest.cmake copy Tests/{CMakeOnly/LinkInterfaceLoop => RunCMake/LinkWhatYouUse}/main.c (100%) copy Tests/RunCMake/{ClangTidy => LinkWhatYouUse}/main.cxx (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => Make/CustomCommandDepfile-ERROR-result.txt} (100%) create mode 100644 Tests/RunCMake/Make/CustomCommandDepfile-ERROR-stderr.txt create mode 100644 Tests/RunCMake/Make/CustomCommandDepfile-ERROR.cmake create mode 100644 Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake create mode 100644 Tests/RunCMake/Ninja/CustomCommandDepfile.cmake create mode 100644 Tests/RunCMake/Ninja/SubDir-install-stdout.txt create mode 100644 Tests/RunCMake/Ninja/SubDir-test-stdout.txt copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => Syntax/CommandEOF-result.txt} (100%) create mode 100644 Tests/RunCMake/Syntax/CommandEOF-stderr.txt create mode 100644 Tests/RunCMake/Syntax/CommandEOF.cmake create mode 100644 Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt create mode 100644 Tests/RunCMake/ToolchainFile/FlagsInit-toolchain.cmake create mode 100644 Tests/RunCMake/ToolchainFile/FlagsInit.cmake create mode 100644 Tests/RunCMake/ToolchainFile/LinkFlagsInit-stdout.txt create mode 100644 Tests/RunCMake/ToolchainFile/LinkFlagsInit-toolchain.cmake create mode 100644 Tests/RunCMake/ToolchainFile/LinkFlagsInit.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeAttributeLocation-check.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeAttributeLocation.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeBundles-install-check.cmake create mode 100644 Tests/RunCMake/add_custom_target/TargetOrder.cmake create mode 100644 Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake create mode 100644 Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt create mode 100644 Tests/RunCMake/add_subdirectory/ExcludeFromAll/bar.cpp create mode 100644 Tests/RunCMake/add_subdirectory/ExcludeFromAll/foo.cpp copy Tests/RunCMake/{Framework => add_subdirectory/ExcludeFromAll}/foo.h (100%) create mode 100644 Tests/RunCMake/add_subdirectory/main.cpp create mode 100644 Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => cmake_parse_arguments/BadArgvN1-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN1-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN1.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => cmake_parse_arguments/BadArgvN2-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN2-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN2.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => cmake_parse_arguments/BadArgvN3-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN3-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN3.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => cmake_parse_arguments/BadArgvN4-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN4-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN4.cmake create mode 100644 Tests/RunCMake/cmake_parse_arguments/CornerCasesArgvN.cmake copy Tests/RunCMake/{ctest_coverage => ctest_cmake_error}/CMakeLists.txt.in (100%) create mode 100644 Tests/RunCMake/ctest_cmake_error/CTestCaptureErrorNonZero-stderr.txt create mode 100644 Tests/RunCMake/ctest_cmake_error/CTestCaptureErrorZero-stderr.txt create mode 100644 Tests/RunCMake/ctest_cmake_error/CTestCaptureErrorZero-stdout.txt copy Tests/RunCMake/{ctest_coverage => ctest_cmake_error}/CTestConfig.cmake.in (100%) copy Tests/RunCMake/{ctest_coverage => ctest_cmake_error}/CoverageQuiet-stdout.txt (100%) create mode 100644 Tests/RunCMake/ctest_cmake_error/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/ctest_cmake_error/test.cmake.in create mode 100644 Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in create mode 100644 Tests/RunCMake/ctest_fixtures/CTestConfig.cmake.in create mode 100644 Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake copy Tests/RunCMake/{ctest_build/BuildFailure-result.txt => ctest_fixtures/cyclicCleanup-result.txt} (100%) create mode 100644 Tests/RunCMake/ctest_fixtures/cyclicCleanup-stderr.txt create mode 100644 Tests/RunCMake/ctest_fixtures/cyclicCleanup-stdout.txt copy Tests/RunCMake/{ctest_build/BuildFailure-result.txt => ctest_fixtures/cyclicSetup-result.txt} (100%) create mode 100644 Tests/RunCMake/ctest_fixtures/cyclicSetup-stderr.txt create mode 100644 Tests/RunCMake/ctest_fixtures/cyclicSetup-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/one-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/setupFoo-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/test.cmake.in create mode 100644 Tests/RunCMake/ctest_fixtures/three-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/two-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/wontRun-stdout.txt copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/DOWNLOAD-httpheader-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/DOWNLOAD-httpheader-not-set.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/DOWNLOAD-pass-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt (100%) create mode 100644 Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt create mode 100644 Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/DOWNLOAD-unused-argument.txt (100%) create mode 100644 Tests/RunCMake/file/LOCK-lowercase.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/UPLOAD-httpheader-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/UPLOAD-httpheader-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/UPLOAD-httpheader-not-set.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/UPLOAD-pass-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/UPLOAD-pass-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/UPLOAD-pass-not-set.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/UPLOAD-unused-argument-result.txt (100%) create mode 100644 Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt create mode 100644 Tests/RunCMake/file/UPLOAD-unused-argument.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/UPLOAD-unused-argument.txt (100%) copy Tests/{VSWindowsFormsResx/WindowsFormsResx => RunCMake/find_path/Frameworks/Foo.framework/Headers/Some/Dir}/Header.h (100%) create mode 100644 Tests/RunCMake/find_path/FrameworksWithSubdirs-stdout.txt create mode 100644 Tests/RunCMake/find_path/FrameworksWithSubdirs.cmake create mode 100644 Tests/RunCMake/get_property/directory_properties/CMakeLists.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/get_property/directory_properties/sub1/CMakeLists.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/get_property/directory_properties/sub2/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/message/message-internal-warning-stderr.txt create mode 100644 Tests/RunCMake/message/message-internal-warning.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/message/nomessage-internal-warning-stderr.txt (100%) create mode 100644 Tests/RunCMake/message/nomessage-internal-warning.cmake create mode 100644 Tests/RunCMake/project/ExplicitRC.cmake create mode 100644 Tests/RunCMake/try_compile/CMP0066-stderr.txt create mode 100644 Tests/RunCMake/try_compile/CMP0066-stdout.txt create mode 100644 Tests/RunCMake/try_compile/CMP0066.cmake create mode 100644 Tests/Server/CMakeLists.txt create mode 100644 Tests/Server/buildsystem1/CMakeLists.txt create mode 100644 Tests/Server/buildsystem1/foo.cpp copy Tests/{RunCMake/COMPILE_LANGUAGE-genex => Server/buildsystem1}/main.cpp (100%) create mode 100644 Tests/Server/buildsystem1/subdir/CMakeLists.txt create mode 100644 Tests/Server/buildsystem1/subdir/empty.cpp create mode 100644 Tests/Server/cmakelib.py copy Tests/{CTestTestCycle/simple.cxx => Server/empty.cpp} (100%) create mode 100644 Tests/Server/server-test.py create mode 100644 Tests/Server/tc_buildsystem1.json create mode 100644 Tests/Server/tc_globalSettings.json create mode 100644 Tests/Server/tc_handshake.json create mode 100644 Tests/VSWinStorePhone/Direct3DApp1/Strings/en-US/Resources.resw create mode 100644 Utilities/Doxygen/DeveloperReference/mainpage.dox delete mode 100644 Utilities/Doxygen/authors.txt delete mode 100755 Utilities/Doxygen/doc_makeall.sh.in delete mode 100644 Utilities/KWStyle/Headers/CMakeHeader.h delete mode 100644 Utilities/Release/Cygwin/CMakeLists.txt delete mode 100644 Utilities/Release/Cygwin/README.cygwin.in delete mode 100755 Utilities/Release/Cygwin/cygwin-package.sh.in delete mode 100644 Utilities/Release/Cygwin/cygwin-patch.diff.in delete mode 100644 Utilities/Release/Cygwin/cygwin-setup.hint.in delete mode 100644 Utilities/Release/cygwin_release.cmake delete mode 100644 Utilities/Release/linux32_release.cmake create mode 100755 Utilities/Scripts/update-liblzma.bash create mode 100755 Utilities/Scripts/update-libuv.bash create mode 100755 Utilities/Scripts/update-vim-syntax.bash create mode 100644 Utilities/cm_uv.h delete mode 100644 Utilities/cmliblzma/README-CMake.txt copy Utilities/{cmcurl => cmlibuv}/.gitattributes (100%) create mode 100644 Utilities/cmlibuv/CMakeLists.txt create mode 100644 Utilities/cmlibuv/LICENSE create mode 100644 Utilities/cmlibuv/include/android-ifaddrs.h create mode 100644 Utilities/cmlibuv/include/pthread-barrier.h create mode 100644 Utilities/cmlibuv/include/stdint-msvc2008.h create mode 100644 Utilities/cmlibuv/include/tree.h create mode 100644 Utilities/cmlibuv/include/uv-aix.h create mode 100644 Utilities/cmlibuv/include/uv-bsd.h create mode 100644 Utilities/cmlibuv/include/uv-darwin.h create mode 100644 Utilities/cmlibuv/include/uv-errno.h create mode 100644 Utilities/cmlibuv/include/uv-linux.h create mode 100644 Utilities/cmlibuv/include/uv-os390.h create mode 100644 Utilities/cmlibuv/include/uv-sunos.h create mode 100644 Utilities/cmlibuv/include/uv-threadpool.h create mode 100644 Utilities/cmlibuv/include/uv-unix.h create mode 100644 Utilities/cmlibuv/include/uv-version.h create mode 100644 Utilities/cmlibuv/include/uv-win.h create mode 100644 Utilities/cmlibuv/include/uv.h create mode 100644 Utilities/cmlibuv/src/fs-poll.c create mode 100644 Utilities/cmlibuv/src/heap-inl.h create mode 100644 Utilities/cmlibuv/src/inet.c create mode 100644 Utilities/cmlibuv/src/queue.h create mode 100644 Utilities/cmlibuv/src/threadpool.c create mode 100644 Utilities/cmlibuv/src/unix/aix.c create mode 100644 Utilities/cmlibuv/src/unix/android-ifaddrs.c create mode 100644 Utilities/cmlibuv/src/unix/async.c create mode 100644 Utilities/cmlibuv/src/unix/atomic-ops.h create mode 100644 Utilities/cmlibuv/src/unix/core.c create mode 100644 Utilities/cmlibuv/src/unix/darwin-proctitle.c create mode 100644 Utilities/cmlibuv/src/unix/darwin.c create mode 100644 Utilities/cmlibuv/src/unix/dl.c create mode 100644 Utilities/cmlibuv/src/unix/freebsd.c create mode 100644 Utilities/cmlibuv/src/unix/fs.c create mode 100644 Utilities/cmlibuv/src/unix/fsevents.c create mode 100644 Utilities/cmlibuv/src/unix/getaddrinfo.c create mode 100644 Utilities/cmlibuv/src/unix/getnameinfo.c create mode 100644 Utilities/cmlibuv/src/unix/internal.h create mode 100644 Utilities/cmlibuv/src/unix/kqueue.c create mode 100644 Utilities/cmlibuv/src/unix/linux-core.c create mode 100644 Utilities/cmlibuv/src/unix/linux-inotify.c create mode 100644 Utilities/cmlibuv/src/unix/linux-syscalls.c create mode 100644 Utilities/cmlibuv/src/unix/linux-syscalls.h create mode 100644 Utilities/cmlibuv/src/unix/loop-watcher.c create mode 100644 Utilities/cmlibuv/src/unix/loop.c create mode 100644 Utilities/cmlibuv/src/unix/netbsd.c create mode 100644 Utilities/cmlibuv/src/unix/openbsd.c create mode 100644 Utilities/cmlibuv/src/unix/os390.c create mode 100644 Utilities/cmlibuv/src/unix/pipe.c create mode 100644 Utilities/cmlibuv/src/unix/poll.c create mode 100644 Utilities/cmlibuv/src/unix/process.c create mode 100644 Utilities/cmlibuv/src/unix/proctitle.c create mode 100644 Utilities/cmlibuv/src/unix/pthread-barrier.c create mode 100644 Utilities/cmlibuv/src/unix/pthread-fixes.c create mode 100644 Utilities/cmlibuv/src/unix/signal.c create mode 100644 Utilities/cmlibuv/src/unix/spinlock.h create mode 100644 Utilities/cmlibuv/src/unix/stream.c create mode 100644 Utilities/cmlibuv/src/unix/sunos.c create mode 100644 Utilities/cmlibuv/src/unix/tcp.c create mode 100644 Utilities/cmlibuv/src/unix/thread.c create mode 100644 Utilities/cmlibuv/src/unix/timer.c create mode 100644 Utilities/cmlibuv/src/unix/tty.c create mode 100644 Utilities/cmlibuv/src/unix/udp.c create mode 100644 Utilities/cmlibuv/src/uv-common.c create mode 100644 Utilities/cmlibuv/src/uv-common.h create mode 100644 Utilities/cmlibuv/src/version.c create mode 100644 Utilities/cmlibuv/src/win/async.c create mode 100644 Utilities/cmlibuv/src/win/atomicops-inl.h create mode 100644 Utilities/cmlibuv/src/win/core.c create mode 100644 Utilities/cmlibuv/src/win/detect-wakeup.c create mode 100644 Utilities/cmlibuv/src/win/dl.c create mode 100644 Utilities/cmlibuv/src/win/error.c create mode 100644 Utilities/cmlibuv/src/win/fs-event.c create mode 100644 Utilities/cmlibuv/src/win/fs.c create mode 100644 Utilities/cmlibuv/src/win/getaddrinfo.c create mode 100644 Utilities/cmlibuv/src/win/getnameinfo.c create mode 100644 Utilities/cmlibuv/src/win/handle-inl.h create mode 100644 Utilities/cmlibuv/src/win/handle.c create mode 100644 Utilities/cmlibuv/src/win/internal.h create mode 100644 Utilities/cmlibuv/src/win/loop-watcher.c create mode 100644 Utilities/cmlibuv/src/win/pipe.c create mode 100644 Utilities/cmlibuv/src/win/poll.c create mode 100644 Utilities/cmlibuv/src/win/process-stdio.c create mode 100644 Utilities/cmlibuv/src/win/process.c create mode 100644 Utilities/cmlibuv/src/win/req-inl.h create mode 100644 Utilities/cmlibuv/src/win/req.c create mode 100644 Utilities/cmlibuv/src/win/signal.c create mode 100644 Utilities/cmlibuv/src/win/snprintf.c create mode 100644 Utilities/cmlibuv/src/win/stream-inl.h create mode 100644 Utilities/cmlibuv/src/win/stream.c create mode 100644 Utilities/cmlibuv/src/win/tcp.c create mode 100644 Utilities/cmlibuv/src/win/thread.c create mode 100644 Utilities/cmlibuv/src/win/timer.c create mode 100644 Utilities/cmlibuv/src/win/tty.c create mode 100644 Utilities/cmlibuv/src/win/udp.c create mode 100644 Utilities/cmlibuv/src/win/util.c create mode 100644 Utilities/cmlibuv/src/win/winapi.c create mode 100644 Utilities/cmlibuv/src/win/winapi.h create mode 100644 Utilities/cmlibuv/src/win/winsock.c create mode 100644 Utilities/cmlibuv/src/win/winsock.h hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 09:53:37 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 09:53:37 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1305-gdebeea6 Message-ID: <20161003135337.96E9BF5A8C@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 debeea6b152d6ecadebf9dfa98cc8181280e88cd (commit) via a1ecf3f1b087fd7f269dee0142c48436e8e76db6 (commit) from 66805932ee04c275c2f9fce35be66d4d8c6c3a08 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=debeea6b152d6ecadebf9dfa98cc8181280e88cd commit debeea6b152d6ecadebf9dfa98cc8181280e88cd Merge: 6680593 a1ecf3f Author: Brad King AuthorDate: Mon Oct 3 09:53:36 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 3 09:53:36 2016 -0400 Merge topic 'fix-doc-3.7-relnotes' into next a1ecf3f1 Help: Add 3.7 release note for CPack/NSIS https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1ecf3f1b087fd7f269dee0142c48436e8e76db6 commit a1ecf3f1b087fd7f269dee0142c48436e8e76db6 Author: Roman W?ger AuthorDate: Mon Oct 3 15:46:53 2016 +0200 Commit: Brad King CommitDate: Mon Oct 3 09:52:06 2016 -0400 Help: Add 3.7 release note for CPack/NSIS diff --git a/Help/release/3.7.rst b/Help/release/3.7.rst index 97c6f7c..f02b62d 100644 --- a/Help/release/3.7.rst +++ b/Help/release/3.7.rst @@ -242,6 +242,10 @@ CPack :variable:`CPACK_RPM_SOURCE_PKG_BUILD_PARAMS` and :variable:`CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX`. +* The CPack NSIS generator now supports + :variable:`CPACK_NSIS__INSTALL_DIRECTORY`. + This can be used to set component specific installation directories. + * The CPack WIX generator now supports :variable:`CPACK_WIX_SKIP_PROGRAM_FOLDER` to allow specification of a custom absolute installation prefix outside ----------------------------------------------------------------------- Summary of changes: Help/release/3.7.rst | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 11:05:05 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 11:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1304-g63d19ec Message-ID: <20161003150505.930BFF5E33@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 63d19ec83f5f66dbb4aedc037d433aedd9d034bb (commit) via a1ecf3f1b087fd7f269dee0142c48436e8e76db6 (commit) from 0c09a6ab1dc8cc5556aa3ccb852d5146ed8e2424 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63d19ec83f5f66dbb4aedc037d433aedd9d034bb commit 63d19ec83f5f66dbb4aedc037d433aedd9d034bb Merge: 0c09a6a a1ecf3f Author: Brad King AuthorDate: Mon Oct 3 11:05:03 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 3 11:05:03 2016 -0400 Merge topic 'fix-doc-3.7-relnotes' a1ecf3f1 Help: Add 3.7 release note for CPack/NSIS ----------------------------------------------------------------------- Summary of changes: Help/release/3.7.rst | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 11:05:25 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 11:05:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1307-g4bad548 Message-ID: <20161003150525.15394F5AFC@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 4bad5480535f93ec1b3fec9527994ba83146dc3c (commit) via 63d19ec83f5f66dbb4aedc037d433aedd9d034bb (commit) from debeea6b152d6ecadebf9dfa98cc8181280e88cd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bad5480535f93ec1b3fec9527994ba83146dc3c commit 4bad5480535f93ec1b3fec9527994ba83146dc3c Merge: debeea6 63d19ec Author: Brad King AuthorDate: Mon Oct 3 11:05:17 2016 -0400 Commit: Brad King CommitDate: Mon Oct 3 11:05:17 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 11:06:17 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 11:06:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1306-g484dc1e Message-ID: <20161003150617.4BC80F5E43@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 484dc1e5d85f4f468e27816eab0fccc9c7d6ec11 (commit) via 1dc252ecf4d0946196133734540ebe8e90f312d3 (commit) from 63d19ec83f5f66dbb4aedc037d433aedd9d034bb (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 Oct 3 11:06:17 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 11:06:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1310-g6051f76 Message-ID: <20161003150617.79B7FF5E44@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 6051f76a0f28c91d36d51d132dc723778577d053 (commit) via 484dc1e5d85f4f468e27816eab0fccc9c7d6ec11 (commit) via 1dc252ecf4d0946196133734540ebe8e90f312d3 (commit) from 4bad5480535f93ec1b3fec9527994ba83146dc3c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6051f76a0f28c91d36d51d132dc723778577d053 commit 6051f76a0f28c91d36d51d132dc723778577d053 Merge: 4bad548 484dc1e Author: Brad King AuthorDate: Mon Oct 3 11:05:51 2016 -0400 Commit: Brad King CommitDate: Mon Oct 3 11:05:51 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 11:06:17 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 11:06:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.6.2-1302-g1dc252e Message-ID: <20161003150617.A4BF7F5E45@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 1dc252ecf4d0946196133734540ebe8e90f312d3 (commit) via a1ecf3f1b087fd7f269dee0142c48436e8e76db6 (commit) from 46f3306f6a642b7112ffad6f41076e5baead5a30 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/release/3.7.rst | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 13:39:56 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 13:39:56 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1312-ge6cd89b Message-ID: <20161003173956.117BCB0EB7@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 e6cd89b6b31760c5aee1aa0ae354014cd4b498e8 (commit) via 886a61ae304afd7c28362c19ea5c539e686d6760 (commit) from 6051f76a0f28c91d36d51d132dc723778577d053 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6cd89b6b31760c5aee1aa0ae354014cd4b498e8 commit e6cd89b6b31760c5aee1aa0ae354014cd4b498e8 Merge: 6051f76 886a61a Author: Brad King AuthorDate: Mon Oct 3 13:39:54 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 3 13:39:54 2016 -0400 Merge topic 'add-BUILD_RPATH' into next 886a61ae Add a BUILD_RPATH target property specifying build-tree RPATH entries https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=886a61ae304afd7c28362c19ea5c539e686d6760 commit 886a61ae304afd7c28362c19ea5c539e686d6760 Author: Ruslan Baratov AuthorDate: Sat Oct 1 02:30:57 2016 +0300 Commit: Brad King CommitDate: Mon Oct 3 13:31:46 2016 -0400 Add a BUILD_RPATH target property specifying build-tree RPATH entries Users may need to add custom `RPATH` entries to be able to run binaries from their build tree without setting `LD_LIBRARY_PATH`. Provide a way to do this that does not affect the install-tree `RPATH`. diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 271f497..fa21a1f 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -121,6 +121,7 @@ Properties on Targets /prop_tgt/AUTORCC /prop_tgt/AUTORCC_OPTIONS /prop_tgt/BINARY_DIR + /prop_tgt/BUILD_RPATH /prop_tgt/BUILD_WITH_INSTALL_RPATH /prop_tgt/BUNDLE_EXTENSION /prop_tgt/BUNDLE diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index b74f867..f76c467 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -257,6 +257,7 @@ Variables that Control the Build /variable/CMAKE_AUTORCC_OPTIONS /variable/CMAKE_AUTOUIC /variable/CMAKE_AUTOUIC_OPTIONS + /variable/CMAKE_BUILD_RPATH /variable/CMAKE_BUILD_WITH_INSTALL_RPATH /variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY /variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG diff --git a/Help/prop_tgt/BUILD_RPATH.rst b/Help/prop_tgt/BUILD_RPATH.rst new file mode 100644 index 0000000..27393f5 --- /dev/null +++ b/Help/prop_tgt/BUILD_RPATH.rst @@ -0,0 +1,10 @@ +BUILD_RPATH +----------- + +A :ref:`;-list ` specifying runtime path (``RPATH``) +entries to add to binaries linked in the build tree (for platforms that +support it). The entries will *not* be used for binaries in the install +tree. See also the :prop_tgt:`INSTALL_RPATH` target property. + +This property is initialized by the value of the variable +:variable:`CMAKE_BUILD_RPATH` if it is set when a target is created. diff --git a/Help/release/dev/add-BUILD_RPATH.rst b/Help/release/dev/add-BUILD_RPATH.rst new file mode 100644 index 0000000..0d69e45 --- /dev/null +++ b/Help/release/dev/add-BUILD_RPATH.rst @@ -0,0 +1,6 @@ +add-BUILD_RPATH +--------------- + +* A :variable:`CMAKE_BUILD_RPATH` variable and corresponding + :prop_tgt:`BUILD_RPATH` target property were added to support custom + ``RPATH`` locations to be added to binaries in the build tree. diff --git a/Help/variable/CMAKE_BUILD_RPATH.rst b/Help/variable/CMAKE_BUILD_RPATH.rst new file mode 100644 index 0000000..f20eb41 --- /dev/null +++ b/Help/variable/CMAKE_BUILD_RPATH.rst @@ -0,0 +1,10 @@ +CMAKE_BUILD_RPATH +----------------- + +A :ref:`;-list ` specifying runtime path (``RPATH``) +entries to add to binaries linked in the build tree (for platforms that +support it). The entries will *not* be used for binaries in the install +tree. See also the :variable:`CMAKE_INSTALL_RPATH` variable. + +This is used to initialize the :prop_tgt:`BUILD_RPATH` target property +for all targets. diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index dc8236d..0807ef8 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1710,6 +1710,12 @@ void cmComputeLinkInformation::GetRPath(std::vector& runtimeDirs, const char* install_rpath = this->Target->GetProperty("INSTALL_RPATH"); cmCLI_ExpandListUnique(install_rpath, runtimeDirs, emitted); } + if (use_build_rpath) { + // Add directories explicitly specified by user + if (const char* build_rpath = this->Target->GetProperty("BUILD_RPATH")) { + cmCLI_ExpandListUnique(build_rpath, runtimeDirs, emitted); + } + } if (use_build_rpath || use_link_rpath) { std::string rootPath = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); const char* stagePath = diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index e8d66a2..7eb0ebf 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4965,6 +4965,9 @@ bool cmGeneratorTarget::HaveBuildTreeRPATH(const std::string& config) const if (this->GetPropertyAsBool("SKIP_BUILD_RPATH")) { return false; } + if (this->GetProperty("BUILD_RPATH")) { + return true; + } if (cmLinkImplementationLibraries const* impl = this->GetLinkImplementationLibraries(config)) { return !impl->Libraries.empty(); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 54e0bea..cb6abb3 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -102,6 +102,7 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, this->SetPropertyDefault("ANDROID_JAR_DEPENDENCIES", CM_NULLPTR); this->SetPropertyDefault("ANDROID_ASSETS_DIRECTORIES", CM_NULLPTR); this->SetPropertyDefault("ANDROID_ANT_ADDITIONAL_OPTIONS", CM_NULLPTR); + this->SetPropertyDefault("BUILD_RPATH", ""); this->SetPropertyDefault("INSTALL_NAME_DIR", CM_NULLPTR); this->SetPropertyDefault("INSTALL_RPATH", ""); this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF"); diff --git a/Tests/MacRuntimePath/A/CMakeLists.txt b/Tests/MacRuntimePath/A/CMakeLists.txt index ade0a3c..bf937e6 100644 --- a/Tests/MacRuntimePath/A/CMakeLists.txt +++ b/Tests/MacRuntimePath/A/CMakeLists.txt @@ -40,21 +40,30 @@ target_link_libraries(test3 framework) add_executable(test4 test1.cpp) target_link_libraries(test4 shared2) +# executable to test a shared library dependency with build rpath +add_executable(test5 test1.cpp) + +# avoid linking by 'target_link_libraries' so CMake +# will not be able to set correct RPATH automatically +add_dependencies(test5 shared) +target_link_libraries(test5 "$") +set_target_properties(test5 PROPERTIES BUILD_RPATH "@loader_path/../lib") + set_target_properties(shared shared2 framework PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib") -set_target_properties(test1 test2 test3 test4 PROPERTIES +set_target_properties(test1 test2 test3 test4 test5 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") foreach(config ${CMAKE_CONFIGURATION_TYPES}) string(TOUPPER ${config} CONFIG) set_target_properties(shared shared2 framework PROPERTIES LIBRARY_OUTPUT_DIRECTORY_${CONFIG} "${CMAKE_CURRENT_BINARY_DIR}/${config}/lib") - set_target_properties(test1 test2 test3 test4 PROPERTIES + set_target_properties(test1 test2 test3 test4 test5 PROPERTIES RUNTIME_OUTPUT_DIRECTORY_${CONFIG} "${CMAKE_CURRENT_BINARY_DIR}/${config}/bin") endforeach() -foreach(test test1 test2 test3 test4) +foreach(test test1 test2 test3 test4 test5) add_custom_target(${test}_run ALL COMMAND ${test} DEPENDS ${test} ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/manual/cmake-variables.7.rst | 1 + Help/prop_tgt/BUILD_RPATH.rst | 10 ++++++++++ Help/release/dev/add-BUILD_RPATH.rst | 6 ++++++ Help/variable/CMAKE_BUILD_RPATH.rst | 10 ++++++++++ Source/cmComputeLinkInformation.cxx | 6 ++++++ Source/cmGeneratorTarget.cxx | 3 +++ Source/cmTarget.cxx | 1 + Tests/MacRuntimePath/A/CMakeLists.txt | 15 ++++++++++++--- 9 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 Help/prop_tgt/BUILD_RPATH.rst create mode 100644 Help/release/dev/add-BUILD_RPATH.rst create mode 100644 Help/variable/CMAKE_BUILD_RPATH.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 13:42:23 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 13:42:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1314-g86aeeb1 Message-ID: <20161003174223.4ABA5E631F@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 86aeeb1a3f61a56e9a864ff3be8cba47ca76ef45 (commit) via 6dd39afe104b89baf051e803ff22551a74176bda (commit) from e6cd89b6b31760c5aee1aa0ae354014cd4b498e8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=86aeeb1a3f61a56e9a864ff3be8cba47ca76ef45 commit 86aeeb1a3f61a56e9a864ff3be8cba47ca76ef45 Merge: e6cd89b 6dd39af Author: Brad King AuthorDate: Mon Oct 3 13:42:22 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 3 13:42:22 2016 -0400 Merge topic 'add-BUILD_RPATH' into next 6dd39afe fixup! Add a BUILD_RPATH target property specifying build-tree RPATH entries https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6dd39afe104b89baf051e803ff22551a74176bda commit 6dd39afe104b89baf051e803ff22551a74176bda Author: Brad King AuthorDate: Mon Oct 3 13:41:13 2016 -0400 Commit: Brad King CommitDate: Mon Oct 3 13:41:13 2016 -0400 fixup! Add a BUILD_RPATH target property specifying build-tree RPATH entries diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index cb6abb3..13a4744 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -102,7 +102,7 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, this->SetPropertyDefault("ANDROID_JAR_DEPENDENCIES", CM_NULLPTR); this->SetPropertyDefault("ANDROID_ASSETS_DIRECTORIES", CM_NULLPTR); this->SetPropertyDefault("ANDROID_ANT_ADDITIONAL_OPTIONS", CM_NULLPTR); - this->SetPropertyDefault("BUILD_RPATH", ""); + this->SetPropertyDefault("BUILD_RPATH", CM_NULLPTR); this->SetPropertyDefault("INSTALL_NAME_DIR", CM_NULLPTR); this->SetPropertyDefault("INSTALL_RPATH", ""); this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF"); ----------------------------------------------------------------------- Summary of changes: Source/cmTarget.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 3 13:42:35 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 3 Oct 2016 13:42:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1316-gf3f0ad7 Message-ID: <20161003174235.B5561E631A@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 f3f0ad74f30e540b6ab60840e63f33e1edd97508 (commit) via dc6d8066607435a0d4b6338bc53e0b1ac746bd35 (commit) from 86aeeb1a3f61a56e9a864ff3be8cba47ca76ef45 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f3f0ad74f30e540b6ab60840e63f33e1edd97508 commit f3f0ad74f30e540b6ab60840e63f33e1edd97508 Merge: 86aeeb1 dc6d806 Author: Brad King AuthorDate: Mon Oct 3 13:42:34 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 3 13:42:34 2016 -0400 Merge topic 'add-BUILD_RPATH' into next dc6d8066 Add a BUILD_RPATH target property specifying build-tree RPATH entries https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc6d8066607435a0d4b6338bc53e0b1ac746bd35 commit dc6d8066607435a0d4b6338bc53e0b1ac746bd35 Author: Ruslan Baratov AuthorDate: Sat Oct 1 02:30:57 2016 +0300 Commit: Brad King CommitDate: Mon Oct 3 13:42:27 2016 -0400 Add a BUILD_RPATH target property specifying build-tree RPATH entries Users may need to add custom `RPATH` entries to be able to run binaries from their build tree without setting `LD_LIBRARY_PATH`. Provide a way to do this that does not affect the install-tree `RPATH`. diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 271f497..fa21a1f 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -121,6 +121,7 @@ Properties on Targets /prop_tgt/AUTORCC /prop_tgt/AUTORCC_OPTIONS /prop_tgt/BINARY_DIR + /prop_tgt/BUILD_RPATH /prop_tgt/BUILD_WITH_INSTALL_RPATH /prop_tgt/BUNDLE_EXTENSION /prop_tgt/BUNDLE diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index b74f867..f76c467 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -257,6 +257,7 @@ Variables that Control the Build /variable/CMAKE_AUTORCC_OPTIONS /variable/CMAKE_AUTOUIC /variable/CMAKE_AUTOUIC_OPTIONS + /variable/CMAKE_BUILD_RPATH /variable/CMAKE_BUILD_WITH_INSTALL_RPATH /variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY /variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG diff --git a/Help/prop_tgt/BUILD_RPATH.rst b/Help/prop_tgt/BUILD_RPATH.rst new file mode 100644 index 0000000..27393f5 --- /dev/null +++ b/Help/prop_tgt/BUILD_RPATH.rst @@ -0,0 +1,10 @@ +BUILD_RPATH +----------- + +A :ref:`;-list ` specifying runtime path (``RPATH``) +entries to add to binaries linked in the build tree (for platforms that +support it). The entries will *not* be used for binaries in the install +tree. See also the :prop_tgt:`INSTALL_RPATH` target property. + +This property is initialized by the value of the variable +:variable:`CMAKE_BUILD_RPATH` if it is set when a target is created. diff --git a/Help/release/dev/add-BUILD_RPATH.rst b/Help/release/dev/add-BUILD_RPATH.rst new file mode 100644 index 0000000..0d69e45 --- /dev/null +++ b/Help/release/dev/add-BUILD_RPATH.rst @@ -0,0 +1,6 @@ +add-BUILD_RPATH +--------------- + +* A :variable:`CMAKE_BUILD_RPATH` variable and corresponding + :prop_tgt:`BUILD_RPATH` target property were added to support custom + ``RPATH`` locations to be added to binaries in the build tree. diff --git a/Help/variable/CMAKE_BUILD_RPATH.rst b/Help/variable/CMAKE_BUILD_RPATH.rst new file mode 100644 index 0000000..f20eb41 --- /dev/null +++ b/Help/variable/CMAKE_BUILD_RPATH.rst @@ -0,0 +1,10 @@ +CMAKE_BUILD_RPATH +----------------- + +A :ref:`;-list ` specifying runtime path (``RPATH``) +entries to add to binaries linked in the build tree (for platforms that +support it). The entries will *not* be used for binaries in the install +tree. See also the :variable:`CMAKE_INSTALL_RPATH` variable. + +This is used to initialize the :prop_tgt:`BUILD_RPATH` target property +for all targets. diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index dc8236d..0807ef8 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1710,6 +1710,12 @@ void cmComputeLinkInformation::GetRPath(std::vector& runtimeDirs, const char* install_rpath = this->Target->GetProperty("INSTALL_RPATH"); cmCLI_ExpandListUnique(install_rpath, runtimeDirs, emitted); } + if (use_build_rpath) { + // Add directories explicitly specified by user + if (const char* build_rpath = this->Target->GetProperty("BUILD_RPATH")) { + cmCLI_ExpandListUnique(build_rpath, runtimeDirs, emitted); + } + } if (use_build_rpath || use_link_rpath) { std::string rootPath = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); const char* stagePath = diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index e8d66a2..7eb0ebf 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4965,6 +4965,9 @@ bool cmGeneratorTarget::HaveBuildTreeRPATH(const std::string& config) const if (this->GetPropertyAsBool("SKIP_BUILD_RPATH")) { return false; } + if (this->GetProperty("BUILD_RPATH")) { + return true; + } if (cmLinkImplementationLibraries const* impl = this->GetLinkImplementationLibraries(config)) { return !impl->Libraries.empty(); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 54e0bea..13a4744 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -102,6 +102,7 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, this->SetPropertyDefault("ANDROID_JAR_DEPENDENCIES", CM_NULLPTR); this->SetPropertyDefault("ANDROID_ASSETS_DIRECTORIES", CM_NULLPTR); this->SetPropertyDefault("ANDROID_ANT_ADDITIONAL_OPTIONS", CM_NULLPTR); + this->SetPropertyDefault("BUILD_RPATH", CM_NULLPTR); this->SetPropertyDefault("INSTALL_NAME_DIR", CM_NULLPTR); this->SetPropertyDefault("INSTALL_RPATH", ""); this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF"); diff --git a/Tests/MacRuntimePath/A/CMakeLists.txt b/Tests/MacRuntimePath/A/CMakeLists.txt index ade0a3c..bf937e6 100644 --- a/Tests/MacRuntimePath/A/CMakeLists.txt +++ b/Tests/MacRuntimePath/A/CMakeLists.txt @@ -40,21 +40,30 @@ target_link_libraries(test3 framework) add_executable(test4 test1.cpp) target_link_libraries(test4 shared2) +# executable to test a shared library dependency with build rpath +add_executable(test5 test1.cpp) + +# avoid linking by 'target_link_libraries' so CMake +# will not be able to set correct RPATH automatically +add_dependencies(test5 shared) +target_link_libraries(test5 "$") +set_target_properties(test5 PROPERTIES BUILD_RPATH "@loader_path/../lib") + set_target_properties(shared shared2 framework PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib") -set_target_properties(test1 test2 test3 test4 PROPERTIES +set_target_properties(test1 test2 test3 test4 test5 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") foreach(config ${CMAKE_CONFIGURATION_TYPES}) string(TOUPPER ${config} CONFIG) set_target_properties(shared shared2 framework PROPERTIES LIBRARY_OUTPUT_DIRECTORY_${CONFIG} "${CMAKE_CURRENT_BINARY_DIR}/${config}/lib") - set_target_properties(test1 test2 test3 test4 PROPERTIES + set_target_properties(test1 test2 test3 test4 test5 PROPERTIES RUNTIME_OUTPUT_DIRECTORY_${CONFIG} "${CMAKE_CURRENT_BINARY_DIR}/${config}/bin") endforeach() -foreach(test test1 test2 test3 test4) +foreach(test test1 test2 test3 test4 test5) add_custom_target(${test}_run ALL COMMAND ${test} DEPENDS ${test} ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Tue Oct 4 00:01:09 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 4 Oct 2016 00:01:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1307-g05d802a Message-ID: <20161004040109.76203F548F@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 05d802a77ef94452e8b89c1bf3412c78f0e86c97 (commit) from 484dc1e5d85f4f468e27816eab0fccc9c7d6ec11 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05d802a77ef94452e8b89c1bf3412c78f0e86c97 commit 05d802a77ef94452e8b89c1bf3412c78f0e86c97 Author: Kitware Robot AuthorDate: Tue Oct 4 00:01:05 2016 -0400 Commit: Kitware Robot CommitDate: Tue Oct 4 00:01:05 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 778a799..41a4d94 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 7) -set(CMake_VERSION_PATCH 20161003) +set(CMake_VERSION_PATCH 20161004) #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 Oct 4 09:18:35 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 09:18:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1318-gae55ba6 Message-ID: <20161004131835.65182F3B33@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 ae55ba6c866b3b5ea76b3edaefa4226c1815b11d (commit) via 68277e16c474ca48e4aabd36603fd9ec4466fe28 (commit) from f3f0ad74f30e540b6ab60840e63f33e1edd97508 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae55ba6c866b3b5ea76b3edaefa4226c1815b11d commit ae55ba6c866b3b5ea76b3edaefa4226c1815b11d Merge: f3f0ad7 68277e1 Author: Brad King AuthorDate: Tue Oct 4 09:18:34 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 09:18:34 2016 -0400 Merge topic 'cmake-server-improve-shutdown' into next 68277e16 server-mode: Improve shutdown behavior https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68277e16c474ca48e4aabd36603fd9ec4466fe28 commit 68277e16c474ca48e4aabd36603fd9ec4466fe28 Author: Tobias Hunger AuthorDate: Tue Oct 4 13:28:38 2016 +0200 Commit: Brad King CommitDate: Tue Oct 4 09:15:32 2016 -0400 server-mode: Improve shutdown behavior Add a signal handler to trigger shutdown and be more paranoid about libuv doing things asynchronously. This should fix test cases not shutting down properly. diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx index b97590b..41ec8b4 100644 --- a/Source/cmFileMonitor.cxx +++ b/Source/cmFileMonitor.cxx @@ -12,7 +12,7 @@ namespace { void on_directory_change(uv_fs_event_t* handle, const char* filename, int events, int status); -void on_handle_close(uv_handle_t* handle); +void on_fs_close(uv_handle_t* handle); } // namespace class cmIBaseWatcher @@ -177,7 +177,7 @@ public: { if (this->Handle) { uv_fs_event_stop(this->Handle); - uv_close(reinterpret_cast(this->Handle), &on_handle_close); + uv_close(reinterpret_cast(this->Handle), &on_fs_close); this->Handle = nullptr; } cmVirtualDirectoryWatcher::StopWatching(); @@ -292,9 +292,9 @@ void on_directory_change(uv_fs_event_t* handle, const char* filename, watcher->Trigger(pathSegment, events, status); } -void on_handle_close(uv_handle_t* handle) +void on_fs_close(uv_handle_t* handle) { - delete (reinterpret_cast(handle)); + delete reinterpret_cast(handle); } } // namespace diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx index c9822d3..a814d16 100644 --- a/Source/cmServerConnection.cxx +++ b/Source/cmServerConnection.cxx @@ -30,7 +30,7 @@ void on_read(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) if (nread >= 0) { conn->ReadData(std::string(buf->base, buf->base + nread)); } else { - conn->HandleEof(); + conn->TriggerShutdown(); } delete[](buf->base); @@ -56,6 +56,28 @@ void on_new_connection(uv_stream_t* stream, int status) conn->Connect(stream); } +void on_signal(uv_signal_t* signal, int signum) +{ + auto conn = reinterpret_cast(signal->data); + (void)(signum); + conn->TriggerShutdown(); +} + +void on_signal_close(uv_handle_t* handle) +{ + delete reinterpret_cast(handle); +} + +void on_pipe_close(uv_handle_t* handle) +{ + delete reinterpret_cast(handle); +} + +void on_tty_close(uv_handle_t* handle) +{ + delete reinterpret_cast(handle); +} + } // namespace class LoopGuard @@ -64,19 +86,25 @@ public: LoopGuard(cmServerConnection* connection) : Connection(connection) { - Connection->mLoop = uv_default_loop(); - if (Connection->mLoop) { - Connection->mFileMonitor = new cmFileMonitor(Connection->mLoop); + this->Connection->mLoop = uv_default_loop(); + if (!this->Connection->mLoop) { + return; } + this->Connection->mFileMonitor = + new cmFileMonitor(this->Connection->mLoop); } ~LoopGuard() { - if (Connection->mFileMonitor) { - delete Connection->mFileMonitor; + if (!this->Connection->mLoop) { + return; } - uv_loop_close(Connection->mLoop); - Connection->mLoop = nullptr; + + if (this->Connection->mFileMonitor) { + delete this->Connection->mFileMonitor; + } + uv_loop_close(this->Connection->mLoop); + this->Connection->mLoop = nullptr; } private: @@ -111,6 +139,16 @@ bool cmServerConnection::ProcessEvents(std::string* errorMessage) return false; } + this->SIGINTHandler = new uv_signal_t; + uv_signal_init(this->mLoop, this->SIGINTHandler); + this->SIGINTHandler->data = static_cast(this); + uv_signal_start(this->SIGINTHandler, &on_signal, SIGINT); + + this->SIGHUPHandler = new uv_signal_t; + uv_signal_init(this->mLoop, this->SIGHUPHandler); + this->SIGHUPHandler->data = static_cast(this); + uv_signal_start(this->SIGHUPHandler, &on_signal, SIGHUP); + if (!DoSetup(errorMessage)) { return false; } @@ -162,9 +200,21 @@ void cmServerConnection::ReadData(const std::string& data) } } -void cmServerConnection::HandleEof() +void cmServerConnection::TriggerShutdown() { this->FileMonitor()->StopMonitoring(); + + uv_signal_stop(this->SIGINTHandler); + uv_signal_stop(this->SIGHUPHandler); + + uv_close(reinterpret_cast(this->SIGINTHandler), + &on_signal_close); // delete handle + uv_close(reinterpret_cast(this->SIGHUPHandler), + &on_signal_close); // delete handle + + this->SIGINTHandler = nullptr; + this->SIGHUPHandler = nullptr; + this->TearDown(); } @@ -194,30 +244,42 @@ void cmServerConnection::SendGreetings() Server->PrintHello(); } +cmServerStdIoConnection::cmServerStdIoConnection() +{ + this->Input.tty = nullptr; + this->Output.tty = nullptr; +} + bool cmServerStdIoConnection::DoSetup(std::string* errorMessage) { (void)(errorMessage); if (uv_guess_handle(1) == UV_TTY) { - uv_tty_init(this->Loop(), &this->Input.tty, 0, 1); - uv_tty_set_mode(&this->Input.tty, UV_TTY_MODE_NORMAL); - Input.tty.data = this; - this->ReadStream = reinterpret_cast(&this->Input.tty); - - uv_tty_init(this->Loop(), &this->Output.tty, 1, 0); - uv_tty_set_mode(&this->Output.tty, UV_TTY_MODE_NORMAL); - Output.tty.data = this; - this->WriteStream = reinterpret_cast(&this->Output.tty); + usesTty = true; + this->Input.tty = new uv_tty_t; + uv_tty_init(this->Loop(), this->Input.tty, 0, 1); + uv_tty_set_mode(this->Input.tty, UV_TTY_MODE_NORMAL); + Input.tty->data = this; + this->ReadStream = reinterpret_cast(this->Input.tty); + + this->Output.tty = new uv_tty_t; + uv_tty_init(this->Loop(), this->Output.tty, 1, 0); + uv_tty_set_mode(this->Output.tty, UV_TTY_MODE_NORMAL); + Output.tty->data = this; + this->WriteStream = reinterpret_cast(this->Output.tty); } else { - uv_pipe_init(this->Loop(), &this->Input.pipe, 0); - uv_pipe_open(&this->Input.pipe, 0); - Input.pipe.data = this; - this->ReadStream = reinterpret_cast(&this->Input.pipe); - - uv_pipe_init(this->Loop(), &this->Output.pipe, 0); - uv_pipe_open(&this->Output.pipe, 1); - Output.pipe.data = this; - this->WriteStream = reinterpret_cast(&this->Output.pipe); + usesTty = false; + this->Input.pipe = new uv_pipe_t; + uv_pipe_init(this->Loop(), this->Input.pipe, 0); + uv_pipe_open(this->Input.pipe, 0); + Input.pipe->data = this; + this->ReadStream = reinterpret_cast(this->Input.pipe); + + this->Output.pipe = new uv_pipe_t; + uv_pipe_init(this->Loop(), this->Output.pipe, 0); + uv_pipe_open(this->Output.pipe, 1); + Output.pipe->data = this; + this->WriteStream = reinterpret_cast(this->Output.pipe); } SendGreetings(); @@ -228,26 +290,35 @@ bool cmServerStdIoConnection::DoSetup(std::string* errorMessage) void cmServerStdIoConnection::TearDown() { - uv_close(reinterpret_cast(this->ReadStream), nullptr); + if (usesTty) { + uv_close(reinterpret_cast(this->Input.tty), &on_tty_close); + uv_close(reinterpret_cast(this->Output.tty), &on_tty_close); + this->Input.tty = nullptr; + this->Output.tty = nullptr; + } else { + uv_close(reinterpret_cast(this->Input.pipe), &on_pipe_close); + uv_close(reinterpret_cast(this->Output.pipe), + &on_pipe_close); + this->Input.pipe = nullptr; + this->Input.pipe = nullptr; + } this->ReadStream = nullptr; - uv_close(reinterpret_cast(this->WriteStream), nullptr); this->WriteStream = nullptr; } cmServerPipeConnection::cmServerPipeConnection(const std::string& name) : PipeName(name) { - this->ServerPipe.data = nullptr; - this->ClientPipe.data = nullptr; } bool cmServerPipeConnection::DoSetup(std::string* errorMessage) { - uv_pipe_init(this->Loop(), &this->ServerPipe, 0); - this->ServerPipe.data = this; + this->ServerPipe = new uv_pipe_t; + uv_pipe_init(this->Loop(), this->ServerPipe, 0); + this->ServerPipe->data = this; int r; - if ((r = uv_pipe_bind(&this->ServerPipe, this->PipeName.c_str())) != 0) { + if ((r = uv_pipe_bind(this->ServerPipe, this->PipeName.c_str())) != 0) { *errorMessage = std::string("Internal Error with ") + this->PipeName + ": " + uv_err_name(r); return false; @@ -265,31 +336,34 @@ bool cmServerPipeConnection::DoSetup(std::string* errorMessage) void cmServerPipeConnection::TearDown() { - if (this->WriteStream->data) { - uv_close(reinterpret_cast(this->WriteStream), nullptr); + if (this->ClientPipe) { + uv_close(reinterpret_cast(this->ClientPipe), &on_pipe_close); this->WriteStream->data = nullptr; } - uv_close(reinterpret_cast(&this->ServerPipe), nullptr); + uv_close(reinterpret_cast(&this->ServerPipe), &on_pipe_close); + this->ClientPipe = nullptr; + this->ServerPipe = nullptr; this->WriteStream = nullptr; this->ReadStream = nullptr; } void cmServerPipeConnection::Connect(uv_stream_t* server) { - if (this->ClientPipe.data == this) { + if (this->ClientPipe) { // Accept and close all pipes but the first: - uv_pipe_t rejectPipe; + uv_pipe_t* rejectPipe = new uv_pipe_t; - uv_pipe_init(this->Loop(), &rejectPipe, 0); - auto rejecter = reinterpret_cast(&rejectPipe); + uv_pipe_init(this->Loop(), rejectPipe, 0); + auto rejecter = reinterpret_cast(rejectPipe); uv_accept(server, rejecter); - uv_close(reinterpret_cast(rejecter), nullptr); + uv_close(reinterpret_cast(rejecter), &on_pipe_close); return; } - uv_pipe_init(this->Loop(), &this->ClientPipe, 0); - this->ClientPipe.data = this; + this->ClientPipe = new uv_pipe_t; + uv_pipe_init(this->Loop(), this->ClientPipe, 0); + this->ClientPipe->data = this; auto client = reinterpret_cast(&this->ClientPipe); if (uv_accept(server, client) != 0) { uv_close(reinterpret_cast(client), nullptr); diff --git a/Source/cmServerConnection.h b/Source/cmServerConnection.h index 78842e7..3efe28d 100644 --- a/Source/cmServerConnection.h +++ b/Source/cmServerConnection.h @@ -24,7 +24,7 @@ public: bool ProcessEvents(std::string* errorMessage); void ReadData(const std::string& data); - void HandleEof(); + void TriggerShutdown(); void WriteData(const std::string& data); void ProcessNextRequest(); @@ -51,6 +51,8 @@ private: uv_loop_t* mLoop = nullptr; cmFileMonitor* mFileMonitor = nullptr; cmServer* Server = nullptr; + uv_signal_t* SIGINTHandler = nullptr; + uv_signal_t* SIGHUPHandler = nullptr; friend class LoopGuard; }; @@ -58,6 +60,7 @@ private: class cmServerStdIoConnection : public cmServerConnection { public: + cmServerStdIoConnection(); bool DoSetup(std::string* errorMessage) override; void TearDown() override; @@ -65,10 +68,12 @@ public: private: typedef union { - uv_tty_t tty; - uv_pipe_t pipe; + uv_tty_t* tty; + uv_pipe_t* pipe; } InOutUnion; + bool usesTty = false; + InOutUnion Input; InOutUnion Output; }; @@ -85,6 +90,6 @@ public: private: const std::string PipeName; - uv_pipe_t ServerPipe; - uv_pipe_t ClientPipe; + uv_pipe_t* ServerPipe = nullptr; + uv_pipe_t* ClientPipe = nullptr; }; ----------------------------------------------------------------------- Summary of changes: Source/cmFileMonitor.cxx | 8 +- Source/cmServerConnection.cxx | 162 ++++++++++++++++++++++++++++++----------- Source/cmServerConnection.h | 15 ++-- 3 files changed, 132 insertions(+), 53 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 4 09:23:09 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 09:23:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1309-g834efe1 Message-ID: <20161004132309.337BCF59A7@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 834efe12bf6bf8059e545ac496eeb390c08e4220 (commit) via dc6d8066607435a0d4b6338bc53e0b1ac746bd35 (commit) from 05d802a77ef94452e8b89c1bf3412c78f0e86c97 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=834efe12bf6bf8059e545ac496eeb390c08e4220 commit 834efe12bf6bf8059e545ac496eeb390c08e4220 Merge: 05d802a dc6d806 Author: Brad King AuthorDate: Tue Oct 4 09:23:06 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 09:23:06 2016 -0400 Merge topic 'add-BUILD_RPATH' dc6d8066 Add a BUILD_RPATH target property specifying build-tree RPATH entries ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/manual/cmake-variables.7.rst | 1 + Help/prop_tgt/BUILD_RPATH.rst | 10 ++++++++++ Help/release/dev/add-BUILD_RPATH.rst | 6 ++++++ Help/variable/CMAKE_BUILD_RPATH.rst | 10 ++++++++++ Source/cmComputeLinkInformation.cxx | 6 ++++++ Source/cmGeneratorTarget.cxx | 3 +++ Source/cmTarget.cxx | 1 + Tests/MacRuntimePath/A/CMakeLists.txt | 15 ++++++++++++--- 9 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 Help/prop_tgt/BUILD_RPATH.rst create mode 100644 Help/release/dev/add-BUILD_RPATH.rst create mode 100644 Help/variable/CMAKE_BUILD_RPATH.rst hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 4 09:23:28 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 09:23:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1321-g9f041e9 Message-ID: <20161004132328.ACC0CF5A2F@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 9f041e9f37d8228670eabfcc8132d1c3819a1423 (commit) via 834efe12bf6bf8059e545ac496eeb390c08e4220 (commit) via 05d802a77ef94452e8b89c1bf3412c78f0e86c97 (commit) from ae55ba6c866b3b5ea76b3edaefa4226c1815b11d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f041e9f37d8228670eabfcc8132d1c3819a1423 commit 9f041e9f37d8228670eabfcc8132d1c3819a1423 Merge: ae55ba6 834efe1 Author: Brad King AuthorDate: Tue Oct 4 09:23:16 2016 -0400 Commit: Brad King CommitDate: Tue Oct 4 09:23:16 2016 -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 Oct 4 09:38:52 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 09:38:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1323-g0f847e7 Message-ID: <20161004133852.EBC92F5E2E@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 0f847e7042105fe1456dbf23eff9477a3dd254fc (commit) via 5385817762e636ae27717891892786294749aee2 (commit) from 9f041e9f37d8228670eabfcc8132d1c3819a1423 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f847e7042105fe1456dbf23eff9477a3dd254fc commit 0f847e7042105fe1456dbf23eff9477a3dd254fc Merge: 9f041e9 5385817 Author: Brad King AuthorDate: Tue Oct 4 09:38:52 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 09:38:52 2016 -0400 Merge topic 'no-define-cout-cerr' into next 53858177 Do not define cout/cerr preprocessor symbols https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5385817762e636ae27717891892786294749aee2 commit 5385817762e636ae27717891892786294749aee2 Author: Brad King AuthorDate: Tue Oct 4 09:34:37 2016 -0400 Commit: Brad King CommitDate: Tue Oct 4 09:34:37 2016 -0400 Do not define cout/cerr preprocessor symbols Apply the change from commit bd3d0eaf (cmCTest: don't redefine cout and cerr, 2016-09-01) to the rest of ctest and cpack. These definitions are no longer needed because our conventions are well established. diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index 9232ffc..db20998 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -32,16 +32,6 @@ class cmMakefile; cmCPackLog_msg.str().c_str()); \ } while (0) -#ifdef cerr -#undef cerr -#endif -#define cerr no_cerr_use_cmCPack_Log - -#ifdef cout -#undef cout -#endif -#define cout no_cout_use_cmCPack_Log - /** \class cmCPackGenerator * \brief A superclass of all CPack Generators * diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx index be429fe..317f613 100644 --- a/Source/CPack/cmCPackLog.cxx +++ b/Source/CPack/cmCPackLog.cxx @@ -15,8 +15,6 @@ cmCPackLog::cmCPackLog() this->NewLine = true; this->LastTag = cmCPackLog::NOTAG; -#undef cerr -#undef cout this->DefaultOutput = &std::cout; this->DefaultError = &std::cerr; diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 0831843..370879d 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -19,16 +19,6 @@ (ctSelf)->Log(logType, __FILE__, __LINE__, cmCPackLog_msg.str().c_str()); \ } while (0) -#ifdef cerr -#undef cerr -#endif -#define cerr no_cerr_use_cmCPack_Log - -#ifdef cout -#undef cout -#endif -#define cout no_cout_use_cmCPack_Log - /** \class cmCPackLog * \brief A container for CPack generators * diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 5c45b14..a3281ab 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -415,9 +415,7 @@ int main(int argc, char const* const* argv) } doc.SetSection("Generators", v); -#undef cout return doc.PrintRequestedDocumentation(std::cout) ? 0 : 1; -#define cout no_cout_use_cmCPack_Log } if (cmSystemTools::GetErrorOccuredFlag()) { diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index b37db30..0052a16 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -375,11 +375,7 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml) xml.StartElement("DefectList"); for (cc = 0; cc < this->GlobalResults.size(); cc++) { if (this->GlobalResults[cc]) { -#ifdef cerr -#undef cerr -#endif std::cerr.width(35); -#define cerr no_cerr cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, this->ResultStringsLong[cc] << " - " << this->GlobalResults[cc] << std::endl, diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 1824d94..7dc9e33 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2651,13 +2651,6 @@ static const char* cmCTestStringLogType[] = { "DEBUG", "ERROR_MESSAGE", CM_NULLPTR }; -#ifdef cerr -#undef cerr -#endif -#ifdef cout -#undef cout -#endif - #define cmCTestLogOutputFileLine(stream) \ if (this->ShowLineNumbers) { \ (stream) << std::endl << file << ":" << line << " "; \ diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 1fb39ff..8ab17b9 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -163,11 +163,7 @@ int main(int argc, char const* const* argv) doc.SetSection("Name", cmDocumentationName); doc.SetSection("Usage", cmDocumentationUsage); doc.PrependSection("Options", cmDocumentationOptions); -#ifdef cout -#undef cout -#endif return doc.PrintRequestedDocumentation(std::cout) ? 0 : 1; -#define cout no_cout_use_cmCTestLog } } ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackGenerator.h | 10 ---------- Source/CPack/cmCPackLog.cxx | 2 -- Source/CPack/cmCPackLog.h | 10 ---------- Source/CPack/cpack.cxx | 2 -- Source/CTest/cmCTestMemCheckHandler.cxx | 4 ---- Source/cmCTest.cxx | 7 ------- Source/ctest.cxx | 4 ---- 7 files changed, 39 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 4 10:09:31 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 10:09:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1325-g1db6826 Message-ID: <20161004140931.E714BA7FF4@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 1db6826ae803e9e1c63a1a19bf953fdc1360002e (commit) via 4787330730a222103f40c65e5cae4cba28bca204 (commit) from 0f847e7042105fe1456dbf23eff9477a3dd254fc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1db6826ae803e9e1c63a1a19bf953fdc1360002e commit 1db6826ae803e9e1c63a1a19bf953fdc1360002e Merge: 0f847e7 4787330 Author: Brad King AuthorDate: Tue Oct 4 10:09:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 10:09:31 2016 -0400 Merge topic 'macOS-no-tar.Z' into next 47873307 Utilities/Release: Drop macOS .tar.Z binary https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4787330730a222103f40c65e5cae4cba28bca204 commit 4787330730a222103f40c65e5cae4cba28bca204 Author: Brad King AuthorDate: Tue Oct 4 10:08:28 2016 -0400 Commit: Brad King CommitDate: Tue Oct 4 10:08:28 2016 -0400 Utilities/Release: Drop macOS .tar.Z binary On macOS the gzip tool is universally available, so our `.tar.gz` is sufficient. diff --git a/Utilities/Release/osx_release.cmake b/Utilities/Release/osx_release.cmake index 27c820f..88ea39b 100644 --- a/Utilities/Release/osx_release.cmake +++ b/Utilities/Release/osx_release.cmake @@ -4,7 +4,7 @@ set(BOOTSTRAP_ARGS "--prefix=/ --docdir=doc/cmake") set(HOST dragnipur) set(MAKE_PROGRAM "make") set(MAKE "${MAKE_PROGRAM} -j5") -set(CPACK_BINARY_GENERATORS "DragNDrop TGZ TZ") +set(CPACK_BINARY_GENERATORS "DragNDrop TGZ") set(CPACK_SOURCE_GENERATORS "TGZ TZ") set(CPACK_DMG_FORMAT "UDBZ") #build using bzip2 for smaller package size set(CC clang) ----------------------------------------------------------------------- Summary of changes: Utilities/Release/osx_release.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 4 10:53:30 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 10:53:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1327-g25ea96c Message-ID: <20161004145330.97219F585C@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 25ea96c017ab81f958f26221155d95f7880fbf79 (commit) via 241858c5e6750dfdc8cc9dfcbc82a39735ba04af (commit) from 1db6826ae803e9e1c63a1a19bf953fdc1360002e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=25ea96c017ab81f958f26221155d95f7880fbf79 commit 25ea96c017ab81f958f26221155d95f7880fbf79 Merge: 1db6826 241858c Author: Brad King AuthorDate: Tue Oct 4 10:53:29 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 10:53:29 2016 -0400 Merge topic 'no-tar.Z-binaries' into next 241858c5 Utilities/Release: Drop Linux .tar.Z binary https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=241858c5e6750dfdc8cc9dfcbc82a39735ba04af commit 241858c5e6750dfdc8cc9dfcbc82a39735ba04af Author: Brad King AuthorDate: Tue Oct 4 10:52:28 2016 -0400 Commit: Brad King CommitDate: Tue Oct 4 10:52:28 2016 -0400 Utilities/Release: Drop Linux .tar.Z binary On Linux the gzip tool is universally available, so our `.tar.gz` is sufficient. diff --git a/Utilities/Release/linux64_release.cmake b/Utilities/Release/linux64_release.cmake index b72fc12..b9447ca 100644 --- a/Utilities/Release/linux64_release.cmake +++ b/Utilities/Release/linux64_release.cmake @@ -2,6 +2,7 @@ set(PROCESSORS 4) set(BOOTSTRAP_ARGS "--docdir=doc/cmake") set(HOST linux64) set(MAKE_PROGRAM "make") +set(CPACK_BINARY_GENERATORS "STGZ TGZ") set(CC /opt/gcc-6.1.0/bin/gcc) set(CXX /opt/gcc-6.1.0/bin/g++) set(CFLAGS "") ----------------------------------------------------------------------- Summary of changes: Utilities/Release/linux64_release.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 4 11:31:06 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 11:31:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1312-g9203691 Message-ID: <20161004153106.7DF43F5E04@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 9203691f09341077365da6386ab8561a4ee51a8b (commit) via 241858c5e6750dfdc8cc9dfcbc82a39735ba04af (commit) via 4787330730a222103f40c65e5cae4cba28bca204 (commit) from 834efe12bf6bf8059e545ac496eeb390c08e4220 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9203691f09341077365da6386ab8561a4ee51a8b commit 9203691f09341077365da6386ab8561a4ee51a8b Merge: 834efe1 241858c Author: Brad King AuthorDate: Tue Oct 4 11:31:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 11:31:04 2016 -0400 Merge topic 'no-tar.Z-binaries' 241858c5 Utilities/Release: Drop Linux .tar.Z binary 47873307 Utilities/Release: Drop macOS .tar.Z binary ----------------------------------------------------------------------- Summary of changes: Utilities/Release/linux64_release.cmake | 1 + Utilities/Release/osx_release.cmake | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 4 11:31:26 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 11:31:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1329-g5fc1dba Message-ID: <20161004153126.6C6C4F5E04@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 5fc1dba0efe29c6e551593154f516f65075aa798 (commit) via 9203691f09341077365da6386ab8561a4ee51a8b (commit) from 25ea96c017ab81f958f26221155d95f7880fbf79 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5fc1dba0efe29c6e551593154f516f65075aa798 commit 5fc1dba0efe29c6e551593154f516f65075aa798 Merge: 25ea96c 9203691 Author: Brad King AuthorDate: Tue Oct 4 11:31:18 2016 -0400 Commit: Brad King CommitDate: Tue Oct 4 11:31:18 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 4 11:38:18 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 11:38:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1332-g21e9e41 Message-ID: <20161004153818.3D737F5E9A@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 21e9e419770ffd41884772439dbfda28cee623de (commit) via 730ba30726c8dd36cd48fa3259385587a4aa48f8 (commit) via 4376e47a2fdcf5d0c966df983a4205dce8147ff1 (commit) from 5fc1dba0efe29c6e551593154f516f65075aa798 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21e9e419770ffd41884772439dbfda28cee623de commit 21e9e419770ffd41884772439dbfda28cee623de Merge: 5fc1dba 730ba30 Author: Brad King AuthorDate: Tue Oct 4 11:38:17 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 11:38:17 2016 -0400 Merge topic 'utils-https-cmake.org' into next 730ba307 Utilities/Release: Update README to reference https URL 4376e47a Utilities/GitSetup: Fetch local hooks via https https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=730ba30726c8dd36cd48fa3259385587a4aa48f8 commit 730ba30726c8dd36cd48fa3259385587a4aa48f8 Author: Brad King AuthorDate: Tue Oct 4 11:37:16 2016 -0400 Commit: Brad King CommitDate: Tue Oct 4 11:37:16 2016 -0400 Utilities/Release: Update README to reference https URL diff --git a/Utilities/Release/README b/Utilities/Release/README index ed1d52e..11de1c3 100644 --- a/Utilities/Release/README +++ b/Utilities/Release/README @@ -1,7 +1,7 @@ To create a cmake release, make sure the "release" tag is pointing to the expected git commit: -http://cmake.org/gitweb?p=cmake.git;a=shortlog;h=refs/heads/release +https://cmake.org/gitweb?p=cmake.git;a=shortlog;h=refs/heads/release Then as kitware at hythloth, using an up-to-date CMake: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4376e47a2fdcf5d0c966df983a4205dce8147ff1 commit 4376e47a2fdcf5d0c966df983a4205dce8147ff1 Author: Brad King AuthorDate: Tue Oct 4 11:36:43 2016 -0400 Commit: Brad King CommitDate: Tue Oct 4 11:36:43 2016 -0400 Utilities/GitSetup: Fetch local hooks via https diff --git a/Utilities/GitSetup/config b/Utilities/GitSetup/config index b7d5423..d69a679 100644 --- a/Utilities/GitSetup/config +++ b/Utilities/GitSetup/config @@ -1,5 +1,5 @@ [hooks] - url = http://cmake.org/cmake.git + url = https://cmake.org/cmake.git [ssh] host = cmake.org key = id_git_cmake ----------------------------------------------------------------------- Summary of changes: Utilities/GitSetup/config | 2 +- Utilities/Release/README | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 4 11:43:12 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 11:43:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1334-g5d4fbac Message-ID: <20161004154312.814AEE1F2F@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 5d4fbacad99dcfdc6dad8b56965e79b61a9df68d (commit) via eb1a57d7e771d361f802f6120643788c6c3f78b7 (commit) from 21e9e419770ffd41884772439dbfda28cee623de (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d4fbacad99dcfdc6dad8b56965e79b61a9df68d commit 5d4fbacad99dcfdc6dad8b56965e79b61a9df68d Merge: 21e9e41 eb1a57d Author: Brad King AuthorDate: Tue Oct 4 11:43:11 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 11:43:11 2016 -0400 Merge topic 'qtifw-https-cmake.org' into next eb1a57d7 QtIFW: Reference cmake.org via https in cmake.org.html https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb1a57d7e771d361f802f6120643788c6c3f78b7 commit eb1a57d7e771d361f802f6120643788c6c3f78b7 Author: Brad King AuthorDate: Tue Oct 4 11:39:03 2016 -0400 Commit: Brad King CommitDate: Tue Oct 4 11:40:01 2016 -0400 QtIFW: Reference cmake.org via https in cmake.org.html diff --git a/Source/QtIFW/cmake.org.html b/Source/QtIFW/cmake.org.html index cf5649d..001d634 100644 --- a/Source/QtIFW/cmake.org.html +++ b/Source/QtIFW/cmake.org.html @@ -1,6 +1,6 @@ - + ----------------------------------------------------------------------- Summary of changes: Source/QtIFW/cmake.org.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 4 12:59:47 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 12:59:47 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1315-g62e33fc Message-ID: <20161004165947.C4ECBF5C36@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 62e33fcd08a08bf4a1835ab7bd98650150800978 (commit) via 730ba30726c8dd36cd48fa3259385587a4aa48f8 (commit) via 4376e47a2fdcf5d0c966df983a4205dce8147ff1 (commit) from 9203691f09341077365da6386ab8561a4ee51a8b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62e33fcd08a08bf4a1835ab7bd98650150800978 commit 62e33fcd08a08bf4a1835ab7bd98650150800978 Merge: 9203691 730ba30 Author: Brad King AuthorDate: Tue Oct 4 12:59:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 12:59:45 2016 -0400 Merge topic 'utils-https-cmake.org' 730ba307 Utilities/Release: Update README to reference https URL 4376e47a Utilities/GitSetup: Fetch local hooks via https ----------------------------------------------------------------------- Summary of changes: Utilities/GitSetup/config | 2 +- Utilities/Release/README | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 4 12:59:50 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 12:59:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1317-g38642f4 Message-ID: <20161004165950.91B58F5C38@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 38642f4fb78be70e84390947b1052994b8debd98 (commit) via eb1a57d7e771d361f802f6120643788c6c3f78b7 (commit) from 62e33fcd08a08bf4a1835ab7bd98650150800978 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38642f4fb78be70e84390947b1052994b8debd98 commit 38642f4fb78be70e84390947b1052994b8debd98 Merge: 62e33fc eb1a57d Author: Brad King AuthorDate: Tue Oct 4 12:59:48 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 12:59:48 2016 -0400 Merge topic 'qtifw-https-cmake.org' eb1a57d7 QtIFW: Reference cmake.org via https in cmake.org.html ----------------------------------------------------------------------- Summary of changes: Source/QtIFW/cmake.org.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 4 13:00:05 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 4 Oct 2016 13:00:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1337-g1d6b62a Message-ID: <20161004170005.21D84F5C36@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 1d6b62aa619dd4eba44c77587fc51349b73c9ce5 (commit) via 38642f4fb78be70e84390947b1052994b8debd98 (commit) via 62e33fcd08a08bf4a1835ab7bd98650150800978 (commit) from 5d4fbacad99dcfdc6dad8b56965e79b61a9df68d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1d6b62aa619dd4eba44c77587fc51349b73c9ce5 commit 1d6b62aa619dd4eba44c77587fc51349b73c9ce5 Merge: 5d4fbac 38642f4 Author: Brad King AuthorDate: Tue Oct 4 12:59:57 2016 -0400 Commit: Brad King CommitDate: Tue Oct 4 12:59:57 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From robert.maynard at kitware.com Tue Oct 4 16:29:41 2016 From: robert.maynard at kitware.com (Robert Maynard) Date: Tue, 4 Oct 2016 16:29:41 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.7.0-rc1, created. v3.7.0-rc1 Message-ID: <20161004202941.71CBBF5DC1@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.7.0-rc1 has been created at 4d730d27aa8695ec3ce3608b3f6fefb5685635fb (tag) tagging 1dc252ecf4d0946196133734540ebe8e90f312d3 (commit) replaces v3.6.2 tagged by Brad King on Tue Oct 4 11:02:55 2016 -0400 - Log ----------------------------------------------------------------- CMake 3.7.0-rc1 -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdBQJX88SfFhxicmFkLmtpbmdAa2l0d2FyZS5jb20ACgkQLSzvEDSS FoS9Lg//WrbCDruc9tBfeXGs1RdexiTl794TOBhhd5Yq6sDmpfnlHpWgO1MoxGbl qT6seb3a4h5dcBPWiccb8ElGsM6TUiwytTXLH+U19teteJOTA4RW7ioWbx0CUg4J KtEkQy0HW/BrQHIRbhrlO7FXQ72QLak72Rv2kA5nCGymh813BrqRBdcrae2+8SAZ L8C11vhIPQwKgwrByOMflmnUTLMyo49eME/D+LHt7i2VY7vWZS3Eap34jQCerEX7 FPGwp7AVPowB+ePHdwP+wpeyq5WU4nwwFVKcHgghu0azTk8uPrBiNwW9sioNtAys p6ewVAqERj7MUF2D9ORNxJKkos+0P5+GCXJqrNUDjQWHM1/mOr12emPlbpU2WoQC YbY3xWGN/WggSCk+iN1AYfbRcwoahHXHLOKta2SbR0VM+qUUnlk5P3HaozXg4+h/ 6/zeZRFnWRr3lNlifQv6+PBtB5RhuB434uSjIADcHPepsHAgXUzsxG3iy3dXiQpN gd994fzxBTqNIdXXYo0xOBhyP8je5wc2kLfZXZn9pz/2YzP44yMo5sQP9EkJCdjG 0UEXIoCsowNDYeyphJZ6XghcG1351c+PXr/husLjJ2NWdZ+V+t6eQeehb5D2GRLV PuwMtmxStfSZQa7tqAk0qyLkeo5askocquxyWF5g/neQ9Knypsg= =UPm9 -----END PGP SIGNATURE----- Alex Turbov (5): FindBoost: Test `CMAKE_CXX_COMPILER_{ID,VERSION}` instead of `MSVC*` FindBoost: Search in official Windows prebuilt binary library directory cmake: Add an option to control what files needs to be traced FindBoost: Add check headers for `zlib` and `bzip2` ExternalData: Hide security-sensitive details from output Alexander Shishenko (1): GetPrerequisites: Always filter objdump output as text Alexis Murzeau (1): FindOpenSSL: Fix detection of OpenSSL 1.1 Win32/64 Andreas Weis (1): FindBoost: Make imported targets fall back to `Release` Andrew Fuller (1): CPackRPM: Handle directives of form %foo and %foo(anything) Ben Boeckel (16): Help: clarify PARENT_SCOPE behavior cmFindPackageCommand: use iterators to loop over configurations cmFindPackageCommand: remove duplicate paths from error message Aux: check spelling in comments Aux: highlight Lua-style comments Aux: remove unused highlight links Aux: highlight deprecated commands as warnings Aux: highlight conditiona and repeat commands differently Aux: highlight modules using Include Aux: highlight CMAKE_{CMAKE,CPACK}_COMMAND variables Aux: sort the highlighting list Aux: highlight commands using Function issues: update references to the CMake issue tracker update-third-party: support Git 2.9.0's new merge restrictions cmGeneratorTarget: factor out a space ninja: error out on relink requirements Ben Campbell (1): FindGIF: Detect version from GIF 4.1.6 and above Ben Keller (1): install: Fix computed import prefix in export files when it is "/" Benjamin Ballet (2): VS: Handle VS_GLOBAL_RootNamespace special case VS: Explicitly default to v100 toolset in Visual Studio 2010 Bill Hoffman (8): Add options to run `ldd -u -r` as a "link-what-you-use" tool Export: Factor out file generation steps into helpers Export: Virtualize file generation step helpers cmake_parse_arguments: Add option to read arguments from ARGC/ARGV# Add support for creating prebuilt Android.mk files FindMatlab: Extend matlab_add_unit_test to run arbitrary test code ctest_coverage: If gcov is not found just warn, not error CTest: Add CAPTURE_CMAKE_ERROR val to `ctest_*` commands Boris Fomitchev (3): FindCUDA: Adjust vertical whitespace FindCUDA: Refactor Android(Tegra) support FindCUDA: Support `2.1(2.0)` architecture notation Brad King (709): Merge branch 'release' Begin post-3.6 development Merge topic 'bin-dir-option' Merge topic 'minor-cleanups' cmLocalGenerator: Consolidate conditions in AddArchitectureFlags Modules: Rename internal platform-specific compiler determination modules CPack/NSIS: Remove duplicate include from NSIS.template.in (#16132) CMakeDetermineCompilerId: Fix compiler id with square brackets in the path Merge topic 'FindHDF5-fix-already-found' Merge topic 'simplify-boolean-expressions' Merge topic 'fix-ti-link-order' Merge topic 'compiler-id-with-bracket-in-path' Merge topic 'FindOpenCL-imported-target' Merge topic 'size-empty' Merge topic 'cpack-nsis-remove-duplicate-include' Merge topic 'fix-TARGET_PROPERTY-LOCATION-crash' Merge topic 'minor-cleanups' Merge branch 'release' Merge topic 'FindLibArchive-3.2' Merge topic 'FindBoost-vs-prebuilt' Help: Add notes for 'productbuild' topic Merge topic 'productbuild' Merge topic 'remove-c_str' Merge topic 'SunOS-PathScale' Merge topic 'update-expat' Tests/FindOpenCL: Run clang-format to fix style Source/CPack: Run clang-format to fix style Help: Add notes for topic 'java-export-targets' Merge branch 'release' Run ranlib on archives only if the tool is available Merge topic 'clang-format-again' Merge topic 'find_path-in-framework' Merge topic 'bzip2-debug-names' Merge topic 'doc-ctest_update' Merge topic 'add-FindVulkan' Merge topic 'fix-libarchive-openssl-no-hashes' Tests/FindVulkan: Run clang-format Merge topic 'add-FindVulkan' Tests: Restore fix to Plugin test on Watcom compiler Merge topic 'java-export-targets' Merge topic 'xmlwriter' Merge topic 'small-cleanups' Merge topic 'refactor-cmLocalGenerator-flags' Merge topic 'ninja-no-ranlib-windows' Merge topic 'cmake-gui-osx-symlink-qt5-plugin' Merge topic 'watcom-workaround' Merge topic 'FindOpenSSL-BoringSSL' Merge topic 'FindCUDA-android' Merge topic 'FindFreetype-dedup-arguments' Merge topic 'FindProtobuf-proto-in-subdirs' Merge topic 'refactor-cmLocalGenerator-flags' cmLocalGenerator: Constify AppendDefines and AddCompileDefinitions Merge branch 'release' Merge topic 'refactor-cmLocalGenerator-flags' Merge topic 'bash-completion' Merge topic 'add-braces' Merge topic 'find-lib32' Merge topic 'fix-Message-API-ISP-violation' Merge topic 'avoid-cmMakefile-IssueMessage-after-configure' Merge topic 'fix-cmake-ISP-violation' Merge topic 'expose-cache-properties' Merge branch 'release' Merge branch 'release' Merge topic 'parent-scope-docs' Merge topic 'find_package-duplicate-search-paths' Merge topic 'clean-up-Parser' Merge topic 'clean-up-cmMakefile-IssueMessage' Merge topic 'iwyu-preparation' Merge topic 'findcuda-use-correct-runtime-for-required' Merge topic 'cleanup-streams' Merge topic 'cmOutputConverter-stringstream' Merge topic 'ice-3.6.2' Help: Add release note about XCODE_FILE_ATTRIBUTES source file property Help: Add notes for topic 'link_what_you_use' Merge topic 'CodeBlocks-include-order' Merge topic 'CodeBlocks-generated-sources' Merge topic 'ice-debug' Merge topic 'link_what_you_use' Merge topic 'xcode-mig-support' Refactor Makefile/Ninja tool working directory storage cmLocalGenerator: Add method to get Fortran-specific compiler flags cmake-gui: Reference LGPLv3 when redistributing Qt Merge topic 'doc-issue-tracker-move' Merge topic 'revert-vs-clang-minsize' Merge topic 'FindFreetype-debug-lib' Merge topic 'cmake-gui-Qt-LGPLv3' Merge topic 'refactor-flags' Merge topic 'pkgconfig-targets' Merge topic 'cpack-deb-test-fixes' Merge topic 'FindQt4-doc-QtDeclarative-imported' Merge topic 'cmake-trace-source' Merge branch 'release' Merge topic 'cmDependsJavaParserHelper-dangling-ptr' FindZLIB: Do not mark unused variable as advanced cmGeneratorTarget: Fix Fortran module directory regression Merge topic 'refactor-flags' Merge topic 'aix-clang' Merge topic 'FindBoost-imported-fallback-to-release' Merge topic 'update-libarchive' Merge topic 'FindLua-match-header-and-lib' Merge topic 'FindGLEW-debug' Merge topic '14068-ctest-target-set-buildname-with-only-c-compiler' Merge topic 'output-converter' Merge branch 'release' Merge topic 'doc-VS_STARTUP_PROJECT-clarify' Merge topic 'GetPrerequisites-findstr' Merge topic 'FindZLIB-fixup' Merge branch 'release' Merge branch 'release' Merge branch 'backport-GetPrerequisites-typo' into GetPrerequisites-typo Merge topic 'xcode-bundle-extension' Merge topic 'vs-sdk-refs' Merge topic 'vs-tool-override' Merge topic 'GetPrerequisites-typo' Merge topic 'doc-osx-versions' Merge topic 'ninja-osx-content-on-target' Merge topic 'ios-universal-fixes' Merge topic 'compiler-features' Merge branch 'release' Merge branch 'unknown-aliased-target' into compiler-features Merge topic 'ninja-no-rsp-for-rc' Merge topic 'FindHDF5-handle-unsuffixed' Merge topic 'compiler-features' Merge topic 'doc-cross-reference-lang-standard-and-extensions' GenerateExportHeader: Add option to specify custom content Merge topic 'revert-try_compile-config-flags' Merge topic 'GenerateExportHeader-custom-content' Merge topic 'cmliblzma-static' Tests: Run clang-format on GenerateExportHeader code Merge topic 'GenerateExportHeader-custom-content' try_compile: Add policy CMP0066 to honor CMAKE__FLAGS_ Avoid using KWSys auto_ptr by adopting it ourselves Merge branch 'release' liblzma: Remove CMake-specific README Merge branch 'upstream-liblzma' into update-liblzma liblzma: Revise update script to get version 5.0.8 Merge branch 'upstream-liblzma' into update-liblzma Merge branch 'release' Merge topic 'CM_OVERRIDE-clang' Merge topic 'CM_OVERRIDE-cmTypeMacro' Merge topic 'update-liblzma' Merge topic 'refactor-auto_ptr' Merge topic 'try_compile-config-flags' cmake-gui: Add build option to use Qt5 xcb plugin statically Merge topic 'doc-updates' Merge topic 'cmake-gui-static-xcb' Merge topic 'clang-format-script' Merge branch 'upstream-KWSys' into update-kwsys Utilities/Release: Compile OS X binary as C++11 Strip CMAKE__FLAGS[_] initializer whitespace Merge topic 'update-kwsys' Merge topic 'update-osx-release' Merge topic 'strip-flag-whitespace' Intel: Do not use MSVC-like flags for Fortran Intel: Do not use GNU-like flags on Windows FindJava: Do not document variables we do not provide ExternalProject: Match filenames in URLs with query strings and anchors Source/QtDialog: Run clang-format Merge topic 'cmake-gui-static-xcb' Merge topic 'cpack-ifw-list-variable' Merge topic 'cpack-ifw-fix-repo-attributes' Merge topic 'cpack-rpm-better-directive-match' Merge topic 'reorganize-cmCTest' Merge topic 'FindBoost-extras' Merge topic 'FindJava-doc-update' Merge topic 'FindJNI-ubuntu-paths' Merge topic 'FindJNI-cleanup' Merge topic 'ExternalProject-more-url-filenames' Merge topic 'windows-export-all-symbols' OpenWatcom: Partially modernize platform information modules Honor CMAKE__FLAGS[_]_INIT set in toolchain files Merge branch 'release' Utilities/Release: Switch to Qt 5.7 for Linux x86_64 binary Merge topic 'toolchain-flag-init' Merge topic 'update-linux64-release' Merge branch 'release' Merge topic 'ExternalProject-default-download-filename' Source: Remove long-unused .cvsignore file Tell Git to ignore .DS_Store files Merge topic 'add-gitignore' Merge topic 'tiff-typo' cmake: Drop unused -E cmake_call_visual_studio_macro code cmake: Fix -E env_vs8_wince implementation CMakeParseImplicitLinkInfo: Exclude libclang_rt libraries Help: Add notes for topic 'findicu' Merge topic 'cmake-spelling' Merge topic 'windows-export-all-from-exe' Merge topic 'find-command-restore-PATH-on-unix' Merge topic 'fix-cpack-rpm-different-package-names' Merge topic 'cpack-rpm-debug-logging-fix' Merge topic 'fix-cmake-E-env_vs8_wince' Merge topic 'no-export-cmake-version' Merge topic 'FindHDF5-fix-misc-issues' Merge topic 'findicu' Merge branch 'release' Tests: Run clang-format on FindICU test code Merge topic 'findicu' FindOpenMP: Improve documentation formatting FindOpenMP: Cleanup all variables unconditionally Utilities/Release: Update Windows binary host path to CMake Strip CMAKE_*_LINKER_FLAGS[_] initializer whitespace Embarcadero: Set all CMAKE_*_LINKER_FLAGS_INIT directly MSVC: Set all CMAKE_*_LINKER_FLAGS_INIT directly Merge topic 'no-implicit-link-clang-rt' Merge topic 'vs14-debug-enum-older-toolsets' Merge topic 'ExternalProject-alt-urls' Merge topic 'cmake-ifw-package-updates' Merge topic 'ExternalData-SecurityFix' Merge topic 'FindOpenMP-updates' Merge topic 'update-win-release' Honor CMAKE_*_LINKER_FLAGS[_]_INIT set in toolchain files Merge topic 'cmake-internal-info' Merge topic 'fix-pq-libraries' Merge topic 'toolchain-flag-init' Merge topic 'FindGIF-version' Merge topic 'ninja-portable-arg-max' Merge topic 'ninja-no-accidental-rsp' Merge topic 'vs-natvis' Merge branch 'release' Help: Add notes for topic 'FindBISON-report-file' Merge branch 'upstream-KWSys' into update-kwsys Merge topic 'FindBISON-report-file' Merge topic 'update-kwsys' Merge topic 'use-better-KWSys-GetEnv' Merge branch 'upstream-KWSys' into update-kwsys Merge topic 'compat-CPACK_INSTALL_CMAKE_PROJECTS-subdirectory' Merge topic 'update-kwsys' Merge branch 'upstream-KWSys' into update-kwsys bootstrap: Add support for MSYS2 Ninja: Fix inter-target order-only dependencies of custom commands Makefile: Factor out response file checks into common helper Makefile: Avoid link line object list lengths nearing system limits Merge topic 'update-kwsys' Merge topic 'bootstrap-msys2' Merge topic 'ninja-target-deps' Merge topic 'vs-alternate-RootNamespace' VS: Fix WINDOWS_EXPORT_ALL_SYMBOLS for object libraries Merge topic 'makefile-response-files' Tests: Hide errors from `ldd --help` output check Merge topic 'nsis-protect-uninst-exec' Merge topic 'revert-autogen-subdirs' Merge topic 'vs-default-v100' Merge topic 'vim-cmake-syntax' Merge topic 'windows-export-all-fix-objlib' Merge topic 'tests-hide-ldd-check-errors' Merge branch 'release' Merge branch 'release' Source/CPack: Add CM_OVERRIDE on MacOS cmCPackGenerator overrides Merge topic 'aliased-target-properties' Merge topic 'app-framework-bundle-extension' Merge topic 'more-virtual-override' Merge topic 'use-string-append' Merge topic 'wix-disabled-components' Merge topic 'vim-syntax-updates' Merge topic 'emacs-mode-compilation-warning' Help: Fix CMAKE_INSTALL_PREFIX documented default on Windows Merge topic 'doc-CMAKE_INSTALL_PREFIX-default' Merge branch 'upstream-KWSys' into update-kwsys GNU: Use -fvisibility on GCC 4.0 and 4.1 too ExternalProject: Ignore macOS .DS_Store files in tarball extraction Merge topic 'fix-findhdf5-definitions' Merge topic 'intel-gnu11-support' Merge topic 'doc-without-continue' Merge topic 'FindCUDA-arch' Merge topic 'FindCUDA-no-windows-librt' Merge topic 'wix-root-description' Merge topic 'update-kwsys' Merge topic 'ExternalProject-no-DS_Store' Merge topic 'port-to-sco' Merge topic 'FindProtobuf-restore-PROTOBUF_IMPORT_DIRS' Merge topic 'gcc-fvisibility-version' Merge topic 'CMakeFindFrameworks-custom-locations' Merge topic 'ccmake-vim-navigation' Merge branch 'upstream-KWSys' into update-kwsys Modules: Make imported targets fall back to `Release` Ninja: Fix response file format for GNU-like Clang on Windows Merge topic 'update-curl' Merge topic 'update-kwsys' Merge topic 'extra-generator-factories' Merge topic 'find-module-imported-fallback-to-release' Merge branch 'upstream-KWSys' into update-kwsys VS: Fix VS 2015 .vcxproj debug setting for Windows7.1SDK toolset Merge topic 'vs14-debug-enum-older-toolsets' Merge topic 'update-kwsys' Merge topic 'ninja-clang-rsp-format' cmVisualStudio10TargetGenerator: Run clang-format Merge topic 'vs14-debug-enum-older-toolsets' Merge topic 'FindOpenCL-macOS' Merge topic 'update-cle-version-info' Merge topic 'bash-completion-fix-E-lookup' Merge branch 'release' Merge topic 'wix-custom-install-dir' Merge topic 'ninja-full-path' Merge topic 'GetPrerequisites-grep-a' Merge topic 'fix-string-append' install(EXPORT): Fix support for mid-length install destinations on Windows Ninja: Simplify computation of GLOBAL_TARGET outputs Ninja: Add `$subdir/{test,install,package}` targets Merge topic 'add-extra-boolean-comparisons' Merge topic 'install-export-staging-dir' Merge topic 'NAG-Fortran-no-fPIE' Merge topic 'ninja-directory-targets' Merge topic 'fix-test-macOS-case-sensitive' Merge topic '15687-xcode-support-system-include' Merge topic 'cmCryptoHash-raw-digest' CMakeDetermineSystem: Load platform-specific helper modules CMakeDetermine*Compiler: Add hook to save custom compiler information Android: Add placeholders for platform-specific compiler settings Android: Add placeholders for platform-specific compiler selection Android: Add placeholders for platform-specific initialization Android: Suppress new functionality with Nsight Tegra in VS IDE builds Android: Detect and save the NDK directory Android: Detect and save the API level Android: Detect and save the architecture, ABI, and processor Android: Set CMAKE_SYSROOT automatically Android: Detect and save a toolchain from the NDK Android: Detect settings from the CMAKE_SYSROOT if it is set Android: Detect and save a standalone toolchain without the NDK Android: Search for NDK and standalone toolchain in more places Android: Avoid interfering with common pre-existing toolchain files Android: Add placeholders for compiler/abi-specific settings Android: Add Clang -target option for current ABI Android: Add a CMAKE_BUILD_TYPE default Merge topic 'GetPrerequisites-fix-regression' Merge topic 'autogen-same-name' Merge topic 'FindCUDA-fixes' Merge topic 'issue-tracker-urls' Merge topic 'FindMatlab-mingw' Merge topic 'ExternalProject-SOURCE_SUBDIR' cmake: Constify cmake::GetRegisteredGenerators Add script to update vim-cmake-syntax from upstream Aux: Drop vim files prior to import of third-party version Merge branch 'upstream-vim-cmake-syntax' into import-vim-syntax Aux: Install vim-cmake-syntax files with CMake Help: Add release notes for 'vim-cmake-syntax' import Merge topic 'cmake-developer-reference' Merge topic 'cmake-capabilities' Merge topic 'FindCUDA-target-include-dirs' Merge topic 'include-what-you-use' Merge topic 'readability-named-parameter' libarchive: Fix include order in xxhash.c Define WIN32_LEAN_AND_MEAN for CMake sources on Windows Merge topic 'minor-cleanups' Merge topic 'include-what-you-use' Merge topic 'else-after-return' Version: Always define CMake_VERSION_IS_DIRTY to 0 or 1 Help: Clarify get_cmake_property command documentation Android: Populate compiler flags for current ABI Android: Select the STL type for NDK builds Help: Document cross compiling for Android Android: Add test cases covering use of the NDK and standalone toolchains Android: Add `ANDROID` variable to indicate the target Merge topic 'import-vim-syntax' Merge topic 'version-cleanups' Merge topic 'test-extra-generator-dedup' Merge topic 'FindCUDA-fix-arch-regex' Merge topic 'doc-get_cmake_property' Merge topic 'include-what-you-use' Merge topic 'extend-find-package-search-path' Merge topic 'android-platform-modules' Merge branch 'upstream-KWSys' into update-kwsys Tests: Fix RunCMake.CMP0040 custom command syntax Merge branch 'release' Merge topic 'update-third-party-git-2.9' VS: Use target-specific directory for `resources.pri` Merge topic 'update-kwsys' Merge topic 'test-RunCMake.CMP0040-fix' Merge topic 'intel-fortran-mod-diff' Merge topic 'extract-cmMessenger' Merge topic 'include-what-you-use' FindwxWidgets: Add version 3.1.0 FindwxWidgets: Add VS-versioned library directory prefixes curl: Update script to get curl from new repository Merge topic 'vs-resource-pri-dir' Merge topic 'test-driver-clang-tidy' Merge topic 'FindwxWidgets-library-path' Merge topic 'cpack-rpm-debuginfo-pkg' Merge topic 'update-curl-script' Merge branch 'release' Merge topic 'ninja-add_custom_command-depfile' Merge topic 'code-blocks-include-order' Merge topic 'vs-NsightTegra-empty-version' Merge topic 'cleanup-Convert' Utilities/Release: Drop Linux 32-bit binary Fortran: Use -isysroot and -mmacosx-version-min= on macOS if available Improve error message on unexpected end of file Add script to update libuv from upstream Merge branch 'upstream-libuv' into import-libuv libuv: Build the library within CMake libuv: Disable warnings to avoid changing 3rd party code libuv: Install LICENSE file with CMake documentation libuv: Fix Windows API function typedef syntax libuv: Fix anonymous union syntax libuv: Conditionally declare Windows APIs for VS 2008 and below libuv: Always include our own header first libuv: Avoid including macOS CoreServices header globally libuv: Fix unused variable warning in uv_loop_close FindLibUV: Add module to find libuv package Add option to build CMake against a system libuv Do not build libuv on Mac OS X 10.4 and lower Do not build libuv on Cygwin Do not build libuv on SPARC Do not build libuv on HP-UX cmake: Add trivial usage of libuv Merge topic 'drop-linux-i386-binary' Merge topic 'import-libuv' Merge topic 'syntax-unexpected-eof' Merge topic 'FindMatlab-additional-components' Merge topic 'fortran-macOS-sysroot' Merge topic 'FindOpenSSL-new-windows-names' Merge topic '16101-xcode-fix-directory-exclude-from-all' Merge topic 'doc-XCODE-variable' Merge topic 'install-directory-genex-fix' Merge topic 'FindCUDA-fixes' Merge topic 'FindEXPAT-use-PkgConfig' libuv: Simplify variable initializations to satisfy Clang scan-build GenerateExportHeader: Fix add_compiler_export_flags regression Merge topic 'vs14-debug-enum-older-toolsets' Merge topic 'GenerateExportHeader-fix-add_compiler_export_flags' Merge topic 'autogen-base32' Merge branch 'release' CTestCustom: Suppress scan-build warnings in libuv Merge topic 'FindHDF5-fix-hl-fortran' Merge topic 'FindHDF5-is-parallel' Merge topic 'libuv-scanbuild-fixes' Merge topic 'include-what-you-use' Genex: Diagnose invalid LINK_ONLY usage instead of crashing Merge topic 'tidy-readability-redundant-string-cstr' Merge topic 'include-what-you-use' GNU: Do not use -fvisibility on AIX or HP-UX Tests: Port GenerateExportHeader test to RunCMake infrastructure Tests: Cleanup RunCMake.GenerateExportHeader somewhat FindMatlab: Avoid indexing an empty list of versions Merge topic 'qtdialog-tidy' Merge topic 'cm_nullptr' Merge topic 'macro-parenthesis' Merge topic 'cpack-deb-long-filenames' Merge topic 'test-GenerateExportHeader-with-RunCMake' Merge topic 'genex-LINK_ONLY-not-linking' Help: Clarify meaning of MSVC variables Features: Record features for VS 15 Preview 4 VS: Verify that MSBuild.exe and devenv.com exist before using them VS: Update v140 flag tables from VS 15 MSBuild files Fortran: Warn when dependency scanning fails to parse a source file cmFortranLexer: Update to flex 2.6 cmFortranParser: Revise indentation style to match rest of CMake cmFortranParser: Inject a newline at end-of-file when missing cmMakefile: Restore nested error logic use of cmExecutionStatus Merge branch 'release' Merge topic 'FindMatlab-fix-empty-list-index' Merge topic 'vs-minor-cleanups' Merge topic 'wix-fix-static-prefix' Merge topic 'include-what-you-use' Merge topic 'fix-continue-after-error' Merge topic 'cpack-deb-package-description-fallback' Merge topic 'GNUInstallDirs-function' Merge topic 'backport-curl-fix' Merge branch 'release' Merge branch 'release' ExternalData: Tolerate files duplicated across multiple targets VS15: Add Visual Studio 15 generator Merge topic 'ExternalData-repeat-file' Merge topic 'install-export-root-prefix' Merge topic 'vs-15-generator' Merge topic 'fortran-depend-cleanup' cmFortranParser: Simplify grammar by skipping unknown statements cmFortranParser: Parse keywords as lexical tokens CTestCustom: Suppress scan-build warnings in flex-generated lexer kwiml: Update import script for new upstream URL Merge branch 'upstream-KWIML' into update-kwiml GetPrerequisites: Recognize absolute paths to UCRT system libraries VS: Do not default to missing v100 64-bit toolset on VS 2010 Express libuv: Link with kvm on NetBSD and OpenBSD Merge topic 'FindMatlab-regression-tests-print-on-error' Merge topic 'update-kwiml' Merge topic 'fortran-scanbuild-fixes' Merge topic 'fortran-parser-keywords' Merge topic 'parse_arguments_argv_n' Merge topic 'cmGeneratorTarget-cleanup' Merge topic 'GetPrerequisites-absolute-ucrt' Help: Add notes for topic 'bzip2-imported-targets' Utilities/Release: Drop Cygwin binary Merge topic 'libuv-link-kvm' Merge topic 'vs-default-v100' Merge topic 'wix-feature-patch' Merge topic 'drop-cygwin-binary' Merge topic 'bzip2-imported-targets' Merge topic 'clang-tidy' Merge topic 'geh-failure-tests' Help: Add notes for topic 'timestamp-names' Merge topic 'file-download-unexpected-arg' Merge topic 'link-generated-rpaths-first' Merge topic 'doc-separate_arguments-formatting' Merge topic 'fix-ctest-segfault' Merge topic 'timestamp-names' Merge topic 'cmake-server-prepare' cmSystemTools: Add strverscmp Help: Add notes for topic 'file-curl-userpw' Merge topic 'cmake-gui-open-project' Merge topic 'ctest-subdir-spaces' Merge topic 'add_androidmk_generator' Merge topic 'file-curl-userpw' Merge topic 'cmake-E-help-order' Merge topic 'minor-cleanup' Merge branch 'upstream-KWSys' into update-kwsys Merge branch 'upstream-KWSys' into update-kwsys Help: Clarify documentation of CMAKE_COMPILER_IS_GNU{CC,CXX,G77} Modules: Fix typos in name of `CMAKE_COMPILER_IS_GNUCC` variable ccmake: Fix recent compilation regression with GCC on Solaris cmake: Make FindCacheFile a static method cmTarget: Add method to get a copy adapted for a directory Avoid requiring default cmTarget constructor for map indexing cmTarget: Construct with basic information up front cmTarget: Inline SetType method at only remaining call site Tests: Use upper-case drive letters in RunCMake.get_filename_component Merge topic 'python-3.7' Merge topic 'fix-CMAKE_COMPILER_IS_GNU-confusion' Merge topic 'fix-ccmake-sun-gcc' Merge topic 'cmake-static-FindCacheFile' Merge topic 'refactor-target-construction' Merge topic 'extend_matlab_unit_test' Merge topic 'add-strverscmp' Merge topic 'update-kwsys' Require CMake 2.8.12.2 to build CMake itself FeatureSummary: Order function implementations the same as the documentation FeatureSummary: Convert docs to a bracket comment FeatureSummary: Format documentation FeatureSummary: Add include() to examples Help: Add notes for topic 'ExternalProject-http-credentials' Help: Clarify wording of include() for builtin module directories Merge topic 'doc-FeatureSummary' Merge topic 'doc-CMP0017' cmGlobalGenerator: Split CreateDefaultGlobalTargets implementation cmGlobalGenerator: Refactor global target construction cmTarget: Remove unused support for partial construction cmGlobalGenerator: Fix use of uninitialized value in --find-package mode cmake: Fix --find-package mode link line output Merge topic 'require-cmake-2.8.12.2' Merge topic 'file-LOCK-lowercase-test' Merge topic 'ExternalProject-http-credentials' Merge topic 'find_package-dir-sort' Merge topic 'file-curl-httpheader' Merge topic 'detect-relink-incompat' Merge topic 'size-empty' Merge topic 'refactor-target-construction' CPackIFW: Format documentation Utilities/Release: Build Linux and OS X binaries as C++14 Check for availability of unique_ptr and make_unique when building CMake Utilities/Release: Suppress KWSys ConsoleBuf test on Windows binaries Merge topic 'nightly-binary-no-ConsoleBuf-test' Merge topic 'binaries-as-c++14' Merge topic 'find-package-mode-fixes' Merge topic 'postgresql-96' Merge topic 'check-for-unique_ptr' Merge topic 'ifw-user-interfaces' Merge topic 'doc-CPackIFW' Merge topic 'clang-tidy-fixes' Merge topic 'predictable-add_custom_command-output' Merge topic 'cleanup-Convert' Help: Add notes for topic 'cmake-server-basic' Merge topic 'cmake-server-basic' Help: Add notes for topic 'ExternalProject-HTTP_HEADER' cmState: Record buildsystem target names in each directory Add a directory property to list subdirectories Add directory property to list buildsystem targets Add directory properties to get source and binary directories Merge topic 'cleanup-Convert' Merge topic 'cmake-server-experimental-protocols' Merge topic 'cuda_use_cudadevrt_with_separable_compilation' Merge topic 'ExternalProject-HTTP_HEADER' Merge topic 'ifw-package-resources' Merge topic 'cpack.hash_computing' Merge topic 'cpack-rpm-srpm-package' Merge topic 'cpack-rpm-policy-warnings' Merge topic 'directory-list-targets-and-subdirs' cmGeneratorTarget: Refactor Fortran module directory lookup Fortran: Use module dir flag if needed for default module directory cmGlobalNinjaGenerator: Teach WriteBuild about implicit outputs cmGlobalNinjaGenerator: Add API to check for implicit outputs support Merge branch 'upstream-KWSys' into update-kwsys cmFortranParser: Skip module procedures/functions/subroutines Fortran: Add support for submodule syntax in dependency scanning Help: Add notes for topic 'fortran-submodules' Help: Add notes for topic 'ctest-capture-error' Merge topic 'runcmake-cpack-test-framework-fix' Merge topic 'update-kwsys' Merge topic 'refactor-fortran-module-dir-lookup' Merge topic 'ninja-implicit-outputs' Merge topic 'fortran-submodules' Merge topic 'cmake-server-more-info' Merge topic 'ctest-capture-error' FindOpenSSL: Search in more-specific directories before less-specific Merge topic 'cmake-server-pipes' Merge topic 'test-fixtures' Fix XCODE_ATTRIBUTE_..._LOCATION target property lookup Ninja: Refactor Fortran rejection logic Ninja: Refactor ninja feature detection Ninja: Add API to check for dyndep support Ninja: Add comment with Fortran dependency design documentation Ninja: Add internal tool to scan Fortran code for module dependencies Ninja: Add internal tool to produce a ninja dyndep file for Fortran Ninja: Conditionally allow Fortran based on ninja 'dyndep' support Ninja: Add explicit preprocessing step for Fortran Ninja: Add dyndep rules for Fortran module dependencies Help: Document Ninja generator conditional Fortran support CheckFortranSourceCompiles: Fix FAIL_REGEX documentation typo CheckFortranSourceCompiles: Add support for custom source extension Tests: Remove trailing line from Fortran/External Tests: Use more generic variables in Fortran test Tests: Check if Fortran compiler supports F90 Tests: Split Fortran module testing into separate FortranModules test Merge branch 'qtdialog-lib-paths' into release Merge topic 'qtdialog-lib-paths' Merge topic 'FindOpenSSL-path-order' Merge topic 'cmake-server-signals' Merge topic 'fix-xcode-attribute-LOCATIONs' Merge topic 'test-Fortran-split' Merge topic 'CheckFortranSourceCompiles-custom-ext' Merge topic 'ninja-fortran' Merge branch 'release' Tests: Add Fortran submodule tests FindMatlab: Add notes for topic 'FindMatlab-simulink' Xcode: Port rudimentary Swift support to Xcode 8 Xcode: Add option to set Swift language version Merge topic 'fortran-submodule-test' Merge topic 'FindMatlab-simulink' Merge topic 'xcode-swift-version' Merge topic 'ctest-no-manual-delete' Merge topic 'tidy-server' Merge topic 'revert-cpack-deb-package-description-fallback' Merge topic 'auto-ptr' Merge branch 'upstream-KWSys' into update-kwsys Merge topic 'xcode-sdk-version' CTestCustom: Suppress PGI compiler warning summary line CTestCustom: Suppress PGI warnings in generated Lexer/Parser code cmGlobalGenerator: Optimize FindMakefile method with an index Merge topic 'ninja-include-dir' Merge topic 'FindBoost-1.62' Merge topic 'CPackNSIS-per-component-install' Merge topic 'update-kwsys' Merge topic 'find-matlab-pthread' Merge topic 'cmake-server-basic-commands' Merge topic 'codelite-organize-by-target' Merge topic 'index-directories' Merge topic 'suppress-pgi-warnings' Merge topic 'cpack-rpm-debuginfo-sources' Tests: Fix RunCMake.CTest output match to tolerate line number changes Utilities/KWStyle: Remove unused header check reference file Copyright.txt: Add notice of copyright by contributors Utilities/Scripts: Add temporary script to filter license notices Simplify CMake per-source license notices Utilities/Scripts: Remove temporary script that filtered license notices Tests: Update ModuleNotices test for new notice Help: Update cmake-developer(7) module license docs for new notice Merge topic 'silent-nsis-installs' Merge topic 'findjni' Merge topic 'GNUInstallDirs-more-BSD' Merge topic 'simplify-license-notices' Utilities/Release: Add html docs to Windows 64-bit binary Merge topic 'win64-binary-docs' Tests: Add newline to RunCMake.CPack_RPM SOURCE_PACKAGE case Tests: Decide earlier whether to test resources project: Fix support for explicit RC language FindCxxTest: Do not run cxxtestgen through interpreter unless necessary CONTRIBUTING: Reference clang-format helper script for code style CONTRIBUTING: Document contribution through the Kitware GitLab Instance Merge topic 'CONTRIBUTING-use-gitlab' CTestCustom: Suppress PGI IPA warnings CompileFlags: Tell PGI compiler not to issue warning diagnostics Merge topic 'cpack-rpm-test-source-newline' Merge topic 'suppress-pgi-warnings' Merge topic 'fix-explicit-RC' Merge topic 'vs-clang-llvm-support' Merge topic 'FindCxxTest-no-unix-interp' Merge topic 'cmake-server-commands' Merge topic 'cmake_parse_arguments-PARSE_ARGV-multi-value' Merge branch 'upstream-KWSys' into update-kwsys server-mode: Enable from bootstrapped CMake build server-mode: Rename variable CMake_{HAVE => ENABLE}_SERVER_MODE server-mode: Add option to enable/disable the mode explicitly server-mode: Add option to enable/disable test case explicitly bootstrap: Add options to enable/disable server mode explicitly Utilities/Release: Enable server mode in all binaries Utilities/Release: Use python 3 for server mode test on Linux binary Merge branch 'upstream-libuv' into update-libuv Merge topic 'update-kwsys' Merge topic 'update-libuv' Merge topic 'cmake-server-enable-more' Merge topic 'cmake-server-filewatcher' Tests: Teach Server test to wait for server exit Help: Clarify that `cmake -A` option sets VS IDE target architecture Help: Add release note about compilers that no longer build CMake itself cmake-server: Stop the file monitor on client disconnect Merge topic 'cmake-server-test-wait' Merge topic 'add-setup-projects-tests-module' Merge topic 'aux_source_directory-sort' Merge topic 'autogen-empty-qrc' Merge topic 'autogen-fix-cmake-error' Merge topic 'doc-compilers-dropped' Merge topic 'doc-cmake-A-link' Help: Consolidate 3.7 release notes Help: Organize and revise 3.7 release notes Merge topic 'cmake-server-teardown-file-monitor' Merge topic 'doc-target_link_libraries-flags' Merge topic 'FindBoost-1.62' Merge topic 'doc-3.7-relnotes' Help: Drop development topic notes to prepare release CMake 3.7.0-rc1 version update Merge branch 'fix-doc-3.7-relnotes' into release Chaoren Lin (3): Ninja: Use full path for all source files Tests: Fix RunCMake.Framework on case sensitive file systems. Tests: Refactor testing of extra generators. Christoph Gr?ninger (1): Do not place CMake version in export files Christoph Junghans (1): FindEXPAT: use hints from PkgConfig Chuck Atkins (2): FindCUDA: Use the correct runtime in REQUIRED_VARS check Add additional <= and >= comparison operators Clinton Stimpson (3): PackageMaker: factor out common code for creating pkg files. productbuild: Add new productbuild cpack generator. cmake-gui: Do not remove library paths for Qt5 plugins. Craig Scott (2): CTest: Add support for test fixtures CPack/NSIS: Fix silent NSIS installs Dan Kegel (1): Re-order link line to place RPATH entries before libraries Daniel Pfeifer (86): Simplify boolean expressions Use the empty() method to check for emptyness. call static cmOutputConverter::GetFortranFormat without object Remove c_str() calls from stream arguments. cmake: remove unnused member Verbose Prefer std::ostream& over derivatives as parameters CPack/PackageMaker: port to cmXMLWriter PseudoMemcheck: revise style with clang-format. Add missing braces around statements. Add missing braces around statements in header files cmConfigure.h: Establish as 'include first' file cmDocumentationEntry: Extract from cmStandardIncludes Access std::ios_base with std::ios Remove redundant arguments from fstream constructors Prefer istringstream and ostringstream over stringstream. cmXMLWriter: use ifstream from KWSys cmOutputConverter: implement Shell__GetArgument using ostringstream cmCustomCommandLines: Extract from cmStandardIncludes.h cmTypeMacro: Extract from cmStandardIncludes.h cmTargetLinkLibraryType: Extract from cmStandardIncludes.h cmDependsJavaParserHelper: fix dangling pointer cmOutputConverter::Convert: make precondition explicit cmOutputConverter::Convert: invert condition cmOutputConverter: remove 'optional' argument cmOutputConverter: remove unused 'local' argument cmOutputConverter: collapse ConvertToOutputForExisting functions cmOutputConverter: remove unnecessary conversion Make C++ feature checks extensible Use where available cxx features: add check for override Add CM_OVERRIDE to some functions CM_OVERRIDE: mark destructor overridden in the feature test. mark functions with CM_OVERRIDE cxx features: add check for nullptr use CM_NULLPTR cmliblzma: always build as static library CM_OVERRIDE: fix feature test for clang Add script to update liblzma from upstream Use string(APPEND) in Modules Use string(APPEND) in Tests prefer list(APPEND) over string(APPEND) where appropriate Revert the use of string(APPEND) in .cmake.in files fix a batch of include-what-you-use violations Make sure unnused parameters are /*named*/ cmArchiveWrite: replace mode_t with int CursesDialog: don't use else after return CPack: don't use else after return CTest: don't use else after return CMake: don't use else after return fix a batch of include-what-you-use violations fix a batch of include-what-you-use violations CTest: fix include-what-you-use violations Tests/CMakeLib: use cmsys::ifstream Tests/CMakeLib: include what you use make sure to include cmConfigure.h before cmStandardIncludes.h cmCTest: don't redefine cout and cerr fix a load of include-what-you-use violations CursesDialog: include what you use surround macro arguments with parentheses use CM_NULLPTR QtDialog: fix clang-tidy warnings CPack: include what you use QCMakeCacheView: no else after return QCMakeCacheView: simplify boolean expression cmGeneratorTarget: don't clear container in destructor cmGeneratorTarget: use erase-unique instead of reinitialization cmGeneratorTarget: factor out common part of AddSources commands cmSystemTools: simplify boolean expressions cmDependsFortran: simplify boolean expression use empty method to check for emptyness Mark overridden functions with CM_OVERRIDE Remove redundant get() call on smart pointer Avoid else after return Use braces around statements Use CM_NULLPTR cmCommandArgumentsHelper: simplify boolean expression cmNinjaNormalTargetGenerator: make sure comments match parameter names cmOutputConverter: split ConvertToRelativePath cmOutputConverter: use new ConvertToRelativePath signature internally cmState: remove unused code CTest::Base64EncodeFile: Avoid manual delete CTest::CompressString: Reorder code to avoid unnecessary allocation CTest::CompressString: Avoid manual delete cmServer: add braces around conditional statements Add a feature check to test availability of auto_ptr Use std::auto_ptr on compilers that do not warn about it Daniel Scharrer (1): Teach find_library and find_package to search lib32 paths (#11260) David Keller (1): CMakeFindFrameworks: Allow custom framework locations Dmitry Marakasov (1): GNUInstallDirs: All *BSDs use ${PREFIX}/{man,info} for man and info pages Domen Vrankar (11): CPack/RPM: Add test for debuginfo package generation CPack/DEB: Add option to select archive type CPack/DEB: Make package description variable precedence match RPM Tests: Add subtest support to RunCMake/CPack infrastructure CPack/RPM: Generate source rpm (SRPM) packages on demand CPackRPM: Avoid CMP0007 warnings Tests: Fix RunCMake.CPack test infrastructure after logical conflict Revert "CPack/DEB: Make package description variable precedence match RPM" CPack/RPM debuginfo packages must contain sources CPack/RPM debuginfo directories to sources CPack/RPM debuginfo packaging documentation D?vis Mos?ns (2): Use better KWSys SystemTools::GetEnv and HasEnv signatures bootstrap: Add check for ext/stdio_filebuf.h needed by KWSys Enrico Bedau (1): CodeBlocks: Show generated files in non-utility targets Eon Jeong (3): FindBISON: Change usage of [VERBOSE ] to [VERBOSE []] FindBISON: Add REPORT_FILE option to pass --report-file=FILE FindBISON: Refactor public and inner macro routines FARBOS Arnaud (1): FindGLEW: Search for debug and release configurations separately Felix Geyer (1): Fix typos. Florent Castelli (1): Ninja: Make bundle resources a dependency of their target Gilles Khouzam (2): VS: Add a VS_TOOL_OVERRIDE source file property VS: Add VS_SDK_REFERENCES target property to reference external SDKs Gregor Jasny (12): Xcode: Add function to conditionally add Xcode Attributes Xcode: Properly handle BUNDLE_EXTENSION Validate target name in ALIASED_TARGET property getter Do not report ALIASED_TARGET as always set (#15783) Honor BUNDLE_EXTENSION also for App Bundles (#16148) Honor BUNDLE_EXTENSION also for Frameworks (#14742) Update documentation about bundle extensions Add tests for BUNDLE_EXTENSION Xcode: Obey SYSTEM keyword for includes (#15687) Xcode: Add targets marked as EXCLUDE_FROM_ALL to project (#16101) tidy: Fix readability-redundant-string-cstr issues Xcode: Convert maybe unversioned OSX sysroot into versioned SDK path Hans Gaiser (1): FindCUDA: Add search path for nvcc on Arch Harry Mallon (2): find_path: Fix location of in a framework on OS X CPack/RPM: Debug logging should only print if requested for Istvan Bodnar (1): CPack RPM debuginfo packages generation Ivan Ivanov (4): FindLua: Prefix private APIs with `_lua_` FindLua: Factor out a helper function for version extraction FindLua: Check header file against suitable versions FindLua: Iterate through all include subdirs to find a suitable header James Touton (5): Xcode: Add const qualifiers Xcode: Don't emit empty settings blocks. Xcode: Add XCODE_FILE_ATTRIBUTES source file property Xcode: Add support for mig files Help: Fix formatting in separate_arguments documentation Jamie Snape (4): FindMatlab: Fix documentation FindMatlab: Add SIMULINK component FindMatlab: Add EXECUTABLE, MODULE, and SHARED options to matlab_add_mex FindMatlab: Fix -pthread check for projects with only C enabled Jean-Christophe Fillion-Robin (9): CTest: Properly set buildname if only C langage is enabled cmCTest: Fix typo cmCTest: Improve readability adding "RunCMakeAndTest()" and "ExecuteTests()" cmCTest: Improve readability adding "HandleTest(Action|Model)Argument()" cmCTest: Facilitate code reading adding consistent comments in Run() cmCTest: Rename "ProcessTests()" to "ProcessSteps()" and improve doxygen cmCTest: Update doxygen to be consistent Help: Consistently use quotes and fix punctuation in ctest(1) manual Help: Fix documentation of ctest --build-and-test John Beard (1): Help: Clarify treatment of link flags in target_link_libraries Jostein Kj?nigsen (2): cmake-mode.el: Fix byte-compilation warnings. cmake-mode.el: Replace use of obsolete function (since Emacs 24.3). Junghyun Kim (1): aux_source_directory: Sort results to make it deterministic KWIML Upstream (1): KWIML 2016-09-08 (d564b3c7) KWSys Upstream (13): KWSys 2016-06-30 (96f06c8e) KWSys 2016-07-15 (f396bf43) KWSys 2016-07-18 (19732229) KWSys 2016-07-19 (9d1dbd95) KWSys 2016-08-01 (560bcdbb) KWSys 2016-08-02 (3f55579d) KWSys 2016-08-03 (6d23dd7e) KWSys 2016-08-24 (8e643b9b) KWSys 2016-09-14 (e736efa1) KWSys 2016-09-14 (c4049689) KWSys 2016-09-20 (3f69ac40) KWSys 2016-09-23 (80f820fc) KWSys 2016-09-29 (6cfcbede) Kevin Ottens (1): CodeBlocks: List C++ includes first Kitware Robot (124): CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp Konstantin Podsvirov (9): CPackComponents: add cpack_append_list_variable_set_command CPackIFW: Using cpack_append_list_variable_set_command CMake: install COMPONENT cmcldeps QtIFW: process USE_LGPL when CMake_INSTALL_COMPONENTS QtIFW: Don't show component selection page if it don't need Utilities/Sphinx: Remove use of continue() method Added CMake_BUILD_DEVELOPER_REFERENCE option QtIFW: Developer Reference installation CPackIFW: Add 'cpack_ifw_add_package_resources' command Kulla Christoph (1): add_custom_command: Add DEPFILE option for Ninja Lars Schmertmann (1): ExternalProject: Add support for multiple alternative URLs Laurent Tarrisse (1): GetPrerequisites: Optimize on Windows by filtering `objdump` output Matthew Woehlke (10): Tests/Java: Clean up style of Java test code UseJava: Add infrastructure to export targets Tests: Add test for exported JARs UseJava: Fix race condition creating java class list ExternalProject: Add SOURCE_SUBDIR option Tests: Add failure test for GenerateExportHeader Tests: Add data symbols to GenerateExportHeader test Tests: Refactor GenerateExportHeader test code cmake_parse_arguments: Fix PARSE_ARGV multi-value argument handling cmake_parse_arguments: Add additional unit tests Matth?us G. Chajdas (3): FindOpenCL: Add an imported target Add FindVulkan.cmake. FindOpenCL: Fix search on macOS. Michael St?rmer (5): CPackWIX: Support CPACK_COMPONENT__DISABLED CPackWIX: Support custom title and description for the root feature CPackWIX: Implement new CPACK_WIX_SKIP_PROGRAM_FOLDER feature CPackWIX: Fix incomplete CPACK_WIX_SKIP_PROGRAM_FOLDER implementation CPackWIX: Enabled patching of WIX tags Minze Zwerver (1): CodeLite: Optionally use targets to create (sub)project files Neil Carlson (1): NAG: Use -PIC for Fortran position-independent executable code Nico He?ler (1): cmake-gui: Add button to open the generated project Nicolas BUNEL (1): Add option to control 'bin' directory of CMake's own installation (#16076) Nils Gladitz (4): FindPostgreSQL: Fix initialization of PostgreSQL_LIBRARIES CPackComponent: Document the *_HIDDEN and *_DISABLED variables CTestSVN: Fix segfault when CTEST_UPDATE_VERSION_ONLY is enabled Ninja: Add source location as include directory for preprocessed files O Libre (1): FindJNI: Improve formatting of FPHSA call Orion Poplawski (1): FindJNI: Add aarch32 path on arm Patrick Boettcher (1): Aux: update vim-syntax-highlighting Patrick Welche (2): cmELF: Port to SCO OpenServer 5.0.7/3.2 SCO_SV: Enable so filename versioning Paul Seyfert (3): ccmake: Fix typo in help (it's -> its) ccmake: Revise documentation for [d] ccmake: Add VIM-like bindings for navigation Peter Boettcher (1): FindCUDA: Take NVCC include directories from target properties Petr Orlov (1): CPack: Add option to generate a checksum file next to each package file Pierluigi Taddei (3): Tests: Add test for our strverscmp implementation find_package: Optionally sort globbed directories in a meaningful order CPackIFW: Add USER_INTERFACES option Raffi Enficiaud (2): FindMatlab: adding handling of component "MAT" FindMatlab: add verbosity to the nightly tests Raphael Kubo da Costa (1): Ninja: Generalize check for sysconf(3) call Robert Dailey (1): VS: Add support for NATVIS files Robert Maynard (1): FindCUDA: find cudadevrt and link it if CUDA_SEPARABLE_COMPILATION is ON Roger Leigh (10): FindBZip2: Search for additional bz2d debug library name FindIce: Add versions 3.6.1 and 3.6.2 FindIce: Support finding both release and debug libraries FindTIFF: Correct variable names in unit test FindICU: New module GNUInstallDirs: Add macro to expose internal logic publicly libuv: Link with kvm on FreeBSD FindBZip2: Add imported target Tests: Add FindBZip2 unit tests FindBoost: Add 1.62 and 1.62.0 as supported versions Rolf Eike Beer (1): GetPrerequisites: fix typo in comment Roman W?ger (3): CPack/NSIS: Add custom component install directory VS: Recognize VS/LLVM toolset names as Clang Help: Add 3.7 release note for CPack/NSIS Ruslan Baratov (11): CMakeIOSInstallCombined: do not merge content of OUTPUT and ERROR variables CMakeIOSInstallCombined: add some sanity checks ExternalProject: Use default file name if extracting from URL fails Document XCODE variable file(DOWNLOAD|UPLOAD): Warn on unexpected arguments string(TIMESTAMP ...): add '%a' and '%b' format specifiers file(DOWNLOAD|UPLOAD): Add 'USERPWD' suboption ExternalProject: Add HTTP_{USERNAME,PASSWORD} Tests: Add case for file(LOCK) with lower-cased path file(DOWNLOAD|UPLOAD): Add HTTPHEADER suboption ExternalProject: Add HTTP_HEADER Schuyler Kylstra (1): AndroidTestUtilities: Add module to help drive Android device tests Sebastian Holtermann (15): cmCryptoHash: Documentation comments cmCryptoHash: New byte hash to string function cmCryptoHash: Return byte vector from internal Finalize method cmCryptoHash: New ByteHash methods that return a byte vector cmFilePathUuid: Add class to generate deterministic unique file names QtAutogen: Use std:: instead of ::std:: QtAutogen: Allow multiple moc files with the same name QtAutogen: Allow multiple qrc files with the same name Tests/QtAutogen: Test same moc/qrc source names in different directories Help: Document AUTORCC behavior for same .qrc name case Add cmBase32Encoder class cmFilePathUuid: Use Base32 string instead of Base64 string QtAutogen: Allow .qrc files that do not contain any file reference QtAutogen: Add test for empty qrc file QtAutogen: Use cmSystemTools::Error instead of std::cerr Sebastian Niemann (1): FindMatlab: Use pre-built libraries for MinGW if needed Silvio Traversaro (2): Help: Widen find_package search path table find_package: Extend search path for combined Windows/UNIX convention Stefano Soffia (2): cmLocalGenerator: Refactor test subdirectory generation loop Fix CTest test file generation for spaces in subdirectory names Stephen Kelly (70): Parser: Merge identical conditions cmake: Make internal method file static cmake: Fix constness of methods cmake: Issue message independent of cmMakefile definition cmLocalGenerator: Store Backtrace for the directory cmMakefile: Avoid IssueMessage after configure is finished cmGlobalGenerator: Don't use cmMakefile::IssueMessage after configure cmMakefile: Port messages for compile features to cmake cmake: Extract DisplayMessage API. cmake: Remove force from IssueMessage API Parser: Issue file open error messages through dedicated API Parser: Out-of-line conditional code to cmMakefile cmMakefile: Extract invoke result variables cmIfCommand: Don't rely on NestedError logic to issue messages Version: Remove check for existence of CVS repository Parser: Store the Backtrace for use in issuing messages Parser: Issue messages through cmake, not cmSystemTools cmMakefile: Simplify IssueMessage implementation cmMakefile: Port nested error logic away from cmExecutionStatus cmMessenger: Extract from cmake class Parser: Port away from cmMakefile Convert: Remove unused overload Makefiles: Rename local variable Makefiles: Use string overload of ConvertToOutputForExisting Convert: Remove ConvertToOutputForExisting overload Makefiles: Port CreateCDCommand to string-based API Makefiles: Change signature of AppendCustomCommand Makefiles: Change AppendCustomCommand API to strings Convert: Remove obsolete GetRelativeRootPath Makefiles: Deduplicate variable Makefiles: Replace method with Wacom specific API Makefiles: Remove useless use of Convert Makefiles: Invert logic in MakeLauncher Makefiles: Simplify MakeLauncher return value Makefiles: Inline MakeLauncher into only caller Makefiles: Replace ternaries with if()s VS: Replace variable with an if() Convert: Replace uses of Convert(NONE) Convert: Remove NONE conversion VS: Replace FULL/UNCHANGED conversion with equivalent Convert: Replace FULL conversions with equivalent Convert: Extract ConvertToRelativePath from Convert() Convert: Replace UNCHANGED conversions with new API call Convert: Replace trivial conversion with new method Ninja: Replace ternary with if() Convert: Replace Convert(FULL) with equivalent Convert: Remove 'FULL' conversion Convert: Remove UNCHANGED enum value Convert: Make variables a bit more clear Make the add_custom_command output more predictable Xcode: Remove unused member Convert: Remove last use of START enum value Convert: Remove last uses of HOME enum value Convert: Remove obsolete HOME and START enum values Convert: Avoid START_OUTPUT enum when converting to relative paths Convert: Move access to CurrentBinaryDirectory out of loops Convert: Avoid HOME_OUTPUT enum when converting to relative paths Convert: Move access to BinaryDirectory out of loops Convert: Inline MAKERULE conversions Convert: Inline HOME_OUTPUT MAKERULE conversion Convert: Move access to BinaryDirectory out of loops Convert: Remove obsolete MAKERULE enum value Convert: Simplify switch Common: Use a string instead of enum for WorkingDirectory Convert: Inline uses of HOME_OUTPUT Convert: Move access to BinaryDirectory out of loops Ninja: Update comment variable reference Convert: Remove HOME_OUTPUT enum value Convert: Inline uses of START_OUTPUT cmOutputConverter: Remove now-obsolete Convert method Stephen Sorley (5): FindCUDA: Do not look for librt on Windows FindCUDA: Restore default behavior of CUDA_USE_STATIC_CUDA_RUNTIME FindCUDA: Fix missing librt on Linux when using static cuda runtime. FindCUDA: Fix for broken cuda_compile* commands. FindCUDA: Allow cuda_compile* macros to be called more than once per directory Stuart Mentzer (2): FindFreetype: Factor out common find command arguments FindFreetype: Find release and debug libraries separately Sujin Philip (1): FindOpenMP: Detect version (specification date) from compiler Sylvain Joubert (2): bash-completion: Fix cmake -E lookup create_test_sourcelist: Use safer strncpy instead of strcpy Tamar Kranenburg (2): FindPostgreSQL: Correct comment about known postgres versions FindPostgreSQL: Search for version 9.6 Tatsuyuki Ishi (1): FindBoost: update to 1.62 Tobias Hunger (50): cmGlobalGenerator: Make IsMultiConfig() const cmLocalGenerator: Pass configuration to GetTargetFlags cmCommonTargetGenerator: De-duplicate CMAKE_BUILD_TYPE lookup cmLocalGenerator: Adopt GetFrameworkFlags method cmLocalGenerator: Move GetFrameworkFlags implementation to private helper cmLocalGenerator: Add GetTargetDefines to get all defines for a target cmake: Kill cmake::CacheManager and its getter cmPropertyList: Add a way to retrieve all properties cmCacheEntry: Retrieve all properties of cache entries cmState: Expose list of properties of values in the cache cmGeneratorTarget: Adopt Fortran module directory generation cmLocalGenerator: Adopt target compile flag generation cmExtraSublimeTextGenerator: Use GetTargetCompileFlags cmTypeMacro: mark overridden functions with CM_OVERRIDE Make CMake version suffix available to code Make CMake version dirty state available to code cmGlobalGeneratorFactory: Use CM_OVERRIDE for all derived classes CMake: Report whether generators support platforms Refactor extra generator registration to use factories Report more information about extra generators in generator factories cmake: Add `cmake -E capabilities` mode Update .gitignore cmake: Introduce ReportCapabilitiesJson cmake: Factor out method to find the CMakeCache.txt file cmcmd: Fix sort order in help output cmake-server: Report server mode availablitily in Capabilities cmake-server: Bare-bones server implementation cmake-server: Implement ServerProtocol 1.0 cmake-server: Add unit test cmake-server: Add documentation server-mode: Add --experimental flag cmake-server: Use consistent constant naming style server-mode: Automate progress reporting server-mode: Report Messages from cmake to clients server-mode: Add debug support server-mode: Introduce cmServerConnection server-mode: Move constants for server mode into its own file server-mode: Pass server into cmServerProtocol server-mode: Allow for sending signals server-mode: Query global configuration of cmake via a command server-mode: Set global configuration of cmake via a command server-mode: Add a configure command server-mode: Add command to compute the build system server-mode: Report information relevant for a codemodel server-mode: Add command to retrieve build system files server-mode: Report CMakeCache entries server-mode: Add project data for unit tests server-mode: Add infrastructure to watch the filesystem server-mode: Report watched files to client server-mode: Watch CMakeLists.txt files Vladim?r Vondru? (2): FindOpenSSL: Do not assume that the version regex finds something FindProtobuf: fix protobuf_generate_*() to handle proto files in subdirs. Wu Zhao (1): AIX: Add support for Clang compiler Yen Chi Hsuan (1): FindPython{Interp,Libs}: Add version 3.7 Yury Zhuravlev (3): bindexplib: Export symbols from objects even with explicit markup Makefile: Factor out WINDOWS_EXPORT_ALL_SYMBOLS helper Windows: Honor WINDOWS_EXPORT_ALL_SYMBOLS for executables with exports Yves Frederix (1): install: Fix evaluation of leading generator expressions in DIRECTORY liblzma upstream (2): liblzma 2013-06-30 (b69900ed) liblzma 2014-12-21 (265e5ffb) libuv upstream (2): libuv 2016-08-30 (897738b1) libuv 2016-09-27 (8221f9b3) vim-cmake-syntax upstream (1): vim-cmake-syntax 2016-08-16 (e782679c) ----------------------------------------------------------------------- hooks/post-receive -- CMake From steveire at gmail.com Tue Oct 4 16:57:36 2016 From: steveire at gmail.com (Stephen Kelly) Date: Tue, 4 Oct 2016 16:57:36 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-63-g74adf4e Message-ID: <20161004205736.C32E5F5DE6@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 74adf4e543d506a44500d0aa9bf1203c2270b217 (commit) via dfa27f07b492d1aaa94b32a11b4e24ca73d5e420 (commit) via 511ed264e1b2816d519fb45bd1a86f650d35dbed (commit) via 6e77e10712d852322e28a9283e7b1385fed01da0 (commit) via e5f9caf1260a17aea799487aa7abb2950d3252ce (commit) via abb1e1d227f3f5e61fa22c57c7f6f0fdca745ace (commit) via ee661eb0e937bbb683f1deb24faf927add5f060a (commit) via ec5115eab84226573a8d6903db68d432c1fe147a (commit) via 44aa69e750a730fde6610acecfef09663d42098f (commit) via 4bd19454ed652c54d278546992f9c3606e1de966 (commit) via 8081600219bc8638dd8ce99e6d25a7f35c0cc8f0 (commit) via fb932b367e1678c3d4395d7af422fa9627666f1a (commit) via 608e6fe5f24bc6cbf8f4296994fa3878b49a4557 (commit) via 5dcf248bc167a04886fb5388c42d1d11aae61cec (commit) via 3288481c22337a8bdd785d0cd8b725d5abc1351d (commit) via c7926fe8890a80bb3e9072e903dcadcf4faac4cf (commit) via a41cf74b1836899ad9e3c80a8013446e849049ed (commit) via 41aa789e0b1d498e0a160bc2848c9a16fea9d2b5 (commit) via cc7832e9bcfea870de73911f1017bdef6a9ff956 (commit) via aa1ab4c0c975ca81ca7005e0359573836e930530 (commit) via 1704cd340e9851e0041d275be54bb7be21b40288 (commit) via 8de218ceaf8bd1c6a122f245228aa885c82985a7 (commit) via 986d8c78d428c6d7ac5d3a8e4ada86e65901ad99 (commit) via 21b23658deecb8a8ae0b0be1c7dbd53adb694fe2 (commit) via 94af779a19c7ed4227a396fd26f1bc22ee26699a (commit) via 06455f35cf076326134621cc44a446681e6c90e4 (commit) via ca5ef925eb1ae2a1e63ae1b0762ddbbef19e49a2 (commit) via 490b2d6ee5146c7f097ba8a2759bf720d528abce (commit) from 1d6b62aa619dd4eba44c77587fc51349b73c9ce5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74adf4e543d506a44500d0aa9bf1203c2270b217 commit 74adf4e543d506a44500d0aa9bf1203c2270b217 Merge: 1d6b62a dfa27f0 Author: Stephen Kelly AuthorDate: Tue Oct 4 16:57:34 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 16:57:34 2016 -0400 Merge topic 'extract-cmLinkLineComputer' into next dfa27f07 cmLinkLineComputer: Extract from cmLocalGenerator 511ed264 cmLocalGenerator: Inline conversion into link computation 6e77e107 Ninja: Inline code into ConvertToLinkReference e5f9caf1 Ninja: Add a new accessor method abb1e1d2 Ninja: Extract a static path conversion method ee661eb0 Ninja: Inline conversion to relative path ec5115ea Ninja: Get the binary directory from cmState::Directory 44aa69e7 Ninja: Inline output path conversion 4bd19454 Ninja: Simplify method 80816002 cmLocalGenerator: Simplify ConvertToLinkReference fb932b36 cmOutputConverter: Add a flag for IsUnix 608e6fe5 Convert: Inline platform-specific methods 5dcf248b Ninja: Extract identical code from condition 3288481c Ninja: Replace array access with local variable c7926fe8 Ninja: Separate two coupled calls a41cf74b Makefiles: Introduce local RelativePath method ... https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dfa27f07b492d1aaa94b32a11b4e24ca73d5e420 commit dfa27f07b492d1aaa94b32a11b4e24ca73d5e420 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:34 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:34 2016 +0200 cmLinkLineComputer: Extract from cmLocalGenerator CMake has several classes which have too many responsibilities. cmLocalGenerator is one of them. Start to extract the link line computation. Create generator-specific implementations of the interface to account for generator-specific behavior. Unfortunately MSVC60 has different behavior to everything else and CMake still generates makefiles for it. Isolate it with MSVC60-specific names. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index ec49481..81108ad 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -300,6 +300,8 @@ set(SRCS cmInstallDirectoryGenerator.cxx cmLinkedTree.h cmLinkItem.h + cmLinkLineComputer.cxx + cmLinkLineComputer.h cmListFileCache.cxx cmListFileCache.h cmListFileLexer.c @@ -318,6 +320,8 @@ set(SRCS cmMakefileUtilityTargetGenerator.cxx cmMessenger.cxx cmMessenger.h + cmMSVC60LinkLineComputer.cxx + cmMSVC60LinkLineComputer.h cmOSXBundleGenerator.cxx cmOSXBundleGenerator.h cmOutputConverter.cxx @@ -543,6 +547,8 @@ set(SRCS ${SRCS} cmNinjaNormalTargetGenerator.h cmNinjaUtilityTargetGenerator.cxx cmNinjaUtilityTargetGenerator.h + cmNinjaLinkLineComputer.cxx + cmNinjaLinkLineComputer.h ) # Temporary variable for tools targets diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 14ea1a9..b995fa1 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" #include "cmGlobalCommonGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalCommonGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -59,7 +60,8 @@ void cmCommonTargetGenerator::AddFeatureFlags(std::string& flags, } } -void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags) +void cmCommonTargetGenerator::AddModuleDefinitionFlag( + cmLinkLineComputer* linkLineComputer, std::string& flags) { if (!this->ModuleDefinitionFile) { return; @@ -76,7 +78,7 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags) // vs6's "cl -link" pass it to the linker. std::string flag = defFileFlag; flag += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToLinkReference( + linkLineComputer->ConvertToLinkReference( this->ModuleDefinitionFile->GetFullPath()), cmOutputConverter::SHELL); this->LocalGenerator->AppendFlags(flags, flag); diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index 707b81e..fe27038 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -16,6 +16,7 @@ class cmGlobalCommonGenerator; class cmLocalCommonGenerator; class cmMakefile; class cmSourceFile; +class cmLinkLineComputer; /** \class cmCommonTargetGenerator * \brief Common infrastructure for Makefile and Ninja per-target generators @@ -37,7 +38,8 @@ protected: bool GetFeatureAsBool(const std::string& feature); // Helper to add flag for windows .def file. - void AddModuleDefinitionFlag(std::string& flags); + void AddModuleDefinitionFlag(cmLinkLineComputer* linkLineComputer, + std::string& flags); cmGeneratorTarget* GeneratorTarget; cmMakefile* Makefile; diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 959dfdb..9e43a52 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -362,9 +362,13 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries( this->GeneratorTarget->GetCreateRuleVariable(language, config); bool useWatcomQuote = this->Makefile->IsOn(createRule + "_USE_WATCOM_QUOTE"); + CM_AUTO_PTR linkLineComputer = + this->GetGlobalGenerator()->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory()); + this->LocalGenerator->GetTargetFlags( - config, linkLibraries, flags, linkFlags, frameworkPath, linkPath, - this->GeneratorTarget, useWatcomQuote); + linkLineComputer.get(), config, linkLibraries, flags, linkFlags, + frameworkPath, linkPath, this->GeneratorTarget, useWatcomQuote); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); if (!linkPath.empty()) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index a446862..251555b 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -20,7 +20,9 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmInstallGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" +#include "cmMSVC60LinkLineComputer.h" #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmPolicies.h" @@ -1393,6 +1395,18 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() return autogenTargets; } +cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer( + cmState::Directory stateDir) const +{ + return new cmLinkLineComputer(stateDir); +} + +cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer( + cmState::Directory stateDir) const +{ + return new cmMSVC60LinkLineComputer(stateDir); +} + void cmGlobalGenerator::FinalizeTargetCompileInfo() { std::vector const langs = diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 4120b52..3ae2ebd 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -33,6 +33,7 @@ class cmExportBuildFileGenerator; class cmExternalMakefileProjectGenerator; class cmGeneratorTarget; class cmLocalGenerator; +class cmLinkLineComputer; class cmMakefile; class cmake; @@ -98,6 +99,12 @@ public: */ virtual void Generate(); + virtual cmLinkLineComputer* CreateLinkLineComputer( + cmState::Directory stateDir) const; + + cmLinkLineComputer* CreateMSVC60LinkLineComputer( + cmState::Directory stateDir) const; + /** * Set/Get and Clear the enabled languages. */ diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 4e74a94..9e0c5b6 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -11,6 +11,7 @@ #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" +#include "cmNinjaLinkLineComputer.h" #include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" @@ -64,6 +65,12 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os, os << "# " << comment.substr(lpos) << "\n\n"; } +cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer( + cmState::Directory stateDir) const +{ + return new cmNinjaLinkLineComputer(stateDir, this->OutputPathPrefix); +} + std::string cmGlobalNinjaGenerator::EncodeRuleName(std::string const& name) { // Ninja rule names must match "[a-zA-Z0-9_.-]+". Use ".xx" to encode diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 6543c9e..c0e0dff 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -70,6 +70,9 @@ public: std::string EncodePath(const std::string& path); static std::string EncodeDepfileSpace(const std::string& path); + cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir) const + CM_OVERRIDE; + /** * Write the given @a comment to the output stream @a os. It * handles new line character properly. diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx new file mode 100644 index 0000000..7103a5b --- /dev/null +++ b/Source/cmLinkLineComputer.cxx @@ -0,0 +1,27 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmLinkLineComputer.h" +#include "cmOutputConverter.h" + +cmLinkLineComputer::cmLinkLineComputer(cmState::Directory stateDir) + : StateDir(stateDir) +{ +} + +cmLinkLineComputer::~cmLinkLineComputer() +{ +} + +std::string cmLinkLineComputer::ConvertToLinkReference( + std::string const& lib) const +{ + std::string relLib = lib; + + if (cmOutputConverter::ContainedInDirectory( + this->StateDir.GetCurrentBinary(), lib, this->StateDir)) { + relLib = cmOutputConverter::ForceToRelativePath( + this->StateDir.GetCurrentBinary(), lib); + } + return relLib; +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h new file mode 100644 index 0000000..b25cbf9 --- /dev/null +++ b/Source/cmLinkLineComputer.h @@ -0,0 +1,21 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmLinkLineComputer_h +#define cmLinkLineComputer_h + +#include "cmState.h" + +class cmLinkLineComputer +{ +public: + cmLinkLineComputer(cmState::Directory stateDir); + virtual ~cmLinkLineComputer(); + + virtual std::string ConvertToLinkReference(std::string const& input) const; + +protected: + cmState::Directory StateDir; +}; + +#endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 40b7999..7db0282 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -12,6 +12,7 @@ #include "cmInstallGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" +#include "cmLinkLineComputer.h" #include "cmMakefile.h" #include "cmSourceFile.h" #include "cmSystemTools.h" @@ -1149,9 +1150,10 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags, } void cmLocalGenerator::GetTargetFlags( - const std::string& config, std::string& linkLibs, std::string& flags, - std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, - cmGeneratorTarget* target, bool useWatcomQuote) + cmLinkLineComputer* linkLineComputer, const std::string& config, + std::string& linkLibs, std::string& flags, std::string& linkFlags, + std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target, + bool useWatcomQuote) { const std::string buildType = cmSystemTools::UpperCase(config); const char* libraryLinkVariable = @@ -1203,8 +1205,9 @@ void cmLocalGenerator::GetTargetFlags( linkFlags += " "; } } - this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target, - false, false, useWatcomQuote); + this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, + linkPath, *target, false, false, + useWatcomQuote); } break; case cmState::EXECUTABLE: { linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); @@ -1223,8 +1226,9 @@ void cmLocalGenerator::GetTargetFlags( return; } this->AddLanguageFlags(flags, linkLanguage, buildType); - this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target, - false, false, useWatcomQuote); + this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, + linkPath, *target, false, false, + useWatcomQuote); if (cmSystemTools::IsOn( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") + @@ -1375,51 +1379,15 @@ std::string cmLocalGenerator::GetTargetFortranFlags( return std::string(); } -std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) -{ -#if defined(_WIN32) && !defined(__CYGWIN__) - // Work-ardound command line parsing limitations in MSVC 6.0 - if (this->Makefile->IsOn("MSVC60")) { - // Search for the last space. - std::string::size_type pos = lib.rfind(' '); - if (pos != lib.npos) { - // Find the slash after the last space, if any. - pos = lib.find('/', pos); - - // Convert the portion of the path with a space to a short path. - std::string sp; - if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) { - // Append the rest of the path with no space. - sp += lib.substr(pos); - - return sp; - } - } - } -#endif - - // Normal behavior. - std::string relLib = lib; - cmState::Directory stateDir = this->GetStateSnapshot().GetDirectory(); - if (cmOutputConverter::ContainedInDirectory( - stateDir.GetCurrentBinary(), lib, stateDir)) { - relLib = cmOutputConverter::ForceToRelativePath( - stateDir.GetCurrentBinary(), lib); - } - return relLib; -} - /** * Output the linking rules on a command line. For executables, * targetLibrary should be a NULL pointer. For libraries, it should point * to the name of the library. This will not link a library against itself. */ -void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, - std::string& frameworkPath, - std::string& linkPath, - cmGeneratorTarget& tgt, bool relink, - bool forResponseFile, - bool useWatcomQuote) +void cmLocalGenerator::OutputLinkLibraries( + cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, + std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget& tgt, + bool relink, bool forResponseFile, bool useWatcomQuote) { OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); @@ -1521,7 +1489,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, } if (li->IsPath) { linkLibs += this->ConvertToOutputFormat( - this->ConvertToLinkReference(li->Value), shellFormat); + linkLineComputer->ConvertToLinkReference(li->Value), shellFormat); } else { linkLibs += li->Value; } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 703a507..1b49dd1 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -24,6 +24,7 @@ class cmGeneratorTarget; class cmGlobalGenerator; class cmMakefile; class cmSourceFile; +class cmLinkLineComputer; /** \class cmLocalGenerator * \brief Create required build files for a directory. @@ -309,7 +310,8 @@ public: /** Fill out these strings for the given target. Libraries to link, * flags, and linkflags. */ - void GetTargetFlags(const std::string& config, std::string& linkLibs, + void GetTargetFlags(cmLinkLineComputer* linkLineComputer, + const std::string& config, std::string& linkLibs, std::string& flags, std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target, bool useWatcomQuote); @@ -342,7 +344,8 @@ public: protected: ///! put all the libraries for a target on into the given stream - void OutputLinkLibraries(std::string& linkLibraries, + void OutputLinkLibraries(cmLinkLineComputer* linkLineComputer, + std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget&, bool relink, bool forResponseFile, bool useWatcomQuote); @@ -367,8 +370,6 @@ protected: std::string& CreateSafeUniqueObjectFileName(const std::string& sin, std::string const& dir_max); - virtual std::string ConvertToLinkReference(std::string const& lib); - /** Check whether the native build system supports the given definition. Issues a warning. */ virtual bool CheckDefinition(std::string const& define) const; diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index e2bce1b..e25eb0f 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -120,17 +120,6 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() // Virtual protected methods. -std::string cmLocalNinjaGenerator::ConvertToLinkReference( - std::string const& lib) -{ - cmLocalNinjaGenerator* ng = static_cast( - this->GetGlobalNinjaGenerator()->GetLocalGenerators()[0]); - - return cmGlobalNinjaGenerator::ConvertToNinjaPath( - lib, ng->GetStateSnapshot().GetDirectory(), - this->GetGlobalNinjaGenerator()->GetOutputPathPrefix()); -} - std::string cmLocalNinjaGenerator::ConvertToIncludeReference( std::string const& path, cmOutputConverter::OutputFormat format, bool forceFullPaths) diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 3061b57..b04788d 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -76,8 +76,6 @@ public: void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg, cmNinjaDeps& ninjaDeps); - std::string ConvertToLinkReference(std::string const& lib) CM_OVERRIDE; - void ComputeObjectFilenames( std::map& mapping, cmGeneratorTarget const* gt = CM_NULLPTR) CM_OVERRIDE; diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx new file mode 100644 index 0000000..fbd8022 --- /dev/null +++ b/Source/cmMSVC60LinkLineComputer.cxx @@ -0,0 +1,33 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmMSVC60LinkLineComputer.h" + +cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer(cmState::Directory stateDir) + : cmLinkLineComputer(stateDir) +{ +} + +std::string cmMSVC60LinkLineComputer::ConvertToLinkReference( + std::string const& lib) const +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + // Work-ardound command line parsing limitations in MSVC 6.0 + // Search for the last space. + std::string::size_type pos = lib.rfind(' '); + if (pos != lib.npos) { + // Find the slash after the last space, if any. + pos = lib.find('/', pos); + + // Convert the portion of the path with a space to a short path. + std::string sp; + if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) { + // Append the rest of the path with no space. + sp += lib.substr(pos); + return sp; + } + } +#endif + + return cmLinkLineComputer::ConvertToLinkReference(lib); +} diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h new file mode 100644 index 0000000..c159b61 --- /dev/null +++ b/Source/cmMSVC60LinkLineComputer.h @@ -0,0 +1,18 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmMSVC60LinkLineComputer_h +#define cmMSVC60LinkLineComputer_h + +#include "cmLinkLineComputer.h" + +class cmMSVC60LinkLineComputer : public cmLinkLineComputer +{ +public: + cmMSVC60LinkLineComputer(cmState::Directory stateDir); + + std::string ConvertToLinkReference(std::string const& input) const + CM_OVERRIDE; +}; + +#endif diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index ff97696..8bc7ddf 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -5,6 +5,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -210,7 +211,20 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->AppendFlags( linkFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); - this->AddModuleDefinitionFlag(linkFlags); + { + CM_AUTO_PTR linkLineComputer; + + if (this->Makefile->IsOn("MSVC60")) { + linkLineComputer.reset( + this->GlobalGenerator->CreateMSVC60LinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + } else { + linkLineComputer.reset(this->GlobalGenerator->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + } + + this->AddModuleDefinitionFlag(linkLineComputer.get(), linkFlags); + } // Construct a list of files associated with this executable that // may need to be cleaned. diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 8e25f43..f6f4a00 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -5,8 +5,10 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" +#include "cmMSVC60LinkLineComputer.h" #include "cmMakefile.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" @@ -159,7 +161,18 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName); - this->AddModuleDefinitionFlag(extraFlags); + + CM_AUTO_PTR linkLineComputer; + + if (this->Makefile->IsOn("MSVC60")) { + linkLineComputer.reset(this->GlobalGenerator->CreateMSVC60LinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + } else { + linkLineComputer.reset(this->GlobalGenerator->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + } + + this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(extraFlags, " -Wl,--no-as-needed"); @@ -184,7 +197,18 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_MODULE_LINKER_FLAGS", this->ConfigName); - this->AddModuleDefinitionFlag(extraFlags); + + CM_AUTO_PTR linkLineComputer; + + if (this->Makefile->IsOn("MSVC60")) { + linkLineComputer.reset(this->GlobalGenerator->CreateMSVC60LinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + } else { + linkLineComputer.reset(this->GlobalGenerator->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + } + + this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); this->WriteLibraryRules(linkRuleVar, extraFlags, relink); } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index a9b2f4e..d6c496f 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -10,6 +10,7 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -1585,9 +1586,20 @@ void cmMakefileTargetGenerator::CreateLinkLibs( { std::string frameworkPath; std::string linkPath; - this->LocalGenerator->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, - *this->GeneratorTarget, relink, - useResponseFile, useWatcomQuote); + + CM_AUTO_PTR linkLineComputer; + + if (this->Makefile->IsOn("MSVC60")) { + linkLineComputer.reset(this->GlobalGenerator->CreateMSVC60LinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + } else { + linkLineComputer.reset(this->GlobalGenerator->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + } + + this->LocalGenerator->OutputLinkLibraries( + linkLineComputer.get(), linkLibs, frameworkPath, linkPath, + *this->GeneratorTarget, relink, useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx new file mode 100644 index 0000000..4bc7133 --- /dev/null +++ b/Source/cmNinjaLinkLineComputer.cxx @@ -0,0 +1,19 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmNinjaLinkLineComputer.h" +#include "cmGlobalNinjaGenerator.h" + +cmNinjaLinkLineComputer::cmNinjaLinkLineComputer(cmState::Directory stateDir, + std::string const& prefix) + : cmLinkLineComputer(stateDir) + , NinjaPrefix(prefix) +{ +} + +std::string cmNinjaLinkLineComputer::ConvertToLinkReference( + std::string const& lib) const +{ + return cmGlobalNinjaGenerator::ConvertToNinjaPath(lib, this->StateDir, + this->NinjaPrefix); +} diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h new file mode 100644 index 0000000..370f6ce --- /dev/null +++ b/Source/cmNinjaLinkLineComputer.h @@ -0,0 +1,23 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmNinjaLinkLineComputer_h +#define cmNinjaLinkLineComputer_h + +#include "cmLinkLineComputer.h" +#include "cmState.h" + +class cmNinjaLinkLineComputer : public cmLinkLineComputer +{ +public: + cmNinjaLinkLineComputer(cmState::Directory stateDir, + std::string const& ninjaPrefix); + + std::string ConvertToLinkReference(std::string const& input) const + CM_OVERRIDE; + +private: + std::string NinjaPrefix; +}; + +#endif diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 095c703..45baf8d 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -8,6 +8,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalNinjaGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" @@ -470,9 +471,14 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() vars["TARGET_FILE"] = localGen.ConvertToOutputFormat(targetOutputReal, cmOutputConverter::SHELL); - localGen.GetTargetFlags(this->GetConfigName(), vars["LINK_LIBRARIES"], - vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, - linkPath, &genTarget, useWatcomQuote); + CM_AUTO_PTR linkLineComputer( + this->GetGlobalGenerator()->CreateLinkLineComputer( + this->GetLocalGenerator()->GetStateSnapshot().GetDirectory())); + + localGen.GetTargetFlags(linkLineComputer.get(), this->GetConfigName(), + vars["LINK_LIBRARIES"], vars["FLAGS"], + vars["LINK_FLAGS"], frameworkPath, linkPath, + &genTarget, useWatcomQuote); if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") && (gt.GetType() == cmState::SHARED_LIBRARY || gt.IsExecutableWithExports())) { @@ -497,7 +503,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->addPoolNinjaVariable("JOB_POOL_LINK", >, vars); - this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]); + this->AddModuleDefinitionFlag(linkLineComputer.get(), vars["LINK_FLAGS"]); vars["LINK_FLAGS"] = cmGlobalNinjaGenerator::EncodeLiteral(vars["LINK_FLAGS"]); diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a2bdf49..a58510e 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -7,6 +7,7 @@ #include "cmFileMonitor.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmLinkLineComputer.h" #include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -728,8 +729,12 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, std::string linkLanguageFlags; std::string frameworkPath; std::string linkPath; - lg->GetTargetFlags(config, linkLibs, linkLanguageFlags, linkFlags, - frameworkPath, linkPath, target, false); + CM_AUTO_PTR linkLineComputer( + lg->GetGlobalGenerator()->CreateLinkLineComputer( + lg->GetStateSnapshot().GetDirectory())); + lg->GetTargetFlags(linkLineComputer.get(), config, linkLibs, + linkLanguageFlags, linkFlags, frameworkPath, linkPath, + target, false); linkLibs = cmSystemTools::TrimWhitespace(linkLibs); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 14124f8..4024ddd 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -12,6 +12,7 @@ #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmGlobalGeneratorFactory.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmMessenger.h" @@ -582,8 +583,10 @@ bool cmake::FindPackage(const std::vector& args) gg->CreateGenerationObjects(); cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName()); cmLocalGenerator* lg = gtgt->GetLocalGenerator(); - lg->GetTargetFlags(buildType, linkLibs, flags, linkFlags, frameworkPath, - linkPath, gtgt, false); + CM_AUTO_PTR linkLineComputer( + gg->CreateLinkLineComputer(lg->GetStateSnapshot().GetDirectory())); + lg->GetTargetFlags(linkLineComputer.get(), buildType, linkLibs, flags, + linkFlags, frameworkPath, linkPath, gtgt, false); linkLibs = frameworkPath + linkPath + linkLibs; printf("%s\n", linkLibs.c_str()); diff --git a/bootstrap b/bootstrap index 889cc33..fb8b1eb 100755 --- a/bootstrap +++ b/bootstrap @@ -297,6 +297,8 @@ CMAKE_CXX_SOURCES="\ cmFileTimeComparison \ cmGlobalUnixMakefileGenerator3 \ cmLocalUnixMakefileGenerator3 \ + cmLinkLineComputer \ + cmMSVC60LinkLineComputer \ cmMakefileExecutableTargetGenerator \ cmMakefileLibraryTargetGenerator \ cmMakefileTargetGenerator \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=511ed264e1b2816d519fb45bd1a86f650d35dbed commit 511ed264e1b2816d519fb45bd1a86f650d35dbed Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:34 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:34 2016 +0200 cmLocalGenerator: Inline conversion into link computation diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 8fcfb32..40b7999 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1399,7 +1399,14 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) #endif // Normal behavior. - return this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib); + std::string relLib = lib; + cmState::Directory stateDir = this->GetStateSnapshot().GetDirectory(); + if (cmOutputConverter::ContainedInDirectory( + stateDir.GetCurrentBinary(), lib, stateDir)) { + relLib = cmOutputConverter::ForceToRelativePath( + stateDir.GetCurrentBinary(), lib); + } + return relLib; } /** https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e77e10712d852322e28a9283e7b1385fed01da0 commit 6e77e10712d852322e28a9283e7b1385fed01da0 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:33 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:33 2016 +0200 Ninja: Inline code into ConvertToLinkReference diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index b04c11d..e2bce1b 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -123,7 +123,12 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() std::string cmLocalNinjaGenerator::ConvertToLinkReference( std::string const& lib) { - return this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); + cmLocalNinjaGenerator* ng = static_cast( + this->GetGlobalNinjaGenerator()->GetLocalGenerators()[0]); + + return cmGlobalNinjaGenerator::ConvertToNinjaPath( + lib, ng->GetStateSnapshot().GetDirectory(), + this->GetGlobalNinjaGenerator()->GetOutputPathPrefix()); } std::string cmLocalNinjaGenerator::ConvertToIncludeReference( https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5f9caf1260a17aea799487aa7abb2950d3252ce commit e5f9caf1260a17aea799487aa7abb2950d3252ce Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:33 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:33 2016 +0200 Ninja: Add a new accessor method For use by extracted code. diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 51a8032..6543c9e 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -337,6 +337,7 @@ public: bool SupportsImplicitOuts() const; std::string NinjaOutputPath(std::string const& path); + std::string GetOutputPathPrefix() const { return this->OutputPathPrefix; } bool HasOutputPathPrefix() const { return !this->OutputPathPrefix.empty(); } void StripNinjaOutputPathPrefixAsSuffix(std::string& path); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=abb1e1d227f3f5e61fa22c57c7f6f0fdca745ace commit abb1e1d227f3f5e61fa22c57c7f6f0fdca745ace Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:33 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:33 2016 +0200 Ninja: Extract a static path conversion method It is independent of cmLocalGenerator. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 9a7939e..4e74a94 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -830,13 +830,10 @@ static void EnsureTrailingSlash(std::string& path) #endif } -std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) +std::string cmGlobalNinjaGenerator::ConvertToNinjaPath( + const std::string& path, cmState::Directory stateDir, + std::string const& prefix) { - cmLocalNinjaGenerator* ng = - static_cast(this->LocalGenerators[0]); - - cmState::Directory stateDir = ng->GetStateSnapshot().GetDirectory(); - std::string convPath = path; if (cmOutputConverter::ContainedInDirectory(stateDir.GetCurrentBinary(), @@ -846,7 +843,7 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) } if (!cmSystemTools::FileIsFullPath(convPath)) { - convPath = this->OutputPathPrefix + convPath; + convPath = prefix + convPath; } #ifdef _WIN32 @@ -855,6 +852,15 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) return convPath; } +std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) +{ + cmLocalNinjaGenerator* ng = + static_cast(this->LocalGenerators[0]); + + return ConvertToNinjaPath(path, ng->GetStateSnapshot().GetDirectory(), + this->OutputPathPrefix); +} + std::string cmGlobalNinjaGenerator::ConvertToNinjaFolderRule( const std::string& path) { diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index dcf7406..51a8032 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -233,6 +233,9 @@ public: return this->RulesFileStream; } + static std::string ConvertToNinjaPath(const std::string& path, + cmState::Directory stateDir, + std::string const& prefix); std::string ConvertToNinjaPath(const std::string& path); std::string ConvertToNinjaFolderRule(const std::string& path); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ee661eb0e937bbb683f1deb24faf927add5f060a commit ee661eb0e937bbb683f1deb24faf927add5f060a Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:33 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:33 2016 +0200 Ninja: Inline conversion to relative path diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 5bec420..9a7939e 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -837,8 +837,13 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) cmState::Directory stateDir = ng->GetStateSnapshot().GetDirectory(); - std::string convPath = - ng->ConvertToRelativePath(stateDir.GetCurrentBinary(), path); + std::string convPath = path; + + if (cmOutputConverter::ContainedInDirectory(stateDir.GetCurrentBinary(), + path, stateDir)) { + convPath = cmOutputConverter::ForceToRelativePath( + stateDir.GetCurrentBinary(), path); + } if (!cmSystemTools::FileIsFullPath(convPath)) { convPath = this->OutputPathPrefix + convPath; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec5115eab84226573a8d6903db68d432c1fe147a commit ec5115eab84226573a8d6903db68d432c1fe147a Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:33 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:33 2016 +0200 Ninja: Get the binary directory from cmState::Directory This method will be extracted, so don't rely on cmLocalGenerator. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index aa1e7c2..5bec420 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -834,8 +834,12 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) { cmLocalNinjaGenerator* ng = static_cast(this->LocalGenerators[0]); - std::string convPath = ng->ConvertToRelativePath( - this->LocalGenerators[0]->GetState()->GetBinaryDirectory(), path); + + cmState::Directory stateDir = ng->GetStateSnapshot().GetDirectory(); + + std::string convPath = + ng->ConvertToRelativePath(stateDir.GetCurrentBinary(), path); + if (!cmSystemTools::FileIsFullPath(convPath)) { convPath = this->OutputPathPrefix + convPath; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44aa69e750a730fde6610acecfef09663d42098f commit 44aa69e750a730fde6610acecfef09663d42098f Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:32 2016 +0200 Ninja: Inline output path conversion diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 5d60c66..aa1e7c2 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -836,7 +836,10 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) static_cast(this->LocalGenerators[0]); std::string convPath = ng->ConvertToRelativePath( this->LocalGenerators[0]->GetState()->GetBinaryDirectory(), path); - convPath = this->NinjaOutputPath(convPath); + if (!cmSystemTools::FileIsFullPath(convPath)) { + convPath = this->OutputPathPrefix + convPath; + } + #ifdef _WIN32 std::replace(convPath.begin(), convPath.end(), '/', '\\'); #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bd19454ed652c54d278546992f9c3606e1de966 commit 4bd19454ed652c54d278546992f9c3606e1de966 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:32 2016 +0200 Ninja: Simplify method HasOutputPathPrefix only checks if OutputPathPrefix is empty. The following concatenation can be done without the check. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index f5a0e68..5d60c66 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1423,7 +1423,7 @@ void cmGlobalNinjaGenerator::InitOutputPathPrefix() std::string cmGlobalNinjaGenerator::NinjaOutputPath(std::string const& path) { - if (!this->HasOutputPathPrefix() || cmSystemTools::FileIsFullPath(path)) { + if (cmSystemTools::FileIsFullPath(path)) { return path; } return this->OutputPathPrefix + path; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8081600219bc8638dd8ce99e6d25a7f35c0cc8f0 commit 8081600219bc8638dd8ce99e6d25a7f35c0cc8f0 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:32 2016 +0200 cmLocalGenerator: Simplify ConvertToLinkReference Make conversion to output format the caller responsibility, so that the method only 'converts to a link reference'. diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 6887a31..14ea1a9 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -75,8 +75,10 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags) // Append the flag and value. Use ConvertToLinkReference to help // vs6's "cl -link" pass it to the linker. std::string flag = defFileFlag; - flag += (this->LocalGenerator->ConvertToLinkReference( - this->ModuleDefinitionFile->GetFullPath())); + flag += this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToLinkReference( + this->ModuleDefinitionFile->GetFullPath()), + cmOutputConverter::SHELL); this->LocalGenerator->AppendFlags(flags, flag); } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 1f9e4cf..8fcfb32 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1375,8 +1375,7 @@ std::string cmLocalGenerator::GetTargetFortranFlags( return std::string(); } -std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, - OutputFormat format) +std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) { #if defined(_WIN32) && !defined(__CYGWIN__) // Work-ardound command line parsing limitations in MSVC 6.0 @@ -1393,17 +1392,14 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, // Append the rest of the path with no space. sp += lib.substr(pos); - // Convert to an output path. - return this->ConvertToOutputFormat(sp.c_str(), format); + return sp; } } } #endif // Normal behavior. - return this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib), - format); + return this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib); } /** @@ -1517,7 +1513,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, continue; } if (li->IsPath) { - linkLibs += this->ConvertToLinkReference(li->Value, shellFormat); + linkLibs += this->ConvertToOutputFormat( + this->ConvertToLinkReference(li->Value), shellFormat); } else { linkLibs += li->Value; } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 19469be..703a507 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -367,9 +367,7 @@ protected: std::string& CreateSafeUniqueObjectFileName(const std::string& sin, std::string const& dir_max); - virtual std::string ConvertToLinkReference( - std::string const& lib, - cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL); + virtual std::string ConvertToLinkReference(std::string const& lib); /** Check whether the native build system supports the given definition. Issues a warning. */ diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 5783806..b04c11d 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -121,10 +121,9 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() // Virtual protected methods. std::string cmLocalNinjaGenerator::ConvertToLinkReference( - std::string const& lib, cmOutputConverter::OutputFormat format) + std::string const& lib) { - std::string path = this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); - return this->ConvertToOutputFormat(path, format); + return this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); } std::string cmLocalNinjaGenerator::ConvertToIncludeReference( diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 875f8c6..3061b57 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -76,9 +76,7 @@ public: void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg, cmNinjaDeps& ninjaDeps); - std::string ConvertToLinkReference(std::string const& lib, - cmOutputConverter::OutputFormat format = - cmOutputConverter::SHELL) CM_OVERRIDE; + std::string ConvertToLinkReference(std::string const& lib) CM_OVERRIDE; void ComputeObjectFilenames( std::map& mapping, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb932b367e1678c3d4395d7af422fa9627666f1a commit fb932b367e1678c3d4395d7af422fa9627666f1a Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:32 2016 +0200 cmOutputConverter: Add a flag for IsUnix Remove the need for method parameters to represent the distinction. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 0f2c60e..05e7d63 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -220,9 +220,11 @@ std::string cmOutputConverter::EscapeForShell(const std::string& str, if (this->GetState()->UseNMake()) { flags |= Shell_Flag_NMake; } + if (!this->GetState()->UseWindowsShell()) { + flags |= Shell_Flag_IsUnix; + } - return Shell__GetArgument(str.c_str(), !this->GetState()->UseWindowsShell(), - flags); + return Shell__GetArgument(str.c_str(), flags); } std::string cmOutputConverter::EscapeForCMake(const std::string& str) @@ -251,7 +253,7 @@ std::string cmOutputConverter::EscapeForCMake(const std::string& str) std::string cmOutputConverter::EscapeWindowsShellArgument(const char* arg, int shell_flags) { - return Shell__GetArgument(arg, 0, shell_flags); + return Shell__GetArgument(arg, shell_flags); } cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( @@ -337,10 +339,10 @@ int cmOutputConverter::Shell__CharNeedsQuotesOnWindows(char c) (c == '>') || (c == '|') || (c == '^')); } -int cmOutputConverter::Shell__CharNeedsQuotes(char c, int isUnix, int flags) +int cmOutputConverter::Shell__CharNeedsQuotes(char c, int flags) { /* On Windows the built-in command shell echo never needs quotes. */ - if (!isUnix && (flags & Shell_Flag_EchoWindows)) { + if (!(flags & Shell_Flag_IsUnix) && (flags & Shell_Flag_EchoWindows)) { return 0; } @@ -349,7 +351,7 @@ int cmOutputConverter::Shell__CharNeedsQuotes(char c, int isUnix, int flags) return 1; } - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { /* On UNIX several special characters need quotes to preserve them. */ if (Shell__CharNeedsQuotesOnUnix(c)) { return 1; @@ -407,8 +409,7 @@ flag later when we understand applications of this better. */ #define KWSYS_SYSTEM_SHELL_QUOTE_MAKE_VARIABLES 0 -int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int isUnix, - int flags) +int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int flags) { /* The empty string needs quotes. */ if (!*in) { @@ -440,14 +441,14 @@ int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int isUnix, } /* Check whether this character needs quotes. */ - if (Shell__CharNeedsQuotes(*c, isUnix, flags)) { + if (Shell__CharNeedsQuotes(*c, flags)) { return 1; } } } /* On Windows some single character arguments need quotes. */ - if (!isUnix && *in && !*(in + 1)) { + if (flags & Shell_Flag_IsUnix && *in && !*(in + 1)) { char c = *in; if ((c == '?') || (c == '&') || (c == '^') || (c == '|') || (c == '#')) { return 1; @@ -457,8 +458,7 @@ int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int isUnix, return 0; } -std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, - int flags) +std::string cmOutputConverter::Shell__GetArgument(const char* in, int flags) { std::ostringstream out; @@ -469,11 +469,11 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, int windows_backslashes = 0; /* Whether the argument must be quoted. */ - int needQuotes = Shell__ArgumentNeedsQuotes(in, isUnix, flags); + int needQuotes = Shell__ArgumentNeedsQuotes(in, flags); if (needQuotes) { /* Add the opening quote for this argument. */ if (flags & Shell_Flag_WatcomQuote) { - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { out << '"'; } out << '\''; @@ -505,7 +505,7 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, } /* Check whether this character needs escaping for the shell. */ - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { /* On Unix a few special characters need escaping even inside a quoted argument. */ if (*c == '\\' || *c == '"' || *c == '`' || *c == '$') { @@ -602,7 +602,7 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, /* Add the closing quote for this argument. */ if (flags & Shell_Flag_WatcomQuote) { out << '\''; - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { out << '"'; } } else { diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index c3c7e36..596bdf0 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -62,7 +62,9 @@ public: Shell_Flag_AllowMakeVariables = (1 << 6), /** The target shell quoting uses extra single Quotes for Watcom tools. */ - Shell_Flag_WatcomQuote = (1 << 7) + Shell_Flag_WatcomQuote = (1 << 7), + + Shell_Flag_IsUnix = (1 << 8), }; std::string EscapeForShell(const std::string& str, bool makeVars = false, @@ -112,11 +114,11 @@ private: static int Shell__CharIsWhitespace(char c); static int Shell__CharNeedsQuotesOnUnix(char c); static int Shell__CharNeedsQuotesOnWindows(char c); - static int Shell__CharNeedsQuotes(char c, int isUnix, int flags); + static int Shell__CharNeedsQuotes(char c, int flags); static int Shell__CharIsMakeVariableName(char c); static const char* Shell__SkipMakeVariables(const char* c); - static int Shell__ArgumentNeedsQuotes(const char* in, int isUnix, int flags); - static std::string Shell__GetArgument(const char* in, int isUnix, int flags); + static int Shell__ArgumentNeedsQuotes(const char* in, int flags); + static std::string Shell__GetArgument(const char* in, int flags); private: cmState::Snapshot StateSnapshot; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=608e6fe5f24bc6cbf8f4296994fa3878b49a4557 commit 608e6fe5f24bc6cbf8f4296994fa3878b49a4557 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:32 2016 +0200 Convert: Inline platform-specific methods They don't provide real value. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index ec43c57..0f2c60e 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -221,9 +221,8 @@ std::string cmOutputConverter::EscapeForShell(const std::string& str, flags |= Shell_Flag_NMake; } - return this->GetState()->UseWindowsShell() - ? Shell_GetArgumentForWindows(str.c_str(), flags) - : Shell_GetArgumentForUnix(str.c_str(), flags); + return Shell__GetArgument(str.c_str(), !this->GetState()->UseWindowsShell(), + flags); } std::string cmOutputConverter::EscapeForCMake(const std::string& str) @@ -252,7 +251,7 @@ std::string cmOutputConverter::EscapeForCMake(const std::string& str) std::string cmOutputConverter::EscapeWindowsShellArgument(const char* arg, int shell_flags) { - return Shell_GetArgumentForWindows(arg, shell_flags); + return Shell__GetArgument(arg, 0, shell_flags); } cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( @@ -613,15 +612,3 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, return out.str(); } - -std::string cmOutputConverter::Shell_GetArgumentForWindows(const char* in, - int flags) -{ - return Shell__GetArgument(in, 0, flags); -} - -std::string cmOutputConverter::Shell_GetArgumentForUnix(const char* in, - int flags) -{ - return Shell__GetArgument(in, 1, flags); -} diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index aa0e379..c3c7e36 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -29,8 +29,7 @@ public: void SetLinkScriptShell(bool linkScriptShell); /** - * Flags to pass to Shell_GetArgumentForWindows or - * Shell_GetArgumentForUnix. These modify the generated + * Flags to pass to Shell_GetArgument. These modify the generated * quoting and escape sequences to work under alternative * environments. */ @@ -66,16 +65,6 @@ public: Shell_Flag_WatcomQuote = (1 << 7) }; - /** - * Transform the given command line argument for use in a Windows or - * Unix shell. Returns a pointer to the end of the command line - * argument in the provided output buffer. Flags may be passed to - * modify the generated quoting and escape sequences to work under - * alternative environments. - */ - static std::string Shell_GetArgumentForWindows(const char* in, int flags); - static std::string Shell_GetArgumentForUnix(const char* in, int flags); - std::string EscapeForShell(const std::string& str, bool makeVars = false, bool forEcho = false, bool useWatcomQuote = false) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5dcf248bc167a04886fb5388c42d1d11aae61cec commit 5dcf248bc167a04886fb5388c42d1d11aae61cec Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:32 2016 +0200 Ninja: Extract identical code from condition diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 4f95415..5783806 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -493,10 +493,8 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( if (ccg.GetWorkingDirectory().empty()) { output = this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), output); - output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); - } else { - output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } + output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } vars.Output = output.c_str(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3288481c22337a8bdd785d0cd8b725d5abc1351d commit 3288481c22337a8bdd785d0cd8b725d5abc1351d Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:31 2016 +0200 Ninja: Replace array access with local variable diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index a681c18..4f95415 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -489,13 +489,13 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { + output = outputs[0]; if (ccg.GetWorkingDirectory().empty()) { - output = this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), - outputs[0]); + output = + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), output); output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } else { - output = - this->ConvertToOutputFormat(outputs[0], cmOutputConverter::SHELL); + output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } } vars.Output = output.c_str(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c7926fe8890a80bb3e9072e903dcadcf4faac4cf commit c7926fe8890a80bb3e9072e903dcadcf4faac4cf Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:31 2016 +0200 Ninja: Separate two coupled calls diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 11b87e3..a681c18 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -490,10 +490,9 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { if (ccg.GetWorkingDirectory().empty()) { - output = this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), - outputs[0]), - cmOutputConverter::SHELL); + output = this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), + outputs[0]); + output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } else { output = this->ConvertToOutputFormat(outputs[0], cmOutputConverter::SHELL); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a41cf74b1836899ad9e3c80a8013446e849049ed commit a41cf74b1836899ad9e3c80a8013446e849049ed Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:31 2016 +0200 Makefiles: Introduce local RelativePath method This makes it easier to remove directory-specific state from cmOutputConverter where it doesn't belong. Of course, this just relocates the problem to the makefiles generator for now, but that's better than affecting the core. diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 07b40b7..401319e 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -141,7 +141,7 @@ void cmLocalUnixMakefileGenerator3::ComputeHomeRelativeOutputPath() { // Compute the path to use when referencing the current output // directory from the top output directory. - this->HomeRelativeOutputPath = this->ConvertToRelativePath( + this->HomeRelativeOutputPath = this->MaybeConvertToRelativePath( this->GetBinaryDirectory(), this->GetCurrentBinaryDirectory()); if (this->HomeRelativeOutputPath == ".") { this->HomeRelativeOutputPath = ""; @@ -548,7 +548,8 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule( // Construct the left hand side of the rule. std::string tgt = cmSystemTools::ConvertToOutputPath( - this->ConvertToRelativePath(this->GetBinaryDirectory(), target).c_str()); + this->MaybeConvertToRelativePath(this->GetBinaryDirectory(), target) + .c_str()); const char* space = ""; if (tgt.size() == 1) { @@ -577,7 +578,7 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule( dep != depends.end(); ++dep) { replace = *dep; replace = cmSystemTools::ConvertToOutputPath( - this->ConvertToRelativePath(binDir, replace).c_str()); + this->MaybeConvertToRelativePath(binDir, replace).c_str()); os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n"; } } @@ -969,7 +970,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( // working directory will be the start-output directory. bool had_slash = cmd.find('/') != cmd.npos; if (workingDir.empty()) { - cmd = this->ConvertToRelativePath(currentBinDir, cmd); + cmd = this->MaybeConvertToRelativePath(currentBinDir, cmd); } bool has_slash = cmd.find('/') != cmd.npos; if (had_slash && !has_slash) { @@ -994,8 +995,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( if (!outputs.empty()) { if (workingDir.empty()) { output = this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), - outputs[0]), + this->MaybeConvertToRelativePath( + this->GetCurrentBinaryDirectory(), outputs[0]), cmOutputConverter::SHELL); } else { @@ -1082,14 +1083,15 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand( fout << "file(REMOVE_RECURSE\n"; for (std::vector::const_iterator f = files.begin(); f != files.end(); ++f) { - std::string fc = this->ConvertToRelativePath(currentBinDir, *f); + std::string fc = this->MaybeConvertToRelativePath(currentBinDir, *f); fout << " " << cmOutputConverter::EscapeForCMake(fc) << "\n"; } fout << ")\n"; } std::string remove = "$(CMAKE_COMMAND) -P "; remove += this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), cleanfile), + this->MaybeConvertToRelativePath(this->GetCurrentBinaryDirectory(), + cleanfile), cmOutputConverter::SHELL); commands.push_back(remove); @@ -1858,7 +1860,8 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo( } for (std::vector::iterator i = includes.begin(); i != includes.end(); ++i) { - cmakefileStream << " \"" << this->ConvertToRelativePath(binaryDir, *i) + cmakefileStream << " \"" + << this->MaybeConvertToRelativePath(binaryDir, *i) << "\"\n"; } cmakefileStream << " )\n"; @@ -1923,7 +1926,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall( if (!tgt.empty()) { // The make target is always relative to the top of the build tree. std::string tgt2 = - this->ConvertToRelativePath(this->GetBinaryDirectory(), tgt); + this->MaybeConvertToRelativePath(this->GetBinaryDirectory(), tgt); // The target may have been written with windows paths. cmSystemTools::ConvertToOutputSlashes(tgt2); @@ -2096,3 +2099,13 @@ void cmLocalUnixMakefileGenerator3::CreateCDCommand( std::bind1st(std::plus(), prefix)); } } + +std::string cmLocalUnixMakefileGenerator3::MaybeConvertToRelativePath( + std::string const& base, std::string const& path) +{ + if (!cmOutputConverter::ContainedInDirectory( + base, path, this->GetStateSnapshot().GetDirectory())) { + return path; + } + return cmOutputConverter::ForceToRelativePath(base, path); +} diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index fc5c8e7..c3ecda4 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -184,6 +184,9 @@ public: // Eclipse generator. void GetIndividualFileTargets(std::vector& targets); + std::string MaybeConvertToRelativePath(std::string const& base, + std::string const& path); + protected: void WriteLocalMakefile(); diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index cb20117..ff97696 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -130,16 +130,16 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) targetFullPathPDB, cmOutputConverter::SHELL); // Convert to the output path to use in constructing commands. std::string targetOutPath = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath), cmOutputConverter::SHELL); std::string targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); std::string targetOutPathImport = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport), cmOutputConverter::SHELL); @@ -215,27 +215,27 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Construct a list of files associated with this executable that // may need to be cleaned. std::vector exeCleanFiles; - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath)); #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), (targetFullPath + ".manifest").c_str())); #endif if (targetNameReal != targetName) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal)); } if (!targetNameImport.empty()) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport)); std::string implib; if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib)) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), implib)); } } @@ -243,7 +243,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // List the PDB for cleaning only when the whole target is // cleaned. We do not want to delete the .pdb file just before // linking the target. - this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + this->CleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathPDB)); // Add the pre-build and pre-link rules building but not when relinking. @@ -318,7 +318,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); @@ -326,7 +326,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) ? cmOutputConverter::WATCOMQUOTE : cmOutputConverter::SHELL; std::string target = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), output); vars.Target = target.c_str(); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b969bfb..8e25f43 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -305,20 +305,20 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( targetFullPathPDB, cmOutputConverter::SHELL); std::string targetOutPath = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath), cmOutputConverter::SHELL); std::string targetOutPathSO = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathSO), cmOutputConverter::SHELL); std::string targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); std::string targetOutPathImport = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport), cmOutputConverter::SHELL); @@ -366,24 +366,24 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Clean files associated with this library. std::vector libCleanFiles; - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath)); if (targetNameReal != targetName) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal)); } if (targetNameSO != targetName && targetNameSO != targetNameReal) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathSO)); } if (!targetNameImport.empty()) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport)); std::string implib; if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib)) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), implib)); } } @@ -391,14 +391,14 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // List the PDB for cleaning only when the whole target is // cleaned. We do not want to delete the .pdb file just before // linking the target. - this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + this->CleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathPDB)); #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), (targetFullPath + ".manifest").c_str())); } @@ -537,7 +537,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); @@ -546,7 +546,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( ? cmOutputConverter::WATCOMQUOTE : cmOutputConverter::SHELL; std::string target = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), output); vars.Target = target.c_str(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e70f09e..a9b2f4e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -166,7 +166,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() for (std::vector::const_iterator o = outputs.begin(); o != outputs.end(); ++o) { this->CleanFiles.push_back( - this->LocalGenerator->ConvertToRelativePath(currentBinDir, *o)); + this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, *o)); } } } @@ -209,8 +209,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(), - dependFileNameFull) + ->MaybeConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), dependFileNameFull) .c_str()) << "\n\n"; @@ -221,7 +221,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath( + ->MaybeConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), this->ProgressFileNameFull) .c_str()) @@ -256,8 +256,9 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(), - this->FlagFileNameFull) + ->MaybeConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), + this->FlagFileNameFull) .c_str()) << "\n\n"; } @@ -314,9 +315,9 @@ void cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()( output += "/"; output += cmSystemTools::GetFilenameName(input); this->Generator->CleanFiles.push_back( - this->Generator->LocalGenerator->ConvertToRelativePath( + this->Generator->LocalGenerator->MaybeConvertToRelativePath( this->Generator->LocalGenerator->GetCurrentBinaryDirectory(), output)); - output = this->Generator->LocalGenerator->ConvertToRelativePath( + output = this->Generator->LocalGenerator->MaybeConvertToRelativePath( this->Generator->LocalGenerator->GetBinaryDirectory(), output); // Create a rule to copy the content into the bundle. @@ -518,13 +519,13 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); targetOutPathPDB = this->LocalGenerator->ConvertToOutputFormat( targetFullPathPDB, cmOutputConverter::SHELL); targetOutPathCompilePDB = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathCompilePDB), cmOutputConverter::SHELL); @@ -550,13 +551,13 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( vars.Object = shellObj.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); std::string objectFileDir = cmSystemTools::GetFilenamePath(obj); objectFileDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectFileDir), cmOutputConverter::SHELL); vars.ObjectFileDir = objectFileDir.c_str(); @@ -904,7 +905,7 @@ bool cmMakefileTargetGenerator::WriteMakeRule( // Touch the extra output so "make" knows that it was updated, // but only if the output was acually created. std::string const out = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath(binDir, *o), + this->LocalGenerator->MaybeConvertToRelativePath(binDir, *o), cmOutputConverter::SHELL); std::vector output_commands; @@ -1200,7 +1201,8 @@ void cmMakefileTargetGenerator::WriteObjectsVariable( for (std::vector::const_iterator i = this->ExternalObjects.begin(); i != this->ExternalObjects.end(); ++i) { - object = this->LocalGenerator->ConvertToRelativePath(currentBinDir, *i); + object = + this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, *i); *this->BuildFileStream << " " << lineContinue << "\n" << this->Makefile->GetSafeDefinition( "CMAKE_OBJECT_NAME"); @@ -1234,7 +1236,7 @@ public: { // Construct the name of the next object. this->NextObject = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), obj), cmOutputConverter::RESPONSE); @@ -1289,7 +1291,7 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule( this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget); std::string buildTargetRuleName = dir; buildTargetRuleName += relink ? "/preinstall" : "/build"; - buildTargetRuleName = this->LocalGenerator->ConvertToRelativePath( + buildTargetRuleName = this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), buildTargetRuleName); // Build the list of target outputs to drive. @@ -1479,7 +1481,7 @@ void cmMakefileTargetGenerator::CreateLinkScript( // Create the makefile command to invoke the link script. std::string link_command = "$(CMAKE_COMMAND) -E cmake_link_script "; link_command += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), linkScriptName), cmOutputConverter::SHELL); link_command += " --verbose=$(VERBOSE)"; @@ -1716,14 +1718,14 @@ void cmMakefileTargetGenerator::GenDefFile( cmd, cmOutputConverter::SHELL); cmd += " -E __create_def "; cmd += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), name_of_def_file), cmOutputConverter::SHELL); cmd += " "; std::string objlist_file = name_of_def_file; objlist_file += ".objs"; cmd += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objlist_file), cmOutputConverter::SHELL); real_link_commands.insert(real_link_commands.begin(), cmd); @@ -1744,7 +1746,7 @@ void cmMakefileTargetGenerator::GenDefFile( linkFlags += " "; linkFlags += this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); linkFlags += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), name_of_def_file), cmOutputConverter::SHELL); linkFlags += " "; diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index f40c8fa..ecb29cb 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -46,7 +46,7 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath( + ->MaybeConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), this->ProgressFileNameFull) .c_str()) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=41aa789e0b1d498e0a160bc2848c9a16fea9d2b5 commit 41aa789e0b1d498e0a160bc2848c9a16fea9d2b5 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:31 2016 +0200 Fortran: Inline conversion to relative path Don't use cmOutputConverter method which relies on directory-specific state. diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 4c0f688..aaa9d3a 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -707,5 +707,9 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, std::string cmDependsFortran::MaybeConvertToRelativePath( std::string const& base, std::string const& path) { - return this->LocalGenerator->ConvertToRelativePath(base, path); + if (!cmOutputConverter::ContainedInDirectory( + base, path, this->LocalGenerator->GetStateSnapshot().GetDirectory())) { + return path; + } + return cmOutputConverter::ForceToRelativePath(base, path); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc7832e9bcfea870de73911f1017bdef6a9ff956 commit cc7832e9bcfea870de73911f1017bdef6a9ff956 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:31 2016 +0200 Fortran: Wrap path convert in a call with a more-suitable name diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index c1c8880..4c0f688 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -198,16 +198,13 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, stamp += ".mod.stamp"; fcStream << "\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath(currentBinDir, - mod_lower) + << this->MaybeConvertToRelativePath(currentBinDir, mod_lower) << "\"\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath(currentBinDir, - mod_upper) + << this->MaybeConvertToRelativePath(currentBinDir, mod_upper) << "\"\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath(currentBinDir, - stamp) + << this->MaybeConvertToRelativePath(currentBinDir, stamp) << "\"\n"; } fcStream << " )\n"; @@ -323,17 +320,16 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, // Write the include dependencies to the output stream. std::string binDir = this->LocalGenerator->GetBinaryDirectory(); - std::string obj_i = this->LocalGenerator->ConvertToRelativePath(binDir, obj); + std::string obj_i = this->MaybeConvertToRelativePath(binDir, obj); std::string obj_m = cmSystemTools::ConvertToOutputPath(obj_i.c_str()); internalDepends << obj_i << std::endl; internalDepends << " " << src << std::endl; for (std::set::const_iterator i = info.Includes.begin(); i != info.Includes.end(); ++i) { - makeDepends - << obj_m << ": " - << cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, *i).c_str()) - << std::endl; + makeDepends << obj_m << ": " + << cmSystemTools::ConvertToOutputPath( + this->MaybeConvertToRelativePath(binDir, *i).c_str()) + << std::endl; internalDepends << " " << *i << std::endl; } makeDepends << std::endl; @@ -359,7 +355,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, proxy += *i; proxy += ".mod.proxy"; proxy = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, proxy).c_str()); + this->MaybeConvertToRelativePath(binDir, proxy).c_str()); // since we require some things add them to our list of requirements makeDepends << obj_m << ".requires: " << proxy << std::endl; @@ -375,8 +371,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, if (!required->second.empty()) { // This module is known. Depend on its timestamp file. std::string stampFile = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, required->second) - .c_str()); + this->MaybeConvertToRelativePath(binDir, required->second).c_str()); makeDepends << obj_m << ": " << stampFile << "\n"; } else { // This module is not known to CMake. Try to locate it where @@ -384,7 +379,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, std::string module; if (this->FindModule(*i, module)) { module = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, module).c_str()); + this->MaybeConvertToRelativePath(binDir, module).c_str()); makeDepends << obj_m << ": " << module << "\n"; } } @@ -398,7 +393,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, proxy += *i; proxy += ".mod.proxy"; proxy = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, proxy).c_str()); + this->MaybeConvertToRelativePath(binDir, proxy).c_str()); makeDepends << proxy << ": " << obj_m << ".provides" << std::endl; } @@ -420,14 +415,14 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, modFile += "/"; modFile += *i; modFile = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath(binDir, modFile), + this->MaybeConvertToRelativePath(binDir, modFile), cmOutputConverter::SHELL); std::string stampFile = stamp_dir; stampFile += "/"; stampFile += m; stampFile += ".mod.stamp"; stampFile = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath(binDir, stampFile), + this->MaybeConvertToRelativePath(binDir, stampFile), cmOutputConverter::SHELL); makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile << " " << stampFile; @@ -448,7 +443,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, std::string driver = this->TargetDirectory; driver += "/build"; driver = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, driver).c_str()); + this->MaybeConvertToRelativePath(binDir, driver).c_str()); makeDepends << driver << ": " << obj_m << ".provides.build\n"; } @@ -708,3 +703,9 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, // content. return cmFortranStreamsDiffer(finModFile, finStampFile); } + +std::string cmDependsFortran::MaybeConvertToRelativePath( + std::string const& base, std::string const& path) +{ + return this->LocalGenerator->ConvertToRelativePath(base, path); +} diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h index 8d347f4..90b82d4 100644 --- a/Source/cmDependsFortran.h +++ b/Source/cmDependsFortran.h @@ -78,6 +78,9 @@ protected: private: cmDependsFortran(cmDependsFortran const&); // Purposely not implemented. void operator=(cmDependsFortran const&); // Purposely not implemented. + + std::string MaybeConvertToRelativePath(std::string const& base, + std::string const& path); }; #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa1ab4c0c975ca81ca7005e0359573836e930530 commit aa1ab4c0c975ca81ca7005e0359573836e930530 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:30 2016 +0200 Makefiles: Hardcode the relative location of the CMakeCache file In this context, currentBinDir refers to the CMAKE_BINARY_DIR because it comes from the first local generator. GetHomeOutputDirectory is the same as CMAKE_BINARY_DIR, so the computation here is unnecessary. diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 4a5cc77..95f6ea8 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -306,16 +306,12 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() // reset lg to the first makefile lg = static_cast(this->LocalGenerators[0]); - // Build the path to the cache file. - std::string cache = this->GetCMakeInstance()->GetHomeOutputDirectory(); - cache += "/CMakeCache.txt"; - std::string currentBinDir = lg->GetCurrentBinaryDirectory(); // Save the list to the cmake file. cmakefileStream << "# The top level Makefile was generated from the following files:\n" << "set(CMAKE_MAKEFILE_DEPENDS\n" - << " \"" << lg->ConvertToRelativePath(currentBinDir, cache) << "\"\n"; + << " \"CMakeCache.txt\"\n"; for (std::vector::const_iterator i = lfiles.begin(); i != lfiles.end(); ++i) { cmakefileStream << " \"" << lg->ConvertToRelativePath(currentBinDir, *i) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1704cd340e9851e0041d275be54bb7be21b40288 commit 1704cd340e9851e0041d275be54bb7be21b40288 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:30 2016 +0200 Convert: Extract method to determine if paths are in directory The conditional early return can be moved to clients, which would have many benefits, notably making cmOutputConverter independent of directory-specific state. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index be189a6..ec43c57 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -57,13 +57,14 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) cmSystemTools::IsSubDirectory(a, b)); } -std::string cmOutputConverter::ConvertToRelativePath( - std::string const& local_path, std::string const& remote_path) const +bool cmOutputConverter::ContainedInDirectory(std::string const& local_path, + std::string const& remote_path, + cmState::Directory directory) { const std::string relativePathTopBinary = - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); + directory.GetRelativePathTopBinary(); const std::string relativePathTopSource = - this->StateSnapshot.GetDirectory().GetRelativePathTopSource(); + directory.GetRelativePathTopSource(); const bool bothInBinary = cmOutputConverterNotAbove(local_path.c_str(), @@ -77,7 +78,14 @@ std::string cmOutputConverter::ConvertToRelativePath( cmOutputConverterNotAbove(remote_path.c_str(), relativePathTopSource.c_str()); - if (!(bothInSource || bothInBinary)) { + return bothInSource || bothInBinary; +} + +std::string cmOutputConverter::ConvertToRelativePath( + std::string const& local_path, std::string const& remote_path) const +{ + if (!ContainedInDirectory(local_path, remote_path, + this->StateSnapshot.GetDirectory())) { return remote_path; } diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index cb0d29e..aa0e379 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -95,6 +95,10 @@ public: }; static FortranFormat GetFortranFormat(const char* value); + static bool ContainedInDirectory(std::string const& local_path, + std::string const& remote_path, + cmState::Directory directory); + /** * Convert the given remote path to a relative path with respect to * the given local path. Both paths must use forward slashes and not https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8de218ceaf8bd1c6a122f245228aa885c82985a7 commit 8de218ceaf8bd1c6a122f245228aa885c82985a7 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:30 2016 +0200 Convert: Remove asserts which are duplicated in delegate method This means that we don't encounter the asserts in the case where we early-return from here. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index dd52747..be189a6 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -60,13 +60,6 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) std::string cmOutputConverter::ConvertToRelativePath( std::string const& local_path, std::string const& remote_path) const { - // The paths should never be quoted. - assert(local_path[0] != '\"'); - assert(remote_path[0] != '\"'); - - // The local path should never have a trailing slash. - assert(local_path.empty() || local_path[local_path.size() - 1] != '/'); - const std::string relativePathTopBinary = this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); const std::string relativePathTopSource = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=986d8c78d428c6d7ac5d3a8e4ada86e65901ad99 commit 986d8c78d428c6d7ac5d3a8e4ada86e65901ad99 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:30 2016 +0200 Convert: Remove early return check This function delegates to another function which does the same check. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index f8c082e..dd52747 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -67,11 +67,6 @@ std::string cmOutputConverter::ConvertToRelativePath( // The local path should never have a trailing slash. assert(local_path.empty() || local_path[local_path.size() - 1] != '/'); - // If the path is already relative then just return the path. - if (!cmSystemTools::FileIsFullPath(remote_path.c_str())) { - return remote_path; - } - const std::string relativePathTopBinary = this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); const std::string relativePathTopSource = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21b23658deecb8a8ae0b0be1c7dbd53adb694fe2 commit 21b23658deecb8a8ae0b0be1c7dbd53adb694fe2 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:30 2016 +0200 Convert: Extract local variables for readability diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 2e74766..f8c082e 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -72,21 +72,22 @@ std::string cmOutputConverter::ConvertToRelativePath( return remote_path; } + const std::string relativePathTopBinary = + this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); + const std::string relativePathTopSource = + this->StateSnapshot.GetDirectory().GetRelativePathTopSource(); + const bool bothInBinary = - cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()); + cmOutputConverterNotAbove(local_path.c_str(), + relativePathTopBinary.c_str()) && + cmOutputConverterNotAbove(remote_path.c_str(), + relativePathTopBinary.c_str()); const bool bothInSource = - cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource()); + cmOutputConverterNotAbove(local_path.c_str(), + relativePathTopSource.c_str()) && + cmOutputConverterNotAbove(remote_path.c_str(), + relativePathTopSource.c_str()); if (!(bothInSource || bothInBinary)) { return remote_path; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=94af779a19c7ed4227a396fd26f1bc22ee26699a commit 94af779a19c7ed4227a396fd26f1bc22ee26699a Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:30 2016 +0200 Convert: Extract local variables Remove comment made obsolete by them. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 0ef9392..2e74766 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -72,20 +72,23 @@ std::string cmOutputConverter::ConvertToRelativePath( return remote_path; } - // Skip conversion if the path and local are not both in the source - // or both in the binary tree. - if (!((cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary())) || - (cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource())))) { + const bool bothInBinary = + cmOutputConverterNotAbove( + local_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && + cmOutputConverterNotAbove( + remote_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()); + + const bool bothInSource = + cmOutputConverterNotAbove( + local_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && + cmOutputConverterNotAbove( + remote_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopSource()); + + if (!(bothInSource || bothInBinary)) { return remote_path; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=06455f35cf076326134621cc44a446681e6c90e4 commit 06455f35cf076326134621cc44a446681e6c90e4 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:29 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 22:56:29 2016 +0200 cmOutputConverter: Remove Convert..ForExisting method (#16138) According to the bug report, the GetShortName used conditionally in this method is problematic. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f24b717..1f9e4cf 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -731,7 +731,8 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::string replace = this->Makefile->GetSafeDefinition(variable); // if the variable is not a FLAG then treat it like a path if (variable.find("_FLAG") == variable.npos) { - std::string ret = this->ConvertToOutputForExisting(replace); + std::string ret = + this->ConvertToOutputFormat(replace, cmOutputConverter::SHELL); // if there is a required first argument to the compiler add it // to the compiler string if (compilerArg1) { @@ -828,7 +829,7 @@ std::string cmLocalGenerator::ConvertToIncludeReference( std::string const& path, OutputFormat format, bool forceFullPaths) { static_cast(forceFullPaths); - return this->ConvertToOutputForExisting(path, format); + return this->ConvertToOutputFormat(path, format); } std::string cmLocalGenerator::GetIncludeFlags( @@ -1500,8 +1501,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, std::vector const& libDirs = cli.GetDirectories(); for (std::vector::const_iterator libDir = libDirs.begin(); libDir != libDirs.end(); ++libDir) { - std::string libpath = - this->ConvertToOutputForExisting(*libDir, shellFormat); + std::string libpath = this->ConvertToOutputFormat(*libDir, shellFormat); linkPath += " " + libPathFlag; linkPath += libpath; linkPath += libPathTerminator; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 8825b46..07b40b7 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -2078,18 +2078,19 @@ void cmLocalUnixMakefileGenerator3::CreateCDCommand( // back because the shell keeps the working directory between // commands. std::string cmd = cd_cmd; - cmd += this->ConvertToOutputForExisting(tgtDir); + cmd += this->ConvertToOutputFormat(tgtDir, cmOutputConverter::SHELL); commands.insert(commands.begin(), cmd); // Change back to the starting directory. cmd = cd_cmd; - cmd += this->ConvertToOutputForExisting(relDir); + cmd += this->ConvertToOutputFormat(relDir, cmOutputConverter::SHELL); commands.push_back(cmd); } else { // On UNIX we must construct a single shell command to change // directory and build because make resets the directory between // each command. - std::string outputForExisting = this->ConvertToOutputForExisting(tgtDir); + std::string outputForExisting = + this->ConvertToOutputFormat(tgtDir, cmOutputConverter::SHELL); std::string prefix = cd_cmd + outputForExisting + " && "; std::transform(commands.begin(), commands.end(), commands.begin(), std::bind1st(std::plus(), prefix)); diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 0b270aa..0ef9392 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -18,25 +18,6 @@ cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot) assert(this->StateSnapshot.IsValid()); } -std::string cmOutputConverter::ConvertToOutputForExisting( - const std::string& remote, OutputFormat format) const -{ - // If this is a windows shell, the result has a space, and the path - // already exists, we can use a short-path to reference it without a - // space. - if (this->GetState()->UseWindowsShell() && - remote.find(' ') != std::string::npos && - cmSystemTools::FileExists(remote.c_str())) { - std::string tmp; - if (cmSystemTools::GetShortPath(remote, tmp)) { - return this->ConvertToOutputFormat(tmp, format); - } - } - - // Otherwise, perform standard conversion. - return this->ConvertToOutputFormat(remote, format); -} - std::string cmOutputConverter::ConvertToOutputFormat(const std::string& source, OutputFormat output) const { diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index fd887ae..cb0d29e 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -26,10 +26,6 @@ public: std::string ConvertDirectorySeparatorsForShell( const std::string& source) const; - ///! for existing files convert to output path and short path if spaces - std::string ConvertToOutputForExisting(const std::string& remote, - OutputFormat format = SHELL) const; - void SetLinkScriptShell(bool linkScriptShell); /** https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca5ef925eb1ae2a1e63ae1b0762ddbbef19e49a2 commit ca5ef925eb1ae2a1e63ae1b0762ddbbef19e49a2 Author: Daniel Pfeifer AuthorDate: Thu Jun 16 23:25:43 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 20:11:16 2016 +0200 cmOutputConverter: remove unused code Remove old ConvertToRelativePath function now that all clients have migrated to the new signature. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 2ef603b..0b270aa 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -77,15 +77,6 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) } std::string cmOutputConverter::ConvertToRelativePath( - const std::vector& local, const std::string& in_remote, - bool force) const -{ - std::string local_path = cmSystemTools::JoinPath(local); - return force ? this->ForceToRelativePath(local_path, in_remote) - : this->ConvertToRelativePath(local_path, in_remote); -} - -std::string cmOutputConverter::ConvertToRelativePath( std::string const& local_path, std::string const& remote_path) const { // The paths should never be quoted. diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 5979eaa..fd887ae 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -101,17 +101,6 @@ public: /** * Convert the given remote path to a relative path with respect to - * the given local path. The local path must be given in component - * form (see SystemTools::SplitPath) without a trailing slash. The - * remote path must use forward slashes and not already be escaped - * or quoted. - */ - std::string ConvertToRelativePath(const std::vector& local, - const std::string& in_remote, - bool force = false) const; - - /** - * Convert the given remote path to a relative path with respect to * the given local path. Both paths must use forward slashes and not * already be escaped or quoted. * The conversion is skipped if the paths are not both in the source https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=490b2d6ee5146c7f097ba8a2759bf720d528abce commit 490b2d6ee5146c7f097ba8a2759bf720d528abce Author: Stephen Kelly AuthorDate: Mon Sep 19 22:54:38 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 20:11:16 2016 +0200 Xcode: Inline ConvertToRelativePath calls Avoid violations of Interface Segregation Principle. These two calls now simply call different methods. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 4ff612d..75fc2e4 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3325,14 +3325,14 @@ std::string cmGlobalXCodeGenerator::RelativeToSource(const char* p) { // We force conversion because Xcode breakpoints do not work unless // they are in a file named relative to the source tree. - return this->CurrentLocalGenerator->ConvertToRelativePath( - this->ProjectSourceDirectoryComponents, p, true); + return cmOutputConverter::ForceToRelativePath( + cmSystemTools::JoinPath(this->ProjectSourceDirectoryComponents), p); } std::string cmGlobalXCodeGenerator::RelativeToBinary(const char* p) { return this->CurrentLocalGenerator->ConvertToRelativePath( - this->ProjectOutputDirectoryComponents, p); + cmSystemTools::JoinPath(this->ProjectOutputDirectoryComponents), p); } std::string cmGlobalXCodeGenerator::XCodeEscapePath(const std::string& p) ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 6 ++ Source/cmCommonTargetGenerator.cxx | 10 +- Source/cmCommonTargetGenerator.h | 4 +- Source/cmDependsFortran.cxx | 45 +++++---- Source/cmDependsFortran.h | 3 + Source/cmGhsMultiTargetGenerator.cxx | 8 +- Source/cmGlobalGenerator.cxx | 14 +++ Source/cmGlobalGenerator.h | 7 ++ Source/cmGlobalNinjaGenerator.cxx | 39 ++++++-- Source/cmGlobalNinjaGenerator.h | 7 ++ Source/cmGlobalUnixMakefileGenerator3.cxx | 6 +- Source/cmGlobalXCodeGenerator.cxx | 6 +- Source/cmLinkLineComputer.cxx | 27 ++++++ Source/cmLinkLineComputer.h | 21 +++++ Source/cmLocalGenerator.cxx | 70 +++++--------- Source/cmLocalGenerator.h | 11 +-- Source/cmLocalNinjaGenerator.cxx | 16 +--- Source/cmLocalNinjaGenerator.h | 4 - Source/cmLocalUnixMakefileGenerator3.cxx | 40 +++++--- Source/cmLocalUnixMakefileGenerator3.h | 3 + Source/cmMSVC60LinkLineComputer.cxx | 33 +++++++ Source/cmMSVC60LinkLineComputer.h | 18 ++++ Source/cmMakefileExecutableTargetGenerator.cxx | 38 +++++--- Source/cmMakefileLibraryTargetGenerator.cxx | 54 ++++++++--- Source/cmMakefileTargetGenerator.cxx | 60 +++++++----- Source/cmMakefileUtilityTargetGenerator.cxx | 2 +- Source/cmNinjaLinkLineComputer.cxx | 19 ++++ Source/cmNinjaLinkLineComputer.h | 23 +++++ Source/cmNinjaNormalTargetGenerator.cxx | 14 ++- Source/cmOutputConverter.cxx | 119 ++++++++---------------- Source/cmOutputConverter.h | 40 ++------ Source/cmServerProtocol.cxx | 9 +- Source/cmake.cxx | 7 +- bootstrap | 2 + 34 files changed, 490 insertions(+), 295 deletions(-) create mode 100644 Source/cmLinkLineComputer.cxx create mode 100644 Source/cmLinkLineComputer.h create mode 100644 Source/cmMSVC60LinkLineComputer.cxx create mode 100644 Source/cmMSVC60LinkLineComputer.h create mode 100644 Source/cmNinjaLinkLineComputer.cxx create mode 100644 Source/cmNinjaLinkLineComputer.h hooks/post-receive -- CMake From steveire at gmail.com Tue Oct 4 17:10:03 2016 From: steveire at gmail.com (Stephen Kelly) Date: Tue, 4 Oct 2016 17:10:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-65-gfae02d5 Message-ID: <20161004211003.51EED85736@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 fae02d5e5126fba375e26ec66f216a1d16f29413 (commit) via 866e4d53ea3a1084e8ba1dd672af83ff3d62c697 (commit) from 74adf4e543d506a44500d0aa9bf1203c2270b217 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fae02d5e5126fba375e26ec66f216a1d16f29413 commit fae02d5e5126fba375e26ec66f216a1d16f29413 Merge: 74adf4e 866e4d5 Author: Stephen Kelly AuthorDate: Tue Oct 4 17:10:02 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 17:10:02 2016 -0400 Merge topic 'extract-cmLinkLineComputer' into next 866e4d53 fixup! cmLinkLineComputer: Extract from cmLocalGenerator https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=866e4d53ea3a1084e8ba1dd672af83ff3d62c697 commit 866e4d53ea3a1084e8ba1dd672af83ff3d62c697 Author: Stephen Kelly AuthorDate: Tue Oct 4 23:08:51 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 23:09:30 2016 +0200 fixup! cmLinkLineComputer: Extract from cmLocalGenerator diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 8bc7ddf..9ee3933 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -212,16 +212,9 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) linkFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); { - CM_AUTO_PTR linkLineComputer; - - if (this->Makefile->IsOn("MSVC60")) { - linkLineComputer.reset( - this->GlobalGenerator->CreateMSVC60LinkLineComputer( - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - } else { - linkLineComputer.reset(this->GlobalGenerator->CreateLinkLineComputer( + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( this->LocalGenerator->GetStateSnapshot().GetDirectory())); - } this->AddModuleDefinitionFlag(linkLineComputer.get(), linkFlags); } diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index f6f4a00..b12e779 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -8,7 +8,6 @@ #include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" -#include "cmMSVC60LinkLineComputer.h" #include "cmMakefile.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" @@ -162,15 +161,9 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName); - CM_AUTO_PTR linkLineComputer; - - if (this->Makefile->IsOn("MSVC60")) { - linkLineComputer.reset(this->GlobalGenerator->CreateMSVC60LinkLineComputer( - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - } else { - linkLineComputer.reset(this->GlobalGenerator->CreateLinkLineComputer( + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( this->LocalGenerator->GetStateSnapshot().GetDirectory())); - } this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); @@ -198,15 +191,9 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_MODULE_LINKER_FLAGS", this->ConfigName); - CM_AUTO_PTR linkLineComputer; - - if (this->Makefile->IsOn("MSVC60")) { - linkLineComputer.reset(this->GlobalGenerator->CreateMSVC60LinkLineComputer( - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - } else { - linkLineComputer.reset(this->GlobalGenerator->CreateLinkLineComputer( + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( this->LocalGenerator->GetStateSnapshot().GetDirectory())); - } this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index d6c496f..95f883e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1580,6 +1580,15 @@ std::string cmMakefileTargetGenerator::CreateResponseFile( return responseFileName; } +cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( + cmState::Directory stateDir) +{ + if (this->Makefile->IsOn("MSVC60")) { + return this->GlobalGenerator->CreateMSVC60LinkLineComputer(stateDir); + } + return this->GlobalGenerator->CreateLinkLineComputer(stateDir); +} + void cmMakefileTargetGenerator::CreateLinkLibs( std::string& linkLibs, bool relink, bool useResponseFile, std::vector& makefile_depends, bool useWatcomQuote) @@ -1587,15 +1596,9 @@ void cmMakefileTargetGenerator::CreateLinkLibs( std::string frameworkPath; std::string linkPath; - CM_AUTO_PTR linkLineComputer; - - if (this->Makefile->IsOn("MSVC60")) { - linkLineComputer.reset(this->GlobalGenerator->CreateMSVC60LinkLineComputer( + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( this->LocalGenerator->GetStateSnapshot().GetDirectory())); - } else { - linkLineComputer.reset(this->GlobalGenerator->CreateLinkLineComputer( - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - } this->LocalGenerator->OutputLinkLibraries( linkLineComputer.get(), linkLibs, frameworkPath, linkPath, diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index df7b6aa..6d367bd 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -140,6 +140,8 @@ protected: std::vector& makefile_commands, std::vector& makefile_depends); + cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir); + /** Create a response file with the given set of options. Returns the relative path from the target build working directory to the response file name. */ ----------------------------------------------------------------------- Summary of changes: Source/cmMakefileExecutableTargetGenerator.cxx | 11 ++--------- Source/cmMakefileLibraryTargetGenerator.cxx | 21 ++++----------------- Source/cmMakefileTargetGenerator.cxx | 19 +++++++++++-------- Source/cmMakefileTargetGenerator.h | 2 ++ 4 files changed, 19 insertions(+), 34 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Tue Oct 4 18:00:01 2016 From: steveire at gmail.com (Stephen Kelly) Date: Tue, 4 Oct 2016 18:00:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-67-g280cf7a Message-ID: <20161004220001.6810FF5E9F@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 280cf7aa4e2cad24440039f4b7105c5096caf437 (commit) via 62e83877c58a9e81d68a30553f54f18a3ed8eb0b (commit) from fae02d5e5126fba375e26ec66f216a1d16f29413 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=280cf7aa4e2cad24440039f4b7105c5096caf437 commit 280cf7aa4e2cad24440039f4b7105c5096caf437 Merge: fae02d5 62e8387 Author: Stephen Kelly AuthorDate: Tue Oct 4 18:00:00 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 4 18:00:00 2016 -0400 Merge topic 'extract-cmLinkLineComputer' into next 62e83877 fixup! cmLinkLineComputer: Extract from cmLocalGenerator https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62e83877c58a9e81d68a30553f54f18a3ed8eb0b commit 62e83877c58a9e81d68a30553f54f18a3ed8eb0b Author: Stephen Kelly AuthorDate: Tue Oct 4 23:59:44 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 4 23:59:44 2016 +0200 fixup! cmLinkLineComputer: Extract from cmLocalGenerator diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx index fbd8022..89432ff 100644 --- a/Source/cmMSVC60LinkLineComputer.cxx +++ b/Source/cmMSVC60LinkLineComputer.cxx @@ -3,6 +3,8 @@ #include "cmMSVC60LinkLineComputer.h" +#include "cmSystemTools.h" + cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer(cmState::Directory stateDir) : cmLinkLineComputer(stateDir) { ----------------------------------------------------------------------- Summary of changes: Source/cmMSVC60LinkLineComputer.cxx | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Oct 5 00:01:09 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 5 Oct 2016 00:01:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-16-gaa57f35 Message-ID: <20161005040111.773DDF5E30@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 aa57f35ff539a1d43d93e373048f70ce7fd04852 (commit) from 38642f4fb78be70e84390947b1052994b8debd98 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa57f35ff539a1d43d93e373048f70ce7fd04852 commit aa57f35ff539a1d43d93e373048f70ce7fd04852 Author: Kitware Robot AuthorDate: Wed Oct 5 00:01:05 2016 -0400 Commit: Kitware Robot CommitDate: Wed Oct 5 00:01:05 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 41a4d94..5781f4b 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 7) -set(CMake_VERSION_PATCH 20161004) +set(CMake_VERSION_PATCH 20161005) #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 Oct 5 09:25:17 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 5 Oct 2016 09:25:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-69-gca4f693 Message-ID: <20161005132517.56107F57CD@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 ca4f6938620160242f24f612a5495d40bf5cf933 (commit) via 646d01da9536d2db912a80f7d45ba289d8c89295 (commit) from 280cf7aa4e2cad24440039f4b7105c5096caf437 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca4f6938620160242f24f612a5495d40bf5cf933 commit ca4f6938620160242f24f612a5495d40bf5cf933 Merge: 280cf7a 646d01d Author: Brad King AuthorDate: Wed Oct 5 09:25:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 5 09:25:16 2016 -0400 Merge topic 'fix-VS-resources-pri-path' into next 646d01da VS: Use absolute target-specific directory for `resources.pri` https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=646d01da9536d2db912a80f7d45ba289d8c89295 commit 646d01da9536d2db912a80f7d45ba289d8c89295 Author: Roman W?ger AuthorDate: Tue Oct 4 23:02:28 2016 +0200 Commit: Brad King CommitDate: Wed Oct 5 09:21:58 2016 -0400 VS: Use absolute target-specific directory for `resources.pri` The change in commit v3.7.0-rc1~219^2 (VS: Use target-specific directory for `resources.pri`, 2016-08-25) incorrectly specifies a relative path for the `ProjectPriFullPath` value. Fix it to use an absolute path. Issue: #16106 diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index d81f59d..6690bfa 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2736,8 +2736,10 @@ void cmVisualStudio10TargetGenerator::WriteWinRTPackageCertificateKeyFile() (*this->BuildFileStream) << cmVS10EscapeXML(artifactDir) << "\\\n"; this->WriteString("", 2); - (*this->BuildFileStream) << cmVS10EscapeXML(artifactDir) - << "\\resources.pri\n"; + std::string resourcePriFile = + this->DefaultArtifactDir + "/resources.pri"; + this->ConvertToWindowsSlash(resourcePriFile); + (*this->BuildFileStream) << resourcePriFile << "\n"; // If we are missing files and we don't have a certificate and // aren't targeting WP8.0, add a default certificate ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 5 09:33:17 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 5 Oct 2016 09:33:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-71-geff4fa9 Message-ID: <20161005133317.A5B0BF55DC@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 eff4fa9738cfaaf5fe7d7cdd3d4983bf0cfbee10 (commit) via d7806c45a0bf7e765cb76229fa5f8be47c10701b (commit) from ca4f6938620160242f24f612a5495d40bf5cf933 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eff4fa9738cfaaf5fe7d7cdd3d4983bf0cfbee10 commit eff4fa9738cfaaf5fe7d7cdd3d4983bf0cfbee10 Merge: ca4f693 d7806c4 Author: Brad King AuthorDate: Wed Oct 5 09:33:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 5 09:33:16 2016 -0400 Merge topic 'extract-cmLinkLineComputer' into next d7806c45 Revert topic 'extract-cmLinkLineComputer' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7806c45a0bf7e765cb76229fa5f8be47c10701b commit d7806c45a0bf7e765cb76229fa5f8be47c10701b Author: Brad King AuthorDate: Wed Oct 5 09:31:41 2016 -0400 Commit: Brad King CommitDate: Wed Oct 5 09:31:41 2016 -0400 Revert topic 'extract-cmLinkLineComputer' It needs revisions to build everywhere. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 81108ad..ec49481 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -300,8 +300,6 @@ set(SRCS cmInstallDirectoryGenerator.cxx cmLinkedTree.h cmLinkItem.h - cmLinkLineComputer.cxx - cmLinkLineComputer.h cmListFileCache.cxx cmListFileCache.h cmListFileLexer.c @@ -320,8 +318,6 @@ set(SRCS cmMakefileUtilityTargetGenerator.cxx cmMessenger.cxx cmMessenger.h - cmMSVC60LinkLineComputer.cxx - cmMSVC60LinkLineComputer.h cmOSXBundleGenerator.cxx cmOSXBundleGenerator.h cmOutputConverter.cxx @@ -547,8 +543,6 @@ set(SRCS ${SRCS} cmNinjaNormalTargetGenerator.h cmNinjaUtilityTargetGenerator.cxx cmNinjaUtilityTargetGenerator.h - cmNinjaLinkLineComputer.cxx - cmNinjaLinkLineComputer.h ) # Temporary variable for tools targets diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index b995fa1..6887a31 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -12,7 +12,6 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" #include "cmGlobalCommonGenerator.h" -#include "cmLinkLineComputer.h" #include "cmLocalCommonGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -60,8 +59,7 @@ void cmCommonTargetGenerator::AddFeatureFlags(std::string& flags, } } -void cmCommonTargetGenerator::AddModuleDefinitionFlag( - cmLinkLineComputer* linkLineComputer, std::string& flags) +void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags) { if (!this->ModuleDefinitionFile) { return; @@ -77,10 +75,8 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag( // Append the flag and value. Use ConvertToLinkReference to help // vs6's "cl -link" pass it to the linker. std::string flag = defFileFlag; - flag += this->LocalGenerator->ConvertToOutputFormat( - linkLineComputer->ConvertToLinkReference( - this->ModuleDefinitionFile->GetFullPath()), - cmOutputConverter::SHELL); + flag += (this->LocalGenerator->ConvertToLinkReference( + this->ModuleDefinitionFile->GetFullPath())); this->LocalGenerator->AppendFlags(flags, flag); } diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index fe27038..707b81e 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -16,7 +16,6 @@ class cmGlobalCommonGenerator; class cmLocalCommonGenerator; class cmMakefile; class cmSourceFile; -class cmLinkLineComputer; /** \class cmCommonTargetGenerator * \brief Common infrastructure for Makefile and Ninja per-target generators @@ -38,8 +37,7 @@ protected: bool GetFeatureAsBool(const std::string& feature); // Helper to add flag for windows .def file. - void AddModuleDefinitionFlag(cmLinkLineComputer* linkLineComputer, - std::string& flags); + void AddModuleDefinitionFlag(std::string& flags); cmGeneratorTarget* GeneratorTarget; cmMakefile* Makefile; diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index aaa9d3a..c1c8880 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -198,13 +198,16 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, stamp += ".mod.stamp"; fcStream << "\n"; fcStream << " \"" - << this->MaybeConvertToRelativePath(currentBinDir, mod_lower) + << this->LocalGenerator->ConvertToRelativePath(currentBinDir, + mod_lower) << "\"\n"; fcStream << " \"" - << this->MaybeConvertToRelativePath(currentBinDir, mod_upper) + << this->LocalGenerator->ConvertToRelativePath(currentBinDir, + mod_upper) << "\"\n"; fcStream << " \"" - << this->MaybeConvertToRelativePath(currentBinDir, stamp) + << this->LocalGenerator->ConvertToRelativePath(currentBinDir, + stamp) << "\"\n"; } fcStream << " )\n"; @@ -320,16 +323,17 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, // Write the include dependencies to the output stream. std::string binDir = this->LocalGenerator->GetBinaryDirectory(); - std::string obj_i = this->MaybeConvertToRelativePath(binDir, obj); + std::string obj_i = this->LocalGenerator->ConvertToRelativePath(binDir, obj); std::string obj_m = cmSystemTools::ConvertToOutputPath(obj_i.c_str()); internalDepends << obj_i << std::endl; internalDepends << " " << src << std::endl; for (std::set::const_iterator i = info.Includes.begin(); i != info.Includes.end(); ++i) { - makeDepends << obj_m << ": " - << cmSystemTools::ConvertToOutputPath( - this->MaybeConvertToRelativePath(binDir, *i).c_str()) - << std::endl; + makeDepends + << obj_m << ": " + << cmSystemTools::ConvertToOutputPath( + this->LocalGenerator->ConvertToRelativePath(binDir, *i).c_str()) + << std::endl; internalDepends << " " << *i << std::endl; } makeDepends << std::endl; @@ -355,7 +359,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, proxy += *i; proxy += ".mod.proxy"; proxy = cmSystemTools::ConvertToOutputPath( - this->MaybeConvertToRelativePath(binDir, proxy).c_str()); + this->LocalGenerator->ConvertToRelativePath(binDir, proxy).c_str()); // since we require some things add them to our list of requirements makeDepends << obj_m << ".requires: " << proxy << std::endl; @@ -371,7 +375,8 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, if (!required->second.empty()) { // This module is known. Depend on its timestamp file. std::string stampFile = cmSystemTools::ConvertToOutputPath( - this->MaybeConvertToRelativePath(binDir, required->second).c_str()); + this->LocalGenerator->ConvertToRelativePath(binDir, required->second) + .c_str()); makeDepends << obj_m << ": " << stampFile << "\n"; } else { // This module is not known to CMake. Try to locate it where @@ -379,7 +384,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, std::string module; if (this->FindModule(*i, module)) { module = cmSystemTools::ConvertToOutputPath( - this->MaybeConvertToRelativePath(binDir, module).c_str()); + this->LocalGenerator->ConvertToRelativePath(binDir, module).c_str()); makeDepends << obj_m << ": " << module << "\n"; } } @@ -393,7 +398,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, proxy += *i; proxy += ".mod.proxy"; proxy = cmSystemTools::ConvertToOutputPath( - this->MaybeConvertToRelativePath(binDir, proxy).c_str()); + this->LocalGenerator->ConvertToRelativePath(binDir, proxy).c_str()); makeDepends << proxy << ": " << obj_m << ".provides" << std::endl; } @@ -415,14 +420,14 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, modFile += "/"; modFile += *i; modFile = this->LocalGenerator->ConvertToOutputFormat( - this->MaybeConvertToRelativePath(binDir, modFile), + this->LocalGenerator->ConvertToRelativePath(binDir, modFile), cmOutputConverter::SHELL); std::string stampFile = stamp_dir; stampFile += "/"; stampFile += m; stampFile += ".mod.stamp"; stampFile = this->LocalGenerator->ConvertToOutputFormat( - this->MaybeConvertToRelativePath(binDir, stampFile), + this->LocalGenerator->ConvertToRelativePath(binDir, stampFile), cmOutputConverter::SHELL); makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile << " " << stampFile; @@ -443,7 +448,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, std::string driver = this->TargetDirectory; driver += "/build"; driver = cmSystemTools::ConvertToOutputPath( - this->MaybeConvertToRelativePath(binDir, driver).c_str()); + this->LocalGenerator->ConvertToRelativePath(binDir, driver).c_str()); makeDepends << driver << ": " << obj_m << ".provides.build\n"; } @@ -703,13 +708,3 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, // content. return cmFortranStreamsDiffer(finModFile, finStampFile); } - -std::string cmDependsFortran::MaybeConvertToRelativePath( - std::string const& base, std::string const& path) -{ - if (!cmOutputConverter::ContainedInDirectory( - base, path, this->LocalGenerator->GetStateSnapshot().GetDirectory())) { - return path; - } - return cmOutputConverter::ForceToRelativePath(base, path); -} diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h index 90b82d4..8d347f4 100644 --- a/Source/cmDependsFortran.h +++ b/Source/cmDependsFortran.h @@ -78,9 +78,6 @@ protected: private: cmDependsFortran(cmDependsFortran const&); // Purposely not implemented. void operator=(cmDependsFortran const&); // Purposely not implemented. - - std::string MaybeConvertToRelativePath(std::string const& base, - std::string const& path); }; #endif diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 9e43a52..959dfdb 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -362,13 +362,9 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries( this->GeneratorTarget->GetCreateRuleVariable(language, config); bool useWatcomQuote = this->Makefile->IsOn(createRule + "_USE_WATCOM_QUOTE"); - CM_AUTO_PTR linkLineComputer = - this->GetGlobalGenerator()->CreateLinkLineComputer( - this->LocalGenerator->GetStateSnapshot().GetDirectory()); - this->LocalGenerator->GetTargetFlags( - linkLineComputer.get(), config, linkLibraries, flags, linkFlags, - frameworkPath, linkPath, this->GeneratorTarget, useWatcomQuote); + config, linkLibraries, flags, linkFlags, frameworkPath, linkPath, + this->GeneratorTarget, useWatcomQuote); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); if (!linkPath.empty()) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 251555b..a446862 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -20,9 +20,7 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmInstallGenerator.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" -#include "cmMSVC60LinkLineComputer.h" #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmPolicies.h" @@ -1395,18 +1393,6 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() return autogenTargets; } -cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer( - cmState::Directory stateDir) const -{ - return new cmLinkLineComputer(stateDir); -} - -cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer( - cmState::Directory stateDir) const -{ - return new cmMSVC60LinkLineComputer(stateDir); -} - void cmGlobalGenerator::FinalizeTargetCompileInfo() { std::vector const langs = diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 3ae2ebd..4120b52 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -33,7 +33,6 @@ class cmExportBuildFileGenerator; class cmExternalMakefileProjectGenerator; class cmGeneratorTarget; class cmLocalGenerator; -class cmLinkLineComputer; class cmMakefile; class cmake; @@ -99,12 +98,6 @@ public: */ virtual void Generate(); - virtual cmLinkLineComputer* CreateLinkLineComputer( - cmState::Directory stateDir) const; - - cmLinkLineComputer* CreateMSVC60LinkLineComputer( - cmState::Directory stateDir) const; - /** * Set/Get and Clear the enabled languages. */ diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 9e0c5b6..f5a0e68 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -11,7 +11,6 @@ #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" -#include "cmNinjaLinkLineComputer.h" #include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" @@ -65,12 +64,6 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os, os << "# " << comment.substr(lpos) << "\n\n"; } -cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer( - cmState::Directory stateDir) const -{ - return new cmNinjaLinkLineComputer(stateDir, this->OutputPathPrefix); -} - std::string cmGlobalNinjaGenerator::EncodeRuleName(std::string const& name) { // Ninja rule names must match "[a-zA-Z0-9_.-]+". Use ".xx" to encode @@ -837,37 +830,19 @@ static void EnsureTrailingSlash(std::string& path) #endif } -std::string cmGlobalNinjaGenerator::ConvertToNinjaPath( - const std::string& path, cmState::Directory stateDir, - std::string const& prefix) +std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) { - std::string convPath = path; - - if (cmOutputConverter::ContainedInDirectory(stateDir.GetCurrentBinary(), - path, stateDir)) { - convPath = cmOutputConverter::ForceToRelativePath( - stateDir.GetCurrentBinary(), path); - } - - if (!cmSystemTools::FileIsFullPath(convPath)) { - convPath = prefix + convPath; - } - + cmLocalNinjaGenerator* ng = + static_cast(this->LocalGenerators[0]); + std::string convPath = ng->ConvertToRelativePath( + this->LocalGenerators[0]->GetState()->GetBinaryDirectory(), path); + convPath = this->NinjaOutputPath(convPath); #ifdef _WIN32 std::replace(convPath.begin(), convPath.end(), '/', '\\'); #endif return convPath; } -std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) -{ - cmLocalNinjaGenerator* ng = - static_cast(this->LocalGenerators[0]); - - return ConvertToNinjaPath(path, ng->GetStateSnapshot().GetDirectory(), - this->OutputPathPrefix); -} - std::string cmGlobalNinjaGenerator::ConvertToNinjaFolderRule( const std::string& path) { @@ -1448,7 +1423,7 @@ void cmGlobalNinjaGenerator::InitOutputPathPrefix() std::string cmGlobalNinjaGenerator::NinjaOutputPath(std::string const& path) { - if (cmSystemTools::FileIsFullPath(path)) { + if (!this->HasOutputPathPrefix() || cmSystemTools::FileIsFullPath(path)) { return path; } return this->OutputPathPrefix + path; diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index c0e0dff..dcf7406 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -70,9 +70,6 @@ public: std::string EncodePath(const std::string& path); static std::string EncodeDepfileSpace(const std::string& path); - cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir) const - CM_OVERRIDE; - /** * Write the given @a comment to the output stream @a os. It * handles new line character properly. @@ -236,9 +233,6 @@ public: return this->RulesFileStream; } - static std::string ConvertToNinjaPath(const std::string& path, - cmState::Directory stateDir, - std::string const& prefix); std::string ConvertToNinjaPath(const std::string& path); std::string ConvertToNinjaFolderRule(const std::string& path); @@ -340,7 +334,6 @@ public: bool SupportsImplicitOuts() const; std::string NinjaOutputPath(std::string const& path); - std::string GetOutputPathPrefix() const { return this->OutputPathPrefix; } bool HasOutputPathPrefix() const { return !this->OutputPathPrefix.empty(); } void StripNinjaOutputPathPrefixAsSuffix(std::string& path); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 95f6ea8..4a5cc77 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -306,12 +306,16 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() // reset lg to the first makefile lg = static_cast(this->LocalGenerators[0]); + // Build the path to the cache file. + std::string cache = this->GetCMakeInstance()->GetHomeOutputDirectory(); + cache += "/CMakeCache.txt"; + std::string currentBinDir = lg->GetCurrentBinaryDirectory(); // Save the list to the cmake file. cmakefileStream << "# The top level Makefile was generated from the following files:\n" << "set(CMAKE_MAKEFILE_DEPENDS\n" - << " \"CMakeCache.txt\"\n"; + << " \"" << lg->ConvertToRelativePath(currentBinDir, cache) << "\"\n"; for (std::vector::const_iterator i = lfiles.begin(); i != lfiles.end(); ++i) { cmakefileStream << " \"" << lg->ConvertToRelativePath(currentBinDir, *i) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 75fc2e4..4ff612d 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3325,14 +3325,14 @@ std::string cmGlobalXCodeGenerator::RelativeToSource(const char* p) { // We force conversion because Xcode breakpoints do not work unless // they are in a file named relative to the source tree. - return cmOutputConverter::ForceToRelativePath( - cmSystemTools::JoinPath(this->ProjectSourceDirectoryComponents), p); + return this->CurrentLocalGenerator->ConvertToRelativePath( + this->ProjectSourceDirectoryComponents, p, true); } std::string cmGlobalXCodeGenerator::RelativeToBinary(const char* p) { return this->CurrentLocalGenerator->ConvertToRelativePath( - cmSystemTools::JoinPath(this->ProjectOutputDirectoryComponents), p); + this->ProjectOutputDirectoryComponents, p); } std::string cmGlobalXCodeGenerator::XCodeEscapePath(const std::string& p) diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx deleted file mode 100644 index 7103a5b..0000000 --- a/Source/cmLinkLineComputer.cxx +++ /dev/null @@ -1,27 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#include "cmLinkLineComputer.h" -#include "cmOutputConverter.h" - -cmLinkLineComputer::cmLinkLineComputer(cmState::Directory stateDir) - : StateDir(stateDir) -{ -} - -cmLinkLineComputer::~cmLinkLineComputer() -{ -} - -std::string cmLinkLineComputer::ConvertToLinkReference( - std::string const& lib) const -{ - std::string relLib = lib; - - if (cmOutputConverter::ContainedInDirectory( - this->StateDir.GetCurrentBinary(), lib, this->StateDir)) { - relLib = cmOutputConverter::ForceToRelativePath( - this->StateDir.GetCurrentBinary(), lib); - } - return relLib; -} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h deleted file mode 100644 index b25cbf9..0000000 --- a/Source/cmLinkLineComputer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#ifndef cmLinkLineComputer_h -#define cmLinkLineComputer_h - -#include "cmState.h" - -class cmLinkLineComputer -{ -public: - cmLinkLineComputer(cmState::Directory stateDir); - virtual ~cmLinkLineComputer(); - - virtual std::string ConvertToLinkReference(std::string const& input) const; - -protected: - cmState::Directory StateDir; -}; - -#endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7db0282..f24b717 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -12,7 +12,6 @@ #include "cmInstallGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" -#include "cmLinkLineComputer.h" #include "cmMakefile.h" #include "cmSourceFile.h" #include "cmSystemTools.h" @@ -732,8 +731,7 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::string replace = this->Makefile->GetSafeDefinition(variable); // if the variable is not a FLAG then treat it like a path if (variable.find("_FLAG") == variable.npos) { - std::string ret = - this->ConvertToOutputFormat(replace, cmOutputConverter::SHELL); + std::string ret = this->ConvertToOutputForExisting(replace); // if there is a required first argument to the compiler add it // to the compiler string if (compilerArg1) { @@ -830,7 +828,7 @@ std::string cmLocalGenerator::ConvertToIncludeReference( std::string const& path, OutputFormat format, bool forceFullPaths) { static_cast(forceFullPaths); - return this->ConvertToOutputFormat(path, format); + return this->ConvertToOutputForExisting(path, format); } std::string cmLocalGenerator::GetIncludeFlags( @@ -1150,10 +1148,9 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags, } void cmLocalGenerator::GetTargetFlags( - cmLinkLineComputer* linkLineComputer, const std::string& config, - std::string& linkLibs, std::string& flags, std::string& linkFlags, - std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target, - bool useWatcomQuote) + const std::string& config, std::string& linkLibs, std::string& flags, + std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, + cmGeneratorTarget* target, bool useWatcomQuote) { const std::string buildType = cmSystemTools::UpperCase(config); const char* libraryLinkVariable = @@ -1205,9 +1202,8 @@ void cmLocalGenerator::GetTargetFlags( linkFlags += " "; } } - this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, - linkPath, *target, false, false, - useWatcomQuote); + this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target, + false, false, useWatcomQuote); } break; case cmState::EXECUTABLE: { linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); @@ -1226,9 +1222,8 @@ void cmLocalGenerator::GetTargetFlags( return; } this->AddLanguageFlags(flags, linkLanguage, buildType); - this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, - linkPath, *target, false, false, - useWatcomQuote); + this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target, + false, false, useWatcomQuote); if (cmSystemTools::IsOn( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") + @@ -1379,15 +1374,48 @@ std::string cmLocalGenerator::GetTargetFortranFlags( return std::string(); } +std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, + OutputFormat format) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + // Work-ardound command line parsing limitations in MSVC 6.0 + if (this->Makefile->IsOn("MSVC60")) { + // Search for the last space. + std::string::size_type pos = lib.rfind(' '); + if (pos != lib.npos) { + // Find the slash after the last space, if any. + pos = lib.find('/', pos); + + // Convert the portion of the path with a space to a short path. + std::string sp; + if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) { + // Append the rest of the path with no space. + sp += lib.substr(pos); + + // Convert to an output path. + return this->ConvertToOutputFormat(sp.c_str(), format); + } + } + } +#endif + + // Normal behavior. + return this->ConvertToOutputFormat( + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib), + format); +} + /** * Output the linking rules on a command line. For executables, * targetLibrary should be a NULL pointer. For libraries, it should point * to the name of the library. This will not link a library against itself. */ -void cmLocalGenerator::OutputLinkLibraries( - cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, - std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget& tgt, - bool relink, bool forResponseFile, bool useWatcomQuote) +void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, + std::string& frameworkPath, + std::string& linkPath, + cmGeneratorTarget& tgt, bool relink, + bool forResponseFile, + bool useWatcomQuote) { OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); @@ -1472,7 +1500,8 @@ void cmLocalGenerator::OutputLinkLibraries( std::vector const& libDirs = cli.GetDirectories(); for (std::vector::const_iterator libDir = libDirs.begin(); libDir != libDirs.end(); ++libDir) { - std::string libpath = this->ConvertToOutputFormat(*libDir, shellFormat); + std::string libpath = + this->ConvertToOutputForExisting(*libDir, shellFormat); linkPath += " " + libPathFlag; linkPath += libpath; linkPath += libPathTerminator; @@ -1488,8 +1517,7 @@ void cmLocalGenerator::OutputLinkLibraries( continue; } if (li->IsPath) { - linkLibs += this->ConvertToOutputFormat( - linkLineComputer->ConvertToLinkReference(li->Value), shellFormat); + linkLibs += this->ConvertToLinkReference(li->Value, shellFormat); } else { linkLibs += li->Value; } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 1b49dd1..19469be 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -24,7 +24,6 @@ class cmGeneratorTarget; class cmGlobalGenerator; class cmMakefile; class cmSourceFile; -class cmLinkLineComputer; /** \class cmLocalGenerator * \brief Create required build files for a directory. @@ -310,8 +309,7 @@ public: /** Fill out these strings for the given target. Libraries to link, * flags, and linkflags. */ - void GetTargetFlags(cmLinkLineComputer* linkLineComputer, - const std::string& config, std::string& linkLibs, + void GetTargetFlags(const std::string& config, std::string& linkLibs, std::string& flags, std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target, bool useWatcomQuote); @@ -344,8 +342,7 @@ public: protected: ///! put all the libraries for a target on into the given stream - void OutputLinkLibraries(cmLinkLineComputer* linkLineComputer, - std::string& linkLibraries, + void OutputLinkLibraries(std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget&, bool relink, bool forResponseFile, bool useWatcomQuote); @@ -370,6 +367,10 @@ protected: std::string& CreateSafeUniqueObjectFileName(const std::string& sin, std::string const& dir_max); + virtual std::string ConvertToLinkReference( + std::string const& lib, + cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL); + /** Check whether the native build system supports the given definition. Issues a warning. */ virtual bool CheckDefinition(std::string const& define) const; diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index e25eb0f..11b87e3 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -120,6 +120,13 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() // Virtual protected methods. +std::string cmLocalNinjaGenerator::ConvertToLinkReference( + std::string const& lib, cmOutputConverter::OutputFormat format) +{ + std::string path = this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); + return this->ConvertToOutputFormat(path, format); +} + std::string cmLocalNinjaGenerator::ConvertToIncludeReference( std::string const& path, cmOutputConverter::OutputFormat format, bool forceFullPaths) @@ -482,12 +489,15 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { - output = outputs[0]; if (ccg.GetWorkingDirectory().empty()) { + output = this->ConvertToOutputFormat( + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), + outputs[0]), + cmOutputConverter::SHELL); + } else { output = - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), output); + this->ConvertToOutputFormat(outputs[0], cmOutputConverter::SHELL); } - output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } vars.Output = output.c_str(); diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index b04788d..875f8c6 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -76,6 +76,10 @@ public: void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg, cmNinjaDeps& ninjaDeps); + std::string ConvertToLinkReference(std::string const& lib, + cmOutputConverter::OutputFormat format = + cmOutputConverter::SHELL) CM_OVERRIDE; + void ComputeObjectFilenames( std::map& mapping, cmGeneratorTarget const* gt = CM_NULLPTR) CM_OVERRIDE; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 401319e..8825b46 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -141,7 +141,7 @@ void cmLocalUnixMakefileGenerator3::ComputeHomeRelativeOutputPath() { // Compute the path to use when referencing the current output // directory from the top output directory. - this->HomeRelativeOutputPath = this->MaybeConvertToRelativePath( + this->HomeRelativeOutputPath = this->ConvertToRelativePath( this->GetBinaryDirectory(), this->GetCurrentBinaryDirectory()); if (this->HomeRelativeOutputPath == ".") { this->HomeRelativeOutputPath = ""; @@ -548,8 +548,7 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule( // Construct the left hand side of the rule. std::string tgt = cmSystemTools::ConvertToOutputPath( - this->MaybeConvertToRelativePath(this->GetBinaryDirectory(), target) - .c_str()); + this->ConvertToRelativePath(this->GetBinaryDirectory(), target).c_str()); const char* space = ""; if (tgt.size() == 1) { @@ -578,7 +577,7 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule( dep != depends.end(); ++dep) { replace = *dep; replace = cmSystemTools::ConvertToOutputPath( - this->MaybeConvertToRelativePath(binDir, replace).c_str()); + this->ConvertToRelativePath(binDir, replace).c_str()); os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n"; } } @@ -970,7 +969,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( // working directory will be the start-output directory. bool had_slash = cmd.find('/') != cmd.npos; if (workingDir.empty()) { - cmd = this->MaybeConvertToRelativePath(currentBinDir, cmd); + cmd = this->ConvertToRelativePath(currentBinDir, cmd); } bool has_slash = cmd.find('/') != cmd.npos; if (had_slash && !has_slash) { @@ -995,8 +994,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( if (!outputs.empty()) { if (workingDir.empty()) { output = this->ConvertToOutputFormat( - this->MaybeConvertToRelativePath( - this->GetCurrentBinaryDirectory(), outputs[0]), + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), + outputs[0]), cmOutputConverter::SHELL); } else { @@ -1083,15 +1082,14 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand( fout << "file(REMOVE_RECURSE\n"; for (std::vector::const_iterator f = files.begin(); f != files.end(); ++f) { - std::string fc = this->MaybeConvertToRelativePath(currentBinDir, *f); + std::string fc = this->ConvertToRelativePath(currentBinDir, *f); fout << " " << cmOutputConverter::EscapeForCMake(fc) << "\n"; } fout << ")\n"; } std::string remove = "$(CMAKE_COMMAND) -P "; remove += this->ConvertToOutputFormat( - this->MaybeConvertToRelativePath(this->GetCurrentBinaryDirectory(), - cleanfile), + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), cleanfile), cmOutputConverter::SHELL); commands.push_back(remove); @@ -1860,8 +1858,7 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo( } for (std::vector::iterator i = includes.begin(); i != includes.end(); ++i) { - cmakefileStream << " \"" - << this->MaybeConvertToRelativePath(binaryDir, *i) + cmakefileStream << " \"" << this->ConvertToRelativePath(binaryDir, *i) << "\"\n"; } cmakefileStream << " )\n"; @@ -1926,7 +1923,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall( if (!tgt.empty()) { // The make target is always relative to the top of the build tree. std::string tgt2 = - this->MaybeConvertToRelativePath(this->GetBinaryDirectory(), tgt); + this->ConvertToRelativePath(this->GetBinaryDirectory(), tgt); // The target may have been written with windows paths. cmSystemTools::ConvertToOutputSlashes(tgt2); @@ -2081,31 +2078,20 @@ void cmLocalUnixMakefileGenerator3::CreateCDCommand( // back because the shell keeps the working directory between // commands. std::string cmd = cd_cmd; - cmd += this->ConvertToOutputFormat(tgtDir, cmOutputConverter::SHELL); + cmd += this->ConvertToOutputForExisting(tgtDir); commands.insert(commands.begin(), cmd); // Change back to the starting directory. cmd = cd_cmd; - cmd += this->ConvertToOutputFormat(relDir, cmOutputConverter::SHELL); + cmd += this->ConvertToOutputForExisting(relDir); commands.push_back(cmd); } else { // On UNIX we must construct a single shell command to change // directory and build because make resets the directory between // each command. - std::string outputForExisting = - this->ConvertToOutputFormat(tgtDir, cmOutputConverter::SHELL); + std::string outputForExisting = this->ConvertToOutputForExisting(tgtDir); std::string prefix = cd_cmd + outputForExisting + " && "; std::transform(commands.begin(), commands.end(), commands.begin(), std::bind1st(std::plus(), prefix)); } } - -std::string cmLocalUnixMakefileGenerator3::MaybeConvertToRelativePath( - std::string const& base, std::string const& path) -{ - if (!cmOutputConverter::ContainedInDirectory( - base, path, this->GetStateSnapshot().GetDirectory())) { - return path; - } - return cmOutputConverter::ForceToRelativePath(base, path); -} diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index c3ecda4..fc5c8e7 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -184,9 +184,6 @@ public: // Eclipse generator. void GetIndividualFileTargets(std::vector& targets); - std::string MaybeConvertToRelativePath(std::string const& base, - std::string const& path); - protected: void WriteLocalMakefile(); diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx deleted file mode 100644 index 89432ff..0000000 --- a/Source/cmMSVC60LinkLineComputer.cxx +++ /dev/null @@ -1,35 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#include "cmMSVC60LinkLineComputer.h" - -#include "cmSystemTools.h" - -cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer(cmState::Directory stateDir) - : cmLinkLineComputer(stateDir) -{ -} - -std::string cmMSVC60LinkLineComputer::ConvertToLinkReference( - std::string const& lib) const -{ -#if defined(_WIN32) && !defined(__CYGWIN__) - // Work-ardound command line parsing limitations in MSVC 6.0 - // Search for the last space. - std::string::size_type pos = lib.rfind(' '); - if (pos != lib.npos) { - // Find the slash after the last space, if any. - pos = lib.find('/', pos); - - // Convert the portion of the path with a space to a short path. - std::string sp; - if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) { - // Append the rest of the path with no space. - sp += lib.substr(pos); - return sp; - } - } -#endif - - return cmLinkLineComputer::ConvertToLinkReference(lib); -} diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h deleted file mode 100644 index c159b61..0000000 --- a/Source/cmMSVC60LinkLineComputer.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#ifndef cmMSVC60LinkLineComputer_h -#define cmMSVC60LinkLineComputer_h - -#include "cmLinkLineComputer.h" - -class cmMSVC60LinkLineComputer : public cmLinkLineComputer -{ -public: - cmMSVC60LinkLineComputer(cmState::Directory stateDir); - - std::string ConvertToLinkReference(std::string const& input) const - CM_OVERRIDE; -}; - -#endif diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 9ee3933..cb20117 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -5,7 +5,6 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -131,16 +130,16 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) targetFullPathPDB, cmOutputConverter::SHELL); // Convert to the output path to use in constructing commands. std::string targetOutPath = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath), cmOutputConverter::SHELL); std::string targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); std::string targetOutPathImport = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport), cmOutputConverter::SHELL); @@ -211,38 +210,32 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->AppendFlags( linkFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); - { - CM_AUTO_PTR linkLineComputer( - this->CreateLinkLineComputer( - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - - this->AddModuleDefinitionFlag(linkLineComputer.get(), linkFlags); - } + this->AddModuleDefinitionFlag(linkFlags); // Construct a list of files associated with this executable that // may need to be cleaned. std::vector exeCleanFiles; - exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath)); #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. - exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), (targetFullPath + ".manifest").c_str())); #endif if (targetNameReal != targetName) { - exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal)); } if (!targetNameImport.empty()) { - exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport)); std::string implib; if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib)) { - exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), implib)); } } @@ -250,7 +243,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // List the PDB for cleaning only when the whole target is // cleaned. We do not want to delete the .pdb file just before // linking the target. - this->CleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathPDB)); // Add the pre-build and pre-link rules building but not when relinking. @@ -325,7 +318,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); @@ -333,7 +326,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) ? cmOutputConverter::WATCOMQUOTE : cmOutputConverter::SHELL; std::string target = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), output); vars.Target = target.c_str(); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b12e779..b969bfb 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -5,7 +5,6 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -160,12 +159,7 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName); - - CM_AUTO_PTR linkLineComputer( - this->CreateLinkLineComputer( - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - - this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); + this->AddModuleDefinitionFlag(extraFlags); if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(extraFlags, " -Wl,--no-as-needed"); @@ -190,12 +184,7 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_MODULE_LINKER_FLAGS", this->ConfigName); - - CM_AUTO_PTR linkLineComputer( - this->CreateLinkLineComputer( - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - - this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); + this->AddModuleDefinitionFlag(extraFlags); this->WriteLibraryRules(linkRuleVar, extraFlags, relink); } @@ -316,20 +305,20 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( targetFullPathPDB, cmOutputConverter::SHELL); std::string targetOutPath = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath), cmOutputConverter::SHELL); std::string targetOutPathSO = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathSO), cmOutputConverter::SHELL); std::string targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); std::string targetOutPathImport = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport), cmOutputConverter::SHELL); @@ -377,24 +366,24 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Clean files associated with this library. std::vector libCleanFiles; - libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath)); if (targetNameReal != targetName) { - libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal)); } if (targetNameSO != targetName && targetNameSO != targetNameReal) { - libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathSO)); } if (!targetNameImport.empty()) { - libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport)); std::string implib; if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib)) { - libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), implib)); } } @@ -402,14 +391,14 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // List the PDB for cleaning only when the whole target is // cleaned. We do not want to delete the .pdb file just before // linking the target. - this->CleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathPDB)); #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { - libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), (targetFullPath + ".manifest").c_str())); } @@ -548,7 +537,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); @@ -557,7 +546,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( ? cmOutputConverter::WATCOMQUOTE : cmOutputConverter::SHELL; std::string target = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), output); vars.Target = target.c_str(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 95f883e..e70f09e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -10,7 +10,6 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -167,7 +166,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() for (std::vector::const_iterator o = outputs.begin(); o != outputs.end(); ++o) { this->CleanFiles.push_back( - this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, *o)); + this->LocalGenerator->ConvertToRelativePath(currentBinDir, *o)); } } } @@ -210,8 +209,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->MaybeConvertToRelativePath( - this->LocalGenerator->GetBinaryDirectory(), dependFileNameFull) + ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(), + dependFileNameFull) .c_str()) << "\n\n"; @@ -222,7 +221,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->MaybeConvertToRelativePath( + ->ConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), this->ProgressFileNameFull) .c_str()) @@ -257,9 +256,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->MaybeConvertToRelativePath( - this->LocalGenerator->GetBinaryDirectory(), - this->FlagFileNameFull) + ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(), + this->FlagFileNameFull) .c_str()) << "\n\n"; } @@ -316,9 +314,9 @@ void cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()( output += "/"; output += cmSystemTools::GetFilenameName(input); this->Generator->CleanFiles.push_back( - this->Generator->LocalGenerator->MaybeConvertToRelativePath( + this->Generator->LocalGenerator->ConvertToRelativePath( this->Generator->LocalGenerator->GetCurrentBinaryDirectory(), output)); - output = this->Generator->LocalGenerator->MaybeConvertToRelativePath( + output = this->Generator->LocalGenerator->ConvertToRelativePath( this->Generator->LocalGenerator->GetBinaryDirectory(), output); // Create a rule to copy the content into the bundle. @@ -520,13 +518,13 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); targetOutPathPDB = this->LocalGenerator->ConvertToOutputFormat( targetFullPathPDB, cmOutputConverter::SHELL); targetOutPathCompilePDB = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathCompilePDB), cmOutputConverter::SHELL); @@ -552,13 +550,13 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( vars.Object = shellObj.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); std::string objectFileDir = cmSystemTools::GetFilenamePath(obj); objectFileDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectFileDir), cmOutputConverter::SHELL); vars.ObjectFileDir = objectFileDir.c_str(); @@ -906,7 +904,7 @@ bool cmMakefileTargetGenerator::WriteMakeRule( // Touch the extra output so "make" knows that it was updated, // but only if the output was acually created. std::string const out = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath(binDir, *o), + this->LocalGenerator->ConvertToRelativePath(binDir, *o), cmOutputConverter::SHELL); std::vector output_commands; @@ -1202,8 +1200,7 @@ void cmMakefileTargetGenerator::WriteObjectsVariable( for (std::vector::const_iterator i = this->ExternalObjects.begin(); i != this->ExternalObjects.end(); ++i) { - object = - this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, *i); + object = this->LocalGenerator->ConvertToRelativePath(currentBinDir, *i); *this->BuildFileStream << " " << lineContinue << "\n" << this->Makefile->GetSafeDefinition( "CMAKE_OBJECT_NAME"); @@ -1237,7 +1234,7 @@ public: { // Construct the name of the next object. this->NextObject = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), obj), cmOutputConverter::RESPONSE); @@ -1292,7 +1289,7 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule( this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget); std::string buildTargetRuleName = dir; buildTargetRuleName += relink ? "/preinstall" : "/build"; - buildTargetRuleName = this->LocalGenerator->MaybeConvertToRelativePath( + buildTargetRuleName = this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), buildTargetRuleName); // Build the list of target outputs to drive. @@ -1482,7 +1479,7 @@ void cmMakefileTargetGenerator::CreateLinkScript( // Create the makefile command to invoke the link script. std::string link_command = "$(CMAKE_COMMAND) -E cmake_link_script "; link_command += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), linkScriptName), cmOutputConverter::SHELL); link_command += " --verbose=$(VERBOSE)"; @@ -1580,29 +1577,15 @@ std::string cmMakefileTargetGenerator::CreateResponseFile( return responseFileName; } -cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( - cmState::Directory stateDir) -{ - if (this->Makefile->IsOn("MSVC60")) { - return this->GlobalGenerator->CreateMSVC60LinkLineComputer(stateDir); - } - return this->GlobalGenerator->CreateLinkLineComputer(stateDir); -} - void cmMakefileTargetGenerator::CreateLinkLibs( std::string& linkLibs, bool relink, bool useResponseFile, std::vector& makefile_depends, bool useWatcomQuote) { std::string frameworkPath; std::string linkPath; - - CM_AUTO_PTR linkLineComputer( - this->CreateLinkLineComputer( - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - - this->LocalGenerator->OutputLinkLibraries( - linkLineComputer.get(), linkLibs, frameworkPath, linkPath, - *this->GeneratorTarget, relink, useResponseFile, useWatcomQuote); + this->LocalGenerator->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, + *this->GeneratorTarget, relink, + useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { @@ -1733,14 +1716,14 @@ void cmMakefileTargetGenerator::GenDefFile( cmd, cmOutputConverter::SHELL); cmd += " -E __create_def "; cmd += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), name_of_def_file), cmOutputConverter::SHELL); cmd += " "; std::string objlist_file = name_of_def_file; objlist_file += ".objs"; cmd += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objlist_file), cmOutputConverter::SHELL); real_link_commands.insert(real_link_commands.begin(), cmd); @@ -1761,7 +1744,7 @@ void cmMakefileTargetGenerator::GenDefFile( linkFlags += " "; linkFlags += this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); linkFlags += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( + this->LocalGenerator->ConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), name_of_def_file), cmOutputConverter::SHELL); linkFlags += " "; diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 6d367bd..df7b6aa 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -140,8 +140,6 @@ protected: std::vector& makefile_commands, std::vector& makefile_depends); - cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir); - /** Create a response file with the given set of options. Returns the relative path from the target build working directory to the response file name. */ diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index ecb29cb..f40c8fa 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -46,7 +46,7 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->MaybeConvertToRelativePath( + ->ConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), this->ProgressFileNameFull) .c_str()) diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx deleted file mode 100644 index 4bc7133..0000000 --- a/Source/cmNinjaLinkLineComputer.cxx +++ /dev/null @@ -1,19 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#include "cmNinjaLinkLineComputer.h" -#include "cmGlobalNinjaGenerator.h" - -cmNinjaLinkLineComputer::cmNinjaLinkLineComputer(cmState::Directory stateDir, - std::string const& prefix) - : cmLinkLineComputer(stateDir) - , NinjaPrefix(prefix) -{ -} - -std::string cmNinjaLinkLineComputer::ConvertToLinkReference( - std::string const& lib) const -{ - return cmGlobalNinjaGenerator::ConvertToNinjaPath(lib, this->StateDir, - this->NinjaPrefix); -} diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h deleted file mode 100644 index 370f6ce..0000000 --- a/Source/cmNinjaLinkLineComputer.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#ifndef cmNinjaLinkLineComputer_h -#define cmNinjaLinkLineComputer_h - -#include "cmLinkLineComputer.h" -#include "cmState.h" - -class cmNinjaLinkLineComputer : public cmLinkLineComputer -{ -public: - cmNinjaLinkLineComputer(cmState::Directory stateDir, - std::string const& ninjaPrefix); - - std::string ConvertToLinkReference(std::string const& input) const - CM_OVERRIDE; - -private: - std::string NinjaPrefix; -}; - -#endif diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 45baf8d..095c703 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -8,7 +8,6 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalNinjaGenerator.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" @@ -471,14 +470,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() vars["TARGET_FILE"] = localGen.ConvertToOutputFormat(targetOutputReal, cmOutputConverter::SHELL); - CM_AUTO_PTR linkLineComputer( - this->GetGlobalGenerator()->CreateLinkLineComputer( - this->GetLocalGenerator()->GetStateSnapshot().GetDirectory())); - - localGen.GetTargetFlags(linkLineComputer.get(), this->GetConfigName(), - vars["LINK_LIBRARIES"], vars["FLAGS"], - vars["LINK_FLAGS"], frameworkPath, linkPath, - &genTarget, useWatcomQuote); + localGen.GetTargetFlags(this->GetConfigName(), vars["LINK_LIBRARIES"], + vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, + linkPath, &genTarget, useWatcomQuote); if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") && (gt.GetType() == cmState::SHARED_LIBRARY || gt.IsExecutableWithExports())) { @@ -503,7 +497,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->addPoolNinjaVariable("JOB_POOL_LINK", >, vars); - this->AddModuleDefinitionFlag(linkLineComputer.get(), vars["LINK_FLAGS"]); + this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]); vars["LINK_FLAGS"] = cmGlobalNinjaGenerator::EncodeLiteral(vars["LINK_FLAGS"]); diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 05e7d63..2ef603b 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -18,6 +18,25 @@ cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot) assert(this->StateSnapshot.IsValid()); } +std::string cmOutputConverter::ConvertToOutputForExisting( + const std::string& remote, OutputFormat format) const +{ + // If this is a windows shell, the result has a space, and the path + // already exists, we can use a short-path to reference it without a + // space. + if (this->GetState()->UseWindowsShell() && + remote.find(' ') != std::string::npos && + cmSystemTools::FileExists(remote.c_str())) { + std::string tmp; + if (cmSystemTools::GetShortPath(remote, tmp)) { + return this->ConvertToOutputFormat(tmp, format); + } + } + + // Otherwise, perform standard conversion. + return this->ConvertToOutputFormat(remote, format); +} + std::string cmOutputConverter::ConvertToOutputFormat(const std::string& source, OutputFormat output) const { @@ -57,35 +76,44 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) cmSystemTools::IsSubDirectory(a, b)); } -bool cmOutputConverter::ContainedInDirectory(std::string const& local_path, - std::string const& remote_path, - cmState::Directory directory) +std::string cmOutputConverter::ConvertToRelativePath( + const std::vector& local, const std::string& in_remote, + bool force) const { - const std::string relativePathTopBinary = - directory.GetRelativePathTopBinary(); - const std::string relativePathTopSource = - directory.GetRelativePathTopSource(); - - const bool bothInBinary = - cmOutputConverterNotAbove(local_path.c_str(), - relativePathTopBinary.c_str()) && - cmOutputConverterNotAbove(remote_path.c_str(), - relativePathTopBinary.c_str()); - - const bool bothInSource = - cmOutputConverterNotAbove(local_path.c_str(), - relativePathTopSource.c_str()) && - cmOutputConverterNotAbove(remote_path.c_str(), - relativePathTopSource.c_str()); - - return bothInSource || bothInBinary; + std::string local_path = cmSystemTools::JoinPath(local); + return force ? this->ForceToRelativePath(local_path, in_remote) + : this->ConvertToRelativePath(local_path, in_remote); } std::string cmOutputConverter::ConvertToRelativePath( std::string const& local_path, std::string const& remote_path) const { - if (!ContainedInDirectory(local_path, remote_path, - this->StateSnapshot.GetDirectory())) { + // The paths should never be quoted. + assert(local_path[0] != '\"'); + assert(remote_path[0] != '\"'); + + // The local path should never have a trailing slash. + assert(local_path.empty() || local_path[local_path.size() - 1] != '/'); + + // If the path is already relative then just return the path. + if (!cmSystemTools::FileIsFullPath(remote_path.c_str())) { + return remote_path; + } + + // Skip conversion if the path and local are not both in the source + // or both in the binary tree. + if (!((cmOutputConverterNotAbove( + local_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && + cmOutputConverterNotAbove( + remote_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopBinary())) || + (cmOutputConverterNotAbove( + local_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && + cmOutputConverterNotAbove( + remote_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopSource())))) { return remote_path; } @@ -220,11 +248,10 @@ std::string cmOutputConverter::EscapeForShell(const std::string& str, if (this->GetState()->UseNMake()) { flags |= Shell_Flag_NMake; } - if (!this->GetState()->UseWindowsShell()) { - flags |= Shell_Flag_IsUnix; - } - return Shell__GetArgument(str.c_str(), flags); + return this->GetState()->UseWindowsShell() + ? Shell_GetArgumentForWindows(str.c_str(), flags) + : Shell_GetArgumentForUnix(str.c_str(), flags); } std::string cmOutputConverter::EscapeForCMake(const std::string& str) @@ -253,7 +280,7 @@ std::string cmOutputConverter::EscapeForCMake(const std::string& str) std::string cmOutputConverter::EscapeWindowsShellArgument(const char* arg, int shell_flags) { - return Shell__GetArgument(arg, shell_flags); + return Shell_GetArgumentForWindows(arg, shell_flags); } cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( @@ -339,10 +366,10 @@ int cmOutputConverter::Shell__CharNeedsQuotesOnWindows(char c) (c == '>') || (c == '|') || (c == '^')); } -int cmOutputConverter::Shell__CharNeedsQuotes(char c, int flags) +int cmOutputConverter::Shell__CharNeedsQuotes(char c, int isUnix, int flags) { /* On Windows the built-in command shell echo never needs quotes. */ - if (!(flags & Shell_Flag_IsUnix) && (flags & Shell_Flag_EchoWindows)) { + if (!isUnix && (flags & Shell_Flag_EchoWindows)) { return 0; } @@ -351,7 +378,7 @@ int cmOutputConverter::Shell__CharNeedsQuotes(char c, int flags) return 1; } - if (flags & Shell_Flag_IsUnix) { + if (isUnix) { /* On UNIX several special characters need quotes to preserve them. */ if (Shell__CharNeedsQuotesOnUnix(c)) { return 1; @@ -409,7 +436,8 @@ flag later when we understand applications of this better. */ #define KWSYS_SYSTEM_SHELL_QUOTE_MAKE_VARIABLES 0 -int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int flags) +int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int isUnix, + int flags) { /* The empty string needs quotes. */ if (!*in) { @@ -441,14 +469,14 @@ int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int flags) } /* Check whether this character needs quotes. */ - if (Shell__CharNeedsQuotes(*c, flags)) { + if (Shell__CharNeedsQuotes(*c, isUnix, flags)) { return 1; } } } /* On Windows some single character arguments need quotes. */ - if (flags & Shell_Flag_IsUnix && *in && !*(in + 1)) { + if (!isUnix && *in && !*(in + 1)) { char c = *in; if ((c == '?') || (c == '&') || (c == '^') || (c == '|') || (c == '#')) { return 1; @@ -458,7 +486,8 @@ int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int flags) return 0; } -std::string cmOutputConverter::Shell__GetArgument(const char* in, int flags) +std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, + int flags) { std::ostringstream out; @@ -469,11 +498,11 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int flags) int windows_backslashes = 0; /* Whether the argument must be quoted. */ - int needQuotes = Shell__ArgumentNeedsQuotes(in, flags); + int needQuotes = Shell__ArgumentNeedsQuotes(in, isUnix, flags); if (needQuotes) { /* Add the opening quote for this argument. */ if (flags & Shell_Flag_WatcomQuote) { - if (flags & Shell_Flag_IsUnix) { + if (isUnix) { out << '"'; } out << '\''; @@ -505,7 +534,7 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int flags) } /* Check whether this character needs escaping for the shell. */ - if (flags & Shell_Flag_IsUnix) { + if (isUnix) { /* On Unix a few special characters need escaping even inside a quoted argument. */ if (*c == '\\' || *c == '"' || *c == '`' || *c == '$') { @@ -602,7 +631,7 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int flags) /* Add the closing quote for this argument. */ if (flags & Shell_Flag_WatcomQuote) { out << '\''; - if (flags & Shell_Flag_IsUnix) { + if (isUnix) { out << '"'; } } else { @@ -612,3 +641,15 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int flags) return out.str(); } + +std::string cmOutputConverter::Shell_GetArgumentForWindows(const char* in, + int flags) +{ + return Shell__GetArgument(in, 0, flags); +} + +std::string cmOutputConverter::Shell_GetArgumentForUnix(const char* in, + int flags) +{ + return Shell__GetArgument(in, 1, flags); +} diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 596bdf0..5979eaa 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -26,10 +26,15 @@ public: std::string ConvertDirectorySeparatorsForShell( const std::string& source) const; + ///! for existing files convert to output path and short path if spaces + std::string ConvertToOutputForExisting(const std::string& remote, + OutputFormat format = SHELL) const; + void SetLinkScriptShell(bool linkScriptShell); /** - * Flags to pass to Shell_GetArgument. These modify the generated + * Flags to pass to Shell_GetArgumentForWindows or + * Shell_GetArgumentForUnix. These modify the generated * quoting and escape sequences to work under alternative * environments. */ @@ -62,11 +67,19 @@ public: Shell_Flag_AllowMakeVariables = (1 << 6), /** The target shell quoting uses extra single Quotes for Watcom tools. */ - Shell_Flag_WatcomQuote = (1 << 7), - - Shell_Flag_IsUnix = (1 << 8), + Shell_Flag_WatcomQuote = (1 << 7) }; + /** + * Transform the given command line argument for use in a Windows or + * Unix shell. Returns a pointer to the end of the command line + * argument in the provided output buffer. Flags may be passed to + * modify the generated quoting and escape sequences to work under + * alternative environments. + */ + static std::string Shell_GetArgumentForWindows(const char* in, int flags); + static std::string Shell_GetArgumentForUnix(const char* in, int flags); + std::string EscapeForShell(const std::string& str, bool makeVars = false, bool forEcho = false, bool useWatcomQuote = false) const; @@ -86,9 +99,16 @@ public: }; static FortranFormat GetFortranFormat(const char* value); - static bool ContainedInDirectory(std::string const& local_path, - std::string const& remote_path, - cmState::Directory directory); + /** + * Convert the given remote path to a relative path with respect to + * the given local path. The local path must be given in component + * form (see SystemTools::SplitPath) without a trailing slash. The + * remote path must use forward slashes and not already be escaped + * or quoted. + */ + std::string ConvertToRelativePath(const std::vector& local, + const std::string& in_remote, + bool force = false) const; /** * Convert the given remote path to a relative path with respect to @@ -114,11 +134,11 @@ private: static int Shell__CharIsWhitespace(char c); static int Shell__CharNeedsQuotesOnUnix(char c); static int Shell__CharNeedsQuotesOnWindows(char c); - static int Shell__CharNeedsQuotes(char c, int flags); + static int Shell__CharNeedsQuotes(char c, int isUnix, int flags); static int Shell__CharIsMakeVariableName(char c); static const char* Shell__SkipMakeVariables(const char* c); - static int Shell__ArgumentNeedsQuotes(const char* in, int flags); - static std::string Shell__GetArgument(const char* in, int flags); + static int Shell__ArgumentNeedsQuotes(const char* in, int isUnix, int flags); + static std::string Shell__GetArgument(const char* in, int isUnix, int flags); private: cmState::Snapshot StateSnapshot; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a58510e..a2bdf49 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -7,7 +7,6 @@ #include "cmFileMonitor.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" -#include "cmLinkLineComputer.h" #include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -729,12 +728,8 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, std::string linkLanguageFlags; std::string frameworkPath; std::string linkPath; - CM_AUTO_PTR linkLineComputer( - lg->GetGlobalGenerator()->CreateLinkLineComputer( - lg->GetStateSnapshot().GetDirectory())); - lg->GetTargetFlags(linkLineComputer.get(), config, linkLibs, - linkLanguageFlags, linkFlags, frameworkPath, linkPath, - target, false); + lg->GetTargetFlags(config, linkLibs, linkLanguageFlags, linkFlags, + frameworkPath, linkPath, target, false); linkLibs = cmSystemTools::TrimWhitespace(linkLibs); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 4024ddd..14124f8 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -12,7 +12,6 @@ #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmGlobalGeneratorFactory.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmMessenger.h" @@ -583,10 +582,8 @@ bool cmake::FindPackage(const std::vector& args) gg->CreateGenerationObjects(); cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName()); cmLocalGenerator* lg = gtgt->GetLocalGenerator(); - CM_AUTO_PTR linkLineComputer( - gg->CreateLinkLineComputer(lg->GetStateSnapshot().GetDirectory())); - lg->GetTargetFlags(linkLineComputer.get(), buildType, linkLibs, flags, - linkFlags, frameworkPath, linkPath, gtgt, false); + lg->GetTargetFlags(buildType, linkLibs, flags, linkFlags, frameworkPath, + linkPath, gtgt, false); linkLibs = frameworkPath + linkPath + linkLibs; printf("%s\n", linkLibs.c_str()); diff --git a/bootstrap b/bootstrap index fb8b1eb..889cc33 100755 --- a/bootstrap +++ b/bootstrap @@ -297,8 +297,6 @@ CMAKE_CXX_SOURCES="\ cmFileTimeComparison \ cmGlobalUnixMakefileGenerator3 \ cmLocalUnixMakefileGenerator3 \ - cmLinkLineComputer \ - cmMSVC60LinkLineComputer \ cmMakefileExecutableTargetGenerator \ cmMakefileLibraryTargetGenerator \ cmMakefileTargetGenerator \ ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 6 -- Source/cmCommonTargetGenerator.cxx | 10 +- Source/cmCommonTargetGenerator.h | 4 +- Source/cmDependsFortran.cxx | 45 ++++----- Source/cmDependsFortran.h | 3 - Source/cmGhsMultiTargetGenerator.cxx | 8 +- Source/cmGlobalGenerator.cxx | 14 --- Source/cmGlobalGenerator.h | 7 -- Source/cmGlobalNinjaGenerator.cxx | 39 ++------ Source/cmGlobalNinjaGenerator.h | 7 -- Source/cmGlobalUnixMakefileGenerator3.cxx | 6 +- Source/cmGlobalXCodeGenerator.cxx | 6 +- Source/cmLinkLineComputer.cxx | 27 ------ Source/cmLinkLineComputer.h | 21 ----- Source/cmLocalGenerator.cxx | 70 +++++++++----- Source/cmLocalGenerator.h | 11 ++- Source/cmLocalNinjaGenerator.cxx | 16 +++- Source/cmLocalNinjaGenerator.h | 4 + Source/cmLocalUnixMakefileGenerator3.cxx | 40 +++----- Source/cmLocalUnixMakefileGenerator3.h | 3 - Source/cmMSVC60LinkLineComputer.cxx | 35 ------- Source/cmMSVC60LinkLineComputer.h | 18 ---- Source/cmMakefileExecutableTargetGenerator.cxx | 31 +++--- Source/cmMakefileLibraryTargetGenerator.cxx | 41 +++----- Source/cmMakefileTargetGenerator.cxx | 63 +++++-------- Source/cmMakefileTargetGenerator.h | 2 - Source/cmMakefileUtilityTargetGenerator.cxx | 2 +- Source/cmNinjaLinkLineComputer.cxx | 19 ---- Source/cmNinjaLinkLineComputer.h | 23 ----- Source/cmNinjaNormalTargetGenerator.cxx | 14 +-- Source/cmOutputConverter.cxx | 119 ++++++++++++++++-------- Source/cmOutputConverter.h | 40 ++++++-- Source/cmServerProtocol.cxx | 9 +- Source/cmake.cxx | 7 +- bootstrap | 2 - 35 files changed, 295 insertions(+), 477 deletions(-) delete mode 100644 Source/cmLinkLineComputer.cxx delete mode 100644 Source/cmLinkLineComputer.h delete mode 100644 Source/cmMSVC60LinkLineComputer.cxx delete mode 100644 Source/cmMSVC60LinkLineComputer.h delete mode 100644 Source/cmNinjaLinkLineComputer.cxx delete mode 100644 Source/cmNinjaLinkLineComputer.h hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 5 09:44:25 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 5 Oct 2016 09:44:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-74-g44a0a9a Message-ID: <20161005134425.08830E41F4@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 44a0a9aac4193a647842da6c4298677f9753e7c3 (commit) via f2b88600f374684e66cbe91697dfed09798ac5b8 (commit) via 2f16ab87aeb58525f723ce5f5dc84e1f7730a8b3 (commit) from eff4fa9738cfaaf5fe7d7cdd3d4983bf0cfbee10 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44a0a9aac4193a647842da6c4298677f9753e7c3 commit 44a0a9aac4193a647842da6c4298677f9753e7c3 Merge: eff4fa9 f2b8860 Author: Brad King AuthorDate: Wed Oct 5 09:44:24 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 5 09:44:24 2016 -0400 Merge topic 'FindMatlab-documentation' into next f2b88600 Help: Extend 3.7 release notes for FindMatlab 2f16ab87 FindMatlab: small documentation fixes https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2b88600f374684e66cbe91697dfed09798ac5b8 commit f2b88600f374684e66cbe91697dfed09798ac5b8 Author: Raffi Enficiaud AuthorDate: Wed Oct 5 09:32:56 2016 +0200 Commit: Brad King CommitDate: Wed Oct 5 09:43:09 2016 -0400 Help: Extend 3.7 release notes for FindMatlab diff --git a/Help/release/3.7.rst b/Help/release/3.7.rst index f02b62d..9794267 100644 --- a/Help/release/3.7.rst +++ b/Help/release/3.7.rst @@ -176,7 +176,14 @@ Modules * A :module:`FindICU` module was introduced to find the International Components for Unicode (ICU) libraries and programs. -* The :module:`FindMatlab` module learned to find a SIMULINK component. +* The :module:`FindMatlab` module learned to find the SIMULINK and MAT + components. + +* The :module:`FindMatlab` module :command:`matlab_add_mex` command learned + to add executables and modules. + +* The :module:`FindMatlab` module :command:`matlab_add_unit_test` command + learned to support inline Matlab test code. * The :module:`FindOpenCL` module now provides imported targets. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2f16ab87aeb58525f723ce5f5dc84e1f7730a8b3 commit 2f16ab87aeb58525f723ce5f5dc84e1f7730a8b3 Author: Raffi Enficiaud AuthorDate: Wed Oct 5 09:20:59 2016 +0200 Commit: Brad King CommitDate: Wed Oct 5 09:39:27 2016 -0400 FindMatlab: small documentation fixes diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 6beacce..e1ae83f 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -737,9 +737,9 @@ endfunction() # added to the Matlab path. # ``CUSTOM_MATLAB_COMMAND`` # Matlab script command to run as the test. -# IIf this is not set, then the following is run: -# "runtests('matlab_file_name'), exit(max([ans(1,:).Failed])) -# matlab_file_name comes from UNITTEST_FILE without the .m. +# If this is not set, then the following is run: +# ``runtests('matlab_file_name'), exit(max([ans(1,:).Failed]))`` +# where ``matlab_file_name`` is the ``UNITTEST_FILE`` without the extension. # ``UNITTEST_PRECOMMAND`` # Matlab script command to be ran before the file # containing the test (eg. GPU device initialisation based on CMake @@ -753,7 +753,7 @@ endfunction() # ``MATLAB_ADDITIONAL_STARTUP_OPTIONS`` # a list of additional option in order # to run Matlab from the command line. -# -nosplash -nodesktop -nodisplay are always added. +# ``-nosplash -nodesktop -nodisplay`` are always added. # ``TEST_ARGS`` # Additional options provided to the add_test command. These # options are added to the default options (eg. "CONFIGURATIONS Release") @@ -763,7 +763,7 @@ endfunction() # ``WORKING_DIRECTORY`` # This will be the working directory for the test. If specified it will # also be the output directory used for the log file of the test run. -# If not specifed the temporary directory ${CMAKE_BINARY_DIR}/Matlab will +# If not specifed the temporary directory ``${CMAKE_BINARY_DIR}/Matlab`` will # be used as the working directory and the log location. # function(matlab_add_unit_test) @@ -844,7 +844,6 @@ endfunction() # the same folder without any processing, with the same name as the final # mex file, and with extension `.m`. In that case, typing ``help `` # in Matlab prints the documentation contained in this file. -# # ``MODULE`` or ``SHARED`` may be given to specify the type of library to be # created. ``EXECUTABLE`` may be given to create an executable instead of # a library. If no type is given explicitly, the type is ``SHARED``. @@ -1246,8 +1245,8 @@ if(_numbers_of_matlab_roots GREATER 0) endif() -# check if the root changed against the previous defined one, if so -# clear all the cached variables +# check if the root changed wrt. the previous defined one, if so +# clear all the cached variables for being able to reconfigure properly if(DEFINED Matlab_ROOT_DIR_LAST_CACHED) if(NOT Matlab_ROOT_DIR_LAST_CACHED STREQUAL Matlab_ROOT_DIR) ----------------------------------------------------------------------- Summary of changes: Help/release/3.7.rst | 9 ++++++++- Modules/FindMatlab.cmake | 15 +++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 5 09:44:55 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 5 Oct 2016 09:44:55 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-76-g19043bb Message-ID: <20161005134455.2BD18E4BCF@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 19043bbf24eec581b506990ed1aea680b598e262 (commit) via e8893030e696113d778f484750b1afccbfd74d42 (commit) from 44a0a9aac4193a647842da6c4298677f9753e7c3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19043bbf24eec581b506990ed1aea680b598e262 commit 19043bbf24eec581b506990ed1aea680b598e262 Merge: 44a0a9a e889303 Author: Brad King AuthorDate: Wed Oct 5 09:44:54 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 5 09:44:54 2016 -0400 Merge topic 'FindMatlab-fix-simulink-cache' into next e8893030 FindMatlab: remove SIMULINK path from cache when FindMatlab is reconfigured https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8893030e696113d778f484750b1afccbfd74d42 commit e8893030e696113d778f484750b1afccbfd74d42 Author: Raffi Enficiaud AuthorDate: Wed Oct 5 09:26:19 2016 +0200 Commit: Brad King CommitDate: Wed Oct 5 09:39:20 2016 -0400 FindMatlab: remove SIMULINK path from cache when FindMatlab is reconfigured diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 6beacce..cc5d3fa 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -1260,6 +1260,7 @@ if(DEFINED Matlab_ROOT_DIR_LAST_CACHED) Matlab_ENG_LIBRARY Matlab_MAT_LIBRARY Matlab_MEX_EXTENSION + Matlab_SIMULINK_INCLUDE_DIR # internal Matlab_MEXEXTENSIONS_PROG ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 5 09:49:20 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 5 Oct 2016 09:49:20 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-78-g7adaccf Message-ID: <20161005134920.65693F5D3A@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 7adaccf028973818e04182298fe1ec2902c1878f (commit) via aa57f35ff539a1d43d93e373048f70ce7fd04852 (commit) from 19043bbf24eec581b506990ed1aea680b598e262 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7adaccf028973818e04182298fe1ec2902c1878f commit 7adaccf028973818e04182298fe1ec2902c1878f Merge: 19043bb aa57f35 Author: Brad King AuthorDate: Wed Oct 5 09:49:12 2016 -0400 Commit: Brad King CommitDate: Wed Oct 5 09:49:12 2016 -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 Wed Oct 5 14:31:17 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 5 Oct 2016 14:31:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-82-g5ec8861 Message-ID: <20161005183117.0F350F5C5A@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 5ec8861390616565e543ca00f596753a016959a5 (commit) via d834454b0ba5292e78b4ba8a68b2988619861bfb (commit) via 7937b4518b0b908d1fb6cb0c1da33234782e3358 (commit) via d426ee7ca4a036e97420eedeaf5abbfd24d4af4d (commit) from 7adaccf028973818e04182298fe1ec2902c1878f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ec8861390616565e543ca00f596753a016959a5 commit 5ec8861390616565e543ca00f596753a016959a5 Merge: 7adaccf d834454 Author: Brad King AuthorDate: Wed Oct 5 14:31:15 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 5 14:31:15 2016 -0400 Merge topic 'nmake-encoding' into next d834454b NMake: Use ANSI encoding for NMake Makefiles 7937b451 cmGeneratedFileStream: Add optional encoding support d426ee7c codecvt: Add class for encoding conversion https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d834454b0ba5292e78b4ba8a68b2988619861bfb commit d834454b0ba5292e78b4ba8a68b2988619861bfb Author: D?vis Mos?ns AuthorDate: Wed Oct 5 16:46:20 2016 +0300 Commit: Brad King CommitDate: Wed Oct 5 10:27:06 2016 -0400 NMake: Use ANSI encoding for NMake Makefiles Set ANSI encoding to cmGeneratedFileStream for use with NMake Makefile generator. diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 4120b52..b16acfd 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -10,6 +10,7 @@ #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" +#include "cm_codecvt.hxx" #include #include @@ -60,6 +61,12 @@ public: return this->GetName() == name; } + /** Get encoding used by generator for makefile files */ + virtual codecvt::Encoding GetMakefileEncoding() const + { + return codecvt::Encoding::None; + } + /** Tell the generator about the target system. */ virtual bool SetSystemName(std::string const&, cmMakefile*) { return true; } diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h index f169e76..fea45ac 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.h +++ b/Source/cmGlobalNMakeMakefileGenerator.h @@ -26,6 +26,12 @@ public: } static std::string GetActualName() { return "NMake Makefiles"; } + /** Get encoding used by generator for makefile files */ + codecvt::Encoding GetMakefileEncoding() const CM_OVERRIDE + { + return codecvt::Encoding::ANSI; + } + /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 4a5cc77..92d2b83 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -201,7 +201,8 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2() this->GetCMakeInstance()->GetHomeOutputDirectory(); makefileName += cmake::GetCMakeFilesDirectory(); makefileName += "/Makefile2"; - cmGeneratedFileStream makefileStream(makefileName.c_str()); + cmGeneratedFileStream makefileStream(makefileName.c_str(), false, + this->GetMakefileEncoding()); if (!makefileStream) { return; } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 8825b46..823ddbf 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -230,7 +230,9 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile() // Open the rule file. This should be copy-if-different because the // rules may depend on this file itself. std::string ruleFileNameFull = this->ConvertToFullPath(ruleFileName); - cmGeneratedFileStream ruleFileStream(ruleFileNameFull.c_str()); + cmGeneratedFileStream ruleFileStream( + ruleFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); if (!ruleFileStream) { return; } @@ -1415,7 +1417,9 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies( // because the make tool may try to reload it needlessly otherwise. std::string ruleFileNameFull = dir; ruleFileNameFull += "/depend.make"; - cmGeneratedFileStream ruleFileStream(ruleFileNameFull.c_str()); + cmGeneratedFileStream ruleFileStream( + ruleFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); ruleFileStream.SetCopyIfDifferent(true); if (!ruleFileStream) { return false; @@ -1427,7 +1431,8 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies( std::string internalRuleFileNameFull = dir; internalRuleFileNameFull += "/depend.internal"; cmGeneratedFileStream internalRuleFileStream( - internalRuleFileNameFull.c_str()); + internalRuleFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); if (!internalRuleFileStream) { return false; } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e70f09e..0d91efd 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -110,7 +110,8 @@ void cmMakefileTargetGenerator::CreateRuleFile() // Open the rule file. This should be copy-if-different because the // rules may depend on this file itself. this->BuildFileStream = - new cmGeneratedFileStream(this->BuildFileNameFull.c_str()); + new cmGeneratedFileStream(this->BuildFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); this->BuildFileStream->SetCopyIfDifferent(true); if (!this->BuildFileStream) { return; @@ -231,7 +232,9 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() // make sure the depend file exists if (!cmSystemTools::FileExists(dependFileNameFull.c_str())) { // Write an empty dependency file. - cmGeneratedFileStream depFileStream(dependFileNameFull.c_str()); + cmGeneratedFileStream depFileStream( + dependFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); depFileStream << "# Empty dependencies file for " << this->GeneratorTarget->GetName() << ".\n" << "# This may be replaced when dependencies are built." @@ -243,7 +246,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() this->FlagFileNameFull = this->TargetBuildDirectoryFull; this->FlagFileNameFull += "/flags.make"; this->FlagFileStream = - new cmGeneratedFileStream(this->FlagFileNameFull.c_str()); + new cmGeneratedFileStream(this->FlagFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); this->FlagFileStream->SetCopyIfDifferent(true); if (!this->FlagFileStream) { return; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7937b4518b0b908d1fb6cb0c1da33234782e3358 commit 7937b4518b0b908d1fb6cb0c1da33234782e3358 Author: D?vis Mos?ns AuthorDate: Wed Oct 5 16:43:21 2016 +0300 Commit: Brad King CommitDate: Wed Oct 5 10:26:49 2016 -0400 cmGeneratedFileStream: Add optional encoding support This allows to save file stream in different encoding than internal encoding. diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 02717a4..cd796cd 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -10,13 +10,21 @@ #include #endif -cmGeneratedFileStream::cmGeneratedFileStream() +cmGeneratedFileStream::cmGeneratedFileStream(Encoding encoding) : cmGeneratedFileStreamBase() , Stream() { +#ifdef CMAKE_BUILD_WITH_CMAKE + if (encoding != Encoding::None) { + imbue(std::locale(getloc(), new codecvt(encoding))); + } +#else + static_cast(encoding); +#endif } -cmGeneratedFileStream::cmGeneratedFileStream(const char* name, bool quiet) +cmGeneratedFileStream::cmGeneratedFileStream(const char* name, bool quiet, + Encoding encoding) : cmGeneratedFileStreamBase(name) , Stream(TempName.c_str()) { @@ -26,6 +34,13 @@ cmGeneratedFileStream::cmGeneratedFileStream(const char* name, bool quiet) this->TempName.c_str()); cmSystemTools::ReportLastSystemError(""); } +#ifdef CMAKE_BUILD_WITH_CMAKE + if (encoding != Encoding::None) { + imbue(std::locale(getloc(), new codecvt(encoding))); + } +#else + static_cast(encoding); +#endif } cmGeneratedFileStream::~cmGeneratedFileStream() diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index 515954c..6cdebc6 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -5,6 +5,7 @@ #include +#include #include #include @@ -71,12 +72,13 @@ class cmGeneratedFileStream : private cmGeneratedFileStreamBase, { public: typedef cmsys::ofstream Stream; + typedef codecvt::Encoding Encoding; /** * This constructor prepares a default stream. The open method must * be used before writing to the stream. */ - cmGeneratedFileStream(); + cmGeneratedFileStream(Encoding encoding = Encoding::None); /** * This constructor takes the name of the file to be generated. It @@ -84,7 +86,8 @@ public: * file cannot be opened an error message is produced unless the * second argument is set to true. */ - cmGeneratedFileStream(const char* name, bool quiet = false); + cmGeneratedFileStream(const char* name, bool quiet = false, + Encoding encoding = Encoding::None); /** * The destructor checks the stream status to be sure the temporary https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d426ee7ca4a036e97420eedeaf5abbfd24d4af4d commit d426ee7ca4a036e97420eedeaf5abbfd24d4af4d Author: D?vis Mos?ns AuthorDate: Wed Oct 5 15:56:52 2016 +0300 Commit: Brad King CommitDate: Wed Oct 5 10:26:22 2016 -0400 codecvt: Add class for encoding conversion Add a `codecvt` class that can be used as facet for locale so that it's possible to convert from internal UTF-8 encoding to other encodings such as Windows ANSI codepage. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index ec49481..e574957 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -384,6 +384,8 @@ set(SRCS cm_sha2.c cm_utf8.h cm_utf8.c + cm_codecvt.hxx + cm_codecvt.cxx ) set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.cxx\"\n") diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx new file mode 100644 index 0000000..72a6032 --- /dev/null +++ b/Source/cm_codecvt.cxx @@ -0,0 +1,214 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cm_codecvt.hxx" +#include + +#if defined(_WIN32) +#include +#undef max +#include +#endif + +codecvt::codecvt(Encoding encoding) + : m_codepage(0) + , m_lastState(0) +{ + switch (encoding) { + case codecvt::ANSI: +#if defined(_WIN32) + m_noconv = false; + m_codepage = CP_ACP; + break; +#endif + // We don't know which ANSI encoding to use for other platforms than + // Windows + // so we don't do any conversion there + case codecvt::UTF8: + // Assume internal encoding is UTF-8 + case codecvt::None: + // No encoding + default: + m_noconv = true; + } +} + +codecvt::~codecvt(){}; + +bool codecvt::do_always_noconv() const throw() +{ + return m_noconv; +}; + +std::codecvt_base::result codecvt::do_out(mbstate_t& state, const char* from, + const char* from_end, + const char*& from_next, char* to, + char* to_end, char*& to_next) const +{ + if (m_noconv) { + return noconv; + } + std::codecvt_base::result result = error; +#if defined(_WIN32) + from_next = from; + to_next = to; + bool convert = true; + size_t count = from_end - from; + const char* data = from; + unsigned int& stateId = reinterpret_cast(state); + if (count == 0) { + return codecvt::ok; + } else if (count == 1) { + if (stateId == 0) { + // decode first byte for UTF-8 + if ((*from & 0xF8) == 0xF0 || // 1111 0xxx; 4 bytes for codepoint + (*from & 0xF0) == 0xE0 || // 1110 xxxx; 3 bytes for codepoint + (*from & 0xE0) == 0xC0) // 110x xxxx; 2 bytes for codepoint + { + stateId = findStateId(); + codecvt::State& s = m_states.at(stateId - 1); + s.bytes[0] = *from; + convert = false; + if ((*from & 0xF8) == 0xF0) { + s.totalBytes = 4; + } else if ((*from & 0xF0) == 0xE0) { + s.totalBytes = 3; + } else if ((*from & 0xE0) == 0xC0) { + s.totalBytes = 2; + } + s.bytesLeft = s.totalBytes - 1; + }; + // else 1 byte for codepoint + } else { + codecvt::State& s = m_states.at(stateId - 1); + s.bytes[s.totalBytes - s.bytesLeft] = *from; + s.bytesLeft--; + data = s.bytes; + count = s.totalBytes - s.bytesLeft; + if ((*from & 0xC0) == 0x80) { // 10xx xxxx + convert = s.bytesLeft == 0; + } else { + // invalid multi-byte + convert = true; + } + if (convert) { + s.used = false; + if (stateId == m_lastState) { + m_lastState--; + } + stateId = 0; + } + } + if (convert) { + std::wstring wide = cmsys::Encoding::ToWide(std::string(data, count)); + int r = WideCharToMultiByte(m_codepage, 0, wide.c_str(), + static_cast(wide.size()), to, + to_end - to, NULL, NULL); + if (r > 0) { + from_next = from_end; + to_next = to + r; + result = ok; + } + } else { + result = partial; + from_next = from_end; + to_next = to; + } + } +#else + static_cast(state); + static_cast(from); + static_cast(from_end); + static_cast(from_next); + static_cast(to); + static_cast(to_end); + static_cast(to_next); + result = codecvt::noconv; +#endif + return result; +}; + +std::codecvt_base::result codecvt::do_unshift(mbstate_t& state, char* to, + char* to_end, + char*& to_next) const +{ + std::codecvt_base::result result = error; + to_next = to; +#if defined(_WIN32) + unsigned int& stateId = reinterpret_cast(state); + if (stateId > 0) { + codecvt::State& s = m_states.at(stateId - 1); + s.used = false; + if (stateId == m_lastState) { + m_lastState--; + } + stateId = 0; + std::wstring wide = cmsys::Encoding::ToWide( + std::string(s.bytes, s.totalBytes - s.bytesLeft)); + int r = WideCharToMultiByte(m_codepage, 0, wide.c_str(), + static_cast(wide.size()), to, to_end - to, + NULL, NULL); + if (r > 0) { + to_next = to + r; + result = ok; + } + } else { + result = ok; + } +#else + static_cast(state); + static_cast(to_end); + result = ok; +#endif + return result; +}; + +int codecvt::do_max_length() const throw() +{ + return 4; +}; + +int codecvt::do_encoding() const throw() +{ + return 0; +}; + +unsigned int codecvt::findStateId() const +{ + unsigned int id = 0; + bool add = false; + const unsigned int maxSize = std::numeric_limits::max(); + if (m_lastState >= maxSize) { + m_lastState = 0; + } + if (m_states.size() <= m_lastState) { + add = true; + } else { + unsigned int i = m_lastState; + while (i < maxSize) { + codecvt::State& s = m_states.at(i); + i++; + if (!s.used) { + m_lastState = i; + id = m_lastState; + s.used = true; + s.totalBytes = 0; + s.bytesLeft = 0; + break; + } + if (i >= m_states.size()) { + i = 0; + } + if (i == m_lastState) { + add = true; + break; + } + } + }; + if (add) { + codecvt::State s = { true, 0, 0, 0, 0, 0, 0 }; + m_states.push_back(s); + m_lastState = (unsigned int)m_states.size(); + id = m_lastState; + } + return id; +}; diff --git a/Source/cm_codecvt.hxx b/Source/cm_codecvt.hxx new file mode 100644 index 0000000..1473c67 --- /dev/null +++ b/Source/cm_codecvt.hxx @@ -0,0 +1,53 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cm_codecvt_hxx +#define cm_codecvt_hxx + +#include +#include + +class codecvt : public std::codecvt +{ +public: + enum Encoding + { + None, + UTF8, + ANSI + }; + +#ifdef CMAKE_BUILD_WITH_CMAKE + + codecvt(Encoding encoding); + +protected: + virtual ~codecvt(); + virtual bool do_always_noconv() const throw(); + virtual result do_out(mbstate_t& state, const char* from, + const char* from_end, const char*& from_next, char* to, + char* to_end, char*& to_next) const; + virtual result do_unshift(mbstate_t& state, char* to, char*, + char*& to_next) const; + virtual int do_max_length() const throw(); + virtual int do_encoding() const throw(); + +private: + typedef struct + { + bool used; + unsigned char totalBytes; + unsigned char bytesLeft; + char bytes[4]; + } State; + + unsigned int findStateId() const; + + bool m_noconv; + unsigned int m_codepage; + mutable std::vector m_states; + mutable unsigned int m_lastState; + +#endif +}; + +#endif ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 + Source/cmGeneratedFileStream.cxx | 19 ++- Source/cmGeneratedFileStream.h | 7 +- Source/cmGlobalGenerator.h | 7 + Source/cmGlobalNMakeMakefileGenerator.h | 6 + Source/cmGlobalUnixMakefileGenerator3.cxx | 3 +- Source/cmLocalUnixMakefileGenerator3.cxx | 11 +- Source/cmMakefileTargetGenerator.cxx | 10 +- Source/cm_codecvt.cxx | 214 +++++++++++++++++++++++++++++ Source/cm_codecvt.hxx | 53 +++++++ 10 files changed, 321 insertions(+), 11 deletions(-) create mode 100644 Source/cm_codecvt.cxx create mode 100644 Source/cm_codecvt.hxx hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 5 14:39:05 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 5 Oct 2016 14:39:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-84-gab1addb Message-ID: <20161005183909.07454203@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 ab1addb73d03889525a3c948501866bc2ffaacae (commit) via 6537189a8dfd967ad3541b0eac4351ba4e1ac4d5 (commit) from 5ec8861390616565e543ca00f596753a016959a5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab1addb73d03889525a3c948501866bc2ffaacae commit ab1addb73d03889525a3c948501866bc2ffaacae Merge: 5ec8861 6537189 Author: Brad King AuthorDate: Wed Oct 5 14:39:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 5 14:39:04 2016 -0400 Merge topic 'nmake-encoding' into next 6537189a fixup! codecvt: Add class for encoding conversion https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6537189a8dfd967ad3541b0eac4351ba4e1ac4d5 commit 6537189a8dfd967ad3541b0eac4351ba4e1ac4d5 Author: Brad King AuthorDate: Wed Oct 5 14:38:37 2016 -0400 Commit: Brad King CommitDate: Wed Oct 5 14:38:37 2016 -0400 fixup! codecvt: Add class for encoding conversion diff --git a/Source/cm_codecvt.hxx b/Source/cm_codecvt.hxx index 1473c67..4ef392d 100644 --- a/Source/cm_codecvt.hxx +++ b/Source/cm_codecvt.hxx @@ -3,7 +3,7 @@ #ifndef cm_codecvt_hxx #define cm_codecvt_hxx -#include +#include #include class codecvt : public std::codecvt ----------------------------------------------------------------------- Summary of changes: Source/cm_codecvt.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 5 14:42:58 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 5 Oct 2016 14:42:58 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-87-g7a68e30 Message-ID: <20161005184258.A305EC1C70@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 7a68e30bdc4baa0542cecd57fd963c18442d3719 (commit) via 69ba48d32de541c7d6b73bbd1dd3ed25f6ff0015 (commit) via 785ebd8a0b1ba20a45a5f29816e5742702955a10 (commit) from ab1addb73d03889525a3c948501866bc2ffaacae (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a68e30bdc4baa0542cecd57fd963c18442d3719 commit 7a68e30bdc4baa0542cecd57fd963c18442d3719 Merge: ab1addb 69ba48d Author: Brad King AuthorDate: Wed Oct 5 14:42:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 5 14:42:58 2016 -0400 Merge topic 'nmake-encoding' into next 69ba48d3 fixup! NMake: Use ANSI encoding for NMake Makefiles 785ebd8a fixup! codecvt: Add class for encoding conversion https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69ba48d32de541c7d6b73bbd1dd3ed25f6ff0015 commit 69ba48d32de541c7d6b73bbd1dd3ed25f6ff0015 Author: Brad King AuthorDate: Wed Oct 5 14:41:38 2016 -0400 Commit: Brad King CommitDate: Wed Oct 5 14:41:38 2016 -0400 fixup! NMake: Use ANSI encoding for NMake Makefiles diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index b16acfd..355bc56 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -64,7 +64,7 @@ public: /** Get encoding used by generator for makefile files */ virtual codecvt::Encoding GetMakefileEncoding() const { - return codecvt::Encoding::None; + return codecvt::None; } /** Tell the generator about the target system. */ diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h index fea45ac..6eb2124 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.h +++ b/Source/cmGlobalNMakeMakefileGenerator.h @@ -29,7 +29,7 @@ public: /** Get encoding used by generator for makefile files */ codecvt::Encoding GetMakefileEncoding() const CM_OVERRIDE { - return codecvt::Encoding::ANSI; + return codecvt::ANSI; } /** Get the documentation entry for this generator. */ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=785ebd8a0b1ba20a45a5f29816e5742702955a10 commit 785ebd8a0b1ba20a45a5f29816e5742702955a10 Author: Brad King AuthorDate: Wed Oct 5 14:40:18 2016 -0400 Commit: Brad King CommitDate: Wed Oct 5 14:40:18 2016 -0400 fixup! codecvt: Add class for encoding conversion diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx index 72a6032..088f559 100644 --- a/Source/cm_codecvt.cxx +++ b/Source/cm_codecvt.cxx @@ -9,11 +9,11 @@ #include #endif -codecvt::codecvt(Encoding encoding) +codecvt::codecvt(Encoding e) : m_codepage(0) , m_lastState(0) { - switch (encoding) { + switch (e) { case codecvt::ANSI: #if defined(_WIN32) m_noconv = false; diff --git a/Source/cm_codecvt.hxx b/Source/cm_codecvt.hxx index 4ef392d..6bd0a78 100644 --- a/Source/cm_codecvt.hxx +++ b/Source/cm_codecvt.hxx @@ -18,7 +18,7 @@ public: #ifdef CMAKE_BUILD_WITH_CMAKE - codecvt(Encoding encoding); + codecvt(Encoding e); protected: virtual ~codecvt(); ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalGenerator.h | 2 +- Source/cmGlobalNMakeMakefileGenerator.h | 2 +- Source/cm_codecvt.cxx | 4 ++-- Source/cm_codecvt.hxx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 5 15:04:24 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 5 Oct 2016 15:04:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-89-g003dceb Message-ID: <20161005190424.BD1D2F5DB5@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 003dceb9f5b416a41ba9ca38c51f24f82e867091 (commit) via 1c165e6148dda9e40fe17b6f39bf4c96e3c2fc96 (commit) from 7a68e30bdc4baa0542cecd57fd963c18442d3719 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=003dceb9f5b416a41ba9ca38c51f24f82e867091 commit 003dceb9f5b416a41ba9ca38c51f24f82e867091 Merge: 7a68e30 1c165e6 Author: Brad King AuthorDate: Wed Oct 5 15:04:24 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 5 15:04:24 2016 -0400 Merge topic 'nmake-encoding' into next 1c165e61 fixup! cmGeneratedFileStream: Add optional encoding support https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c165e6148dda9e40fe17b6f39bf4c96e3c2fc96 commit 1c165e6148dda9e40fe17b6f39bf4c96e3c2fc96 Author: Brad King AuthorDate: Wed Oct 5 15:04:13 2016 -0400 Commit: Brad King CommitDate: Wed Oct 5 15:04:13 2016 -0400 fixup! cmGeneratedFileStream: Add optional encoding support diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index cd796cd..6cdb7f5 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -15,7 +15,7 @@ cmGeneratedFileStream::cmGeneratedFileStream(Encoding encoding) , Stream() { #ifdef CMAKE_BUILD_WITH_CMAKE - if (encoding != Encoding::None) { + if (encoding != codecvt::None) { imbue(std::locale(getloc(), new codecvt(encoding))); } #else @@ -35,7 +35,7 @@ cmGeneratedFileStream::cmGeneratedFileStream(const char* name, bool quiet, cmSystemTools::ReportLastSystemError(""); } #ifdef CMAKE_BUILD_WITH_CMAKE - if (encoding != Encoding::None) { + if (encoding != codecvt::None) { imbue(std::locale(getloc(), new codecvt(encoding))); } #else diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index 6cdebc6..a027b01 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -78,7 +78,7 @@ public: * This constructor prepares a default stream. The open method must * be used before writing to the stream. */ - cmGeneratedFileStream(Encoding encoding = Encoding::None); + cmGeneratedFileStream(Encoding encoding = codecvt::None); /** * This constructor takes the name of the file to be generated. It @@ -87,7 +87,7 @@ public: * second argument is set to true. */ cmGeneratedFileStream(const char* name, bool quiet = false, - Encoding encoding = Encoding::None); + Encoding encoding = codecvt::None); /** * The destructor checks the stream status to be sure the temporary ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratedFileStream.cxx | 4 ++-- Source/cmGeneratedFileStream.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Oct 6 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 6 Oct 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-17-g22605f1 Message-ID: <20161006040107.1EC6FF5DD9@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 22605f1e230a187658c57df22b66e1b1ade09a4a (commit) from aa57f35ff539a1d43d93e373048f70ce7fd04852 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22605f1e230a187658c57df22b66e1b1ade09a4a commit 22605f1e230a187658c57df22b66e1b1ade09a4a Author: Kitware Robot AuthorDate: Thu Oct 6 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Thu Oct 6 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 5781f4b..32578c2 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 7) -set(CMake_VERSION_PATCH 20161005) +set(CMake_VERSION_PATCH 20161006) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From domen.vrankar at gmail.com Thu Oct 6 02:54:52 2016 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Thu, 6 Oct 2016 02:54:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-95-ga01b549 Message-ID: <20161006065452.C0FAAF59DA@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 a01b5490594eb98063d8354acdd52a03fb46232f (commit) via 7f15429cc574f90fdd68ee254c28833a4843e2aa (commit) via 9d2cb3f668dd79def44829c8bd5791e7c242e026 (commit) via b39bd548f9f1f96a2285e5aff638085352c21f29 (commit) via bf7d0168bfdfbe1b91bae83dd0091af54e7c4e8a (commit) via 22605f1e230a187658c57df22b66e1b1ade09a4a (commit) from 003dceb9f5b416a41ba9ca38c51f24f82e867091 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a01b5490594eb98063d8354acdd52a03fb46232f commit a01b5490594eb98063d8354acdd52a03fb46232f Merge: 003dceb 7f15429 Author: Domen Vrankar AuthorDate: Thu Oct 6 02:54:44 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 02:54:44 2016 -0400 Merge topic 'cpack-rpm-single-debuginfo' into next 7f15429c CPack/RPM single debuginfo packaging 9d2cb3f6 CPack/RPM learned defining main component b39bd548 CPack/RPM debuginfo package without binaries bf7d0168 CPack/RPM debuginfo package objdump error suppression 22605f1e CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f15429cc574f90fdd68ee254c28833a4843e2aa commit 7f15429cc574f90fdd68ee254c28833a4843e2aa Author: Domen Vrankar AuthorDate: Thu Oct 6 08:33:16 2016 +0200 Commit: Domen Vrankar CommitDate: Thu Oct 6 08:47:36 2016 +0200 CPack/RPM single debuginfo packaging Generate a single debuginfo package even if components packaging is enabled. This makes issue #15668 resolution feature complete. Closes: #15486 diff --git a/Help/release/dev/cpack-rpm-single-debuginfo.rst b/Help/release/dev/cpack-rpm-single-debuginfo.rst index 281a988..34a710d 100644 --- a/Help/release/dev/cpack-rpm-single-debuginfo.rst +++ b/Help/release/dev/cpack-rpm-single-debuginfo.rst @@ -5,3 +5,7 @@ cpack-rpm-single-debuginfo which forces generation of a rpm for defined component without component suffix in filename and package name. See :variable:`CPACK_RPM_MAIN_COMPONENT` variable. + +* The :module:`CPackRPM` module learned to generate a single debuginfo package + on demand even if components packagin is used. + See :variable:`CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE` variable. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 2c8c0e0..6017ce3 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -803,6 +803,26 @@ # * Mandatory : NO # * Default : - # +# .. variable:: CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE +# +# Create a single debuginfo package even if components packaging is set. +# +# * Mandatory : NO +# * Default : OFF +# +# When this variable is enabled it produces a single debuginfo package even if +# component packaging is enabled. +# +# When using this feature in combination with components packaging and there is +# more than one component this variable requires :variable:`CPACK_RPM_MAIN_COMPONENT` +# to be set. +# +# .. note:: +# +# If none of the :variable:`CPACK_RPM__DEBUGINFO_PACKAGE` variables +# is set then :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is automatically set to +# ``ON`` when :variable:`CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE` is set. +# # Packaging of sources (SRPM) # ^^^^^^^^^^^^^^^^^^^^^^^^^^^ # @@ -2076,7 +2096,7 @@ function(cpack_rpm_generate_package) "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_DEBUGINFO_PACKAGE" "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_DEBUGINFO_PACKAGE" "CPACK_RPM_DEBUGINFO_PACKAGE") - if(CPACK_RPM_DEBUGINFO_PACKAGE) + if(CPACK_RPM_DEBUGINFO_PACKAGE OR (CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE AND NOT GENERATE_SPEC_PARTS)) cpack_rpm_variable_fallback("CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX" "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_BUILD_SOURCE_DIRS_PREFIX" "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_BUILD_SOURCE_DIRS_PREFIX" @@ -2084,9 +2104,81 @@ function(cpack_rpm_generate_package) if(NOT CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX) set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}") endif() - cpack_rpm_debugsymbol_check("${CPACK_RPM_INSTALL_FILES}" "${WDIR}") - set(TMP_RPM_DEBUGINFO " + if(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE AND GENERATE_SPEC_PARTS) + file(WRITE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_COMPONENT}.files" + "${CPACK_RPM_INSTALL_FILES}") + else() + if(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE AND CPACK_RPM_PACKAGE_COMPONENT) + # this part is only required by components packaging - with monolithic + # packages we can be certain that there are no other components present + # so CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE is a noop + if(CPACK_RPM_DEBUGINFO_PACKAGE) + # only add current package files to debuginfo list if debuginfo + # generation is enabled for current package + set(install_files_ "${CPACK_RPM_INSTALL_FILES}") + else() + unset(install_files_) + endif() + + file(GLOB files_ "${CPACK_RPM_DIRECTORY}/SPECS/*.files") + + foreach(f_ IN LISTS files_) + file(READ "${f_}" tmp_) + string(APPEND install_files_ ";${tmp_}") + endforeach() + + # if there were other components/groups so we need to move files from them + # to current component otherwise those files won't be found + file(GLOB components_ LIST_DIRECTORIES true RELATIVE + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}" + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/*") + foreach(component_ IN LISTS components_) + string(TOUPPER "${component_}" component_dir_upper_) + if(component_dir_upper_ STREQUAL CPACK_RPM_PACKAGE_COMPONENT_UPPER) + # skip current component + continue() + endif() + + cmake_policy(PUSH) + cmake_policy(SET CMP0009 NEW) + file(GLOB_RECURSE files_for_move_ LIST_DIRECTORIES false RELATIVE + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}" + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}/*") + cmake_policy(POP) + + foreach(f_ IN LISTS files_for_move_) + get_filename_component(dir_path_ "${f_}" DIRECTORY) + set(src_file_ + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}/${f_}") + + # check that we are not overriding an existing file that doesn't + # match the file that we want to copy + if(EXISTS "${src_file_}" AND EXISTS "${WDIR}/${f_}") + execute_process( + COMMAND ${CMAKE_COMMAND} -E compare_files "${src_file_}" "${WDIR}/${f_}" + RESULT_VARIABLE res_ + ) + if(res_) + message(FATAL_ERROR "CPackRPM:Error: File on path '${WDIR}/${f_}'" + " already exists but is a different than the one in component" + " '${component_}'! Packages will not be generated.") + endif() + endif() + + file(MAKE_DIRECTORY "${WDIR}/${dir_path_}") + file(RENAME "${src_file_}" + "${WDIR}/${f_}") + endforeach() + endforeach() + + cpack_rpm_debugsymbol_check("${install_files_}" "${WDIR}") + else() + cpack_rpm_debugsymbol_check("${CPACK_RPM_INSTALL_FILES}" "${WDIR}") + endif() + + if(TMP_DEBUGINFO_ADDITIONAL_SOURCES) + set(TMP_RPM_DEBUGINFO " # Modified version of %%debug_package macro # defined in /usr/lib/rpm/macros as that one # can't handle injection of extra source files. @@ -2105,6 +2197,15 @@ package or when debugging this package. ${TMP_DEBUGINFO_ADDITIONAL_SOURCES} %endif ") + elseif(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE) + message(AUTHOR_WARNING "CPackRPM:Warning: debuginfo package was requested" + " but will not be generated as no source files were found!") + else() + message(AUTHOR_WARNING "CPackRPM:Warning: debuginfo package was requested" + " but will not be generated as no source files were found! Component: '" + "${CPACK_RPM_PACKAGE_COMPONENT}'.") + endif() + endif() endif() # Prepare install files @@ -2194,7 +2295,12 @@ ${TMP_DEBUGINFO_ADDITIONAL_SOURCES} # else example: #set(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${CPACK_RPM_PACKAGE_ARCHITECTURE}.rpm") - if(NOT CPACK_RPM_DEBUGINFO_PACKAGE) + if(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE AND GENERATE_SPEC_PARTS) + string(TOLOWER "${CPACK_RPM_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.*\\.rpm" expected_filename_) + + file(WRITE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_COMPONENT}.rpm_name" + "${expected_filename_};${CPACK_RPM_FILE_NAME}") + elseif(NOT CPACK_RPM_DEBUGINFO_PACKAGE) set(FILE_NAME_DEFINE "%define _rpmfilename ${CPACK_RPM_FILE_NAME}") endif() endif() @@ -2289,7 +2395,54 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ \@CPACK_RPM_SPEC_CHANGELOG\@ " ) + + elseif(GENERATE_SPEC_PARTS) # binary rpm with single debuginfo package + file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in + "# -*- rpm-spec -*- +%package -n \@CPACK_RPM_PACKAGE_NAME\@ +Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@ +Version: \@CPACK_RPM_PACKAGE_VERSION\@ +Release: \@CPACK_RPM_PACKAGE_RELEASE\@ +License: \@CPACK_RPM_PACKAGE_LICENSE\@ +Group: \@CPACK_RPM_PACKAGE_GROUP\@ +Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ + +\@TMP_RPM_URL\@ +\@TMP_RPM_REQUIRES\@ +\@TMP_RPM_REQUIRES_PRE\@ +\@TMP_RPM_REQUIRES_POST\@ +\@TMP_RPM_REQUIRES_PREUN\@ +\@TMP_RPM_REQUIRES_POSTUN\@ +\@TMP_RPM_PROVIDES\@ +\@TMP_RPM_OBSOLETES\@ +\@TMP_RPM_CONFLICTS\@ +\@TMP_RPM_AUTOPROV\@ +\@TMP_RPM_AUTOREQ\@ +\@TMP_RPM_AUTOREQPROV\@ +\@TMP_RPM_BUILDARCH\@ +\@TMP_RPM_PREFIXES\@ + +%description -n \@CPACK_RPM_PACKAGE_NAME\@ +\@CPACK_RPM_PACKAGE_DESCRIPTION\@ + +%files -n \@CPACK_RPM_PACKAGE_NAME\@ +%defattr(\@TMP_DEFAULT_FILE_PERMISSIONS\@,\@TMP_DEFAULT_USER\@,\@TMP_DEFAULT_GROUP\@,\@TMP_DEFAULT_DIR_PERMISSIONS\@) +\@CPACK_RPM_INSTALL_FILES\@ +\@CPACK_RPM_ABSOLUTE_INSTALL_FILES\@ +\@CPACK_RPM_USER_INSTALL_FILES\@ +" + ) + else() # binary rpm + if(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE) + # find generated spec file and take its name + file(GLOB spec_files_ "${CPACK_RPM_DIRECTORY}/SPECS/*.spec") + + foreach(f_ IN LISTS spec_files_) + file(READ "${f_}" tmp_) + string(APPEND TMP_OTHER_COMPONENTS "\n${tmp_}\n") + endforeach() + endif() # We should generate a USER spec file template: # - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE @@ -2375,6 +2528,8 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT %changelog \@CPACK_RPM_SPEC_CHANGELOG\@ + +\@TMP_OTHER_COMPONENTS\@ " ) endif() @@ -2401,60 +2556,90 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT configure_file(${CPACK_RPM_BINARY_SPECFILE}.in ${CPACK_RPM_BINARY_SPECFILE} @ONLY) endif() - if(RPMBUILD_EXECUTABLE) - # Now call rpmbuild using the SPECFILE - execute_process( - COMMAND "${RPMBUILD_EXECUTABLE}" ${RPMBUILD_FLAGS} - --define "_topdir ${CPACK_RPM_DIRECTORY}" - --buildroot "%_topdir/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" - --target "${CPACK_RPM_PACKAGE_ARCHITECTURE}" - "${CPACK_RPM_BINARY_SPECFILE}" - WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" - RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT - ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err" - OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out") - if(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT) - file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err RPMBUILDERR) - file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out RPMBUILDOUT) - message("CPackRPM:Debug: You may consult rpmbuild logs in: ") - message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err") - message("CPackRPM:Debug: *** ${RPMBUILDERR} ***") - message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out") - message("CPackRPM:Debug: *** ${RPMBUILDOUT} ***") + if(NOT GENERATE_SPEC_PARTS) # generate package + if(RPMBUILD_EXECUTABLE) + # Now call rpmbuild using the SPECFILE + execute_process( + COMMAND "${RPMBUILD_EXECUTABLE}" ${RPMBUILD_FLAGS} + --define "_topdir ${CPACK_RPM_DIRECTORY}" + --buildroot "%_topdir/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" + --target "${CPACK_RPM_PACKAGE_ARCHITECTURE}" + "${CPACK_RPM_BINARY_SPECFILE}" + WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" + RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT + ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err" + OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out") + if(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT) + file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err RPMBUILDERR) + file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out RPMBUILDOUT) + message("CPackRPM:Debug: You may consult rpmbuild logs in: ") + message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err") + message("CPackRPM:Debug: *** ${RPMBUILDERR} ***") + message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out") + message("CPackRPM:Debug: *** ${RPMBUILDOUT} ***") + endif() + else() + if(ALIEN_EXECUTABLE) + message(FATAL_ERROR "RPM packaging through alien not done (yet)") + endif() endif() - else() - if(ALIEN_EXECUTABLE) - message(FATAL_ERROR "RPM packaging through alien not done (yet)") + + # find generated rpm files and take their names + cmake_policy(PUSH) + # Tell file(GLOB_RECURSE) not to follow directory symlinks + # even if the project does not set this policy to NEW. + cmake_policy(SET CMP0009 NEW) + file(GLOB_RECURSE GENERATED_FILES "${CPACK_RPM_DIRECTORY}/RPMS/*.rpm" + "${CPACK_RPM_DIRECTORY}/SRPMS/*.rpm") + cmake_policy(POP) + + if(NOT GENERATED_FILES) + message(FATAL_ERROR "RPM package was not generated! ${CPACK_RPM_DIRECTORY}") endif() - endif() - # find generated rpm files and take their names - cmake_policy(PUSH) - # Tell file(GLOB_RECURSE) not to follow directory symlinks - # even if the project does not set this policy to NEW. - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE GENERATED_FILES "${CPACK_RPM_DIRECTORY}/RPMS/*.rpm" - "${CPACK_RPM_DIRECTORY}/SRPMS/*.rpm") - cmake_policy(POP) + unset(expected_filenames_) + unset(filenames_) + if(CPACK_RPM_DEBUGINFO_PACKAGE AND NOT CPACK_RPM_FILE_NAME STREQUAL "RPM-DEFAULT") + string(TOLOWER "${CPACK_RPM_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.*\\.rpm" efn_) + list(APPEND expected_filenames_ "${efn_}") + list(APPEND filenames_ "${CPACK_RPM_FILE_NAME}") + endif() - if(NOT GENERATED_FILES) - message(FATAL_ERROR "RPM package was not generated! ${CPACK_RPM_DIRECTORY}") - endif() + # check if other files have to be renamed + file(GLOB rename_files_ "${CPACK_RPM_DIRECTORY}/SPECS/*.rpm_name") + if(rename_files_) + foreach(f_ IN LISTS rename_files_) + file(READ "${f_}" tmp_) + list(GET tmp_ 0 efn_) + list(APPEND expected_filenames_ "${efn_}") + list(GET tmp_ 1 fn_) + list(APPEND filenames_ "${fn_}") + endforeach() + endif() - if(CPACK_RPM_DEBUGINFO_PACKAGE AND NOT CPACK_RPM_FILE_NAME STREQUAL "RPM-DEFAULT") - string(TOLOWER "${CPACK_RPM_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.*\\.rpm" EXPECTED_FILENAME) + if(expected_filenames_) + foreach(F IN LISTS GENERATED_FILES) + unset(matched_) + foreach(expected_ IN LISTS expected_filenames_) + if(F MATCHES ".*/${expected_}") + list(FIND expected_filenames_ "${expected_}" idx_) + list(GET filenames_ ${idx_} filename_) + get_filename_component(FILE_PATH "${F}" DIRECTORY) + file(RENAME "${F}" "${FILE_PATH}/${filename_}") + list(APPEND new_files_list_ "${FILE_PATH}/${filename_}") + set(matched_ "YES") + + break() + endif() + endforeach() - foreach(F IN LISTS GENERATED_FILES) - if(F MATCHES ".*/${EXPECTED_FILENAME}") - get_filename_component(FILE_PATH "${F}" DIRECTORY) - file(RENAME "${F}" "${FILE_PATH}/${CPACK_RPM_FILE_NAME}") - list(APPEND new_files_list_ "${FILE_PATH}/${CPACK_RPM_FILE_NAME}") - else() - list(APPEND new_files_list_ "${F}") - endif() - endforeach() + if(NOT matched_) + list(APPEND new_files_list_ "${F}") + endif() + endforeach() - set(GENERATED_FILES "${new_files_list_}") + set(GENERATED_FILES "${new_files_list_}") + endif() endif() set(GEN_CPACK_OUTPUT_FILES "${GENERATED_FILES}" PARENT_SCOPE) diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index 7f89d5e..9817327 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -107,7 +107,78 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) const char* mainComponent = this->GetOption("CPACK_RPM_MAIN_COMPONENT"); + if (this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE") && + !this->IsOn("CPACK_RPM_DEBUGINFO_PACKAGE")) { + // check if we need to set CPACK_RPM_DEBUGINFO_PACKAGE because non of + // the components is setting per component debuginfo package variable + bool shouldSet = true; + + if (ignoreGroup) { + std::map::iterator compIt; + for (compIt = this->Components.begin(); compIt != this->Components.end(); + ++compIt) { + std::string component(compIt->first); + std::transform(component.begin(), component.end(), component.begin(), + ::toupper); + + if (this->IsOn("CPACK_RPM_" + compIt->first + "_DEBUGINFO_PACKAGE") || + this->IsOn("CPACK_RPM_" + component + "_DEBUGINFO_PACKAGE")) { + shouldSet = false; + break; + } + } + } else { + std::map::iterator compGIt; + for (compGIt = this->ComponentGroups.begin(); + compGIt != this->ComponentGroups.end(); ++compGIt) { + std::string component(compGIt->first); + std::transform(component.begin(), component.end(), component.begin(), + ::toupper); + + if (this->IsOn("CPACK_RPM_" + compGIt->first + "_DEBUGINFO_PACKAGE") || + this->IsOn("CPACK_RPM_" + component + "_DEBUGINFO_PACKAGE")) { + shouldSet = false; + break; + } + } + + if (shouldSet) { + std::map::iterator compIt; + for (compIt = this->Components.begin(); + compIt != this->Components.end(); ++compIt) { + // Does the component belong to a group? + if (compIt->second.Group == CM_NULLPTR) { + std::string component(compIt->first); + std::transform(component.begin(), component.end(), + component.begin(), ::toupper); + + if (this->IsOn("CPACK_RPM_" + compIt->first + + "_DEBUGINFO_PACKAGE") || + this->IsOn("CPACK_RPM_" + component + "_DEBUGINFO_PACKAGE")) { + shouldSet = false; + break; + } + } + } + } + } + + if (shouldSet) { + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Setting " + << "CPACK_RPM_DEBUGINFO_PACKAGE because " + << "CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE is set but " + << " none of the " + << "CPACK_RPM__DEBUGINFO_PACKAGE variables " + << "are set." << std::endl); + this->SetOption("CPACK_RPM_DEBUGINFO_PACKAGE", "ON"); + } + } + if (mainComponent) { + if (this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE")) { + this->SetOption("GENERATE_SPEC_PARTS", "ON"); + } + std::string mainComponentUpper(mainComponent); std::transform(mainComponentUpper.begin(), mainComponentUpper.end(), mainComponentUpper.begin(), ::toupper); @@ -163,6 +234,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) } if (retval) { + this->SetOption("GENERATE_SPEC_PARTS", "OFF"); + if (mainCompGIt != this->ComponentGroups.end()) { retval &= PackageOnePack(initialTopLevel, mainCompGIt->first); } else if (mainCompIt != this->Components.end()) { @@ -197,6 +270,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) } if (retval) { + this->SetOption("GENERATE_SPEC_PARTS", "OFF"); + if (mainCompIt != this->Components.end()) { retval &= PackageOnePack(initialTopLevel, mainCompIt->first); } else { @@ -206,7 +281,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) } } } - } else { + } else if (!this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE") || + this->Components.size() == 1) { // The default behavior is to have one package by component group // unless CPACK_COMPONENTS_IGNORE_GROUP is specified. if (!ignoreGroup) { @@ -241,6 +317,12 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) retval &= PackageOnePack(initialTopLevel, compIt->first); } } + } else { + cmCPackLogger( + cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT not set but" + << " it is mandatory with CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE" + << " being set.\n"); + retval = 0; } if (retval) { @@ -259,6 +341,10 @@ int cmCPackRPMGenerator::PackageComponentsAllInOne( packageFileNames.clear(); std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY")); + if (this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE")) { + this->SetOption("CPACK_RPM_DEBUGINFO_PACKAGE", "ON"); + } + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging all groups in one package..." "(CPACK_COMPONENTS_ALL_[GROUPS_]IN_ONE_PACKAGE is set)" diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake new file mode 100644 index 0000000..dc49343 --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake @@ -0,0 +1,30 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "0") + +if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_debuginfo") + set(EXPECTED_FILES_COUNT "4") + set(EXPECTED_FILE_1 "single_debuginfo-0.1.1-1.*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") + set(EXPECTED_FILE_2 "single_debuginfo*-headers.rpm") + set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") + set(EXPECTED_FILE_3 "single_debuginfo*-libs.rpm") + set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/libtest_lib.so$") + + set(EXPECTED_FILE_4 "single_debuginfo-debuginfo*.rpm") + set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp${whitespaces_}/src/src_1/test_lib.cpp.*") +elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component" OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_no_debuginfo") + set(EXPECTED_FILES_COUNT "2") + set(EXPECTED_FILE_1 "single_debuginfo-0*-applications.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") + + set(EXPECTED_FILE_2 "single_debuginfo-applications-debuginfo*.rpm") + set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") +elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_main" OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_components") + set(EXPECTED_FILES_COUNT "2") + set(EXPECTED_FILE_1 "single_debuginfo-0*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") + + set(EXPECTED_FILE_2 "single_debuginfo-debuginfo*.rpm") + set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") +endif() diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_components-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_components-stderr.txt new file mode 100644 index 0000000..d80939f --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_components-stderr.txt @@ -0,0 +1 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-no_components-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo.spec$ diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_debuginfo-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_debuginfo-stderr.txt new file mode 100644 index 0000000..86396db --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_debuginfo-stderr.txt @@ -0,0 +1,3 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-no_debuginfo-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-headers.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-no_debuginfo-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-libs.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-no_debuginfo-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo.spec$ diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_main_component-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_main_component-stderr.txt new file mode 100644 index 0000000..454283c --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_main_component-stderr.txt @@ -0,0 +1 @@ +CPack Error: CPACK_RPM_MAIN_COMPONENT not set but it is mandatory with CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE being set. diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component-stderr.txt new file mode 100644 index 0000000..080c4ff --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component-stderr.txt @@ -0,0 +1 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-one_component-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-applications.spec$ diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_main-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_main-stderr.txt new file mode 100644 index 0000000..665597c --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_main-stderr.txt @@ -0,0 +1 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-one_component_main-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo.spec$ diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_no_debuginfo-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_no_debuginfo-stderr.txt new file mode 100644 index 0000000..b64b1f5 --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_no_debuginfo-stderr.txt @@ -0,0 +1 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-one_component_no_debuginfo-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-applications.spec$ diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-valid-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-valid-stderr.txt new file mode 100644 index 0000000..f4c1bef --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-valid-stderr.txt @@ -0,0 +1,3 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-valid-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-headers.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-valid-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-libs.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-valid-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo.spec$ diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 45dbcea..474ee33 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -19,5 +19,6 @@ run_cpack_test(INSTALL_SCRIPTS "RPM" false) run_cpack_test(DEB_GENERATE_SHLIBS "DEB" true) run_cpack_test(DEB_GENERATE_SHLIBS_LDCONFIG "DEB" true) run_cpack_test(DEBUGINFO "RPM" true) +run_cpack_test_subtests(SINGLE_DEBUGINFO "no_main_component;one_component;one_component_main;no_debuginfo;one_component_no_debuginfo;no_components;valid" "RPM" true) run_cpack_test(LONG_FILENAMES "DEB" false) run_cpack_test_subtests(PACKAGE_CHECKSUM "invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false) diff --git a/Tests/RunCMake/CPack/SINGLE_DEBUGINFO.cmake b/Tests/RunCMake/CPack/SINGLE_DEBUGINFO.cmake new file mode 100644 index 0000000..ae4995e --- /dev/null +++ b/Tests/RunCMake/CPack/SINGLE_DEBUGINFO.cmake @@ -0,0 +1,56 @@ +set(CMAKE_BUILD_WITH_INSTALL_RPATH 1) + +# PGI compiler doesn't add build id to binaries by default +if(CMAKE_CXX_COMPILER_ID STREQUAL "PGI") + string(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--build-id") + string(APPEND CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id") +endif() + +if(NOT RunCMake_SUBTEST_SUFFIX STREQUAL "no_components") + set(CPACK_RPM_COMPONENT_INSTALL "ON") +endif() + +set(CMAKE_BUILD_TYPE Debug) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.hpp" + "int test_lib();\n") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp" + "#include \"test_lib.hpp\"\nint test_lib() {return 0;}\n") +add_library(test_lib SHARED "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp") + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp" + "#include \"test_lib.hpp\"\nint main() {return test_lib();}\n") +add_executable(test_prog "${CMAKE_CURRENT_BINARY_DIR}/main.cpp") +target_link_libraries(test_prog test_lib) + +install(TARGETS test_prog DESTINATION foo COMPONENT applications) + +if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_main_component" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_debuginfo") + install(FILES CMakeLists.txt DESTINATION bar COMPONENT headers) + install(TARGETS test_lib DESTINATION bas COMPONENT libs) +elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_no_debuginfo") + set(CPACK_COMPONENTS_ALL applications) +endif() + +set(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE ON) + +if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_main" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_debuginfo") + set(CPACK_RPM_MAIN_COMPONENT "applications") + set(CPACK_RPM_APPLICATIONS_FILE_NAME "RPM-DEFAULT") +endif() + +if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_main_component" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component") + set(CPACK_RPM_APPLICATIONS_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_LIBS_DEBUGINFO_PACKAGE ON) +endif() + +set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/src") + +set(CPACK_PACKAGE_NAME "single_debuginfo") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d2cb3f668dd79def44829c8bd5791e7c242e026 commit 9d2cb3f668dd79def44829c8bd5791e7c242e026 Author: Domen Vrankar AuthorDate: Wed Oct 5 00:43:28 2016 +0200 Commit: Domen Vrankar CommitDate: Thu Oct 6 08:42:43 2016 +0200 CPack/RPM learned defining main component Main component rpm package is generated without component suffix in filename and package name. diff --git a/Help/release/dev/cpack-rpm-single-debuginfo.rst b/Help/release/dev/cpack-rpm-single-debuginfo.rst new file mode 100644 index 0000000..281a988 --- /dev/null +++ b/Help/release/dev/cpack-rpm-single-debuginfo.rst @@ -0,0 +1,7 @@ +cpack-rpm-single-debuginfo +-------------------------- + +* The :module:`CPackRPM` module learned to generate main component package + which forces generation of a rpm for defined component without component + suffix in filename and package name. + See :variable:`CPACK_RPM_MAIN_COMPONENT` variable. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 15b62c7..2c8c0e0 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -95,6 +95,17 @@ # and it is up to the packager to set the variables in a manner that will # prevent such errors. # +# .. variable:: CPACK_RPM_MAIN_COMPONENT +# +# Main component that is packaged without component suffix. +# +# * Mandatory : NO +# * Default : - +# +# This variable can be set to any component or group name so that component or +# group rpm package is generated without component suffix in filename and +# package name. +# # .. variable:: CPACK_RPM_PACKAGE_VERSION # # The RPM package version. @@ -1649,10 +1660,16 @@ function(cpack_rpm_generate_package) endif() if(CPACK_RPM_PACKAGE_COMPONENT) - string(APPEND CPACK_RPM_PACKAGE_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}") - cpack_rpm_variable_fallback("CPACK_RPM_PACKAGE_NAME" - "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_NAME" - "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_PACKAGE_NAME") + string(TOUPPER "${CPACK_RPM_MAIN_COMPONENT}" + CPACK_RPM_MAIN_COMPONENT_UPPER) + + if(NOT CPACK_RPM_MAIN_COMPONENT_UPPER STREQUAL CPACK_RPM_PACKAGE_COMPONENT_UPPER) + string(APPEND CPACK_RPM_PACKAGE_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}") + + cpack_rpm_variable_fallback("CPACK_RPM_PACKAGE_NAME" + "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_NAME" + "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_PACKAGE_NAME") + endif() endif() # CPACK_RPM_PACKAGE_VERSION (mandatory) @@ -2164,7 +2181,15 @@ ${TMP_DEBUGINFO_ADDITIONAL_SOURCES} cmake_policy(POP) else() # old file name format for back compatibility - set(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}") + string(TOUPPER "${CPACK_RPM_MAIN_COMPONENT}" + CPACK_RPM_MAIN_COMPONENT_UPPER) + + if(CPACK_RPM_MAIN_COMPONENT_UPPER STREQUAL CPACK_RPM_PACKAGE_COMPONENT_UPPER) + # this is the main component so ignore the component filename part + set(CPACK_RPM_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.rpm") + else() + set(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}") + endif() endif() # else example: #set(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${CPACK_RPM_PACKAGE_ARCHITECTURE}.rpm") diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index bd55206..7f89d5e 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -105,38 +105,141 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) packageFileNames.clear(); std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY")); - // The default behavior is to have one package by component group - // unless CPACK_COMPONENTS_IGNORE_GROUP is specified. - if (!ignoreGroup) { - std::map::iterator compGIt; - for (compGIt = this->ComponentGroups.begin(); - compGIt != this->ComponentGroups.end(); ++compGIt) { - cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: " - << compGIt->first << std::endl); - retval &= PackageOnePack(initialTopLevel, compGIt->first); + const char* mainComponent = this->GetOption("CPACK_RPM_MAIN_COMPONENT"); + + if (mainComponent) { + std::string mainComponentUpper(mainComponent); + std::transform(mainComponentUpper.begin(), mainComponentUpper.end(), + mainComponentUpper.begin(), ::toupper); + + // The default behavior is to have one package by component group + // unless CPACK_COMPONENTS_IGNORE_GROUP is specified. + if (!ignoreGroup) { + std::map::iterator mainCompGIt = + this->ComponentGroups.end(); + + std::map::iterator compGIt; + for (compGIt = this->ComponentGroups.begin(); + compGIt != this->ComponentGroups.end(); ++compGIt) { + std::string component(compGIt->first); + std::transform(component.begin(), component.end(), component.begin(), + ::toupper); + + if (mainComponentUpper == component) { + // main component will be handled last + mainCompGIt = compGIt; + continue; + } + + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: " + << compGIt->first << std::endl); + retval &= PackageOnePack(initialTopLevel, compGIt->first); + } + // Handle Orphan components (components not belonging to any groups) + std::map::iterator mainCompIt = + this->Components.end(); + std::map::iterator compIt; + for (compIt = this->Components.begin(); compIt != this->Components.end(); + ++compIt) { + // Does the component belong to a group? + if (compIt->second.Group == CM_NULLPTR) { + std::string component(compIt->first); + std::transform(component.begin(), component.end(), component.begin(), + ::toupper); + + if (mainComponentUpper == component) { + // main component will be handled last + mainCompIt = compIt; + continue; + } + + cmCPackLogger( + cmCPackLog::LOG_VERBOSE, "Component <" + << compIt->second.Name + << "> does not belong to any group, package it separately." + << std::endl); + retval &= PackageOnePack(initialTopLevel, compIt->first); + } + } + + if (retval) { + if (mainCompGIt != this->ComponentGroups.end()) { + retval &= PackageOnePack(initialTopLevel, mainCompGIt->first); + } else if (mainCompIt != this->Components.end()) { + retval &= PackageOnePack(initialTopLevel, mainCompIt->first); + } else { + cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT set" + << " to non existing component.\n"); + retval = 0; + } + } } - // Handle Orphan components (components not belonging to any groups) - std::map::iterator compIt; - for (compIt = this->Components.begin(); compIt != this->Components.end(); - ++compIt) { - // Does the component belong to a group? - if (compIt->second.Group == CM_NULLPTR) { - cmCPackLogger( - cmCPackLog::LOG_VERBOSE, "Component <" - << compIt->second.Name - << "> does not belong to any group, package it separately." - << std::endl); + // CPACK_COMPONENTS_IGNORE_GROUPS is set + // We build 1 package per component + else { + std::map::iterator mainCompIt = + this->Components.end(); + + std::map::iterator compIt; + for (compIt = this->Components.begin(); compIt != this->Components.end(); + ++compIt) { + std::string component(compIt->first); + std::transform(component.begin(), component.end(), component.begin(), + ::toupper); + + if (mainComponentUpper == component) { + // main component will be handled last + mainCompIt = compIt; + continue; + } + retval &= PackageOnePack(initialTopLevel, compIt->first); } + + if (retval) { + if (mainCompIt != this->Components.end()) { + retval &= PackageOnePack(initialTopLevel, mainCompIt->first); + } else { + cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT set" + << " to non existing component.\n"); + retval = 0; + } + } } - } - // CPACK_COMPONENTS_IGNORE_GROUPS is set - // We build 1 package per component - else { - std::map::iterator compIt; - for (compIt = this->Components.begin(); compIt != this->Components.end(); - ++compIt) { - retval &= PackageOnePack(initialTopLevel, compIt->first); + } else { + // The default behavior is to have one package by component group + // unless CPACK_COMPONENTS_IGNORE_GROUP is specified. + if (!ignoreGroup) { + std::map::iterator compGIt; + for (compGIt = this->ComponentGroups.begin(); + compGIt != this->ComponentGroups.end(); ++compGIt) { + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: " + << compGIt->first << std::endl); + retval &= PackageOnePack(initialTopLevel, compGIt->first); + } + // Handle Orphan components (components not belonging to any groups) + std::map::iterator compIt; + for (compIt = this->Components.begin(); compIt != this->Components.end(); + ++compIt) { + // Does the component belong to a group? + if (compIt->second.Group == CM_NULLPTR) { + cmCPackLogger( + cmCPackLog::LOG_VERBOSE, "Component <" + << compIt->second.Name + << "> does not belong to any group, package it separately." + << std::endl); + retval &= PackageOnePack(initialTopLevel, compIt->first); + } + } + } + // CPACK_COMPONENTS_IGNORE_GROUPS is set + // We build 1 package per component + else { + std::map::iterator compIt; + for (compIt = this->Components.begin(); compIt != this->Components.end(); + ++compIt) { + retval &= PackageOnePack(initialTopLevel, compIt->first); + } } } diff --git a/Tests/RunCMake/CPack/MAIN_COMPONENT.cmake b/Tests/RunCMake/CPack/MAIN_COMPONENT.cmake new file mode 100644 index 0000000..99c6cae --- /dev/null +++ b/Tests/RunCMake/CPack/MAIN_COMPONENT.cmake @@ -0,0 +1,14 @@ +set(CPACK_RPM_COMPONENT_INSTALL "ON") + +install(FILES CMakeLists.txt DESTINATION foo COMPONENT applications) +install(FILES CMakeLists.txt DESTINATION bar COMPONENT headers) +install(FILES CMakeLists.txt DESTINATION bas COMPONENT libs) + +if(RunCMake_SUBTEST_SUFFIX STREQUAL "invalid") + set(CPACK_RPM_MAIN_COMPONENT "") +else() + set(CPACK_RPM_MAIN_COMPONENT "applications") + set(CPACK_RPM_APPLICATIONS_FILE_NAME "RPM-DEFAULT") +endif() + +set(CPACK_PACKAGE_NAME "main_component") diff --git a/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake new file mode 100644 index 0000000..69603dd --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake @@ -0,0 +1,13 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "0") + +if(NOT RunCMake_SUBTEST_SUFFIX STREQUAL "invalid") + set(EXPECTED_FILES_COUNT "3") + set(EXPECTED_FILE_1 "main_component-0.1.1-1.*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") + set(EXPECTED_FILE_2 "main_component*-headers.rpm") + set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") + set(EXPECTED_FILE_3 "main_component*-libs.rpm") + set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/CMakeLists.txt$") +endif() diff --git a/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-found-stderr.txt b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-found-stderr.txt new file mode 100644 index 0000000..dff163d --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-found-stderr.txt @@ -0,0 +1,3 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/MAIN_COMPONENT-build-found-subtest/_CPack_Packages/.*/RPM/SPECS/main_component-headers.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/MAIN_COMPONENT-build-found-subtest/_CPack_Packages/.*/RPM/SPECS/main_component-libs.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/MAIN_COMPONENT-build-found-subtest/_CPack_Packages/.*/RPM/SPECS/main_component.spec$ diff --git a/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-invalid-stderr.txt b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-invalid-stderr.txt new file mode 100644 index 0000000..4d8ac6e --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-invalid-stderr.txt @@ -0,0 +1 @@ +CPACK_RPM_MAIN_COMPONENT set to non existing component. diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 60d42ac..45dbcea 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -12,6 +12,7 @@ run_cpack_test(DEPENDENCIES "RPM;DEB" true) run_cpack_test(EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(COMPONENTS_EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(CUSTOM_NAMES "RPM;DEB" true) +run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM" false) run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false) run_cpack_test(RPM_DIST "RPM" false) run_cpack_test(INSTALL_SCRIPTS "RPM" false) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b39bd548f9f1f96a2285e5aff638085352c21f29 commit b39bd548f9f1f96a2285e5aff638085352c21f29 Author: Domen Vrankar AuthorDate: Thu Oct 6 08:04:58 2016 +0200 Commit: Domen Vrankar CommitDate: Thu Oct 6 08:42:43 2016 +0200 CPack/RPM debuginfo package without binaries Handle case when a component doesn't contain any debuginfo symbols. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 8f3f7ca..15b62c7 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -1477,16 +1477,22 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) endif() endforeach() - list(REMOVE_DUPLICATES mkdir_list_) - unset(TMP_RPM_DEBUGINFO_INSTALL) - foreach(part_ IN LISTS mkdir_list_) - string(APPEND TMP_RPM_DEBUGINFO_INSTALL "mkdir -p \"${part_}\"\n") - endforeach() + list(LENGTH mkdir_list_ len_) + if(len_) + list(REMOVE_DUPLICATES mkdir_list_) + unset(TMP_RPM_DEBUGINFO_INSTALL) + foreach(part_ IN LISTS mkdir_list_) + string(APPEND TMP_RPM_DEBUGINFO_INSTALL "mkdir -p \"${part_}\"\n") + endforeach() + endif() - list(REMOVE_DUPLICATES cp_list_) - foreach(part_ IN LISTS cp_list_) - string(APPEND TMP_RPM_DEBUGINFO_INSTALL "${part_}\n") - endforeach() + list(LENGTH cp_list_ len_) + if(len_) + list(REMOVE_DUPLICATES cp_list_) + foreach(part_ IN LISTS cp_list_) + string(APPEND TMP_RPM_DEBUGINFO_INSTALL "${part_}\n") + endforeach() + endif() if(NOT DEFINED CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS) set(CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS /usr /usr/src /usr/src/debug) @@ -1501,29 +1507,34 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) message("CPackRPM:Debug: CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS= ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS}") endif() - list(REMOVE_DUPLICATES additional_sources_) - unset(additional_sources_all_) - foreach(source_ IN LISTS additional_sources_) - string(REPLACE "/" ";" split_source_ " ${source_}") - list(REMOVE_AT split_source_ 0) - unset(tmp_path_) - # Now generate all segments of the path - foreach(segment_ IN LISTS split_source_) - string(APPEND tmp_path_ "/${segment_}") - list(APPEND additional_sources_all_ "${tmp_path_}") + list(LENGTH additional_sources_ len_) + if(len_) + list(REMOVE_DUPLICATES additional_sources_) + unset(additional_sources_all_) + foreach(source_ IN LISTS additional_sources_) + string(REPLACE "/" ";" split_source_ " ${source_}") + list(REMOVE_AT split_source_ 0) + unset(tmp_path_) + # Now generate all segments of the path + foreach(segment_ IN LISTS split_source_) + string(APPEND tmp_path_ "/${segment_}") + list(APPEND additional_sources_all_ "${tmp_path_}") + endforeach() endforeach() - endforeach() - list(REMOVE_DUPLICATES additional_sources_all_) - list(REMOVE_ITEM additional_sources_all_ ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS}) + list(REMOVE_DUPLICATES additional_sources_all_) + list(REMOVE_ITEM additional_sources_all_ + ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS}) - unset(TMP_DEBUGINFO_ADDITIONAL_SOURCES) - foreach(source_ IN LISTS additional_sources_all_) - string(APPEND TMP_DEBUGINFO_ADDITIONAL_SOURCES "${source_}\n") - endforeach() + unset(TMP_DEBUGINFO_ADDITIONAL_SOURCES) + foreach(source_ IN LISTS additional_sources_all_) + string(APPEND TMP_DEBUGINFO_ADDITIONAL_SOURCES "${source_}\n") + endforeach() + endif() set(TMP_RPM_DEBUGINFO_INSTALL "${TMP_RPM_DEBUGINFO_INSTALL}" PARENT_SCOPE) - set(TMP_DEBUGINFO_ADDITIONAL_SOURCES "${TMP_DEBUGINFO_ADDITIONAL_SOURCES}" PARENT_SCOPE) + set(TMP_DEBUGINFO_ADDITIONAL_SOURCES "${TMP_DEBUGINFO_ADDITIONAL_SOURCES}" + PARENT_SCOPE) endfunction() function(cpack_rpm_variable_fallback OUTPUT_VAR_NAME) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf7d0168bfdfbe1b91bae83dd0091af54e7c4e8a commit bf7d0168bfdfbe1b91bae83dd0091af54e7c4e8a Author: Domen Vrankar AuthorDate: Wed Oct 5 22:31:41 2016 +0200 Commit: Domen Vrankar CommitDate: Thu Oct 6 08:42:43 2016 +0200 CPack/RPM debuginfo package objdump error suppression objdump prints out error text if file is not an executable and that should be suppressed as we don't care about non executable files during that test diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 3bbaae9..8f3f7ca 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -1427,7 +1427,8 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) execute_process(COMMAND "${OBJDUMP_EXECUTABLE}" -h ${WORKING_DIR}/${F} WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}" RESULT_VARIABLE OBJDUMP_EXEC_RESULT - OUTPUT_VARIABLE OBJDUMP_OUT) + OUTPUT_VARIABLE OBJDUMP_OUT + ERROR_QUIET) # Check that if the given file was executable or not if(NOT OBJDUMP_EXEC_RESULT) string(FIND "${OBJDUMP_OUT}" "debug" FIND_RESULT) ----------------------------------------------------------------------- Summary of changes: Help/release/dev/cpack-rpm-single-debuginfo.rst | 11 + Modules/CPackRPM.cmake | 390 +++++++++++++++----- Source/CMakeVersion.cmake | 2 +- Source/CPack/cmCPackRPMGenerator.cxx | 245 ++++++++++-- Tests/RunCMake/CPack/MAIN_COMPONENT.cmake | 14 + .../CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake | 13 + .../CPack/RPM/MAIN_COMPONENT-found-stderr.txt | 3 + .../CPack/RPM/MAIN_COMPONENT-invalid-stderr.txt | 1 + .../CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake | 30 ++ .../RPM/SINGLE_DEBUGINFO-no_components-stderr.txt | 1 + .../RPM/SINGLE_DEBUGINFO-no_debuginfo-stderr.txt | 3 + .../SINGLE_DEBUGINFO-no_main_component-stderr.txt | 1 + .../RPM/SINGLE_DEBUGINFO-one_component-stderr.txt | 1 + .../SINGLE_DEBUGINFO-one_component_main-stderr.txt | 1 + ...DEBUGINFO-one_component_no_debuginfo-stderr.txt | 1 + .../CPack/RPM/SINGLE_DEBUGINFO-valid-stderr.txt | 3 + Tests/RunCMake/CPack/RunCMakeTest.cmake | 2 + Tests/RunCMake/CPack/SINGLE_DEBUGINFO.cmake | 56 +++ 18 files changed, 665 insertions(+), 113 deletions(-) create mode 100644 Help/release/dev/cpack-rpm-single-debuginfo.rst create mode 100644 Tests/RunCMake/CPack/MAIN_COMPONENT.cmake create mode 100644 Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-found-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-invalid-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_components-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_debuginfo-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_main_component-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_main-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_no_debuginfo-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-valid-stderr.txt create mode 100644 Tests/RunCMake/CPack/SINGLE_DEBUGINFO.cmake hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 10:08:01 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 10:08:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-19-gb12affd Message-ID: <20161006140801.C1187F5EF3@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 b12affd78578247678ca25e1b9711625c6c60268 (commit) via 5385817762e636ae27717891892786294749aee2 (commit) from 22605f1e230a187658c57df22b66e1b1ade09a4a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b12affd78578247678ca25e1b9711625c6c60268 commit b12affd78578247678ca25e1b9711625c6c60268 Merge: 22605f1 5385817 Author: Brad King AuthorDate: Thu Oct 6 10:07:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 10:07:58 2016 -0400 Merge topic 'no-define-cout-cerr' 53858177 Do not define cout/cerr preprocessor symbols ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackGenerator.h | 10 ---------- Source/CPack/cmCPackLog.cxx | 2 -- Source/CPack/cmCPackLog.h | 10 ---------- Source/CPack/cpack.cxx | 2 -- Source/CTest/cmCTestMemCheckHandler.cxx | 4 ---- Source/cmCTest.cxx | 7 ------- Source/ctest.cxx | 4 ---- 7 files changed, 39 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 10:08:06 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 10:08:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-21-g1aaace3 Message-ID: <20161006140806.CC5AFF5EF8@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 1aaace3e54e5da05b68f246899e125e4ba1ce29e (commit) via 646d01da9536d2db912a80f7d45ba289d8c89295 (commit) from b12affd78578247678ca25e1b9711625c6c60268 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1aaace3e54e5da05b68f246899e125e4ba1ce29e commit 1aaace3e54e5da05b68f246899e125e4ba1ce29e Merge: b12affd 646d01d Author: Brad King AuthorDate: Thu Oct 6 10:08:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 10:08:04 2016 -0400 Merge topic 'fix-VS-resources-pri-path' 646d01da VS: Use absolute target-specific directory for `resources.pri` ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 10:08:10 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 10:08:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-23-g45e13c8 Message-ID: <20161006140810.312E3F5F04@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 45e13c8be8266789d2dfbf002f5282d86465d493 (commit) via 68277e16c474ca48e4aabd36603fd9ec4466fe28 (commit) from 1aaace3e54e5da05b68f246899e125e4ba1ce29e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=45e13c8be8266789d2dfbf002f5282d86465d493 commit 45e13c8be8266789d2dfbf002f5282d86465d493 Merge: 1aaace3 68277e1 Author: Brad King AuthorDate: Thu Oct 6 10:08:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 10:08:07 2016 -0400 Merge topic 'cmake-server-improve-shutdown' 68277e16 server-mode: Improve shutdown behavior ----------------------------------------------------------------------- Summary of changes: Source/cmFileMonitor.cxx | 8 +- Source/cmServerConnection.cxx | 162 ++++++++++++++++++++++++++++++----------- Source/cmServerConnection.h | 15 ++-- 3 files changed, 132 insertions(+), 53 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 10:08:15 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 10:08:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-25-g6e634e3 Message-ID: <20161006140818.E09DEF5EF3@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 6e634e387fd3a31e19fb6af48a1f09999a2ddd64 (commit) via e8893030e696113d778f484750b1afccbfd74d42 (commit) from 45e13c8be8266789d2dfbf002f5282d86465d493 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e634e387fd3a31e19fb6af48a1f09999a2ddd64 commit 6e634e387fd3a31e19fb6af48a1f09999a2ddd64 Merge: 45e13c8 e889303 Author: Brad King AuthorDate: Thu Oct 6 10:08:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 10:08:12 2016 -0400 Merge topic 'FindMatlab-fix-simulink-cache' e8893030 FindMatlab: remove SIMULINK path from cache when FindMatlab is reconfigured ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 10:08:23 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 10:08:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-28-gb2cf1cb Message-ID: <20161006140824.3230BF5F04@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 b2cf1cba07633a242d5d13f694609a505c6a6235 (commit) via f2b88600f374684e66cbe91697dfed09798ac5b8 (commit) via 2f16ab87aeb58525f723ce5f5dc84e1f7730a8b3 (commit) from 6e634e387fd3a31e19fb6af48a1f09999a2ddd64 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2cf1cba07633a242d5d13f694609a505c6a6235 commit b2cf1cba07633a242d5d13f694609a505c6a6235 Merge: 6e634e3 f2b8860 Author: Brad King AuthorDate: Thu Oct 6 10:08:20 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 10:08:20 2016 -0400 Merge topic 'FindMatlab-documentation' f2b88600 Help: Extend 3.7 release notes for FindMatlab 2f16ab87 FindMatlab: small documentation fixes ----------------------------------------------------------------------- Summary of changes: Help/release/3.7.rst | 9 ++++++++- Modules/FindMatlab.cmake | 15 +++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 10:10:34 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 10:10:34 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-101-gace79e4 Message-ID: <20161006141035.2BBF0AD88A@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 ace79e42fd521f9b6f35ae6e985441ef14b6d03b (commit) via b2cf1cba07633a242d5d13f694609a505c6a6235 (commit) via 6e634e387fd3a31e19fb6af48a1f09999a2ddd64 (commit) via 45e13c8be8266789d2dfbf002f5282d86465d493 (commit) via 1aaace3e54e5da05b68f246899e125e4ba1ce29e (commit) via b12affd78578247678ca25e1b9711625c6c60268 (commit) from a01b5490594eb98063d8354acdd52a03fb46232f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ace79e42fd521f9b6f35ae6e985441ef14b6d03b commit ace79e42fd521f9b6f35ae6e985441ef14b6d03b Merge: a01b549 b2cf1cb Author: Brad King AuthorDate: Thu Oct 6 10:10:06 2016 -0400 Commit: Brad King CommitDate: Thu Oct 6 10:10:06 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 10:14:58 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 10:14:58 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-104-ge5abe18 Message-ID: <20161006141508.D6A59E5D11@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 e5abe1865909ed63e14069fa418b01f20a6ca01e (commit) via f53b01ff0fdead346f3f63310d4a7359db269fb4 (commit) via ca50c89e416934a586ad6839b2aaba8e7257cc2e (commit) from ace79e42fd521f9b6f35ae6e985441ef14b6d03b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5abe1865909ed63e14069fa418b01f20a6ca01e commit e5abe1865909ed63e14069fa418b01f20a6ca01e Merge: ace79e4 f53b01f Author: Brad King AuthorDate: Thu Oct 6 10:14:56 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 10:14:56 2016 -0400 Merge topic 'cpack-rpm-debuginfo-fixes' into next f53b01ff CPack/RPM debuginfo package without binaries ca50c89e CPack/RPM debuginfo package objdump error suppression https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f53b01ff0fdead346f3f63310d4a7359db269fb4 commit f53b01ff0fdead346f3f63310d4a7359db269fb4 Author: Domen Vrankar AuthorDate: Thu Oct 6 08:04:58 2016 +0200 Commit: Brad King CommitDate: Thu Oct 6 10:14:16 2016 -0400 CPack/RPM debuginfo package without binaries Handle case when a component doesn't contain any debuginfo symbols. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 8f3f7ca..15b62c7 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -1477,16 +1477,22 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) endif() endforeach() - list(REMOVE_DUPLICATES mkdir_list_) - unset(TMP_RPM_DEBUGINFO_INSTALL) - foreach(part_ IN LISTS mkdir_list_) - string(APPEND TMP_RPM_DEBUGINFO_INSTALL "mkdir -p \"${part_}\"\n") - endforeach() + list(LENGTH mkdir_list_ len_) + if(len_) + list(REMOVE_DUPLICATES mkdir_list_) + unset(TMP_RPM_DEBUGINFO_INSTALL) + foreach(part_ IN LISTS mkdir_list_) + string(APPEND TMP_RPM_DEBUGINFO_INSTALL "mkdir -p \"${part_}\"\n") + endforeach() + endif() - list(REMOVE_DUPLICATES cp_list_) - foreach(part_ IN LISTS cp_list_) - string(APPEND TMP_RPM_DEBUGINFO_INSTALL "${part_}\n") - endforeach() + list(LENGTH cp_list_ len_) + if(len_) + list(REMOVE_DUPLICATES cp_list_) + foreach(part_ IN LISTS cp_list_) + string(APPEND TMP_RPM_DEBUGINFO_INSTALL "${part_}\n") + endforeach() + endif() if(NOT DEFINED CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS) set(CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS /usr /usr/src /usr/src/debug) @@ -1501,29 +1507,34 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) message("CPackRPM:Debug: CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS= ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS}") endif() - list(REMOVE_DUPLICATES additional_sources_) - unset(additional_sources_all_) - foreach(source_ IN LISTS additional_sources_) - string(REPLACE "/" ";" split_source_ " ${source_}") - list(REMOVE_AT split_source_ 0) - unset(tmp_path_) - # Now generate all segments of the path - foreach(segment_ IN LISTS split_source_) - string(APPEND tmp_path_ "/${segment_}") - list(APPEND additional_sources_all_ "${tmp_path_}") + list(LENGTH additional_sources_ len_) + if(len_) + list(REMOVE_DUPLICATES additional_sources_) + unset(additional_sources_all_) + foreach(source_ IN LISTS additional_sources_) + string(REPLACE "/" ";" split_source_ " ${source_}") + list(REMOVE_AT split_source_ 0) + unset(tmp_path_) + # Now generate all segments of the path + foreach(segment_ IN LISTS split_source_) + string(APPEND tmp_path_ "/${segment_}") + list(APPEND additional_sources_all_ "${tmp_path_}") + endforeach() endforeach() - endforeach() - list(REMOVE_DUPLICATES additional_sources_all_) - list(REMOVE_ITEM additional_sources_all_ ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS}) + list(REMOVE_DUPLICATES additional_sources_all_) + list(REMOVE_ITEM additional_sources_all_ + ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS}) - unset(TMP_DEBUGINFO_ADDITIONAL_SOURCES) - foreach(source_ IN LISTS additional_sources_all_) - string(APPEND TMP_DEBUGINFO_ADDITIONAL_SOURCES "${source_}\n") - endforeach() + unset(TMP_DEBUGINFO_ADDITIONAL_SOURCES) + foreach(source_ IN LISTS additional_sources_all_) + string(APPEND TMP_DEBUGINFO_ADDITIONAL_SOURCES "${source_}\n") + endforeach() + endif() set(TMP_RPM_DEBUGINFO_INSTALL "${TMP_RPM_DEBUGINFO_INSTALL}" PARENT_SCOPE) - set(TMP_DEBUGINFO_ADDITIONAL_SOURCES "${TMP_DEBUGINFO_ADDITIONAL_SOURCES}" PARENT_SCOPE) + set(TMP_DEBUGINFO_ADDITIONAL_SOURCES "${TMP_DEBUGINFO_ADDITIONAL_SOURCES}" + PARENT_SCOPE) endfunction() function(cpack_rpm_variable_fallback OUTPUT_VAR_NAME) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca50c89e416934a586ad6839b2aaba8e7257cc2e commit ca50c89e416934a586ad6839b2aaba8e7257cc2e Author: Domen Vrankar AuthorDate: Wed Oct 5 22:31:41 2016 +0200 Commit: Brad King CommitDate: Thu Oct 6 10:14:11 2016 -0400 CPack/RPM debuginfo package objdump error suppression objdump prints out error text if file is not an executable and that should be suppressed as we don't care about non executable files during that test diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 3bbaae9..8f3f7ca 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -1427,7 +1427,8 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) execute_process(COMMAND "${OBJDUMP_EXECUTABLE}" -h ${WORKING_DIR}/${F} WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}" RESULT_VARIABLE OBJDUMP_EXEC_RESULT - OUTPUT_VARIABLE OBJDUMP_OUT) + OUTPUT_VARIABLE OBJDUMP_OUT + ERROR_QUIET) # Check that if the given file was executable or not if(NOT OBJDUMP_EXEC_RESULT) string(FIND "${OBJDUMP_OUT}" "debug" FIND_RESULT) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 10:55:13 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 10:55:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-106-gf7f6ddb Message-ID: <20161006145514.4AA2AF5D8D@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 f7f6ddb5cbe58a594970b8700bef3ea2cabe8554 (commit) via fb2b59432d9764694fb51dd9e80b73d8c87442f9 (commit) from e5abe1865909ed63e14069fa418b01f20a6ca01e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f7f6ddb5cbe58a594970b8700bef3ea2cabe8554 commit f7f6ddb5cbe58a594970b8700bef3ea2cabe8554 Merge: e5abe18 fb2b594 Author: Brad King AuthorDate: Thu Oct 6 10:55:11 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 10:55:11 2016 -0400 Merge topic 'nmake-encoding' into next fb2b5943 fixup! codecvt: Add class for encoding conversion https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb2b59432d9764694fb51dd9e80b73d8c87442f9 commit fb2b59432d9764694fb51dd9e80b73d8c87442f9 Author: Brad King AuthorDate: Thu Oct 6 10:38:19 2016 -0400 Commit: Brad King CommitDate: Thu Oct 6 10:45:11 2016 -0400 fixup! codecvt: Add class for encoding conversion diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx index 088f559..869dd32 100644 --- a/Source/cm_codecvt.cxx +++ b/Source/cm_codecvt.cxx @@ -10,8 +10,10 @@ #endif codecvt::codecvt(Encoding e) - : m_codepage(0) - , m_lastState(0) + : m_lastState(0) +#if defined(_WIN32) + , m_codepage(0) +#endif { switch (e) { case codecvt::ANSI: @@ -21,8 +23,7 @@ codecvt::codecvt(Encoding e) break; #endif // We don't know which ANSI encoding to use for other platforms than - // Windows - // so we don't do any conversion there + // Windows so we don't do any conversion there case codecvt::UTF8: // Assume internal encoding is UTF-8 case codecvt::None: @@ -47,7 +48,7 @@ std::codecvt_base::result codecvt::do_out(mbstate_t& state, const char* from, if (m_noconv) { return noconv; } - std::codecvt_base::result result = error; + std::codecvt_base::result res = error; #if defined(_WIN32) from_next = from; to_next = to; @@ -106,10 +107,10 @@ std::codecvt_base::result codecvt::do_out(mbstate_t& state, const char* from, if (r > 0) { from_next = from_end; to_next = to + r; - result = ok; + res = ok; } } else { - result = partial; + res = partial; from_next = from_end; to_next = to; } @@ -122,16 +123,16 @@ std::codecvt_base::result codecvt::do_out(mbstate_t& state, const char* from, static_cast(to); static_cast(to_end); static_cast(to_next); - result = codecvt::noconv; + res = codecvt::noconv; #endif - return result; + return res; }; std::codecvt_base::result codecvt::do_unshift(mbstate_t& state, char* to, char* to_end, char*& to_next) const { - std::codecvt_base::result result = error; + std::codecvt_base::result res = error; to_next = to; #if defined(_WIN32) unsigned int& stateId = reinterpret_cast(state); @@ -149,17 +150,17 @@ std::codecvt_base::result codecvt::do_unshift(mbstate_t& state, char* to, NULL, NULL); if (r > 0) { to_next = to + r; - result = ok; + res = ok; } } else { - result = ok; + res = ok; } #else static_cast(state); static_cast(to_end); - result = ok; + res = ok; #endif - return result; + return res; }; int codecvt::do_max_length() const throw() @@ -174,7 +175,7 @@ int codecvt::do_encoding() const throw() unsigned int codecvt::findStateId() const { - unsigned int id = 0; + unsigned int stateId = 0; bool add = false; const unsigned int maxSize = std::numeric_limits::max(); if (m_lastState >= maxSize) { @@ -189,7 +190,7 @@ unsigned int codecvt::findStateId() const i++; if (!s.used) { m_lastState = i; - id = m_lastState; + stateId = m_lastState; s.used = true; s.totalBytes = 0; s.bytesLeft = 0; @@ -205,10 +206,10 @@ unsigned int codecvt::findStateId() const } }; if (add) { - codecvt::State s = { true, 0, 0, 0, 0, 0, 0 }; + codecvt::State s = { true, 0, 0, { 0, 0, 0, 0 } }; m_states.push_back(s); m_lastState = (unsigned int)m_states.size(); - id = m_lastState; + stateId = m_lastState; } - return id; + return stateId; }; diff --git a/Source/cm_codecvt.hxx b/Source/cm_codecvt.hxx index 6bd0a78..5f16bd8 100644 --- a/Source/cm_codecvt.hxx +++ b/Source/cm_codecvt.hxx @@ -3,6 +3,8 @@ #ifndef cm_codecvt_hxx #define cm_codecvt_hxx +#include // IWYU pragma: keep + #include #include @@ -21,15 +23,15 @@ public: codecvt(Encoding e); protected: - virtual ~codecvt(); - virtual bool do_always_noconv() const throw(); - virtual result do_out(mbstate_t& state, const char* from, - const char* from_end, const char*& from_next, char* to, - char* to_end, char*& to_next) const; - virtual result do_unshift(mbstate_t& state, char* to, char*, - char*& to_next) const; - virtual int do_max_length() const throw(); - virtual int do_encoding() const throw(); + ~codecvt() CM_OVERRIDE; + bool do_always_noconv() const throw() CM_OVERRIDE; + result do_out(mbstate_t& state, const char* from, const char* from_end, + const char*& from_next, char* to, char* to_end, + char*& to_next) const CM_OVERRIDE; + result do_unshift(mbstate_t& state, char* to, char*, + char*& to_next) const CM_OVERRIDE; + int do_max_length() const throw() CM_OVERRIDE; + int do_encoding() const throw() CM_OVERRIDE; private: typedef struct @@ -43,9 +45,11 @@ private: unsigned int findStateId() const; bool m_noconv; - unsigned int m_codepage; mutable std::vector m_states; mutable unsigned int m_lastState; +#if defined(_WIN32) + unsigned int m_codepage; +#endif #endif }; ----------------------------------------------------------------------- Summary of changes: Source/cm_codecvt.cxx | 39 ++++++++++++++++++++------------------- Source/cm_codecvt.hxx | 24 ++++++++++++++---------- 2 files changed, 34 insertions(+), 29 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 10:57:38 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 10:57:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-110-g6a0843d Message-ID: <20161006145739.D5866F5DF3@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 6a0843d3b684ff3dd57f9e29aaf9947dcc81c253 (commit) via c666f8cbc6cb81b0729e116890c70096fd2101ac (commit) via f00214aa4f8036951a926efd7dc3891d47abce49 (commit) via bb1d3370cedceec48c82a523cf35df2207c7db17 (commit) from f7f6ddb5cbe58a594970b8700bef3ea2cabe8554 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a0843d3b684ff3dd57f9e29aaf9947dcc81c253 commit 6a0843d3b684ff3dd57f9e29aaf9947dcc81c253 Merge: f7f6ddb c666f8c Author: Brad King AuthorDate: Thu Oct 6 10:57:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 10:57:37 2016 -0400 Merge topic 'nmake-encoding' into next c666f8cb NMake: Use ANSI encoding for NMake Makefiles f00214aa cmGeneratedFileStream: Add optional encoding support bb1d3370 codecvt: Add class for encoding conversion https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c666f8cbc6cb81b0729e116890c70096fd2101ac commit c666f8cbc6cb81b0729e116890c70096fd2101ac Author: D?vis Mos?ns AuthorDate: Wed Oct 5 16:46:20 2016 +0300 Commit: Brad King CommitDate: Thu Oct 6 10:56:00 2016 -0400 NMake: Use ANSI encoding for NMake Makefiles Set ANSI encoding to cmGeneratedFileStream for use with NMake Makefile generator. diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 4120b52..355bc56 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -10,6 +10,7 @@ #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" +#include "cm_codecvt.hxx" #include #include @@ -60,6 +61,12 @@ public: return this->GetName() == name; } + /** Get encoding used by generator for makefile files */ + virtual codecvt::Encoding GetMakefileEncoding() const + { + return codecvt::None; + } + /** Tell the generator about the target system. */ virtual bool SetSystemName(std::string const&, cmMakefile*) { return true; } diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h index f169e76..6eb2124 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.h +++ b/Source/cmGlobalNMakeMakefileGenerator.h @@ -26,6 +26,12 @@ public: } static std::string GetActualName() { return "NMake Makefiles"; } + /** Get encoding used by generator for makefile files */ + codecvt::Encoding GetMakefileEncoding() const CM_OVERRIDE + { + return codecvt::ANSI; + } + /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 4a5cc77..92d2b83 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -201,7 +201,8 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2() this->GetCMakeInstance()->GetHomeOutputDirectory(); makefileName += cmake::GetCMakeFilesDirectory(); makefileName += "/Makefile2"; - cmGeneratedFileStream makefileStream(makefileName.c_str()); + cmGeneratedFileStream makefileStream(makefileName.c_str(), false, + this->GetMakefileEncoding()); if (!makefileStream) { return; } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 8825b46..823ddbf 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -230,7 +230,9 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile() // Open the rule file. This should be copy-if-different because the // rules may depend on this file itself. std::string ruleFileNameFull = this->ConvertToFullPath(ruleFileName); - cmGeneratedFileStream ruleFileStream(ruleFileNameFull.c_str()); + cmGeneratedFileStream ruleFileStream( + ruleFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); if (!ruleFileStream) { return; } @@ -1415,7 +1417,9 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies( // because the make tool may try to reload it needlessly otherwise. std::string ruleFileNameFull = dir; ruleFileNameFull += "/depend.make"; - cmGeneratedFileStream ruleFileStream(ruleFileNameFull.c_str()); + cmGeneratedFileStream ruleFileStream( + ruleFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); ruleFileStream.SetCopyIfDifferent(true); if (!ruleFileStream) { return false; @@ -1427,7 +1431,8 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies( std::string internalRuleFileNameFull = dir; internalRuleFileNameFull += "/depend.internal"; cmGeneratedFileStream internalRuleFileStream( - internalRuleFileNameFull.c_str()); + internalRuleFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); if (!internalRuleFileStream) { return false; } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e70f09e..0d91efd 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -110,7 +110,8 @@ void cmMakefileTargetGenerator::CreateRuleFile() // Open the rule file. This should be copy-if-different because the // rules may depend on this file itself. this->BuildFileStream = - new cmGeneratedFileStream(this->BuildFileNameFull.c_str()); + new cmGeneratedFileStream(this->BuildFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); this->BuildFileStream->SetCopyIfDifferent(true); if (!this->BuildFileStream) { return; @@ -231,7 +232,9 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() // make sure the depend file exists if (!cmSystemTools::FileExists(dependFileNameFull.c_str())) { // Write an empty dependency file. - cmGeneratedFileStream depFileStream(dependFileNameFull.c_str()); + cmGeneratedFileStream depFileStream( + dependFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); depFileStream << "# Empty dependencies file for " << this->GeneratorTarget->GetName() << ".\n" << "# This may be replaced when dependencies are built." @@ -243,7 +246,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() this->FlagFileNameFull = this->TargetBuildDirectoryFull; this->FlagFileNameFull += "/flags.make"; this->FlagFileStream = - new cmGeneratedFileStream(this->FlagFileNameFull.c_str()); + new cmGeneratedFileStream(this->FlagFileNameFull.c_str(), false, + this->GlobalGenerator->GetMakefileEncoding()); this->FlagFileStream->SetCopyIfDifferent(true); if (!this->FlagFileStream) { return; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f00214aa4f8036951a926efd7dc3891d47abce49 commit f00214aa4f8036951a926efd7dc3891d47abce49 Author: D?vis Mos?ns AuthorDate: Wed Oct 5 16:43:21 2016 +0300 Commit: Brad King CommitDate: Thu Oct 6 10:56:00 2016 -0400 cmGeneratedFileStream: Add optional encoding support This allows to save file stream in different encoding than internal encoding. diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 02717a4..6cdb7f5 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -10,13 +10,21 @@ #include #endif -cmGeneratedFileStream::cmGeneratedFileStream() +cmGeneratedFileStream::cmGeneratedFileStream(Encoding encoding) : cmGeneratedFileStreamBase() , Stream() { +#ifdef CMAKE_BUILD_WITH_CMAKE + if (encoding != codecvt::None) { + imbue(std::locale(getloc(), new codecvt(encoding))); + } +#else + static_cast(encoding); +#endif } -cmGeneratedFileStream::cmGeneratedFileStream(const char* name, bool quiet) +cmGeneratedFileStream::cmGeneratedFileStream(const char* name, bool quiet, + Encoding encoding) : cmGeneratedFileStreamBase(name) , Stream(TempName.c_str()) { @@ -26,6 +34,13 @@ cmGeneratedFileStream::cmGeneratedFileStream(const char* name, bool quiet) this->TempName.c_str()); cmSystemTools::ReportLastSystemError(""); } +#ifdef CMAKE_BUILD_WITH_CMAKE + if (encoding != codecvt::None) { + imbue(std::locale(getloc(), new codecvt(encoding))); + } +#else + static_cast(encoding); +#endif } cmGeneratedFileStream::~cmGeneratedFileStream() diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index 515954c..a027b01 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -5,6 +5,7 @@ #include +#include #include #include @@ -71,12 +72,13 @@ class cmGeneratedFileStream : private cmGeneratedFileStreamBase, { public: typedef cmsys::ofstream Stream; + typedef codecvt::Encoding Encoding; /** * This constructor prepares a default stream. The open method must * be used before writing to the stream. */ - cmGeneratedFileStream(); + cmGeneratedFileStream(Encoding encoding = codecvt::None); /** * This constructor takes the name of the file to be generated. It @@ -84,7 +86,8 @@ public: * file cannot be opened an error message is produced unless the * second argument is set to true. */ - cmGeneratedFileStream(const char* name, bool quiet = false); + cmGeneratedFileStream(const char* name, bool quiet = false, + Encoding encoding = codecvt::None); /** * The destructor checks the stream status to be sure the temporary https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb1d3370cedceec48c82a523cf35df2207c7db17 commit bb1d3370cedceec48c82a523cf35df2207c7db17 Author: D?vis Mos?ns AuthorDate: Wed Oct 5 15:56:52 2016 +0300 Commit: Brad King CommitDate: Thu Oct 6 10:55:59 2016 -0400 codecvt: Add class for encoding conversion Add a `codecvt` class that can be used as facet for locale so that it's possible to convert from internal UTF-8 encoding to other encodings such as Windows ANSI codepage. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index ec49481..e574957 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -384,6 +384,8 @@ set(SRCS cm_sha2.c cm_utf8.h cm_utf8.c + cm_codecvt.hxx + cm_codecvt.cxx ) set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.cxx\"\n") diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx new file mode 100644 index 0000000..869dd32 --- /dev/null +++ b/Source/cm_codecvt.cxx @@ -0,0 +1,215 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cm_codecvt.hxx" +#include + +#if defined(_WIN32) +#include +#undef max +#include +#endif + +codecvt::codecvt(Encoding e) + : m_lastState(0) +#if defined(_WIN32) + , m_codepage(0) +#endif +{ + switch (e) { + case codecvt::ANSI: +#if defined(_WIN32) + m_noconv = false; + m_codepage = CP_ACP; + break; +#endif + // We don't know which ANSI encoding to use for other platforms than + // Windows so we don't do any conversion there + case codecvt::UTF8: + // Assume internal encoding is UTF-8 + case codecvt::None: + // No encoding + default: + m_noconv = true; + } +} + +codecvt::~codecvt(){}; + +bool codecvt::do_always_noconv() const throw() +{ + return m_noconv; +}; + +std::codecvt_base::result codecvt::do_out(mbstate_t& state, const char* from, + const char* from_end, + const char*& from_next, char* to, + char* to_end, char*& to_next) const +{ + if (m_noconv) { + return noconv; + } + std::codecvt_base::result res = error; +#if defined(_WIN32) + from_next = from; + to_next = to; + bool convert = true; + size_t count = from_end - from; + const char* data = from; + unsigned int& stateId = reinterpret_cast(state); + if (count == 0) { + return codecvt::ok; + } else if (count == 1) { + if (stateId == 0) { + // decode first byte for UTF-8 + if ((*from & 0xF8) == 0xF0 || // 1111 0xxx; 4 bytes for codepoint + (*from & 0xF0) == 0xE0 || // 1110 xxxx; 3 bytes for codepoint + (*from & 0xE0) == 0xC0) // 110x xxxx; 2 bytes for codepoint + { + stateId = findStateId(); + codecvt::State& s = m_states.at(stateId - 1); + s.bytes[0] = *from; + convert = false; + if ((*from & 0xF8) == 0xF0) { + s.totalBytes = 4; + } else if ((*from & 0xF0) == 0xE0) { + s.totalBytes = 3; + } else if ((*from & 0xE0) == 0xC0) { + s.totalBytes = 2; + } + s.bytesLeft = s.totalBytes - 1; + }; + // else 1 byte for codepoint + } else { + codecvt::State& s = m_states.at(stateId - 1); + s.bytes[s.totalBytes - s.bytesLeft] = *from; + s.bytesLeft--; + data = s.bytes; + count = s.totalBytes - s.bytesLeft; + if ((*from & 0xC0) == 0x80) { // 10xx xxxx + convert = s.bytesLeft == 0; + } else { + // invalid multi-byte + convert = true; + } + if (convert) { + s.used = false; + if (stateId == m_lastState) { + m_lastState--; + } + stateId = 0; + } + } + if (convert) { + std::wstring wide = cmsys::Encoding::ToWide(std::string(data, count)); + int r = WideCharToMultiByte(m_codepage, 0, wide.c_str(), + static_cast(wide.size()), to, + to_end - to, NULL, NULL); + if (r > 0) { + from_next = from_end; + to_next = to + r; + res = ok; + } + } else { + res = partial; + from_next = from_end; + to_next = to; + } + } +#else + static_cast(state); + static_cast(from); + static_cast(from_end); + static_cast(from_next); + static_cast(to); + static_cast(to_end); + static_cast(to_next); + res = codecvt::noconv; +#endif + return res; +}; + +std::codecvt_base::result codecvt::do_unshift(mbstate_t& state, char* to, + char* to_end, + char*& to_next) const +{ + std::codecvt_base::result res = error; + to_next = to; +#if defined(_WIN32) + unsigned int& stateId = reinterpret_cast(state); + if (stateId > 0) { + codecvt::State& s = m_states.at(stateId - 1); + s.used = false; + if (stateId == m_lastState) { + m_lastState--; + } + stateId = 0; + std::wstring wide = cmsys::Encoding::ToWide( + std::string(s.bytes, s.totalBytes - s.bytesLeft)); + int r = WideCharToMultiByte(m_codepage, 0, wide.c_str(), + static_cast(wide.size()), to, to_end - to, + NULL, NULL); + if (r > 0) { + to_next = to + r; + res = ok; + } + } else { + res = ok; + } +#else + static_cast(state); + static_cast(to_end); + res = ok; +#endif + return res; +}; + +int codecvt::do_max_length() const throw() +{ + return 4; +}; + +int codecvt::do_encoding() const throw() +{ + return 0; +}; + +unsigned int codecvt::findStateId() const +{ + unsigned int stateId = 0; + bool add = false; + const unsigned int maxSize = std::numeric_limits::max(); + if (m_lastState >= maxSize) { + m_lastState = 0; + } + if (m_states.size() <= m_lastState) { + add = true; + } else { + unsigned int i = m_lastState; + while (i < maxSize) { + codecvt::State& s = m_states.at(i); + i++; + if (!s.used) { + m_lastState = i; + stateId = m_lastState; + s.used = true; + s.totalBytes = 0; + s.bytesLeft = 0; + break; + } + if (i >= m_states.size()) { + i = 0; + } + if (i == m_lastState) { + add = true; + break; + } + } + }; + if (add) { + codecvt::State s = { true, 0, 0, { 0, 0, 0, 0 } }; + m_states.push_back(s); + m_lastState = (unsigned int)m_states.size(); + stateId = m_lastState; + } + return stateId; +}; diff --git a/Source/cm_codecvt.hxx b/Source/cm_codecvt.hxx new file mode 100644 index 0000000..5f16bd8 --- /dev/null +++ b/Source/cm_codecvt.hxx @@ -0,0 +1,57 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cm_codecvt_hxx +#define cm_codecvt_hxx + +#include // IWYU pragma: keep + +#include +#include + +class codecvt : public std::codecvt +{ +public: + enum Encoding + { + None, + UTF8, + ANSI + }; + +#ifdef CMAKE_BUILD_WITH_CMAKE + + codecvt(Encoding e); + +protected: + ~codecvt() CM_OVERRIDE; + bool do_always_noconv() const throw() CM_OVERRIDE; + result do_out(mbstate_t& state, const char* from, const char* from_end, + const char*& from_next, char* to, char* to_end, + char*& to_next) const CM_OVERRIDE; + result do_unshift(mbstate_t& state, char* to, char*, + char*& to_next) const CM_OVERRIDE; + int do_max_length() const throw() CM_OVERRIDE; + int do_encoding() const throw() CM_OVERRIDE; + +private: + typedef struct + { + bool used; + unsigned char totalBytes; + unsigned char bytesLeft; + char bytes[4]; + } State; + + unsigned int findStateId() const; + + bool m_noconv; + mutable std::vector m_states; + mutable unsigned int m_lastState; +#if defined(_WIN32) + unsigned int m_codepage; +#endif + +#endif +}; + +#endif ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From steveire at gmail.com Thu Oct 6 12:42:08 2016 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 6 Oct 2016 12:42:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-113-gf38d2ed Message-ID: <20161006164208.DC2C4E175D@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 f38d2ed7d391c788baec7e215ee0c1b1d95982d1 (commit) via c8c24d8dd52fd3e79f6019f605161024d35082b8 (commit) via f59e87792943904dcb11e16380883e87395d115f (commit) from 6a0843d3b684ff3dd57f9e29aaf9947dcc81c253 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f38d2ed7d391c788baec7e215ee0c1b1d95982d1 commit f38d2ed7d391c788baec7e215ee0c1b1d95982d1 Merge: 6a0843d c8c24d8d Author: Stephen Kelly AuthorDate: Thu Oct 6 12:42:08 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 12:42:08 2016 -0400 Merge topic 'codelite-global-setting' into next c8c24d8d Codelite: Consume the CMAKE_CODELITE_USE_TARGETS setting globally f59e8779 cmGlobalGenerator: Add API to get settings from top-level cmMakefile https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8c24d8dd52fd3e79f6019f605161024d35082b8 commit c8c24d8dd52fd3e79f6019f605161024d35082b8 Author: Stephen Kelly AuthorDate: Thu Oct 6 18:35:02 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:41:07 2016 +0200 Codelite: Consume the CMAKE_CODELITE_USE_TARGETS setting globally diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 629c5b6..360c852 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -60,7 +60,6 @@ void cmExtraCodeLiteGenerator::Generate() // loop projects and locate the root project. // and extract the information for creating the worspace // root makefile - const cmMakefile* rmf = CM_NULLPTR; for (std::map >::const_iterator it = projectMap.begin(); it != projectMap.end(); ++it) { @@ -75,7 +74,6 @@ void cmExtraCodeLiteGenerator::Generate() workspaceFileName = workspaceOutputDir + "/"; workspaceFileName += workspaceProjectName + ".workspace"; this->WorkspacePath = it->second[0]->GetCurrentBinaryDirectory(); - rmf = it->second[0]->GetMakefile(); ; break; } @@ -89,7 +87,7 @@ void cmExtraCodeLiteGenerator::Generate() xml.Attribute("Name", workspaceProjectName); bool const targetsAreProjects = - rmf && rmf->IsOn("CMAKE_CODELITE_USE_TARGETS"); + this->GlobalGenerator->GlobalSettingIsOn("CMAKE_CODELITE_USE_TARGETS"); std::vector ProjectNames; if (targetsAreProjects) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f59e87792943904dcb11e16380883e87395d115f commit f59e87792943904dcb11e16380883e87395d115f Author: Stephen Kelly AuthorDate: Thu Oct 6 18:01:36 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:41:06 2016 +0200 cmGlobalGenerator: Add API to get settings from top-level cmMakefile At generate-time, definitions are sometimes read from a nearby cmMakefile, making the value directory-specific because they are read once per directory. Often however, the intention is more often to create a 'global' setting, such that the user writes for example: set(CMAKE_IMPORT_LIBRARY_SUFFIX something) once at the top level of their project. Many of these are also set by internal platform files, such as CMAKE_EXTRA_LINK_EXTENSIONS. The set() definitions are not really suitable for 'global' settings because they can be different for each directory, and code consuming the settings must assume they are different for each directory, and read it freshly each time with new allocations. CMake has other variable types which are global in scope, such as global properties, and cache variables. These are less convenient to populate for users, so establish a convention and API using the value as it is at the end of the top-level CMakeLists file. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index a446862..7132ade 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1007,6 +1007,25 @@ void cmGlobalGenerator::FillExtensionToLanguageMap(const std::string& l, } } +const char* cmGlobalGenerator::GetGlobalSetting(std::string const& name) const +{ + assert(!this->Makefiles.empty()); + return this->Makefiles[0]->GetDefinition(name); +} + +bool cmGlobalGenerator::GlobalSettingIsOn(std::string const& name) const +{ + assert(!this->Makefiles.empty()); + return this->Makefiles[0]->IsOn(name); +} + +const char* cmGlobalGenerator::GetSafeGlobalSetting( + std::string const& name) const +{ + assert(!this->Makefiles.empty()); + return this->Makefiles[0]->GetSafeDefinition(name); +} + bool cmGlobalGenerator::IgnoreFile(const char* ext) const { if (!this->GetLanguageFromExtension(ext).empty()) { diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 4120b52..add2b92 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -194,6 +194,10 @@ public: cmExportSetMap& GetExportSets() { return this->ExportSets; } + const char* GetGlobalSetting(std::string const& name) const; + bool GlobalSettingIsOn(std::string const& name) const; + const char* GetSafeGlobalSetting(std::string const& name) const; + /** Add a file to the manifest of generated targets for a configuration. */ void AddToManifest(std::string const& f); ----------------------------------------------------------------------- Summary of changes: Source/cmExtraCodeLiteGenerator.cxx | 4 +--- Source/cmGlobalGenerator.cxx | 19 +++++++++++++++++++ Source/cmGlobalGenerator.h | 4 ++++ 3 files changed, 24 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Thu Oct 6 12:43:33 2016 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 6 Oct 2016 12:43:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-115-geea5dba Message-ID: <20161006164333.1A4BEE5D23@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 eea5dbab2e1db3b265035346d52a2b2c6df53a5c (commit) via f5c9da0999ca2edfa337796a1e2da9726198c9bf (commit) from f38d2ed7d391c788baec7e215ee0c1b1d95982d1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eea5dbab2e1db3b265035346d52a2b2c6df53a5c commit eea5dbab2e1db3b265035346d52a2b2c6df53a5c Merge: f38d2ed f5c9da0 Author: Stephen Kelly AuthorDate: Thu Oct 6 12:43:32 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 12:43:32 2016 -0400 Merge topic 'codelite-global-setting' into next f5c9da09 fixup! Codelite: Consume the CMAKE_CODELITE_USE_TARGETS setting globally https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5c9da0999ca2edfa337796a1e2da9726198c9bf commit f5c9da0999ca2edfa337796a1e2da9726198c9bf Author: Stephen Kelly AuthorDate: Thu Oct 6 18:42:59 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:42:59 2016 +0200 fixup! Codelite: Consume the CMAKE_CODELITE_USE_TARGETS setting globally diff --git a/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst b/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst index 4aede03..96d678f 100644 --- a/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst +++ b/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst @@ -3,5 +3,5 @@ CMAKE_CODELITE_USE_TARGETS Change the way the CodeLite generator creates projectfiles. -If this variable is set to ``ON`` the generator creates projectfiles -based on targets rather than projects. +If this variable is set to ``ON`` in the top-level CMakeLists file, +the generator creates projectfiles based on targets rather than projects. ----------------------------------------------------------------------- Summary of changes: Help/variable/CMAKE_CODELITE_USE_TARGETS.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Thu Oct 6 12:45:44 2016 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 6 Oct 2016 12:45:44 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-131-g23d732f Message-ID: <20161006164544.DB375F1FF6@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 23d732fa83e7e0ae07aad810e1867238900a51f0 (commit) via 8f612e2aa4496e3ef88ee80c2ed33e7ba4d6ea64 (commit) via f6a0ca3e63547e728d2eea19803d24ed9825d467 (commit) via d27726cf694036fe22622ce93736a9d0f9896fd6 (commit) via 1a973ccfd069fb9300d2a6078cf8cf3f25c3b5a2 (commit) via 6334f0e256eb8c89660f41ac9eee68035b78902d (commit) via a2683d3cccd196764d24f9cd6eab4ab64f239819 (commit) via ac67d12cef8f91be025c9b5491d79419970c4684 (commit) via 859b341859ac13aa8e872101240fc8c47c766e23 (commit) via f9bde4d2941bf65df78d22dbb713f6f79a7133fa (commit) via 0e81268978550f0573845b7e626e47de85d67279 (commit) via 4dfbdc908600a3fc98de34b765ba255646b6e648 (commit) via 88be3514f5d7a1187880bb89481954b6da26ebb6 (commit) via 0fb47ff836af7fbd74998bfeb3067708b9f7db68 (commit) via 51bc6bddb91283da25d098492c9cc1b50e3008fc (commit) via 8e0c1599a1015cf80c4db35d108509986236b756 (commit) from eea5dbab2e1db3b265035346d52a2b2c6df53a5c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23d732fa83e7e0ae07aad810e1867238900a51f0 commit 23d732fa83e7e0ae07aad810e1867238900a51f0 Merge: eea5dba 8f612e2 Author: Stephen Kelly AuthorDate: Thu Oct 6 12:45:43 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 12:45:43 2016 -0400 Merge topic 'cleanup-Convert' into next 8f612e2a cmLocalGenerator: Simplify ConvertToLinkReference f6a0ca3e cmOutputConverter: Add a flag for IsUnix d27726cf Convert: Inline platform-specific methods 1a973ccf Makefiles: Introduce local RelativePath method 6334f0e2 Fortran: Inline conversion to relative path a2683d3c Fortran: Wrap path convert in a call with a more-suitable name ac67d12c Makefiles: Hardcode the relative location of the CMakeCache file 859b3418 Convert: Extract method to determine if paths are in directory f9bde4d2 Convert: Remove asserts which are duplicated in delegate method 0e812689 Convert: Remove early return check 4dfbdc90 Convert: Extract local variables for readability 88be3514 Convert: Extract local variables 0fb47ff8 cmOutputConverter: Remove Convert..ForExisting method (#16138) 51bc6bdd cmOutputConverter: remove unused code 8e0c1599 Xcode: Inline ConvertToRelativePath calls https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f612e2aa4496e3ef88ee80c2ed33e7ba4d6ea64 commit 8f612e2aa4496e3ef88ee80c2ed33e7ba4d6ea64 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 cmLocalGenerator: Simplify ConvertToLinkReference Make conversion to output format the caller responsibility, so that the method only 'converts to a link reference'. diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 6887a31..14ea1a9 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -75,8 +75,10 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags) // Append the flag and value. Use ConvertToLinkReference to help // vs6's "cl -link" pass it to the linker. std::string flag = defFileFlag; - flag += (this->LocalGenerator->ConvertToLinkReference( - this->ModuleDefinitionFile->GetFullPath())); + flag += this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToLinkReference( + this->ModuleDefinitionFile->GetFullPath()), + cmOutputConverter::SHELL); this->LocalGenerator->AppendFlags(flags, flag); } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 1f9e4cf..8fcfb32 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1375,8 +1375,7 @@ std::string cmLocalGenerator::GetTargetFortranFlags( return std::string(); } -std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, - OutputFormat format) +std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) { #if defined(_WIN32) && !defined(__CYGWIN__) // Work-ardound command line parsing limitations in MSVC 6.0 @@ -1393,17 +1392,14 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, // Append the rest of the path with no space. sp += lib.substr(pos); - // Convert to an output path. - return this->ConvertToOutputFormat(sp.c_str(), format); + return sp; } } } #endif // Normal behavior. - return this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib), - format); + return this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib); } /** @@ -1517,7 +1513,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, continue; } if (li->IsPath) { - linkLibs += this->ConvertToLinkReference(li->Value, shellFormat); + linkLibs += this->ConvertToOutputFormat( + this->ConvertToLinkReference(li->Value), shellFormat); } else { linkLibs += li->Value; } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 19469be..703a507 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -367,9 +367,7 @@ protected: std::string& CreateSafeUniqueObjectFileName(const std::string& sin, std::string const& dir_max); - virtual std::string ConvertToLinkReference( - std::string const& lib, - cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL); + virtual std::string ConvertToLinkReference(std::string const& lib); /** Check whether the native build system supports the given definition. Issues a warning. */ diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 11b87e3..5736581 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -121,10 +121,9 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() // Virtual protected methods. std::string cmLocalNinjaGenerator::ConvertToLinkReference( - std::string const& lib, cmOutputConverter::OutputFormat format) + std::string const& lib) { - std::string path = this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); - return this->ConvertToOutputFormat(path, format); + return this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); } std::string cmLocalNinjaGenerator::ConvertToIncludeReference( diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 875f8c6..3061b57 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -76,9 +76,7 @@ public: void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg, cmNinjaDeps& ninjaDeps); - std::string ConvertToLinkReference(std::string const& lib, - cmOutputConverter::OutputFormat format = - cmOutputConverter::SHELL) CM_OVERRIDE; + std::string ConvertToLinkReference(std::string const& lib) CM_OVERRIDE; void ComputeObjectFilenames( std::map& mapping, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f6a0ca3e63547e728d2eea19803d24ed9825d467 commit f6a0ca3e63547e728d2eea19803d24ed9825d467 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 cmOutputConverter: Add a flag for IsUnix Remove the need for method parameters to represent the distinction. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 0f2c60e..05e7d63 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -220,9 +220,11 @@ std::string cmOutputConverter::EscapeForShell(const std::string& str, if (this->GetState()->UseNMake()) { flags |= Shell_Flag_NMake; } + if (!this->GetState()->UseWindowsShell()) { + flags |= Shell_Flag_IsUnix; + } - return Shell__GetArgument(str.c_str(), !this->GetState()->UseWindowsShell(), - flags); + return Shell__GetArgument(str.c_str(), flags); } std::string cmOutputConverter::EscapeForCMake(const std::string& str) @@ -251,7 +253,7 @@ std::string cmOutputConverter::EscapeForCMake(const std::string& str) std::string cmOutputConverter::EscapeWindowsShellArgument(const char* arg, int shell_flags) { - return Shell__GetArgument(arg, 0, shell_flags); + return Shell__GetArgument(arg, shell_flags); } cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( @@ -337,10 +339,10 @@ int cmOutputConverter::Shell__CharNeedsQuotesOnWindows(char c) (c == '>') || (c == '|') || (c == '^')); } -int cmOutputConverter::Shell__CharNeedsQuotes(char c, int isUnix, int flags) +int cmOutputConverter::Shell__CharNeedsQuotes(char c, int flags) { /* On Windows the built-in command shell echo never needs quotes. */ - if (!isUnix && (flags & Shell_Flag_EchoWindows)) { + if (!(flags & Shell_Flag_IsUnix) && (flags & Shell_Flag_EchoWindows)) { return 0; } @@ -349,7 +351,7 @@ int cmOutputConverter::Shell__CharNeedsQuotes(char c, int isUnix, int flags) return 1; } - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { /* On UNIX several special characters need quotes to preserve them. */ if (Shell__CharNeedsQuotesOnUnix(c)) { return 1; @@ -407,8 +409,7 @@ flag later when we understand applications of this better. */ #define KWSYS_SYSTEM_SHELL_QUOTE_MAKE_VARIABLES 0 -int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int isUnix, - int flags) +int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int flags) { /* The empty string needs quotes. */ if (!*in) { @@ -440,14 +441,14 @@ int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int isUnix, } /* Check whether this character needs quotes. */ - if (Shell__CharNeedsQuotes(*c, isUnix, flags)) { + if (Shell__CharNeedsQuotes(*c, flags)) { return 1; } } } /* On Windows some single character arguments need quotes. */ - if (!isUnix && *in && !*(in + 1)) { + if (flags & Shell_Flag_IsUnix && *in && !*(in + 1)) { char c = *in; if ((c == '?') || (c == '&') || (c == '^') || (c == '|') || (c == '#')) { return 1; @@ -457,8 +458,7 @@ int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int isUnix, return 0; } -std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, - int flags) +std::string cmOutputConverter::Shell__GetArgument(const char* in, int flags) { std::ostringstream out; @@ -469,11 +469,11 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, int windows_backslashes = 0; /* Whether the argument must be quoted. */ - int needQuotes = Shell__ArgumentNeedsQuotes(in, isUnix, flags); + int needQuotes = Shell__ArgumentNeedsQuotes(in, flags); if (needQuotes) { /* Add the opening quote for this argument. */ if (flags & Shell_Flag_WatcomQuote) { - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { out << '"'; } out << '\''; @@ -505,7 +505,7 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, } /* Check whether this character needs escaping for the shell. */ - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { /* On Unix a few special characters need escaping even inside a quoted argument. */ if (*c == '\\' || *c == '"' || *c == '`' || *c == '$') { @@ -602,7 +602,7 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, /* Add the closing quote for this argument. */ if (flags & Shell_Flag_WatcomQuote) { out << '\''; - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { out << '"'; } } else { diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index c3c7e36..f8bdcea 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -62,7 +62,9 @@ public: Shell_Flag_AllowMakeVariables = (1 << 6), /** The target shell quoting uses extra single Quotes for Watcom tools. */ - Shell_Flag_WatcomQuote = (1 << 7) + Shell_Flag_WatcomQuote = (1 << 7), + + Shell_Flag_IsUnix = (1 << 8) }; std::string EscapeForShell(const std::string& str, bool makeVars = false, @@ -112,11 +114,11 @@ private: static int Shell__CharIsWhitespace(char c); static int Shell__CharNeedsQuotesOnUnix(char c); static int Shell__CharNeedsQuotesOnWindows(char c); - static int Shell__CharNeedsQuotes(char c, int isUnix, int flags); + static int Shell__CharNeedsQuotes(char c, int flags); static int Shell__CharIsMakeVariableName(char c); static const char* Shell__SkipMakeVariables(const char* c); - static int Shell__ArgumentNeedsQuotes(const char* in, int isUnix, int flags); - static std::string Shell__GetArgument(const char* in, int isUnix, int flags); + static int Shell__ArgumentNeedsQuotes(const char* in, int flags); + static std::string Shell__GetArgument(const char* in, int flags); private: cmState::Snapshot StateSnapshot; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d27726cf694036fe22622ce93736a9d0f9896fd6 commit d27726cf694036fe22622ce93736a9d0f9896fd6 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Convert: Inline platform-specific methods They don't provide real value. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index ec43c57..0f2c60e 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -221,9 +221,8 @@ std::string cmOutputConverter::EscapeForShell(const std::string& str, flags |= Shell_Flag_NMake; } - return this->GetState()->UseWindowsShell() - ? Shell_GetArgumentForWindows(str.c_str(), flags) - : Shell_GetArgumentForUnix(str.c_str(), flags); + return Shell__GetArgument(str.c_str(), !this->GetState()->UseWindowsShell(), + flags); } std::string cmOutputConverter::EscapeForCMake(const std::string& str) @@ -252,7 +251,7 @@ std::string cmOutputConverter::EscapeForCMake(const std::string& str) std::string cmOutputConverter::EscapeWindowsShellArgument(const char* arg, int shell_flags) { - return Shell_GetArgumentForWindows(arg, shell_flags); + return Shell__GetArgument(arg, 0, shell_flags); } cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( @@ -613,15 +612,3 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, return out.str(); } - -std::string cmOutputConverter::Shell_GetArgumentForWindows(const char* in, - int flags) -{ - return Shell__GetArgument(in, 0, flags); -} - -std::string cmOutputConverter::Shell_GetArgumentForUnix(const char* in, - int flags) -{ - return Shell__GetArgument(in, 1, flags); -} diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index aa0e379..c3c7e36 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -29,8 +29,7 @@ public: void SetLinkScriptShell(bool linkScriptShell); /** - * Flags to pass to Shell_GetArgumentForWindows or - * Shell_GetArgumentForUnix. These modify the generated + * Flags to pass to Shell_GetArgument. These modify the generated * quoting and escape sequences to work under alternative * environments. */ @@ -66,16 +65,6 @@ public: Shell_Flag_WatcomQuote = (1 << 7) }; - /** - * Transform the given command line argument for use in a Windows or - * Unix shell. Returns a pointer to the end of the command line - * argument in the provided output buffer. Flags may be passed to - * modify the generated quoting and escape sequences to work under - * alternative environments. - */ - static std::string Shell_GetArgumentForWindows(const char* in, int flags); - static std::string Shell_GetArgumentForUnix(const char* in, int flags); - std::string EscapeForShell(const std::string& str, bool makeVars = false, bool forEcho = false, bool useWatcomQuote = false) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a973ccfd069fb9300d2a6078cf8cf3f25c3b5a2 commit 1a973ccfd069fb9300d2a6078cf8cf3f25c3b5a2 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Makefiles: Introduce local RelativePath method This makes it easier to remove directory-specific state from cmOutputConverter where it doesn't belong. Of course, this just relocates the problem to the makefiles generator for now, but that's better than affecting the core. diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 07b40b7..401319e 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -141,7 +141,7 @@ void cmLocalUnixMakefileGenerator3::ComputeHomeRelativeOutputPath() { // Compute the path to use when referencing the current output // directory from the top output directory. - this->HomeRelativeOutputPath = this->ConvertToRelativePath( + this->HomeRelativeOutputPath = this->MaybeConvertToRelativePath( this->GetBinaryDirectory(), this->GetCurrentBinaryDirectory()); if (this->HomeRelativeOutputPath == ".") { this->HomeRelativeOutputPath = ""; @@ -548,7 +548,8 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule( // Construct the left hand side of the rule. std::string tgt = cmSystemTools::ConvertToOutputPath( - this->ConvertToRelativePath(this->GetBinaryDirectory(), target).c_str()); + this->MaybeConvertToRelativePath(this->GetBinaryDirectory(), target) + .c_str()); const char* space = ""; if (tgt.size() == 1) { @@ -577,7 +578,7 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule( dep != depends.end(); ++dep) { replace = *dep; replace = cmSystemTools::ConvertToOutputPath( - this->ConvertToRelativePath(binDir, replace).c_str()); + this->MaybeConvertToRelativePath(binDir, replace).c_str()); os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n"; } } @@ -969,7 +970,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( // working directory will be the start-output directory. bool had_slash = cmd.find('/') != cmd.npos; if (workingDir.empty()) { - cmd = this->ConvertToRelativePath(currentBinDir, cmd); + cmd = this->MaybeConvertToRelativePath(currentBinDir, cmd); } bool has_slash = cmd.find('/') != cmd.npos; if (had_slash && !has_slash) { @@ -994,8 +995,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( if (!outputs.empty()) { if (workingDir.empty()) { output = this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), - outputs[0]), + this->MaybeConvertToRelativePath( + this->GetCurrentBinaryDirectory(), outputs[0]), cmOutputConverter::SHELL); } else { @@ -1082,14 +1083,15 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand( fout << "file(REMOVE_RECURSE\n"; for (std::vector::const_iterator f = files.begin(); f != files.end(); ++f) { - std::string fc = this->ConvertToRelativePath(currentBinDir, *f); + std::string fc = this->MaybeConvertToRelativePath(currentBinDir, *f); fout << " " << cmOutputConverter::EscapeForCMake(fc) << "\n"; } fout << ")\n"; } std::string remove = "$(CMAKE_COMMAND) -P "; remove += this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), cleanfile), + this->MaybeConvertToRelativePath(this->GetCurrentBinaryDirectory(), + cleanfile), cmOutputConverter::SHELL); commands.push_back(remove); @@ -1858,7 +1860,8 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo( } for (std::vector::iterator i = includes.begin(); i != includes.end(); ++i) { - cmakefileStream << " \"" << this->ConvertToRelativePath(binaryDir, *i) + cmakefileStream << " \"" + << this->MaybeConvertToRelativePath(binaryDir, *i) << "\"\n"; } cmakefileStream << " )\n"; @@ -1923,7 +1926,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall( if (!tgt.empty()) { // The make target is always relative to the top of the build tree. std::string tgt2 = - this->ConvertToRelativePath(this->GetBinaryDirectory(), tgt); + this->MaybeConvertToRelativePath(this->GetBinaryDirectory(), tgt); // The target may have been written with windows paths. cmSystemTools::ConvertToOutputSlashes(tgt2); @@ -2096,3 +2099,13 @@ void cmLocalUnixMakefileGenerator3::CreateCDCommand( std::bind1st(std::plus(), prefix)); } } + +std::string cmLocalUnixMakefileGenerator3::MaybeConvertToRelativePath( + std::string const& base, std::string const& path) +{ + if (!cmOutputConverter::ContainedInDirectory( + base, path, this->GetStateSnapshot().GetDirectory())) { + return path; + } + return cmOutputConverter::ForceToRelativePath(base, path); +} diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index fc5c8e7..c3ecda4 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -184,6 +184,9 @@ public: // Eclipse generator. void GetIndividualFileTargets(std::vector& targets); + std::string MaybeConvertToRelativePath(std::string const& base, + std::string const& path); + protected: void WriteLocalMakefile(); diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index cb20117..ff97696 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -130,16 +130,16 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) targetFullPathPDB, cmOutputConverter::SHELL); // Convert to the output path to use in constructing commands. std::string targetOutPath = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath), cmOutputConverter::SHELL); std::string targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); std::string targetOutPathImport = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport), cmOutputConverter::SHELL); @@ -215,27 +215,27 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Construct a list of files associated with this executable that // may need to be cleaned. std::vector exeCleanFiles; - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath)); #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), (targetFullPath + ".manifest").c_str())); #endif if (targetNameReal != targetName) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal)); } if (!targetNameImport.empty()) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport)); std::string implib; if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib)) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), implib)); } } @@ -243,7 +243,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // List the PDB for cleaning only when the whole target is // cleaned. We do not want to delete the .pdb file just before // linking the target. - this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + this->CleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathPDB)); // Add the pre-build and pre-link rules building but not when relinking. @@ -318,7 +318,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); @@ -326,7 +326,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) ? cmOutputConverter::WATCOMQUOTE : cmOutputConverter::SHELL; std::string target = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), output); vars.Target = target.c_str(); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b969bfb..8e25f43 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -305,20 +305,20 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( targetFullPathPDB, cmOutputConverter::SHELL); std::string targetOutPath = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath), cmOutputConverter::SHELL); std::string targetOutPathSO = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathSO), cmOutputConverter::SHELL); std::string targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); std::string targetOutPathImport = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport), cmOutputConverter::SHELL); @@ -366,24 +366,24 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Clean files associated with this library. std::vector libCleanFiles; - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath)); if (targetNameReal != targetName) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal)); } if (targetNameSO != targetName && targetNameSO != targetNameReal) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathSO)); } if (!targetNameImport.empty()) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport)); std::string implib; if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib)) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), implib)); } } @@ -391,14 +391,14 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // List the PDB for cleaning only when the whole target is // cleaned. We do not want to delete the .pdb file just before // linking the target. - this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + this->CleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathPDB)); #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), (targetFullPath + ".manifest").c_str())); } @@ -537,7 +537,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); @@ -546,7 +546,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( ? cmOutputConverter::WATCOMQUOTE : cmOutputConverter::SHELL; std::string target = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), output); vars.Target = target.c_str(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e70f09e..a9b2f4e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -166,7 +166,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() for (std::vector::const_iterator o = outputs.begin(); o != outputs.end(); ++o) { this->CleanFiles.push_back( - this->LocalGenerator->ConvertToRelativePath(currentBinDir, *o)); + this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, *o)); } } } @@ -209,8 +209,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(), - dependFileNameFull) + ->MaybeConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), dependFileNameFull) .c_str()) << "\n\n"; @@ -221,7 +221,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath( + ->MaybeConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), this->ProgressFileNameFull) .c_str()) @@ -256,8 +256,9 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(), - this->FlagFileNameFull) + ->MaybeConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), + this->FlagFileNameFull) .c_str()) << "\n\n"; } @@ -314,9 +315,9 @@ void cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()( output += "/"; output += cmSystemTools::GetFilenameName(input); this->Generator->CleanFiles.push_back( - this->Generator->LocalGenerator->ConvertToRelativePath( + this->Generator->LocalGenerator->MaybeConvertToRelativePath( this->Generator->LocalGenerator->GetCurrentBinaryDirectory(), output)); - output = this->Generator->LocalGenerator->ConvertToRelativePath( + output = this->Generator->LocalGenerator->MaybeConvertToRelativePath( this->Generator->LocalGenerator->GetBinaryDirectory(), output); // Create a rule to copy the content into the bundle. @@ -518,13 +519,13 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); targetOutPathPDB = this->LocalGenerator->ConvertToOutputFormat( targetFullPathPDB, cmOutputConverter::SHELL); targetOutPathCompilePDB = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathCompilePDB), cmOutputConverter::SHELL); @@ -550,13 +551,13 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( vars.Object = shellObj.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); std::string objectFileDir = cmSystemTools::GetFilenamePath(obj); objectFileDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectFileDir), cmOutputConverter::SHELL); vars.ObjectFileDir = objectFileDir.c_str(); @@ -904,7 +905,7 @@ bool cmMakefileTargetGenerator::WriteMakeRule( // Touch the extra output so "make" knows that it was updated, // but only if the output was acually created. std::string const out = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath(binDir, *o), + this->LocalGenerator->MaybeConvertToRelativePath(binDir, *o), cmOutputConverter::SHELL); std::vector output_commands; @@ -1200,7 +1201,8 @@ void cmMakefileTargetGenerator::WriteObjectsVariable( for (std::vector::const_iterator i = this->ExternalObjects.begin(); i != this->ExternalObjects.end(); ++i) { - object = this->LocalGenerator->ConvertToRelativePath(currentBinDir, *i); + object = + this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, *i); *this->BuildFileStream << " " << lineContinue << "\n" << this->Makefile->GetSafeDefinition( "CMAKE_OBJECT_NAME"); @@ -1234,7 +1236,7 @@ public: { // Construct the name of the next object. this->NextObject = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), obj), cmOutputConverter::RESPONSE); @@ -1289,7 +1291,7 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule( this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget); std::string buildTargetRuleName = dir; buildTargetRuleName += relink ? "/preinstall" : "/build"; - buildTargetRuleName = this->LocalGenerator->ConvertToRelativePath( + buildTargetRuleName = this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), buildTargetRuleName); // Build the list of target outputs to drive. @@ -1479,7 +1481,7 @@ void cmMakefileTargetGenerator::CreateLinkScript( // Create the makefile command to invoke the link script. std::string link_command = "$(CMAKE_COMMAND) -E cmake_link_script "; link_command += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), linkScriptName), cmOutputConverter::SHELL); link_command += " --verbose=$(VERBOSE)"; @@ -1716,14 +1718,14 @@ void cmMakefileTargetGenerator::GenDefFile( cmd, cmOutputConverter::SHELL); cmd += " -E __create_def "; cmd += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), name_of_def_file), cmOutputConverter::SHELL); cmd += " "; std::string objlist_file = name_of_def_file; objlist_file += ".objs"; cmd += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objlist_file), cmOutputConverter::SHELL); real_link_commands.insert(real_link_commands.begin(), cmd); @@ -1744,7 +1746,7 @@ void cmMakefileTargetGenerator::GenDefFile( linkFlags += " "; linkFlags += this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); linkFlags += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), name_of_def_file), cmOutputConverter::SHELL); linkFlags += " "; diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index f40c8fa..ecb29cb 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -46,7 +46,7 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath( + ->MaybeConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), this->ProgressFileNameFull) .c_str()) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6334f0e256eb8c89660f41ac9eee68035b78902d commit 6334f0e256eb8c89660f41ac9eee68035b78902d Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Fortran: Inline conversion to relative path Don't use cmOutputConverter method which relies on directory-specific state. diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 4c0f688..aaa9d3a 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -707,5 +707,9 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, std::string cmDependsFortran::MaybeConvertToRelativePath( std::string const& base, std::string const& path) { - return this->LocalGenerator->ConvertToRelativePath(base, path); + if (!cmOutputConverter::ContainedInDirectory( + base, path, this->LocalGenerator->GetStateSnapshot().GetDirectory())) { + return path; + } + return cmOutputConverter::ForceToRelativePath(base, path); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2683d3cccd196764d24f9cd6eab4ab64f239819 commit a2683d3cccd196764d24f9cd6eab4ab64f239819 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Fortran: Wrap path convert in a call with a more-suitable name diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index c1c8880..4c0f688 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -198,16 +198,13 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, stamp += ".mod.stamp"; fcStream << "\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath(currentBinDir, - mod_lower) + << this->MaybeConvertToRelativePath(currentBinDir, mod_lower) << "\"\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath(currentBinDir, - mod_upper) + << this->MaybeConvertToRelativePath(currentBinDir, mod_upper) << "\"\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath(currentBinDir, - stamp) + << this->MaybeConvertToRelativePath(currentBinDir, stamp) << "\"\n"; } fcStream << " )\n"; @@ -323,17 +320,16 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, // Write the include dependencies to the output stream. std::string binDir = this->LocalGenerator->GetBinaryDirectory(); - std::string obj_i = this->LocalGenerator->ConvertToRelativePath(binDir, obj); + std::string obj_i = this->MaybeConvertToRelativePath(binDir, obj); std::string obj_m = cmSystemTools::ConvertToOutputPath(obj_i.c_str()); internalDepends << obj_i << std::endl; internalDepends << " " << src << std::endl; for (std::set::const_iterator i = info.Includes.begin(); i != info.Includes.end(); ++i) { - makeDepends - << obj_m << ": " - << cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, *i).c_str()) - << std::endl; + makeDepends << obj_m << ": " + << cmSystemTools::ConvertToOutputPath( + this->MaybeConvertToRelativePath(binDir, *i).c_str()) + << std::endl; internalDepends << " " << *i << std::endl; } makeDepends << std::endl; @@ -359,7 +355,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, proxy += *i; proxy += ".mod.proxy"; proxy = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, proxy).c_str()); + this->MaybeConvertToRelativePath(binDir, proxy).c_str()); // since we require some things add them to our list of requirements makeDepends << obj_m << ".requires: " << proxy << std::endl; @@ -375,8 +371,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, if (!required->second.empty()) { // This module is known. Depend on its timestamp file. std::string stampFile = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, required->second) - .c_str()); + this->MaybeConvertToRelativePath(binDir, required->second).c_str()); makeDepends << obj_m << ": " << stampFile << "\n"; } else { // This module is not known to CMake. Try to locate it where @@ -384,7 +379,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, std::string module; if (this->FindModule(*i, module)) { module = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, module).c_str()); + this->MaybeConvertToRelativePath(binDir, module).c_str()); makeDepends << obj_m << ": " << module << "\n"; } } @@ -398,7 +393,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, proxy += *i; proxy += ".mod.proxy"; proxy = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, proxy).c_str()); + this->MaybeConvertToRelativePath(binDir, proxy).c_str()); makeDepends << proxy << ": " << obj_m << ".provides" << std::endl; } @@ -420,14 +415,14 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, modFile += "/"; modFile += *i; modFile = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath(binDir, modFile), + this->MaybeConvertToRelativePath(binDir, modFile), cmOutputConverter::SHELL); std::string stampFile = stamp_dir; stampFile += "/"; stampFile += m; stampFile += ".mod.stamp"; stampFile = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath(binDir, stampFile), + this->MaybeConvertToRelativePath(binDir, stampFile), cmOutputConverter::SHELL); makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile << " " << stampFile; @@ -448,7 +443,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, std::string driver = this->TargetDirectory; driver += "/build"; driver = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, driver).c_str()); + this->MaybeConvertToRelativePath(binDir, driver).c_str()); makeDepends << driver << ": " << obj_m << ".provides.build\n"; } @@ -708,3 +703,9 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, // content. return cmFortranStreamsDiffer(finModFile, finStampFile); } + +std::string cmDependsFortran::MaybeConvertToRelativePath( + std::string const& base, std::string const& path) +{ + return this->LocalGenerator->ConvertToRelativePath(base, path); +} diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h index 8d347f4..90b82d4 100644 --- a/Source/cmDependsFortran.h +++ b/Source/cmDependsFortran.h @@ -78,6 +78,9 @@ protected: private: cmDependsFortran(cmDependsFortran const&); // Purposely not implemented. void operator=(cmDependsFortran const&); // Purposely not implemented. + + std::string MaybeConvertToRelativePath(std::string const& base, + std::string const& path); }; #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac67d12cef8f91be025c9b5491d79419970c4684 commit ac67d12cef8f91be025c9b5491d79419970c4684 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Makefiles: Hardcode the relative location of the CMakeCache file In this context, currentBinDir refers to the CMAKE_BINARY_DIR because it comes from the first local generator. GetHomeOutputDirectory is the same as CMAKE_BINARY_DIR, so the computation here is unnecessary. diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 4a5cc77..95f6ea8 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -306,16 +306,12 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() // reset lg to the first makefile lg = static_cast(this->LocalGenerators[0]); - // Build the path to the cache file. - std::string cache = this->GetCMakeInstance()->GetHomeOutputDirectory(); - cache += "/CMakeCache.txt"; - std::string currentBinDir = lg->GetCurrentBinaryDirectory(); // Save the list to the cmake file. cmakefileStream << "# The top level Makefile was generated from the following files:\n" << "set(CMAKE_MAKEFILE_DEPENDS\n" - << " \"" << lg->ConvertToRelativePath(currentBinDir, cache) << "\"\n"; + << " \"CMakeCache.txt\"\n"; for (std::vector::const_iterator i = lfiles.begin(); i != lfiles.end(); ++i) { cmakefileStream << " \"" << lg->ConvertToRelativePath(currentBinDir, *i) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=859b341859ac13aa8e872101240fc8c47c766e23 commit 859b341859ac13aa8e872101240fc8c47c766e23 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Convert: Extract method to determine if paths are in directory The conditional early return can be moved to clients, which would have many benefits, notably making cmOutputConverter independent of directory-specific state. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index be189a6..ec43c57 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -57,13 +57,14 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) cmSystemTools::IsSubDirectory(a, b)); } -std::string cmOutputConverter::ConvertToRelativePath( - std::string const& local_path, std::string const& remote_path) const +bool cmOutputConverter::ContainedInDirectory(std::string const& local_path, + std::string const& remote_path, + cmState::Directory directory) { const std::string relativePathTopBinary = - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); + directory.GetRelativePathTopBinary(); const std::string relativePathTopSource = - this->StateSnapshot.GetDirectory().GetRelativePathTopSource(); + directory.GetRelativePathTopSource(); const bool bothInBinary = cmOutputConverterNotAbove(local_path.c_str(), @@ -77,7 +78,14 @@ std::string cmOutputConverter::ConvertToRelativePath( cmOutputConverterNotAbove(remote_path.c_str(), relativePathTopSource.c_str()); - if (!(bothInSource || bothInBinary)) { + return bothInSource || bothInBinary; +} + +std::string cmOutputConverter::ConvertToRelativePath( + std::string const& local_path, std::string const& remote_path) const +{ + if (!ContainedInDirectory(local_path, remote_path, + this->StateSnapshot.GetDirectory())) { return remote_path; } diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index cb0d29e..aa0e379 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -95,6 +95,10 @@ public: }; static FortranFormat GetFortranFormat(const char* value); + static bool ContainedInDirectory(std::string const& local_path, + std::string const& remote_path, + cmState::Directory directory); + /** * Convert the given remote path to a relative path with respect to * the given local path. Both paths must use forward slashes and not https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9bde4d2941bf65df78d22dbb713f6f79a7133fa commit f9bde4d2941bf65df78d22dbb713f6f79a7133fa Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Convert: Remove asserts which are duplicated in delegate method This means that we don't encounter the asserts in the case where we early-return from here. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index dd52747..be189a6 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -60,13 +60,6 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) std::string cmOutputConverter::ConvertToRelativePath( std::string const& local_path, std::string const& remote_path) const { - // The paths should never be quoted. - assert(local_path[0] != '\"'); - assert(remote_path[0] != '\"'); - - // The local path should never have a trailing slash. - assert(local_path.empty() || local_path[local_path.size() - 1] != '/'); - const std::string relativePathTopBinary = this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); const std::string relativePathTopSource = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e81268978550f0573845b7e626e47de85d67279 commit 0e81268978550f0573845b7e626e47de85d67279 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Convert: Remove early return check This function delegates to another function which does the same check. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index f8c082e..dd52747 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -67,11 +67,6 @@ std::string cmOutputConverter::ConvertToRelativePath( // The local path should never have a trailing slash. assert(local_path.empty() || local_path[local_path.size() - 1] != '/'); - // If the path is already relative then just return the path. - if (!cmSystemTools::FileIsFullPath(remote_path.c_str())) { - return remote_path; - } - const std::string relativePathTopBinary = this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); const std::string relativePathTopSource = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4dfbdc908600a3fc98de34b765ba255646b6e648 commit 4dfbdc908600a3fc98de34b765ba255646b6e648 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Convert: Extract local variables for readability diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 2e74766..f8c082e 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -72,21 +72,22 @@ std::string cmOutputConverter::ConvertToRelativePath( return remote_path; } + const std::string relativePathTopBinary = + this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); + const std::string relativePathTopSource = + this->StateSnapshot.GetDirectory().GetRelativePathTopSource(); + const bool bothInBinary = - cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()); + cmOutputConverterNotAbove(local_path.c_str(), + relativePathTopBinary.c_str()) && + cmOutputConverterNotAbove(remote_path.c_str(), + relativePathTopBinary.c_str()); const bool bothInSource = - cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource()); + cmOutputConverterNotAbove(local_path.c_str(), + relativePathTopSource.c_str()) && + cmOutputConverterNotAbove(remote_path.c_str(), + relativePathTopSource.c_str()); if (!(bothInSource || bothInBinary)) { return remote_path; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88be3514f5d7a1187880bb89481954b6da26ebb6 commit 88be3514f5d7a1187880bb89481954b6da26ebb6 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Convert: Extract local variables Remove comment made obsolete by them. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 0ef9392..2e74766 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -72,20 +72,23 @@ std::string cmOutputConverter::ConvertToRelativePath( return remote_path; } - // Skip conversion if the path and local are not both in the source - // or both in the binary tree. - if (!((cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary())) || - (cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource())))) { + const bool bothInBinary = + cmOutputConverterNotAbove( + local_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && + cmOutputConverterNotAbove( + remote_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()); + + const bool bothInSource = + cmOutputConverterNotAbove( + local_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && + cmOutputConverterNotAbove( + remote_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopSource()); + + if (!(bothInSource || bothInBinary)) { return remote_path; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0fb47ff836af7fbd74998bfeb3067708b9f7db68 commit 0fb47ff836af7fbd74998bfeb3067708b9f7db68 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:29 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 cmOutputConverter: Remove Convert..ForExisting method (#16138) According to the bug report, the GetShortName used conditionally in this method is problematic. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f24b717..1f9e4cf 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -731,7 +731,8 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::string replace = this->Makefile->GetSafeDefinition(variable); // if the variable is not a FLAG then treat it like a path if (variable.find("_FLAG") == variable.npos) { - std::string ret = this->ConvertToOutputForExisting(replace); + std::string ret = + this->ConvertToOutputFormat(replace, cmOutputConverter::SHELL); // if there is a required first argument to the compiler add it // to the compiler string if (compilerArg1) { @@ -828,7 +829,7 @@ std::string cmLocalGenerator::ConvertToIncludeReference( std::string const& path, OutputFormat format, bool forceFullPaths) { static_cast(forceFullPaths); - return this->ConvertToOutputForExisting(path, format); + return this->ConvertToOutputFormat(path, format); } std::string cmLocalGenerator::GetIncludeFlags( @@ -1500,8 +1501,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, std::vector const& libDirs = cli.GetDirectories(); for (std::vector::const_iterator libDir = libDirs.begin(); libDir != libDirs.end(); ++libDir) { - std::string libpath = - this->ConvertToOutputForExisting(*libDir, shellFormat); + std::string libpath = this->ConvertToOutputFormat(*libDir, shellFormat); linkPath += " " + libPathFlag; linkPath += libpath; linkPath += libPathTerminator; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 8825b46..07b40b7 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -2078,18 +2078,19 @@ void cmLocalUnixMakefileGenerator3::CreateCDCommand( // back because the shell keeps the working directory between // commands. std::string cmd = cd_cmd; - cmd += this->ConvertToOutputForExisting(tgtDir); + cmd += this->ConvertToOutputFormat(tgtDir, cmOutputConverter::SHELL); commands.insert(commands.begin(), cmd); // Change back to the starting directory. cmd = cd_cmd; - cmd += this->ConvertToOutputForExisting(relDir); + cmd += this->ConvertToOutputFormat(relDir, cmOutputConverter::SHELL); commands.push_back(cmd); } else { // On UNIX we must construct a single shell command to change // directory and build because make resets the directory between // each command. - std::string outputForExisting = this->ConvertToOutputForExisting(tgtDir); + std::string outputForExisting = + this->ConvertToOutputFormat(tgtDir, cmOutputConverter::SHELL); std::string prefix = cd_cmd + outputForExisting + " && "; std::transform(commands.begin(), commands.end(), commands.begin(), std::bind1st(std::plus(), prefix)); diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 0b270aa..0ef9392 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -18,25 +18,6 @@ cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot) assert(this->StateSnapshot.IsValid()); } -std::string cmOutputConverter::ConvertToOutputForExisting( - const std::string& remote, OutputFormat format) const -{ - // If this is a windows shell, the result has a space, and the path - // already exists, we can use a short-path to reference it without a - // space. - if (this->GetState()->UseWindowsShell() && - remote.find(' ') != std::string::npos && - cmSystemTools::FileExists(remote.c_str())) { - std::string tmp; - if (cmSystemTools::GetShortPath(remote, tmp)) { - return this->ConvertToOutputFormat(tmp, format); - } - } - - // Otherwise, perform standard conversion. - return this->ConvertToOutputFormat(remote, format); -} - std::string cmOutputConverter::ConvertToOutputFormat(const std::string& source, OutputFormat output) const { diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index fd887ae..cb0d29e 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -26,10 +26,6 @@ public: std::string ConvertDirectorySeparatorsForShell( const std::string& source) const; - ///! for existing files convert to output path and short path if spaces - std::string ConvertToOutputForExisting(const std::string& remote, - OutputFormat format = SHELL) const; - void SetLinkScriptShell(bool linkScriptShell); /** https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51bc6bddb91283da25d098492c9cc1b50e3008fc commit 51bc6bddb91283da25d098492c9cc1b50e3008fc Author: Daniel Pfeifer AuthorDate: Thu Jun 16 23:25:43 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 cmOutputConverter: remove unused code Remove old ConvertToRelativePath function now that all clients have migrated to the new signature. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 2ef603b..0b270aa 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -77,15 +77,6 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) } std::string cmOutputConverter::ConvertToRelativePath( - const std::vector& local, const std::string& in_remote, - bool force) const -{ - std::string local_path = cmSystemTools::JoinPath(local); - return force ? this->ForceToRelativePath(local_path, in_remote) - : this->ConvertToRelativePath(local_path, in_remote); -} - -std::string cmOutputConverter::ConvertToRelativePath( std::string const& local_path, std::string const& remote_path) const { // The paths should never be quoted. diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 5979eaa..fd887ae 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -101,17 +101,6 @@ public: /** * Convert the given remote path to a relative path with respect to - * the given local path. The local path must be given in component - * form (see SystemTools::SplitPath) without a trailing slash. The - * remote path must use forward slashes and not already be escaped - * or quoted. - */ - std::string ConvertToRelativePath(const std::vector& local, - const std::string& in_remote, - bool force = false) const; - - /** - * Convert the given remote path to a relative path with respect to * the given local path. Both paths must use forward slashes and not * already be escaped or quoted. * The conversion is skipped if the paths are not both in the source https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e0c1599a1015cf80c4db35d108509986236b756 commit 8e0c1599a1015cf80c4db35d108509986236b756 Author: Stephen Kelly AuthorDate: Mon Sep 19 22:54:38 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Xcode: Inline ConvertToRelativePath calls Avoid violations of Interface Segregation Principle. These two calls now simply call different methods. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 4ff612d..75fc2e4 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3325,14 +3325,14 @@ std::string cmGlobalXCodeGenerator::RelativeToSource(const char* p) { // We force conversion because Xcode breakpoints do not work unless // they are in a file named relative to the source tree. - return this->CurrentLocalGenerator->ConvertToRelativePath( - this->ProjectSourceDirectoryComponents, p, true); + return cmOutputConverter::ForceToRelativePath( + cmSystemTools::JoinPath(this->ProjectSourceDirectoryComponents), p); } std::string cmGlobalXCodeGenerator::RelativeToBinary(const char* p) { return this->CurrentLocalGenerator->ConvertToRelativePath( - this->ProjectOutputDirectoryComponents, p); + cmSystemTools::JoinPath(this->ProjectOutputDirectoryComponents), p); } std::string cmGlobalXCodeGenerator::XCodeEscapePath(const std::string& p) ----------------------------------------------------------------------- Summary of changes: Source/cmCommonTargetGenerator.cxx | 6 +- Source/cmDependsFortran.cxx | 45 +++++---- Source/cmDependsFortran.h | 3 + Source/cmGlobalUnixMakefileGenerator3.cxx | 6 +- Source/cmGlobalXCodeGenerator.cxx | 6 +- Source/cmLocalGenerator.cxx | 21 ++--- Source/cmLocalGenerator.h | 4 +- Source/cmLocalNinjaGenerator.cxx | 5 +- Source/cmLocalNinjaGenerator.h | 4 +- Source/cmLocalUnixMakefileGenerator3.cxx | 40 +++++--- Source/cmLocalUnixMakefileGenerator3.h | 3 + Source/cmMakefileExecutableTargetGenerator.cxx | 22 ++--- Source/cmMakefileLibraryTargetGenerator.cxx | 26 +++--- Source/cmMakefileTargetGenerator.cxx | 42 +++++---- Source/cmMakefileUtilityTargetGenerator.cxx | 2 +- Source/cmOutputConverter.cxx | 119 ++++++++---------------- Source/cmOutputConverter.h | 40 ++------ 17 files changed, 175 insertions(+), 219 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 13:28:10 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 13:28:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-134-gbf023b1 Message-ID: <20161006172810.70777F5D7B@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 bf023b1933deae89f90de611dca8cc6b249f2d8c (commit) via 0c3a04777cc5fa8bc43b57b789e72630781ef56a (commit) via ebef3632c79491c402991967aab03a9c971cb70d (commit) from 23d732fa83e7e0ae07aad810e1867238900a51f0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf023b1933deae89f90de611dca8cc6b249f2d8c commit bf023b1933deae89f90de611dca8cc6b249f2d8c Merge: 23d732f 0c3a047 Author: Brad King AuthorDate: Thu Oct 6 13:28:09 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 13:28:09 2016 -0400 Merge topic 'android-ndk-r13' into next 0c3a0477 Android: Update libc++ include directories for NDK r13 ebef3632 Android: Suppress -Wattributes warnings in test case builds https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c3a04777cc5fa8bc43b57b789e72630781ef56a commit 0c3a04777cc5fa8bc43b57b789e72630781ef56a Author: Brad King AuthorDate: Thu Oct 6 11:50:29 2016 -0400 Commit: Brad King CommitDate: Thu Oct 6 13:26:40 2016 -0400 Android: Update libc++ include directories for NDK r13 The Android NDK r13 moved the libc++ include directories. Closes: #16346 diff --git a/Modules/Platform/Android/ndk-stl-c++.cmake b/Modules/Platform/Android/ndk-stl-c++.cmake index 14748a1..cb9fd68 100644 --- a/Modules/Platform/Android/ndk-stl-c++.cmake +++ b/Modules/Platform/Android/ndk-stl-c++.cmake @@ -3,7 +3,13 @@ set(_ANDROID_STL_RTTI 1) set(_ANDROID_STL_EXCEPTIONS 1) macro(__android_stl_cxx lang filename) # Add the include directory. - __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" 1) + if(EXISTS "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef") + # r12 and below + __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" 1) + else() + # r13 and above + __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/include" 1) + endif() # Add a secondary include directory if it exists. __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ebef3632c79491c402991967aab03a9c971cb70d commit ebef3632c79491c402991967aab03a9c971cb70d Author: Brad King AuthorDate: Thu Oct 6 11:43:24 2016 -0400 Commit: Brad King CommitDate: Thu Oct 6 13:26:05 2016 -0400 Android: Suppress -Wattributes warnings in test case builds We use `-Werror` in the Android test builds to make sure there are no warnings that we care about (e.g. unused flags). However, the NDK r13 tools produce a warning about their own builtins: ``` : In function 'float abs(float)': : warning: conflicts with previous declaration here [-Wattributes] ``` Suppress this warning so that we can continue using `-Werror` but tolerate these warnings. diff --git a/Tests/RunCMake/Android/common.cmake b/Tests/RunCMake/Android/common.cmake index 7eac5d6..6ea0909 100644 --- a/Tests/RunCMake/Android/common.cmake +++ b/Tests/RunCMake/Android/common.cmake @@ -17,8 +17,8 @@ foreach(f endif() endforeach() -string(APPEND CMAKE_C_FLAGS " -Werror") -string(APPEND CMAKE_CXX_FLAGS " -Werror") +string(APPEND CMAKE_C_FLAGS " -Werror -Wno-attributes") +string(APPEND CMAKE_CXX_FLAGS " -Werror -Wno-attributes") string(APPEND CMAKE_EXE_LINKER_FLAGS " -Wl,-no-undefined") if(CMAKE_ANDROID_NDK) ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android/ndk-stl-c++.cmake | 8 +++++++- Tests/RunCMake/Android/common.cmake | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 14:01:11 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 14:01:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-140-g0d83b54 Message-ID: <20161006180111.EEE99F6047@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 0d83b5464de903900cbe02e9bc484c30b37bca2b (commit) via 52fa6aab809c470d2bbc248da1367c1fdba53454 (commit) via 1d156cd3cc0318b6cd251198ae671d4ff03c1c2a (commit) via df16bb48b8dd6a4dc68cf8485d8b07e7bdc0e6a7 (commit) via 72eb6a374ed12cfa0dee0ce1930a4dcd8473c700 (commit) via 66c4d0820ca86b0b119303859f3dae0f7c560969 (commit) from bf023b1933deae89f90de611dca8cc6b249f2d8c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0d83b5464de903900cbe02e9bc484c30b37bca2b commit 0d83b5464de903900cbe02e9bc484c30b37bca2b Merge: bf023b1 52fa6aa Author: Brad King AuthorDate: Thu Oct 6 14:01:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 14:01:07 2016 -0400 Merge topic 'mips-rld-map-rel' into next 52fa6aab elf: Remove GetDynamicEntryCount and ReadBytes methods 1d156cd3 cmSystemTools, elf: handle DT_MIPS_RLD_REL_MAP in RemoveRPath df16bb48 cmSystemTools: rewrite RemoveRPath using DyanmicEntryList methods 72eb6a37 elf: add DynamicEntryList methods and rpath tag constants 66c4d082 elf: remove tag switch from ELF_Dyn ByteSwap function https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52fa6aab809c470d2bbc248da1367c1fdba53454 commit 52fa6aab809c470d2bbc248da1367c1fdba53454 Author: James Cowgill AuthorDate: Wed Oct 5 16:57:24 2016 +0100 Commit: James Cowgill CommitDate: Thu Oct 6 16:52:39 2016 +0100 elf: Remove GetDynamicEntryCount and ReadBytes methods These are no longer used after the DynamicEntryList changes. diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 6f2885c..0655da9 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -132,7 +132,6 @@ public: // Forward to the per-class implementation. virtual unsigned int GetNumberOfSections() const = 0; - virtual unsigned int GetDynamicEntryCount() = 0; virtual unsigned long GetDynamicEntryPosition(int j) = 0; virtual cmELF::DynamicEntryList GetDynamicEntries() = 0; virtual std::vector EncodeDynamicEntries( @@ -140,13 +139,6 @@ public: virtual StringEntry const* GetDynamicSectionString(unsigned int tag) = 0; virtual void PrintInfo(std::ostream& os) const = 0; - bool ReadBytes(unsigned long pos, unsigned long size, char* buf) - { - this->Stream.seekg(pos); - this->Stream.read(buf, size); - return !this->Stream.fail(); - } - // Lookup the SONAME in the DYNAMIC section. StringEntry const* GetSOName() { @@ -249,8 +241,7 @@ public: return static_cast(this->ELFHeader.e_shnum); } - // Get the file position and size of a dynamic section entry. - unsigned int GetDynamicEntryCount() CM_OVERRIDE; + // Get the file position of a dynamic section entry. unsigned long GetDynamicEntryPosition(int j) CM_OVERRIDE; cmELF::DynamicEntryList GetDynamicEntries() CM_OVERRIDE; @@ -533,20 +524,6 @@ bool cmELFInternalImpl::LoadDynamicSection() } template -unsigned int cmELFInternalImpl::GetDynamicEntryCount() -{ - if (!this->LoadDynamicSection()) { - return 0; - } - for (unsigned int i = 0; i < this->DynamicSectionEntries.size(); ++i) { - if (this->DynamicSectionEntries[i].d_tag == DT_NULL) { - return i; - } - } - return static_cast(this->DynamicSectionEntries.size()); -} - -template unsigned long cmELFInternalImpl::GetDynamicEntryPosition(int j) { if (!this->LoadDynamicSection()) { @@ -793,14 +770,6 @@ unsigned int cmELF::GetNumberOfSections() const return 0; } -unsigned int cmELF::GetDynamicEntryCount() const -{ - if (this->Valid()) { - return this->Internal->GetDynamicEntryCount(); - } - return 0; -} - unsigned long cmELF::GetDynamicEntryPosition(int index) const { if (this->Valid()) { @@ -828,14 +797,6 @@ std::vector cmELF::EncodeDynamicEntries( return std::vector(); } -bool cmELF::ReadBytes(unsigned long pos, unsigned long size, char* buf) const -{ - if (this->Valid()) { - return this->Internal->ReadBytes(pos, size, buf); - } - return false; -} - bool cmELF::GetSOName(std::string& soname) { if (StringEntry const* se = this->GetSOName()) { diff --git a/Source/cmELF.h b/Source/cmELF.h index 9c56be7..763a240 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -72,10 +72,6 @@ public: /** Get the number of ELF sections present. */ unsigned int GetNumberOfSections() const; - /** Get the number of DYNAMIC section entries before the first - DT_NULL. Returns zero on error. */ - unsigned int GetDynamicEntryCount() const; - /** Get the position of a DYNAMIC section header entry. Returns zero on error. */ unsigned long GetDynamicEntryPosition(int index) const; @@ -89,9 +85,6 @@ public: std::vector EncodeDynamicEntries( const DynamicEntryList& entries) const; - /** Read bytes from the file. */ - bool ReadBytes(unsigned long pos, unsigned long size, char* buf) const; - /** Get the SONAME field if any. */ bool GetSOName(std::string& soname); StringEntry const* GetSOName(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1d156cd3cc0318b6cd251198ae671d4ff03c1c2a commit 1d156cd3cc0318b6cd251198ae671d4ff03c1c2a Author: James Cowgill AuthorDate: Wed Oct 5 17:20:58 2016 +0100 Commit: James Cowgill CommitDate: Thu Oct 6 16:52:38 2016 +0100 cmSystemTools, elf: handle DT_MIPS_RLD_REL_MAP in RemoveRPath diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index bf0130a..6f2885c 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -700,6 +700,12 @@ cmELF::StringEntry const* cmELFInternalImpl::GetDynamicSectionString( const long cmELF::TagRPath = DT_RPATH; const long cmELF::TagRunPath = DT_RUNPATH; +#ifdef DT_MIPS_RLD_MAP_REL +const long cmELF::TagMipsRldMapRel = DT_MIPS_RLD_MAP_REL; +#else +const long cmELF::TagMipsRldMapRel = 0; +#endif + cmELF::cmELF(const char* fname) : Internal(CM_NULLPTR) { diff --git a/Source/cmELF.h b/Source/cmELF.h index 3fc59b4..9c56be7 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -107,7 +107,7 @@ public: /** Interesting dynamic tags. If the tag is 0, it does not exist in the host ELF implementation */ - static const long TagRPath, TagRunPath; + static const long TagRPath, TagRunPath, TagMipsRldMapRel; private: friend class cmELFInternal; diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 285c7b1..29dde2d 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2536,6 +2536,10 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, zeroSize[i] = se[i]->Size; } + // Get size of one DYNAMIC entry + int sizeof_dentry = + elf.GetDynamicEntryPosition(1) - elf.GetDynamicEntryPosition(0); + // Adjust the entry list as necessary to remove the run path int entriesErased = 0; for (cmELF::DynamicEntryList::iterator it = dentries.begin(); @@ -2545,6 +2549,26 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, entriesErased++; continue; } else { + if (cmELF::TagMipsRldMapRel != 0 && + it->first == cmELF::TagMipsRldMapRel) { + // Background: debuggers need to know the "linker map" which contains + // the addresses each dynamic object is loaded at. Most arches use + // the DT_DEBUG tag which the dynamic linker writes to (directly) and + // contain the location of the linker map, however on MIPS the + // .dynamic section is always read-only so this is not possible. MIPS + // objects instead contain a DT_MIPS_RLD_MAP tag which contains the + // address where the dyanmic linker will write to (an indirect + // version of DT_DEBUG). Since this doesn't work when using PIE, a + // relative equivalent was created - DT_MIPS_RLD_MAP_REL. Since this + // version contains a relative offset, moving it changes the + // calculated address. This may cause the dyanmic linker to write + // into memory it should not be changing. + // + // To fix this, we adjust the value of DT_MIPS_RLD_MAP_REL here. If + // we move it up by n bytes, we add n bytes to the value of this tag. + it->second += entriesErased * sizeof_dentry; + } + it++; } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df16bb48b8dd6a4dc68cf8485d8b07e7bdc0e6a7 commit df16bb48b8dd6a4dc68cf8485d8b07e7bdc0e6a7 Author: James Cowgill AuthorDate: Wed Oct 5 17:19:43 2016 +0100 Commit: James Cowgill CommitDate: Thu Oct 6 16:52:37 2016 +0100 cmSystemTools: rewrite RemoveRPath using DyanmicEntryList methods diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 3d8fdf5..285c7b1 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2518,9 +2518,9 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, std::swap(se[0], se[1]); } - // Get the size of the dynamic section header. - unsigned int count = elf.GetDynamicEntryCount(); - if (count == 0) { + // Obtain a copy of the dynamic entries + cmELF::DynamicEntryList dentries = elf.GetDynamicEntries(); + if (dentries.empty()) { // This should happen only for invalid ELF files where a DT_NULL // appears before the end of the table. if (emsg) { @@ -2536,40 +2536,22 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, zeroSize[i] = se[i]->Size; } - // Get the range of file positions corresponding to each entry and - // the rest of the table after them. - unsigned long entryBegin[3] = { 0, 0, 0 }; - unsigned long entryEnd[2] = { 0, 0 }; - for (int i = 0; i < se_count; ++i) { - entryBegin[i] = elf.GetDynamicEntryPosition(se[i]->IndexInSection); - entryEnd[i] = elf.GetDynamicEntryPosition(se[i]->IndexInSection + 1); - } - entryBegin[se_count] = elf.GetDynamicEntryPosition(count); - - // The data are to be written over the old table entries starting at - // the first one being removed. - bytesBegin = entryBegin[0]; - unsigned long bytesEnd = entryBegin[se_count]; - - // Allocate a buffer to hold the part of the file to be written. - // Initialize it with zeros. - bytes.resize(bytesEnd - bytesBegin, 0); - - // Read the part of the DYNAMIC section header that will move. - // The remainder of the buffer will be left with zeros which - // represent a DT_NULL entry. - char* data = &bytes[0]; - for (int i = 0; i < se_count; ++i) { - // Read data between the entries being removed. - unsigned long sz = entryBegin[i + 1] - entryEnd[i]; - if (sz > 0 && !elf.ReadBytes(entryEnd[i], sz, data)) { - if (emsg) { - *emsg = "Failed to read DYNAMIC section header."; - } - return false; + // Adjust the entry list as necessary to remove the run path + int entriesErased = 0; + for (cmELF::DynamicEntryList::iterator it = dentries.begin(); + it != dentries.end();) { + if (it->first == cmELF::TagRPath || it->first == cmELF::TagRunPath) { + it = dentries.erase(it); + entriesErased++; + continue; + } else { + it++; } - data += sz; } + + // Encode new entries list + bytes = elf.EncodeDynamicEntries(dentries); + bytesBegin = elf.GetDynamicEntryPosition(0); } // Open the file for update. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72eb6a374ed12cfa0dee0ce1930a4dcd8473c700 commit 72eb6a374ed12cfa0dee0ce1930a4dcd8473c700 Author: James Cowgill AuthorDate: Wed Oct 5 16:43:16 2016 +0100 Commit: James Cowgill CommitDate: Thu Oct 6 16:52:36 2016 +0100 elf: add DynamicEntryList methods and rpath tag constants diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index f78eed5..bf0130a 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -134,6 +134,9 @@ public: virtual unsigned int GetNumberOfSections() const = 0; virtual unsigned int GetDynamicEntryCount() = 0; virtual unsigned long GetDynamicEntryPosition(int j) = 0; + virtual cmELF::DynamicEntryList GetDynamicEntries() = 0; + virtual std::vector EncodeDynamicEntries( + const cmELF::DynamicEntryList&) = 0; virtual StringEntry const* GetDynamicSectionString(unsigned int tag) = 0; virtual void PrintInfo(std::ostream& os) const = 0; @@ -250,6 +253,10 @@ public: unsigned int GetDynamicEntryCount() CM_OVERRIDE; unsigned long GetDynamicEntryPosition(int j) CM_OVERRIDE; + cmELF::DynamicEntryList GetDynamicEntries() CM_OVERRIDE; + std::vector EncodeDynamicEntries(const cmELF::DynamicEntryList&) + CM_OVERRIDE; + // Lookup a string from the dynamic section with the given tag. StringEntry const* GetDynamicSectionString(unsigned int tag) CM_OVERRIDE; @@ -553,6 +560,54 @@ unsigned long cmELFInternalImpl::GetDynamicEntryPosition(int j) } template +cmELF::DynamicEntryList cmELFInternalImpl::GetDynamicEntries() +{ + cmELF::DynamicEntryList result; + + // Ensure entries have been read from file + if (!this->LoadDynamicSection()) { + return result; + } + + // Copy into public array + result.reserve(this->DynamicSectionEntries.size()); + for (typename std::vector::iterator di = + this->DynamicSectionEntries.begin(); + di != this->DynamicSectionEntries.end(); ++di) { + ELF_Dyn& dyn = *di; + result.push_back( + std::pair(dyn.d_tag, dyn.d_un.d_val)); + } + + return result; +} + +template +std::vector cmELFInternalImpl::EncodeDynamicEntries( + const cmELF::DynamicEntryList& entries) +{ + std::vector result; + result.reserve(sizeof(ELF_Dyn) * entries.size()); + + for (cmELF::DynamicEntryList::const_iterator it = entries.begin(); + it != entries.end(); it++) { + // Store the entry in an ELF_Dyn, byteswap it, then serialize to chars + ELF_Dyn dyn; + dyn.d_tag = static_cast(it->first); + dyn.d_un.d_val = static_cast(it->second); + + if (this->NeedSwap) { + ByteSwap(dyn); + } + + char* pdyn = reinterpret_cast(&dyn); + result.insert(result.end(), pdyn, pdyn + sizeof(ELF_Dyn)); + } + + return result; +} + +template cmELF::StringEntry const* cmELFInternalImpl::GetDynamicSectionString( unsigned int tag) { @@ -642,6 +697,9 @@ cmELF::StringEntry const* cmELFInternalImpl::GetDynamicSectionString( //============================================================================ // External class implementation. +const long cmELF::TagRPath = DT_RPATH; +const long cmELF::TagRunPath = DT_RUNPATH; + cmELF::cmELF(const char* fname) : Internal(CM_NULLPTR) { @@ -745,6 +803,25 @@ unsigned long cmELF::GetDynamicEntryPosition(int index) const return 0; } +cmELF::DynamicEntryList cmELF::GetDynamicEntries() const +{ + if (this->Valid()) { + return this->Internal->GetDynamicEntries(); + } + + return cmELF::DynamicEntryList(); +} + +std::vector cmELF::EncodeDynamicEntries( + const cmELF::DynamicEntryList& dentries) const +{ + if (this->Valid()) { + return this->Internal->EncodeDynamicEntries(dentries); + } + + return std::vector(); +} + bool cmELF::ReadBytes(unsigned long pos, unsigned long size, char* buf) const { if (this->Valid()) { diff --git a/Source/cmELF.h b/Source/cmELF.h index 7e7c1d6..3fc59b4 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -7,6 +7,8 @@ #include #include +#include +#include #if !defined(CMAKE_USE_ELF_PARSER) #error "This file may be included only if CMAKE_USE_ELF_PARSER is enabled." @@ -61,6 +63,9 @@ public: int IndexInSection; }; + /** Represent entire dynamic section header */ + typedef std::vector > DynamicEntryList; + /** Get the type of the file opened. */ FileType GetFileType() const; @@ -75,6 +80,15 @@ public: zero on error. */ unsigned long GetDynamicEntryPosition(int index) const; + /** Get a copy of all the DYNAMIC section header entries. + Returns an empty vector on error */ + DynamicEntryList GetDynamicEntries() const; + + /** Encodes a DYNAMIC section header entry list into a char vector according + to the type of ELF file this is */ + std::vector EncodeDynamicEntries( + const DynamicEntryList& entries) const; + /** Read bytes from the file. */ bool ReadBytes(unsigned long pos, unsigned long size, char* buf) const; @@ -91,6 +105,10 @@ public: /** Print human-readable information about the ELF file. */ void PrintInfo(std::ostream& os) const; + /** Interesting dynamic tags. + If the tag is 0, it does not exist in the host ELF implementation */ + static const long TagRPath, TagRunPath; + private: friend class cmELFInternal; bool Valid() const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66c4d0820ca86b0b119303859f3dae0f7c560969 commit 66c4d0820ca86b0b119303859f3dae0f7c560969 Author: James Cowgill AuthorDate: Fri Sep 30 15:34:48 2016 +0100 Commit: James Cowgill CommitDate: Thu Oct 6 16:52:34 2016 +0100 elf: remove tag switch from ELF_Dyn ByteSwap function sizeof(dyn.d_un.d_val) always equals sizeof(dyn.d_un.d_ptr) so every byte swap call in this function is identical. diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 2d86674..f78eed5 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -289,6 +289,10 @@ public: } private: + // ByteSwap(ELF_Dyn) assumes d_val and d_ptr are the same size + typedef char dyn_size_assert + [sizeof(ELF_Dyn().d_un.d_val) == sizeof(ELF_Dyn().d_un.d_ptr) ? 1 : -1]; + void ByteSwap(ELF_Ehdr& elf_header) { cmELFByteSwap(elf_header.e_type); @@ -323,121 +327,7 @@ private: void ByteSwap(ELF_Dyn& dyn) { cmELFByteSwap(dyn.d_tag); - switch (dyn.d_tag) { - case DT_NULL: /* dyn.d_un ignored */ - break; - case DT_NEEDED: - cmELFByteSwap(dyn.d_un.d_val); - break; - case DT_PLTRELSZ: - cmELFByteSwap(dyn.d_un.d_val); - break; - case DT_PLTGOT: - cmELFByteSwap(dyn.d_un.d_ptr); - break; - case DT_HASH: - cmELFByteSwap(dyn.d_un.d_ptr); - break; - case DT_STRTAB: - cmELFByteSwap(dyn.d_un.d_ptr); - break; - case DT_SYMTAB: - cmELFByteSwap(dyn.d_un.d_ptr); - break; - case DT_RELA: - cmELFByteSwap(dyn.d_un.d_ptr); - break; - case DT_RELASZ: - cmELFByteSwap(dyn.d_un.d_val); - break; - case DT_RELAENT: - cmELFByteSwap(dyn.d_un.d_val); - break; - case DT_STRSZ: - cmELFByteSwap(dyn.d_un.d_val); - break; - case DT_SYMENT: - cmELFByteSwap(dyn.d_un.d_val); - break; - case DT_INIT: - cmELFByteSwap(dyn.d_un.d_ptr); - break; - case DT_FINI: - cmELFByteSwap(dyn.d_un.d_ptr); - break; - case DT_SONAME: - cmELFByteSwap(dyn.d_un.d_val); - break; - case DT_RPATH: - cmELFByteSwap(dyn.d_un.d_val); - break; - case DT_SYMBOLIC: /* dyn.d_un ignored */ - break; - case DT_REL: - cmELFByteSwap(dyn.d_un.d_ptr); - break; - case DT_RELSZ: - cmELFByteSwap(dyn.d_un.d_val); - break; - case DT_RELENT: - cmELFByteSwap(dyn.d_un.d_val); - break; - case DT_PLTREL: - cmELFByteSwap(dyn.d_un.d_val); - break; - case DT_DEBUG: - cmELFByteSwap(dyn.d_un.d_ptr); - break; - case DT_TEXTREL: /* dyn.d_un ignored */ - break; - case DT_JMPREL: - cmELFByteSwap(dyn.d_un.d_ptr); - break; -#ifdef T_BIND_NOW - case T_BIND_NOW: /* dyn.d_un ignored */ - break; -#endif -#ifdef DT_INIT_ARRAY - case DT_INIT_ARRAY: - cmELFByteSwap(dyn.d_un.d_ptr); - break; -#endif -#ifdef DT_FINI_ARRAY - case DT_FINI_ARRAY: - cmELFByteSwap(dyn.d_un.d_ptr); - break; -#endif -#ifdef DT_INIT_ARRAYSZ - case DT_INIT_ARRAYSZ: - cmELFByteSwap(dyn.d_un.d_val); - break; -#endif -#ifdef DT_FINI_ARRAYSZ - case DT_FINI_ARRAYSZ: - cmELFByteSwap(dyn.d_un.d_val); - break; -#endif -#ifdef DT_RUNPATH - case DT_RUNPATH: - cmELFByteSwap(dyn.d_un.d_val); - break; -#endif -#ifdef DT_FLAGS - case DT_FLAGS: - cmELFByteSwap(dyn.d_un.d_val); - break; -#endif -#ifdef DT_PREINIT_ARRAY - case DT_PREINIT_ARRAY: - cmELFByteSwap(dyn.d_un.d_ptr); - break; -#endif -#ifdef DT_PREINIT_ARRAYSZ - case DT_PREINIT_ARRAYSZ: - cmELFByteSwap(dyn.d_un.d_val); - break; -#endif - } + cmELFByteSwap(dyn.d_un.d_val); } bool FileTypeValid(ELF_Half et) ----------------------------------------------------------------------- Summary of changes: Source/cmELF.cxx | 224 ++++++++++++++++------------------------------ Source/cmELF.h | 23 +++-- Source/cmSystemTools.cxx | 72 ++++++++------- 3 files changed, 135 insertions(+), 184 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Thu Oct 6 14:01:46 2016 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 6 Oct 2016 14:01:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-142-g78a3604 Message-ID: <20161006180146.7310DF6057@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 78a3604d252b6f42d192807b9bac84f46e6ec76f (commit) via d9718500fa01d3045ca86e85be68ab9dfee4cbed (commit) from 0d83b5464de903900cbe02e9bc484c30b37bca2b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78a3604d252b6f42d192807b9bac84f46e6ec76f commit 78a3604d252b6f42d192807b9bac84f46e6ec76f Merge: 0d83b54 d971850 Author: Stephen Kelly AuthorDate: Thu Oct 6 14:01:44 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 14:01:44 2016 -0400 Merge topic 'cleanup-Convert' into next d9718500 Revert "cmOutputConverter: Remove Convert..ForExisting method (#16138)" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9718500fa01d3045ca86e85be68ab9dfee4cbed commit d9718500fa01d3045ca86e85be68ab9dfee4cbed Author: Stephen Kelly AuthorDate: Thu Oct 6 20:00:51 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:00:51 2016 +0200 Revert "cmOutputConverter: Remove Convert..ForExisting method (#16138)" This reverts commit 0fb47ff836af7fbd74998bfeb3067708b9f7db68. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 8fcfb32..b2569a2 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -731,8 +731,7 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::string replace = this->Makefile->GetSafeDefinition(variable); // if the variable is not a FLAG then treat it like a path if (variable.find("_FLAG") == variable.npos) { - std::string ret = - this->ConvertToOutputFormat(replace, cmOutputConverter::SHELL); + std::string ret = this->ConvertToOutputForExisting(replace); // if there is a required first argument to the compiler add it // to the compiler string if (compilerArg1) { @@ -829,7 +828,7 @@ std::string cmLocalGenerator::ConvertToIncludeReference( std::string const& path, OutputFormat format, bool forceFullPaths) { static_cast(forceFullPaths); - return this->ConvertToOutputFormat(path, format); + return this->ConvertToOutputForExisting(path, format); } std::string cmLocalGenerator::GetIncludeFlags( @@ -1497,7 +1496,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, std::vector const& libDirs = cli.GetDirectories(); for (std::vector::const_iterator libDir = libDirs.begin(); libDir != libDirs.end(); ++libDir) { - std::string libpath = this->ConvertToOutputFormat(*libDir, shellFormat); + std::string libpath = + this->ConvertToOutputForExisting(*libDir, shellFormat); linkPath += " " + libPathFlag; linkPath += libpath; linkPath += libPathTerminator; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 401319e..915119c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -2081,19 +2081,18 @@ void cmLocalUnixMakefileGenerator3::CreateCDCommand( // back because the shell keeps the working directory between // commands. std::string cmd = cd_cmd; - cmd += this->ConvertToOutputFormat(tgtDir, cmOutputConverter::SHELL); + cmd += this->ConvertToOutputForExisting(tgtDir); commands.insert(commands.begin(), cmd); // Change back to the starting directory. cmd = cd_cmd; - cmd += this->ConvertToOutputFormat(relDir, cmOutputConverter::SHELL); + cmd += this->ConvertToOutputForExisting(relDir); commands.push_back(cmd); } else { // On UNIX we must construct a single shell command to change // directory and build because make resets the directory between // each command. - std::string outputForExisting = - this->ConvertToOutputFormat(tgtDir, cmOutputConverter::SHELL); + std::string outputForExisting = this->ConvertToOutputForExisting(tgtDir); std::string prefix = cd_cmd + outputForExisting + " && "; std::transform(commands.begin(), commands.end(), commands.begin(), std::bind1st(std::plus(), prefix)); diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 05e7d63..84a433c 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -18,6 +18,25 @@ cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot) assert(this->StateSnapshot.IsValid()); } +std::string cmOutputConverter::ConvertToOutputForExisting( + const std::string& remote, OutputFormat format) const +{ + // If this is a windows shell, the result has a space, and the path + // already exists, we can use a short-path to reference it without a + // space. + if (this->GetState()->UseWindowsShell() && + remote.find(' ') != std::string::npos && + cmSystemTools::FileExists(remote.c_str())) { + std::string tmp; + if (cmSystemTools::GetShortPath(remote, tmp)) { + return this->ConvertToOutputFormat(tmp, format); + } + } + + // Otherwise, perform standard conversion. + return this->ConvertToOutputFormat(remote, format); +} + std::string cmOutputConverter::ConvertToOutputFormat(const std::string& source, OutputFormat output) const { diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index f8bdcea..71cacab 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -26,6 +26,10 @@ public: std::string ConvertDirectorySeparatorsForShell( const std::string& source) const; + ///! for existing files convert to output path and short path if spaces + std::string ConvertToOutputForExisting(const std::string& remote, + OutputFormat format = SHELL) const; + void SetLinkScriptShell(bool linkScriptShell); /** ----------------------------------------------------------------------- Summary of changes: Source/cmLocalGenerator.cxx | 8 ++++---- Source/cmLocalUnixMakefileGenerator3.cxx | 7 +++---- Source/cmOutputConverter.cxx | 19 +++++++++++++++++++ Source/cmOutputConverter.h | 4 ++++ 4 files changed, 30 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Thu Oct 6 15:00:31 2016 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 6 Oct 2016 15:00:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-155-gc8a4533 Message-ID: <20161006190032.813A0F605D@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 c8a45332313cac5acc6661f8bcf4993d1fb81b49 (commit) via 20e62f74c5a030a25fe1c3a6c835d67eea152d8f (commit) via fd93b3605bc931b5ce2386816973e106fa1ec646 (commit) via 1365e18b9b5ddfb5bc13da5bcdefeb566be12f08 (commit) via 1ed5f6b39b80ab337551f1fa9601b3257ddd4be7 (commit) via 8377d9e00b7a00f1687b947aaf3c9e10b6779df4 (commit) via 00173b71d97f81cc9db9b573998bd4359aa2c25b (commit) via d5911ef014fcffd14d397759ca638519733a48ad (commit) via c3264f48c2960325b9141d3ec58c6b49afe120c9 (commit) via 52168f3210ca07a8d80991958d588789c2693d63 (commit) via 5213f8936fd5a70e1f38939e5d1894e7fabb9e02 (commit) via b61c268bd04425597e2e9c5f213dea3cdad3cb19 (commit) via e278f5a84806a2b228182dc4a2cc98a1eaa19f8c (commit) from 78a3604d252b6f42d192807b9bac84f46e6ec76f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8a45332313cac5acc6661f8bcf4993d1fb81b49 commit c8a45332313cac5acc6661f8bcf4993d1fb81b49 Merge: 78a3604 20e62f7 Author: Stephen Kelly AuthorDate: Thu Oct 6 15:00:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 15:00:27 2016 -0400 Merge topic 'cleanup-Convert' into next 20e62f74 cmLocalGenerator: Simplify ConvertToLinkReference fd93b360 cmOutputConverter: Add a flag for IsUnix 1365e18b Convert: Inline platform-specific methods 1ed5f6b3 Makefiles: Introduce local RelativePath method 8377d9e0 Fortran: Inline conversion to relative path 00173b71 Fortran: Wrap path convert in a call with a more-suitable name d5911ef0 Makefiles: Hardcode the relative location of the CMakeCache file c3264f48 Convert: Extract method to determine if paths are in directory 52168f32 Convert: Remove asserts which are duplicated in delegate method 5213f893 Convert: Remove early return check b61c268b Convert: Extract local variables for readability e278f5a8 Convert: Extract local variables https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20e62f74c5a030a25fe1c3a6c835d67eea152d8f commit 20e62f74c5a030a25fe1c3a6c835d67eea152d8f Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:10 2016 +0200 cmLocalGenerator: Simplify ConvertToLinkReference Make conversion to output format the caller responsibility, so that the method only 'converts to a link reference'. diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 6887a31..14ea1a9 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -75,8 +75,10 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags) // Append the flag and value. Use ConvertToLinkReference to help // vs6's "cl -link" pass it to the linker. std::string flag = defFileFlag; - flag += (this->LocalGenerator->ConvertToLinkReference( - this->ModuleDefinitionFile->GetFullPath())); + flag += this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToLinkReference( + this->ModuleDefinitionFile->GetFullPath()), + cmOutputConverter::SHELL); this->LocalGenerator->AppendFlags(flags, flag); } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f24b717..b2569a2 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1374,8 +1374,7 @@ std::string cmLocalGenerator::GetTargetFortranFlags( return std::string(); } -std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, - OutputFormat format) +std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) { #if defined(_WIN32) && !defined(__CYGWIN__) // Work-ardound command line parsing limitations in MSVC 6.0 @@ -1392,17 +1391,14 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, // Append the rest of the path with no space. sp += lib.substr(pos); - // Convert to an output path. - return this->ConvertToOutputFormat(sp.c_str(), format); + return sp; } } } #endif // Normal behavior. - return this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib), - format); + return this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib); } /** @@ -1517,7 +1513,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, continue; } if (li->IsPath) { - linkLibs += this->ConvertToLinkReference(li->Value, shellFormat); + linkLibs += this->ConvertToOutputFormat( + this->ConvertToLinkReference(li->Value), shellFormat); } else { linkLibs += li->Value; } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 19469be..703a507 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -367,9 +367,7 @@ protected: std::string& CreateSafeUniqueObjectFileName(const std::string& sin, std::string const& dir_max); - virtual std::string ConvertToLinkReference( - std::string const& lib, - cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL); + virtual std::string ConvertToLinkReference(std::string const& lib); /** Check whether the native build system supports the given definition. Issues a warning. */ diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 11b87e3..5736581 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -121,10 +121,9 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() // Virtual protected methods. std::string cmLocalNinjaGenerator::ConvertToLinkReference( - std::string const& lib, cmOutputConverter::OutputFormat format) + std::string const& lib) { - std::string path = this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); - return this->ConvertToOutputFormat(path, format); + return this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); } std::string cmLocalNinjaGenerator::ConvertToIncludeReference( diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 875f8c6..3061b57 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -76,9 +76,7 @@ public: void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg, cmNinjaDeps& ninjaDeps); - std::string ConvertToLinkReference(std::string const& lib, - cmOutputConverter::OutputFormat format = - cmOutputConverter::SHELL) CM_OVERRIDE; + std::string ConvertToLinkReference(std::string const& lib) CM_OVERRIDE; void ComputeObjectFilenames( std::map& mapping, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd93b3605bc931b5ce2386816973e106fa1ec646 commit fd93b3605bc931b5ce2386816973e106fa1ec646 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:10 2016 +0200 cmOutputConverter: Add a flag for IsUnix Remove the need for method parameters to represent the distinction. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 8ae9058..84a433c 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -239,9 +239,11 @@ std::string cmOutputConverter::EscapeForShell(const std::string& str, if (this->GetState()->UseNMake()) { flags |= Shell_Flag_NMake; } + if (!this->GetState()->UseWindowsShell()) { + flags |= Shell_Flag_IsUnix; + } - return Shell__GetArgument(str.c_str(), !this->GetState()->UseWindowsShell(), - flags); + return Shell__GetArgument(str.c_str(), flags); } std::string cmOutputConverter::EscapeForCMake(const std::string& str) @@ -270,7 +272,7 @@ std::string cmOutputConverter::EscapeForCMake(const std::string& str) std::string cmOutputConverter::EscapeWindowsShellArgument(const char* arg, int shell_flags) { - return Shell__GetArgument(arg, 0, shell_flags); + return Shell__GetArgument(arg, shell_flags); } cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( @@ -356,10 +358,10 @@ int cmOutputConverter::Shell__CharNeedsQuotesOnWindows(char c) (c == '>') || (c == '|') || (c == '^')); } -int cmOutputConverter::Shell__CharNeedsQuotes(char c, int isUnix, int flags) +int cmOutputConverter::Shell__CharNeedsQuotes(char c, int flags) { /* On Windows the built-in command shell echo never needs quotes. */ - if (!isUnix && (flags & Shell_Flag_EchoWindows)) { + if (!(flags & Shell_Flag_IsUnix) && (flags & Shell_Flag_EchoWindows)) { return 0; } @@ -368,7 +370,7 @@ int cmOutputConverter::Shell__CharNeedsQuotes(char c, int isUnix, int flags) return 1; } - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { /* On UNIX several special characters need quotes to preserve them. */ if (Shell__CharNeedsQuotesOnUnix(c)) { return 1; @@ -426,8 +428,7 @@ flag later when we understand applications of this better. */ #define KWSYS_SYSTEM_SHELL_QUOTE_MAKE_VARIABLES 0 -int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int isUnix, - int flags) +int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int flags) { /* The empty string needs quotes. */ if (!*in) { @@ -459,14 +460,14 @@ int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int isUnix, } /* Check whether this character needs quotes. */ - if (Shell__CharNeedsQuotes(*c, isUnix, flags)) { + if (Shell__CharNeedsQuotes(*c, flags)) { return 1; } } } /* On Windows some single character arguments need quotes. */ - if (!isUnix && *in && !*(in + 1)) { + if (flags & Shell_Flag_IsUnix && *in && !*(in + 1)) { char c = *in; if ((c == '?') || (c == '&') || (c == '^') || (c == '|') || (c == '#')) { return 1; @@ -476,8 +477,7 @@ int cmOutputConverter::Shell__ArgumentNeedsQuotes(const char* in, int isUnix, return 0; } -std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, - int flags) +std::string cmOutputConverter::Shell__GetArgument(const char* in, int flags) { std::ostringstream out; @@ -488,11 +488,11 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, int windows_backslashes = 0; /* Whether the argument must be quoted. */ - int needQuotes = Shell__ArgumentNeedsQuotes(in, isUnix, flags); + int needQuotes = Shell__ArgumentNeedsQuotes(in, flags); if (needQuotes) { /* Add the opening quote for this argument. */ if (flags & Shell_Flag_WatcomQuote) { - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { out << '"'; } out << '\''; @@ -524,7 +524,7 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, } /* Check whether this character needs escaping for the shell. */ - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { /* On Unix a few special characters need escaping even inside a quoted argument. */ if (*c == '\\' || *c == '"' || *c == '`' || *c == '$') { @@ -621,7 +621,7 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, /* Add the closing quote for this argument. */ if (flags & Shell_Flag_WatcomQuote) { out << '\''; - if (isUnix) { + if (flags & Shell_Flag_IsUnix) { out << '"'; } } else { diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 787075e..71cacab 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -66,7 +66,9 @@ public: Shell_Flag_AllowMakeVariables = (1 << 6), /** The target shell quoting uses extra single Quotes for Watcom tools. */ - Shell_Flag_WatcomQuote = (1 << 7) + Shell_Flag_WatcomQuote = (1 << 7), + + Shell_Flag_IsUnix = (1 << 8) }; std::string EscapeForShell(const std::string& str, bool makeVars = false, @@ -116,11 +118,11 @@ private: static int Shell__CharIsWhitespace(char c); static int Shell__CharNeedsQuotesOnUnix(char c); static int Shell__CharNeedsQuotesOnWindows(char c); - static int Shell__CharNeedsQuotes(char c, int isUnix, int flags); + static int Shell__CharNeedsQuotes(char c, int flags); static int Shell__CharIsMakeVariableName(char c); static const char* Shell__SkipMakeVariables(const char* c); - static int Shell__ArgumentNeedsQuotes(const char* in, int isUnix, int flags); - static std::string Shell__GetArgument(const char* in, int isUnix, int flags); + static int Shell__ArgumentNeedsQuotes(const char* in, int flags); + static std::string Shell__GetArgument(const char* in, int flags); private: cmState::Snapshot StateSnapshot; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1365e18b9b5ddfb5bc13da5bcdefeb566be12f08 commit 1365e18b9b5ddfb5bc13da5bcdefeb566be12f08 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:09 2016 +0200 Convert: Inline platform-specific methods They don't provide real value. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index dfc1610..8ae9058 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -240,9 +240,8 @@ std::string cmOutputConverter::EscapeForShell(const std::string& str, flags |= Shell_Flag_NMake; } - return this->GetState()->UseWindowsShell() - ? Shell_GetArgumentForWindows(str.c_str(), flags) - : Shell_GetArgumentForUnix(str.c_str(), flags); + return Shell__GetArgument(str.c_str(), !this->GetState()->UseWindowsShell(), + flags); } std::string cmOutputConverter::EscapeForCMake(const std::string& str) @@ -271,7 +270,7 @@ std::string cmOutputConverter::EscapeForCMake(const std::string& str) std::string cmOutputConverter::EscapeWindowsShellArgument(const char* arg, int shell_flags) { - return Shell_GetArgumentForWindows(arg, shell_flags); + return Shell__GetArgument(arg, 0, shell_flags); } cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( @@ -632,15 +631,3 @@ std::string cmOutputConverter::Shell__GetArgument(const char* in, int isUnix, return out.str(); } - -std::string cmOutputConverter::Shell_GetArgumentForWindows(const char* in, - int flags) -{ - return Shell__GetArgument(in, 0, flags); -} - -std::string cmOutputConverter::Shell_GetArgumentForUnix(const char* in, - int flags) -{ - return Shell__GetArgument(in, 1, flags); -} diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 745686b..787075e 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -33,8 +33,7 @@ public: void SetLinkScriptShell(bool linkScriptShell); /** - * Flags to pass to Shell_GetArgumentForWindows or - * Shell_GetArgumentForUnix. These modify the generated + * Flags to pass to Shell_GetArgument. These modify the generated * quoting and escape sequences to work under alternative * environments. */ @@ -70,16 +69,6 @@ public: Shell_Flag_WatcomQuote = (1 << 7) }; - /** - * Transform the given command line argument for use in a Windows or - * Unix shell. Returns a pointer to the end of the command line - * argument in the provided output buffer. Flags may be passed to - * modify the generated quoting and escape sequences to work under - * alternative environments. - */ - static std::string Shell_GetArgumentForWindows(const char* in, int flags); - static std::string Shell_GetArgumentForUnix(const char* in, int flags); - std::string EscapeForShell(const std::string& str, bool makeVars = false, bool forEcho = false, bool useWatcomQuote = false) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ed5f6b39b80ab337551f1fa9601b3257ddd4be7 commit 1ed5f6b39b80ab337551f1fa9601b3257ddd4be7 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:08 2016 +0200 Makefiles: Introduce local RelativePath method This makes it easier to remove directory-specific state from cmOutputConverter where it doesn't belong. Of course, this just relocates the problem to the makefiles generator for now, but that's better than affecting the core. diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 8825b46..915119c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -141,7 +141,7 @@ void cmLocalUnixMakefileGenerator3::ComputeHomeRelativeOutputPath() { // Compute the path to use when referencing the current output // directory from the top output directory. - this->HomeRelativeOutputPath = this->ConvertToRelativePath( + this->HomeRelativeOutputPath = this->MaybeConvertToRelativePath( this->GetBinaryDirectory(), this->GetCurrentBinaryDirectory()); if (this->HomeRelativeOutputPath == ".") { this->HomeRelativeOutputPath = ""; @@ -548,7 +548,8 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule( // Construct the left hand side of the rule. std::string tgt = cmSystemTools::ConvertToOutputPath( - this->ConvertToRelativePath(this->GetBinaryDirectory(), target).c_str()); + this->MaybeConvertToRelativePath(this->GetBinaryDirectory(), target) + .c_str()); const char* space = ""; if (tgt.size() == 1) { @@ -577,7 +578,7 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule( dep != depends.end(); ++dep) { replace = *dep; replace = cmSystemTools::ConvertToOutputPath( - this->ConvertToRelativePath(binDir, replace).c_str()); + this->MaybeConvertToRelativePath(binDir, replace).c_str()); os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n"; } } @@ -969,7 +970,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( // working directory will be the start-output directory. bool had_slash = cmd.find('/') != cmd.npos; if (workingDir.empty()) { - cmd = this->ConvertToRelativePath(currentBinDir, cmd); + cmd = this->MaybeConvertToRelativePath(currentBinDir, cmd); } bool has_slash = cmd.find('/') != cmd.npos; if (had_slash && !has_slash) { @@ -994,8 +995,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( if (!outputs.empty()) { if (workingDir.empty()) { output = this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), - outputs[0]), + this->MaybeConvertToRelativePath( + this->GetCurrentBinaryDirectory(), outputs[0]), cmOutputConverter::SHELL); } else { @@ -1082,14 +1083,15 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand( fout << "file(REMOVE_RECURSE\n"; for (std::vector::const_iterator f = files.begin(); f != files.end(); ++f) { - std::string fc = this->ConvertToRelativePath(currentBinDir, *f); + std::string fc = this->MaybeConvertToRelativePath(currentBinDir, *f); fout << " " << cmOutputConverter::EscapeForCMake(fc) << "\n"; } fout << ")\n"; } std::string remove = "$(CMAKE_COMMAND) -P "; remove += this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), cleanfile), + this->MaybeConvertToRelativePath(this->GetCurrentBinaryDirectory(), + cleanfile), cmOutputConverter::SHELL); commands.push_back(remove); @@ -1858,7 +1860,8 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo( } for (std::vector::iterator i = includes.begin(); i != includes.end(); ++i) { - cmakefileStream << " \"" << this->ConvertToRelativePath(binaryDir, *i) + cmakefileStream << " \"" + << this->MaybeConvertToRelativePath(binaryDir, *i) << "\"\n"; } cmakefileStream << " )\n"; @@ -1923,7 +1926,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall( if (!tgt.empty()) { // The make target is always relative to the top of the build tree. std::string tgt2 = - this->ConvertToRelativePath(this->GetBinaryDirectory(), tgt); + this->MaybeConvertToRelativePath(this->GetBinaryDirectory(), tgt); // The target may have been written with windows paths. cmSystemTools::ConvertToOutputSlashes(tgt2); @@ -2095,3 +2098,13 @@ void cmLocalUnixMakefileGenerator3::CreateCDCommand( std::bind1st(std::plus(), prefix)); } } + +std::string cmLocalUnixMakefileGenerator3::MaybeConvertToRelativePath( + std::string const& base, std::string const& path) +{ + if (!cmOutputConverter::ContainedInDirectory( + base, path, this->GetStateSnapshot().GetDirectory())) { + return path; + } + return cmOutputConverter::ForceToRelativePath(base, path); +} diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index fc5c8e7..c3ecda4 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -184,6 +184,9 @@ public: // Eclipse generator. void GetIndividualFileTargets(std::vector& targets); + std::string MaybeConvertToRelativePath(std::string const& base, + std::string const& path); + protected: void WriteLocalMakefile(); diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index cb20117..ff97696 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -130,16 +130,16 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) targetFullPathPDB, cmOutputConverter::SHELL); // Convert to the output path to use in constructing commands. std::string targetOutPath = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath), cmOutputConverter::SHELL); std::string targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); std::string targetOutPathImport = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport), cmOutputConverter::SHELL); @@ -215,27 +215,27 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Construct a list of files associated with this executable that // may need to be cleaned. std::vector exeCleanFiles; - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath)); #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), (targetFullPath + ".manifest").c_str())); #endif if (targetNameReal != targetName) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal)); } if (!targetNameImport.empty()) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport)); std::string implib; if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib)) { - exeCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + exeCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), implib)); } } @@ -243,7 +243,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // List the PDB for cleaning only when the whole target is // cleaned. We do not want to delete the .pdb file just before // linking the target. - this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + this->CleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathPDB)); // Add the pre-build and pre-link rules building but not when relinking. @@ -318,7 +318,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); @@ -326,7 +326,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) ? cmOutputConverter::WATCOMQUOTE : cmOutputConverter::SHELL; std::string target = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), output); vars.Target = target.c_str(); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b969bfb..8e25f43 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -305,20 +305,20 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( targetFullPathPDB, cmOutputConverter::SHELL); std::string targetOutPath = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath), cmOutputConverter::SHELL); std::string targetOutPathSO = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathSO), cmOutputConverter::SHELL); std::string targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); std::string targetOutPathImport = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport), cmOutputConverter::SHELL); @@ -366,24 +366,24 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Clean files associated with this library. std::vector libCleanFiles; - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPath)); if (targetNameReal != targetName) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal)); } if (targetNameSO != targetName && targetNameSO != targetNameReal) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathSO)); } if (!targetNameImport.empty()) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathImport)); std::string implib; if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib)) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), implib)); } } @@ -391,14 +391,14 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // List the PDB for cleaning only when the whole target is // cleaned. We do not want to delete the .pdb file just before // linking the target. - this->CleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + this->CleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathPDB)); #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { - libCleanFiles.push_back(this->LocalGenerator->ConvertToRelativePath( + libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), (targetFullPath + ".manifest").c_str())); } @@ -537,7 +537,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); @@ -546,7 +546,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( ? cmOutputConverter::WATCOMQUOTE : cmOutputConverter::SHELL; std::string target = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), output); vars.Target = target.c_str(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e70f09e..a9b2f4e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -166,7 +166,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() for (std::vector::const_iterator o = outputs.begin(); o != outputs.end(); ++o) { this->CleanFiles.push_back( - this->LocalGenerator->ConvertToRelativePath(currentBinDir, *o)); + this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, *o)); } } } @@ -209,8 +209,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(), - dependFileNameFull) + ->MaybeConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), dependFileNameFull) .c_str()) << "\n\n"; @@ -221,7 +221,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath( + ->MaybeConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), this->ProgressFileNameFull) .c_str()) @@ -256,8 +256,9 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath(this->LocalGenerator->GetBinaryDirectory(), - this->FlagFileNameFull) + ->MaybeConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), + this->FlagFileNameFull) .c_str()) << "\n\n"; } @@ -314,9 +315,9 @@ void cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()( output += "/"; output += cmSystemTools::GetFilenameName(input); this->Generator->CleanFiles.push_back( - this->Generator->LocalGenerator->ConvertToRelativePath( + this->Generator->LocalGenerator->MaybeConvertToRelativePath( this->Generator->LocalGenerator->GetCurrentBinaryDirectory(), output)); - output = this->Generator->LocalGenerator->ConvertToRelativePath( + output = this->Generator->LocalGenerator->MaybeConvertToRelativePath( this->Generator->LocalGenerator->GetBinaryDirectory(), output); // Create a rule to copy the content into the bundle. @@ -518,13 +519,13 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } targetOutPathReal = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathReal), cmOutputConverter::SHELL); targetOutPathPDB = this->LocalGenerator->ConvertToOutputFormat( targetFullPathPDB, cmOutputConverter::SHELL); targetOutPathCompilePDB = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), targetFullPathCompilePDB), cmOutputConverter::SHELL); @@ -550,13 +551,13 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( vars.Object = shellObj.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectDir), cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); std::string objectFileDir = cmSystemTools::GetFilenamePath(obj); objectFileDir = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objectFileDir), cmOutputConverter::SHELL); vars.ObjectFileDir = objectFileDir.c_str(); @@ -904,7 +905,7 @@ bool cmMakefileTargetGenerator::WriteMakeRule( // Touch the extra output so "make" knows that it was updated, // but only if the output was acually created. std::string const out = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath(binDir, *o), + this->LocalGenerator->MaybeConvertToRelativePath(binDir, *o), cmOutputConverter::SHELL); std::vector output_commands; @@ -1200,7 +1201,8 @@ void cmMakefileTargetGenerator::WriteObjectsVariable( for (std::vector::const_iterator i = this->ExternalObjects.begin(); i != this->ExternalObjects.end(); ++i) { - object = this->LocalGenerator->ConvertToRelativePath(currentBinDir, *i); + object = + this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, *i); *this->BuildFileStream << " " << lineContinue << "\n" << this->Makefile->GetSafeDefinition( "CMAKE_OBJECT_NAME"); @@ -1234,7 +1236,7 @@ public: { // Construct the name of the next object. this->NextObject = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), obj), cmOutputConverter::RESPONSE); @@ -1289,7 +1291,7 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule( this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget); std::string buildTargetRuleName = dir; buildTargetRuleName += relink ? "/preinstall" : "/build"; - buildTargetRuleName = this->LocalGenerator->ConvertToRelativePath( + buildTargetRuleName = this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), buildTargetRuleName); // Build the list of target outputs to drive. @@ -1479,7 +1481,7 @@ void cmMakefileTargetGenerator::CreateLinkScript( // Create the makefile command to invoke the link script. std::string link_command = "$(CMAKE_COMMAND) -E cmake_link_script "; link_command += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), linkScriptName), cmOutputConverter::SHELL); link_command += " --verbose=$(VERBOSE)"; @@ -1716,14 +1718,14 @@ void cmMakefileTargetGenerator::GenDefFile( cmd, cmOutputConverter::SHELL); cmd += " -E __create_def "; cmd += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), name_of_def_file), cmOutputConverter::SHELL); cmd += " "; std::string objlist_file = name_of_def_file; objlist_file += ".objs"; cmd += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), objlist_file), cmOutputConverter::SHELL); real_link_commands.insert(real_link_commands.begin(), cmd); @@ -1744,7 +1746,7 @@ void cmMakefileTargetGenerator::GenDefFile( linkFlags += " "; linkFlags += this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); linkFlags += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), name_of_def_file), cmOutputConverter::SHELL); linkFlags += " "; diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index f40c8fa..ecb29cb 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -46,7 +46,7 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() << this->GlobalGenerator->IncludeDirective << " " << root << cmSystemTools::ConvertToOutputPath( this->LocalGenerator - ->ConvertToRelativePath( + ->MaybeConvertToRelativePath( this->LocalGenerator->GetBinaryDirectory(), this->ProgressFileNameFull) .c_str()) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8377d9e00b7a00f1687b947aaf3c9e10b6779df4 commit 8377d9e00b7a00f1687b947aaf3c9e10b6779df4 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:08 2016 +0200 Fortran: Inline conversion to relative path Don't use cmOutputConverter method which relies on directory-specific state. diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 4c0f688..aaa9d3a 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -707,5 +707,9 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, std::string cmDependsFortran::MaybeConvertToRelativePath( std::string const& base, std::string const& path) { - return this->LocalGenerator->ConvertToRelativePath(base, path); + if (!cmOutputConverter::ContainedInDirectory( + base, path, this->LocalGenerator->GetStateSnapshot().GetDirectory())) { + return path; + } + return cmOutputConverter::ForceToRelativePath(base, path); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00173b71d97f81cc9db9b573998bd4359aa2c25b commit 00173b71d97f81cc9db9b573998bd4359aa2c25b Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:07 2016 +0200 Fortran: Wrap path convert in a call with a more-suitable name diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index c1c8880..4c0f688 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -198,16 +198,13 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, stamp += ".mod.stamp"; fcStream << "\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath(currentBinDir, - mod_lower) + << this->MaybeConvertToRelativePath(currentBinDir, mod_lower) << "\"\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath(currentBinDir, - mod_upper) + << this->MaybeConvertToRelativePath(currentBinDir, mod_upper) << "\"\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath(currentBinDir, - stamp) + << this->MaybeConvertToRelativePath(currentBinDir, stamp) << "\"\n"; } fcStream << " )\n"; @@ -323,17 +320,16 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, // Write the include dependencies to the output stream. std::string binDir = this->LocalGenerator->GetBinaryDirectory(); - std::string obj_i = this->LocalGenerator->ConvertToRelativePath(binDir, obj); + std::string obj_i = this->MaybeConvertToRelativePath(binDir, obj); std::string obj_m = cmSystemTools::ConvertToOutputPath(obj_i.c_str()); internalDepends << obj_i << std::endl; internalDepends << " " << src << std::endl; for (std::set::const_iterator i = info.Includes.begin(); i != info.Includes.end(); ++i) { - makeDepends - << obj_m << ": " - << cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, *i).c_str()) - << std::endl; + makeDepends << obj_m << ": " + << cmSystemTools::ConvertToOutputPath( + this->MaybeConvertToRelativePath(binDir, *i).c_str()) + << std::endl; internalDepends << " " << *i << std::endl; } makeDepends << std::endl; @@ -359,7 +355,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, proxy += *i; proxy += ".mod.proxy"; proxy = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, proxy).c_str()); + this->MaybeConvertToRelativePath(binDir, proxy).c_str()); // since we require some things add them to our list of requirements makeDepends << obj_m << ".requires: " << proxy << std::endl; @@ -375,8 +371,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, if (!required->second.empty()) { // This module is known. Depend on its timestamp file. std::string stampFile = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, required->second) - .c_str()); + this->MaybeConvertToRelativePath(binDir, required->second).c_str()); makeDepends << obj_m << ": " << stampFile << "\n"; } else { // This module is not known to CMake. Try to locate it where @@ -384,7 +379,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, std::string module; if (this->FindModule(*i, module)) { module = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, module).c_str()); + this->MaybeConvertToRelativePath(binDir, module).c_str()); makeDepends << obj_m << ": " << module << "\n"; } } @@ -398,7 +393,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, proxy += *i; proxy += ".mod.proxy"; proxy = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, proxy).c_str()); + this->MaybeConvertToRelativePath(binDir, proxy).c_str()); makeDepends << proxy << ": " << obj_m << ".provides" << std::endl; } @@ -420,14 +415,14 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, modFile += "/"; modFile += *i; modFile = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath(binDir, modFile), + this->MaybeConvertToRelativePath(binDir, modFile), cmOutputConverter::SHELL); std::string stampFile = stamp_dir; stampFile += "/"; stampFile += m; stampFile += ".mod.stamp"; stampFile = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath(binDir, stampFile), + this->MaybeConvertToRelativePath(binDir, stampFile), cmOutputConverter::SHELL); makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile << " " << stampFile; @@ -448,7 +443,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, std::string driver = this->TargetDirectory; driver += "/build"; driver = cmSystemTools::ConvertToOutputPath( - this->LocalGenerator->ConvertToRelativePath(binDir, driver).c_str()); + this->MaybeConvertToRelativePath(binDir, driver).c_str()); makeDepends << driver << ": " << obj_m << ".provides.build\n"; } @@ -708,3 +703,9 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, // content. return cmFortranStreamsDiffer(finModFile, finStampFile); } + +std::string cmDependsFortran::MaybeConvertToRelativePath( + std::string const& base, std::string const& path) +{ + return this->LocalGenerator->ConvertToRelativePath(base, path); +} diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h index 8d347f4..90b82d4 100644 --- a/Source/cmDependsFortran.h +++ b/Source/cmDependsFortran.h @@ -78,6 +78,9 @@ protected: private: cmDependsFortran(cmDependsFortran const&); // Purposely not implemented. void operator=(cmDependsFortran const&); // Purposely not implemented. + + std::string MaybeConvertToRelativePath(std::string const& base, + std::string const& path); }; #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5911ef014fcffd14d397759ca638519733a48ad commit d5911ef014fcffd14d397759ca638519733a48ad Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:07 2016 +0200 Makefiles: Hardcode the relative location of the CMakeCache file In this context, currentBinDir refers to the CMAKE_BINARY_DIR because it comes from the first local generator. GetHomeOutputDirectory is the same as CMAKE_BINARY_DIR, so the computation here is unnecessary. diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 4a5cc77..95f6ea8 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -306,16 +306,12 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() // reset lg to the first makefile lg = static_cast(this->LocalGenerators[0]); - // Build the path to the cache file. - std::string cache = this->GetCMakeInstance()->GetHomeOutputDirectory(); - cache += "/CMakeCache.txt"; - std::string currentBinDir = lg->GetCurrentBinaryDirectory(); // Save the list to the cmake file. cmakefileStream << "# The top level Makefile was generated from the following files:\n" << "set(CMAKE_MAKEFILE_DEPENDS\n" - << " \"" << lg->ConvertToRelativePath(currentBinDir, cache) << "\"\n"; + << " \"CMakeCache.txt\"\n"; for (std::vector::const_iterator i = lfiles.begin(); i != lfiles.end(); ++i) { cmakefileStream << " \"" << lg->ConvertToRelativePath(currentBinDir, *i) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3264f48c2960325b9141d3ec58c6b49afe120c9 commit c3264f48c2960325b9141d3ec58c6b49afe120c9 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:06 2016 +0200 Convert: Extract method to determine if paths are in directory The conditional early return can be moved to clients, which would have many benefits, notably making cmOutputConverter independent of directory-specific state. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 5d31f02..dfc1610 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -76,13 +76,14 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) cmSystemTools::IsSubDirectory(a, b)); } -std::string cmOutputConverter::ConvertToRelativePath( - std::string const& local_path, std::string const& remote_path) const +bool cmOutputConverter::ContainedInDirectory(std::string const& local_path, + std::string const& remote_path, + cmState::Directory directory) { const std::string relativePathTopBinary = - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); + directory.GetRelativePathTopBinary(); const std::string relativePathTopSource = - this->StateSnapshot.GetDirectory().GetRelativePathTopSource(); + directory.GetRelativePathTopSource(); const bool bothInBinary = cmOutputConverterNotAbove(local_path.c_str(), @@ -96,7 +97,14 @@ std::string cmOutputConverter::ConvertToRelativePath( cmOutputConverterNotAbove(remote_path.c_str(), relativePathTopSource.c_str()); - if (!(bothInSource || bothInBinary)) { + return bothInSource || bothInBinary; +} + +std::string cmOutputConverter::ConvertToRelativePath( + std::string const& local_path, std::string const& remote_path) const +{ + if (!ContainedInDirectory(local_path, remote_path, + this->StateSnapshot.GetDirectory())) { return remote_path; } diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index fd887ae..745686b 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -99,6 +99,10 @@ public: }; static FortranFormat GetFortranFormat(const char* value); + static bool ContainedInDirectory(std::string const& local_path, + std::string const& remote_path, + cmState::Directory directory); + /** * Convert the given remote path to a relative path with respect to * the given local path. Both paths must use forward slashes and not https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52168f3210ca07a8d80991958d588789c2693d63 commit 52168f3210ca07a8d80991958d588789c2693d63 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:05 2016 +0200 Convert: Remove asserts which are duplicated in delegate method This means that we don't encounter the asserts in the case where we early-return from here. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 9970936..5d31f02 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -79,13 +79,6 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) std::string cmOutputConverter::ConvertToRelativePath( std::string const& local_path, std::string const& remote_path) const { - // The paths should never be quoted. - assert(local_path[0] != '\"'); - assert(remote_path[0] != '\"'); - - // The local path should never have a trailing slash. - assert(local_path.empty() || local_path[local_path.size() - 1] != '/'); - const std::string relativePathTopBinary = this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); const std::string relativePathTopSource = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5213f8936fd5a70e1f38939e5d1894e7fabb9e02 commit 5213f8936fd5a70e1f38939e5d1894e7fabb9e02 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:05 2016 +0200 Convert: Remove early return check This function delegates to another function which does the same check. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 70bcb99..9970936 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -86,11 +86,6 @@ std::string cmOutputConverter::ConvertToRelativePath( // The local path should never have a trailing slash. assert(local_path.empty() || local_path[local_path.size() - 1] != '/'); - // If the path is already relative then just return the path. - if (!cmSystemTools::FileIsFullPath(remote_path.c_str())) { - return remote_path; - } - const std::string relativePathTopBinary = this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); const std::string relativePathTopSource = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b61c268bd04425597e2e9c5f213dea3cdad3cb19 commit b61c268bd04425597e2e9c5f213dea3cdad3cb19 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:04 2016 +0200 Convert: Extract local variables for readability diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index eee1988..70bcb99 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -91,21 +91,22 @@ std::string cmOutputConverter::ConvertToRelativePath( return remote_path; } + const std::string relativePathTopBinary = + this->StateSnapshot.GetDirectory().GetRelativePathTopBinary(); + const std::string relativePathTopSource = + this->StateSnapshot.GetDirectory().GetRelativePathTopSource(); + const bool bothInBinary = - cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()); + cmOutputConverterNotAbove(local_path.c_str(), + relativePathTopBinary.c_str()) && + cmOutputConverterNotAbove(remote_path.c_str(), + relativePathTopBinary.c_str()); const bool bothInSource = - cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource()); + cmOutputConverterNotAbove(local_path.c_str(), + relativePathTopSource.c_str()) && + cmOutputConverterNotAbove(remote_path.c_str(), + relativePathTopSource.c_str()); if (!(bothInSource || bothInBinary)) { return remote_path; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e278f5a84806a2b228182dc4a2cc98a1eaa19f8c commit e278f5a84806a2b228182dc4a2cc98a1eaa19f8c Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:30 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 20:02:03 2016 +0200 Convert: Extract local variables Remove comment made obsolete by them. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 0b270aa..eee1988 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -91,20 +91,23 @@ std::string cmOutputConverter::ConvertToRelativePath( return remote_path; } - // Skip conversion if the path and local are not both in the source - // or both in the binary tree. - if (!((cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopBinary())) || - (cmOutputConverterNotAbove( - local_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && - cmOutputConverterNotAbove( - remote_path.c_str(), - this->StateSnapshot.GetDirectory().GetRelativePathTopSource())))) { + const bool bothInBinary = + cmOutputConverterNotAbove( + local_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && + cmOutputConverterNotAbove( + remote_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()); + + const bool bothInSource = + cmOutputConverterNotAbove( + local_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && + cmOutputConverterNotAbove( + remote_path.c_str(), + this->StateSnapshot.GetDirectory().GetRelativePathTopSource()); + + if (!(bothInSource || bothInBinary)) { return remote_path; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51bc6bddb91283da25d098492c9cc1b50e3008fc commit 51bc6bddb91283da25d098492c9cc1b50e3008fc Author: Daniel Pfeifer AuthorDate: Thu Jun 16 23:25:43 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 cmOutputConverter: remove unused code Remove old ConvertToRelativePath function now that all clients have migrated to the new signature. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 2ef603b..0b270aa 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -77,15 +77,6 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) } std::string cmOutputConverter::ConvertToRelativePath( - const std::vector& local, const std::string& in_remote, - bool force) const -{ - std::string local_path = cmSystemTools::JoinPath(local); - return force ? this->ForceToRelativePath(local_path, in_remote) - : this->ConvertToRelativePath(local_path, in_remote); -} - -std::string cmOutputConverter::ConvertToRelativePath( std::string const& local_path, std::string const& remote_path) const { // The paths should never be quoted. diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 5979eaa..fd887ae 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -101,17 +101,6 @@ public: /** * Convert the given remote path to a relative path with respect to - * the given local path. The local path must be given in component - * form (see SystemTools::SplitPath) without a trailing slash. The - * remote path must use forward slashes and not already be escaped - * or quoted. - */ - std::string ConvertToRelativePath(const std::vector& local, - const std::string& in_remote, - bool force = false) const; - - /** - * Convert the given remote path to a relative path with respect to * the given local path. Both paths must use forward slashes and not * already be escaped or quoted. * The conversion is skipped if the paths are not both in the source https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e0c1599a1015cf80c4db35d108509986236b756 commit 8e0c1599a1015cf80c4db35d108509986236b756 Author: Stephen Kelly AuthorDate: Mon Sep 19 22:54:38 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 18:45:18 2016 +0200 Xcode: Inline ConvertToRelativePath calls Avoid violations of Interface Segregation Principle. These two calls now simply call different methods. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 4ff612d..75fc2e4 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3325,14 +3325,14 @@ std::string cmGlobalXCodeGenerator::RelativeToSource(const char* p) { // We force conversion because Xcode breakpoints do not work unless // they are in a file named relative to the source tree. - return this->CurrentLocalGenerator->ConvertToRelativePath( - this->ProjectSourceDirectoryComponents, p, true); + return cmOutputConverter::ForceToRelativePath( + cmSystemTools::JoinPath(this->ProjectSourceDirectoryComponents), p); } std::string cmGlobalXCodeGenerator::RelativeToBinary(const char* p) { return this->CurrentLocalGenerator->ConvertToRelativePath( - this->ProjectOutputDirectoryComponents, p); + cmSystemTools::JoinPath(this->ProjectOutputDirectoryComponents), p); } std::string cmGlobalXCodeGenerator::XCodeEscapePath(const std::string& p) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From chuck.atkins at kitware.com Thu Oct 6 15:46:02 2016 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Thu, 6 Oct 2016 15:46:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-158-gf90c7ba Message-ID: <20161006194618.83DE8F5B27@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 f90c7ba54f1a9a61e930292207d3387df40b2dad (commit) via 495f92446a6e663be39a742721bb18e7fb1d9c14 (commit) via d1c1db6360cacdcce9fc48c51fb7809f2711e62b (commit) from c8a45332313cac5acc6661f8bcf4993d1fb81b49 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f90c7ba54f1a9a61e930292207d3387df40b2dad commit f90c7ba54f1a9a61e930292207d3387df40b2dad Merge: c8a4533 495f924 Author: Chuck Atkins AuthorDate: Thu Oct 6 15:45:56 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 15:45:56 2016 -0400 Merge topic 'check-libuv-minimum-version' into next 495f9244 Set minimum version for LibUV to 1.0.0 d1c1db63 Use find_package for JsonCpp and LibUV instead of include https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=495f92446a6e663be39a742721bb18e7fb1d9c14 commit 495f92446a6e663be39a742721bb18e7fb1d9c14 Author: Chuck Atkins AuthorDate: Wed Oct 5 10:20:28 2016 -0400 Commit: Chuck Atkins CommitDate: Wed Oct 5 10:20:28 2016 -0400 Set minimum version for LibUV to 1.0.0 Older versions of libuv did not have the uv_loop_close API. It first showed up in unstable releases ~ v0.11.20 but was not available in a stable release until v1.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index bafca23..b4a577c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -491,7 +491,7 @@ int main(void) { return 0; } if(CMAKE_USE_LIBUV) if(CMAKE_USE_SYSTEM_LIBUV) if(NOT CMAKE_VERSION VERSION_LESS 3.0) - find_package(LibUV) + find_package(LibUV 1.0.0) else() message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBUV requires CMake >= 3.0") endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1c1db6360cacdcce9fc48c51fb7809f2711e62b commit d1c1db6360cacdcce9fc48c51fb7809f2711e62b Author: Chuck Atkins AuthorDate: Wed Oct 5 10:19:55 2016 -0400 Commit: Chuck Atkins CommitDate: Wed Oct 5 10:19:55 2016 -0400 Use find_package for JsonCpp and LibUV instead of include diff --git a/CMakeLists.txt b/CMakeLists.txt index 309e224..bafca23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ if(POLICY CMP0053) endif() project(CMake) +# Make sure we can find internal find_package modules only used for +# building CMake and not for shipping externally +list(INSERT CMAKE_MODULE_PATH 0 ${CMake_SOURCE_DIR}/Source/Modules) + if(CMAKE_BOOTSTRAP) # Running from bootstrap script. Set local variable and remove from cache. set(CMAKE_BOOTSTRAP 1) @@ -441,7 +445,7 @@ macro (CMAKE_BUILD_UTILITIES) # Build jsoncpp library. if(CMAKE_USE_SYSTEM_JSONCPP) if(NOT CMAKE_VERSION VERSION_LESS 3.0) - include(${CMake_SOURCE_DIR}/Source/Modules/FindJsonCpp.cmake) + find_package(JsonCpp) else() message(FATAL_ERROR "CMAKE_USE_SYSTEM_JSONCPP requires CMake >= 3.0") endif() @@ -487,7 +491,7 @@ int main(void) { return 0; } if(CMAKE_USE_LIBUV) if(CMAKE_USE_SYSTEM_LIBUV) if(NOT CMAKE_VERSION VERSION_LESS 3.0) - include(${CMake_SOURCE_DIR}/Source/Modules/FindLibUV.cmake) + find_package(LibUV) else() message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBUV requires CMake >= 3.0") endif() ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Thu Oct 6 16:35:46 2016 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 6 Oct 2016 16:35:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-162-gab65a1e Message-ID: <20161006203547.534EBF6050@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 ab65a1e18599219c644889c4d4cb1b45c0dc8383 (commit) via d96271d9e14354ffb93f80a5ba85fb337767a6c5 (commit) via 7f1cd3280cf484b5d565a12ae57022de018faa57 (commit) via 2597bcf831dae6a0a7a212607ea4b926ec6b10e0 (commit) from f90c7ba54f1a9a61e930292207d3387df40b2dad (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab65a1e18599219c644889c4d4cb1b45c0dc8383 commit ab65a1e18599219c644889c4d4cb1b45c0dc8383 Merge: f90c7ba d96271d Author: Stephen Kelly AuthorDate: Thu Oct 6 16:35:44 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 16:35:44 2016 -0400 Merge topic 'CMP0065-LINK_FLAGS' into next d96271d9 CMP0065: Put computed flags into LINK_FLAGS not LINK_LIBRARIES 7f1cd328 cmLocalGenerator: Rename local variable to be more appropriate 2597bcf8 cmLocalGenerator: Extract policy handling into a method https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d96271d9e14354ffb93f80a5ba85fb337767a6c5 commit d96271d9e14354ffb93f80a5ba85fb337767a6c5 Author: Stephen Kelly AuthorDate: Thu Oct 6 22:25:44 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 22:33:01 2016 +0200 CMP0065: Put computed flags into LINK_FLAGS not LINK_LIBRARIES These flags are redundant anyway in the NEW case of the policy, and could be merged with CMAKE_EXE_EXPORTS_${lang}_FLAG content for that case. That is deferred to the future, but now at least the similar code is located close to each other. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a0f6423..a0ff824 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1248,6 +1248,14 @@ void cmLocalGenerator::GetTargetFlags( linkFlags += this->Makefile->GetSafeDefinition(exportFlagVar); linkFlags += " "; } + + std::string cmp0065Flags = + this->GetLinkLibsCMP0065(linkLanguage, *target); + if (!cmp0065Flags.empty()) { + linkFlags += cmp0065Flags; + linkFlags += " "; + } + const char* targetLinkFlags = target->GetProperty("LINK_FLAGS"); if (targetLinkFlags) { linkFlags += targetLinkFlags; @@ -1430,8 +1438,6 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, std::string linkLanguage = cli.GetLinkLanguage(); - std::string linkLibs = this->GetLinkLibsCMP0065(linkLanguage, tgt); - std::string libPathFlag = this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG"); std::string libPathTerminator = diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index cb20117..42e12ad 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -192,6 +192,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->AppendFlags( linkFlags, this->Makefile->GetDefinition(export_flag_var)); } + + this->LocalGenerator->AppendFlags(linkFlags, + this->LocalGenerator->GetLinkLibsCMP0065( + linkLanguage, *this->GeneratorTarget)); + if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(linkFlags, " -Wl,--no-as-needed"); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f1cd3280cf484b5d565a12ae57022de018faa57 commit 7f1cd3280cf484b5d565a12ae57022de018faa57 Author: Stephen Kelly AuthorDate: Thu Oct 6 22:25:05 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 22:25:05 2016 +0200 cmLocalGenerator: Rename local variable to be more appropriate diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6cc03e8..a0f6423 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1531,7 +1531,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, std::string cmLocalGenerator::GetLinkLibsCMP0065( std::string const& linkLanguage, cmGeneratorTarget& tgt) const { - std::string linkLibs; + std::string linkFlags; // Flags to link an executable to shared libraries. if (tgt.GetType() == cmState::EXECUTABLE && @@ -1571,11 +1571,10 @@ std::string cmLocalGenerator::GetLinkLibsCMP0065( std::string linkFlagsVar = "CMAKE_SHARED_LIBRARY_LINK_"; linkFlagsVar += linkLanguage; linkFlagsVar += "_FLAGS"; - linkLibs = this->Makefile->GetSafeDefinition(linkFlagsVar); - linkLibs += " "; + linkFlags = this->Makefile->GetSafeDefinition(linkFlagsVar); } } - return linkLibs; + return linkFlags; } void cmLocalGenerator::AddArchitectureFlags(std::string& flags, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2597bcf831dae6a0a7a212607ea4b926ec6b10e0 commit 2597bcf831dae6a0a7a212607ea4b926ec6b10e0 Author: Stephen Kelly AuthorDate: Tue Oct 4 23:16:27 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 22:17:30 2016 +0200 cmLocalGenerator: Extract policy handling into a method diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f24b717..6cc03e8 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1428,59 +1428,15 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, } cmComputeLinkInformation& cli = *pcli; - // Collect library linking flags command line options. - std::string linkLibs; - std::string linkLanguage = cli.GetLinkLanguage(); + std::string linkLibs = this->GetLinkLibsCMP0065(linkLanguage, tgt); + std::string libPathFlag = this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG"); std::string libPathTerminator = this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR"); - // Flags to link an executable to shared libraries. - if (tgt.GetType() == cmState::EXECUTABLE && - this->StateSnapshot.GetState()->GetGlobalPropertyAsBool( - "TARGET_SUPPORTS_SHARED_LIBS")) { - bool add_shlib_flags = false; - switch (tgt.GetPolicyStatusCMP0065()) { - case cmPolicies::WARN: - if (!tgt.GetPropertyAsBool("ENABLE_EXPORTS") && - this->Makefile->PolicyOptionalWarningEnabled( - "CMAKE_POLICY_WARNING_CMP0065")) { - std::ostringstream w; - /* clang-format off */ - w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0065) << "\n" - "For compatibility with older versions of CMake, " - "additional flags may be added to export symbols on all " - "executables regardless of their ENABLE_EXPORTS property."; - /* clang-format on */ - this->IssueMessage(cmake::AUTHOR_WARNING, w.str()); - } - case cmPolicies::OLD: - // OLD behavior is to always add the flags - add_shlib_flags = true; - break; - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::REQUIRED_ALWAYS: - this->IssueMessage( - cmake::FATAL_ERROR, - cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0065)); - case cmPolicies::NEW: - // NEW behavior is to only add the flags if ENABLE_EXPORTS is on - add_shlib_flags = tgt.GetPropertyAsBool("ENABLE_EXPORTS"); - break; - } - - if (add_shlib_flags) { - std::string linkFlagsVar = "CMAKE_SHARED_LIBRARY_LINK_"; - linkFlagsVar += linkLanguage; - linkFlagsVar += "_FLAGS"; - linkLibs = this->Makefile->GetSafeDefinition(linkFlagsVar); - linkLibs += " "; - } - } - // Append the framework search path flags. std::string fwSearchFlagVar = "CMAKE_"; fwSearchFlagVar += linkLanguage; @@ -1572,6 +1528,56 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, linkLibraries = fout.str(); } +std::string cmLocalGenerator::GetLinkLibsCMP0065( + std::string const& linkLanguage, cmGeneratorTarget& tgt) const +{ + std::string linkLibs; + + // Flags to link an executable to shared libraries. + if (tgt.GetType() == cmState::EXECUTABLE && + this->StateSnapshot.GetState()->GetGlobalPropertyAsBool( + "TARGET_SUPPORTS_SHARED_LIBS")) { + bool add_shlib_flags = false; + switch (tgt.GetPolicyStatusCMP0065()) { + case cmPolicies::WARN: + if (!tgt.GetPropertyAsBool("ENABLE_EXPORTS") && + this->Makefile->PolicyOptionalWarningEnabled( + "CMAKE_POLICY_WARNING_CMP0065")) { + std::ostringstream w; + /* clang-format off */ + w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0065) << "\n" + "For compatibility with older versions of CMake, " + "additional flags may be added to export symbols on all " + "executables regardless of their ENABLE_EXPORTS property."; + /* clang-format on */ + this->IssueMessage(cmake::AUTHOR_WARNING, w.str()); + } + case cmPolicies::OLD: + // OLD behavior is to always add the flags + add_shlib_flags = true; + break; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + this->IssueMessage( + cmake::FATAL_ERROR, + cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0065)); + case cmPolicies::NEW: + // NEW behavior is to only add the flags if ENABLE_EXPORTS is on + add_shlib_flags = tgt.GetPropertyAsBool("ENABLE_EXPORTS"); + break; + } + + if (add_shlib_flags) { + std::string linkFlagsVar = "CMAKE_SHARED_LIBRARY_LINK_"; + linkFlagsVar += linkLanguage; + linkFlagsVar += "_FLAGS"; + linkLibs = this->Makefile->GetSafeDefinition(linkFlagsVar); + linkLibs += " "; + } + } + return linkLibs; +} + void cmLocalGenerator::AddArchitectureFlags(std::string& flags, cmGeneratorTarget const* target, const std::string& lang, diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 19469be..2c1aeac 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -82,6 +82,9 @@ public: return this->GlobalGenerator; } + std::string GetLinkLibsCMP0065(std::string const& linkLanguage, + cmGeneratorTarget& tgt) const; + cmState* GetState() const; cmState::Snapshot GetStateSnapshot() const; ----------------------------------------------------------------------- Summary of changes: Source/cmLocalGenerator.cxx | 103 +++++++++++++----------- Source/cmLocalGenerator.h | 3 + Source/cmMakefileExecutableTargetGenerator.cxx | 5 ++ 3 files changed, 65 insertions(+), 46 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Thu Oct 6 16:45:01 2016 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 6 Oct 2016 16:45:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-164-gaf6f300 Message-ID: <20161006204502.5DBE6E8486@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 af6f3004dcf83123b3d12cf7446edb51bbec1b14 (commit) via 2c7bc60834cde0c0e5eff03db092c341dfac78b7 (commit) from ab65a1e18599219c644889c4d4cb1b45c0dc8383 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af6f3004dcf83123b3d12cf7446edb51bbec1b14 commit af6f3004dcf83123b3d12cf7446edb51bbec1b14 Merge: ab65a1e 2c7bc60 Author: Stephen Kelly AuthorDate: Thu Oct 6 16:44:59 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 16:44:59 2016 -0400 Merge topic 'CMP0065-LINK_FLAGS' into next 2c7bc608 fixup! CMP0065: Put computed flags into LINK_FLAGS not LINK_LIBRARIES https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c7bc60834cde0c0e5eff03db092c341dfac78b7 commit 2c7bc60834cde0c0e5eff03db092c341dfac78b7 Author: Stephen Kelly AuthorDate: Thu Oct 6 22:44:41 2016 +0200 Commit: Stephen Kelly CommitDate: Thu Oct 6 22:44:41 2016 +0200 fixup! CMP0065: Put computed flags into LINK_FLAGS not LINK_LIBRARIES diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a0ff824..3fabd53 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1438,6 +1438,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, std::string linkLanguage = cli.GetLinkLanguage(); + std::string linkLibs; + std::string libPathFlag = this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG"); std::string libPathTerminator = ----------------------------------------------------------------------- Summary of changes: Source/cmLocalGenerator.cxx | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 16:45:04 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 16:45:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-166-g4fbed29 Message-ID: <20161006204505.7943CE8486@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 4fbed291a99c5e1fd1c51abbbfbe430ad716e091 (commit) via ae975013067b228e3bb712c479ece54813c4a34f (commit) from af6f3004dcf83123b3d12cf7446edb51bbec1b14 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4fbed291a99c5e1fd1c51abbbfbe430ad716e091 commit 4fbed291a99c5e1fd1c51abbbfbe430ad716e091 Merge: af6f300 ae97501 Author: Brad King AuthorDate: Thu Oct 6 16:45:03 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 16:45:03 2016 -0400 Merge topic 'vs-15-preview-5' into next ae975013 VS: Update VS 15 generator for Preview 5 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae975013067b228e3bb712c479ece54813c4a34f commit ae975013067b228e3bb712c479ece54813c4a34f Author: Brad King AuthorDate: Thu Oct 6 16:43:50 2016 -0400 Commit: Brad King CommitDate: Thu Oct 6 16:43:50 2016 -0400 VS: Update VS 15 generator for Preview 5 The `PlatformToolset` is now `v141` instead of `v140`. Closes: #16347 diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index 4d62f2b..a833a5f 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -79,7 +79,7 @@ cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\15.0\\Setup\\VC;" "ProductDir", vc15Express, cmSystemTools::KeyWOW64_32); - this->DefaultPlatformToolset = "v140"; + this->DefaultPlatformToolset = "v141"; this->Version = VS15; } ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio15Generator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 16:46:21 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 16:46:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-168-g650d0c6 Message-ID: <20161006204622.2675FF1F9F@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 650d0c63e50ff502e9f5fcbf08f885ebb32b6101 (commit) via 2c93d6ca7f77e1f657c8df3019fd8a95f74db7a6 (commit) from 4fbed291a99c5e1fd1c51abbbfbe430ad716e091 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=650d0c63e50ff502e9f5fcbf08f885ebb32b6101 commit 650d0c63e50ff502e9f5fcbf08f885ebb32b6101 Merge: 4fbed29 2c93d6c Author: Brad King AuthorDate: Thu Oct 6 16:46:20 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 16:46:20 2016 -0400 Merge topic 'vs-15-preview-5' into next 2c93d6ca Revert "VS: Update VS 15 generator for Preview 5" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c93d6ca7f77e1f657c8df3019fd8a95f74db7a6 commit 2c93d6ca7f77e1f657c8df3019fd8a95f74db7a6 Author: Brad King AuthorDate: Thu Oct 6 16:45:57 2016 -0400 Commit: Brad King CommitDate: Thu Oct 6 16:45:57 2016 -0400 Revert "VS: Update VS 15 generator for Preview 5" This reverts commit ae975013067b228e3bb712c479ece54813c4a34f. Doc updates are needed too. diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index a833a5f..4d62f2b 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -79,7 +79,7 @@ cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\15.0\\Setup\\VC;" "ProductDir", vc15Express, cmSystemTools::KeyWOW64_32); - this->DefaultPlatformToolset = "v141"; + this->DefaultPlatformToolset = "v140"; this->Version = VS15; } ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio15Generator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 6 16:47:25 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 6 Oct 2016 16:47:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-170-ge74e07f Message-ID: <20161006204727.62A12F4DC0@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 e74e07ffd1826be46539aa5c7cd864e10aca5f80 (commit) via 02b7d278c8cf9ec3012289fcbc673b908b920c89 (commit) from 650d0c63e50ff502e9f5fcbf08f885ebb32b6101 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e74e07ffd1826be46539aa5c7cd864e10aca5f80 commit e74e07ffd1826be46539aa5c7cd864e10aca5f80 Merge: 650d0c6 02b7d27 Author: Brad King AuthorDate: Thu Oct 6 16:47:20 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 6 16:47:20 2016 -0400 Merge topic 'vs-15-preview-5' into next 02b7d278 VS: Update VS 15 generator for Preview 5 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=02b7d278c8cf9ec3012289fcbc673b908b920c89 commit 02b7d278c8cf9ec3012289fcbc673b908b920c89 Author: Brad King AuthorDate: Thu Oct 6 16:43:50 2016 -0400 Commit: Brad King CommitDate: Thu Oct 6 16:46:53 2016 -0400 VS: Update VS 15 generator for Preview 5 The `PlatformToolset` is now `v141` instead of `v140`. Closes: #16347 diff --git a/Help/release/3.7.rst b/Help/release/3.7.rst index f02b62d..d8141ca 100644 --- a/Help/release/3.7.rst +++ b/Help/release/3.7.rst @@ -32,7 +32,7 @@ Generators with :ref:`Makefile Generators`. * The :generator:`Visual Studio 15` generator was added. This is - experimental and based on Preview 4 because this version of VS + experimental and based on Preview 5 because this version of VS has not been released. * :ref:`Visual Studio Generators` for VS 2010 and above learned to diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index 4d62f2b..a833a5f 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -79,7 +79,7 @@ cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\15.0\\Setup\\VC;" "ProductDir", vc15Express, cmSystemTools::KeyWOW64_32); - this->DefaultPlatformToolset = "v140"; + this->DefaultPlatformToolset = "v141"; this->Version = VS15; } ----------------------------------------------------------------------- Summary of changes: Help/release/3.7.rst | 2 +- Source/cmGlobalVisualStudio15Generator.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Oct 7 00:01:22 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 7 Oct 2016 00:01:22 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-29-g8c61544 Message-ID: <20161007040126.6A638F6434@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 8c61544bb7ea017158e37e78cbbdbc943931824d (commit) from b2cf1cba07633a242d5d13f694609a505c6a6235 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c61544bb7ea017158e37e78cbbdbc943931824d commit 8c61544bb7ea017158e37e78cbbdbc943931824d Author: Kitware Robot AuthorDate: Fri Oct 7 00:01:16 2016 -0400 Commit: Kitware Robot CommitDate: Fri Oct 7 00:01:16 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 32578c2..ee2f4af 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 7) -set(CMake_VERSION_PATCH 20161006) +set(CMake_VERSION_PATCH 20161007) #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 Fri Oct 7 08:29:50 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 08:29:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-173-g7c8ee66 Message-ID: <20161007122950.DF362F6266@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 7c8ee666ec64e2429a4e68ae397fa0ec38ba6a1a (commit) via eb4e40a70597ae444a3a753f50099bea24b80ae8 (commit) via 643a7dab9df5cb3fff55a9caaf2e1837f9acd753 (commit) from e74e07ffd1826be46539aa5c7cd864e10aca5f80 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c8ee666ec64e2429a4e68ae397fa0ec38ba6a1a commit 7c8ee666ec64e2429a4e68ae397fa0ec38ba6a1a Merge: e74e07f eb4e40a Author: Brad King AuthorDate: Fri Oct 7 08:29:49 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 08:29:49 2016 -0400 Merge topic 'mips-rld-map-rel' into next eb4e40a7 fixup! cmSystemTools, elf: handle DT_MIPS_RLD_REL_MAP in RemoveRPath 643a7dab fixup! cmSystemTools: rewrite RemoveRPath using DyanmicEntryList methods https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb4e40a70597ae444a3a753f50099bea24b80ae8 commit eb4e40a70597ae444a3a753f50099bea24b80ae8 Author: Brad King AuthorDate: Fri Oct 7 08:21:55 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 08:21:55 2016 -0400 fixup! cmSystemTools, elf: handle DT_MIPS_RLD_REL_MAP in RemoveRPath diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 557797e..d800ef8 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2537,7 +2537,7 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, } // Get size of one DYNAMIC entry - int sizeof_dentry = + unsigned long const sizeof_dentry = elf.GetDynamicEntryPosition(1) - elf.GetDynamicEntryPosition(0); // Adjust the entry list as necessary to remove the run path https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=643a7dab9df5cb3fff55a9caaf2e1837f9acd753 commit 643a7dab9df5cb3fff55a9caaf2e1837f9acd753 Author: Brad King AuthorDate: Fri Oct 7 08:21:48 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 08:21:48 2016 -0400 fixup! cmSystemTools: rewrite RemoveRPath using DyanmicEntryList methods diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 29dde2d..557797e 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2541,7 +2541,7 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, elf.GetDynamicEntryPosition(1) - elf.GetDynamicEntryPosition(0); // Adjust the entry list as necessary to remove the run path - int entriesErased = 0; + unsigned long entriesErased = 0; for (cmELF::DynamicEntryList::iterator it = dentries.begin(); it != dentries.end();) { if (it->first == cmELF::TagRPath || it->first == cmELF::TagRunPath) { ----------------------------------------------------------------------- Summary of changes: Source/cmSystemTools.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 08:30:21 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 08:30:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-177-g1e663d2 Message-ID: <20161007123021.283F4F627B@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 1e663d26f306bbfda333aa57e7664865596f1878 (commit) via 15762b72b456998ac0f87ceec750a20e9872f325 (commit) via cd4f573ae9f4ded1cb386698f90c7ccf1504f094 (commit) via b8b1d15186b33ec598b1126169856184805b3e6f (commit) from 7c8ee666ec64e2429a4e68ae397fa0ec38ba6a1a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e663d26f306bbfda333aa57e7664865596f1878 commit 1e663d26f306bbfda333aa57e7664865596f1878 Merge: 7c8ee66 15762b7 Author: Brad King AuthorDate: Fri Oct 7 08:30:20 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 08:30:20 2016 -0400 Merge topic 'mips-rld-map-rel' into next 15762b72 elf: Remove GetDynamicEntryCount and ReadBytes methods cd4f573a cmSystemTools, elf: handle DT_MIPS_RLD_REL_MAP in RemoveRPath b8b1d151 cmSystemTools: rewrite RemoveRPath using DyanmicEntryList methods https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15762b72b456998ac0f87ceec750a20e9872f325 commit 15762b72b456998ac0f87ceec750a20e9872f325 Author: James Cowgill AuthorDate: Wed Oct 5 16:57:24 2016 +0100 Commit: Brad King CommitDate: Fri Oct 7 08:30:00 2016 -0400 elf: Remove GetDynamicEntryCount and ReadBytes methods These are no longer used after the DynamicEntryList changes. diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 6f2885c..0655da9 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -132,7 +132,6 @@ public: // Forward to the per-class implementation. virtual unsigned int GetNumberOfSections() const = 0; - virtual unsigned int GetDynamicEntryCount() = 0; virtual unsigned long GetDynamicEntryPosition(int j) = 0; virtual cmELF::DynamicEntryList GetDynamicEntries() = 0; virtual std::vector EncodeDynamicEntries( @@ -140,13 +139,6 @@ public: virtual StringEntry const* GetDynamicSectionString(unsigned int tag) = 0; virtual void PrintInfo(std::ostream& os) const = 0; - bool ReadBytes(unsigned long pos, unsigned long size, char* buf) - { - this->Stream.seekg(pos); - this->Stream.read(buf, size); - return !this->Stream.fail(); - } - // Lookup the SONAME in the DYNAMIC section. StringEntry const* GetSOName() { @@ -249,8 +241,7 @@ public: return static_cast(this->ELFHeader.e_shnum); } - // Get the file position and size of a dynamic section entry. - unsigned int GetDynamicEntryCount() CM_OVERRIDE; + // Get the file position of a dynamic section entry. unsigned long GetDynamicEntryPosition(int j) CM_OVERRIDE; cmELF::DynamicEntryList GetDynamicEntries() CM_OVERRIDE; @@ -533,20 +524,6 @@ bool cmELFInternalImpl::LoadDynamicSection() } template -unsigned int cmELFInternalImpl::GetDynamicEntryCount() -{ - if (!this->LoadDynamicSection()) { - return 0; - } - for (unsigned int i = 0; i < this->DynamicSectionEntries.size(); ++i) { - if (this->DynamicSectionEntries[i].d_tag == DT_NULL) { - return i; - } - } - return static_cast(this->DynamicSectionEntries.size()); -} - -template unsigned long cmELFInternalImpl::GetDynamicEntryPosition(int j) { if (!this->LoadDynamicSection()) { @@ -793,14 +770,6 @@ unsigned int cmELF::GetNumberOfSections() const return 0; } -unsigned int cmELF::GetDynamicEntryCount() const -{ - if (this->Valid()) { - return this->Internal->GetDynamicEntryCount(); - } - return 0; -} - unsigned long cmELF::GetDynamicEntryPosition(int index) const { if (this->Valid()) { @@ -828,14 +797,6 @@ std::vector cmELF::EncodeDynamicEntries( return std::vector(); } -bool cmELF::ReadBytes(unsigned long pos, unsigned long size, char* buf) const -{ - if (this->Valid()) { - return this->Internal->ReadBytes(pos, size, buf); - } - return false; -} - bool cmELF::GetSOName(std::string& soname) { if (StringEntry const* se = this->GetSOName()) { diff --git a/Source/cmELF.h b/Source/cmELF.h index 9c56be7..763a240 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -72,10 +72,6 @@ public: /** Get the number of ELF sections present. */ unsigned int GetNumberOfSections() const; - /** Get the number of DYNAMIC section entries before the first - DT_NULL. Returns zero on error. */ - unsigned int GetDynamicEntryCount() const; - /** Get the position of a DYNAMIC section header entry. Returns zero on error. */ unsigned long GetDynamicEntryPosition(int index) const; @@ -89,9 +85,6 @@ public: std::vector EncodeDynamicEntries( const DynamicEntryList& entries) const; - /** Read bytes from the file. */ - bool ReadBytes(unsigned long pos, unsigned long size, char* buf) const; - /** Get the SONAME field if any. */ bool GetSOName(std::string& soname); StringEntry const* GetSOName(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cd4f573ae9f4ded1cb386698f90c7ccf1504f094 commit cd4f573ae9f4ded1cb386698f90c7ccf1504f094 Author: James Cowgill AuthorDate: Wed Oct 5 17:20:58 2016 +0100 Commit: Brad King CommitDate: Fri Oct 7 08:30:00 2016 -0400 cmSystemTools, elf: handle DT_MIPS_RLD_REL_MAP in RemoveRPath diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index bf0130a..6f2885c 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -700,6 +700,12 @@ cmELF::StringEntry const* cmELFInternalImpl::GetDynamicSectionString( const long cmELF::TagRPath = DT_RPATH; const long cmELF::TagRunPath = DT_RUNPATH; +#ifdef DT_MIPS_RLD_MAP_REL +const long cmELF::TagMipsRldMapRel = DT_MIPS_RLD_MAP_REL; +#else +const long cmELF::TagMipsRldMapRel = 0; +#endif + cmELF::cmELF(const char* fname) : Internal(CM_NULLPTR) { diff --git a/Source/cmELF.h b/Source/cmELF.h index 3fc59b4..9c56be7 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -107,7 +107,7 @@ public: /** Interesting dynamic tags. If the tag is 0, it does not exist in the host ELF implementation */ - static const long TagRPath, TagRunPath; + static const long TagRPath, TagRunPath, TagMipsRldMapRel; private: friend class cmELFInternal; diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 8951788..d800ef8 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2536,6 +2536,10 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, zeroSize[i] = se[i]->Size; } + // Get size of one DYNAMIC entry + unsigned long const sizeof_dentry = + elf.GetDynamicEntryPosition(1) - elf.GetDynamicEntryPosition(0); + // Adjust the entry list as necessary to remove the run path unsigned long entriesErased = 0; for (cmELF::DynamicEntryList::iterator it = dentries.begin(); @@ -2545,6 +2549,26 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, entriesErased++; continue; } else { + if (cmELF::TagMipsRldMapRel != 0 && + it->first == cmELF::TagMipsRldMapRel) { + // Background: debuggers need to know the "linker map" which contains + // the addresses each dynamic object is loaded at. Most arches use + // the DT_DEBUG tag which the dynamic linker writes to (directly) and + // contain the location of the linker map, however on MIPS the + // .dynamic section is always read-only so this is not possible. MIPS + // objects instead contain a DT_MIPS_RLD_MAP tag which contains the + // address where the dyanmic linker will write to (an indirect + // version of DT_DEBUG). Since this doesn't work when using PIE, a + // relative equivalent was created - DT_MIPS_RLD_MAP_REL. Since this + // version contains a relative offset, moving it changes the + // calculated address. This may cause the dyanmic linker to write + // into memory it should not be changing. + // + // To fix this, we adjust the value of DT_MIPS_RLD_MAP_REL here. If + // we move it up by n bytes, we add n bytes to the value of this tag. + it->second += entriesErased * sizeof_dentry; + } + it++; } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8b1d15186b33ec598b1126169856184805b3e6f commit b8b1d15186b33ec598b1126169856184805b3e6f Author: James Cowgill AuthorDate: Wed Oct 5 17:19:43 2016 +0100 Commit: Brad King CommitDate: Fri Oct 7 08:29:59 2016 -0400 cmSystemTools: rewrite RemoveRPath using DyanmicEntryList methods diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 3d8fdf5..8951788 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2518,9 +2518,9 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, std::swap(se[0], se[1]); } - // Get the size of the dynamic section header. - unsigned int count = elf.GetDynamicEntryCount(); - if (count == 0) { + // Obtain a copy of the dynamic entries + cmELF::DynamicEntryList dentries = elf.GetDynamicEntries(); + if (dentries.empty()) { // This should happen only for invalid ELF files where a DT_NULL // appears before the end of the table. if (emsg) { @@ -2536,40 +2536,22 @@ bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, zeroSize[i] = se[i]->Size; } - // Get the range of file positions corresponding to each entry and - // the rest of the table after them. - unsigned long entryBegin[3] = { 0, 0, 0 }; - unsigned long entryEnd[2] = { 0, 0 }; - for (int i = 0; i < se_count; ++i) { - entryBegin[i] = elf.GetDynamicEntryPosition(se[i]->IndexInSection); - entryEnd[i] = elf.GetDynamicEntryPosition(se[i]->IndexInSection + 1); - } - entryBegin[se_count] = elf.GetDynamicEntryPosition(count); - - // The data are to be written over the old table entries starting at - // the first one being removed. - bytesBegin = entryBegin[0]; - unsigned long bytesEnd = entryBegin[se_count]; - - // Allocate a buffer to hold the part of the file to be written. - // Initialize it with zeros. - bytes.resize(bytesEnd - bytesBegin, 0); - - // Read the part of the DYNAMIC section header that will move. - // The remainder of the buffer will be left with zeros which - // represent a DT_NULL entry. - char* data = &bytes[0]; - for (int i = 0; i < se_count; ++i) { - // Read data between the entries being removed. - unsigned long sz = entryBegin[i + 1] - entryEnd[i]; - if (sz > 0 && !elf.ReadBytes(entryEnd[i], sz, data)) { - if (emsg) { - *emsg = "Failed to read DYNAMIC section header."; - } - return false; + // Adjust the entry list as necessary to remove the run path + unsigned long entriesErased = 0; + for (cmELF::DynamicEntryList::iterator it = dentries.begin(); + it != dentries.end();) { + if (it->first == cmELF::TagRPath || it->first == cmELF::TagRunPath) { + it = dentries.erase(it); + entriesErased++; + continue; + } else { + it++; } - data += sz; } + + // Encode new entries list + bytes = elf.EncodeDynamicEntries(dentries); + bytesBegin = elf.GetDynamicEntryPosition(0); } // Open the file for update. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 08:44:50 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 08:44:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-179-g856628d Message-ID: <20161007124456.23DDBF51E6@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 856628d05cef2d84b3c5c33ff13ff016c2244022 (commit) via 0f1fedbd6a298cf9af2f36577cc66c4ee167be3d (commit) from 1e663d26f306bbfda333aa57e7664865596f1878 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=856628d05cef2d84b3c5c33ff13ff016c2244022 commit 856628d05cef2d84b3c5c33ff13ff016c2244022 Merge: 1e663d2 0f1fedb Author: Brad King AuthorDate: Fri Oct 7 08:44:48 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 08:44:48 2016 -0400 Merge topic 'CMP0065-LINK_FLAGS' into next 0f1fedbd CMP0065: Put computed flags into LINK_FLAGS not LINK_LIBRARIES https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f1fedbd6a298cf9af2f36577cc66c4ee167be3d commit 0f1fedbd6a298cf9af2f36577cc66c4ee167be3d Author: Stephen Kelly AuthorDate: Thu Oct 6 22:25:44 2016 +0200 Commit: Brad King CommitDate: Fri Oct 7 08:42:25 2016 -0400 CMP0065: Put computed flags into LINK_FLAGS not LINK_LIBRARIES These flags are redundant anyway in the NEW case of the policy, and could be merged with CMAKE_EXE_EXPORTS_${lang}_FLAG content for that case. That is deferred to the future, but now at least the similar code is located close to each other. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a0f6423..3fabd53 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1248,6 +1248,14 @@ void cmLocalGenerator::GetTargetFlags( linkFlags += this->Makefile->GetSafeDefinition(exportFlagVar); linkFlags += " "; } + + std::string cmp0065Flags = + this->GetLinkLibsCMP0065(linkLanguage, *target); + if (!cmp0065Flags.empty()) { + linkFlags += cmp0065Flags; + linkFlags += " "; + } + const char* targetLinkFlags = target->GetProperty("LINK_FLAGS"); if (targetLinkFlags) { linkFlags += targetLinkFlags; @@ -1430,7 +1438,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, std::string linkLanguage = cli.GetLinkLanguage(); - std::string linkLibs = this->GetLinkLibsCMP0065(linkLanguage, tgt); + std::string linkLibs; std::string libPathFlag = this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG"); diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index cb20117..42e12ad 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -192,6 +192,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->AppendFlags( linkFlags, this->Makefile->GetDefinition(export_flag_var)); } + + this->LocalGenerator->AppendFlags(linkFlags, + this->LocalGenerator->GetLinkLibsCMP0065( + linkLanguage, *this->GeneratorTarget)); + if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(linkFlags, " -Wl,--no-as-needed"); } ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:01:02 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:01:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-181-gf7a8a5a Message-ID: <20161007130102.66AC2F5FC1@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 f7a8a5a9753c488bb59418dff0d8f6a0f4e036a4 (commit) via 082efba39a822c3affb8e3ebf0899d45751357e1 (commit) from 856628d05cef2d84b3c5c33ff13ff016c2244022 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f7a8a5a9753c488bb59418dff0d8f6a0f4e036a4 commit f7a8a5a9753c488bb59418dff0d8f6a0f4e036a4 Merge: 856628d 082efba Author: Brad King AuthorDate: Fri Oct 7 09:01:01 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:01:01 2016 -0400 Merge topic 'codelite-global-setting' into next 082efba3 fixup! Codelite: Consume the CMAKE_CODELITE_USE_TARGETS setting globally https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=082efba39a822c3affb8e3ebf0899d45751357e1 commit 082efba39a822c3affb8e3ebf0899d45751357e1 Author: Brad King AuthorDate: Fri Oct 7 08:46:55 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 08:48:05 2016 -0400 fixup! Codelite: Consume the CMAKE_CODELITE_USE_TARGETS setting globally diff --git a/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst b/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst index 96d678f..33cdf6c 100644 --- a/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst +++ b/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst @@ -3,5 +3,6 @@ CMAKE_CODELITE_USE_TARGETS Change the way the CodeLite generator creates projectfiles. -If this variable is set to ``ON`` in the top-level CMakeLists file, -the generator creates projectfiles based on targets rather than projects. +If this variable evaluates to ``ON`` at the end of the top-level +``CMakeLists.txt`` file, the generator creates projectfiles based on targets +rather than projects. ----------------------------------------------------------------------- Summary of changes: Help/variable/CMAKE_CODELITE_USE_TARGETS.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:01:26 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:01:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-183-g5ac03f5 Message-ID: <20161007130126.7A1E8F5FD5@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 5ac03f5aa179b96f3f849d584caba3e4fb7a0c13 (commit) via 80574a38e6cb6ac33630e878d9633f1267b53d2b (commit) from f7a8a5a9753c488bb59418dff0d8f6a0f4e036a4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ac03f5aa179b96f3f849d584caba3e4fb7a0c13 commit 5ac03f5aa179b96f3f849d584caba3e4fb7a0c13 Merge: f7a8a5a 80574a3 Author: Brad King AuthorDate: Fri Oct 7 09:01:25 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:01:25 2016 -0400 Merge topic 'codelite-global-setting' into next 80574a38 Codelite: Consume the CMAKE_CODELITE_USE_TARGETS setting globally https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80574a38e6cb6ac33630e878d9633f1267b53d2b commit 80574a38e6cb6ac33630e878d9633f1267b53d2b Author: Stephen Kelly AuthorDate: Thu Oct 6 18:35:02 2016 +0200 Commit: Brad King CommitDate: Fri Oct 7 09:01:07 2016 -0400 Codelite: Consume the CMAKE_CODELITE_USE_TARGETS setting globally diff --git a/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst b/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst index 4aede03..33cdf6c 100644 --- a/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst +++ b/Help/variable/CMAKE_CODELITE_USE_TARGETS.rst @@ -3,5 +3,6 @@ CMAKE_CODELITE_USE_TARGETS Change the way the CodeLite generator creates projectfiles. -If this variable is set to ``ON`` the generator creates projectfiles -based on targets rather than projects. +If this variable evaluates to ``ON`` at the end of the top-level +``CMakeLists.txt`` file, the generator creates projectfiles based on targets +rather than projects. diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 629c5b6..360c852 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -60,7 +60,6 @@ void cmExtraCodeLiteGenerator::Generate() // loop projects and locate the root project. // and extract the information for creating the worspace // root makefile - const cmMakefile* rmf = CM_NULLPTR; for (std::map >::const_iterator it = projectMap.begin(); it != projectMap.end(); ++it) { @@ -75,7 +74,6 @@ void cmExtraCodeLiteGenerator::Generate() workspaceFileName = workspaceOutputDir + "/"; workspaceFileName += workspaceProjectName + ".workspace"; this->WorkspacePath = it->second[0]->GetCurrentBinaryDirectory(); - rmf = it->second[0]->GetMakefile(); ; break; } @@ -89,7 +87,7 @@ void cmExtraCodeLiteGenerator::Generate() xml.Attribute("Name", workspaceProjectName); bool const targetsAreProjects = - rmf && rmf->IsOn("CMAKE_CODELITE_USE_TARGETS"); + this->GlobalGenerator->GlobalSettingIsOn("CMAKE_CODELITE_USE_TARGETS"); std::vector ProjectNames; if (targetsAreProjects) { ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:08:24 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:08:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-186-ge9b966c Message-ID: <20161007130824.56C5CF63ED@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 e9b966cea5838d928a1b67af26e693d77e3f259e (commit) via 20e8dcf162b9963c9ff195525bc433df2bc2de2a (commit) via 845b98f45b09b399f914d9df3c6a6008d7558b1b (commit) from 5ac03f5aa179b96f3f849d584caba3e4fb7a0c13 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9b966cea5838d928a1b67af26e693d77e3f259e commit e9b966cea5838d928a1b67af26e693d77e3f259e Merge: 5ac03f5 20e8dcf Author: Brad King AuthorDate: Fri Oct 7 09:08:23 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:08:23 2016 -0400 Merge topic 'check-libuv-minimum-version' into next 20e8dcf1 Set minimum version for LibUV to 1.0.0 845b98f4 Use find_package for JsonCpp and LibUV instead of include https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20e8dcf162b9963c9ff195525bc433df2bc2de2a commit 20e8dcf162b9963c9ff195525bc433df2bc2de2a Author: Chuck Atkins AuthorDate: Wed Oct 5 10:20:28 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 09:07:32 2016 -0400 Set minimum version for LibUV to 1.0.0 Older versions of libuv did not have the uv_loop_close API. It first showed up in unstable releases ~ v0.11.20 but was not available in a stable release until v1.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index bafca23..b4a577c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -491,7 +491,7 @@ int main(void) { return 0; } if(CMAKE_USE_LIBUV) if(CMAKE_USE_SYSTEM_LIBUV) if(NOT CMAKE_VERSION VERSION_LESS 3.0) - find_package(LibUV) + find_package(LibUV 1.0.0) else() message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBUV requires CMake >= 3.0") endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=845b98f45b09b399f914d9df3c6a6008d7558b1b commit 845b98f45b09b399f914d9df3c6a6008d7558b1b Author: Chuck Atkins AuthorDate: Wed Oct 5 10:19:55 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 09:07:32 2016 -0400 Use find_package for JsonCpp and LibUV instead of include diff --git a/CMakeLists.txt b/CMakeLists.txt index 309e224..bafca23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ if(POLICY CMP0053) endif() project(CMake) +# Make sure we can find internal find_package modules only used for +# building CMake and not for shipping externally +list(INSERT CMAKE_MODULE_PATH 0 ${CMake_SOURCE_DIR}/Source/Modules) + if(CMAKE_BOOTSTRAP) # Running from bootstrap script. Set local variable and remove from cache. set(CMAKE_BOOTSTRAP 1) @@ -441,7 +445,7 @@ macro (CMAKE_BUILD_UTILITIES) # Build jsoncpp library. if(CMAKE_USE_SYSTEM_JSONCPP) if(NOT CMAKE_VERSION VERSION_LESS 3.0) - include(${CMake_SOURCE_DIR}/Source/Modules/FindJsonCpp.cmake) + find_package(JsonCpp) else() message(FATAL_ERROR "CMAKE_USE_SYSTEM_JSONCPP requires CMake >= 3.0") endif() @@ -487,7 +491,7 @@ int main(void) { return 0; } if(CMAKE_USE_LIBUV) if(CMAKE_USE_SYSTEM_LIBUV) if(NOT CMAKE_VERSION VERSION_LESS 3.0) - include(${CMake_SOURCE_DIR}/Source/Modules/FindLibUV.cmake) + find_package(LibUV) else() message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBUV requires CMake >= 3.0") endif() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:10:40 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:10:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-32-g5553e33 Message-ID: <20161007131040.6BFC9AF104@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 5553e330dc2015ec5b9f8e6573d9b58928bcb9e3 (commit) via 20e8dcf162b9963c9ff195525bc433df2bc2de2a (commit) via 845b98f45b09b399f914d9df3c6a6008d7558b1b (commit) from 8c61544bb7ea017158e37e78cbbdbc943931824d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5553e330dc2015ec5b9f8e6573d9b58928bcb9e3 commit 5553e330dc2015ec5b9f8e6573d9b58928bcb9e3 Merge: 8c61544 20e8dcf Author: Brad King AuthorDate: Fri Oct 7 09:10:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:10:37 2016 -0400 Merge topic 'check-libuv-minimum-version' 20e8dcf1 Set minimum version for LibUV to 1.0.0 845b98f4 Use find_package for JsonCpp and LibUV instead of include ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:10:43 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:10:43 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-35-g36e07e1 Message-ID: <20161007131043.1DD77B01D3@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 36e07e10176866c2ad07a58fd3ac30de81e0909d (commit) via f53b01ff0fdead346f3f63310d4a7359db269fb4 (commit) via ca50c89e416934a586ad6839b2aaba8e7257cc2e (commit) from 5553e330dc2015ec5b9f8e6573d9b58928bcb9e3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=36e07e10176866c2ad07a58fd3ac30de81e0909d commit 36e07e10176866c2ad07a58fd3ac30de81e0909d Merge: 5553e33 f53b01f Author: Brad King AuthorDate: Fri Oct 7 09:10:41 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:10:41 2016 -0400 Merge topic 'cpack-rpm-debuginfo-fixes' f53b01ff CPack/RPM debuginfo package without binaries ca50c89e CPack/RPM debuginfo package objdump error suppression ----------------------------------------------------------------------- Summary of changes: Modules/CPackRPM.cmake | 68 ++++++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 28 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:10:45 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:10:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-41-gea563a2 Message-ID: <20161007131045.A720EAFFF7@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 ea563a27a2042cfb3be33d0f74efecc7687b86bb (commit) via 15762b72b456998ac0f87ceec750a20e9872f325 (commit) via cd4f573ae9f4ded1cb386698f90c7ccf1504f094 (commit) via b8b1d15186b33ec598b1126169856184805b3e6f (commit) via 72eb6a374ed12cfa0dee0ce1930a4dcd8473c700 (commit) via 66c4d0820ca86b0b119303859f3dae0f7c560969 (commit) from 36e07e10176866c2ad07a58fd3ac30de81e0909d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea563a27a2042cfb3be33d0f74efecc7687b86bb commit ea563a27a2042cfb3be33d0f74efecc7687b86bb Merge: 36e07e1 15762b7 Author: Brad King AuthorDate: Fri Oct 7 09:10:43 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:10:43 2016 -0400 Merge topic 'mips-rld-map-rel' 15762b72 elf: Remove GetDynamicEntryCount and ReadBytes methods cd4f573a cmSystemTools, elf: handle DT_MIPS_RLD_REL_MAP in RemoveRPath b8b1d151 cmSystemTools: rewrite RemoveRPath using DyanmicEntryList methods 72eb6a37 elf: add DynamicEntryList methods and rpath tag constants 66c4d082 elf: remove tag switch from ELF_Dyn ByteSwap function ----------------------------------------------------------------------- Summary of changes: Source/cmELF.cxx | 224 ++++++++++++++++------------------------------ Source/cmELF.h | 23 +++-- Source/cmSystemTools.cxx | 72 ++++++++------- 3 files changed, 135 insertions(+), 184 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:10:48 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:10:48 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-43-gfadb812 Message-ID: <20161007131048.9F46DB0716@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 fadb812a52bbf14c7b4850e6a5fdd81405d8b5f5 (commit) via 02b7d278c8cf9ec3012289fcbc673b908b920c89 (commit) from ea563a27a2042cfb3be33d0f74efecc7687b86bb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fadb812a52bbf14c7b4850e6a5fdd81405d8b5f5 commit fadb812a52bbf14c7b4850e6a5fdd81405d8b5f5 Merge: ea563a2 02b7d27 Author: Brad King AuthorDate: Fri Oct 7 09:10:46 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:10:46 2016 -0400 Merge topic 'vs-15-preview-5' 02b7d278 VS: Update VS 15 generator for Preview 5 ----------------------------------------------------------------------- Summary of changes: Help/release/3.7.rst | 2 +- Source/cmGlobalVisualStudio15Generator.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:10:51 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:10:51 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-46-g9e7f9bb Message-ID: <20161007131051.475ACAFFE7@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 9e7f9bbf56b5d9201da0cc5b360555101c6c6a36 (commit) via 0c3a04777cc5fa8bc43b57b789e72630781ef56a (commit) via ebef3632c79491c402991967aab03a9c971cb70d (commit) from fadb812a52bbf14c7b4850e6a5fdd81405d8b5f5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9e7f9bbf56b5d9201da0cc5b360555101c6c6a36 commit 9e7f9bbf56b5d9201da0cc5b360555101c6c6a36 Merge: fadb812 0c3a047 Author: Brad King AuthorDate: Fri Oct 7 09:10:49 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:10:49 2016 -0400 Merge topic 'android-ndk-r13' 0c3a0477 Android: Update libc++ include directories for NDK r13 ebef3632 Android: Suppress -Wattributes warnings in test case builds ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android/ndk-stl-c++.cmake | 8 +++++++- Tests/RunCMake/Android/common.cmake | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:10:54 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:10:54 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-49-gf7fc932 Message-ID: <20161007131054.02DC5B0EB7@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 f7fc93281b81d0ae824f0ef4dbaae3ea5e9fb6a0 (commit) via 80574a38e6cb6ac33630e878d9633f1267b53d2b (commit) via f59e87792943904dcb11e16380883e87395d115f (commit) from 9e7f9bbf56b5d9201da0cc5b360555101c6c6a36 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f7fc93281b81d0ae824f0ef4dbaae3ea5e9fb6a0 commit f7fc93281b81d0ae824f0ef4dbaae3ea5e9fb6a0 Merge: 9e7f9bb 80574a3 Author: Brad King AuthorDate: Fri Oct 7 09:10:52 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:10:52 2016 -0400 Merge topic 'codelite-global-setting' 80574a38 Codelite: Consume the CMAKE_CODELITE_USE_TARGETS setting globally f59e8779 cmGlobalGenerator: Add API to get settings from top-level cmMakefile ----------------------------------------------------------------------- Summary of changes: Help/variable/CMAKE_CODELITE_USE_TARGETS.rst | 5 +++-- Source/cmExtraCodeLiteGenerator.cxx | 4 +--- Source/cmGlobalGenerator.cxx | 19 +++++++++++++++++++ Source/cmGlobalGenerator.h | 4 ++++ 4 files changed, 27 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:10:56 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:10:56 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-53-g89b0349 Message-ID: <20161007131056.8DDA3B0643@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 89b03498ef0005778260f4734e3102e8a5463ff0 (commit) via 0f1fedbd6a298cf9af2f36577cc66c4ee167be3d (commit) via 7f1cd3280cf484b5d565a12ae57022de018faa57 (commit) via 2597bcf831dae6a0a7a212607ea4b926ec6b10e0 (commit) from f7fc93281b81d0ae824f0ef4dbaae3ea5e9fb6a0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89b03498ef0005778260f4734e3102e8a5463ff0 commit 89b03498ef0005778260f4734e3102e8a5463ff0 Merge: f7fc932 0f1fedb Author: Brad King AuthorDate: Fri Oct 7 09:10:54 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:10:54 2016 -0400 Merge topic 'CMP0065-LINK_FLAGS' 0f1fedbd CMP0065: Put computed flags into LINK_FLAGS not LINK_LIBRARIES 7f1cd328 cmLocalGenerator: Rename local variable to be more appropriate 2597bcf8 cmLocalGenerator: Extract policy handling into a method ----------------------------------------------------------------------- Summary of changes: Source/cmLocalGenerator.cxx | 105 +++++++++++++----------- Source/cmLocalGenerator.h | 3 + Source/cmMakefileExecutableTargetGenerator.cxx | 5 ++ 3 files changed, 67 insertions(+), 46 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:10:59 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:10:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-68-g9c4d105 Message-ID: <20161007131059.906A2B14E8@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 9c4d105680c99e194c6d6063315ee2affd2a7b63 (commit) via 20e62f74c5a030a25fe1c3a6c835d67eea152d8f (commit) via fd93b3605bc931b5ce2386816973e106fa1ec646 (commit) via 1365e18b9b5ddfb5bc13da5bcdefeb566be12f08 (commit) via 1ed5f6b39b80ab337551f1fa9601b3257ddd4be7 (commit) via 8377d9e00b7a00f1687b947aaf3c9e10b6779df4 (commit) via 00173b71d97f81cc9db9b573998bd4359aa2c25b (commit) via d5911ef014fcffd14d397759ca638519733a48ad (commit) via c3264f48c2960325b9141d3ec58c6b49afe120c9 (commit) via 52168f3210ca07a8d80991958d588789c2693d63 (commit) via 5213f8936fd5a70e1f38939e5d1894e7fabb9e02 (commit) via b61c268bd04425597e2e9c5f213dea3cdad3cb19 (commit) via e278f5a84806a2b228182dc4a2cc98a1eaa19f8c (commit) via 51bc6bddb91283da25d098492c9cc1b50e3008fc (commit) via 8e0c1599a1015cf80c4db35d108509986236b756 (commit) from 89b03498ef0005778260f4734e3102e8a5463ff0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c4d105680c99e194c6d6063315ee2affd2a7b63 commit 9c4d105680c99e194c6d6063315ee2affd2a7b63 Merge: 89b0349 20e62f7 Author: Brad King AuthorDate: Fri Oct 7 09:10:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:10:57 2016 -0400 Merge topic 'cleanup-Convert' 20e62f74 cmLocalGenerator: Simplify ConvertToLinkReference fd93b360 cmOutputConverter: Add a flag for IsUnix 1365e18b Convert: Inline platform-specific methods 1ed5f6b3 Makefiles: Introduce local RelativePath method 8377d9e0 Fortran: Inline conversion to relative path 00173b71 Fortran: Wrap path convert in a call with a more-suitable name d5911ef0 Makefiles: Hardcode the relative location of the CMakeCache file c3264f48 Convert: Extract method to determine if paths are in directory 52168f32 Convert: Remove asserts which are duplicated in delegate method 5213f893 Convert: Remove early return check b61c268b Convert: Extract local variables for readability e278f5a8 Convert: Extract local variables 51bc6bdd cmOutputConverter: remove unused code 8e0c1599 Xcode: Inline ConvertToRelativePath calls ----------------------------------------------------------------------- Summary of changes: Source/cmCommonTargetGenerator.cxx | 6 +- Source/cmDependsFortran.cxx | 45 ++++++----- Source/cmDependsFortran.h | 3 + Source/cmGlobalUnixMakefileGenerator3.cxx | 6 +- Source/cmGlobalXCodeGenerator.cxx | 6 +- Source/cmLocalGenerator.cxx | 13 ++- Source/cmLocalGenerator.h | 4 +- Source/cmLocalNinjaGenerator.cxx | 5 +- Source/cmLocalNinjaGenerator.h | 4 +- Source/cmLocalUnixMakefileGenerator3.cxx | 33 +++++--- Source/cmLocalUnixMakefileGenerator3.h | 3 + Source/cmMakefileExecutableTargetGenerator.cxx | 22 +++--- Source/cmMakefileLibraryTargetGenerator.cxx | 26 +++--- Source/cmMakefileTargetGenerator.cxx | 42 +++++----- Source/cmMakefileUtilityTargetGenerator.cxx | 2 +- Source/cmOutputConverter.cxx | 100 +++++++++--------------- Source/cmOutputConverter.h | 36 +++------ 17 files changed, 167 insertions(+), 189 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:11:19 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:11:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-196-gf724cf9 Message-ID: <20161007131119.DB04AAFFF7@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 f724cf9c8d03d8e14a109bc99de497328936e992 (commit) via 9c4d105680c99e194c6d6063315ee2affd2a7b63 (commit) via 89b03498ef0005778260f4734e3102e8a5463ff0 (commit) via f7fc93281b81d0ae824f0ef4dbaae3ea5e9fb6a0 (commit) via 9e7f9bbf56b5d9201da0cc5b360555101c6c6a36 (commit) via fadb812a52bbf14c7b4850e6a5fdd81405d8b5f5 (commit) via ea563a27a2042cfb3be33d0f74efecc7687b86bb (commit) via 36e07e10176866c2ad07a58fd3ac30de81e0909d (commit) via 5553e330dc2015ec5b9f8e6573d9b58928bcb9e3 (commit) via 8c61544bb7ea017158e37e78cbbdbc943931824d (commit) from e9b966cea5838d928a1b67af26e693d77e3f259e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f724cf9c8d03d8e14a109bc99de497328936e992 commit f724cf9c8d03d8e14a109bc99de497328936e992 Merge: e9b966c 9c4d105 Author: Brad King AuthorDate: Fri Oct 7 09:11:07 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 09:11:07 2016 -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 Fri Oct 7 09:19:23 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:19:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-199-gb331083 Message-ID: <20161007131923.D360FE683A@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 b3310831a55d40848cb76dfbccf44c5179e916e0 (commit) via bb8cf5215680efe76f8197d52aa2620a8e939895 (commit) via 758f58b4a18fbb512edd1baf520017e816fee20b (commit) from f724cf9c8d03d8e14a109bc99de497328936e992 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3310831a55d40848cb76dfbccf44c5179e916e0 commit b3310831a55d40848cb76dfbccf44c5179e916e0 Merge: f724cf9 bb8cf52 Author: Brad King AuthorDate: Fri Oct 7 09:19:22 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:19:22 2016 -0400 Merge topic 'cpack-rpm-single-debuginfo' into next bb8cf521 CPack/RPM single debuginfo packaging 758f58b4 CPack/RPM learned defining main component https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb8cf5215680efe76f8197d52aa2620a8e939895 commit bb8cf5215680efe76f8197d52aa2620a8e939895 Author: Domen Vrankar AuthorDate: Thu Oct 6 08:33:16 2016 +0200 Commit: Brad King CommitDate: Fri Oct 7 09:19:04 2016 -0400 CPack/RPM single debuginfo packaging Generate a single debuginfo package even if components packaging is enabled. This makes issue #15668 resolution feature complete. Closes: #15486 diff --git a/Help/release/dev/cpack-rpm-single-debuginfo.rst b/Help/release/dev/cpack-rpm-single-debuginfo.rst index 281a988..34a710d 100644 --- a/Help/release/dev/cpack-rpm-single-debuginfo.rst +++ b/Help/release/dev/cpack-rpm-single-debuginfo.rst @@ -5,3 +5,7 @@ cpack-rpm-single-debuginfo which forces generation of a rpm for defined component without component suffix in filename and package name. See :variable:`CPACK_RPM_MAIN_COMPONENT` variable. + +* The :module:`CPackRPM` module learned to generate a single debuginfo package + on demand even if components packagin is used. + See :variable:`CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE` variable. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 2c8c0e0..6017ce3 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -803,6 +803,26 @@ # * Mandatory : NO # * Default : - # +# .. variable:: CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE +# +# Create a single debuginfo package even if components packaging is set. +# +# * Mandatory : NO +# * Default : OFF +# +# When this variable is enabled it produces a single debuginfo package even if +# component packaging is enabled. +# +# When using this feature in combination with components packaging and there is +# more than one component this variable requires :variable:`CPACK_RPM_MAIN_COMPONENT` +# to be set. +# +# .. note:: +# +# If none of the :variable:`CPACK_RPM__DEBUGINFO_PACKAGE` variables +# is set then :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is automatically set to +# ``ON`` when :variable:`CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE` is set. +# # Packaging of sources (SRPM) # ^^^^^^^^^^^^^^^^^^^^^^^^^^^ # @@ -2076,7 +2096,7 @@ function(cpack_rpm_generate_package) "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_DEBUGINFO_PACKAGE" "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_DEBUGINFO_PACKAGE" "CPACK_RPM_DEBUGINFO_PACKAGE") - if(CPACK_RPM_DEBUGINFO_PACKAGE) + if(CPACK_RPM_DEBUGINFO_PACKAGE OR (CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE AND NOT GENERATE_SPEC_PARTS)) cpack_rpm_variable_fallback("CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX" "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_BUILD_SOURCE_DIRS_PREFIX" "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_BUILD_SOURCE_DIRS_PREFIX" @@ -2084,9 +2104,81 @@ function(cpack_rpm_generate_package) if(NOT CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX) set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}") endif() - cpack_rpm_debugsymbol_check("${CPACK_RPM_INSTALL_FILES}" "${WDIR}") - set(TMP_RPM_DEBUGINFO " + if(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE AND GENERATE_SPEC_PARTS) + file(WRITE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_COMPONENT}.files" + "${CPACK_RPM_INSTALL_FILES}") + else() + if(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE AND CPACK_RPM_PACKAGE_COMPONENT) + # this part is only required by components packaging - with monolithic + # packages we can be certain that there are no other components present + # so CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE is a noop + if(CPACK_RPM_DEBUGINFO_PACKAGE) + # only add current package files to debuginfo list if debuginfo + # generation is enabled for current package + set(install_files_ "${CPACK_RPM_INSTALL_FILES}") + else() + unset(install_files_) + endif() + + file(GLOB files_ "${CPACK_RPM_DIRECTORY}/SPECS/*.files") + + foreach(f_ IN LISTS files_) + file(READ "${f_}" tmp_) + string(APPEND install_files_ ";${tmp_}") + endforeach() + + # if there were other components/groups so we need to move files from them + # to current component otherwise those files won't be found + file(GLOB components_ LIST_DIRECTORIES true RELATIVE + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}" + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/*") + foreach(component_ IN LISTS components_) + string(TOUPPER "${component_}" component_dir_upper_) + if(component_dir_upper_ STREQUAL CPACK_RPM_PACKAGE_COMPONENT_UPPER) + # skip current component + continue() + endif() + + cmake_policy(PUSH) + cmake_policy(SET CMP0009 NEW) + file(GLOB_RECURSE files_for_move_ LIST_DIRECTORIES false RELATIVE + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}" + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}/*") + cmake_policy(POP) + + foreach(f_ IN LISTS files_for_move_) + get_filename_component(dir_path_ "${f_}" DIRECTORY) + set(src_file_ + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}/${f_}") + + # check that we are not overriding an existing file that doesn't + # match the file that we want to copy + if(EXISTS "${src_file_}" AND EXISTS "${WDIR}/${f_}") + execute_process( + COMMAND ${CMAKE_COMMAND} -E compare_files "${src_file_}" "${WDIR}/${f_}" + RESULT_VARIABLE res_ + ) + if(res_) + message(FATAL_ERROR "CPackRPM:Error: File on path '${WDIR}/${f_}'" + " already exists but is a different than the one in component" + " '${component_}'! Packages will not be generated.") + endif() + endif() + + file(MAKE_DIRECTORY "${WDIR}/${dir_path_}") + file(RENAME "${src_file_}" + "${WDIR}/${f_}") + endforeach() + endforeach() + + cpack_rpm_debugsymbol_check("${install_files_}" "${WDIR}") + else() + cpack_rpm_debugsymbol_check("${CPACK_RPM_INSTALL_FILES}" "${WDIR}") + endif() + + if(TMP_DEBUGINFO_ADDITIONAL_SOURCES) + set(TMP_RPM_DEBUGINFO " # Modified version of %%debug_package macro # defined in /usr/lib/rpm/macros as that one # can't handle injection of extra source files. @@ -2105,6 +2197,15 @@ package or when debugging this package. ${TMP_DEBUGINFO_ADDITIONAL_SOURCES} %endif ") + elseif(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE) + message(AUTHOR_WARNING "CPackRPM:Warning: debuginfo package was requested" + " but will not be generated as no source files were found!") + else() + message(AUTHOR_WARNING "CPackRPM:Warning: debuginfo package was requested" + " but will not be generated as no source files were found! Component: '" + "${CPACK_RPM_PACKAGE_COMPONENT}'.") + endif() + endif() endif() # Prepare install files @@ -2194,7 +2295,12 @@ ${TMP_DEBUGINFO_ADDITIONAL_SOURCES} # else example: #set(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${CPACK_RPM_PACKAGE_ARCHITECTURE}.rpm") - if(NOT CPACK_RPM_DEBUGINFO_PACKAGE) + if(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE AND GENERATE_SPEC_PARTS) + string(TOLOWER "${CPACK_RPM_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.*\\.rpm" expected_filename_) + + file(WRITE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_COMPONENT}.rpm_name" + "${expected_filename_};${CPACK_RPM_FILE_NAME}") + elseif(NOT CPACK_RPM_DEBUGINFO_PACKAGE) set(FILE_NAME_DEFINE "%define _rpmfilename ${CPACK_RPM_FILE_NAME}") endif() endif() @@ -2289,7 +2395,54 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ \@CPACK_RPM_SPEC_CHANGELOG\@ " ) + + elseif(GENERATE_SPEC_PARTS) # binary rpm with single debuginfo package + file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in + "# -*- rpm-spec -*- +%package -n \@CPACK_RPM_PACKAGE_NAME\@ +Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@ +Version: \@CPACK_RPM_PACKAGE_VERSION\@ +Release: \@CPACK_RPM_PACKAGE_RELEASE\@ +License: \@CPACK_RPM_PACKAGE_LICENSE\@ +Group: \@CPACK_RPM_PACKAGE_GROUP\@ +Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ + +\@TMP_RPM_URL\@ +\@TMP_RPM_REQUIRES\@ +\@TMP_RPM_REQUIRES_PRE\@ +\@TMP_RPM_REQUIRES_POST\@ +\@TMP_RPM_REQUIRES_PREUN\@ +\@TMP_RPM_REQUIRES_POSTUN\@ +\@TMP_RPM_PROVIDES\@ +\@TMP_RPM_OBSOLETES\@ +\@TMP_RPM_CONFLICTS\@ +\@TMP_RPM_AUTOPROV\@ +\@TMP_RPM_AUTOREQ\@ +\@TMP_RPM_AUTOREQPROV\@ +\@TMP_RPM_BUILDARCH\@ +\@TMP_RPM_PREFIXES\@ + +%description -n \@CPACK_RPM_PACKAGE_NAME\@ +\@CPACK_RPM_PACKAGE_DESCRIPTION\@ + +%files -n \@CPACK_RPM_PACKAGE_NAME\@ +%defattr(\@TMP_DEFAULT_FILE_PERMISSIONS\@,\@TMP_DEFAULT_USER\@,\@TMP_DEFAULT_GROUP\@,\@TMP_DEFAULT_DIR_PERMISSIONS\@) +\@CPACK_RPM_INSTALL_FILES\@ +\@CPACK_RPM_ABSOLUTE_INSTALL_FILES\@ +\@CPACK_RPM_USER_INSTALL_FILES\@ +" + ) + else() # binary rpm + if(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE) + # find generated spec file and take its name + file(GLOB spec_files_ "${CPACK_RPM_DIRECTORY}/SPECS/*.spec") + + foreach(f_ IN LISTS spec_files_) + file(READ "${f_}" tmp_) + string(APPEND TMP_OTHER_COMPONENTS "\n${tmp_}\n") + endforeach() + endif() # We should generate a USER spec file template: # - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE @@ -2375,6 +2528,8 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT %changelog \@CPACK_RPM_SPEC_CHANGELOG\@ + +\@TMP_OTHER_COMPONENTS\@ " ) endif() @@ -2401,60 +2556,90 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT configure_file(${CPACK_RPM_BINARY_SPECFILE}.in ${CPACK_RPM_BINARY_SPECFILE} @ONLY) endif() - if(RPMBUILD_EXECUTABLE) - # Now call rpmbuild using the SPECFILE - execute_process( - COMMAND "${RPMBUILD_EXECUTABLE}" ${RPMBUILD_FLAGS} - --define "_topdir ${CPACK_RPM_DIRECTORY}" - --buildroot "%_topdir/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" - --target "${CPACK_RPM_PACKAGE_ARCHITECTURE}" - "${CPACK_RPM_BINARY_SPECFILE}" - WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" - RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT - ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err" - OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out") - if(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT) - file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err RPMBUILDERR) - file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out RPMBUILDOUT) - message("CPackRPM:Debug: You may consult rpmbuild logs in: ") - message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err") - message("CPackRPM:Debug: *** ${RPMBUILDERR} ***") - message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out") - message("CPackRPM:Debug: *** ${RPMBUILDOUT} ***") + if(NOT GENERATE_SPEC_PARTS) # generate package + if(RPMBUILD_EXECUTABLE) + # Now call rpmbuild using the SPECFILE + execute_process( + COMMAND "${RPMBUILD_EXECUTABLE}" ${RPMBUILD_FLAGS} + --define "_topdir ${CPACK_RPM_DIRECTORY}" + --buildroot "%_topdir/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" + --target "${CPACK_RPM_PACKAGE_ARCHITECTURE}" + "${CPACK_RPM_BINARY_SPECFILE}" + WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" + RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT + ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err" + OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out") + if(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT) + file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err RPMBUILDERR) + file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out RPMBUILDOUT) + message("CPackRPM:Debug: You may consult rpmbuild logs in: ") + message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err") + message("CPackRPM:Debug: *** ${RPMBUILDERR} ***") + message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out") + message("CPackRPM:Debug: *** ${RPMBUILDOUT} ***") + endif() + else() + if(ALIEN_EXECUTABLE) + message(FATAL_ERROR "RPM packaging through alien not done (yet)") + endif() endif() - else() - if(ALIEN_EXECUTABLE) - message(FATAL_ERROR "RPM packaging through alien not done (yet)") + + # find generated rpm files and take their names + cmake_policy(PUSH) + # Tell file(GLOB_RECURSE) not to follow directory symlinks + # even if the project does not set this policy to NEW. + cmake_policy(SET CMP0009 NEW) + file(GLOB_RECURSE GENERATED_FILES "${CPACK_RPM_DIRECTORY}/RPMS/*.rpm" + "${CPACK_RPM_DIRECTORY}/SRPMS/*.rpm") + cmake_policy(POP) + + if(NOT GENERATED_FILES) + message(FATAL_ERROR "RPM package was not generated! ${CPACK_RPM_DIRECTORY}") endif() - endif() - # find generated rpm files and take their names - cmake_policy(PUSH) - # Tell file(GLOB_RECURSE) not to follow directory symlinks - # even if the project does not set this policy to NEW. - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE GENERATED_FILES "${CPACK_RPM_DIRECTORY}/RPMS/*.rpm" - "${CPACK_RPM_DIRECTORY}/SRPMS/*.rpm") - cmake_policy(POP) + unset(expected_filenames_) + unset(filenames_) + if(CPACK_RPM_DEBUGINFO_PACKAGE AND NOT CPACK_RPM_FILE_NAME STREQUAL "RPM-DEFAULT") + string(TOLOWER "${CPACK_RPM_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.*\\.rpm" efn_) + list(APPEND expected_filenames_ "${efn_}") + list(APPEND filenames_ "${CPACK_RPM_FILE_NAME}") + endif() - if(NOT GENERATED_FILES) - message(FATAL_ERROR "RPM package was not generated! ${CPACK_RPM_DIRECTORY}") - endif() + # check if other files have to be renamed + file(GLOB rename_files_ "${CPACK_RPM_DIRECTORY}/SPECS/*.rpm_name") + if(rename_files_) + foreach(f_ IN LISTS rename_files_) + file(READ "${f_}" tmp_) + list(GET tmp_ 0 efn_) + list(APPEND expected_filenames_ "${efn_}") + list(GET tmp_ 1 fn_) + list(APPEND filenames_ "${fn_}") + endforeach() + endif() - if(CPACK_RPM_DEBUGINFO_PACKAGE AND NOT CPACK_RPM_FILE_NAME STREQUAL "RPM-DEFAULT") - string(TOLOWER "${CPACK_RPM_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.*\\.rpm" EXPECTED_FILENAME) + if(expected_filenames_) + foreach(F IN LISTS GENERATED_FILES) + unset(matched_) + foreach(expected_ IN LISTS expected_filenames_) + if(F MATCHES ".*/${expected_}") + list(FIND expected_filenames_ "${expected_}" idx_) + list(GET filenames_ ${idx_} filename_) + get_filename_component(FILE_PATH "${F}" DIRECTORY) + file(RENAME "${F}" "${FILE_PATH}/${filename_}") + list(APPEND new_files_list_ "${FILE_PATH}/${filename_}") + set(matched_ "YES") + + break() + endif() + endforeach() - foreach(F IN LISTS GENERATED_FILES) - if(F MATCHES ".*/${EXPECTED_FILENAME}") - get_filename_component(FILE_PATH "${F}" DIRECTORY) - file(RENAME "${F}" "${FILE_PATH}/${CPACK_RPM_FILE_NAME}") - list(APPEND new_files_list_ "${FILE_PATH}/${CPACK_RPM_FILE_NAME}") - else() - list(APPEND new_files_list_ "${F}") - endif() - endforeach() + if(NOT matched_) + list(APPEND new_files_list_ "${F}") + endif() + endforeach() - set(GENERATED_FILES "${new_files_list_}") + set(GENERATED_FILES "${new_files_list_}") + endif() endif() set(GEN_CPACK_OUTPUT_FILES "${GENERATED_FILES}" PARENT_SCOPE) diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index 7f89d5e..9817327 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -107,7 +107,78 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) const char* mainComponent = this->GetOption("CPACK_RPM_MAIN_COMPONENT"); + if (this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE") && + !this->IsOn("CPACK_RPM_DEBUGINFO_PACKAGE")) { + // check if we need to set CPACK_RPM_DEBUGINFO_PACKAGE because non of + // the components is setting per component debuginfo package variable + bool shouldSet = true; + + if (ignoreGroup) { + std::map::iterator compIt; + for (compIt = this->Components.begin(); compIt != this->Components.end(); + ++compIt) { + std::string component(compIt->first); + std::transform(component.begin(), component.end(), component.begin(), + ::toupper); + + if (this->IsOn("CPACK_RPM_" + compIt->first + "_DEBUGINFO_PACKAGE") || + this->IsOn("CPACK_RPM_" + component + "_DEBUGINFO_PACKAGE")) { + shouldSet = false; + break; + } + } + } else { + std::map::iterator compGIt; + for (compGIt = this->ComponentGroups.begin(); + compGIt != this->ComponentGroups.end(); ++compGIt) { + std::string component(compGIt->first); + std::transform(component.begin(), component.end(), component.begin(), + ::toupper); + + if (this->IsOn("CPACK_RPM_" + compGIt->first + "_DEBUGINFO_PACKAGE") || + this->IsOn("CPACK_RPM_" + component + "_DEBUGINFO_PACKAGE")) { + shouldSet = false; + break; + } + } + + if (shouldSet) { + std::map::iterator compIt; + for (compIt = this->Components.begin(); + compIt != this->Components.end(); ++compIt) { + // Does the component belong to a group? + if (compIt->second.Group == CM_NULLPTR) { + std::string component(compIt->first); + std::transform(component.begin(), component.end(), + component.begin(), ::toupper); + + if (this->IsOn("CPACK_RPM_" + compIt->first + + "_DEBUGINFO_PACKAGE") || + this->IsOn("CPACK_RPM_" + component + "_DEBUGINFO_PACKAGE")) { + shouldSet = false; + break; + } + } + } + } + } + + if (shouldSet) { + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Setting " + << "CPACK_RPM_DEBUGINFO_PACKAGE because " + << "CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE is set but " + << " none of the " + << "CPACK_RPM__DEBUGINFO_PACKAGE variables " + << "are set." << std::endl); + this->SetOption("CPACK_RPM_DEBUGINFO_PACKAGE", "ON"); + } + } + if (mainComponent) { + if (this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE")) { + this->SetOption("GENERATE_SPEC_PARTS", "ON"); + } + std::string mainComponentUpper(mainComponent); std::transform(mainComponentUpper.begin(), mainComponentUpper.end(), mainComponentUpper.begin(), ::toupper); @@ -163,6 +234,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) } if (retval) { + this->SetOption("GENERATE_SPEC_PARTS", "OFF"); + if (mainCompGIt != this->ComponentGroups.end()) { retval &= PackageOnePack(initialTopLevel, mainCompGIt->first); } else if (mainCompIt != this->Components.end()) { @@ -197,6 +270,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) } if (retval) { + this->SetOption("GENERATE_SPEC_PARTS", "OFF"); + if (mainCompIt != this->Components.end()) { retval &= PackageOnePack(initialTopLevel, mainCompIt->first); } else { @@ -206,7 +281,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) } } } - } else { + } else if (!this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE") || + this->Components.size() == 1) { // The default behavior is to have one package by component group // unless CPACK_COMPONENTS_IGNORE_GROUP is specified. if (!ignoreGroup) { @@ -241,6 +317,12 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) retval &= PackageOnePack(initialTopLevel, compIt->first); } } + } else { + cmCPackLogger( + cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT not set but" + << " it is mandatory with CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE" + << " being set.\n"); + retval = 0; } if (retval) { @@ -259,6 +341,10 @@ int cmCPackRPMGenerator::PackageComponentsAllInOne( packageFileNames.clear(); std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY")); + if (this->IsOn("CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE")) { + this->SetOption("CPACK_RPM_DEBUGINFO_PACKAGE", "ON"); + } + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging all groups in one package..." "(CPACK_COMPONENTS_ALL_[GROUPS_]IN_ONE_PACKAGE is set)" diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake new file mode 100644 index 0000000..dc49343 --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake @@ -0,0 +1,30 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "0") + +if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_debuginfo") + set(EXPECTED_FILES_COUNT "4") + set(EXPECTED_FILE_1 "single_debuginfo-0.1.1-1.*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") + set(EXPECTED_FILE_2 "single_debuginfo*-headers.rpm") + set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") + set(EXPECTED_FILE_3 "single_debuginfo*-libs.rpm") + set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/libtest_lib.so$") + + set(EXPECTED_FILE_4 "single_debuginfo-debuginfo*.rpm") + set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp${whitespaces_}/src/src_1/test_lib.cpp.*") +elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component" OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_no_debuginfo") + set(EXPECTED_FILES_COUNT "2") + set(EXPECTED_FILE_1 "single_debuginfo-0*-applications.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") + + set(EXPECTED_FILE_2 "single_debuginfo-applications-debuginfo*.rpm") + set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") +elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_main" OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_components") + set(EXPECTED_FILES_COUNT "2") + set(EXPECTED_FILE_1 "single_debuginfo-0*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$") + + set(EXPECTED_FILE_2 "single_debuginfo-debuginfo*.rpm") + set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") +endif() diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_components-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_components-stderr.txt new file mode 100644 index 0000000..d80939f --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_components-stderr.txt @@ -0,0 +1 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-no_components-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo.spec$ diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_debuginfo-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_debuginfo-stderr.txt new file mode 100644 index 0000000..86396db --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_debuginfo-stderr.txt @@ -0,0 +1,3 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-no_debuginfo-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-headers.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-no_debuginfo-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-libs.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-no_debuginfo-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo.spec$ diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_main_component-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_main_component-stderr.txt new file mode 100644 index 0000000..454283c --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_main_component-stderr.txt @@ -0,0 +1 @@ +CPack Error: CPACK_RPM_MAIN_COMPONENT not set but it is mandatory with CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE being set. diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component-stderr.txt new file mode 100644 index 0000000..080c4ff --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component-stderr.txt @@ -0,0 +1 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-one_component-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-applications.spec$ diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_main-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_main-stderr.txt new file mode 100644 index 0000000..665597c --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_main-stderr.txt @@ -0,0 +1 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-one_component_main-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo.spec$ diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_no_debuginfo-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_no_debuginfo-stderr.txt new file mode 100644 index 0000000..b64b1f5 --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_no_debuginfo-stderr.txt @@ -0,0 +1 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-one_component_no_debuginfo-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-applications.spec$ diff --git a/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-valid-stderr.txt b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-valid-stderr.txt new file mode 100644 index 0000000..f4c1bef --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-valid-stderr.txt @@ -0,0 +1,3 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-valid-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-headers.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-valid-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo-libs.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/SINGLE_DEBUGINFO-build-valid-subtest/_CPack_Packages/.*/RPM/SPECS/single_debuginfo.spec$ diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 45dbcea..474ee33 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -19,5 +19,6 @@ run_cpack_test(INSTALL_SCRIPTS "RPM" false) run_cpack_test(DEB_GENERATE_SHLIBS "DEB" true) run_cpack_test(DEB_GENERATE_SHLIBS_LDCONFIG "DEB" true) run_cpack_test(DEBUGINFO "RPM" true) +run_cpack_test_subtests(SINGLE_DEBUGINFO "no_main_component;one_component;one_component_main;no_debuginfo;one_component_no_debuginfo;no_components;valid" "RPM" true) run_cpack_test(LONG_FILENAMES "DEB" false) run_cpack_test_subtests(PACKAGE_CHECKSUM "invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false) diff --git a/Tests/RunCMake/CPack/SINGLE_DEBUGINFO.cmake b/Tests/RunCMake/CPack/SINGLE_DEBUGINFO.cmake new file mode 100644 index 0000000..ae4995e --- /dev/null +++ b/Tests/RunCMake/CPack/SINGLE_DEBUGINFO.cmake @@ -0,0 +1,56 @@ +set(CMAKE_BUILD_WITH_INSTALL_RPATH 1) + +# PGI compiler doesn't add build id to binaries by default +if(CMAKE_CXX_COMPILER_ID STREQUAL "PGI") + string(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--build-id") + string(APPEND CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id") +endif() + +if(NOT RunCMake_SUBTEST_SUFFIX STREQUAL "no_components") + set(CPACK_RPM_COMPONENT_INSTALL "ON") +endif() + +set(CMAKE_BUILD_TYPE Debug) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.hpp" + "int test_lib();\n") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp" + "#include \"test_lib.hpp\"\nint test_lib() {return 0;}\n") +add_library(test_lib SHARED "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp") + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp" + "#include \"test_lib.hpp\"\nint main() {return test_lib();}\n") +add_executable(test_prog "${CMAKE_CURRENT_BINARY_DIR}/main.cpp") +target_link_libraries(test_prog test_lib) + +install(TARGETS test_prog DESTINATION foo COMPONENT applications) + +if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_main_component" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_debuginfo") + install(FILES CMakeLists.txt DESTINATION bar COMPONENT headers) + install(TARGETS test_lib DESTINATION bas COMPONENT libs) +elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_no_debuginfo") + set(CPACK_COMPONENTS_ALL applications) +endif() + +set(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE ON) + +if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_main" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_debuginfo") + set(CPACK_RPM_MAIN_COMPONENT "applications") + set(CPACK_RPM_APPLICATIONS_FILE_NAME "RPM-DEFAULT") +endif() + +if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_main_component" + OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component") + set(CPACK_RPM_APPLICATIONS_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_LIBS_DEBUGINFO_PACKAGE ON) +endif() + +set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/src") + +set(CPACK_PACKAGE_NAME "single_debuginfo") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=758f58b4a18fbb512edd1baf520017e816fee20b commit 758f58b4a18fbb512edd1baf520017e816fee20b Author: Domen Vrankar AuthorDate: Wed Oct 5 00:43:28 2016 +0200 Commit: Brad King CommitDate: Fri Oct 7 09:19:04 2016 -0400 CPack/RPM learned defining main component Main component rpm package is generated without component suffix in filename and package name. diff --git a/Help/release/dev/cpack-rpm-single-debuginfo.rst b/Help/release/dev/cpack-rpm-single-debuginfo.rst new file mode 100644 index 0000000..281a988 --- /dev/null +++ b/Help/release/dev/cpack-rpm-single-debuginfo.rst @@ -0,0 +1,7 @@ +cpack-rpm-single-debuginfo +-------------------------- + +* The :module:`CPackRPM` module learned to generate main component package + which forces generation of a rpm for defined component without component + suffix in filename and package name. + See :variable:`CPACK_RPM_MAIN_COMPONENT` variable. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 15b62c7..2c8c0e0 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -95,6 +95,17 @@ # and it is up to the packager to set the variables in a manner that will # prevent such errors. # +# .. variable:: CPACK_RPM_MAIN_COMPONENT +# +# Main component that is packaged without component suffix. +# +# * Mandatory : NO +# * Default : - +# +# This variable can be set to any component or group name so that component or +# group rpm package is generated without component suffix in filename and +# package name. +# # .. variable:: CPACK_RPM_PACKAGE_VERSION # # The RPM package version. @@ -1649,10 +1660,16 @@ function(cpack_rpm_generate_package) endif() if(CPACK_RPM_PACKAGE_COMPONENT) - string(APPEND CPACK_RPM_PACKAGE_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}") - cpack_rpm_variable_fallback("CPACK_RPM_PACKAGE_NAME" - "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_NAME" - "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_PACKAGE_NAME") + string(TOUPPER "${CPACK_RPM_MAIN_COMPONENT}" + CPACK_RPM_MAIN_COMPONENT_UPPER) + + if(NOT CPACK_RPM_MAIN_COMPONENT_UPPER STREQUAL CPACK_RPM_PACKAGE_COMPONENT_UPPER) + string(APPEND CPACK_RPM_PACKAGE_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}") + + cpack_rpm_variable_fallback("CPACK_RPM_PACKAGE_NAME" + "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_NAME" + "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_PACKAGE_NAME") + endif() endif() # CPACK_RPM_PACKAGE_VERSION (mandatory) @@ -2164,7 +2181,15 @@ ${TMP_DEBUGINFO_ADDITIONAL_SOURCES} cmake_policy(POP) else() # old file name format for back compatibility - set(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}") + string(TOUPPER "${CPACK_RPM_MAIN_COMPONENT}" + CPACK_RPM_MAIN_COMPONENT_UPPER) + + if(CPACK_RPM_MAIN_COMPONENT_UPPER STREQUAL CPACK_RPM_PACKAGE_COMPONENT_UPPER) + # this is the main component so ignore the component filename part + set(CPACK_RPM_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.rpm") + else() + set(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}") + endif() endif() # else example: #set(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${CPACK_RPM_PACKAGE_ARCHITECTURE}.rpm") diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index bd55206..7f89d5e 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -105,38 +105,141 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup) packageFileNames.clear(); std::string initialTopLevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY")); - // The default behavior is to have one package by component group - // unless CPACK_COMPONENTS_IGNORE_GROUP is specified. - if (!ignoreGroup) { - std::map::iterator compGIt; - for (compGIt = this->ComponentGroups.begin(); - compGIt != this->ComponentGroups.end(); ++compGIt) { - cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: " - << compGIt->first << std::endl); - retval &= PackageOnePack(initialTopLevel, compGIt->first); + const char* mainComponent = this->GetOption("CPACK_RPM_MAIN_COMPONENT"); + + if (mainComponent) { + std::string mainComponentUpper(mainComponent); + std::transform(mainComponentUpper.begin(), mainComponentUpper.end(), + mainComponentUpper.begin(), ::toupper); + + // The default behavior is to have one package by component group + // unless CPACK_COMPONENTS_IGNORE_GROUP is specified. + if (!ignoreGroup) { + std::map::iterator mainCompGIt = + this->ComponentGroups.end(); + + std::map::iterator compGIt; + for (compGIt = this->ComponentGroups.begin(); + compGIt != this->ComponentGroups.end(); ++compGIt) { + std::string component(compGIt->first); + std::transform(component.begin(), component.end(), component.begin(), + ::toupper); + + if (mainComponentUpper == component) { + // main component will be handled last + mainCompGIt = compGIt; + continue; + } + + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: " + << compGIt->first << std::endl); + retval &= PackageOnePack(initialTopLevel, compGIt->first); + } + // Handle Orphan components (components not belonging to any groups) + std::map::iterator mainCompIt = + this->Components.end(); + std::map::iterator compIt; + for (compIt = this->Components.begin(); compIt != this->Components.end(); + ++compIt) { + // Does the component belong to a group? + if (compIt->second.Group == CM_NULLPTR) { + std::string component(compIt->first); + std::transform(component.begin(), component.end(), component.begin(), + ::toupper); + + if (mainComponentUpper == component) { + // main component will be handled last + mainCompIt = compIt; + continue; + } + + cmCPackLogger( + cmCPackLog::LOG_VERBOSE, "Component <" + << compIt->second.Name + << "> does not belong to any group, package it separately." + << std::endl); + retval &= PackageOnePack(initialTopLevel, compIt->first); + } + } + + if (retval) { + if (mainCompGIt != this->ComponentGroups.end()) { + retval &= PackageOnePack(initialTopLevel, mainCompGIt->first); + } else if (mainCompIt != this->Components.end()) { + retval &= PackageOnePack(initialTopLevel, mainCompIt->first); + } else { + cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT set" + << " to non existing component.\n"); + retval = 0; + } + } } - // Handle Orphan components (components not belonging to any groups) - std::map::iterator compIt; - for (compIt = this->Components.begin(); compIt != this->Components.end(); - ++compIt) { - // Does the component belong to a group? - if (compIt->second.Group == CM_NULLPTR) { - cmCPackLogger( - cmCPackLog::LOG_VERBOSE, "Component <" - << compIt->second.Name - << "> does not belong to any group, package it separately." - << std::endl); + // CPACK_COMPONENTS_IGNORE_GROUPS is set + // We build 1 package per component + else { + std::map::iterator mainCompIt = + this->Components.end(); + + std::map::iterator compIt; + for (compIt = this->Components.begin(); compIt != this->Components.end(); + ++compIt) { + std::string component(compIt->first); + std::transform(component.begin(), component.end(), component.begin(), + ::toupper); + + if (mainComponentUpper == component) { + // main component will be handled last + mainCompIt = compIt; + continue; + } + retval &= PackageOnePack(initialTopLevel, compIt->first); } + + if (retval) { + if (mainCompIt != this->Components.end()) { + retval &= PackageOnePack(initialTopLevel, mainCompIt->first); + } else { + cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT set" + << " to non existing component.\n"); + retval = 0; + } + } } - } - // CPACK_COMPONENTS_IGNORE_GROUPS is set - // We build 1 package per component - else { - std::map::iterator compIt; - for (compIt = this->Components.begin(); compIt != this->Components.end(); - ++compIt) { - retval &= PackageOnePack(initialTopLevel, compIt->first); + } else { + // The default behavior is to have one package by component group + // unless CPACK_COMPONENTS_IGNORE_GROUP is specified. + if (!ignoreGroup) { + std::map::iterator compGIt; + for (compGIt = this->ComponentGroups.begin(); + compGIt != this->ComponentGroups.end(); ++compGIt) { + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: " + << compGIt->first << std::endl); + retval &= PackageOnePack(initialTopLevel, compGIt->first); + } + // Handle Orphan components (components not belonging to any groups) + std::map::iterator compIt; + for (compIt = this->Components.begin(); compIt != this->Components.end(); + ++compIt) { + // Does the component belong to a group? + if (compIt->second.Group == CM_NULLPTR) { + cmCPackLogger( + cmCPackLog::LOG_VERBOSE, "Component <" + << compIt->second.Name + << "> does not belong to any group, package it separately." + << std::endl); + retval &= PackageOnePack(initialTopLevel, compIt->first); + } + } + } + // CPACK_COMPONENTS_IGNORE_GROUPS is set + // We build 1 package per component + else { + std::map::iterator compIt; + for (compIt = this->Components.begin(); compIt != this->Components.end(); + ++compIt) { + retval &= PackageOnePack(initialTopLevel, compIt->first); + } } } diff --git a/Tests/RunCMake/CPack/MAIN_COMPONENT.cmake b/Tests/RunCMake/CPack/MAIN_COMPONENT.cmake new file mode 100644 index 0000000..99c6cae --- /dev/null +++ b/Tests/RunCMake/CPack/MAIN_COMPONENT.cmake @@ -0,0 +1,14 @@ +set(CPACK_RPM_COMPONENT_INSTALL "ON") + +install(FILES CMakeLists.txt DESTINATION foo COMPONENT applications) +install(FILES CMakeLists.txt DESTINATION bar COMPONENT headers) +install(FILES CMakeLists.txt DESTINATION bas COMPONENT libs) + +if(RunCMake_SUBTEST_SUFFIX STREQUAL "invalid") + set(CPACK_RPM_MAIN_COMPONENT "") +else() + set(CPACK_RPM_MAIN_COMPONENT "applications") + set(CPACK_RPM_APPLICATIONS_FILE_NAME "RPM-DEFAULT") +endif() + +set(CPACK_PACKAGE_NAME "main_component") diff --git a/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake new file mode 100644 index 0000000..69603dd --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake @@ -0,0 +1,13 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "0") + +if(NOT RunCMake_SUBTEST_SUFFIX STREQUAL "invalid") + set(EXPECTED_FILES_COUNT "3") + set(EXPECTED_FILE_1 "main_component-0.1.1-1.*.rpm") + set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") + set(EXPECTED_FILE_2 "main_component*-headers.rpm") + set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$") + set(EXPECTED_FILE_3 "main_component*-libs.rpm") + set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/CMakeLists.txt$") +endif() diff --git a/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-found-stderr.txt b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-found-stderr.txt new file mode 100644 index 0000000..dff163d --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-found-stderr.txt @@ -0,0 +1,3 @@ +^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/MAIN_COMPONENT-build-found-subtest/_CPack_Packages/.*/RPM/SPECS/main_component-headers.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/MAIN_COMPONENT-build-found-subtest/_CPack_Packages/.*/RPM/SPECS/main_component-libs.spec +CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/MAIN_COMPONENT-build-found-subtest/_CPack_Packages/.*/RPM/SPECS/main_component.spec$ diff --git a/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-invalid-stderr.txt b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-invalid-stderr.txt new file mode 100644 index 0000000..4d8ac6e --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-invalid-stderr.txt @@ -0,0 +1 @@ +CPACK_RPM_MAIN_COMPONENT set to non existing component. diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 60d42ac..45dbcea 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -12,6 +12,7 @@ run_cpack_test(DEPENDENCIES "RPM;DEB" true) run_cpack_test(EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(COMPONENTS_EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(CUSTOM_NAMES "RPM;DEB" true) +run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM" false) run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false) run_cpack_test(RPM_DIST "RPM" false) run_cpack_test(INSTALL_SCRIPTS "RPM" false) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:22:07 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:22:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-71-gcb5cadf Message-ID: <20161007132207.83987F22AA@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 cb5cadf3c79bf2d80dbd1e2f5602ed709fe25ef5 (commit) via bb8cf5215680efe76f8197d52aa2620a8e939895 (commit) via 758f58b4a18fbb512edd1baf520017e816fee20b (commit) from 9c4d105680c99e194c6d6063315ee2affd2a7b63 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb5cadf3c79bf2d80dbd1e2f5602ed709fe25ef5 commit cb5cadf3c79bf2d80dbd1e2f5602ed709fe25ef5 Merge: 9c4d105 bb8cf52 Author: Brad King AuthorDate: Fri Oct 7 09:22:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:22:04 2016 -0400 Merge topic 'cpack-rpm-single-debuginfo' bb8cf521 CPack/RPM single debuginfo packaging 758f58b4 CPack/RPM learned defining main component ----------------------------------------------------------------------- Summary of changes: Help/release/dev/cpack-rpm-single-debuginfo.rst | 11 + Modules/CPackRPM.cmake | 322 ++++++++++++++++---- Source/CPack/cmCPackRPMGenerator.cxx | 245 +++++++++++++-- Tests/RunCMake/CPack/MAIN_COMPONENT.cmake | 14 + .../CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake | 13 + .../CPack/RPM/MAIN_COMPONENT-found-stderr.txt | 3 + .../CPack/RPM/MAIN_COMPONENT-invalid-stderr.txt | 1 + .../CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake | 30 ++ .../RPM/SINGLE_DEBUGINFO-no_components-stderr.txt | 1 + .../RPM/SINGLE_DEBUGINFO-no_debuginfo-stderr.txt | 3 + .../SINGLE_DEBUGINFO-no_main_component-stderr.txt | 1 + .../RPM/SINGLE_DEBUGINFO-one_component-stderr.txt | 1 + .../SINGLE_DEBUGINFO-one_component_main-stderr.txt | 1 + ...DEBUGINFO-one_component_no_debuginfo-stderr.txt | 1 + .../CPack/RPM/SINGLE_DEBUGINFO-valid-stderr.txt | 3 + Tests/RunCMake/CPack/RunCMakeTest.cmake | 2 + Tests/RunCMake/CPack/SINGLE_DEBUGINFO.cmake | 56 ++++ 17 files changed, 624 insertions(+), 84 deletions(-) create mode 100644 Help/release/dev/cpack-rpm-single-debuginfo.rst create mode 100644 Tests/RunCMake/CPack/MAIN_COMPONENT.cmake create mode 100644 Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-found-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/MAIN_COMPONENT-invalid-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_components-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_debuginfo-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-no_main_component-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_main-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-one_component_no_debuginfo-stderr.txt create mode 100644 Tests/RunCMake/CPack/RPM/SINGLE_DEBUGINFO-valid-stderr.txt create mode 100644 Tests/RunCMake/CPack/SINGLE_DEBUGINFO.cmake hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:22:11 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:22:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-75-gb4fab15 Message-ID: <20161007132215.5C0A9F254A@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 b4fab15fc75e4ad62ece05dc9a37bd87e807ba9b (commit) via c666f8cbc6cb81b0729e116890c70096fd2101ac (commit) via f00214aa4f8036951a926efd7dc3891d47abce49 (commit) via bb1d3370cedceec48c82a523cf35df2207c7db17 (commit) from cb5cadf3c79bf2d80dbd1e2f5602ed709fe25ef5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b4fab15fc75e4ad62ece05dc9a37bd87e807ba9b commit b4fab15fc75e4ad62ece05dc9a37bd87e807ba9b Merge: cb5cadf c666f8c Author: Brad King AuthorDate: Fri Oct 7 09:22:08 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:22:08 2016 -0400 Merge topic 'nmake-encoding' c666f8cb NMake: Use ANSI encoding for NMake Makefiles f00214aa cmGeneratedFileStream: Add optional encoding support bb1d3370 codecvt: Add class for encoding conversion ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 + Source/cmGeneratedFileStream.cxx | 19 ++- Source/cmGeneratedFileStream.h | 7 +- Source/cmGlobalGenerator.h | 7 + Source/cmGlobalNMakeMakefileGenerator.h | 6 + Source/cmGlobalUnixMakefileGenerator3.cxx | 3 +- Source/cmLocalUnixMakefileGenerator3.cxx | 11 +- Source/cmMakefileTargetGenerator.cxx | 10 +- Source/cm_codecvt.cxx | 215 +++++++++++++++++++++++++++++ Source/cm_codecvt.hxx | 57 ++++++++ 10 files changed, 326 insertions(+), 11 deletions(-) create mode 100644 Source/cm_codecvt.cxx create mode 100644 Source/cm_codecvt.hxx hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:22:30 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:22:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-202-ge8de7c1 Message-ID: <20161007132230.B4A41F254A@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 e8de7c1650c21199e2ac867b7e1751a2178184b8 (commit) via b4fab15fc75e4ad62ece05dc9a37bd87e807ba9b (commit) via cb5cadf3c79bf2d80dbd1e2f5602ed709fe25ef5 (commit) from b3310831a55d40848cb76dfbccf44c5179e916e0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8de7c1650c21199e2ac867b7e1751a2178184b8 commit e8de7c1650c21199e2ac867b7e1751a2178184b8 Merge: b331083 b4fab15 Author: Brad King AuthorDate: Fri Oct 7 09:22:22 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 09:22:22 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:25:05 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:25:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-81-g7a1e542 Message-ID: <20161007132505.E4ED1F470C@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 7a1e542ed7065ab300af11f5cb4cfe465de2e5e6 (commit) via aac66d79743b3ad1bae0fd9facc9ac329fa9df53 (commit) via 914c470a62ec40ca113809c3efa3bb7968170c18 (commit) via 1bc8a66d07aed8d5636bcfd74a8d143694bfa2aa (commit) via fb2a39952883a6690855ceac3cc19e3cae59f8dd (commit) via 5ffeb9bc13f817077479a74e2de8f8c282c67829 (commit) from b4fab15fc75e4ad62ece05dc9a37bd87e807ba9b (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 Fri Oct 7 09:25:06 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:25:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-209-g92d6775 Message-ID: <20161007132506.06932F4751@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 92d6775f6bb2443adaab7f85a645ed01e8a5cf15 (commit) via 7a1e542ed7065ab300af11f5cb4cfe465de2e5e6 (commit) via aac66d79743b3ad1bae0fd9facc9ac329fa9df53 (commit) via 914c470a62ec40ca113809c3efa3bb7968170c18 (commit) via 1bc8a66d07aed8d5636bcfd74a8d143694bfa2aa (commit) via fb2a39952883a6690855ceac3cc19e3cae59f8dd (commit) via 5ffeb9bc13f817077479a74e2de8f8c282c67829 (commit) from e8de7c1650c21199e2ac867b7e1751a2178184b8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92d6775f6bb2443adaab7f85a645ed01e8a5cf15 commit 92d6775f6bb2443adaab7f85a645ed01e8a5cf15 Merge: e8de7c1 7a1e542 Author: Brad King AuthorDate: Fri Oct 7 09:24:45 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 09:24:45 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:25:06 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:25:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.7.0-rc1-11-gaac66d7 Message-ID: <20161007132506.1E2FFF4862@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 aac66d79743b3ad1bae0fd9facc9ac329fa9df53 (commit) via 914c470a62ec40ca113809c3efa3bb7968170c18 (commit) via f2b88600f374684e66cbe91697dfed09798ac5b8 (commit) via 2f16ab87aeb58525f723ce5f5dc84e1f7730a8b3 (commit) via e8893030e696113d778f484750b1afccbfd74d42 (commit) via 1bc8a66d07aed8d5636bcfd74a8d143694bfa2aa (commit) via 646d01da9536d2db912a80f7d45ba289d8c89295 (commit) via fb2a39952883a6690855ceac3cc19e3cae59f8dd (commit) via 5ffeb9bc13f817077479a74e2de8f8c282c67829 (commit) via eb1a57d7e771d361f802f6120643788c6c3f78b7 (commit) via 68277e16c474ca48e4aabd36603fd9ec4466fe28 (commit) from 1dc252ecf4d0946196133734540ebe8e90f312d3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/release/3.7.rst | 9 +- Modules/FindMatlab.cmake | 16 +-- Source/QtIFW/cmake.org.html | 2 +- Source/cmFileMonitor.cxx | 8 +- Source/cmServerConnection.cxx | 162 ++++++++++++++++++++-------- Source/cmServerConnection.h | 15 ++- Source/cmVisualStudio10TargetGenerator.cxx | 6 +- 7 files changed, 153 insertions(+), 65 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 09:52:11 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 09:52:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-211-g284bc42 Message-ID: <20161007135211.51AC5F5D3A@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 284bc42262d70e849e5ebab15cf930f220a41f7c (commit) via 2b9dad694a43d850af5fe83dd327fc82db29a012 (commit) from 92d6775f6bb2443adaab7f85a645ed01e8a5cf15 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=284bc42262d70e849e5ebab15cf930f220a41f7c commit 284bc42262d70e849e5ebab15cf930f220a41f7c Merge: 92d6775 2b9dad6 Author: Brad King AuthorDate: Fri Oct 7 09:52:10 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 09:52:10 2016 -0400 Merge topic 'FindProtobuf-fix-subdirs' into next 2b9dad69 FindProtobuf: Fix protobuf_generate_*() to handle subdirs https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2b9dad694a43d850af5fe83dd327fc82db29a012 commit 2b9dad694a43d850af5fe83dd327fc82db29a012 Author: Martin Joly AuthorDate: Fri Oct 7 15:37:55 2016 +0200 Commit: Brad King CommitDate: Fri Oct 7 09:50:52 2016 -0400 FindProtobuf: Fix protobuf_generate_*() to handle subdirs The change in commit v3.7.0-rc1~513^2 (FindProtobuf: fix protobuf_generate_*() to handle proto files in subdirs, 2016-06-09) incorrectly adds subdirectories to the path of the generated files when `*.proto` files are passed to `protobuf_generate_*` with subdirectories. This behavior is not correct when `PROTOBUF_GENERATE_CPP_APPEND_PATH` is True (default behavior) as `protoc` will generate output file in the current build directory. diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index 10c07c2..14e392a 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -136,9 +136,11 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS) foreach(FIL ${ARGN}) get_filename_component(ABS_FIL ${FIL} ABSOLUTE) get_filename_component(FIL_WE ${FIL} NAME_WE) - get_filename_component(FIL_DIR ${FIL} DIRECTORY) - if(FIL_DIR) - set(FIL_WE "${FIL_DIR}/${FIL_WE}") + if(NOT PROTOBUF_GENERATE_CPP_APPEND_PATH) + get_filename_component(FIL_DIR ${FIL} DIRECTORY) + if(FIL_DIR) + set(FIL_WE "${FIL_DIR}/${FIL_WE}") + endif() endif() list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc") @@ -197,9 +199,11 @@ function(PROTOBUF_GENERATE_PYTHON SRCS) foreach(FIL ${ARGN}) get_filename_component(ABS_FIL ${FIL} ABSOLUTE) get_filename_component(FIL_WE ${FIL} NAME_WE) - get_filename_component(FIL_DIR ${FIL} DIRECTORY) - if(FIL_DIR) - set(FIL_WE "${FIL_DIR}/${FIL_WE}") + if(NOT PROTOBUF_GENERATE_CPP_APPEND_PATH) + get_filename_component(FIL_DIR ${FIL} DIRECTORY) + if(FIL_DIR) + set(FIL_WE "${FIL_DIR}/${FIL_WE}") + endif() endif() list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py") ----------------------------------------------------------------------- Summary of changes: Modules/FindProtobuf.cmake | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 10:13:34 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 10:13:34 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-213-g0076f00 Message-ID: <20161007141335.95532E2B9A@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 0076f00d2d174da03b50ad5b06fa820ee47264c6 (commit) via 8cdac469d19f486b167006e4d4fcbf2a18c85866 (commit) from 284bc42262d70e849e5ebab15cf930f220a41f7c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0076f00d2d174da03b50ad5b06fa820ee47264c6 commit 0076f00d2d174da03b50ad5b06fa820ee47264c6 Merge: 284bc42 8cdac46 Author: Brad King AuthorDate: Fri Oct 7 10:13:33 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 10:13:33 2016 -0400 Merge topic 'android-cxxabi' into next 8cdac469 Android: Fix support for cxxabi.h with libc++ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8cdac469d19f486b167006e4d4fcbf2a18c85866 commit 8cdac469d19f486b167006e4d4fcbf2a18c85866 Author: Brad King AuthorDate: Fri Oct 7 09:34:41 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 09:53:51 2016 -0400 Android: Fix support for cxxabi.h with libc++ Additional include directories are needed for this on some STL types. Closes: #16350 diff --git a/Modules/Platform/Android/ndk-stl-c++.cmake b/Modules/Platform/Android/ndk-stl-c++.cmake index cb9fd68..b27015d 100644 --- a/Modules/Platform/Android/ndk-stl-c++.cmake +++ b/Modules/Platform/Android/ndk-stl-c++.cmake @@ -6,9 +6,11 @@ macro(__android_stl_cxx lang filename) if(EXISTS "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef") # r12 and below __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" 1) + __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" 1) else() # r13 and above __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/include" 1) + __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/include" 1) endif() # Add a secondary include directory if it exists. diff --git a/Tests/RunCMake/Android/android.cxx b/Tests/RunCMake/Android/android.cxx index e6a6cda..2dee8f9 100644 --- a/Tests/RunCMake/Android/android.cxx +++ b/Tests/RunCMake/Android/android.cxx @@ -6,6 +6,9 @@ #ifndef STL_SYSTEM #include #include +#ifndef STL_STLPORT +#include +#endif #ifndef STL_GABI #include #include diff --git a/Tests/RunCMake/Android/common.cmake b/Tests/RunCMake/Android/common.cmake index 6ea0909..d803c98 100644 --- a/Tests/RunCMake/Android/common.cmake +++ b/Tests/RunCMake/Android/common.cmake @@ -43,6 +43,8 @@ elseif(CMAKE_ANDROID_STL_TYPE STREQUAL "system") add_definitions(-DSTL_SYSTEM) elseif(CMAKE_ANDROID_STL_TYPE MATCHES [[^gabi\+\+]]) add_definitions(-DSTL_GABI) +elseif(CMAKE_ANDROID_STL_TYPE MATCHES [[^stlport]]) + add_definitions(-DSTL_STLPORT) endif() string(REPLACE "-" "_" abi "${CMAKE_ANDROID_ARCH_ABI}") ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android/ndk-stl-c++.cmake | 2 ++ Tests/RunCMake/Android/android.cxx | 3 +++ Tests/RunCMake/Android/common.cmake | 2 ++ 3 files changed, 7 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 11:30:55 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 11:30:55 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-215-gc207ecc Message-ID: <20161007153055.88DCCF61F7@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 c207eccdf8224900f5d44ead6f8ee2fb89c9bfc1 (commit) via 7f90d5e5ccfa862ebd99bd79632cc9351fe2ee19 (commit) from 0076f00d2d174da03b50ad5b06fa820ee47264c6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c207eccdf8224900f5d44ead6f8ee2fb89c9bfc1 commit c207eccdf8224900f5d44ead6f8ee2fb89c9bfc1 Merge: 0076f00 7f90d5e Author: Brad King AuthorDate: Fri Oct 7 11:30:54 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 11:30:54 2016 -0400 Merge topic 'test-cpack-improve-failure-messages' into next 7f90d5e5 Tests: Improve RunCMake.CPack_* failure message formatting https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f90d5e5ccfa862ebd99bd79632cc9351fe2ee19 commit 7f90d5e5ccfa862ebd99bd79632cc9351fe2ee19 Author: Brad King AuthorDate: Fri Oct 7 11:28:32 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 11:28:32 2016 -0400 Tests: Improve RunCMake.CPack_* failure message formatting Format a `message(FATAL_ERROR)` call with markup to make the generated message more readable so that the difference between the actual and expected results is easier to see. diff --git a/Tests/RunCMake/CPack/VerifyResult.cmake b/Tests/RunCMake/CPack/VerifyResult.cmake index 8bc2a58..ad2a651 100644 --- a/Tests/RunCMake/CPack/VerifyResult.cmake +++ b/Tests/RunCMake/CPack/VerifyResult.cmake @@ -27,10 +27,12 @@ if(NOT EXPECTED_FILES_COUNT EQUAL 0) expected_content_list "${PACKAGE_CONTENT}") if(NOT expected_content_list) + string(REPLACE "\n" "\n actual> " msg_actual "\n${PACKAGE_CONTENT}") + string(REPLACE "\n" "\n expect> " msg_expected "\n${EXPECTED_FILE_CONTENT_${file_no_}}") message(FATAL_ERROR "Unexpected file content for file No. '${file_no_}'!\n" - " Content: '${PACKAGE_CONTENT}'\n\n" - " Expected: '${EXPECTED_FILE_CONTENT_${file_no_}}'" + "The content was:${msg_actual}\n" + "which does not match:${msg_expected}\n" "${output_error_message}") endif() else() ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CPack/VerifyResult.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 7 15:29:45 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 7 Oct 2016 15:29:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-217-g4b64d26 Message-ID: <20161007192945.52079F5484@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 4b64d265ee79a39aabe6241f3e0811f38c0c2177 (commit) via dda6775c940129d2a38fecd6cf6273f7d97ccca0 (commit) from c207eccdf8224900f5d44ead6f8ee2fb89c9bfc1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b64d265ee79a39aabe6241f3e0811f38c0c2177 commit 4b64d265ee79a39aabe6241f3e0811f38c0c2177 Merge: c207ecc dda6775 Author: Brad King AuthorDate: Fri Oct 7 15:29:43 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 15:29:43 2016 -0400 Merge topic 'android-export-has-cpp' into next dda6775c Android: Record use of C++ by static libs in exported Android.mk files https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dda6775c940129d2a38fecd6cf6273f7d97ccca0 commit dda6775c940129d2a38fecd6cf6273f7d97ccca0 Author: Brad King AuthorDate: Fri Oct 7 14:57:26 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 15:02:42 2016 -0400 Android: Record use of C++ by static libs in exported Android.mk files When a `PREBUILT_STATIC_LIBRARY` uses C++ in its sources then the `.a` file will have a link-time dependency on the C++ runtime libraries. Android NDK r14 will add a way to give this information to the NDK build system by adding a `LOCAL_HAS_CPP` setting to the `Android.mk` file. Add this for exported static libraries that use C++. diff --git a/Source/cmExportBuildAndroidMKGenerator.cxx b/Source/cmExportBuildAndroidMKGenerator.cxx index bb02311..f5e6628 100644 --- a/Source/cmExportBuildAndroidMKGenerator.cxx +++ b/Source/cmExportBuildAndroidMKGenerator.cxx @@ -9,6 +9,8 @@ #include "cmMakefile.h" #include "cmTargetExport.h" +#include + cmExportBuildAndroidMKGenerator::cmExportBuildAndroidMKGenerator() { this->LG = CM_NULLPTR; @@ -164,6 +166,16 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( } } } + + // Tell the NDK build system if prebuilt static libraries use C++. + if (target->GetType() == cmState::STATIC_LIBRARY) { + cmLinkImplementation const* li = target->GetLinkImplementation(config); + if (std::find(li->Languages.begin(), li->Languages.end(), "CXX") != + li->Languages.end()) { + os << "LOCAL_HAS_CPP := true\n"; + } + } + switch (target->GetType()) { case cmState::SHARED_LIBRARY: case cmState::MODULE_LIBRARY: diff --git a/Tests/RunCMake/AndroidMK/AndroidMK.cmake b/Tests/RunCMake/AndroidMK/AndroidMK.cmake index ed21e58..2596e8c 100644 --- a/Tests/RunCMake/AndroidMK/AndroidMK.cmake +++ b/Tests/RunCMake/AndroidMK/AndroidMK.cmake @@ -2,7 +2,7 @@ project(build) set(CMAKE_BUILD_TYPE Debug) add_library(foo foo.cxx) add_library(car foo.cxx) -add_library(bar foo.cxx) +add_library(bar bar.c) add_library(dog foo.cxx) target_link_libraries(foo car bar dog debug -lm) export(TARGETS bar dog car foo ANDROID_MK diff --git a/Tests/RunCMake/AndroidMK/bar.c b/Tests/RunCMake/AndroidMK/bar.c new file mode 100644 index 0000000..e1f4df6 --- /dev/null +++ b/Tests/RunCMake/AndroidMK/bar.c @@ -0,0 +1,3 @@ +void bar(void) +{ +} diff --git a/Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt b/Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt index def8fcb..bbf67a5 100644 --- a/Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt +++ b/Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt @@ -7,11 +7,13 @@ include.*PREBUILT_STATIC_LIBRARY.* include.*CLEAR_VARS.* LOCAL_MODULE.*dog LOCAL_SRC_FILES.*.*dog.* +LOCAL_HAS_CPP := true include.*PREBUILT_STATIC_LIBRARY.* .* include.*CLEAR_VARS.* LOCAL_MODULE.*car LOCAL_SRC_FILES.*.*car.* +LOCAL_HAS_CPP := true include.*PREBUILT_STATIC_LIBRARY.* .* include.*CLEAR_VARS.* @@ -20,4 +22,5 @@ LOCAL_SRC_FILES.*.*foo.* LOCAL_CPP_FEATURES.*rtti exceptions LOCAL_STATIC_LIBRARIES.*car bar dog LOCAL_EXPORT_LDLIBS := -lm +LOCAL_HAS_CPP := true include.*PREBUILT_STATIC_LIBRARY.* diff --git a/Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt b/Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt index 1bdb308..3515fb9 100644 --- a/Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt +++ b/Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt @@ -9,11 +9,13 @@ include.*PREBUILT_STATIC_LIBRARY.* include.*CLEAR_VARS. LOCAL_MODULE.*dog LOCAL_SRC_FILES.*_IMPORT_PREFIX./lib.*dog.* +LOCAL_HAS_CPP := true include.*PREBUILT_STATIC_LIBRARY.* include.*CLEAR_VARS.* LOCAL_MODULE.*car LOCAL_SRC_FILES.*_IMPORT_PREFIX./lib.*car.* +LOCAL_HAS_CPP := true include.*PREBUILT_STATIC_LIBRARY.* include.*CLEAR_VARS.* @@ -22,4 +24,5 @@ LOCAL_SRC_FILES.*_IMPORT_PREFIX\)/lib.*foo.* LOCAL_CPP_FEATURES.*rtti exceptions LOCAL_STATIC_LIBRARIES.*car bar dog LOCAL_EXPORT_LDLIBS := -lm +LOCAL_HAS_CPP := true include.*PREBUILT_STATIC_LIBRARY.* ----------------------------------------------------------------------- Summary of changes: Source/cmExportBuildAndroidMKGenerator.cxx | 12 ++++++++++++ Tests/RunCMake/AndroidMK/AndroidMK.cmake | 2 +- Tests/RunCMake/AndroidMK/bar.c | 3 +++ Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt | 3 +++ Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt | 3 +++ 5 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Tests/RunCMake/AndroidMK/bar.c hooks/post-receive -- CMake From steveire at gmail.com Fri Oct 7 15:48:16 2016 From: steveire at gmail.com (Stephen Kelly) Date: Fri, 7 Oct 2016 15:48:16 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-226-gbefbf7a Message-ID: <20161007194826.94E02F5A76@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 befbf7ad51059b6077de1fa34a59bde28284731a (commit) via cb56b773baeb123f22a8d4409c1a68bce0d3e45c (commit) via 409a2a800115fb55aadf78e23deb85a57b8ffcbe (commit) via 0a291271fdbd530a38722bc554e7bbb49cc7245d (commit) via 4eb2c4dcaf55ea08c633871fc54dba411803832d (commit) via c12a24cefaebc06d825578270473bf4537568ffb (commit) via cf39fd0f40c77a3a05fd921e66ee814a572e4086 (commit) via d9fde87d1a3a4de382d664bd121af957af6eaaea (commit) via d92c160db333bf65e52da1cb73a068b5d3f1db4f (commit) from 4b64d265ee79a39aabe6241f3e0811f38c0c2177 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=befbf7ad51059b6077de1fa34a59bde28284731a commit befbf7ad51059b6077de1fa34a59bde28284731a Merge: 4b64d26 cb56b77 Author: Stephen Kelly AuthorDate: Fri Oct 7 15:48:13 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 15:48:13 2016 -0400 Merge topic 'ninja-cleanups' into next cb56b773 Ninja: Extract a static path conversion method 409a2a80 Ninja: Inline conversion to relative path 0a291271 Ninja: Get the binary directory from cmState::Directory 4eb2c4dc Ninja: Inline output path conversion c12a24ce Ninja: Simplify method cf39fd0f Ninja: Extract identical code from condition d9fde87d Ninja: Replace array access with local variable d92c160d Ninja: Separate two coupled calls https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb56b773baeb123f22a8d4409c1a68bce0d3e45c commit cb56b773baeb123f22a8d4409c1a68bce0d3e45c Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:33 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:37:38 2016 +0200 Ninja: Extract a static path conversion method It is independent of cmLocalGenerator. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 9a7939e..1b4e34c 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -835,8 +835,14 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) cmLocalNinjaGenerator* ng = static_cast(this->LocalGenerators[0]); - cmState::Directory stateDir = ng->GetStateSnapshot().GetDirectory(); + return ConvertToNinjaPath(path, ng->GetStateSnapshot().GetDirectory(), + this->OutputPathPrefix); +} +std::string cmGlobalNinjaGenerator::ConvertToNinjaPath( + const std::string& path, cmState::Directory stateDir, + std::string const& prefix) +{ std::string convPath = path; if (cmOutputConverter::ContainedInDirectory(stateDir.GetCurrentBinary(), @@ -846,7 +852,7 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) } if (!cmSystemTools::FileIsFullPath(convPath)) { - convPath = this->OutputPathPrefix + convPath; + convPath = prefix + convPath; } #ifdef _WIN32 diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index dcf7406..51a8032 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -233,6 +233,9 @@ public: return this->RulesFileStream; } + static std::string ConvertToNinjaPath(const std::string& path, + cmState::Directory stateDir, + std::string const& prefix); std::string ConvertToNinjaPath(const std::string& path); std::string ConvertToNinjaFolderRule(const std::string& path); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=409a2a800115fb55aadf78e23deb85a57b8ffcbe commit 409a2a800115fb55aadf78e23deb85a57b8ffcbe Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:33 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:37:38 2016 +0200 Ninja: Inline conversion to relative path diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 5bec420..9a7939e 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -837,8 +837,13 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) cmState::Directory stateDir = ng->GetStateSnapshot().GetDirectory(); - std::string convPath = - ng->ConvertToRelativePath(stateDir.GetCurrentBinary(), path); + std::string convPath = path; + + if (cmOutputConverter::ContainedInDirectory(stateDir.GetCurrentBinary(), + path, stateDir)) { + convPath = cmOutputConverter::ForceToRelativePath( + stateDir.GetCurrentBinary(), path); + } if (!cmSystemTools::FileIsFullPath(convPath)) { convPath = this->OutputPathPrefix + convPath; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a291271fdbd530a38722bc554e7bbb49cc7245d commit 0a291271fdbd530a38722bc554e7bbb49cc7245d Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:33 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:37:38 2016 +0200 Ninja: Get the binary directory from cmState::Directory This method will be extracted, so don't rely on cmLocalGenerator. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index aa1e7c2..5bec420 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -834,8 +834,12 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) { cmLocalNinjaGenerator* ng = static_cast(this->LocalGenerators[0]); - std::string convPath = ng->ConvertToRelativePath( - this->LocalGenerators[0]->GetState()->GetBinaryDirectory(), path); + + cmState::Directory stateDir = ng->GetStateSnapshot().GetDirectory(); + + std::string convPath = + ng->ConvertToRelativePath(stateDir.GetCurrentBinary(), path); + if (!cmSystemTools::FileIsFullPath(convPath)) { convPath = this->OutputPathPrefix + convPath; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4eb2c4dcaf55ea08c633871fc54dba411803832d commit 4eb2c4dcaf55ea08c633871fc54dba411803832d Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:37:38 2016 +0200 Ninja: Inline output path conversion diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 5d60c66..aa1e7c2 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -836,7 +836,10 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) static_cast(this->LocalGenerators[0]); std::string convPath = ng->ConvertToRelativePath( this->LocalGenerators[0]->GetState()->GetBinaryDirectory(), path); - convPath = this->NinjaOutputPath(convPath); + if (!cmSystemTools::FileIsFullPath(convPath)) { + convPath = this->OutputPathPrefix + convPath; + } + #ifdef _WIN32 std::replace(convPath.begin(), convPath.end(), '/', '\\'); #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c12a24cefaebc06d825578270473bf4537568ffb commit c12a24cefaebc06d825578270473bf4537568ffb Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:37:38 2016 +0200 Ninja: Simplify method HasOutputPathPrefix only checks if OutputPathPrefix is empty. The following concatenation can be done without the check. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index f5a0e68..5d60c66 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1423,7 +1423,7 @@ void cmGlobalNinjaGenerator::InitOutputPathPrefix() std::string cmGlobalNinjaGenerator::NinjaOutputPath(std::string const& path) { - if (!this->HasOutputPathPrefix() || cmSystemTools::FileIsFullPath(path)) { + if (cmSystemTools::FileIsFullPath(path)) { return path; } return this->OutputPathPrefix + path; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf39fd0f40c77a3a05fd921e66ee814a572e4086 commit cf39fd0f40c77a3a05fd921e66ee814a572e4086 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:37:38 2016 +0200 Ninja: Extract identical code from condition diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 22fae4c..b04c11d 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -492,10 +492,8 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( if (ccg.GetWorkingDirectory().empty()) { output = this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), output); - output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); - } else { - output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } + output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } vars.Output = output.c_str(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9fde87d1a3a4de382d664bd121af957af6eaaea commit d9fde87d1a3a4de382d664bd121af957af6eaaea Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:37:38 2016 +0200 Ninja: Replace array access with local variable diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index eb48653..22fae4c 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -488,13 +488,13 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { + output = outputs[0]; if (ccg.GetWorkingDirectory().empty()) { - output = this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), - outputs[0]); + output = + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), output); output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } else { - output = - this->ConvertToOutputFormat(outputs[0], cmOutputConverter::SHELL); + output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } } vars.Output = output.c_str(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d92c160db333bf65e52da1cb73a068b5d3f1db4f commit d92c160db333bf65e52da1cb73a068b5d3f1db4f Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:31 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:37:38 2016 +0200 Ninja: Separate two coupled calls diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 5736581..eb48653 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -489,10 +489,9 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { if (ccg.GetWorkingDirectory().empty()) { - output = this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), - outputs[0]), - cmOutputConverter::SHELL); + output = this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), + outputs[0]); + output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } else { output = this->ConvertToOutputFormat(outputs[0], cmOutputConverter::SHELL); ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalNinjaGenerator.cxx | 26 ++++++++++++++++++++++---- Source/cmGlobalNinjaGenerator.h | 3 +++ Source/cmLocalNinjaGenerator.cxx | 9 +++------ 3 files changed, 28 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Fri Oct 7 15:49:40 2016 From: steveire at gmail.com (Stephen Kelly) Date: Fri, 7 Oct 2016 15:49:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-250-g9f667ee Message-ID: <20161007194941.B0466F5B0B@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 9f667ee9f52f436a3d43121d43c8efe4e05709e1 (commit) via 87bde938fe3c66fc6298108c7594578005bbb2a6 (commit) via 9723f4ddb9cc0767b7b963aa31def62c11b05c50 (commit) via cd04ce0a7f6317169f6d8738f56b46c658314bd0 (commit) via d89821cdd61896d7500f8ca2378294d9cf7aa27e (commit) via 7edfcd0e834a4dc8d3da9cada6ad6b9b46dfb4dd (commit) via 6c8dc7f1df6d3492d11ad994a35ee2f0b8a4e60b (commit) via 1efca9f427a5c537afc034aadf0c29073bfdfa22 (commit) via d9b5f0a301c23c2c0e56ad3fcb696de71c3d6365 (commit) via 1c70c6cc09f0f8be087db2aeae5ee6a3f1b47bda (commit) via 2b7baed719e4a6eb918ed6f22ee6031a40b7f316 (commit) via 7ba954925a876f4c753a4296236bc7d2f18eb0b8 (commit) via 6d98b15fc8b9a065325e3683afe94efce17dd162 (commit) via 869037ee86d1c0ab757840adf499ea270d4301e1 (commit) via 2f6462a634726d9d0ea8d8552454839d67183016 (commit) via 148b83a12185d7611ff7576464087430c3f2719c (commit) via 4457a9f181663701961dc209740974f48213e6e7 (commit) via 4d039c5b46e3cac29ff1d9ce3e768af1bca6b69a (commit) via c8ec8d6a7ec6c176bc14e7026dc755a9be8689cb (commit) via 3e8d47d18b4db6b4621ee5e4864dde234ad8a282 (commit) via 3b4895fa35e4a96022abd99b07002a7d2ab3a968 (commit) via 2232e97a6ed4a338b814d1ba3d62a7ffa9ef6e7f (commit) via 9a1d4e4ba170f4ac34c80593bd2fe8e1481a1181 (commit) via 8391b3015a82909828b7ada98e76d45aa11b892b (commit) from befbf7ad51059b6077de1fa34a59bde28284731a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f667ee9f52f436a3d43121d43c8efe4e05709e1 commit 9f667ee9f52f436a3d43121d43c8efe4e05709e1 Merge: befbf7a 87bde93 Author: Stephen Kelly AuthorDate: Fri Oct 7 15:49:21 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 15:49:21 2016 -0400 Merge topic 'clean-up-link-configuration' into next 87bde938 cmMakefile: Simplify programmer error to an assert 9723f4dd cmMakefile: Move link_libraries() related code out cd04ce0a cmMakefile: Implement LinkLibraries as an internal property d89821cd cmMakefile: Inline method into only remaining caller 7edfcd0e cmMakefile: Inline method into caller 6c8dc7f1 cmake: Simplify find-package mode library addition 1efca9f4 cmMakefile: Remove obsolete parameter d9b5f0a3 cmTarget: Remove target name from parameter list 1c70c6cc cmMakefile: Use public API to find a target 2b7baed7 cmMakefile: Inline method into only caller 7ba95492 cmMakefile: Use public API to find a target 6d98b15f cmMakefile: Invert if() condition to remove else 869037ee cmMakefile: Remove ALIAS check 2f6462a6 cmMakefile: Collapse two consecutive if()s into one 148b83a1 cmMakefile: DeMorgan-invert condition 4457a9f1 cmMakefile: Return after error and remove else condition ... https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87bde938fe3c66fc6298108c7594578005bbb2a6 commit 87bde938fe3c66fc6298108c7594578005bbb2a6 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:37 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:33:25 2016 +0200 cmMakefile: Simplify programmer error to an assert diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 12f971f..c4d6103 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1782,14 +1782,9 @@ cmTarget* cmMakefile::AddLibrary(const std::string& lname, const std::vector& srcs, bool excludeFromAll) { - // wrong type ? default to STATIC - if ((type != cmState::STATIC_LIBRARY) && (type != cmState::SHARED_LIBRARY) && - (type != cmState::MODULE_LIBRARY) && (type != cmState::OBJECT_LIBRARY) && - (type != cmState::INTERFACE_LIBRARY)) { - this->IssueMessage(cmake::INTERNAL_ERROR, - "cmMakefile::AddLibrary given invalid target type."); - type = cmState::STATIC_LIBRARY; - } + assert(type == cmState::STATIC_LIBRARY || type == cmState::SHARED_LIBRARY || + type == cmState::MODULE_LIBRARY || type == cmState::OBJECT_LIBRARY || + type == cmState::INTERFACE_LIBRARY); cmTarget* target = this->AddNewTarget(type, lname); // Clear its dependencies. Otherwise, dependencies might persist https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9723f4ddb9cc0767b7b963aa31def62c11b05c50 commit 9723f4ddb9cc0767b7b963aa31def62c11b05c50 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:37 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:33:25 2016 +0200 cmMakefile: Move link_libraries() related code out AddGlobalLinkInformation has an important-sounding name, but in reality, it is only used by the link_libraries() command. Keep behaviors which are specific to the current language out of the core of CMake. diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index 96ad82a..10b4b76 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddExecutableCommand.h" +#include "cmLinkLibrariesCommand.h" + // cmExecutableCommand bool cmAddExecutableCommand::InitialPass(std::vector const& args, cmExecutionStatus&) @@ -188,6 +190,9 @@ bool cmAddExecutableCommand::InitialPass(std::vector const& args, std::vector srclists(s, args.end()); cmTarget* tgt = this->Makefile->AddExecutable(exename.c_str(), srclists, excludeFromAll); + + cmLinkLibrariesCommand::PopulateTarget(*tgt, this->Makefile); + if (use_win32) { tgt->SetProperty("WIN32_EXECUTABLE", "ON"); } diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 26e38b8..8c02f75 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -4,6 +4,7 @@ #include "cmState.h" #include "cmake.h" +#include "cmLinkLibrariesCommand.h" // cmLibraryCommand bool cmAddLibraryCommand::InitialPass(std::vector const& args, @@ -355,7 +356,9 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, srclists.insert(srclists.end(), s, args.end()); - this->Makefile->AddLibrary(libName, type, srclists, excludeFromAll); + cmTarget* tgt = this->Makefile->AddLibrary(libName, type, srclists, excludeFromAll); + + cmLinkLibrariesCommand::PopulateTarget(*tgt, this->Makefile); return true; } diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index 4202cf5..ecf3f57 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -35,3 +35,57 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector const& args, return true; } + +void cmLinkLibrariesCommand::PopulateTarget(cmTarget& target, cmMakefile* mf) +{ + // for these targets do not add anything + switch (target.GetType()) { + case cmState::UTILITY: + case cmState::GLOBAL_TARGET: + case cmState::INTERFACE_LIBRARY: + return; + default:; + } + if (const char* linkDirsProp = mf->GetProperty("LINK_DIRECTORIES")) { + std::vector linkDirs; + cmSystemTools::ExpandListArgument(linkDirsProp, linkDirs); + + for (std::vector::iterator j = linkDirs.begin(); + j != linkDirs.end(); ++j) { + std::string newdir = *j; + // remove trailing slashes + if (*j->rbegin() == '/') { + newdir = j->substr(0, j->size() - 1); + } + target.AddLinkDirectory(*j); + } + } + + if (const char* linkLibsProp = mf->GetProperty("LINK_LIBRARIES")) { + std::vector linkLibs; + cmSystemTools::ExpandListArgument(linkLibsProp, linkLibs); + + for (std::vector::iterator j = linkLibs.begin(); + j != linkLibs.end(); ++j) { + std::string libraryName = *j; + cmTargetLinkLibraryType libType = GENERAL_LibraryType; + if (libraryName == "optimized") + { + libType = OPTIMIZED_LibraryType; + ++j; + libraryName = *j; + } else + if (libraryName == "debug") + { + libType = DEBUG_LibraryType; + ++j; + libraryName = *j; + } + // This is equivalent to the target_link_libraries plain signature. + target.AddLinkLibrary(*mf, libraryName, libType); + target.AppendProperty( + "INTERFACE_LINK_LIBRARIES", + target.GetDebugGeneratorExpressions(libraryName, libType).c_str()); + } + } +} diff --git a/Source/cmLinkLibrariesCommand.h b/Source/cmLinkLibrariesCommand.h index b4943b6..5170f03 100644 --- a/Source/cmLinkLibrariesCommand.h +++ b/Source/cmLinkLibrariesCommand.h @@ -27,6 +27,8 @@ public: bool InitialPass(std::vector const& args, cmExecutionStatus& status) CM_OVERRIDE; + static void PopulateTarget(cmTarget& target, cmMakefile* mf); + /** * The name of the command as specified in CMakeList.txt. */ diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 2414b32..12f971f 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1771,60 +1771,6 @@ void cmMakefile::SetProjectName(std::string const& p) this->StateSnapshot.SetProjectName(p); } -void cmMakefile::AddGlobalLinkInformation(cmTarget& target) -{ - // for these targets do not add anything - switch (target.GetType()) { - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: - case cmState::INTERFACE_LIBRARY: - return; - default:; - } - if (const char* linkDirsProp = this->GetProperty("LINK_DIRECTORIES")) { - std::vector linkDirs; - cmSystemTools::ExpandListArgument(linkDirsProp, linkDirs); - - for (std::vector::iterator j = linkDirs.begin(); - j != linkDirs.end(); ++j) { - std::string newdir = *j; - // remove trailing slashes - if (*j->rbegin() == '/') { - newdir = j->substr(0, j->size() - 1); - } - target.AddLinkDirectory(*j); - } - } - - if (const char* linkLibsProp = this->GetProperty("LINK_LIBRARIES")) { - std::vector linkLibs; - cmSystemTools::ExpandListArgument(linkLibsProp, linkLibs); - - for (std::vector::iterator j = linkLibs.begin(); - j != linkLibs.end(); ++j) { - std::string libraryName = *j; - cmTargetLinkLibraryType libType = GENERAL_LibraryType; - if (libraryName == "optimized") - { - libType = OPTIMIZED_LibraryType; - ++j; - libraryName = *j; - } else - if (libraryName == "debug") - { - libType = DEBUG_LibraryType; - ++j; - libraryName = *j; - } - // This is equivalent to the target_link_libraries plain signature. - target.AddLinkLibrary(*this, libraryName, libType); - target.AppendProperty( - "INTERFACE_LINK_LIBRARIES", - target.GetDebugGeneratorExpressions(libraryName, libType).c_str()); - } - } -} - void cmMakefile::AddAlias(const std::string& lname, std::string const& tgtName) { this->AliasTargets[lname] = tgtName; @@ -1854,7 +1800,6 @@ cmTarget* cmMakefile::AddLibrary(const std::string& lname, target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } target->AddSources(srcs); - this->AddGlobalLinkInformation(*target); return target; } @@ -1867,7 +1812,6 @@ cmTarget* cmMakefile::AddExecutable(const char* exeName, target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } target->AddSources(srcs); - this->AddGlobalLinkInformation(*target); return target; } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 8fef38b..c9ab3ba 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -771,9 +771,6 @@ public: void AddExportBuildFileGenerator(cmExportBuildFileGenerator* gen); protected: - // add link libraries and directories to the target - void AddGlobalLinkInformation(cmTarget& target); - // Check for a an unused variable void LogUnused(const char* reason, const std::string& name) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cd04ce0a7f6317169f6d8738f56b46c658314bd0 commit cd04ce0a7f6317169f6d8738f56b46c658314bd0 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:37 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:33:24 2016 +0200 cmMakefile: Implement LinkLibraries as an internal property cmMakefile should not have logic particular to individual cmake commands. The link_libraries() command is generally obsolete in favor of target_link_libraries(). An alternative language for CMake probably would not offer the former. The quirks and historical behaviors of the current language should be separate from the core classes of CMake to allow replacing the language. diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index 3fc7bd9..4202cf5 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -20,7 +20,7 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector const& args, "a library"); return false; } - this->Makefile->AddLinkLibrary(*i, DEBUG_LibraryType); + this->Makefile->AppendProperty("LINK_LIBRARIES", "debug"); } else if (*i == "optimized") { ++i; if (i == args.end()) { @@ -28,10 +28,9 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector const& args, "a library"); return false; } - this->Makefile->AddLinkLibrary(*i, OPTIMIZED_LibraryType); - } else { - this->Makefile->AddLinkLibrary(*i, GENERAL_LibraryType); + this->Makefile->AppendProperty("LINK_LIBRARIES", "optimized"); } + this->Makefile->AppendProperty("LINK_LIBRARIES", i->c_str()); } return true; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6e451b6..2414b32 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1207,15 +1207,6 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove) return true; } -void cmMakefile::AddLinkLibrary(const std::string& lib, - cmTargetLinkLibraryType llt) -{ - cmTarget::LibraryID tmp; - tmp.first = lib; - tmp.second = llt; - this->LinkLibraries.push_back(tmp); -} - void cmMakefile::InitializeFromParent(cmMakefile* parent) { this->SystemIncludeDirectories = parent->SystemIncludeDirectories; @@ -1247,7 +1238,8 @@ void cmMakefile::InitializeFromParent(cmMakefile* parent) } // link libraries - this->LinkLibraries = parent->LinkLibraries; + this->SetProperty("LINK_LIBRARIES", + parent->GetProperty("LINK_LIBRARIES")); // link directories this->SetProperty("LINK_DIRECTORIES", @@ -1804,14 +1796,32 @@ void cmMakefile::AddGlobalLinkInformation(cmTarget& target) } } - cmTarget::LinkLibraryVectorType::const_iterator i = - this->LinkLibraries.begin(); - for (; i != this->LinkLibraries.end(); ++i) { - // This is equivalent to the target_link_libraries plain signature. - target.AddLinkLibrary(*this, i->first, i->second); - target.AppendProperty( - "INTERFACE_LINK_LIBRARIES", - target.GetDebugGeneratorExpressions(i->first, i->second).c_str()); + if (const char* linkLibsProp = this->GetProperty("LINK_LIBRARIES")) { + std::vector linkLibs; + cmSystemTools::ExpandListArgument(linkLibsProp, linkLibs); + + for (std::vector::iterator j = linkLibs.begin(); + j != linkLibs.end(); ++j) { + std::string libraryName = *j; + cmTargetLinkLibraryType libType = GENERAL_LibraryType; + if (libraryName == "optimized") + { + libType = OPTIMIZED_LibraryType; + ++j; + libraryName = *j; + } else + if (libraryName == "debug") + { + libType = DEBUG_LibraryType; + ++j; + libraryName = *j; + } + // This is equivalent to the target_link_libraries plain signature. + target.AddLinkLibrary(*this, libraryName, libType); + target.AppendProperty( + "INTERFACE_LINK_LIBRARIES", + target.GetDebugGeneratorExpressions(libraryName, libType).c_str()); + } } } @@ -2074,21 +2084,37 @@ void cmMakefile::ExpandVariablesCMP0019() } } } - for (cmTarget::LinkLibraryVectorType::iterator l = - this->LinkLibraries.begin(); - l != this->LinkLibraries.end(); ++l) { - if (mightExpandVariablesCMP0019(l->first.c_str())) { - std::string orig = l->first; - this->ExpandVariablesInString(l->first, true, true); - if (pol == cmPolicies::WARN && l->first != orig) { + + if (const char* linkLibsProp = this->GetProperty("LINK_LIBRARIES")) { + std::vector linkLibs; + cmSystemTools::ExpandListArgument(linkLibsProp, linkLibs); + + for (std::vector::iterator l = linkLibs.begin(); + l != linkLibs.end(); ++l) { + std::string libName = *l; + if (libName == "optimized") + { + ++l; + libName = *l; + } else + if (libName == "debug") + { + ++l; + libName = *l; + } + if (mightExpandVariablesCMP0019(libName.c_str())) { + std::string orig = libName; + this->ExpandVariablesInString(libName, true, true); + if (pol == cmPolicies::WARN && libName != orig) { /* clang-format off */ w << "Evaluated link library\n" << " " << orig << "\n" << "as\n" - << " " << l->first << "\n"; + << " " << libName << "\n"; /* clang-format on */ } } + } } if (!w.str().empty()) { diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index a16c6bb..8fef38b 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -197,11 +197,6 @@ public: const char* comment = CM_NULLPTR, bool uses_terminal = false); /** - * Add a link library to the build. - */ - void AddLinkLibrary(const std::string&, cmTargetLinkLibraryType type); - - /** * Add a subdirectory to the build. */ void AddSubDirectory(const std::string& fullSrcDir, @@ -808,8 +803,6 @@ protected: std::vector ListFiles; std::vector OutputFiles; - cmTarget::LinkLibraryVectorType LinkLibraries; - std::vector InstallGenerators; std::vector TestGenerators; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d89821cdd61896d7500f8ca2378294d9cf7aa27e commit d89821cdd61896d7500f8ca2378294d9cf7aa27e Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:36 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:25:46 2016 +0200 cmMakefile: Inline method into only remaining caller diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 2498ecb..b2da329 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -337,6 +337,38 @@ void CCONV cmAddCustomCommandToTarget(void* arg, const char* target, cctype, no_comment, no_working_dir); } +static void addLinkLibrary(cmMakefile* mf, std::string const& target, + std::string const& lib, cmTargetLinkLibraryType llt) +{ + cmTarget* t = mf->FindLocalNonAliasTarget(target); + if (!t) + { + std::ostringstream e; + e << "Attempt to add link library \"" + << lib << "\" to target \"" + << target << "\" which is not built in this directory."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } + + cmTarget* tgt = mf->GetGlobalGenerator()->FindTarget(lib); + if(tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && + (tgt->GetType() != cmState::SHARED_LIBRARY) && + (tgt->GetType() != cmState::INTERFACE_LIBRARY) && + !tgt->IsExecutableWithExports()) + { + std::ostringstream e; + e << "Target \"" << lib << "\" of type " + << cmState::GetTargetTypeName(tgt->GetType()) + << " may not be linked into another target. " + << "One may link only to STATIC or SHARED libraries, or " + << "to executables with the ENABLE_EXPORTS property set."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + } + + t->AddLinkLibrary( *mf, lib, llt ); +} + void CCONV cmAddLinkLibraryForTarget(void* arg, const char* tgt, const char* value, int libtype) { @@ -344,13 +376,13 @@ void CCONV cmAddLinkLibraryForTarget(void* arg, const char* tgt, switch (libtype) { case CM_LIBRARY_GENERAL: - mf->AddLinkLibraryForTarget(tgt, value, GENERAL_LibraryType); + addLinkLibrary(mf, tgt,value, GENERAL_LibraryType); break; case CM_LIBRARY_DEBUG: - mf->AddLinkLibraryForTarget(tgt, value, DEBUG_LibraryType); + addLinkLibrary(mf, tgt,value, DEBUG_LibraryType); break; case CM_LIBRARY_OPTIMIZED: - mf->AddLinkLibraryForTarget(tgt, value, OPTIMIZED_LibraryType); + addLinkLibrary(mf, tgt,value, OPTIMIZED_LibraryType); break; } } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index eda08c0..6e451b6 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1216,35 +1216,6 @@ void cmMakefile::AddLinkLibrary(const std::string& lib, this->LinkLibraries.push_back(tmp); } -void cmMakefile::AddLinkLibraryForTarget(const std::string& target, - const std::string& lib, - cmTargetLinkLibraryType llt) -{ - cmTarget* t = this->FindLocalNonAliasTarget(target); - if (!t) { - std::ostringstream e; - e << "Attempt to add link library \"" << lib << "\" to target \"" << target - << "\" which is not built in this directory."; - this->IssueMessage(cmake::FATAL_ERROR, e.str()); - return; - } - - cmTarget* tgt = this->GetGlobalGenerator()->FindTarget(lib); - if (tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && - (tgt->GetType() != cmState::SHARED_LIBRARY) && - (tgt->GetType() != cmState::INTERFACE_LIBRARY) && - !tgt->IsExecutableWithExports()) { - std::ostringstream e; - e << "Target \"" << lib << "\" of type " - << cmState::GetTargetTypeName(tgt->GetType()) - << " may not be linked into another target. " - << "One may link only to STATIC or SHARED libraries, or " - << "to executables with the ENABLE_EXPORTS property set."; - this->IssueMessage(cmake::FATAL_ERROR, e.str()); - } - t->AddLinkLibrary(*this, lib, llt); -} - void cmMakefile::InitializeFromParent(cmMakefile* parent) { this->SystemIncludeDirectories = parent->SystemIncludeDirectories; diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 9f5f8ee..a16c6bb 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -200,8 +200,6 @@ public: * Add a link library to the build. */ void AddLinkLibrary(const std::string&, cmTargetLinkLibraryType type); - void AddLinkLibraryForTarget(const std::string& tgt, const std::string&, - cmTargetLinkLibraryType type); /** * Add a subdirectory to the build. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7edfcd0e834a4dc8d3da9cada6ad6b9b46dfb4dd commit 7edfcd0e834a4dc8d3da9cada6ad6b9b46dfb4dd Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:36 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 21:25:41 2016 +0200 cmMakefile: Inline method into caller The various uses of AddLinkLibraryForTarget are going away. This is the only remaining non-deprecated use. diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index e714309..d1de7ef 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -338,7 +338,35 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, // Handle normal case first. if (this->CurrentProcessingState != ProcessingKeywordLinkInterface && this->CurrentProcessingState != ProcessingPlainLinkInterface) { - this->Makefile->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt); + + cmTarget* t = + this->Makefile->FindLocalNonAliasTarget(this->Target->GetName()); + if (!t) { + std::ostringstream e; + e << "Attempt to add link library \"" << lib << "\" to target \"" + << this->Target->GetName() + << "\" which is not built in this directory."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + } else { + + cmTarget* tgt = this->Makefile->GetGlobalGenerator()->FindTarget(lib); + + if (tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && + (tgt->GetType() != cmState::SHARED_LIBRARY) && + (tgt->GetType() != cmState::INTERFACE_LIBRARY) && + !tgt->IsExecutableWithExports()) { + std::ostringstream e; + e << "Target \"" << lib << "\" of type " + << cmState::GetTargetTypeName(tgt->GetType()) + << " may not be linked into another target. " + << "One may link only to STATIC or SHARED libraries, or " + << "to executables with the ENABLE_EXPORTS property set."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + } + + this->Target->AddLinkLibrary(*this->Makefile, lib, llt); + } + if (this->CurrentProcessingState == ProcessingLinkLibraries) { this->Target->AppendProperty( "INTERFACE_LINK_LIBRARIES", https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c8dc7f1df6d3492d11ad994a35ee2f0b8a4e60b commit 6c8dc7f1df6d3492d11ad994a35ee2f0b8a4e60b Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:36 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:23:19 2016 +0200 cmake: Simplify find-package mode library addition It does not need the cmMakefile version. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 14124f8..dad8717 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -568,7 +568,7 @@ bool cmake::FindPackage(const std::vector& args) cmSystemTools::ExpandListArgument(libs, libList); for (std::vector::const_iterator libIt = libList.begin(); libIt != libList.end(); ++libIt) { - mf->AddLinkLibraryForTarget(targetName, *libIt, GENERAL_LibraryType); + tgt->AddLinkLibrary(*mf, *libIt, GENERAL_LibraryType); } std::string buildType = mf->GetSafeDefinition("CMAKE_BUILD_TYPE"); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1efca9f427a5c537afc034aadf0c29073bfdfa22 commit 1efca9f427a5c537afc034aadf0c29073bfdfa22 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:36 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:36 2016 +0200 cmMakefile: Remove obsolete parameter diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 4763d83..eda08c0 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1808,8 +1808,7 @@ void cmMakefile::SetProjectName(std::string const& p) this->StateSnapshot.SetProjectName(p); } -void cmMakefile::AddGlobalLinkInformation(const std::string& /* name */, - cmTarget& target) +void cmMakefile::AddGlobalLinkInformation(cmTarget& target) { // for these targets do not add anything switch (target.GetType()) { @@ -1874,7 +1873,7 @@ cmTarget* cmMakefile::AddLibrary(const std::string& lname, target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } target->AddSources(srcs); - this->AddGlobalLinkInformation(lname, *target); + this->AddGlobalLinkInformation(*target); return target; } @@ -1887,7 +1886,7 @@ cmTarget* cmMakefile::AddExecutable(const char* exeName, target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } target->AddSources(srcs); - this->AddGlobalLinkInformation(exeName, *target); + this->AddGlobalLinkInformation(*target); return target; } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 76afcbc..9f5f8ee 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -779,7 +779,7 @@ public: protected: // add link libraries and directories to the target - void AddGlobalLinkInformation(const std::string& name, cmTarget& target); + void AddGlobalLinkInformation(cmTarget& target); // Check for a an unused variable void LogUnused(const char* reason, const std::string& name) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9b5f0a301c23c2c0e56ad3fcb696de71c3d6365 commit d9b5f0a301c23c2c0e56ad3fcb696de71c3d6365 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:36 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:36 2016 +0200 cmTarget: Remove target name from parameter list Use the member state instead. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ae2d776..4763d83 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1242,7 +1242,7 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, << "to executables with the ENABLE_EXPORTS property set."; this->IssueMessage(cmake::FATAL_ERROR, e.str()); } - t->AddLinkLibrary(*this, target, lib, llt); + t->AddLinkLibrary(*this, lib, llt); } void cmMakefile::InitializeFromParent(cmMakefile* parent) @@ -1808,7 +1808,7 @@ void cmMakefile::SetProjectName(std::string const& p) this->StateSnapshot.SetProjectName(p); } -void cmMakefile::AddGlobalLinkInformation(const std::string& name, +void cmMakefile::AddGlobalLinkInformation(const std::string& /* name */, cmTarget& target) { // for these targets do not add anything @@ -1838,7 +1838,7 @@ void cmMakefile::AddGlobalLinkInformation(const std::string& name, this->LinkLibraries.begin(); for (; i != this->LinkLibraries.end(); ++i) { // This is equivalent to the target_link_libraries plain signature. - target.AddLinkLibrary(*this, name, i->first, i->second); + target.AddLinkLibrary(*this, i->first, i->second); target.AppendProperty( "INTERFACE_LINK_LIBRARIES", target.GetDebugGeneratorExpressions(i->first, i->second).c_str()); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 86a2777..651bcc8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -578,8 +578,7 @@ void cmTarget::GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const } } -void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& target, - const std::string& lib, +void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib, cmTargetLinkLibraryType llt) { cmTarget* tgt = this->Makefile->FindTargetToUse(lib); @@ -597,7 +596,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& target, if (cmGeneratorExpression::Find(lib) != std::string::npos || (tgt && tgt->GetType() == cmState::INTERFACE_LIBRARY) || - (target == lib)) { + (this->Name == lib)) { return; } @@ -615,7 +614,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& target, // and we removing one instance will break the link line. Duplicates // will be appropriately eliminated at emit time. if (this->RecordDependencies) { - std::string targetEntry = target; + std::string targetEntry = this->Name; targetEntry += "_LIB_DEPENDS"; std::string dependencies; const char* old_val = mf.GetDefinition(targetEntry); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 8fbb42f..3d88688 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -142,8 +142,8 @@ public: */ void ClearDependencyInformation(cmMakefile& mf, const std::string& target); - void AddLinkLibrary(cmMakefile& mf, const std::string& target, - const std::string& lib, cmTargetLinkLibraryType llt); + void AddLinkLibrary(cmMakefile& mf, const std::string& lib, + cmTargetLinkLibraryType llt); enum TLLSignature { KeywordTLLSignature, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c70c6cc09f0f8be087db2aeae5ee6a3f1b47bda commit 1c70c6cc09f0f8be087db2aeae5ee6a3f1b47bda Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:35 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:35 2016 +0200 cmMakefile: Use public API to find a target diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index f2db37e..ae2d776 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1220,8 +1220,8 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, const std::string& lib, cmTargetLinkLibraryType llt) { - cmTargets::iterator i = this->Targets.find(target); - if (i == this->Targets.end()) { + cmTarget* t = this->FindLocalNonAliasTarget(target); + if (!t) { std::ostringstream e; e << "Attempt to add link library \"" << lib << "\" to target \"" << target << "\" which is not built in this directory."; @@ -1242,7 +1242,7 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, << "to executables with the ENABLE_EXPORTS property set."; this->IssueMessage(cmake::FATAL_ERROR, e.str()); } - i->second.AddLinkLibrary(*this, target, lib, llt); + t->AddLinkLibrary(*this, target, lib, llt); } void cmMakefile::InitializeFromParent(cmMakefile* parent) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2b7baed719e4a6eb918ed6f22ee6031a40b7f316 commit 2b7baed719e4a6eb918ed6f22ee6031a40b7f316 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:35 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:35 2016 +0200 cmMakefile: Inline method into only caller cmMakefile should not have API which is only useful for deprecated systems like cmPluginAPI. diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 3a08aea..2498ecb 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -162,7 +162,14 @@ void CCONV cmAddLinkDirectoryForTarget(void* arg, const char* tgt, const char* d) { cmMakefile* mf = static_cast(arg); - mf->AddLinkDirectoryForTarget(tgt, d); + cmTarget* t = mf->FindLocalNonAliasTarget(tgt); + if (!t) { + cmSystemTools::Error( + "Attempt to add link directories to non-existent target: ", tgt, + " for directory ", d); + return; + } + t->AddLinkDirectory(d); } void CCONV cmAddExecutable(void* arg, const char* exename, int numSrcs, diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d2be29c..f2db37e 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1245,20 +1245,6 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, i->second.AddLinkLibrary(*this, target, lib, llt); } -void cmMakefile::AddLinkDirectoryForTarget(const std::string& target, - const std::string& d) -{ - cmTarget* t = this->FindLocalNonAliasTarget(target); - if (!t) { - cmSystemTools::Error( - "Attempt to add link directories to non-existent target: ", - target.c_str(), " for directory ", d.c_str()); - return; - } - - t->AddLinkDirectory(d); -} - void cmMakefile::InitializeFromParent(cmMakefile* parent) { this->SystemIncludeDirectories = parent->SystemIncludeDirectories; diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 9ffdd9d..76afcbc 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -202,7 +202,6 @@ public: void AddLinkLibrary(const std::string&, cmTargetLinkLibraryType type); void AddLinkLibraryForTarget(const std::string& tgt, const std::string&, cmTargetLinkLibraryType type); - void AddLinkDirectoryForTarget(const std::string& tgt, const std::string& d); /** * Add a subdirectory to the build. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ba954925a876f4c753a4296236bc7d2f18eb0b8 commit 7ba954925a876f4c753a4296236bc7d2f18eb0b8 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:35 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:35 2016 +0200 cmMakefile: Use public API to find a target diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 7e26bff..d2be29c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1248,14 +1248,15 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, void cmMakefile::AddLinkDirectoryForTarget(const std::string& target, const std::string& d) { - cmTargets::iterator i = this->Targets.find(target); - if (i == this->Targets.end()) { + cmTarget* t = this->FindLocalNonAliasTarget(target); + if (!t) { cmSystemTools::Error( "Attempt to add link directories to non-existent target: ", target.c_str(), " for directory ", d.c_str()); return; } - i->second.AddLinkDirectory(d); + + t->AddLinkDirectory(d); } void cmMakefile::InitializeFromParent(cmMakefile* parent) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d98b15fc8b9a065325e3683afe94efce17dd162 commit 6d98b15fc8b9a065325e3683afe94efce17dd162 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:35 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:35 2016 +0200 cmMakefile: Invert if() condition to remove else diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 57bab7a..7e26bff 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1249,13 +1249,13 @@ void cmMakefile::AddLinkDirectoryForTarget(const std::string& target, const std::string& d) { cmTargets::iterator i = this->Targets.find(target); - if (i != this->Targets.end()) { - i->second.AddLinkDirectory(d); - } else { + if (i == this->Targets.end()) { cmSystemTools::Error( "Attempt to add link directories to non-existent target: ", target.c_str(), " for directory ", d.c_str()); + return; } + i->second.AddLinkDirectory(d); } void cmMakefile::InitializeFromParent(cmMakefile* parent) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=869037ee86d1c0ab757840adf499ea270d4301e1 commit 869037ee86d1c0ab757840adf499ea270d4301e1 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:35 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:35 2016 +0200 cmMakefile: Remove ALIAS check This method is only called from the cmPlugin API, which predates ALIAS targets and is obsolete. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c8446ac..57bab7a 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1250,13 +1250,6 @@ void cmMakefile::AddLinkDirectoryForTarget(const std::string& target, { cmTargets::iterator i = this->Targets.find(target); if (i != this->Targets.end()) { - if (this->IsAlias(target)) { - std::ostringstream e; - e << "ALIAS target \"" << target << "\" " - << "may not be linked into another target."; - this->IssueMessage(cmake::FATAL_ERROR, e.str()); - return; - } i->second.AddLinkDirectory(d); } else { cmSystemTools::Error( https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2f6462a634726d9d0ea8d8552454839d67183016 commit 2f6462a634726d9d0ea8d8552454839d67183016 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:34 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:34 2016 +0200 cmMakefile: Collapse two consecutive if()s into one diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8716696..c8446ac 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1230,20 +1230,17 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, } cmTarget* tgt = this->GetGlobalGenerator()->FindTarget(lib); - if (tgt) { - // if it is not a static or shared library then you can not link to it - if ((tgt->GetType() != cmState::STATIC_LIBRARY) && - (tgt->GetType() != cmState::SHARED_LIBRARY) && - (tgt->GetType() != cmState::INTERFACE_LIBRARY) && - !tgt->IsExecutableWithExports()) { - std::ostringstream e; - e << "Target \"" << lib << "\" of type " - << cmState::GetTargetTypeName(tgt->GetType()) - << " may not be linked into another target. " - << "One may link only to STATIC or SHARED libraries, or " - << "to executables with the ENABLE_EXPORTS property set."; - this->IssueMessage(cmake::FATAL_ERROR, e.str()); - } + if (tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && + (tgt->GetType() != cmState::SHARED_LIBRARY) && + (tgt->GetType() != cmState::INTERFACE_LIBRARY) && + !tgt->IsExecutableWithExports()) { + std::ostringstream e; + e << "Target \"" << lib << "\" of type " + << cmState::GetTargetTypeName(tgt->GetType()) + << " may not be linked into another target. " + << "One may link only to STATIC or SHARED libraries, or " + << "to executables with the ENABLE_EXPORTS property set."; + this->IssueMessage(cmake::FATAL_ERROR, e.str()); } i->second.AddLinkLibrary(*this, target, lib, llt); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=148b83a12185d7611ff7576464087430c3f2719c commit 148b83a12185d7611ff7576464087430c3f2719c Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:34 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:34 2016 +0200 cmMakefile: DeMorgan-invert condition diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index f4ea8a9..8716696 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1232,10 +1232,10 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, cmTarget* tgt = this->GetGlobalGenerator()->FindTarget(lib); if (tgt) { // if it is not a static or shared library then you can not link to it - if (!((tgt->GetType() == cmState::STATIC_LIBRARY) || - (tgt->GetType() == cmState::SHARED_LIBRARY) || - (tgt->GetType() == cmState::INTERFACE_LIBRARY) || - tgt->IsExecutableWithExports())) { + if ((tgt->GetType() != cmState::STATIC_LIBRARY) && + (tgt->GetType() != cmState::SHARED_LIBRARY) && + (tgt->GetType() != cmState::INTERFACE_LIBRARY) && + !tgt->IsExecutableWithExports()) { std::ostringstream e; e << "Target \"" << lib << "\" of type " << cmState::GetTargetTypeName(tgt->GetType()) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4457a9f181663701961dc209740974f48213e6e7 commit 4457a9f181663701961dc209740974f48213e6e7 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:34 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:34 2016 +0200 cmMakefile: Return after error and remove else condition diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 7c4a2c2..f4ea8a9 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1226,25 +1226,26 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, e << "Attempt to add link library \"" << lib << "\" to target \"" << target << "\" which is not built in this directory."; this->IssueMessage(cmake::FATAL_ERROR, e.str()); - } else { - cmTarget* tgt = this->GetGlobalGenerator()->FindTarget(lib); - if (tgt) { - // if it is not a static or shared library then you can not link to it - if (!((tgt->GetType() == cmState::STATIC_LIBRARY) || - (tgt->GetType() == cmState::SHARED_LIBRARY) || - (tgt->GetType() == cmState::INTERFACE_LIBRARY) || - tgt->IsExecutableWithExports())) { - std::ostringstream e; - e << "Target \"" << lib << "\" of type " - << cmState::GetTargetTypeName(tgt->GetType()) - << " may not be linked into another target. " - << "One may link only to STATIC or SHARED libraries, or " - << "to executables with the ENABLE_EXPORTS property set."; - this->IssueMessage(cmake::FATAL_ERROR, e.str()); - } + return; + } + + cmTarget* tgt = this->GetGlobalGenerator()->FindTarget(lib); + if (tgt) { + // if it is not a static or shared library then you can not link to it + if (!((tgt->GetType() == cmState::STATIC_LIBRARY) || + (tgt->GetType() == cmState::SHARED_LIBRARY) || + (tgt->GetType() == cmState::INTERFACE_LIBRARY) || + tgt->IsExecutableWithExports())) { + std::ostringstream e; + e << "Target \"" << lib << "\" of type " + << cmState::GetTargetTypeName(tgt->GetType()) + << " may not be linked into another target. " + << "One may link only to STATIC or SHARED libraries, or " + << "to executables with the ENABLE_EXPORTS property set."; + this->IssueMessage(cmake::FATAL_ERROR, e.str()); } - i->second.AddLinkLibrary(*this, target, lib, llt); } + i->second.AddLinkLibrary(*this, target, lib, llt); } void cmMakefile::AddLinkDirectoryForTarget(const std::string& target, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d039c5b46e3cac29ff1d9ce3e768af1bca6b69a commit 4d039c5b46e3cac29ff1d9ce3e768af1bca6b69a Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:34 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:34 2016 +0200 cmMakefile: Invert handling of error condition diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 3e9837d..7c4a2c2 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1221,7 +1221,12 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, cmTargetLinkLibraryType llt) { cmTargets::iterator i = this->Targets.find(target); - if (i != this->Targets.end()) { + if (i == this->Targets.end()) { + std::ostringstream e; + e << "Attempt to add link library \"" << lib << "\" to target \"" << target + << "\" which is not built in this directory."; + this->IssueMessage(cmake::FATAL_ERROR, e.str()); + } else { cmTarget* tgt = this->GetGlobalGenerator()->FindTarget(lib); if (tgt) { // if it is not a static or shared library then you can not link to it @@ -1239,11 +1244,6 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, } } i->second.AddLinkLibrary(*this, target, lib, llt); - } else { - std::ostringstream e; - e << "Attempt to add link library \"" << lib << "\" to target \"" << target - << "\" which is not built in this directory."; - this->IssueMessage(cmake::FATAL_ERROR, e.str()); } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8ec8d6a7ec6c176bc14e7026dc755a9be8689cb commit c8ec8d6a7ec6c176bc14e7026dc755a9be8689cb Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:34 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:34 2016 +0200 cmMakefile: Remove superfluous overload Explicit is better than implicit. diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index bb0e27b..3fc7bd9 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -30,7 +30,7 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector const& args, } this->Makefile->AddLinkLibrary(*i, OPTIMIZED_LibraryType); } else { - this->Makefile->AddLinkLibrary(*i); + this->Makefile->AddLinkLibrary(*i, GENERAL_LibraryType); } } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 0efd92c..3e9837d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1267,11 +1267,6 @@ void cmMakefile::AddLinkDirectoryForTarget(const std::string& target, } } -void cmMakefile::AddLinkLibrary(const std::string& lib) -{ - this->AddLinkLibrary(lib, GENERAL_LibraryType); -} - void cmMakefile::InitializeFromParent(cmMakefile* parent) { this->SystemIncludeDirectories = parent->SystemIncludeDirectories; diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 92907cd..9ffdd9d 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -199,7 +199,6 @@ public: /** * Add a link library to the build. */ - void AddLinkLibrary(const std::string&); void AddLinkLibrary(const std::string&, cmTargetLinkLibraryType type); void AddLinkLibraryForTarget(const std::string& tgt, const std::string&, cmTargetLinkLibraryType type); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e8d47d18b4db6b4621ee5e4864dde234ad8a282 commit 3e8d47d18b4db6b4621ee5e4864dde234ad8a282 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:33 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:33 2016 +0200 cmMakefile: Remove useless link directory container It is never populated - a find will never find anything. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c022b44..0efd92c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1857,10 +1857,7 @@ void cmMakefile::AddGlobalLinkInformation(const std::string& name, if (*j->rbegin() == '/') { newdir = j->substr(0, j->size() - 1); } - if (std::find(this->LinkDirectories.begin(), this->LinkDirectories.end(), - newdir) == this->LinkDirectories.end()) { - target.AddLinkDirectory(*j); - } + target.AddLinkDirectory(*j); } } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 40344ce..92907cd 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -805,9 +805,6 @@ protected: // Tests std::map Tests; - // The link-library paths. Order matters, use std::vector (not std::set). - std::vector LinkDirectories; - // The set of include directories that are marked as system include // directories. std::set SystemIncludeDirectories; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b4895fa35e4a96022abd99b07002a7d2ab3a968 commit 3b4895fa35e4a96022abd99b07002a7d2ab3a968 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:33 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:33 2016 +0200 cmTarget: Inline MergeLinkLibraries into only caller diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index df993ce..c022b44 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1863,7 +1863,16 @@ void cmMakefile::AddGlobalLinkInformation(const std::string& name, } } } - target.MergeLinkLibraries(*this, name, this->LinkLibraries); + + cmTarget::LinkLibraryVectorType::const_iterator i = + this->LinkLibraries.begin(); + for (; i != this->LinkLibraries.end(); ++i) { + // This is equivalent to the target_link_libraries plain signature. + target.AddLinkLibrary(*this, name, i->first, i->second); + target.AppendProperty( + "INTERFACE_LINK_LIBRARIES", + target.GetDebugGeneratorExpressions(i->first, i->second).c_str()); + } } void cmMakefile::AddAlias(const std::string& lname, std::string const& tgtName) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 0e7e2a5..86a2777 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -476,19 +476,6 @@ cmSourceFile* cmTarget::AddSource(const std::string& src) return this->Makefile->GetOrCreateSource(src); } -void cmTarget::MergeLinkLibraries(cmMakefile& mf, const std::string& selfname, - const LinkLibraryVectorType& libs) -{ - LinkLibraryVectorType::const_iterator i = libs.begin(); - for (; i != libs.end(); ++i) { - // This is equivalent to the target_link_libraries plain signature. - this->AddLinkLibrary(mf, selfname, i->first, i->second); - this->AppendProperty( - "INTERFACE_LINK_LIBRARIES", - this->GetDebugGeneratorExpressions(i->first, i->second).c_str()); - } -} - void cmTarget::AddLinkDirectory(const std::string& d) { // Make sure we don't add unnecessary search directories. diff --git a/Source/cmTarget.h b/Source/cmTarget.h index f062529..8fbb42f 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -153,9 +153,6 @@ public: cmListFileContext const& lfc); void GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const; - void MergeLinkLibraries(cmMakefile& mf, const std::string& selfname, - const LinkLibraryVectorType& libs); - const std::vector& GetLinkDirectories() const; void AddLinkDirectory(const std::string& d); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2232e97a6ed4a338b814d1ba3d62a7ffa9ef6e7f commit 2232e97a6ed4a338b814d1ba3d62a7ffa9ef6e7f Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:33 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:33 2016 +0200 cmTarget: Remove useless link library state diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 5b878d3..0e7e2a5 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -479,9 +479,6 @@ cmSourceFile* cmTarget::AddSource(const std::string& src) void cmTarget::MergeLinkLibraries(cmMakefile& mf, const std::string& selfname, const LinkLibraryVectorType& libs) { - assert(this->PrevLinkedLibraries.empty()); - // Only add on libraries we haven't added on before. - // Assumption: the global link libraries could only grow, never shrink LinkLibraryVectorType::const_iterator i = libs.begin(); for (; i != libs.end(); ++i) { // This is equivalent to the target_link_libraries plain signature. @@ -490,7 +487,6 @@ void cmTarget::MergeLinkLibraries(cmMakefile& mf, const std::string& selfname, "INTERFACE_LINK_LIBRARIES", this->GetDebugGeneratorExpressions(i->first, i->second).c_str()); } - this->PrevLinkedLibraries = libs; } void cmTarget::AddLinkDirectory(const std::string& d) diff --git a/Source/cmTarget.h b/Source/cmTarget.h index dd9097a..f062529 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -299,7 +299,6 @@ private: std::vector PreLinkCommands; std::vector PostBuildCommands; std::vector > TLLCommands; - LinkLibraryVectorType PrevLinkedLibraries; LinkLibraryVectorType OriginalLinkLibraries; cmMakefile* Makefile; cmTargetInternalPointer Internal; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a1d4e4ba170f4ac34c80593bd2fe8e1481a1181 commit 9a1d4e4ba170f4ac34c80593bd2fe8e1481a1181 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:33 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:33 2016 +0200 cmTarget: Remove addition of zero when merging link libraries The size is always zero when this is called. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 28ef04a..5b878d3 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -483,7 +483,6 @@ void cmTarget::MergeLinkLibraries(cmMakefile& mf, const std::string& selfname, // Only add on libraries we haven't added on before. // Assumption: the global link libraries could only grow, never shrink LinkLibraryVectorType::const_iterator i = libs.begin(); - i += this->PrevLinkedLibraries.size(); for (; i != libs.end(); ++i) { // This is equivalent to the target_link_libraries plain signature. this->AddLinkLibrary(mf, selfname, i->first, i->second); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8391b3015a82909828b7ada98e76d45aa11b892b commit 8391b3015a82909828b7ada98e76d45aa11b892b Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:32 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 20:13:32 2016 +0200 cmTarget: Add assert about link data MergeLinkLibraries is called only from cmMakefile::AddGlobalLinkInformation which is only called immediately after creating a target. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 13a4744..28ef04a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -479,6 +479,7 @@ cmSourceFile* cmTarget::AddSource(const std::string& src) void cmTarget::MergeLinkLibraries(cmMakefile& mf, const std::string& selfname, const LinkLibraryVectorType& libs) { + assert(this->PrevLinkedLibraries.empty()); // Only add on libraries we haven't added on before. // Assumption: the global link libraries could only grow, never shrink LinkLibraryVectorType::const_iterator i = libs.begin(); ----------------------------------------------------------------------- Summary of changes: Source/cmAddExecutableCommand.cxx | 5 ++ Source/cmAddLibraryCommand.cxx | 5 +- Source/cmCPluginAPI.cxx | 47 +++++++++- Source/cmLinkLibrariesCommand.cxx | 61 ++++++++++++- Source/cmLinkLibrariesCommand.h | 2 + Source/cmMakefile.cxx | 144 +++++++------------------------ Source/cmMakefile.h | 17 ---- Source/cmTarget.cxx | 24 +----- Source/cmTarget.h | 8 +- Source/cmTargetLinkLibrariesCommand.cxx | 30 ++++++- Source/cmake.cxx | 2 +- 11 files changed, 175 insertions(+), 170 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Fri Oct 7 16:04:45 2016 From: steveire at gmail.com (Stephen Kelly) Date: Fri, 7 Oct 2016 16:04:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-252-gda3c79a Message-ID: <20161007200446.70E40F5E39@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 da3c79a376774a27792e349381ea727bc91e1eef (commit) via d8633d344b2393a38746898963f7fdd5c997098a (commit) from 9f667ee9f52f436a3d43121d43c8efe4e05709e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da3c79a376774a27792e349381ea727bc91e1eef commit da3c79a376774a27792e349381ea727bc91e1eef Merge: 9f667ee d8633d3 Author: Stephen Kelly AuthorDate: Fri Oct 7 16:04:44 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 16:04:44 2016 -0400 Merge topic 'clean-up-link-configuration' into next d8633d34 Revert "cmMakefile: Move link_libraries() related code out" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8633d344b2393a38746898963f7fdd5c997098a commit d8633d344b2393a38746898963f7fdd5c997098a Author: Stephen Kelly AuthorDate: Fri Oct 7 22:04:20 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 22:04:20 2016 +0200 Revert "cmMakefile: Move link_libraries() related code out" This reverts commit 9723f4ddb9cc0767b7b963aa31def62c11b05c50. diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index 10b4b76..96ad82a 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -2,8 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddExecutableCommand.h" -#include "cmLinkLibrariesCommand.h" - // cmExecutableCommand bool cmAddExecutableCommand::InitialPass(std::vector const& args, cmExecutionStatus&) @@ -190,9 +188,6 @@ bool cmAddExecutableCommand::InitialPass(std::vector const& args, std::vector srclists(s, args.end()); cmTarget* tgt = this->Makefile->AddExecutable(exename.c_str(), srclists, excludeFromAll); - - cmLinkLibrariesCommand::PopulateTarget(*tgt, this->Makefile); - if (use_win32) { tgt->SetProperty("WIN32_EXECUTABLE", "ON"); } diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 8c02f75..26e38b8 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -4,7 +4,6 @@ #include "cmState.h" #include "cmake.h" -#include "cmLinkLibrariesCommand.h" // cmLibraryCommand bool cmAddLibraryCommand::InitialPass(std::vector const& args, @@ -356,9 +355,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, srclists.insert(srclists.end(), s, args.end()); - cmTarget* tgt = this->Makefile->AddLibrary(libName, type, srclists, excludeFromAll); - - cmLinkLibrariesCommand::PopulateTarget(*tgt, this->Makefile); + this->Makefile->AddLibrary(libName, type, srclists, excludeFromAll); return true; } diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index ecf3f57..4202cf5 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -35,57 +35,3 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector const& args, return true; } - -void cmLinkLibrariesCommand::PopulateTarget(cmTarget& target, cmMakefile* mf) -{ - // for these targets do not add anything - switch (target.GetType()) { - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: - case cmState::INTERFACE_LIBRARY: - return; - default:; - } - if (const char* linkDirsProp = mf->GetProperty("LINK_DIRECTORIES")) { - std::vector linkDirs; - cmSystemTools::ExpandListArgument(linkDirsProp, linkDirs); - - for (std::vector::iterator j = linkDirs.begin(); - j != linkDirs.end(); ++j) { - std::string newdir = *j; - // remove trailing slashes - if (*j->rbegin() == '/') { - newdir = j->substr(0, j->size() - 1); - } - target.AddLinkDirectory(*j); - } - } - - if (const char* linkLibsProp = mf->GetProperty("LINK_LIBRARIES")) { - std::vector linkLibs; - cmSystemTools::ExpandListArgument(linkLibsProp, linkLibs); - - for (std::vector::iterator j = linkLibs.begin(); - j != linkLibs.end(); ++j) { - std::string libraryName = *j; - cmTargetLinkLibraryType libType = GENERAL_LibraryType; - if (libraryName == "optimized") - { - libType = OPTIMIZED_LibraryType; - ++j; - libraryName = *j; - } else - if (libraryName == "debug") - { - libType = DEBUG_LibraryType; - ++j; - libraryName = *j; - } - // This is equivalent to the target_link_libraries plain signature. - target.AddLinkLibrary(*mf, libraryName, libType); - target.AppendProperty( - "INTERFACE_LINK_LIBRARIES", - target.GetDebugGeneratorExpressions(libraryName, libType).c_str()); - } - } -} diff --git a/Source/cmLinkLibrariesCommand.h b/Source/cmLinkLibrariesCommand.h index 5170f03..b4943b6 100644 --- a/Source/cmLinkLibrariesCommand.h +++ b/Source/cmLinkLibrariesCommand.h @@ -27,8 +27,6 @@ public: bool InitialPass(std::vector const& args, cmExecutionStatus& status) CM_OVERRIDE; - static void PopulateTarget(cmTarget& target, cmMakefile* mf); - /** * The name of the command as specified in CMakeList.txt. */ diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c4d6103..d443423 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1771,6 +1771,60 @@ void cmMakefile::SetProjectName(std::string const& p) this->StateSnapshot.SetProjectName(p); } +void cmMakefile::AddGlobalLinkInformation(cmTarget& target) +{ + // for these targets do not add anything + switch (target.GetType()) { + case cmState::UTILITY: + case cmState::GLOBAL_TARGET: + case cmState::INTERFACE_LIBRARY: + return; + default:; + } + if (const char* linkDirsProp = this->GetProperty("LINK_DIRECTORIES")) { + std::vector linkDirs; + cmSystemTools::ExpandListArgument(linkDirsProp, linkDirs); + + for (std::vector::iterator j = linkDirs.begin(); + j != linkDirs.end(); ++j) { + std::string newdir = *j; + // remove trailing slashes + if (*j->rbegin() == '/') { + newdir = j->substr(0, j->size() - 1); + } + target.AddLinkDirectory(*j); + } + } + + if (const char* linkLibsProp = this->GetProperty("LINK_LIBRARIES")) { + std::vector linkLibs; + cmSystemTools::ExpandListArgument(linkLibsProp, linkLibs); + + for (std::vector::iterator j = linkLibs.begin(); + j != linkLibs.end(); ++j) { + std::string libraryName = *j; + cmTargetLinkLibraryType libType = GENERAL_LibraryType; + if (libraryName == "optimized") + { + libType = OPTIMIZED_LibraryType; + ++j; + libraryName = *j; + } else + if (libraryName == "debug") + { + libType = DEBUG_LibraryType; + ++j; + libraryName = *j; + } + // This is equivalent to the target_link_libraries plain signature. + target.AddLinkLibrary(*this, libraryName, libType); + target.AppendProperty( + "INTERFACE_LINK_LIBRARIES", + target.GetDebugGeneratorExpressions(libraryName, libType).c_str()); + } + } +} + void cmMakefile::AddAlias(const std::string& lname, std::string const& tgtName) { this->AliasTargets[lname] = tgtName; @@ -1795,6 +1849,7 @@ cmTarget* cmMakefile::AddLibrary(const std::string& lname, target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } target->AddSources(srcs); + this->AddGlobalLinkInformation(*target); return target; } @@ -1807,6 +1862,7 @@ cmTarget* cmMakefile::AddExecutable(const char* exeName, target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } target->AddSources(srcs); + this->AddGlobalLinkInformation(*target); return target; } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index c9ab3ba..8fef38b 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -771,6 +771,9 @@ public: void AddExportBuildFileGenerator(cmExportBuildFileGenerator* gen); protected: + // add link libraries and directories to the target + void AddGlobalLinkInformation(cmTarget& target); + // Check for a an unused variable void LogUnused(const char* reason, const std::string& name) const; ----------------------------------------------------------------------- Summary of changes: Source/cmAddExecutableCommand.cxx | 5 ---- Source/cmAddLibraryCommand.cxx | 5 +--- Source/cmLinkLibrariesCommand.cxx | 54 ----------------------------------- Source/cmLinkLibrariesCommand.h | 2 -- Source/cmMakefile.cxx | 56 +++++++++++++++++++++++++++++++++++++ Source/cmMakefile.h | 3 ++ 6 files changed, 60 insertions(+), 65 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Fri Oct 7 16:05:07 2016 From: steveire at gmail.com (Stephen Kelly) Date: Fri, 7 Oct 2016 16:05:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-254-g61e6945 Message-ID: <20161007200507.7B595F5E40@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 61e69451ace821aaa94a9ba2b2f4e15140222736 (commit) via f4458e9fd0120198fab3b862f1e12552fd9d9c4b (commit) from da3c79a376774a27792e349381ea727bc91e1eef (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61e69451ace821aaa94a9ba2b2f4e15140222736 commit 61e69451ace821aaa94a9ba2b2f4e15140222736 Merge: da3c79a f4458e9 Author: Stephen Kelly AuthorDate: Fri Oct 7 16:05:06 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 16:05:06 2016 -0400 Merge topic 'clean-up-link-configuration' into next f4458e9f cmMakefile: Simplify programmer error to an assert https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f4458e9fd0120198fab3b862f1e12552fd9d9c4b commit f4458e9fd0120198fab3b862f1e12552fd9d9c4b Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:37 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 22:04:54 2016 +0200 cmMakefile: Simplify programmer error to an assert diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 2414b32..d443423 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1836,14 +1836,9 @@ cmTarget* cmMakefile::AddLibrary(const std::string& lname, const std::vector& srcs, bool excludeFromAll) { - // wrong type ? default to STATIC - if ((type != cmState::STATIC_LIBRARY) && (type != cmState::SHARED_LIBRARY) && - (type != cmState::MODULE_LIBRARY) && (type != cmState::OBJECT_LIBRARY) && - (type != cmState::INTERFACE_LIBRARY)) { - this->IssueMessage(cmake::INTERNAL_ERROR, - "cmMakefile::AddLibrary given invalid target type."); - type = cmState::STATIC_LIBRARY; - } + assert(type == cmState::STATIC_LIBRARY || type == cmState::SHARED_LIBRARY || + type == cmState::MODULE_LIBRARY || type == cmState::OBJECT_LIBRARY || + type == cmState::INTERFACE_LIBRARY); cmTarget* target = this->AddNewTarget(type, lname); // Clear its dependencies. Otherwise, dependencies might persist ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From steveire at gmail.com Fri Oct 7 16:06:07 2016 From: steveire at gmail.com (Stephen Kelly) Date: Fri, 7 Oct 2016 16:06:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-256-gd808f0f Message-ID: <20161007200607.B99B7F5E5D@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 d808f0fdad129f19f1607aa5585a5642fcecf01a (commit) via f17210aec9bf7db8272ab7ce7eea7addd07587fd (commit) from 61e69451ace821aaa94a9ba2b2f4e15140222736 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d808f0fdad129f19f1607aa5585a5642fcecf01a commit d808f0fdad129f19f1607aa5585a5642fcecf01a Merge: 61e6945 f17210a Author: Stephen Kelly AuthorDate: Fri Oct 7 16:06:06 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 16:06:06 2016 -0400 Merge topic 'clean-up-link-configuration' into next f17210ae Fix style https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f17210aec9bf7db8272ab7ce7eea7addd07587fd commit f17210aec9bf7db8272ab7ce7eea7addd07587fd Author: Stephen Kelly AuthorDate: Fri Oct 7 22:05:47 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 22:05:47 2016 +0200 Fix style diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index b2da329..56a469d 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -338,25 +338,22 @@ void CCONV cmAddCustomCommandToTarget(void* arg, const char* target, } static void addLinkLibrary(cmMakefile* mf, std::string const& target, - std::string const& lib, cmTargetLinkLibraryType llt) + std::string const& lib, cmTargetLinkLibraryType llt) { cmTarget* t = mf->FindLocalNonAliasTarget(target); - if (!t) - { + if (!t) { std::ostringstream e; - e << "Attempt to add link library \"" - << lib << "\" to target \"" - << target << "\" which is not built in this directory."; + e << "Attempt to add link library \"" << lib << "\" to target \"" << target + << "\" which is not built in this directory."; mf->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } + } cmTarget* tgt = mf->GetGlobalGenerator()->FindTarget(lib); - if(tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && - (tgt->GetType() != cmState::SHARED_LIBRARY) && - (tgt->GetType() != cmState::INTERFACE_LIBRARY) && - !tgt->IsExecutableWithExports()) - { + if (tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && + (tgt->GetType() != cmState::SHARED_LIBRARY) && + (tgt->GetType() != cmState::INTERFACE_LIBRARY) && + !tgt->IsExecutableWithExports()) { std::ostringstream e; e << "Target \"" << lib << "\" of type " << cmState::GetTargetTypeName(tgt->GetType()) @@ -364,9 +361,9 @@ static void addLinkLibrary(cmMakefile* mf, std::string const& target, << "One may link only to STATIC or SHARED libraries, or " << "to executables with the ENABLE_EXPORTS property set."; mf->IssueMessage(cmake::FATAL_ERROR, e.str()); - } + } - t->AddLinkLibrary( *mf, lib, llt ); + t->AddLinkLibrary(*mf, lib, llt); } void CCONV cmAddLinkLibraryForTarget(void* arg, const char* tgt, @@ -376,13 +373,13 @@ void CCONV cmAddLinkLibraryForTarget(void* arg, const char* tgt, switch (libtype) { case CM_LIBRARY_GENERAL: - addLinkLibrary(mf, tgt,value, GENERAL_LibraryType); + addLinkLibrary(mf, tgt, value, GENERAL_LibraryType); break; case CM_LIBRARY_DEBUG: - addLinkLibrary(mf, tgt,value, DEBUG_LibraryType); + addLinkLibrary(mf, tgt, value, DEBUG_LibraryType); break; case CM_LIBRARY_OPTIMIZED: - addLinkLibrary(mf, tgt,value, OPTIMIZED_LibraryType); + addLinkLibrary(mf, tgt, value, OPTIMIZED_LibraryType); break; } } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d443423..6ab45bb 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1238,8 +1238,7 @@ void cmMakefile::InitializeFromParent(cmMakefile* parent) } // link libraries - this->SetProperty("LINK_LIBRARIES", - parent->GetProperty("LINK_LIBRARIES")); + this->SetProperty("LINK_LIBRARIES", parent->GetProperty("LINK_LIBRARIES")); // link directories this->SetProperty("LINK_DIRECTORIES", @@ -1804,14 +1803,11 @@ void cmMakefile::AddGlobalLinkInformation(cmTarget& target) j != linkLibs.end(); ++j) { std::string libraryName = *j; cmTargetLinkLibraryType libType = GENERAL_LibraryType; - if (libraryName == "optimized") - { + if (libraryName == "optimized") { libType = OPTIMIZED_LibraryType; ++j; libraryName = *j; - } else - if (libraryName == "debug") - { + } else if (libraryName == "debug") { libType = DEBUG_LibraryType; ++j; libraryName = *j; @@ -1837,8 +1833,8 @@ cmTarget* cmMakefile::AddLibrary(const std::string& lname, bool excludeFromAll) { assert(type == cmState::STATIC_LIBRARY || type == cmState::SHARED_LIBRARY || - type == cmState::MODULE_LIBRARY || type == cmState::OBJECT_LIBRARY || - type == cmState::INTERFACE_LIBRARY); + type == cmState::MODULE_LIBRARY || type == cmState::OBJECT_LIBRARY || + type == cmState::INTERFACE_LIBRARY); cmTarget* target = this->AddNewTarget(type, lname); // Clear its dependencies. Otherwise, dependencies might persist @@ -2087,29 +2083,26 @@ void cmMakefile::ExpandVariablesCMP0019() for (std::vector::iterator l = linkLibs.begin(); l != linkLibs.end(); ++l) { std::string libName = *l; - if (libName == "optimized") - { + if (libName == "optimized") { ++l; libName = *l; - } else - if (libName == "debug") - { + } else if (libName == "debug") { ++l; libName = *l; } - if (mightExpandVariablesCMP0019(libName.c_str())) { - std::string orig = libName; - this->ExpandVariablesInString(libName, true, true); - if (pol == cmPolicies::WARN && libName != orig) { - /* clang-format off */ + if (mightExpandVariablesCMP0019(libName.c_str())) { + std::string orig = libName; + this->ExpandVariablesInString(libName, true, true); + if (pol == cmPolicies::WARN && libName != orig) { + /* clang-format off */ w << "Evaluated link library\n" << " " << orig << "\n" << "as\n" << " " << libName << "\n"; - /* clang-format on */ + /* clang-format on */ + } } } - } } if (!w.str().empty()) { ----------------------------------------------------------------------- Summary of changes: Source/cmCPluginAPI.cxx | 31 ++++++++++++++----------------- Source/cmMakefile.cxx | 35 ++++++++++++++--------------------- 2 files changed, 28 insertions(+), 38 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Fri Oct 7 16:08:38 2016 From: steveire at gmail.com (Stephen Kelly) Date: Fri, 7 Oct 2016 16:08:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-260-g1035d0e Message-ID: <20161007200838.CD285F5E87@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 1035d0e0d270301d266f2d20b39bf09fa3448972 (commit) via a1cfc4fe3deed4d642773d0ae63dd524c3f2eba1 (commit) via 4079ba20d9d9c8d15fd28d9440d56c907dda811c (commit) via 17ab8e33f005aab3e493ac4535f63b6f229aacab (commit) from d808f0fdad129f19f1607aa5585a5642fcecf01a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1035d0e0d270301d266f2d20b39bf09fa3448972 commit 1035d0e0d270301d266f2d20b39bf09fa3448972 Merge: d808f0f a1cfc4f Author: Stephen Kelly AuthorDate: Fri Oct 7 16:08:36 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 7 16:08:36 2016 -0400 Merge topic 'clean-up-link-configuration' into next a1cfc4fe cmMakefile: Simplify programmer error to an assert 4079ba20 cmMakefile: Implement LinkLibraries as an internal property 17ab8e33 cmMakefile: Inline method into only remaining caller https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1cfc4fe3deed4d642773d0ae63dd524c3f2eba1 commit a1cfc4fe3deed4d642773d0ae63dd524c3f2eba1 Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:37 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 22:08:03 2016 +0200 cmMakefile: Simplify programmer error to an assert diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 47d9b47..6ab45bb 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1832,14 +1832,9 @@ cmTarget* cmMakefile::AddLibrary(const std::string& lname, const std::vector& srcs, bool excludeFromAll) { - // wrong type ? default to STATIC - if ((type != cmState::STATIC_LIBRARY) && (type != cmState::SHARED_LIBRARY) && - (type != cmState::MODULE_LIBRARY) && (type != cmState::OBJECT_LIBRARY) && - (type != cmState::INTERFACE_LIBRARY)) { - this->IssueMessage(cmake::INTERNAL_ERROR, - "cmMakefile::AddLibrary given invalid target type."); - type = cmState::STATIC_LIBRARY; - } + assert(type == cmState::STATIC_LIBRARY || type == cmState::SHARED_LIBRARY || + type == cmState::MODULE_LIBRARY || type == cmState::OBJECT_LIBRARY || + type == cmState::INTERFACE_LIBRARY); cmTarget* target = this->AddNewTarget(type, lname); // Clear its dependencies. Otherwise, dependencies might persist https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4079ba20d9d9c8d15fd28d9440d56c907dda811c commit 4079ba20d9d9c8d15fd28d9440d56c907dda811c Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:37 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 22:07:50 2016 +0200 cmMakefile: Implement LinkLibraries as an internal property cmMakefile should not have logic particular to individual cmake commands. The link_libraries() command is generally obsolete in favor of target_link_libraries(). An alternative language for CMake probably would not offer the former. The quirks and historical behaviors of the current language should be separate from the core classes of CMake to allow replacing the language. diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index 3fc7bd9..4202cf5 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -20,7 +20,7 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector const& args, "a library"); return false; } - this->Makefile->AddLinkLibrary(*i, DEBUG_LibraryType); + this->Makefile->AppendProperty("LINK_LIBRARIES", "debug"); } else if (*i == "optimized") { ++i; if (i == args.end()) { @@ -28,10 +28,9 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector const& args, "a library"); return false; } - this->Makefile->AddLinkLibrary(*i, OPTIMIZED_LibraryType); - } else { - this->Makefile->AddLinkLibrary(*i, GENERAL_LibraryType); + this->Makefile->AppendProperty("LINK_LIBRARIES", "optimized"); } + this->Makefile->AppendProperty("LINK_LIBRARIES", i->c_str()); } return true; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6e451b6..47d9b47 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1207,15 +1207,6 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove) return true; } -void cmMakefile::AddLinkLibrary(const std::string& lib, - cmTargetLinkLibraryType llt) -{ - cmTarget::LibraryID tmp; - tmp.first = lib; - tmp.second = llt; - this->LinkLibraries.push_back(tmp); -} - void cmMakefile::InitializeFromParent(cmMakefile* parent) { this->SystemIncludeDirectories = parent->SystemIncludeDirectories; @@ -1247,7 +1238,7 @@ void cmMakefile::InitializeFromParent(cmMakefile* parent) } // link libraries - this->LinkLibraries = parent->LinkLibraries; + this->SetProperty("LINK_LIBRARIES", parent->GetProperty("LINK_LIBRARIES")); // link directories this->SetProperty("LINK_DIRECTORIES", @@ -1804,14 +1795,29 @@ void cmMakefile::AddGlobalLinkInformation(cmTarget& target) } } - cmTarget::LinkLibraryVectorType::const_iterator i = - this->LinkLibraries.begin(); - for (; i != this->LinkLibraries.end(); ++i) { - // This is equivalent to the target_link_libraries plain signature. - target.AddLinkLibrary(*this, i->first, i->second); - target.AppendProperty( - "INTERFACE_LINK_LIBRARIES", - target.GetDebugGeneratorExpressions(i->first, i->second).c_str()); + if (const char* linkLibsProp = this->GetProperty("LINK_LIBRARIES")) { + std::vector linkLibs; + cmSystemTools::ExpandListArgument(linkLibsProp, linkLibs); + + for (std::vector::iterator j = linkLibs.begin(); + j != linkLibs.end(); ++j) { + std::string libraryName = *j; + cmTargetLinkLibraryType libType = GENERAL_LibraryType; + if (libraryName == "optimized") { + libType = OPTIMIZED_LibraryType; + ++j; + libraryName = *j; + } else if (libraryName == "debug") { + libType = DEBUG_LibraryType; + ++j; + libraryName = *j; + } + // This is equivalent to the target_link_libraries plain signature. + target.AddLinkLibrary(*this, libraryName, libType); + target.AppendProperty( + "INTERFACE_LINK_LIBRARIES", + target.GetDebugGeneratorExpressions(libraryName, libType).c_str()); + } } } @@ -2074,19 +2080,32 @@ void cmMakefile::ExpandVariablesCMP0019() } } } - for (cmTarget::LinkLibraryVectorType::iterator l = - this->LinkLibraries.begin(); - l != this->LinkLibraries.end(); ++l) { - if (mightExpandVariablesCMP0019(l->first.c_str())) { - std::string orig = l->first; - this->ExpandVariablesInString(l->first, true, true); - if (pol == cmPolicies::WARN && l->first != orig) { - /* clang-format off */ + + if (const char* linkLibsProp = this->GetProperty("LINK_LIBRARIES")) { + std::vector linkLibs; + cmSystemTools::ExpandListArgument(linkLibsProp, linkLibs); + + for (std::vector::iterator l = linkLibs.begin(); + l != linkLibs.end(); ++l) { + std::string libName = *l; + if (libName == "optimized") { + ++l; + libName = *l; + } else if (libName == "debug") { + ++l; + libName = *l; + } + if (mightExpandVariablesCMP0019(libName.c_str())) { + std::string orig = libName; + this->ExpandVariablesInString(libName, true, true); + if (pol == cmPolicies::WARN && libName != orig) { + /* clang-format off */ w << "Evaluated link library\n" << " " << orig << "\n" << "as\n" - << " " << l->first << "\n"; - /* clang-format on */ + << " " << libName << "\n"; + /* clang-format on */ + } } } } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index a16c6bb..8fef38b 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -197,11 +197,6 @@ public: const char* comment = CM_NULLPTR, bool uses_terminal = false); /** - * Add a link library to the build. - */ - void AddLinkLibrary(const std::string&, cmTargetLinkLibraryType type); - - /** * Add a subdirectory to the build. */ void AddSubDirectory(const std::string& fullSrcDir, @@ -808,8 +803,6 @@ protected: std::vector ListFiles; std::vector OutputFiles; - cmTarget::LinkLibraryVectorType LinkLibraries; - std::vector InstallGenerators; std::vector TestGenerators; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17ab8e33f005aab3e493ac4535f63b6f229aacab commit 17ab8e33f005aab3e493ac4535f63b6f229aacab Author: Stephen Kelly AuthorDate: Fri Oct 7 20:13:36 2016 +0200 Commit: Stephen Kelly CommitDate: Fri Oct 7 22:07:16 2016 +0200 cmMakefile: Inline method into only remaining caller diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 2498ecb..56a469d 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -337,6 +337,35 @@ void CCONV cmAddCustomCommandToTarget(void* arg, const char* target, cctype, no_comment, no_working_dir); } +static void addLinkLibrary(cmMakefile* mf, std::string const& target, + std::string const& lib, cmTargetLinkLibraryType llt) +{ + cmTarget* t = mf->FindLocalNonAliasTarget(target); + if (!t) { + std::ostringstream e; + e << "Attempt to add link library \"" << lib << "\" to target \"" << target + << "\" which is not built in this directory."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } + + cmTarget* tgt = mf->GetGlobalGenerator()->FindTarget(lib); + if (tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && + (tgt->GetType() != cmState::SHARED_LIBRARY) && + (tgt->GetType() != cmState::INTERFACE_LIBRARY) && + !tgt->IsExecutableWithExports()) { + std::ostringstream e; + e << "Target \"" << lib << "\" of type " + << cmState::GetTargetTypeName(tgt->GetType()) + << " may not be linked into another target. " + << "One may link only to STATIC or SHARED libraries, or " + << "to executables with the ENABLE_EXPORTS property set."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + } + + t->AddLinkLibrary(*mf, lib, llt); +} + void CCONV cmAddLinkLibraryForTarget(void* arg, const char* tgt, const char* value, int libtype) { @@ -344,13 +373,13 @@ void CCONV cmAddLinkLibraryForTarget(void* arg, const char* tgt, switch (libtype) { case CM_LIBRARY_GENERAL: - mf->AddLinkLibraryForTarget(tgt, value, GENERAL_LibraryType); + addLinkLibrary(mf, tgt, value, GENERAL_LibraryType); break; case CM_LIBRARY_DEBUG: - mf->AddLinkLibraryForTarget(tgt, value, DEBUG_LibraryType); + addLinkLibrary(mf, tgt, value, DEBUG_LibraryType); break; case CM_LIBRARY_OPTIMIZED: - mf->AddLinkLibraryForTarget(tgt, value, OPTIMIZED_LibraryType); + addLinkLibrary(mf, tgt, value, OPTIMIZED_LibraryType); break; } } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index eda08c0..6e451b6 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1216,35 +1216,6 @@ void cmMakefile::AddLinkLibrary(const std::string& lib, this->LinkLibraries.push_back(tmp); } -void cmMakefile::AddLinkLibraryForTarget(const std::string& target, - const std::string& lib, - cmTargetLinkLibraryType llt) -{ - cmTarget* t = this->FindLocalNonAliasTarget(target); - if (!t) { - std::ostringstream e; - e << "Attempt to add link library \"" << lib << "\" to target \"" << target - << "\" which is not built in this directory."; - this->IssueMessage(cmake::FATAL_ERROR, e.str()); - return; - } - - cmTarget* tgt = this->GetGlobalGenerator()->FindTarget(lib); - if (tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && - (tgt->GetType() != cmState::SHARED_LIBRARY) && - (tgt->GetType() != cmState::INTERFACE_LIBRARY) && - !tgt->IsExecutableWithExports()) { - std::ostringstream e; - e << "Target \"" << lib << "\" of type " - << cmState::GetTargetTypeName(tgt->GetType()) - << " may not be linked into another target. " - << "One may link only to STATIC or SHARED libraries, or " - << "to executables with the ENABLE_EXPORTS property set."; - this->IssueMessage(cmake::FATAL_ERROR, e.str()); - } - t->AddLinkLibrary(*this, lib, llt); -} - void cmMakefile::InitializeFromParent(cmMakefile* parent) { this->SystemIncludeDirectories = parent->SystemIncludeDirectories; diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 9f5f8ee..a16c6bb 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -200,8 +200,6 @@ public: * Add a link library to the build. */ void AddLinkLibrary(const std::string&, cmTargetLinkLibraryType type); - void AddLinkLibraryForTarget(const std::string& tgt, const std::string&, - cmTargetLinkLibraryType type); /** * Add a subdirectory to the build. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Sat Oct 8 00:01:09 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 8 Oct 2016 00:01:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-82-g8312fd5 Message-ID: <20161008040109.D3D96F61DA@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 8312fd5c1f82d5acc600c9d796ff99620cbbd3e1 (commit) from 7a1e542ed7065ab300af11f5cb4cfe465de2e5e6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8312fd5c1f82d5acc600c9d796ff99620cbbd3e1 commit 8312fd5c1f82d5acc600c9d796ff99620cbbd3e1 Author: Kitware Robot AuthorDate: Sat Oct 8 00:01:07 2016 -0400 Commit: Kitware Robot CommitDate: Sat Oct 8 00:01:07 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ee2f4af..6f9421c 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 7) -set(CMake_VERSION_PATCH 20161007) +set(CMake_VERSION_PATCH 20161008) #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 Sat Oct 8 05:28:06 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 8 Oct 2016 05:28:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-263-ge8ce847 Message-ID: <20161008092806.CC5E7F5F26@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 e8ce84727ed59d55c37adbf06cde0e2f114c46e1 (commit) via c22f3cf7153fcf766d0ecc17d72e93bf4209e0b2 (commit) via bf28a3873d633d233991f14e8e4d10c76f410deb (commit) from 1035d0e0d270301d266f2d20b39bf09fa3448972 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8ce84727ed59d55c37adbf06cde0e2f114c46e1 commit e8ce84727ed59d55c37adbf06cde0e2f114c46e1 Merge: 1035d0e c22f3cf Author: Brad King AuthorDate: Sat Oct 8 05:28:05 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 8 05:28:05 2016 -0400 Merge topic 'update-kwsys' into next c22f3cf7 Merge branch 'upstream-KWSys' into update-kwsys bf28a387 KWSys 2016-10-07 (dfe9b386) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c22f3cf7153fcf766d0ecc17d72e93bf4209e0b2 commit c22f3cf7153fcf766d0ecc17d72e93bf4209e0b2 Merge: b99bbfe bf28a38 Author: Brad King AuthorDate: Sat Oct 8 05:25:35 2016 -0400 Commit: Brad King CommitDate: Sat Oct 8 05:25:35 2016 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2016-10-07 (dfe9b386) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf28a3873d633d233991f14e8e4d10c76f410deb commit bf28a3873d633d233991f14e8e4d10c76f410deb Author: KWSys Upstream AuthorDate: Fri Oct 7 13:41:32 2016 -0400 Commit: Brad King CommitDate: Sat Oct 8 05:25:34 2016 -0400 KWSys 2016-10-07 (dfe9b386) Code extracted from: http://public.kitware.com/KWSys.git at commit dfe9b38635d80cb5253187c1ddf90923e1b9effd (master). Upstream Shortlog ----------------- Brad King (1): dfe9b386 SystemTools: Re-implement Strucmp diff --git a/SystemTools.cxx b/SystemTools.cxx index c97af25..5da715f 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -2716,17 +2716,15 @@ unsigned long SystemTools::FileLength(const std::string& filename) return length; } -int SystemTools::Strucmp(const char *s1, const char *s2) -{ - // lifted from Graphvis http://www.graphviz.org - while ((*s1 != '\0') - && (tolower(*s1) == tolower(*s2))) - { - s1++; - s2++; - } - - return tolower(*s1) - tolower(*s2); +int SystemTools::Strucmp(const char* l, const char* r) +{ + int lc; + int rc; + do { + lc = tolower(*l++); + rc = tolower(*r++); + } while(lc == rc && lc); + return lc - rc; } // return file's modified time ----------------------------------------------------------------------- Summary of changes: Source/kwsys/SystemTools.cxx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Sat Oct 8 05:35:45 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sat, 8 Oct 2016 05:35:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-265-ge0f4282 Message-ID: <20161008093546.16CBAF5FE7@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 e0f428248c51aacfc2b9e53cca5b88aa15042013 (commit) via cfcf11093df6477b04e19dad4c4fa56f1032faa5 (commit) from e8ce84727ed59d55c37adbf06cde0e2f114c46e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0f428248c51aacfc2b9e53cca5b88aa15042013 commit e0f428248c51aacfc2b9e53cca5b88aa15042013 Merge: e8ce847 cfcf110 Author: Stephen Kelly AuthorDate: Sat Oct 8 05:35:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 8 05:35:45 2016 -0400 Merge topic 'ninja-cleanups' into next cfcf1109 Revert partially https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cfcf11093df6477b04e19dad4c4fa56f1032faa5 commit cfcf11093df6477b04e19dad4c4fa56f1032faa5 Author: Stephen Kelly AuthorDate: Sat Oct 8 11:34:31 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 11:35:22 2016 +0200 Revert partially diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 1b4e34c..f5a0e68 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -834,27 +834,9 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) { cmLocalNinjaGenerator* ng = static_cast(this->LocalGenerators[0]); - - return ConvertToNinjaPath(path, ng->GetStateSnapshot().GetDirectory(), - this->OutputPathPrefix); -} - -std::string cmGlobalNinjaGenerator::ConvertToNinjaPath( - const std::string& path, cmState::Directory stateDir, - std::string const& prefix) -{ - std::string convPath = path; - - if (cmOutputConverter::ContainedInDirectory(stateDir.GetCurrentBinary(), - path, stateDir)) { - convPath = cmOutputConverter::ForceToRelativePath( - stateDir.GetCurrentBinary(), path); - } - - if (!cmSystemTools::FileIsFullPath(convPath)) { - convPath = prefix + convPath; - } - + std::string convPath = ng->ConvertToRelativePath( + this->LocalGenerators[0]->GetState()->GetBinaryDirectory(), path); + convPath = this->NinjaOutputPath(convPath); #ifdef _WIN32 std::replace(convPath.begin(), convPath.end(), '/', '\\'); #endif @@ -1441,7 +1423,7 @@ void cmGlobalNinjaGenerator::InitOutputPathPrefix() std::string cmGlobalNinjaGenerator::NinjaOutputPath(std::string const& path) { - if (cmSystemTools::FileIsFullPath(path)) { + if (!this->HasOutputPathPrefix() || cmSystemTools::FileIsFullPath(path)) { return path; } return this->OutputPathPrefix + path; diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 51a8032..dcf7406 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -233,9 +233,6 @@ public: return this->RulesFileStream; } - static std::string ConvertToNinjaPath(const std::string& path, - cmState::Directory stateDir, - std::string const& prefix); std::string ConvertToNinjaPath(const std::string& path); std::string ConvertToNinjaFolderRule(const std::string& path); ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalNinjaGenerator.cxx | 26 ++++---------------------- Source/cmGlobalNinjaGenerator.h | 3 --- 2 files changed, 4 insertions(+), 25 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Sat Oct 8 05:36:15 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sat, 8 Oct 2016 05:36:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-267-g1991df2 Message-ID: <20161008093615.B84EEF600B@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 1991df2f67e587f01de2836f09015fc1983d1a45 (commit) via cc5e6b82c2ae8293a400b604e0366578f9097d94 (commit) from e0f428248c51aacfc2b9e53cca5b88aa15042013 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1991df2f67e587f01de2836f09015fc1983d1a45 commit 1991df2f67e587f01de2836f09015fc1983d1a45 Merge: e0f4282 cc5e6b8 Author: Stephen Kelly AuthorDate: Sat Oct 8 05:36:14 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 8 05:36:14 2016 -0400 Merge topic 'ninja-cleanups' into next cc5e6b82 Ninja: Extract identical code from condition https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc5e6b82c2ae8293a400b604e0366578f9097d94 commit cc5e6b82c2ae8293a400b604e0366578f9097d94 Author: Stephen Kelly AuthorDate: Tue Oct 4 22:56:32 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 11:36:02 2016 +0200 Ninja: Extract identical code from condition diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 22fae4c..b04c11d 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -492,10 +492,8 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( if (ccg.GetWorkingDirectory().empty()) { output = this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), output); - output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); - } else { - output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } + output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } vars.Output = output.c_str(); ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From steveire at gmail.com Sat Oct 8 16:00:42 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sat, 8 Oct 2016 16:00:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-286-g742fcc2 Message-ID: <20161008200042.0F663F5F31@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 742fcc25999fa30d348dc6df35cd07ecbdcb6fe9 (commit) via b57b7870f6e188136ec0bae6ebc555c882feee90 (commit) via 076d39926f899f88e30b4128c2c835ab35091a31 (commit) via b06615050293a04b7e7ef8ccf97ec706351d761e (commit) via 7a7a02193745d52183cdd203deb1a93d49f797e7 (commit) via 639cbcdaf9e7dc5ae9e4156ec2f21ad1c8634acf (commit) via 62e5fc1dbf477bb2628dee9d2e9bf143609f441b (commit) via 37cab7eb17b505a18f534408307797a5e126663e (commit) via 0e16f8f8067ae721d23e842b83e0e24d4e5d2b49 (commit) via 47e6e46fcf85e73b65b0f93be4e1d9aeb72b9579 (commit) via 2f81fb21790dac9f6036d804d68f108bb498b720 (commit) via cc911145ee8a4a8bb1fcea6fecf77cba37fcf261 (commit) via 2bfda685be5c8138d5b5d5c2366dc41665ef7064 (commit) via ac5daf964a49edc00dc23c621cb5fbc6b9deca4e (commit) via 61d7cc52ebd5bcaf9676a285268e1dc8c1131908 (commit) via c5800af1919ce735267f1dca4e0d9c5234ca9ce3 (commit) via dffcc796ef7759fcb6bdfad7c576adc88e60a7ca (commit) via c12c7f35633c1b75e4ed2c84e021065fce82716d (commit) via 8312fd5c1f82d5acc600c9d796ff99620cbbd3e1 (commit) from 1991df2f67e587f01de2836f09015fc1983d1a45 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=742fcc25999fa30d348dc6df35cd07ecbdcb6fe9 commit 742fcc25999fa30d348dc6df35cd07ecbdcb6fe9 Merge: 1991df2 b57b787 Author: Stephen Kelly AuthorDate: Sat Oct 8 16:00:36 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 8 16:00:36 2016 -0400 Merge topic 'extract-cmLinkLineComputer' into next b57b7870 cmLinkLineComputer: Extract link libraries computation from cmLocalGenerator 076d3992 cmLinkLineComputer: Move FrameworkPath computation from cmLocalGenerator b0661505 cmLocalGenerator: Inline last use of local variable 7a7a0219 cmLinkLineComputer: Move RPath computation from cmLocalGenerator 639cbcda cmLinkLineComputer: Move LinkPath computation from cmLocalGenerator 62e5fc1d cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGenerator 37cab7eb cmLocalGenerator: Move variable to where it is used 0e16f8f8 cmLocalGenerator: Use a std::string instead of char* 47e6e46f cmLocalGenerator: Move stringstream to where it is used 2f81fb21 cmLocalGenerator: Move flag determination up in the function cc911145 cmLocalGenerator: Separate stdlib content from library stream 2bfda685 cmLocalGenerator: Separate rpath content from library stream ac5daf96 cmLocalGenerator: Pass link library info to OutputLinkLibraries 61d7cc52 Makefiles: Port CreateLinkLibs to cmLinkLineComputer c5800af1 cmLinkLineComputer: Extract from cmLocalGenerator dffcc796 Ninja: Constify ... https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b57b7870f6e188136ec0bae6ebc555c882feee90 commit b57b7870f6e188136ec0bae6ebc555c882feee90 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:39 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 13:47:24 2016 +0200 cmLinkLineComputer: Extract link libraries computation from cmLocalGenerator Hide some methods which no longer need to be public. diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 41096ef..24f3578 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -152,3 +152,28 @@ std::string cmLinkLineComputer::ComputeFrameworkPath( } return frameworkPath; } + +std::string cmLinkLineComputer::ComputeLinkLibraries( + cmComputeLinkInformation& cli, std::string const& stdLibString) +{ + std::ostringstream fout; + fout << this->ComputeRPath(cli); + + // Write the library flags to the build rule. + fout << this->ComputeLinkLibs(cli); + + // Add the linker runtime search path if any. + std::string rpath_link = cli.GetRPathLinkString(); + if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) { + fout << cli.GetRPathLinkFlag(); + fout << this->OutputConverter->EscapeForShell(rpath_link, + !this->ForResponse); + fout << " "; + } + + if (!stdLibString.empty()) { + fout << stdLibString << " "; + } + + return fout.str(); +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index f72368a..1fb9b24 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -22,18 +22,20 @@ public: virtual std::string ConvertToLinkReference(std::string const& input) const; - std::string ComputeLinkLibs(cmComputeLinkInformation& cli); - std::string ComputeLinkPath(cmComputeLinkInformation& cli, std::string const& libPathFlag, std::string const& libPathTerminator); - std::string ComputeRPath(cmComputeLinkInformation& cli); - std::string ComputeFrameworkPath(cmComputeLinkInformation& cli, std::string const& fwSearchFlag); + std::string ComputeLinkLibraries(cmComputeLinkInformation& cli, + std::string const& stdLibString); + private: + std::string ComputeLinkLibs(cmComputeLinkInformation& cli); + std::string ComputeRPath(cmComputeLinkInformation& cli); + std::string ConvertToOutputFormat(std::string const& input); std::string ConvertToOutputForExisting(std::string const& input); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9072445..c45ff7e 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1206,7 +1206,7 @@ void cmLocalGenerator::GetTargetFlags( } if (pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false); + frameworkPath, linkPath); } } break; case cmState::EXECUTABLE: { @@ -1228,7 +1228,7 @@ void cmLocalGenerator::GetTargetFlags( this->AddLanguageFlags(flags, linkLanguage, buildType); if (!pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false); + frameworkPath, linkPath); } if (cmSystemTools::IsOn( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { @@ -1396,7 +1396,7 @@ std::string cmLocalGenerator::GetTargetFortranFlags( void cmLocalGenerator::OutputLinkLibraries( cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, - std::string& linkPath, bool forResponseFile) + std::string& linkPath) { cmComputeLinkInformation& cli = *pcli; @@ -1427,29 +1427,7 @@ void cmLocalGenerator::OutputLinkLibraries( linkPath = linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator); - std::string linkLibs = linkLineComputer->ComputeLinkLibs(cli); - - std::string rpath = linkLineComputer->ComputeRPath(cli); - - std::ostringstream fout; - fout << rpath; - - // Write the library flags to the build rule. - fout << linkLibs; - - // Add the linker runtime search path if any. - std::string rpath_link = cli.GetRPathLinkString(); - if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) { - fout << cli.GetRPathLinkFlag(); - fout << this->EscapeForShell(rpath_link, !forResponseFile); - fout << " "; - } - - if (!stdLibString.empty()) { - fout << stdLibString << " "; - } - - linkLibraries = fout.str(); + linkLibraries = linkLineComputer->ComputeLinkLibraries(cli, stdLibString); } std::string cmLocalGenerator::GetLinkLibsCMP0065( diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 4729acb..69c4101 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -351,8 +351,7 @@ protected: void OutputLinkLibraries(cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, - std::string& frameworkPath, std::string& linkPath, - bool forResponseFile); + std::string& frameworkPath, std::string& linkPath); // Expand rule variables in CMake of the type found in language rules void ExpandRuleVariables(std::string& string, diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 61c4bfb..29df0a0 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1605,8 +1605,7 @@ void cmMakefileTargetGenerator::CreateLinkLibs( cmComputeLinkInformation* pcli = this->GeneratorTarget->GetLinkInformation(config); this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, - useResponseFile); + frameworkPath, linkPath); linkLibs = frameworkPath + linkPath + linkLibs; if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=076d39926f899f88e30b4128c2c835ab35091a31 commit 076d39926f899f88e30b4128c2c835ab35091a31 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:39 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 13:47:21 2016 +0200 cmLinkLineComputer: Move FrameworkPath computation from cmLocalGenerator Add UseWatcomQuote state, and remove corresponding method parameters. diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 67b5913..acf06e4 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -366,10 +366,11 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries( this->LocalGenerator, this->GetGlobalGenerator()->CreateLinkLineComputer( this->LocalGenerator->GetStateSnapshot().GetDirectory())); + linkLineComputer->SetUseWatcomQuote(useWatcomQuote); this->LocalGenerator->GetTargetFlags( linkLineComputer.get(), config, linkLibraries, flags, linkFlags, - frameworkPath, linkPath, this->GeneratorTarget, useWatcomQuote); + frameworkPath, linkPath, this->GeneratorTarget); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); if (!linkPath.empty()) { diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 3675887..41096ef 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -136,3 +136,19 @@ std::string cmLinkLineComputer::ComputeRPath(cmComputeLinkInformation& cli) } return rpath; } + +std::string cmLinkLineComputer::ComputeFrameworkPath( + cmComputeLinkInformation& cli, std::string const& fwSearchFlag) +{ + std::string frameworkPath; + if (!fwSearchFlag.empty()) { + std::vector const& fwDirs = cli.GetFrameworkPaths(); + for (std::vector::const_iterator fdi = fwDirs.begin(); + fdi != fwDirs.end(); ++fdi) { + frameworkPath += fwSearchFlag; + frameworkPath += this->ConvertToOutputFormat(*fdi); + frameworkPath += " "; + } + } + return frameworkPath; +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index d33e832..f72368a 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -30,6 +30,9 @@ public: std::string ComputeRPath(cmComputeLinkInformation& cli); + std::string ComputeFrameworkPath(cmComputeLinkInformation& cli, + std::string const& fwSearchFlag); + private: std::string ConvertToOutputFormat(std::string const& input); std::string ConvertToOutputForExisting(std::string const& input); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 99755f4..9072445 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1151,8 +1151,7 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags, void cmLocalGenerator::GetTargetFlags( cmLinkLineComputer* linkLineComputer, const std::string& config, std::string& linkLibs, std::string& flags, std::string& linkFlags, - std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target, - bool useWatcomQuote) + std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target) { const std::string buildType = cmSystemTools::UpperCase(config); cmComputeLinkInformation* pcli = target->GetLinkInformation(config); @@ -1207,8 +1206,7 @@ void cmLocalGenerator::GetTargetFlags( } if (pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false, - useWatcomQuote); + frameworkPath, linkPath, false); } } break; case cmState::EXECUTABLE: { @@ -1230,8 +1228,7 @@ void cmLocalGenerator::GetTargetFlags( this->AddLanguageFlags(flags, linkLanguage, buildType); if (!pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false, - useWatcomQuote); + frameworkPath, linkPath, false); } if (cmSystemTools::IsOn( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { @@ -1399,10 +1396,8 @@ std::string cmLocalGenerator::GetTargetFortranFlags( void cmLocalGenerator::OutputLinkLibraries( cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, - std::string& linkPath, bool forResponseFile, bool useWatcomQuote) + std::string& linkPath, bool forResponseFile) { - OutputFormat shellFormat = - (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); cmComputeLinkInformation& cli = *pcli; std::string linkLanguage = cli.GetLinkLanguage(); @@ -1427,16 +1422,8 @@ void cmLocalGenerator::OutputLinkLibraries( fwSearchFlagVar += "_FRAMEWORK_SEARCH_FLAG"; std::string fwSearchFlag = this->Makefile->GetSafeDefinition(fwSearchFlagVar); - if (!fwSearchFlag.empty()) { - std::vector const& fwDirs = cli.GetFrameworkPaths(); - for (std::vector::const_iterator fdi = fwDirs.begin(); - fdi != fwDirs.end(); ++fdi) { - frameworkPath += fwSearchFlag; - frameworkPath += this->ConvertToOutputFormat(*fdi, shellFormat); - frameworkPath += " "; - } - } + frameworkPath = linkLineComputer->ComputeFrameworkPath(cli, fwSearchFlag); linkPath = linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator); diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 75e01cb..4729acb 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -318,7 +318,7 @@ public: const std::string& config, std::string& linkLibs, std::string& flags, std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, - cmGeneratorTarget* target, bool useWatcomQuote); + cmGeneratorTarget* target); void GetTargetDefines(cmGeneratorTarget const* target, std::string const& config, std::string const& lang, std::set& defines) const; @@ -352,7 +352,7 @@ protected: cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath, - bool forResponseFile, bool useWatcomQuote); + bool forResponseFile); // Expand rule variables in CMake of the type found in language rules void ExpandRuleVariables(std::string& string, diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index f17e012..bfc4857 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -315,7 +315,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Collect up flags to link in needed libraries. std::string linkLibs; this->CreateLinkLibs(linkLineComputer.get(), linkLibs, - useResponseFileForLibs, depends, useWatcomQuote); + useResponseFileForLibs, depends); // Construct object file lists that may be needed to expand the // rule. diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index e0934b5..4488f06 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -514,7 +514,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( linkLineComputer->SetRelink(relink); this->CreateLinkLibs(linkLineComputer.get(), linkLibs, - useResponseFileForLibs, depends, useWatcomQuote); + useResponseFileForLibs, depends); } // Construct object file lists that may be needed to expand the diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index a09318f..61c4bfb 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1597,8 +1597,7 @@ cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( void cmMakefileTargetGenerator::CreateLinkLibs( cmLinkLineComputer* linkLineComputer, std::string& linkLibs, - bool useResponseFile, std::vector& makefile_depends, - bool useWatcomQuote) + bool useResponseFile, std::vector& makefile_depends) { std::string frameworkPath; std::string linkPath; @@ -1607,7 +1606,7 @@ void cmMakefileTargetGenerator::CreateLinkLibs( this->GeneratorTarget->GetLinkInformation(config); this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, frameworkPath, linkPath, - useResponseFile, useWatcomQuote); + useResponseFile); linkLibs = frameworkPath + linkPath + linkLibs; if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index b7d7837..69d9d28 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -156,8 +156,7 @@ protected: /** Create list of flags for link libraries. */ void CreateLinkLibs(cmLinkLineComputer* linkLineComputer, std::string& linkLibs, bool useResponseFile, - std::vector& makefile_depends, - bool useWatcomQuote); + std::vector& makefile_depends); /** Create lists of object files for linking and cleaning. */ void CreateObjectLists(bool useLinkScript, bool useArchiveRules, diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index a458bbb..ab086eb 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -475,11 +475,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->GetGlobalGenerator()->CreateLinkLineComputer( this->GetLocalGenerator(), this->GetLocalGenerator()->GetStateSnapshot().GetDirectory())); + linkLineComputer->SetUseWatcomQuote(useWatcomQuote); - localGen.GetTargetFlags(linkLineComputer.get(), this->GetConfigName(), - vars["LINK_LIBRARIES"], vars["FLAGS"], - vars["LINK_FLAGS"], frameworkPath, linkPath, - &genTarget, useWatcomQuote); + localGen.GetTargetFlags( + linkLineComputer.get(), this->GetConfigName(), vars["LINK_LIBRARIES"], + vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, linkPath, &genTarget); if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") && (gt.GetType() == cmState::SHARED_LIBRARY || gt.IsExecutableWithExports())) { diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index d537cfd..e0fcb75 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -732,7 +732,7 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, cmLinkLineComputer linkLineComputer(lg, lg->GetStateSnapshot().GetDirectory()); lg->GetTargetFlags(&linkLineComputer, config, linkLibs, linkLanguageFlags, - linkFlags, frameworkPath, linkPath, target, false); + linkFlags, frameworkPath, linkPath, target); linkLibs = cmSystemTools::TrimWhitespace(linkLibs); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 6a7dee3..e400c35 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -586,7 +586,7 @@ bool cmake::FindPackage(const std::vector& args) cmLinkLineComputer linkLineComputer(lg, lg->GetStateSnapshot().GetDirectory()); lg->GetTargetFlags(&linkLineComputer, buildType, linkLibs, flags, - linkFlags, frameworkPath, linkPath, gtgt, false); + linkFlags, frameworkPath, linkPath, gtgt); linkLibs = frameworkPath + linkPath + linkLibs; printf("%s\n", linkLibs.c_str()); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b06615050293a04b7e7ef8ccf97ec706351d761e commit b06615050293a04b7e7ef8ccf97ec706351d761e Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:38 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 13:30:28 2016 +0200 cmLocalGenerator: Inline last use of local variable diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index b68d35f..99755f4 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1403,8 +1403,6 @@ void cmLocalGenerator::OutputLinkLibraries( { OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); - bool escapeAllowMakeVars = !forResponseFile; - cmComputeLinkInformation& cli = *pcli; std::string linkLanguage = cli.GetLinkLanguage(); @@ -1456,7 +1454,7 @@ void cmLocalGenerator::OutputLinkLibraries( std::string rpath_link = cli.GetRPathLinkString(); if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) { fout << cli.GetRPathLinkFlag(); - fout << this->EscapeForShell(rpath_link, escapeAllowMakeVars); + fout << this->EscapeForShell(rpath_link, !forResponseFile); fout << " "; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a7a02193745d52183cdd203deb1a93d49f797e7 commit 7a7a02193745d52183cdd203deb1a93d49f797e7 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:38 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 13:30:28 2016 +0200 cmLinkLineComputer: Move RPath computation from cmLocalGenerator Add state for Relink and populate it at the point of cmLinkLineComputer initialization. This allows removal of the parameter in go-between methods. diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index a5e8b72..3675887 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -12,6 +12,7 @@ cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, , OutputConverter(outputConverter) , ForResponse(false) , UseWatcomQuote(false) + , Relink(false) { } @@ -29,6 +30,11 @@ void cmLinkLineComputer::SetForResponse(bool forResponse) this->ForResponse = forResponse; } +void cmLinkLineComputer::SetRelink(bool relink) +{ + this->Relink = relink; +} + std::string cmLinkLineComputer::ConvertToLinkReference( std::string const& lib) const { @@ -100,3 +106,33 @@ std::string cmLinkLineComputer::ComputeLinkPath( } return linkPath; } + +std::string cmLinkLineComputer::ComputeRPath(cmComputeLinkInformation& cli) +{ + std::string rpath; + // Check what kind of rpath flags to use. + if (cli.GetRuntimeSep().empty()) { + // Each rpath entry gets its own option ("-R a -R b -R c") + std::vector runtimeDirs; + cli.GetRPath(runtimeDirs, this->Relink); + + for (std::vector::iterator ri = runtimeDirs.begin(); + ri != runtimeDirs.end(); ++ri) { + rpath += cli.GetRuntimeFlag(); + rpath += this->ConvertToOutputFormat(*ri); + rpath += " "; + } + } else { + // All rpath entries are combined ("-Wl,-rpath,a:b:c"). + std::string rpathString = cli.GetRPathString(this->Relink); + + // Store the rpath option in the stream. + if (!rpathString.empty()) { + rpath += cli.GetRuntimeFlag(); + rpath += + this->OutputConverter->EscapeForShell(rpathString, !this->ForResponse); + rpath += " "; + } + } + return rpath; +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index d38213f..d33e832 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -18,6 +18,7 @@ public: void SetUseWatcomQuote(bool useWatcomQuote); void SetForResponse(bool forResponse); + void SetRelink(bool relink); virtual std::string ConvertToLinkReference(std::string const& input) const; @@ -27,6 +28,8 @@ public: std::string const& libPathFlag, std::string const& libPathTerminator); + std::string ComputeRPath(cmComputeLinkInformation& cli); + private: std::string ConvertToOutputFormat(std::string const& input); std::string ConvertToOutputForExisting(std::string const& input); @@ -36,6 +39,7 @@ private: bool ForResponse; bool UseWatcomQuote; + bool Relink; }; #endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index cbf1d1a..b68d35f 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1207,7 +1207,7 @@ void cmLocalGenerator::GetTargetFlags( } if (pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false, false, + frameworkPath, linkPath, false, useWatcomQuote); } } break; @@ -1230,7 +1230,7 @@ void cmLocalGenerator::GetTargetFlags( this->AddLanguageFlags(flags, linkLanguage, buildType); if (!pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false, false, + frameworkPath, linkPath, false, useWatcomQuote); } if (cmSystemTools::IsOn( @@ -1399,8 +1399,7 @@ std::string cmLocalGenerator::GetTargetFortranFlags( void cmLocalGenerator::OutputLinkLibraries( cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, - std::string& linkPath, bool relink, bool forResponseFile, - bool useWatcomQuote) + std::string& linkPath, bool forResponseFile, bool useWatcomQuote) { OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); @@ -1445,31 +1444,7 @@ void cmLocalGenerator::OutputLinkLibraries( std::string linkLibs = linkLineComputer->ComputeLinkLibs(cli); - std::string rpath; - - // Check what kind of rpath flags to use. - if (cli.GetRuntimeSep().empty()) { - // Each rpath entry gets its own option ("-R a -R b -R c") - std::vector runtimeDirs; - cli.GetRPath(runtimeDirs, relink); - - for (std::vector::iterator ri = runtimeDirs.begin(); - ri != runtimeDirs.end(); ++ri) { - rpath += cli.GetRuntimeFlag(); - rpath += this->ConvertToOutputFormat(*ri, shellFormat); - rpath += " "; - } - } else { - // All rpath entries are combined ("-Wl,-rpath,a:b:c"). - std::string rpathString = cli.GetRPathString(relink); - - // Store the rpath option in the stream. - if (!rpathString.empty()) { - rpath += cli.GetRuntimeFlag(); - rpath += this->EscapeForShell(rpathString, escapeAllowMakeVars); - rpath += " "; - } - } + std::string rpath = linkLineComputer->ComputeRPath(cli); std::ostringstream fout; fout << rpath; diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 12b2b69..75e01cb 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -352,8 +352,7 @@ protected: cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath, - bool relink, bool forResponseFile, - bool useWatcomQuote); + bool forResponseFile, bool useWatcomQuote); // Expand rule variables in CMake of the type found in language rules void ExpandRuleVariables(std::string& string, diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index eaa5061..f17e012 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -310,10 +310,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->GetStateSnapshot().GetDirectory())); linkLineComputer->SetForResponse(useResponseFileForLibs); linkLineComputer->SetUseWatcomQuote(useWatcomQuote); + linkLineComputer->SetRelink(relink); // Collect up flags to link in needed libraries. std::string linkLibs; - this->CreateLinkLibs(linkLineComputer.get(), linkLibs, relink, + this->CreateLinkLibs(linkLineComputer.get(), linkLibs, useResponseFileForLibs, depends, useWatcomQuote); // Construct object file lists that may be needed to expand the diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index ccc6d9f..e0934b5 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -511,8 +511,9 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( this->LocalGenerator->GetStateSnapshot().GetDirectory())); linkLineComputer->SetForResponse(useResponseFileForLibs); linkLineComputer->SetUseWatcomQuote(useWatcomQuote); + linkLineComputer->SetRelink(relink); - this->CreateLinkLibs(linkLineComputer.get(), linkLibs, relink, + this->CreateLinkLibs(linkLineComputer.get(), linkLibs, useResponseFileForLibs, depends, useWatcomQuote); } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index c44af0b..a09318f 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1596,7 +1596,7 @@ cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( } void cmMakefileTargetGenerator::CreateLinkLibs( - cmLinkLineComputer* linkLineComputer, std::string& linkLibs, bool relink, + cmLinkLineComputer* linkLineComputer, std::string& linkLibs, bool useResponseFile, std::vector& makefile_depends, bool useWatcomQuote) { @@ -1606,7 +1606,7 @@ void cmMakefileTargetGenerator::CreateLinkLibs( cmComputeLinkInformation* pcli = this->GeneratorTarget->GetLinkInformation(config); this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, relink, + frameworkPath, linkPath, useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 4913ba8..b7d7837 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -155,7 +155,7 @@ protected: /** Create list of flags for link libraries. */ void CreateLinkLibs(cmLinkLineComputer* linkLineComputer, - std::string& linkLibs, bool relink, bool useResponseFile, + std::string& linkLibs, bool useResponseFile, std::vector& makefile_depends, bool useWatcomQuote); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=639cbcdaf9e7dc5ae9e4156ec2f21ad1c8634acf commit 639cbcdaf9e7dc5ae9e4156ec2f21ad1c8634acf Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:38 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 13:30:28 2016 +0200 cmLinkLineComputer: Move LinkPath computation from cmLocalGenerator Add a ConvertToOutputForExisting method which can be made virtual later to satisfy different generator needs. Pass additional strings as parameters for now. They can be turned into class state later. diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index b2b56bf..a5e8b72 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -72,3 +72,31 @@ std::string cmLinkLineComputer::ConvertToOutputFormat(std::string const& input) return this->OutputConverter->ConvertToOutputFormat(input, shellFormat); } + +std::string cmLinkLineComputer::ConvertToOutputForExisting( + std::string const& input) +{ + cmOutputConverter::OutputFormat shellFormat = (this->ForResponse) + ? cmOutputConverter::RESPONSE + : ((this->UseWatcomQuote) ? cmOutputConverter::WATCOMQUOTE + : cmOutputConverter::SHELL); + + return this->OutputConverter->ConvertToOutputForExisting(input, shellFormat); +} + +std::string cmLinkLineComputer::ComputeLinkPath( + cmComputeLinkInformation& cli, std::string const& libPathFlag, + std::string const& libPathTerminator) +{ + std::string linkPath; + std::vector const& libDirs = cli.GetDirectories(); + for (std::vector::const_iterator libDir = libDirs.begin(); + libDir != libDirs.end(); ++libDir) { + std::string libpath = this->ConvertToOutputForExisting(*libDir); + linkPath += " " + libPathFlag; + linkPath += libpath; + linkPath += libPathTerminator; + linkPath += " "; + } + return linkPath; +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index 2317385..d38213f 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -23,8 +23,13 @@ public: std::string ComputeLinkLibs(cmComputeLinkInformation& cli); + std::string ComputeLinkPath(cmComputeLinkInformation& cli, + std::string const& libPathFlag, + std::string const& libPathTerminator); + private: std::string ConvertToOutputFormat(std::string const& input); + std::string ConvertToOutputForExisting(std::string const& input); cmState::Directory StateDir; cmOutputConverter* OutputConverter; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index bdbbb94..cbf1d1a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1440,17 +1440,8 @@ void cmLocalGenerator::OutputLinkLibraries( } } - // Append the library search path flags. - std::vector const& libDirs = cli.GetDirectories(); - for (std::vector::const_iterator libDir = libDirs.begin(); - libDir != libDirs.end(); ++libDir) { - std::string libpath = - this->ConvertToOutputForExisting(*libDir, shellFormat); - linkPath += " " + libPathFlag; - linkPath += libpath; - linkPath += libPathTerminator; - linkPath += " "; - } + linkPath = + linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator); std::string linkLibs = linkLineComputer->ComputeLinkLibs(cli); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62e5fc1dbf477bb2628dee9d2e9bf143609f441b commit 62e5fc1dbf477bb2628dee9d2e9bf143609f441b Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:38 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 13:30:25 2016 +0200 cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGenerator Add a cmOutputConverter to the cmLinkLineComputer and factory methods to facilitate shell escapes. Add state to the cmLinkLineComputer to record whether outputting for response files or for watcom, to satisfy the cmOutputConverter API. These are constant for the lifetime of the cmLinkLineComputer, even when its functionality is extended in the future. This also keeps the signatures of cmLinkLineComputer relatively simple. Pass the cmComputeLinkInformation as a method parameter so that cmLinkLineComputer is free from target-specific state. An instance should be usable for all targets in a directory. diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 575ddab..67b5913 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -363,6 +363,7 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries( bool useWatcomQuote = this->Makefile->IsOn(createRule + "_USE_WATCOM_QUOTE"); CM_AUTO_PTR linkLineComputer( + this->LocalGenerator, this->GetGlobalGenerator()->CreateLinkLineComputer( this->LocalGenerator->GetStateSnapshot().GetDirectory())); diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 2266e44..1aa6af1 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1415,15 +1415,15 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() } cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer( - cmState::Directory stateDir) const + cmOutputConverter* outputConverter, cmState::Directory stateDir) const { - return new cmLinkLineComputer(stateDir); + return new cmLinkLineComputer(outputConverter, stateDir); } cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer( - cmState::Directory stateDir) const + cmOutputConverter* outputConverter, cmState::Directory stateDir) const { - return new cmMSVC60LinkLineComputer(stateDir); + return new cmMSVC60LinkLineComputer(outputConverter, stateDir); } void cmGlobalGenerator::FinalizeTargetCompileInfo() diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 126eb6f..38eaa76 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -36,6 +36,7 @@ class cmGeneratorTarget; class cmLocalGenerator; class cmLinkLineComputer; class cmMakefile; +class cmOutputConverter; class cmake; /** \class cmGlobalGenerator @@ -107,10 +108,10 @@ public: virtual void Generate(); virtual cmLinkLineComputer* CreateLinkLineComputer( - cmState::Directory stateDir) const; + cmOutputConverter* outputConverter, cmState::Directory stateDir) const; cmLinkLineComputer* CreateMSVC60LinkLineComputer( - cmState::Directory stateDir) const; + cmOutputConverter* outputConverter, cmState::Directory stateDir) const; /** * Set/Get and Clear the enabled languages. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 65a1f25..67df038 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -66,9 +66,10 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os, } cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer( - cmState::Directory /* stateDir */) const + cmOutputConverter* outputConverter, cmState::Directory /* stateDir */) const { return new cmNinjaLinkLineComputer( + outputConverter, this->LocalGenerators[0]->GetStateSnapshot().GetDirectory(), this); } diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 87faf45..6b77a2b 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -70,8 +70,9 @@ public: std::string EncodePath(const std::string& path); static std::string EncodeDepfileSpace(const std::string& path); - cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir) const - CM_OVERRIDE; + cmLinkLineComputer* CreateLinkLineComputer( + cmOutputConverter* outputConverter, + cmState::Directory stateDir) const CM_OVERRIDE; /** * Write the given @a comment to the output stream @a os. It diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 7103a5b..b2b56bf 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -2,10 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLinkLineComputer.h" +#include "cmComputeLinkInformation.h" +#include "cmGeneratorTarget.h" #include "cmOutputConverter.h" -cmLinkLineComputer::cmLinkLineComputer(cmState::Directory stateDir) +cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, + cmState::Directory stateDir) : StateDir(stateDir) + , OutputConverter(outputConverter) + , ForResponse(false) + , UseWatcomQuote(false) { } @@ -13,6 +19,16 @@ cmLinkLineComputer::~cmLinkLineComputer() { } +void cmLinkLineComputer::SetUseWatcomQuote(bool useWatcomQuote) +{ + this->UseWatcomQuote = useWatcomQuote; +} + +void cmLinkLineComputer::SetForResponse(bool forResponse) +{ + this->ForResponse = forResponse; +} + std::string cmLinkLineComputer::ConvertToLinkReference( std::string const& lib) const { @@ -25,3 +41,34 @@ std::string cmLinkLineComputer::ConvertToLinkReference( } return relLib; } + +std::string cmLinkLineComputer::ComputeLinkLibs(cmComputeLinkInformation& cli) +{ + std::string linkLibs; + typedef cmComputeLinkInformation::ItemVector ItemVector; + ItemVector const& items = cli.GetItems(); + for (ItemVector::const_iterator li = items.begin(); li != items.end(); + ++li) { + if (li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY) { + continue; + } + if (li->IsPath) { + linkLibs += + this->ConvertToOutputFormat(this->ConvertToLinkReference(li->Value)); + } else { + linkLibs += li->Value; + } + linkLibs += " "; + } + return linkLibs; +} + +std::string cmLinkLineComputer::ConvertToOutputFormat(std::string const& input) +{ + cmOutputConverter::OutputFormat shellFormat = (this->ForResponse) + ? cmOutputConverter::RESPONSE + : ((this->UseWatcomQuote) ? cmOutputConverter::WATCOMQUOTE + : cmOutputConverter::SHELL); + + return this->OutputConverter->ConvertToOutputFormat(input, shellFormat); +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index bd4c740..2317385 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -6,16 +6,31 @@ #include "cmState.h" +class cmComputeLinkInformation; +class cmOutputConverter; + class cmLinkLineComputer { public: - cmLinkLineComputer(cmState::Directory stateDir); + cmLinkLineComputer(cmOutputConverter* outputConverter, + cmState::Directory stateDir); virtual ~cmLinkLineComputer(); + void SetUseWatcomQuote(bool useWatcomQuote); + void SetForResponse(bool forResponse); + virtual std::string ConvertToLinkReference(std::string const& input) const; + std::string ComputeLinkLibs(cmComputeLinkInformation& cli); + private: + std::string ConvertToOutputFormat(std::string const& input); + cmState::Directory StateDir; + cmOutputConverter* OutputConverter; + + bool ForResponse; + bool UseWatcomQuote; }; #endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 5606b3b..bdbbb94 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1452,24 +1452,7 @@ void cmLocalGenerator::OutputLinkLibraries( linkPath += " "; } - std::string linkLibs; - - // Append the link items. - typedef cmComputeLinkInformation::ItemVector ItemVector; - ItemVector const& items = cli.GetItems(); - for (ItemVector::const_iterator li = items.begin(); li != items.end(); - ++li) { - if (li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY) { - continue; - } - if (li->IsPath) { - linkLibs += this->ConvertToOutputFormat( - linkLineComputer->ConvertToLinkReference(li->Value), shellFormat); - } else { - linkLibs += li->Value; - } - linkLibs += " "; - } + std::string linkLibs = linkLineComputer->ComputeLinkLibs(cli); std::string rpath; diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx index 89432ff..2b6df2a 100644 --- a/Source/cmMSVC60LinkLineComputer.cxx +++ b/Source/cmMSVC60LinkLineComputer.cxx @@ -5,8 +5,9 @@ #include "cmSystemTools.h" -cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer(cmState::Directory stateDir) - : cmLinkLineComputer(stateDir) +cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer( + cmOutputConverter* outputConverter, cmState::Directory stateDir) + : cmLinkLineComputer(outputConverter, stateDir) { } diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h index c159b61..ca9da31 100644 --- a/Source/cmMSVC60LinkLineComputer.h +++ b/Source/cmMSVC60LinkLineComputer.h @@ -9,7 +9,8 @@ class cmMSVC60LinkLineComputer : public cmLinkLineComputer { public: - cmMSVC60LinkLineComputer(cmState::Directory stateDir); + cmMSVC60LinkLineComputer(cmOutputConverter* outputConverter, + cmState::Directory stateDir); std::string ConvertToLinkReference(std::string const& input) const CM_OVERRIDE; diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 09967ff..eaa5061 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -219,6 +219,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) { CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); this->AddModuleDefinitionFlag(linkLineComputer.get(), linkFlags); @@ -305,7 +306,10 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); + linkLineComputer->SetForResponse(useResponseFileForLibs); + linkLineComputer->SetUseWatcomQuote(useWatcomQuote); // Collect up flags to link in needed libraries. std::string linkLibs; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index e32f3a7..ccc6d9f 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -163,6 +163,7 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); @@ -193,6 +194,7 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); @@ -505,7 +507,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); + linkLineComputer->SetForResponse(useResponseFileForLibs); + linkLineComputer->SetUseWatcomQuote(useWatcomQuote); this->CreateLinkLibs(linkLineComputer.get(), linkLibs, relink, useResponseFileForLibs, depends, useWatcomQuote); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 974d62a..c44af0b 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1585,12 +1585,14 @@ std::string cmMakefileTargetGenerator::CreateResponseFile( } cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( - cmState::Directory stateDir) + cmOutputConverter* outputConverter, cmState::Directory stateDir) { if (this->Makefile->IsOn("MSVC60")) { - return this->GlobalGenerator->CreateMSVC60LinkLineComputer(stateDir); + return this->GlobalGenerator->CreateMSVC60LinkLineComputer(outputConverter, + stateDir); } - return this->GlobalGenerator->CreateLinkLineComputer(stateDir); + return this->GlobalGenerator->CreateLinkLineComputer(outputConverter, + stateDir); } void cmMakefileTargetGenerator::CreateLinkLibs( diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 48fdc2f..4913ba8 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -141,7 +141,8 @@ protected: std::vector& makefile_commands, std::vector& makefile_depends); - cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir); + cmLinkLineComputer* CreateLinkLineComputer( + cmOutputConverter* outputConverter, cmState::Directory stateDir); /** Create a response file with the given set of options. Returns the relative path from the target build working directory to the diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx index dd74238..3dcb20b 100644 --- a/Source/cmNinjaLinkLineComputer.cxx +++ b/Source/cmNinjaLinkLineComputer.cxx @@ -5,8 +5,9 @@ #include "cmGlobalNinjaGenerator.h" cmNinjaLinkLineComputer::cmNinjaLinkLineComputer( - cmState::Directory stateDir, cmGlobalNinjaGenerator const* gg) - : cmLinkLineComputer(stateDir) + cmOutputConverter* outputConverter, cmState::Directory stateDir, + cmGlobalNinjaGenerator const* gg) + : cmLinkLineComputer(outputConverter, stateDir) , GG(gg) { } diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h index d86f214..a108568 100644 --- a/Source/cmNinjaLinkLineComputer.h +++ b/Source/cmNinjaLinkLineComputer.h @@ -12,7 +12,8 @@ class cmGlobalNinjaGenerator; class cmNinjaLinkLineComputer : public cmLinkLineComputer { public: - cmNinjaLinkLineComputer(cmState::Directory stateDir, + cmNinjaLinkLineComputer(cmOutputConverter* outputConverter, + cmState::Directory stateDir, cmGlobalNinjaGenerator const* gg); std::string ConvertToLinkReference(std::string const& input) const diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 9c22353..a458bbb 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -473,7 +473,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() CM_AUTO_PTR linkLineComputer( this->GetGlobalGenerator()->CreateLinkLineComputer( - localGen.GetStateSnapshot().GetDirectory())); + this->GetLocalGenerator(), + this->GetLocalGenerator()->GetStateSnapshot().GetDirectory())); localGen.GetTargetFlags(linkLineComputer.get(), this->GetConfigName(), vars["LINK_LIBRARIES"], vars["FLAGS"], diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a58510e..d537cfd 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -729,12 +729,10 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, std::string linkLanguageFlags; std::string frameworkPath; std::string linkPath; - CM_AUTO_PTR linkLineComputer( - lg->GetGlobalGenerator()->CreateLinkLineComputer( - lg->GetStateSnapshot().GetDirectory())); - lg->GetTargetFlags(linkLineComputer.get(), config, linkLibs, - linkLanguageFlags, linkFlags, frameworkPath, linkPath, - target, false); + cmLinkLineComputer linkLineComputer(lg, + lg->GetStateSnapshot().GetDirectory()); + lg->GetTargetFlags(&linkLineComputer, config, linkLibs, linkLanguageFlags, + linkFlags, frameworkPath, linkPath, target, false); linkLibs = cmSystemTools::TrimWhitespace(linkLibs); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 4024ddd..6a7dee3 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -583,9 +583,9 @@ bool cmake::FindPackage(const std::vector& args) gg->CreateGenerationObjects(); cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName()); cmLocalGenerator* lg = gtgt->GetLocalGenerator(); - CM_AUTO_PTR linkLineComputer( - gg->CreateLinkLineComputer(lg->GetStateSnapshot().GetDirectory())); - lg->GetTargetFlags(linkLineComputer.get(), buildType, linkLibs, flags, + cmLinkLineComputer linkLineComputer(lg, + lg->GetStateSnapshot().GetDirectory()); + lg->GetTargetFlags(&linkLineComputer, buildType, linkLibs, flags, linkFlags, frameworkPath, linkPath, gtgt, false); linkLibs = frameworkPath + linkPath + linkLibs; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=37cab7eb17b505a18f534408307797a5e126663e commit 37cab7eb17b505a18f534408307797a5e126663e Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:37 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 12:21:37 2016 +0200 cmLocalGenerator: Move variable to where it is used diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 07c8186..5606b3b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1410,8 +1410,6 @@ void cmLocalGenerator::OutputLinkLibraries( std::string linkLanguage = cli.GetLinkLanguage(); - std::string linkLibs; - std::string libPathFlag = this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG"); std::string libPathTerminator = @@ -1454,6 +1452,8 @@ void cmLocalGenerator::OutputLinkLibraries( linkPath += " "; } + std::string linkLibs; + // Append the link items. typedef cmComputeLinkInformation::ItemVector ItemVector; ItemVector const& items = cli.GetItems(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e16f8f8067ae721d23e842b83e0e24d4e5d2b49 commit 0e16f8f8067ae721d23e842b83e0e24d4e5d2b49 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:37 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 12:21:37 2016 +0200 cmLocalGenerator: Use a std::string instead of char* diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7b7495b..07c8186 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1430,8 +1430,9 @@ void cmLocalGenerator::OutputLinkLibraries( std::string fwSearchFlagVar = "CMAKE_"; fwSearchFlagVar += linkLanguage; fwSearchFlagVar += "_FRAMEWORK_SEARCH_FLAG"; - const char* fwSearchFlag = this->Makefile->GetDefinition(fwSearchFlagVar); - if (fwSearchFlag && *fwSearchFlag) { + std::string fwSearchFlag = + this->Makefile->GetSafeDefinition(fwSearchFlagVar); + if (!fwSearchFlag.empty()) { std::vector const& fwDirs = cli.GetFrameworkPaths(); for (std::vector::const_iterator fdi = fwDirs.begin(); fdi != fwDirs.end(); ++fdi) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47e6e46fcf85e73b65b0f93be4e1d9aeb72b9579 commit 47e6e46fcf85e73b65b0f93be4e1d9aeb72b9579 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:37 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 12:21:37 2016 +0200 cmLocalGenerator: Move stringstream to where it is used diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 4411b88..7b7495b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1405,7 +1405,6 @@ void cmLocalGenerator::OutputLinkLibraries( OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); bool escapeAllowMakeVars = !forResponseFile; - std::ostringstream fout; cmComputeLinkInformation& cli = *pcli; @@ -1497,6 +1496,7 @@ void cmLocalGenerator::OutputLinkLibraries( } } + std::ostringstream fout; fout << rpath; // Write the library flags to the build rule. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2f81fb21790dac9f6036d804d68f108bb498b720 commit 2f81fb21790dac9f6036d804d68f108bb498b720 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:37 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 12:21:37 2016 +0200 cmLocalGenerator: Move flag determination up in the function This content is independent of any targets. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index ee1d613..4411b88 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1418,6 +1418,15 @@ void cmLocalGenerator::OutputLinkLibraries( std::string libPathTerminator = this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR"); + // Add standard libraries for this language. + std::string standardLibsVar = "CMAKE_"; + standardLibsVar += cli.GetLinkLanguage(); + standardLibsVar += "_STANDARD_LIBRARIES"; + std::string stdLibString; + if (const char* stdLibs = this->Makefile->GetDefinition(standardLibsVar)) { + stdLibString = stdLibs; + } + // Append the framework search path flags. std::string fwSearchFlagVar = "CMAKE_"; fwSearchFlagVar += linkLanguage; @@ -1501,14 +1510,6 @@ void cmLocalGenerator::OutputLinkLibraries( fout << " "; } - // Add standard libraries for this language. - std::string standardLibsVar = "CMAKE_"; - standardLibsVar += cli.GetLinkLanguage(); - standardLibsVar += "_STANDARD_LIBRARIES"; - std::string stdLibString; - if (const char* stdLibs = this->Makefile->GetDefinition(standardLibsVar)) { - stdLibString = stdLibs; - } if (!stdLibString.empty()) { fout << stdLibString << " "; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc911145ee8a4a8bb1fcea6fecf77cba37fcf261 commit cc911145ee8a4a8bb1fcea6fecf77cba37fcf261 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:37 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 12:21:37 2016 +0200 cmLocalGenerator: Separate stdlib content from library stream diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index c740b73..ee1d613 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1505,8 +1505,12 @@ void cmLocalGenerator::OutputLinkLibraries( std::string standardLibsVar = "CMAKE_"; standardLibsVar += cli.GetLinkLanguage(); standardLibsVar += "_STANDARD_LIBRARIES"; + std::string stdLibString; if (const char* stdLibs = this->Makefile->GetDefinition(standardLibsVar)) { - fout << stdLibs << " "; + stdLibString = stdLibs; + } + if (!stdLibString.empty()) { + fout << stdLibString << " "; } linkLibraries = fout.str(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2bfda685be5c8138d5b5d5c2366dc41665ef7064 commit 2bfda685be5c8138d5b5d5c2366dc41665ef7064 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:36 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 12:21:36 2016 +0200 cmLocalGenerator: Separate rpath content from library stream diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 8431abb..c740b73 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1462,32 +1462,34 @@ void cmLocalGenerator::OutputLinkLibraries( linkLibs += " "; } + std::string rpath; + // Check what kind of rpath flags to use. if (cli.GetRuntimeSep().empty()) { // Each rpath entry gets its own option ("-R a -R b -R c") std::vector runtimeDirs; cli.GetRPath(runtimeDirs, relink); - std::string rpath; for (std::vector::iterator ri = runtimeDirs.begin(); ri != runtimeDirs.end(); ++ri) { rpath += cli.GetRuntimeFlag(); rpath += this->ConvertToOutputFormat(*ri, shellFormat); rpath += " "; } - fout << rpath; } else { // All rpath entries are combined ("-Wl,-rpath,a:b:c"). - std::string rpath = cli.GetRPathString(relink); + std::string rpathString = cli.GetRPathString(relink); // Store the rpath option in the stream. - if (!rpath.empty()) { - fout << cli.GetRuntimeFlag(); - fout << this->EscapeForShell(rpath, escapeAllowMakeVars); - fout << " "; + if (!rpathString.empty()) { + rpath += cli.GetRuntimeFlag(); + rpath += this->EscapeForShell(rpathString, escapeAllowMakeVars); + rpath += " "; } } + fout << rpath; + // Write the library flags to the build rule. fout << linkLibs; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac5daf964a49edc00dc23c621cb5fbc6b9deca4e commit ac5daf964a49edc00dc23c621cb5fbc6b9deca4e Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:36 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 12:21:36 2016 +0200 cmLocalGenerator: Pass link library info to OutputLinkLibraries Remove the cmGeneratorTarget from the interface. This is simplification of the OutputLinkLibraries responsibilities so that it can be broken apart into multiple methods. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index c48f790..8431abb 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1155,6 +1155,7 @@ void cmLocalGenerator::GetTargetFlags( bool useWatcomQuote) { const std::string buildType = cmSystemTools::UpperCase(config); + cmComputeLinkInformation* pcli = target->GetLinkInformation(config); const char* libraryLinkVariable = "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library @@ -1204,9 +1205,11 @@ void cmLocalGenerator::GetTargetFlags( linkFlags += " "; } } - this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, - linkPath, *target, false, false, - useWatcomQuote); + if (pcli) { + this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, + frameworkPath, linkPath, false, false, + useWatcomQuote); + } } break; case cmState::EXECUTABLE: { linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); @@ -1225,9 +1228,11 @@ void cmLocalGenerator::GetTargetFlags( return; } this->AddLanguageFlags(flags, linkLanguage, buildType); - this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, - linkPath, *target, false, false, - useWatcomQuote); + if (!pcli) { + this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, + frameworkPath, linkPath, false, false, + useWatcomQuote); + } if (cmSystemTools::IsOn( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") + @@ -1392,19 +1397,16 @@ std::string cmLocalGenerator::GetTargetFortranFlags( * to the name of the library. This will not link a library against itself. */ void cmLocalGenerator::OutputLinkLibraries( - cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, - std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget& tgt, - bool relink, bool forResponseFile, bool useWatcomQuote) + cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer, + std::string& linkLibraries, std::string& frameworkPath, + std::string& linkPath, bool relink, bool forResponseFile, + bool useWatcomQuote) { OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); bool escapeAllowMakeVars = !forResponseFile; std::ostringstream fout; - std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); - cmComputeLinkInformation* pcli = tgt.GetLinkInformation(config); - if (!pcli) { - return; - } + cmComputeLinkInformation& cli = *pcli; std::string linkLanguage = cli.GetLinkLanguage(); diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index e19cba2..12b2b69 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -19,6 +19,7 @@ #include #include +class cmComputeLinkInformation; class cmCustomCommandGenerator; class cmGeneratorTarget; class cmGlobalGenerator; @@ -347,11 +348,12 @@ public: protected: ///! put all the libraries for a target on into the given stream - void OutputLinkLibraries(cmLinkLineComputer* linkLineComputer, + void OutputLinkLibraries(cmComputeLinkInformation* pcli, + cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath, - cmGeneratorTarget&, bool relink, - bool forResponseFile, bool useWatcomQuote); + bool relink, bool forResponseFile, + bool useWatcomQuote); // Expand rule variables in CMake of the type found in language rules void ExpandRuleVariables(std::string& string, diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 120919b..974d62a 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1600,9 +1600,12 @@ void cmMakefileTargetGenerator::CreateLinkLibs( { std::string frameworkPath; std::string linkPath; - this->LocalGenerator->OutputLinkLibraries( - linkLineComputer, linkLibs, frameworkPath, linkPath, - *this->GeneratorTarget, relink, useResponseFile, useWatcomQuote); + std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); + cmComputeLinkInformation* pcli = + this->GeneratorTarget->GetLinkInformation(config); + this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, + frameworkPath, linkPath, relink, + useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61d7cc52ebd5bcaf9676a285268e1dc8c1131908 commit 61d7cc52ebd5bcaf9676a285268e1dc8c1131908 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:36 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 12:21:36 2016 +0200 Makefiles: Port CreateLinkLibs to cmLinkLineComputer diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 3dc7007..09967ff 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -303,10 +303,14 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Set path conversion for link script shells. this->LocalGenerator->SetLinkScriptShell(useLinkScript); + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + // Collect up flags to link in needed libraries. std::string linkLibs; - this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends, - useWatcomQuote); + this->CreateLinkLibs(linkLineComputer.get(), linkLibs, relink, + useResponseFileForLibs, depends, useWatcomQuote); // Construct object file lists that may be needed to expand the // rule. diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b12e779..e32f3a7 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -502,8 +502,13 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Collect up flags to link in needed libraries. std::string linkLibs; if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { - this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends, - useWatcomQuote); + + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + + this->CreateLinkLibs(linkLineComputer.get(), linkLibs, relink, + useResponseFileForLibs, depends, useWatcomQuote); } // Construct object file lists that may be needed to expand the diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 51fa79f..120919b 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1594,18 +1594,14 @@ cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( } void cmMakefileTargetGenerator::CreateLinkLibs( - std::string& linkLibs, bool relink, bool useResponseFile, - std::vector& makefile_depends, bool useWatcomQuote) + cmLinkLineComputer* linkLineComputer, std::string& linkLibs, bool relink, + bool useResponseFile, std::vector& makefile_depends, + bool useWatcomQuote) { std::string frameworkPath; std::string linkPath; - - CM_AUTO_PTR linkLineComputer( - this->CreateLinkLineComputer( - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - this->LocalGenerator->OutputLinkLibraries( - linkLineComputer.get(), linkLibs, frameworkPath, linkPath, + linkLineComputer, linkLibs, frameworkPath, linkPath, *this->GeneratorTarget, relink, useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 6d367bd..48fdc2f 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -20,6 +20,7 @@ class cmGeneratedFileStream; class cmGeneratorTarget; class cmGlobalUnixMakefileGenerator3; class cmSourceFile; +class cmLinkLineComputer; /** \class cmMakefileTargetGenerator * \brief Support Routines for writing makefiles @@ -152,7 +153,8 @@ protected: bool CheckUseResponseFileForLibraries(std::string const& l) const; /** Create list of flags for link libraries. */ - void CreateLinkLibs(std::string& linkLibs, bool relink, bool useResponseFile, + void CreateLinkLibs(cmLinkLineComputer* linkLineComputer, + std::string& linkLibs, bool relink, bool useResponseFile, std::vector& makefile_depends, bool useWatcomQuote); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c5800af1919ce735267f1dca4e0d9c5234ca9ce3 commit c5800af1919ce735267f1dca4e0d9c5234ca9ce3 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:36 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 12:21:36 2016 +0200 cmLinkLineComputer: Extract from cmLocalGenerator CMake has several classes which have too many responsibilities. cmLocalGenerator is one of them. Start to extract the link line computation. Create generator-specific implementations of the interface to account for generator-specific behavior. Unfortunately MSVC60 has different behavior to everything else and CMake still generates makefiles for it. Isolate it with MSVC60-specific names. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index e574957..048667a 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -300,6 +300,8 @@ set(SRCS cmInstallDirectoryGenerator.cxx cmLinkedTree.h cmLinkItem.h + cmLinkLineComputer.cxx + cmLinkLineComputer.h cmListFileCache.cxx cmListFileCache.h cmListFileLexer.c @@ -318,6 +320,8 @@ set(SRCS cmMakefileUtilityTargetGenerator.cxx cmMessenger.cxx cmMessenger.h + cmMSVC60LinkLineComputer.cxx + cmMSVC60LinkLineComputer.h cmOSXBundleGenerator.cxx cmOSXBundleGenerator.h cmOutputConverter.cxx @@ -545,6 +549,8 @@ set(SRCS ${SRCS} cmNinjaNormalTargetGenerator.h cmNinjaUtilityTargetGenerator.cxx cmNinjaUtilityTargetGenerator.h + cmNinjaLinkLineComputer.cxx + cmNinjaLinkLineComputer.h ) # Temporary variable for tools targets diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 14ea1a9..b995fa1 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" #include "cmGlobalCommonGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalCommonGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -59,7 +60,8 @@ void cmCommonTargetGenerator::AddFeatureFlags(std::string& flags, } } -void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags) +void cmCommonTargetGenerator::AddModuleDefinitionFlag( + cmLinkLineComputer* linkLineComputer, std::string& flags) { if (!this->ModuleDefinitionFile) { return; @@ -76,7 +78,7 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags) // vs6's "cl -link" pass it to the linker. std::string flag = defFileFlag; flag += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToLinkReference( + linkLineComputer->ConvertToLinkReference( this->ModuleDefinitionFile->GetFullPath()), cmOutputConverter::SHELL); this->LocalGenerator->AppendFlags(flags, flag); diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index 707b81e..fe27038 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -16,6 +16,7 @@ class cmGlobalCommonGenerator; class cmLocalCommonGenerator; class cmMakefile; class cmSourceFile; +class cmLinkLineComputer; /** \class cmCommonTargetGenerator * \brief Common infrastructure for Makefile and Ninja per-target generators @@ -37,7 +38,8 @@ protected: bool GetFeatureAsBool(const std::string& feature); // Helper to add flag for windows .def file. - void AddModuleDefinitionFlag(std::string& flags); + void AddModuleDefinitionFlag(cmLinkLineComputer* linkLineComputer, + std::string& flags); cmGeneratorTarget* GeneratorTarget; cmMakefile* Makefile; diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 959dfdb..575ddab 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -362,9 +362,13 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries( this->GeneratorTarget->GetCreateRuleVariable(language, config); bool useWatcomQuote = this->Makefile->IsOn(createRule + "_USE_WATCOM_QUOTE"); + CM_AUTO_PTR linkLineComputer( + this->GetGlobalGenerator()->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + this->LocalGenerator->GetTargetFlags( - config, linkLibraries, flags, linkFlags, frameworkPath, linkPath, - this->GeneratorTarget, useWatcomQuote); + linkLineComputer.get(), config, linkLibraries, flags, linkFlags, + frameworkPath, linkPath, this->GeneratorTarget, useWatcomQuote); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); if (!linkPath.empty()) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 7132ade..2266e44 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -20,7 +20,9 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmInstallGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" +#include "cmMSVC60LinkLineComputer.h" #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmPolicies.h" @@ -1412,6 +1414,18 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() return autogenTargets; } +cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer( + cmState::Directory stateDir) const +{ + return new cmLinkLineComputer(stateDir); +} + +cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer( + cmState::Directory stateDir) const +{ + return new cmMSVC60LinkLineComputer(stateDir); +} + void cmGlobalGenerator::FinalizeTargetCompileInfo() { std::vector const langs = diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 74b4547..126eb6f 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -34,6 +34,7 @@ class cmExportBuildFileGenerator; class cmExternalMakefileProjectGenerator; class cmGeneratorTarget; class cmLocalGenerator; +class cmLinkLineComputer; class cmMakefile; class cmake; @@ -105,6 +106,12 @@ public: */ virtual void Generate(); + virtual cmLinkLineComputer* CreateLinkLineComputer( + cmState::Directory stateDir) const; + + cmLinkLineComputer* CreateMSVC60LinkLineComputer( + cmState::Directory stateDir) const; + /** * Set/Get and Clear the enabled languages. */ diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index adb5a95..65a1f25 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -11,6 +11,7 @@ #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" +#include "cmNinjaLinkLineComputer.h" #include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" @@ -64,6 +65,13 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os, os << "# " << comment.substr(lpos) << "\n\n"; } +cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer( + cmState::Directory /* stateDir */) const +{ + return new cmNinjaLinkLineComputer( + this->LocalGenerators[0]->GetStateSnapshot().GetDirectory(), this); +} + std::string cmGlobalNinjaGenerator::EncodeRuleName(std::string const& name) { // Ninja rule names must match "[a-zA-Z0-9_.-]+". Use ".xx" to encode diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 5064b21..87faf45 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -70,6 +70,9 @@ public: std::string EncodePath(const std::string& path); static std::string EncodeDepfileSpace(const std::string& path); + cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir) const + CM_OVERRIDE; + /** * Write the given @a comment to the output stream @a os. It * handles new line character properly. diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx new file mode 100644 index 0000000..7103a5b --- /dev/null +++ b/Source/cmLinkLineComputer.cxx @@ -0,0 +1,27 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmLinkLineComputer.h" +#include "cmOutputConverter.h" + +cmLinkLineComputer::cmLinkLineComputer(cmState::Directory stateDir) + : StateDir(stateDir) +{ +} + +cmLinkLineComputer::~cmLinkLineComputer() +{ +} + +std::string cmLinkLineComputer::ConvertToLinkReference( + std::string const& lib) const +{ + std::string relLib = lib; + + if (cmOutputConverter::ContainedInDirectory( + this->StateDir.GetCurrentBinary(), lib, this->StateDir)) { + relLib = cmOutputConverter::ForceToRelativePath( + this->StateDir.GetCurrentBinary(), lib); + } + return relLib; +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h new file mode 100644 index 0000000..bd4c740 --- /dev/null +++ b/Source/cmLinkLineComputer.h @@ -0,0 +1,21 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmLinkLineComputer_h +#define cmLinkLineComputer_h + +#include "cmState.h" + +class cmLinkLineComputer +{ +public: + cmLinkLineComputer(cmState::Directory stateDir); + virtual ~cmLinkLineComputer(); + + virtual std::string ConvertToLinkReference(std::string const& input) const; + +private: + cmState::Directory StateDir; +}; + +#endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7db879a..c48f790 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -12,6 +12,7 @@ #include "cmInstallGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" +#include "cmLinkLineComputer.h" #include "cmMakefile.h" #include "cmSourceFile.h" #include "cmSystemTools.h" @@ -1148,9 +1149,10 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags, } void cmLocalGenerator::GetTargetFlags( - const std::string& config, std::string& linkLibs, std::string& flags, - std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, - cmGeneratorTarget* target, bool useWatcomQuote) + cmLinkLineComputer* linkLineComputer, const std::string& config, + std::string& linkLibs, std::string& flags, std::string& linkFlags, + std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target, + bool useWatcomQuote) { const std::string buildType = cmSystemTools::UpperCase(config); const char* libraryLinkVariable = @@ -1202,8 +1204,9 @@ void cmLocalGenerator::GetTargetFlags( linkFlags += " "; } } - this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target, - false, false, useWatcomQuote); + this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, + linkPath, *target, false, false, + useWatcomQuote); } break; case cmState::EXECUTABLE: { linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); @@ -1222,8 +1225,9 @@ void cmLocalGenerator::GetTargetFlags( return; } this->AddLanguageFlags(flags, linkLanguage, buildType); - this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target, - false, false, useWatcomQuote); + this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, + linkPath, *target, false, false, + useWatcomQuote); if (cmSystemTools::IsOn( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") + @@ -1382,51 +1386,15 @@ std::string cmLocalGenerator::GetTargetFortranFlags( return std::string(); } -std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) -{ -#if defined(_WIN32) && !defined(__CYGWIN__) - // Work-ardound command line parsing limitations in MSVC 6.0 - if (this->Makefile->IsOn("MSVC60")) { - // Search for the last space. - std::string::size_type pos = lib.rfind(' '); - if (pos != lib.npos) { - // Find the slash after the last space, if any. - pos = lib.find('/', pos); - - // Convert the portion of the path with a space to a short path. - std::string sp; - if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) { - // Append the rest of the path with no space. - sp += lib.substr(pos); - - return sp; - } - } - } -#endif - - // Normal behavior. - std::string relLib = lib; - cmState::Directory stateDir = this->GetStateSnapshot().GetDirectory(); - if (cmOutputConverter::ContainedInDirectory( - stateDir.GetCurrentBinary(), lib, stateDir)) { - relLib = cmOutputConverter::ForceToRelativePath( - stateDir.GetCurrentBinary(), lib); - } - return relLib; -} - /** * Output the linking rules on a command line. For executables, * targetLibrary should be a NULL pointer. For libraries, it should point * to the name of the library. This will not link a library against itself. */ -void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, - std::string& frameworkPath, - std::string& linkPath, - cmGeneratorTarget& tgt, bool relink, - bool forResponseFile, - bool useWatcomQuote) +void cmLocalGenerator::OutputLinkLibraries( + cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, + std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget& tgt, + bool relink, bool forResponseFile, bool useWatcomQuote) { OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); @@ -1485,7 +1453,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, } if (li->IsPath) { linkLibs += this->ConvertToOutputFormat( - this->ConvertToLinkReference(li->Value), shellFormat); + linkLineComputer->ConvertToLinkReference(li->Value), shellFormat); } else { linkLibs += li->Value; } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index e16ddab..e19cba2 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -24,6 +24,7 @@ class cmGeneratorTarget; class cmGlobalGenerator; class cmMakefile; class cmSourceFile; +class cmLinkLineComputer; /** \class cmLocalGenerator * \brief Create required build files for a directory. @@ -312,7 +313,8 @@ public: /** Fill out these strings for the given target. Libraries to link, * flags, and linkflags. */ - void GetTargetFlags(const std::string& config, std::string& linkLibs, + void GetTargetFlags(cmLinkLineComputer* linkLineComputer, + const std::string& config, std::string& linkLibs, std::string& flags, std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target, bool useWatcomQuote); @@ -345,7 +347,8 @@ public: protected: ///! put all the libraries for a target on into the given stream - void OutputLinkLibraries(std::string& linkLibraries, + void OutputLinkLibraries(cmLinkLineComputer* linkLineComputer, + std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget&, bool relink, bool forResponseFile, bool useWatcomQuote); @@ -370,8 +373,6 @@ protected: std::string& CreateSafeUniqueObjectFileName(const std::string& sin, std::string const& dir_max); - virtual std::string ConvertToLinkReference(std::string const& lib); - /** Check whether the native build system supports the given definition. Issues a warning. */ virtual bool CheckDefinition(std::string const& define) const; diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 5736581..f87aca2 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -120,12 +120,6 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() // Virtual protected methods. -std::string cmLocalNinjaGenerator::ConvertToLinkReference( - std::string const& lib) -{ - return this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); -} - std::string cmLocalNinjaGenerator::ConvertToIncludeReference( std::string const& path, cmOutputConverter::OutputFormat format, bool forceFullPaths) diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 3061b57..b04788d 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -76,8 +76,6 @@ public: void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg, cmNinjaDeps& ninjaDeps); - std::string ConvertToLinkReference(std::string const& lib) CM_OVERRIDE; - void ComputeObjectFilenames( std::map& mapping, cmGeneratorTarget const* gt = CM_NULLPTR) CM_OVERRIDE; diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx new file mode 100644 index 0000000..89432ff --- /dev/null +++ b/Source/cmMSVC60LinkLineComputer.cxx @@ -0,0 +1,35 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmMSVC60LinkLineComputer.h" + +#include "cmSystemTools.h" + +cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer(cmState::Directory stateDir) + : cmLinkLineComputer(stateDir) +{ +} + +std::string cmMSVC60LinkLineComputer::ConvertToLinkReference( + std::string const& lib) const +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + // Work-ardound command line parsing limitations in MSVC 6.0 + // Search for the last space. + std::string::size_type pos = lib.rfind(' '); + if (pos != lib.npos) { + // Find the slash after the last space, if any. + pos = lib.find('/', pos); + + // Convert the portion of the path with a space to a short path. + std::string sp; + if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) { + // Append the rest of the path with no space. + sp += lib.substr(pos); + return sp; + } + } +#endif + + return cmLinkLineComputer::ConvertToLinkReference(lib); +} diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h new file mode 100644 index 0000000..c159b61 --- /dev/null +++ b/Source/cmMSVC60LinkLineComputer.h @@ -0,0 +1,18 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmMSVC60LinkLineComputer_h +#define cmMSVC60LinkLineComputer_h + +#include "cmLinkLineComputer.h" + +class cmMSVC60LinkLineComputer : public cmLinkLineComputer +{ +public: + cmMSVC60LinkLineComputer(cmState::Directory stateDir); + + std::string ConvertToLinkReference(std::string const& input) const + CM_OVERRIDE; +}; + +#endif diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 79168d8..3dc7007 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -5,6 +5,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -215,7 +216,13 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->AppendFlags( linkFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); - this->AddModuleDefinitionFlag(linkFlags); + { + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + + this->AddModuleDefinitionFlag(linkLineComputer.get(), linkFlags); + } // Construct a list of files associated with this executable that // may need to be cleaned. diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 8e25f43..b12e779 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -5,6 +5,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -159,7 +160,12 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName); - this->AddModuleDefinitionFlag(extraFlags); + + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + + this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(extraFlags, " -Wl,--no-as-needed"); @@ -184,7 +190,12 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_MODULE_LINKER_FLAGS", this->ConfigName); - this->AddModuleDefinitionFlag(extraFlags); + + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + + this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); this->WriteLibraryRules(linkRuleVar, extraFlags, relink); } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 14102ef..51fa79f 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -10,6 +10,7 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -1583,15 +1584,29 @@ std::string cmMakefileTargetGenerator::CreateResponseFile( return responseFileName; } +cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( + cmState::Directory stateDir) +{ + if (this->Makefile->IsOn("MSVC60")) { + return this->GlobalGenerator->CreateMSVC60LinkLineComputer(stateDir); + } + return this->GlobalGenerator->CreateLinkLineComputer(stateDir); +} + void cmMakefileTargetGenerator::CreateLinkLibs( std::string& linkLibs, bool relink, bool useResponseFile, std::vector& makefile_depends, bool useWatcomQuote) { std::string frameworkPath; std::string linkPath; - this->LocalGenerator->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, - *this->GeneratorTarget, relink, - useResponseFile, useWatcomQuote); + + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + + this->LocalGenerator->OutputLinkLibraries( + linkLineComputer.get(), linkLibs, frameworkPath, linkPath, + *this->GeneratorTarget, relink, useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index df7b6aa..6d367bd 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -140,6 +140,8 @@ protected: std::vector& makefile_commands, std::vector& makefile_depends); + cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir); + /** Create a response file with the given set of options. Returns the relative path from the target build working directory to the response file name. */ diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx new file mode 100644 index 0000000..dd74238 --- /dev/null +++ b/Source/cmNinjaLinkLineComputer.cxx @@ -0,0 +1,18 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmNinjaLinkLineComputer.h" +#include "cmGlobalNinjaGenerator.h" + +cmNinjaLinkLineComputer::cmNinjaLinkLineComputer( + cmState::Directory stateDir, cmGlobalNinjaGenerator const* gg) + : cmLinkLineComputer(stateDir) + , GG(gg) +{ +} + +std::string cmNinjaLinkLineComputer::ConvertToLinkReference( + std::string const& lib) const +{ + return GG->ConvertToNinjaPath(lib); +} diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h new file mode 100644 index 0000000..d86f214 --- /dev/null +++ b/Source/cmNinjaLinkLineComputer.h @@ -0,0 +1,25 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmNinjaLinkLineComputer_h +#define cmNinjaLinkLineComputer_h + +#include "cmLinkLineComputer.h" +#include "cmState.h" + +class cmGlobalNinjaGenerator; + +class cmNinjaLinkLineComputer : public cmLinkLineComputer +{ +public: + cmNinjaLinkLineComputer(cmState::Directory stateDir, + cmGlobalNinjaGenerator const* gg); + + std::string ConvertToLinkReference(std::string const& input) const + CM_OVERRIDE; + +private: + cmGlobalNinjaGenerator const* GG; +}; + +#endif diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 095c703..9c22353 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -8,6 +8,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalNinjaGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" @@ -470,9 +471,14 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() vars["TARGET_FILE"] = localGen.ConvertToOutputFormat(targetOutputReal, cmOutputConverter::SHELL); - localGen.GetTargetFlags(this->GetConfigName(), vars["LINK_LIBRARIES"], - vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, - linkPath, &genTarget, useWatcomQuote); + CM_AUTO_PTR linkLineComputer( + this->GetGlobalGenerator()->CreateLinkLineComputer( + localGen.GetStateSnapshot().GetDirectory())); + + localGen.GetTargetFlags(linkLineComputer.get(), this->GetConfigName(), + vars["LINK_LIBRARIES"], vars["FLAGS"], + vars["LINK_FLAGS"], frameworkPath, linkPath, + &genTarget, useWatcomQuote); if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") && (gt.GetType() == cmState::SHARED_LIBRARY || gt.IsExecutableWithExports())) { @@ -497,7 +503,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->addPoolNinjaVariable("JOB_POOL_LINK", >, vars); - this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]); + this->AddModuleDefinitionFlag(linkLineComputer.get(), vars["LINK_FLAGS"]); vars["LINK_FLAGS"] = cmGlobalNinjaGenerator::EncodeLiteral(vars["LINK_FLAGS"]); diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a2bdf49..a58510e 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -7,6 +7,7 @@ #include "cmFileMonitor.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmLinkLineComputer.h" #include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -728,8 +729,12 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, std::string linkLanguageFlags; std::string frameworkPath; std::string linkPath; - lg->GetTargetFlags(config, linkLibs, linkLanguageFlags, linkFlags, - frameworkPath, linkPath, target, false); + CM_AUTO_PTR linkLineComputer( + lg->GetGlobalGenerator()->CreateLinkLineComputer( + lg->GetStateSnapshot().GetDirectory())); + lg->GetTargetFlags(linkLineComputer.get(), config, linkLibs, + linkLanguageFlags, linkFlags, frameworkPath, linkPath, + target, false); linkLibs = cmSystemTools::TrimWhitespace(linkLibs); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 14124f8..4024ddd 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -12,6 +12,7 @@ #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmGlobalGeneratorFactory.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmMessenger.h" @@ -582,8 +583,10 @@ bool cmake::FindPackage(const std::vector& args) gg->CreateGenerationObjects(); cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName()); cmLocalGenerator* lg = gtgt->GetLocalGenerator(); - lg->GetTargetFlags(buildType, linkLibs, flags, linkFlags, frameworkPath, - linkPath, gtgt, false); + CM_AUTO_PTR linkLineComputer( + gg->CreateLinkLineComputer(lg->GetStateSnapshot().GetDirectory())); + lg->GetTargetFlags(linkLineComputer.get(), buildType, linkLibs, flags, + linkFlags, frameworkPath, linkPath, gtgt, false); linkLibs = frameworkPath + linkPath + linkLibs; printf("%s\n", linkLibs.c_str()); diff --git a/bootstrap b/bootstrap index 889cc33..fb8b1eb 100755 --- a/bootstrap +++ b/bootstrap @@ -297,6 +297,8 @@ CMAKE_CXX_SOURCES="\ cmFileTimeComparison \ cmGlobalUnixMakefileGenerator3 \ cmLocalUnixMakefileGenerator3 \ + cmLinkLineComputer \ + cmMSVC60LinkLineComputer \ cmMakefileExecutableTargetGenerator \ cmMakefileLibraryTargetGenerator \ cmMakefileTargetGenerator \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dffcc796ef7759fcb6bdfad7c576adc88e60a7ca commit dffcc796ef7759fcb6bdfad7c576adc88e60a7ca Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:35 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 12:21:35 2016 +0200 Ninja: Constify diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index f5a0e68..adb5a95 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -830,7 +830,8 @@ static void EnsureTrailingSlash(std::string& path) #endif } -std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) +std::string cmGlobalNinjaGenerator::ConvertToNinjaPath( + const std::string& path) const { cmLocalNinjaGenerator* ng = static_cast(this->LocalGenerators[0]); @@ -1421,7 +1422,8 @@ void cmGlobalNinjaGenerator::InitOutputPathPrefix() EnsureTrailingSlash(this->OutputPathPrefix); } -std::string cmGlobalNinjaGenerator::NinjaOutputPath(std::string const& path) +std::string cmGlobalNinjaGenerator::NinjaOutputPath( + std::string const& path) const { if (!this->HasOutputPathPrefix() || cmSystemTools::FileIsFullPath(path)) { return path; diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index dcf7406..5064b21 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -233,7 +233,7 @@ public: return this->RulesFileStream; } - std::string ConvertToNinjaPath(const std::string& path); + std::string ConvertToNinjaPath(const std::string& path) const; std::string ConvertToNinjaFolderRule(const std::string& path); struct MapToNinjaPathImpl @@ -333,7 +333,7 @@ public: bool SupportsConsolePool() const; bool SupportsImplicitOuts() const; - std::string NinjaOutputPath(std::string const& path); + std::string NinjaOutputPath(std::string const& path) const; bool HasOutputPathPrefix() const { return !this->OutputPathPrefix.empty(); } void StripNinjaOutputPathPrefixAsSuffix(std::string& path); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c12c7f35633c1b75e4ed2c84e021065fce82716d commit c12c7f35633c1b75e4ed2c84e021065fce82716d Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:35 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 12:21:35 2016 +0200 cmLocalGenerator: Inline conversion into link computation Make it possible to invoke this functionality independent of cmLocalGenerator. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2284cf9..7db879a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1406,7 +1406,14 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) #endif // Normal behavior. - return this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib); + std::string relLib = lib; + cmState::Directory stateDir = this->GetStateSnapshot().GetDirectory(); + if (cmOutputConverter::ContainedInDirectory( + stateDir.GetCurrentBinary(), lib, stateDir)) { + relLib = cmOutputConverter::ForceToRelativePath( + stateDir.GetCurrentBinary(), lib); + } + return relLib; } /** ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 6 + Source/CMakeVersion.cmake | 2 +- Source/cmCommonTargetGenerator.cxx | 6 +- Source/cmCommonTargetGenerator.h | 4 +- Source/cmGhsMultiTargetGenerator.cxx | 10 +- Source/cmGlobalGenerator.cxx | 14 ++ Source/cmGlobalGenerator.h | 8 ++ Source/cmGlobalNinjaGenerator.cxx | 15 +- Source/cmGlobalNinjaGenerator.h | 8 +- Source/cmLinkLineComputer.cxx | 179 ++++++++++++++++++++++++ Source/cmLinkLineComputer.h | 50 +++++++ Source/cmLocalGenerator.cxx | 167 +++++----------------- Source/cmLocalGenerator.h | 17 +-- Source/cmLocalNinjaGenerator.cxx | 6 - Source/cmLocalNinjaGenerator.h | 2 - Source/cmMSVC60LinkLineComputer.cxx | 36 +++++ Source/cmMSVC60LinkLineComputer.h | 19 +++ Source/cmMakefileExecutableTargetGenerator.cxx | 22 ++- Source/cmMakefileLibraryTargetGenerator.cxx | 30 +++- Source/cmMakefileTargetGenerator.cxx | 24 +++- Source/cmMakefileTargetGenerator.h | 10 +- Source/cmNinjaLinkLineComputer.cxx | 19 +++ Source/cmNinjaLinkLineComputer.h | 26 ++++ Source/cmNinjaNormalTargetGenerator.cxx | 15 +- Source/cmServerProtocol.cxx | 7 +- Source/cmake.cxx | 7 +- bootstrap | 2 + 27 files changed, 527 insertions(+), 184 deletions(-) create mode 100644 Source/cmLinkLineComputer.cxx create mode 100644 Source/cmLinkLineComputer.h create mode 100644 Source/cmMSVC60LinkLineComputer.cxx create mode 100644 Source/cmMSVC60LinkLineComputer.h create mode 100644 Source/cmNinjaLinkLineComputer.cxx create mode 100644 Source/cmNinjaLinkLineComputer.h hooks/post-receive -- CMake From steveire at gmail.com Sat Oct 8 16:28:51 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sat, 8 Oct 2016 16:28:51 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-288-g0428c72 Message-ID: <20161008202851.A8E99F5E4A@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 0428c729ec5203a1887bbb078940a4fc0ad20be0 (commit) via ae6ee87520349c432aad6f1dfa987a1cc630eacd (commit) from 742fcc25999fa30d348dc6df35cd07ecbdcb6fe9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0428c729ec5203a1887bbb078940a4fc0ad20be0 commit 0428c729ec5203a1887bbb078940a4fc0ad20be0 Merge: 742fcc2 ae6ee87 Author: Stephen Kelly AuthorDate: Sat Oct 8 16:28:51 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 8 16:28:51 2016 -0400 Merge topic 'extract-cmLinkLineComputer' into next ae6ee875 fixup! Makefiles: Port CreateLinkLibs to cmLinkLineComputer https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae6ee87520349c432aad6f1dfa987a1cc630eacd commit ae6ee87520349c432aad6f1dfa987a1cc630eacd Author: Stephen Kelly AuthorDate: Sat Oct 8 22:28:30 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 22:28:30 2016 +0200 fixup! Makefiles: Port CreateLinkLibs to cmLinkLineComputer diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index c45ff7e..5c31e3e 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1226,7 +1226,7 @@ void cmLocalGenerator::GetTargetFlags( return; } this->AddLanguageFlags(flags, linkLanguage, buildType); - if (!pcli) { + if (pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, frameworkPath, linkPath); } ----------------------------------------------------------------------- Summary of changes: Source/cmLocalGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From steveire at gmail.com Sat Oct 8 17:25:56 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sat, 8 Oct 2016 17:25:56 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-290-g9ba2a76 Message-ID: <20161008212556.A2C03F3963@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 9ba2a76c8636156de00496f62a4d9d2be85b1b56 (commit) via 8d9daade39b9ebb190f32597469910a70a8131d0 (commit) from 0428c729ec5203a1887bbb078940a4fc0ad20be0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ba2a76c8636156de00496f62a4d9d2be85b1b56 commit 9ba2a76c8636156de00496f62a4d9d2be85b1b56 Merge: 0428c72 8d9daad Author: Stephen Kelly AuthorDate: Sat Oct 8 17:25:56 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 8 17:25:56 2016 -0400 Merge topic 'extract-cmLinkLineComputer' into next 8d9daade fixup! cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGenerator https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d9daade39b9ebb190f32597469910a70a8131d0 commit 8d9daade39b9ebb190f32597469910a70a8131d0 Author: Stephen Kelly AuthorDate: Sat Oct 8 23:25:38 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 8 23:25:38 2016 +0200 fixup! cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGenerator diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index acf06e4..7bafbb0 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -363,8 +363,8 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries( bool useWatcomQuote = this->Makefile->IsOn(createRule + "_USE_WATCOM_QUOTE"); CM_AUTO_PTR linkLineComputer( - this->LocalGenerator, this->GetGlobalGenerator()->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); linkLineComputer->SetUseWatcomQuote(useWatcomQuote); ----------------------------------------------------------------------- Summary of changes: Source/cmGhsMultiTargetGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From steveire at gmail.com Sat Oct 8 19:09:57 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sat, 8 Oct 2016 19:09:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-292-g2f5c30a Message-ID: <20161008230958.417078C60B@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 2f5c30a55bdabcf606b26abb89395608170f9ae2 (commit) via 65ca5dfc857fd295495941a65ce3862675f50d59 (commit) from 9ba2a76c8636156de00496f62a4d9d2be85b1b56 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2f5c30a55bdabcf606b26abb89395608170f9ae2 commit 2f5c30a55bdabcf606b26abb89395608170f9ae2 Merge: 9ba2a76 65ca5df Author: Stephen Kelly AuthorDate: Sat Oct 8 19:09:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 8 19:09:55 2016 -0400 Merge topic 'extract-cmLinkLineComputer' into next 65ca5dfc fixup! cmLinkLineComputer: Extract from cmLocalGenerator https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65ca5dfc857fd295495941a65ce3862675f50d59 commit 65ca5dfc857fd295495941a65ce3862675f50d59 Author: Stephen Kelly AuthorDate: Sun Oct 9 01:09:29 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 01:09:29 2016 +0200 fixup! cmLinkLineComputer: Extract from cmLocalGenerator diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 7bafbb0..dd8b36f 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -5,6 +5,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalGhsMultiGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" ----------------------------------------------------------------------- Summary of changes: Source/cmGhsMultiTargetGenerator.cxx | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Oct 9 00:01:08 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 9 Oct 2016 00:01:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-83-g785bfae Message-ID: <20161009040108.3B0DCF5C42@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 785bfae867de0ad18463d618d45b4ae8c2712934 (commit) from 8312fd5c1f82d5acc600c9d796ff99620cbbd3e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=785bfae867de0ad18463d618d45b4ae8c2712934 commit 785bfae867de0ad18463d618d45b4ae8c2712934 Author: Kitware Robot AuthorDate: Sun Oct 9 00:01:05 2016 -0400 Commit: Kitware Robot CommitDate: Sun Oct 9 00:01:05 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6f9421c..b28be44 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 7) -set(CMake_VERSION_PATCH 20161008) +set(CMake_VERSION_PATCH 20161009) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From steveire at gmail.com Sun Oct 9 04:49:01 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sun, 9 Oct 2016 04:49:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-302-g6b05e33 Message-ID: <20161009084901.8CD59F470C@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 6b05e33c95b2bb392f6c6602da4677747613e35d (commit) via 5de760147f83b507f5b5dda7051eb1f6386e052b (commit) via 95ac050958f063223a4a3f660aa5d8521b089c3f (commit) via 6e3b88962c6762ab384ef73c9a77444ace4b0738 (commit) via 2a49d86d5dec66f7696bd7063459f504cc336a5e (commit) via b0301db23b12351720993a351fedf081ca0fa444 (commit) via 267e02097e90d05a16ffd1aa53fb7910b79aa0ec (commit) via 009019f2596de08c488588fd2c67a423f9fe92bf (commit) via 378849f41e574e72c577b549dfc2d5333ca8f9b5 (commit) via 4a3c49b4698f0e8c20c345770f551142088a3037 (commit) from 2f5c30a55bdabcf606b26abb89395608170f9ae2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b05e33c95b2bb392f6c6602da4677747613e35d commit 6b05e33c95b2bb392f6c6602da4677747613e35d Merge: 2f5c30a 5de7601 Author: Stephen Kelly AuthorDate: Sun Oct 9 04:49:00 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 9 04:49:00 2016 -0400 Merge topic 'minor-cleanups' into next 5de76014 cmMakefile: Return a string from GetDefineFlags 95ac0509 Test: Remove condition for CMake version no longer supported 6e3b8896 cmLocalGenerator: Extract definition retrieval out of loop 2a49d86d Makefiles: Inline only use of method b0301db2 Makefiles: Make helper class independent of cmLocalGenerator 267e0209 cmMakefile: Remove pointless condition 009019f2 Makefiles: Extract identical code from condition 378849f4 Makefiles: Replace array access with local variable 4a3c49b4 Makefiles: Separate two coupled calls https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5de760147f83b507f5b5dda7051eb1f6386e052b commit 5de760147f83b507f5b5dda7051eb1f6386e052b Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:45 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 10:47:45 2016 +0200 cmMakefile: Return a string from GetDefineFlags Flip condition in GHS for readability. diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 959dfdb..fac68f5 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -244,7 +244,7 @@ void cmGhsMultiTargetGenerator::SetCompilerFlags(std::string const& config, flags, this->GeneratorTarget, lang); // Append old-style preprocessor definition flags. - if (std::string(" ") != std::string(this->Makefile->GetDefineFlags())) { + if (this->Makefile->GetDefineFlags() != " ") { this->LocalGenerator->AppendFlags(flags, this->Makefile->GetDefineFlags()); } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 40344ce..de7bead 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -447,7 +447,7 @@ public: /** * Get a list of preprocessor define flags. */ - const char* GetDefineFlags() const { return this->DefineFlags.c_str(); } + std::string GetDefineFlags() const { return this->DefineFlags; } /** * Make sure CMake can write this file https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95ac050958f063223a4a3f660aa5d8521b089c3f commit 95ac050958f063223a4a3f660aa5d8521b089c3f Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:44 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 10:47:44 2016 +0200 Test: Remove condition for CMake version no longer supported diff --git a/Tests/FindPackageModeMakefileTest/CMakeLists.txt b/Tests/FindPackageModeMakefileTest/CMakeLists.txt index 56fcc5d..23832da 100644 --- a/Tests/FindPackageModeMakefileTest/CMakeLists.txt +++ b/Tests/FindPackageModeMakefileTest/CMakeLists.txt @@ -20,16 +20,9 @@ if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Makefile" AND configure_file(FindFoo.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindFoo.cmake @ONLY) # now set up the test: - if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) - file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk" - CONTENT "CMAKE = \"$\"\n" - ) - else() - get_target_property(cmakeLocation cmake LOCATION) - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk" - "CMAKE = \"${cmakeLocation}\"\n" - ) - endif() + file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk" + CONTENT "CMAKE = \"$\"\n" + ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Makefile.in ${CMAKE_CURRENT_BINARY_DIR}/ConfMakefile @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ${CMAKE_CURRENT_BINARY_DIR}/main.cpp COPYONLY) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e3b88962c6762ab384ef73c9a77444ace4b0738 commit 6e3b88962c6762ab384ef73c9a77444ace4b0738 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:44 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 10:47:44 2016 +0200 cmLocalGenerator: Extract definition retrieval out of loop diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2284cf9..0a99e87 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1176,12 +1176,12 @@ void cmLocalGenerator::GetTargetFlags( !(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW"))) { std::vector sources; target->GetSourceFiles(sources, buildType); + std::string defFlag = this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); for (std::vector::const_iterator i = sources.begin(); i != sources.end(); ++i) { cmSourceFile* sf = *i; if (sf->GetExtension() == "def") { - linkFlags += - this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); + linkFlags += defFlag; linkFlags += this->ConvertToOutputFormat( cmSystemTools::CollapseFullPath(sf->GetFullPath()), SHELL); linkFlags += " "; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a49d86d5dec66f7696bd7063459f504cc336a5e commit 2a49d86d5dec66f7696bd7063459f504cc336a5e Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:44 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 10:47:44 2016 +0200 Makefiles: Inline only use of method diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 99a7fae..44ced11 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1217,13 +1217,6 @@ void cmMakefileTargetGenerator::WriteObjectsVariable( << "\n"; } -void cmMakefileTargetGenerator::WriteObjectsString(std::string& buildObjs) -{ - std::vector objStrings; - this->WriteObjectsStrings(objStrings); - buildObjs = objStrings[0]; -} - class cmMakefileTargetGeneratorObjectStrings { public: @@ -1677,7 +1670,9 @@ void cmMakefileTargetGenerator::CreateObjectLists( } } else if (useLinkScript) { if (!useArchiveRules) { - this->WriteObjectsString(buildObjs); + std::vector objStrings; + this->WriteObjectsStrings(objStrings); + buildObjs = objStrings[0]; } } else { buildObjs = "$("; diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index df7b6aa..813af80 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -112,7 +112,6 @@ protected: void WriteObjectsVariable(std::string& variableName, std::string& variableNameExternal, bool useWatcomQuote); - void WriteObjectsString(std::string& buildObjs); void WriteObjectsStrings(std::vector& objStrings, std::string::size_type limit = std::string::npos); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0301db23b12351720993a351fedf081ca0fa444 commit b0301db23b12351720993a351fedf081ca0fa444 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:44 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 10:47:44 2016 +0200 Makefiles: Make helper class independent of cmLocalGenerator It only needs output conversion. diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 14102ef..99a7fae 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1228,10 +1228,12 @@ class cmMakefileTargetGeneratorObjectStrings { public: cmMakefileTargetGeneratorObjectStrings(std::vector& strings, - cmLocalUnixMakefileGenerator3* lg, + cmOutputConverter* outputConverter, + cmState::Directory stateDir, std::string::size_type limit) : Strings(strings) - , LocalGenerator(lg) + , OutputConverter(outputConverter) + , StateDir(stateDir) , LengthLimit(limit) { this->Space = ""; @@ -1239,10 +1241,8 @@ public: void Feed(std::string const& obj) { // Construct the name of the next object. - this->NextObject = this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->MaybeConvertToRelativePath( - this->LocalGenerator->GetCurrentBinaryDirectory(), obj), - cmOutputConverter::RESPONSE); + this->NextObject = this->OutputConverter->ConvertToOutputFormat( + this->MaybeConvertToRelativePath(obj), cmOutputConverter::RESPONSE); // Roll over to next string if the limit will be exceeded. if (this->LengthLimit != std::string::npos && @@ -1262,8 +1262,19 @@ public: } void Done() { this->Strings.push_back(this->CurrentString); } private: + std::string MaybeConvertToRelativePath(std::string const& obj) + { + if (!cmOutputConverter::ContainedInDirectory( + this->StateDir.GetCurrentBinary(), obj, this->StateDir)) { + return obj; + } + return cmOutputConverter::ForceToRelativePath( + this->StateDir.GetCurrentBinary(), obj); + } + std::vector& Strings; - cmLocalUnixMakefileGenerator3* LocalGenerator; + cmOutputConverter* OutputConverter; + cmState::Directory StateDir; std::string::size_type LengthLimit; std::string CurrentString; std::string NextObject; @@ -1273,8 +1284,9 @@ private: void cmMakefileTargetGenerator::WriteObjectsStrings( std::vector& objStrings, std::string::size_type limit) { - cmMakefileTargetGeneratorObjectStrings helper(objStrings, - this->LocalGenerator, limit); + cmMakefileTargetGeneratorObjectStrings helper( + objStrings, this->LocalGenerator, + this->LocalGenerator->GetStateSnapshot().GetDirectory(), limit); for (std::vector::const_iterator i = this->Objects.begin(); i != this->Objects.end(); ++i) { helper.Feed(*i); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=267e02097e90d05a16ffd1aa53fb7910b79aa0ec commit 267e02097e90d05a16ffd1aa53fb7910b79aa0ec Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:44 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 10:47:44 2016 +0200 cmMakefile: Remove pointless condition This method is never called with an empty string. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index df993ce..a9ef9cd 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3970,10 +3970,8 @@ cmPolicies::PolicyStatus cmMakefile::GetPolicyStatus( bool cmMakefile::PolicyOptionalWarningEnabled(std::string const& var) { // Check for an explicit CMAKE_POLICY_WARNING_CMP setting. - if (!var.empty()) { - if (const char* val = this->GetDefinition(var)) { - return cmSystemTools::IsOn(val); - } + if (const char* val = this->GetDefinition(var)) { + return cmSystemTools::IsOn(val); } // Enable optional policy warnings with --debug-output, --trace, // or --trace-expand. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=009019f2596de08c488588fd2c67a423f9fe92bf commit 009019f2596de08c488588fd2c67a423f9fe92bf Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:43 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 10:47:43 2016 +0200 Makefiles: Extract identical code from condition diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index eebab68..02eef59 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -999,12 +999,9 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( if (workingDir.empty()) { output = this->MaybeConvertToRelativePath( this->GetCurrentBinaryDirectory(), output); - output = - this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); - } else { - output = - this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } + output = + this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } vars.Output = output.c_str(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=378849f41e574e72c577b549dfc2d5333ca8f9b5 commit 378849f41e574e72c577b549dfc2d5333ca8f9b5 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:43 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 10:47:43 2016 +0200 Makefiles: Replace array access with local variable diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 5b4ecc7..eebab68 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -995,14 +995,15 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { + output = outputs[0]; if (workingDir.empty()) { output = this->MaybeConvertToRelativePath( - this->GetCurrentBinaryDirectory(), outputs[0]); - output = this->ConvertToOutputFormat(output, - cmOutputConverter::SHELL); + this->GetCurrentBinaryDirectory(), output); + output = + this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } else { - output = this->ConvertToOutputFormat(outputs[0], - cmOutputConverter::SHELL); + output = + this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } } vars.Output = output.c_str(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4a3c49b4698f0e8c20c345770f551142088a3037 commit 4a3c49b4698f0e8c20c345770f551142088a3037 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:43 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 10:47:43 2016 +0200 Makefiles: Separate two coupled calls diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index eb2852c..5b4ecc7 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -996,11 +996,10 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { if (workingDir.empty()) { - output = this->ConvertToOutputFormat( - this->MaybeConvertToRelativePath( - this->GetCurrentBinaryDirectory(), outputs[0]), + output = this->MaybeConvertToRelativePath( + this->GetCurrentBinaryDirectory(), outputs[0]); + output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); - } else { output = this->ConvertToOutputFormat(outputs[0], cmOutputConverter::SHELL); ----------------------------------------------------------------------- Summary of changes: Source/cmGhsMultiTargetGenerator.cxx | 2 +- Source/cmLocalGenerator.cxx | 4 +-- Source/cmLocalUnixMakefileGenerator3.cxx | 13 +++---- Source/cmMakefile.cxx | 6 ++-- Source/cmMakefile.h | 2 +- Source/cmMakefileTargetGenerator.cxx | 41 +++++++++++++--------- Source/cmMakefileTargetGenerator.h | 1 - Tests/FindPackageModeMakefileTest/CMakeLists.txt | 13 ++----- 8 files changed, 38 insertions(+), 44 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Sun Oct 9 07:14:45 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sun, 9 Oct 2016 07:14:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-304-gc238285 Message-ID: <20161009111445.45136E6497@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 c2382855e6a9706c9f71beb1f57bfafc75587f65 (commit) via 7f13f7a99d4fefc39aafc6efe0582fa5ece4f8c9 (commit) from 6b05e33c95b2bb392f6c6602da4677747613e35d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2382855e6a9706c9f71beb1f57bfafc75587f65 commit c2382855e6a9706c9f71beb1f57bfafc75587f65 Merge: 6b05e33 7f13f7a Author: Stephen Kelly AuthorDate: Sun Oct 9 07:14:44 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 9 07:14:44 2016 -0400 Merge topic 'minor-cleanups' into next 7f13f7a9 fixup! cmLocalGenerator: Extract definition retrieval out of loop https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f13f7a99d4fefc39aafc6efe0582fa5ece4f8c9 commit 7f13f7a99d4fefc39aafc6efe0582fa5ece4f8c9 Author: Stephen Kelly AuthorDate: Sun Oct 9 13:14:25 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 13:14:25 2016 +0200 fixup! cmLocalGenerator: Extract definition retrieval out of loop diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 0a99e87..025b82a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1176,7 +1176,8 @@ void cmLocalGenerator::GetTargetFlags( !(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW"))) { std::vector sources; target->GetSourceFiles(sources, buildType); - std::string defFlag = this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); + std::string defFlag = + this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); for (std::vector::const_iterator i = sources.begin(); i != sources.end(); ++i) { cmSourceFile* sf = *i; ----------------------------------------------------------------------- Summary of changes: Source/cmLocalGenerator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Sun Oct 9 18:23:46 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Sun, 9 Oct 2016 18:23:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-309-ga27be19 Message-ID: <20161009222346.22FB3F5E84@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 a27be19f9c4990e97310c1fbf0005aaaf9bbf40e (commit) via 326d5fa74781d807b9ecc2feed1b433657c3a92b (commit) via 7d45db99563c83a1a85722b1ee0f1fe10f8967d3 (commit) via a28b8f95bca8ac99c811fe24cd1e291330a1cd28 (commit) via 66c6144cdafcae83fe4c36a4355a67aa69198809 (commit) from c2382855e6a9706c9f71beb1f57bfafc75587f65 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a27be19f9c4990e97310c1fbf0005aaaf9bbf40e commit a27be19f9c4990e97310c1fbf0005aaaf9bbf40e Merge: c238285 326d5fa Author: Daniel Pfeifer AuthorDate: Sun Oct 9 18:23:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 9 18:23:45 2016 -0400 Merge topic 'cmake-cleanup' into next 326d5fa7 Allow custom built libarchive to use custom built expat. 7d45db99 Don't require liblzma when using system libarchive a28b8f95 Don't require libbz2 when using system libarchive 66c6144c CMakeCPack: remove obsolete conditions https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=326d5fa74781d807b9ecc2feed1b433657c3a92b commit 326d5fa74781d807b9ecc2feed1b433657c3a92b Author: Daniel Pfeifer AuthorDate: Mon Oct 10 00:21:00 2016 +0200 Commit: Daniel Pfeifer CommitDate: Mon Oct 10 00:21:00 2016 +0200 Allow custom built libarchive to use custom built expat. Expat is built anyway. diff --git a/CMakeLists.txt b/CMakeLists.txt index 827a19c..b8a635f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -368,6 +368,23 @@ macro (CMAKE_BUILD_UTILITIES) CMAKE_SET_TARGET_FOLDER(cmcompress "Utilities/3rdParty") #--------------------------------------------------------------------- + # Build expat library for CMake, CTest, and libarchive. + if(CMAKE_USE_SYSTEM_EXPAT) + find_package(EXPAT) + if(NOT EXPAT_FOUND) + message(FATAL_ERROR + "CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!") + endif() + set(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS}) + set(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES}) + else() + set(CMAKE_EXPAT_INCLUDES) + set(CMAKE_EXPAT_LIBRARIES cmexpat) + add_subdirectory(Utilities/cmexpat) + CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty") + endif() + + #--------------------------------------------------------------------- # Build or use system libbz2 for libarchive. if(NOT CMAKE_USE_SYSTEM_LIBARCHIVE) if(CMAKE_USE_SYSTEM_BZIP2) @@ -410,6 +427,8 @@ macro (CMAKE_BUILD_UTILITIES) set(CMAKE_TAR_INCLUDES ${LibArchive_INCLUDE_DIRS}) set(CMAKE_TAR_LIBRARIES ${LibArchive_LIBRARIES}) else() + set(EXPAT_INCLUDE_DIR ${CMAKE_EXPAT_INCLUDES}) + set(EXPAT_LIBRARY ${CMAKE_EXPAT_LIBRARIES}) set(ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES}) set(ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES}) add_definitions(-DLIBARCHIVE_STATIC) @@ -419,7 +438,7 @@ macro (CMAKE_BUILD_UTILITIES) set(ENABLE_ZLIB ON CACHE INTERNAL "Enable the use of the system found ZLIB library if found") set(ENABLE_BZip2 ON CACHE INTERNAL "Enable the use of the system found BZip2 library if found") set(ENABLE_LIBXML2 OFF CACHE INTERNAL "Enable the use of the system found libxml2 library if found") - set(ENABLE_EXPAT OFF CACHE INTERNAL "Enable the use of the system found EXPAT library if found") + set(ENABLE_EXPAT ON CACHE INTERNAL "Enable the use of the system found EXPAT library if found") set(ENABLE_PCREPOSIX OFF CACHE INTERNAL "Enable the use of the system found PCREPOSIX library if found") set(ENABLE_LibGCC OFF CACHE INTERNAL "Enable the use of the system found LibGCC library if found") set(ENABLE_XATTR OFF CACHE INTERNAL "Enable extended attribute support") @@ -432,23 +451,6 @@ macro (CMAKE_BUILD_UTILITIES) endif() #--------------------------------------------------------------------- - # Build expat library for CMake and CTest. - if(CMAKE_USE_SYSTEM_EXPAT) - find_package(EXPAT) - if(NOT EXPAT_FOUND) - message(FATAL_ERROR - "CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!") - endif() - set(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS}) - set(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES}) - else() - set(CMAKE_EXPAT_INCLUDES) - set(CMAKE_EXPAT_LIBRARIES cmexpat) - add_subdirectory(Utilities/cmexpat) - CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty") - endif() - - #--------------------------------------------------------------------- # Build jsoncpp library. if(CMAKE_USE_SYSTEM_JSONCPP) if(NOT CMAKE_VERSION VERSION_LESS 3.0) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d45db99563c83a1a85722b1ee0f1fe10f8967d3 commit 7d45db99563c83a1a85722b1ee0f1fe10f8967d3 Author: Daniel Pfeifer AuthorDate: Mon Oct 10 00:12:34 2016 +0200 Commit: Daniel Pfeifer CommitDate: Mon Oct 10 00:12:34 2016 +0200 Don't require liblzma when using system libarchive diff --git a/CMakeLists.txt b/CMakeLists.txt index 92f641e..827a19c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -383,19 +383,21 @@ macro (CMAKE_BUILD_UTILITIES) #--------------------------------------------------------------------- # Build or use system liblzma for libarchive. - if(CMAKE_USE_SYSTEM_LIBLZMA) - find_package(LibLZMA) - if(NOT LIBLZMA_FOUND) - message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBLZMA is ON but LibLZMA is not found!") + if(NOT CMAKE_USE_SYSTEM_LIBARCHIVE) + if(CMAKE_USE_SYSTEM_LIBLZMA) + find_package(LibLZMA) + if(NOT LIBLZMA_FOUND) + message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBLZMA is ON but LibLZMA is not found!") + endif() + set(LZMA_INCLUDE_DIR ${LIBLZMA_INCLUDE_DIRS}) + set(LZMA_LIBRARY ${LIBLZMA_LIBRARIES}) + else() + add_subdirectory(Utilities/cmliblzma) + CMAKE_SET_TARGET_FOLDER(cmliblzma "Utilities/3rdParty") + set(LZMA_INCLUDE_DIR + "${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmliblzma/liblzma/api") + set(LZMA_LIBRARY cmliblzma) endif() - set(LZMA_INCLUDE_DIR ${LIBLZMA_INCLUDE_DIRS}) - set(LZMA_LIBRARY ${LIBLZMA_LIBRARIES}) - else() - add_subdirectory(Utilities/cmliblzma) - CMAKE_SET_TARGET_FOLDER(cmliblzma "Utilities/3rdParty") - set(LZMA_INCLUDE_DIR - "${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmliblzma/liblzma/api") - set(LZMA_LIBRARY cmliblzma) endif() #--------------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a28b8f95bca8ac99c811fe24cd1e291330a1cd28 commit a28b8f95bca8ac99c811fe24cd1e291330a1cd28 Author: Daniel Pfeifer AuthorDate: Mon Oct 10 00:08:06 2016 +0200 Commit: Daniel Pfeifer CommitDate: Mon Oct 10 00:08:06 2016 +0200 Don't require libbz2 when using system libarchive diff --git a/CMakeLists.txt b/CMakeLists.txt index b4a577c..92f641e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -366,14 +366,19 @@ macro (CMAKE_BUILD_UTILITIES) set(CMAKE_COMPRESS_LIBRARIES "cmcompress") add_subdirectory(Utilities/cmcompress) CMAKE_SET_TARGET_FOLDER(cmcompress "Utilities/3rdParty") - if(CMAKE_USE_SYSTEM_BZIP2) - find_package(BZip2) - else() - set(BZIP2_INCLUDE_DIR - "${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmbzip2") - set(BZIP2_LIBRARIES cmbzip2) - add_subdirectory(Utilities/cmbzip2) - CMAKE_SET_TARGET_FOLDER(cmbzip2 "Utilities/3rdParty") + + #--------------------------------------------------------------------- + # Build or use system libbz2 for libarchive. + if(NOT CMAKE_USE_SYSTEM_LIBARCHIVE) + if(CMAKE_USE_SYSTEM_BZIP2) + find_package(BZip2) + else() + set(BZIP2_INCLUDE_DIR + "${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmbzip2") + set(BZIP2_LIBRARIES cmbzip2) + add_subdirectory(Utilities/cmbzip2) + CMAKE_SET_TARGET_FOLDER(cmbzip2 "Utilities/3rdParty") + endif() endif() #--------------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66c6144cdafcae83fe4c36a4355a67aa69198809 commit 66c6144cdafcae83fe4c36a4355a67aa69198809 Author: Daniel Pfeifer AuthorDate: Sun Oct 9 23:59:15 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sun Oct 9 23:59:15 2016 +0200 CMakeCPack: remove obsolete conditions The file contains some conditions depending on the existence of CMake modules. This basically checks for CMake versions that are no longer supported. Remove the conditions. diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake index 1889be2..fc042bc 100644 --- a/CMakeCPack.cmake +++ b/CMakeCPack.cmake @@ -1,205 +1,200 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -# If the cmake version includes cpack, use it -if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") - if(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake") - option(CMAKE_INSTALL_DEBUG_LIBRARIES - "Install Microsoft runtime debug libraries with CMake." FALSE) - mark_as_advanced(CMAKE_INSTALL_DEBUG_LIBRARIES) - - # By default, do not warn when built on machines using only VS Express: - if(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) - set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON) - endif() +option(CMAKE_INSTALL_DEBUG_LIBRARIES + "Install Microsoft runtime debug libraries with CMake." FALSE) +mark_as_advanced(CMAKE_INSTALL_DEBUG_LIBRARIES) - if(CMake_INSTALL_DEPENDENCIES) - include(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake) - endif() - endif() +# By default, do not warn when built on machines using only VS Express: +if(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) + set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON) +endif() - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool") - set(CPACK_PACKAGE_VENDOR "Kitware") - set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") - set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}") - set(CPACK_PACKAGE_VERSION "${CMake_VERSION}") - set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}") - set(CPACK_SOURCE_PACKAGE_FILE_NAME "cmake-${CMake_VERSION}") +if(CMake_INSTALL_DEPENDENCIES) + include(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake) +endif() - # Installers for 32- vs. 64-bit CMake: - # - Root install directory (displayed to end user at installer-run time) - # - "NSIS package/display name" (text used in the installer GUI) - # - Registry key used to store info about the installation - if(CMAKE_CL_64) - set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") - set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool") +set(CPACK_PACKAGE_VENDOR "Kitware") +set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") +set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}") +set(CPACK_PACKAGE_VERSION "${CMake_VERSION}") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}") +set(CPACK_SOURCE_PACKAGE_FILE_NAME "cmake-${CMake_VERSION}") + +# Installers for 32- vs. 64-bit CMake: +# - Root install directory (displayed to end user at installer-run time) +# - "NSIS package/display name" (text used in the installer GUI) +# - Registry key used to store info about the installation +if(CMAKE_CL_64) + set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") + set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)") +else() + set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") + set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") +endif() +set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_NSIS_PACKAGE_NAME}") + +if(NOT DEFINED CPACK_SYSTEM_NAME) + # make sure package is not Cygwin-unknown, for Cygwin just + # cygwin is good for the system name + if("x${CMAKE_SYSTEM_NAME}" STREQUAL "xCYGWIN") + set(CPACK_SYSTEM_NAME Cygwin) else() - set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") - set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") - endif() - set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_NSIS_PACKAGE_NAME}") - - if(NOT DEFINED CPACK_SYSTEM_NAME) - # make sure package is not Cygwin-unknown, for Cygwin just - # cygwin is good for the system name - if("x${CMAKE_SYSTEM_NAME}" STREQUAL "xCYGWIN") - set(CPACK_SYSTEM_NAME Cygwin) - else() - set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) - endif() + set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) endif() - if(${CPACK_SYSTEM_NAME} MATCHES Windows) - if(CMAKE_CL_64) - set(CPACK_SYSTEM_NAME win64-x64) - set(CPACK_IFW_TARGET_DIRECTORY "@RootDir@/Program Files/${CMAKE_PROJECT_NAME}") - else() - set(CPACK_SYSTEM_NAME win32-x86) - endif() +endif() +if(${CPACK_SYSTEM_NAME} MATCHES Windows) + if(CMAKE_CL_64) + set(CPACK_SYSTEM_NAME win64-x64) + set(CPACK_IFW_TARGET_DIRECTORY "@RootDir@/Program Files/${CMAKE_PROJECT_NAME}") + else() + set(CPACK_SYSTEM_NAME win32-x86) endif() +endif() - # Components - if(CMake_INSTALL_COMPONENTS) - set(_CPACK_IFW_COMPONENTS_ALL cmake ctest cpack) - if(WIN32 AND NOT CYGWIN) - list(APPEND _CPACK_IFW_COMPONENTS_ALL cmcldeps) - endif() - if(APPLE) - list(APPEND _CPACK_IFW_COMPONENTS_ALL cmakexbuild) - endif() - if(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME) - set(_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME - ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}) - else() - set(_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME Unspecified) - endif() - list(APPEND _CPACK_IFW_COMPONENTS_ALL ${_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME}) - string(TOUPPER "${_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME}" - _CPACK_IFW_COMPONENT_UNSPECIFIED_UNAME) - if(BUILD_CursesDialog) - list(APPEND _CPACK_IFW_COMPONENTS_ALL ccmake) - endif() - if(BUILD_QtDialog) - list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-gui) - if(USE_LGPL) - set(_CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES "set(CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES - \"LGPLv${USE_LGPL}\" \"${CMake_SOURCE_DIR}/Licenses/LGPLv${USE_LGPL}.txt\")") - endif() - endif() - if(SPHINX_MAN) - list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-man) - endif() - if(SPHINX_HTML) - list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-html) - endif() - if(SPHINX_SINGLEHTML) - list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-singlehtml) +# Components +if(CMake_INSTALL_COMPONENTS) + set(_CPACK_IFW_COMPONENTS_ALL cmake ctest cpack) + if(WIN32 AND NOT CYGWIN) + list(APPEND _CPACK_IFW_COMPONENTS_ALL cmcldeps) + endif() + if(APPLE) + list(APPEND _CPACK_IFW_COMPONENTS_ALL cmakexbuild) + endif() + if(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME) + set(_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME + ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}) + else() + set(_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME Unspecified) + endif() + list(APPEND _CPACK_IFW_COMPONENTS_ALL ${_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME}) + string(TOUPPER "${_CPACK_IFW_COMPONENT_UNSPECIFIED_NAME}" + _CPACK_IFW_COMPONENT_UNSPECIFIED_UNAME) + if(BUILD_CursesDialog) + list(APPEND _CPACK_IFW_COMPONENTS_ALL ccmake) + endif() + if(BUILD_QtDialog) + list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-gui) + if(USE_LGPL) + set(_CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES "set(CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES + \"LGPLv${USE_LGPL}\" \"${CMake_SOURCE_DIR}/Licenses/LGPLv${USE_LGPL}.txt\")") endif() - if(SPHINX_QTHELP) - list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-qthelp) + endif() + if(SPHINX_MAN) + list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-man) + endif() + if(SPHINX_HTML) + list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-html) + endif() + if(SPHINX_SINGLEHTML) + list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-singlehtml) + endif() + if(SPHINX_QTHELP) + list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-qthelp) + endif() + if(CMake_BUILD_DEVELOPER_REFERENCE) + if(CMake_BUILD_DEVELOPER_REFERENCE_HTML) + list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-developer-reference-html) endif() - if(CMake_BUILD_DEVELOPER_REFERENCE) - if(CMake_BUILD_DEVELOPER_REFERENCE_HTML) - list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-developer-reference-html) - endif() - if(CMake_BUILD_DEVELOPER_REFERENCE_QTHELP) - list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-developer-reference-qthelp) - endif() + if(CMake_BUILD_DEVELOPER_REFERENCE_QTHELP) + list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-developer-reference-qthelp) endif() - set(_CPACK_IFW_COMPONENTS_CONFIGURATION " - # Components - set(CPACK_COMPONENTS_ALL \"${_CPACK_IFW_COMPONENTS_ALL}\") - set(CPACK_COMPONENTS_GROUPING IGNORE) + endif() + set(_CPACK_IFW_COMPONENTS_CONFIGURATION " +# Components +set(CPACK_COMPONENTS_ALL \"${_CPACK_IFW_COMPONENTS_ALL}\") +set(CPACK_COMPONENTS_GROUPING IGNORE) ") - else() - if(BUILD_QtDialog AND USE_LGPL) - set(_CPACK_IFW_ADDITIONAL_LICENSES - "\"LGPLv${USE_LGPL}\" \"${CMake_SOURCE_DIR}/Licenses/LGPLv${USE_LGPL}.txt\"") - endif() +else() + if(BUILD_QtDialog AND USE_LGPL) + set(_CPACK_IFW_ADDITIONAL_LICENSES + "\"LGPLv${USE_LGPL}\" \"${CMake_SOURCE_DIR}/Licenses/LGPLv${USE_LGPL}.txt\"") endif() +endif() - # Components scripts configuration - foreach(_script - CMake - CMake.Documentation.SphinxHTML - CMake.DeveloperReference.HTML) - configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/${_script}.qs.in" - "${CMake_BINARY_DIR}/${_script}.qs" @ONLY) - endforeach() - - if(${CMAKE_SYSTEM_NAME} MATCHES Windows) - 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() - if(SPHINX_HTML) - set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/html/index.html\", \"@StartMenuDir@/CMake Documentation.lnk\");\n") - endif() - if(CMake_BUILD_DEVELOPER_REFERENCE) - if(CMake_BUILD_DEVELOPER_REFERENCE_HTML) - set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/developer-reference/html/index.html\", \"@StartMenuDir@/CMake Developer Reference.lnk\");\n") - endif() - endif() - configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/installscript.qs.in" - "${CMake_BINARY_DIR}/installscript.qs" @ONLY - ) - install(FILES "${CMake_SOURCE_DIR}/Source/QtIFW/cmake.org.html" - DESTINATION "${CMAKE_DOC_DIR}" - ) - if(CMake_INSTALL_COMPONENTS) - set(_CPACK_IFW_PACKAGE_SCRIPT "${CMake_BINARY_DIR}/CMake.qs") - else() - set(_CPACK_IFW_PACKAGE_SCRIPT "${CMake_BINARY_DIR}/installscript.qs") +# Components scripts configuration +foreach(_script + CMake + CMake.Documentation.SphinxHTML + CMake.DeveloperReference.HTML) + configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/${_script}.qs.in" + "${CMake_BINARY_DIR}/${_script}.qs" @ONLY) +endforeach() + +if(${CMAKE_SYSTEM_NAME} MATCHES Windows) + 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() + if(SPHINX_HTML) + set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/html/index.html\", \"@StartMenuDir@/CMake Documentation.lnk\");\n") + endif() + if(CMake_BUILD_DEVELOPER_REFERENCE) + if(CMake_BUILD_DEVELOPER_REFERENCE_HTML) + set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/developer-reference/html/index.html\", \"@StartMenuDir@/CMake Developer Reference.lnk\");\n") endif() endif() - - if(${CMAKE_SYSTEM_NAME} MATCHES Linux) - set(CPACK_IFW_TARGET_DIRECTORY "@HomeDir@/${CMAKE_PROJECT_NAME}") - set(CPACK_IFW_ADMIN_TARGET_DIRECTORY "@ApplicationsDir@/${CMAKE_PROJECT_NAME}") + configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/installscript.qs.in" + "${CMake_BINARY_DIR}/installscript.qs" @ONLY + ) + install(FILES "${CMake_SOURCE_DIR}/Source/QtIFW/cmake.org.html" + DESTINATION "${CMAKE_DOC_DIR}" + ) + if(CMake_INSTALL_COMPONENTS) + set(_CPACK_IFW_PACKAGE_SCRIPT "${CMake_BINARY_DIR}/CMake.qs") + else() + set(_CPACK_IFW_PACKAGE_SCRIPT "${CMake_BINARY_DIR}/installscript.qs") endif() +endif() - set(_CPACK_IFW_PACKAGE_VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}) +if(${CMAKE_SYSTEM_NAME} MATCHES Linux) + set(CPACK_IFW_TARGET_DIRECTORY "@HomeDir@/${CMAKE_PROJECT_NAME}") + set(CPACK_IFW_ADMIN_TARGET_DIRECTORY "@ApplicationsDir@/${CMAKE_PROJECT_NAME}") +endif() - if(NOT DEFINED CPACK_PACKAGE_FILE_NAME) - # if the CPACK_PACKAGE_FILE_NAME is not defined by the cache - # default to source package - system, on cygwin system is not - # needed - if(CYGWIN) - set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}") - else() - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}") - endif() +set(_CPACK_IFW_PACKAGE_VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}) + +if(NOT DEFINED CPACK_PACKAGE_FILE_NAME) + # if the CPACK_PACKAGE_FILE_NAME is not defined by the cache + # default to source package - system, on cygwin system is not + # needed + if(CYGWIN) + set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}") + else() + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}") endif() +endif() - set(CPACK_PACKAGE_CONTACT "cmake at cmake.org") +set(CPACK_PACKAGE_CONTACT "cmake at cmake.org") - if(UNIX) - set(CPACK_STRIP_FILES "${CMAKE_BIN_DIR}/ccmake;${CMAKE_BIN_DIR}/cmake;${CMAKE_BIN_DIR}/cpack;${CMAKE_BIN_DIR}/ctest") - set(CPACK_SOURCE_STRIP_FILES "") - set(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake") - endif() +if(UNIX) + set(CPACK_STRIP_FILES "${CMAKE_BIN_DIR}/ccmake;${CMAKE_BIN_DIR}/cmake;${CMAKE_BIN_DIR}/cpack;${CMAKE_BIN_DIR}/ctest") + set(CPACK_SOURCE_STRIP_FILES "") + set(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake") +endif() - set(CPACK_WIX_UPGRADE_GUID "8ffd1d72-b7f1-11e2-8ee5-00238bca4991") +set(CPACK_WIX_UPGRADE_GUID "8ffd1d72-b7f1-11e2-8ee5-00238bca4991") - if(MSVC AND NOT "$ENV{WIX}" STREQUAL "") - set(WIX_CUSTOM_ACTION_ENABLED TRUE) - if(CMAKE_CONFIGURATION_TYPES) - set(WIX_CUSTOM_ACTION_MULTI_CONFIG TRUE) - else() - set(WIX_CUSTOM_ACTION_MULTI_CONFIG FALSE) - endif() +if(MSVC AND NOT "$ENV{WIX}" STREQUAL "") + set(WIX_CUSTOM_ACTION_ENABLED TRUE) + if(CMAKE_CONFIGURATION_TYPES) + set(WIX_CUSTOM_ACTION_MULTI_CONFIG TRUE) else() - set(WIX_CUSTOM_ACTION_ENABLED FALSE) + set(WIX_CUSTOM_ACTION_MULTI_CONFIG FALSE) endif() +else() + set(WIX_CUSTOM_ACTION_ENABLED FALSE) +endif() - # Set the options file that needs to be included inside CMakeCPackOptions.cmake - set(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake) - configure_file("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in" - "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY) - set(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake") +# Set the options file that needs to be included inside CMakeCPackOptions.cmake +set(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake) +configure_file("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in" + "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY) +set(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake") - # include CPack model once all variables are set - include(CPack) -endif() +# include CPack model once all variables are set +include(CPack) ----------------------------------------------------------------------- Summary of changes: CMakeCPack.cmake | 345 +++++++++++++++++++++++++++--------------------------- CMakeLists.txt | 83 +++++++------ 2 files changed, 216 insertions(+), 212 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Oct 10 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 10 Oct 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-84-ge3c5aed Message-ID: <20161010040107.CFBD5F5E93@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 e3c5aed6ae1b0dcdde51f5baea7f150395d21d9f (commit) from 785bfae867de0ad18463d618d45b4ae8c2712934 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3c5aed6ae1b0dcdde51f5baea7f150395d21d9f commit e3c5aed6ae1b0dcdde51f5baea7f150395d21d9f Author: Kitware Robot AuthorDate: Mon Oct 10 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Mon Oct 10 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b28be44..da91b74 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 7) -set(CMake_VERSION_PATCH 20161009) +set(CMake_VERSION_PATCH 20161010) #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 Oct 10 10:10:07 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:10:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-313-g479b0e2 Message-ID: <20161010141007.2CDE3B1095@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 479b0e2175da23aa995c19cc03d2abbfae1ea551 (commit) via c637e0c53b5b81d6605018bd64ea2769f356662a (commit) via fbc1b75c2692d82f729359b0aeec7ad959662d54 (commit) via 3d0e95f64c996d3d54b387f7688f988dd843ac6a (commit) from a27be19f9c4990e97310c1fbf0005aaaf9bbf40e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=479b0e2175da23aa995c19cc03d2abbfae1ea551 commit 479b0e2175da23aa995c19cc03d2abbfae1ea551 Merge: a27be19 c637e0c Author: Brad King AuthorDate: Mon Oct 10 10:10:06 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:10:06 2016 -0400 Merge topic 'minor-cleanups' into next c637e0c5 cmMakefile: Return a string from GetDefineFlags fbc1b75c Test: Remove condition for CMake version no longer supported 3d0e95f6 cmLocalGenerator: Extract definition retrieval out of loop https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c637e0c53b5b81d6605018bd64ea2769f356662a commit c637e0c53b5b81d6605018bd64ea2769f356662a Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:45 2016 +0200 Commit: Brad King CommitDate: Mon Oct 10 10:09:54 2016 -0400 cmMakefile: Return a string from GetDefineFlags Flip condition in GHS for readability. diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 959dfdb..fac68f5 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -244,7 +244,7 @@ void cmGhsMultiTargetGenerator::SetCompilerFlags(std::string const& config, flags, this->GeneratorTarget, lang); // Append old-style preprocessor definition flags. - if (std::string(" ") != std::string(this->Makefile->GetDefineFlags())) { + if (this->Makefile->GetDefineFlags() != " ") { this->LocalGenerator->AppendFlags(flags, this->Makefile->GetDefineFlags()); } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 40344ce..de7bead 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -447,7 +447,7 @@ public: /** * Get a list of preprocessor define flags. */ - const char* GetDefineFlags() const { return this->DefineFlags.c_str(); } + std::string GetDefineFlags() const { return this->DefineFlags; } /** * Make sure CMake can write this file https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fbc1b75c2692d82f729359b0aeec7ad959662d54 commit fbc1b75c2692d82f729359b0aeec7ad959662d54 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:44 2016 +0200 Commit: Brad King CommitDate: Mon Oct 10 10:09:54 2016 -0400 Test: Remove condition for CMake version no longer supported diff --git a/Tests/FindPackageModeMakefileTest/CMakeLists.txt b/Tests/FindPackageModeMakefileTest/CMakeLists.txt index 56fcc5d..23832da 100644 --- a/Tests/FindPackageModeMakefileTest/CMakeLists.txt +++ b/Tests/FindPackageModeMakefileTest/CMakeLists.txt @@ -20,16 +20,9 @@ if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Makefile" AND configure_file(FindFoo.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindFoo.cmake @ONLY) # now set up the test: - if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) - file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk" - CONTENT "CMAKE = \"$\"\n" - ) - else() - get_target_property(cmakeLocation cmake LOCATION) - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk" - "CMAKE = \"${cmakeLocation}\"\n" - ) - endif() + file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk" + CONTENT "CMAKE = \"$\"\n" + ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Makefile.in ${CMAKE_CURRENT_BINARY_DIR}/ConfMakefile @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ${CMAKE_CURRENT_BINARY_DIR}/main.cpp COPYONLY) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d0e95f64c996d3d54b387f7688f988dd843ac6a commit 3d0e95f64c996d3d54b387f7688f988dd843ac6a Author: Stephen Kelly AuthorDate: Sun Oct 9 10:47:44 2016 +0200 Commit: Brad King CommitDate: Mon Oct 10 10:09:54 2016 -0400 cmLocalGenerator: Extract definition retrieval out of loop diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2284cf9..025b82a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1176,12 +1176,13 @@ void cmLocalGenerator::GetTargetFlags( !(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW"))) { std::vector sources; target->GetSourceFiles(sources, buildType); + std::string defFlag = + this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); for (std::vector::const_iterator i = sources.begin(); i != sources.end(); ++i) { cmSourceFile* sf = *i; if (sf->GetExtension() == "def") { - linkFlags += - this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); + linkFlags += defFlag; linkFlags += this->ConvertToOutputFormat( cmSystemTools::CollapseFullPath(sf->GetFullPath()), SHELL); linkFlags += " "; ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 10:23:24 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:23:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-86-gce00292 Message-ID: <20161010142324.3517AF5C58@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 ce002921344cceb42801d088ab82fcf8f21964da (commit) via 2b9dad694a43d850af5fe83dd327fc82db29a012 (commit) from e3c5aed6ae1b0dcdde51f5baea7f150395d21d9f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce002921344cceb42801d088ab82fcf8f21964da commit ce002921344cceb42801d088ab82fcf8f21964da Merge: e3c5aed 2b9dad6 Author: Brad King AuthorDate: Mon Oct 10 10:23:21 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:23:21 2016 -0400 Merge topic 'FindProtobuf-fix-subdirs' 2b9dad69 FindProtobuf: Fix protobuf_generate_*() to handle subdirs ----------------------------------------------------------------------- Summary of changes: Modules/FindProtobuf.cmake | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 10:23:26 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:23:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-88-g19d4f94 Message-ID: <20161010142326.EA6E0F5C5C@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 19d4f942fe5fe2d84e9fc1f6abe9c237f6dceeec (commit) via 8cdac469d19f486b167006e4d4fcbf2a18c85866 (commit) from ce002921344cceb42801d088ab82fcf8f21964da (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19d4f942fe5fe2d84e9fc1f6abe9c237f6dceeec commit 19d4f942fe5fe2d84e9fc1f6abe9c237f6dceeec Merge: ce00292 8cdac46 Author: Brad King AuthorDate: Mon Oct 10 10:23:24 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:23:24 2016 -0400 Merge topic 'android-cxxabi' 8cdac469 Android: Fix support for cxxabi.h with libc++ ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android/ndk-stl-c++.cmake | 2 ++ Tests/RunCMake/Android/android.cxx | 3 +++ Tests/RunCMake/Android/common.cmake | 2 ++ 3 files changed, 7 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 10:23:29 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:23:29 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-90-gd3f1fcf Message-ID: <20161010142329.D5EF0F5C6E@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 d3f1fcf6d19d4f4384861b4f342b632d249e1449 (commit) via dda6775c940129d2a38fecd6cf6273f7d97ccca0 (commit) from 19d4f942fe5fe2d84e9fc1f6abe9c237f6dceeec (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3f1fcf6d19d4f4384861b4f342b632d249e1449 commit d3f1fcf6d19d4f4384861b4f342b632d249e1449 Merge: 19d4f94 dda6775 Author: Brad King AuthorDate: Mon Oct 10 10:23:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:23:27 2016 -0400 Merge topic 'android-export-has-cpp' dda6775c Android: Record use of C++ by static libs in exported Android.mk files ----------------------------------------------------------------------- Summary of changes: Source/cmExportBuildAndroidMKGenerator.cxx | 12 ++++++++++++ Tests/RunCMake/AndroidMK/AndroidMK.cmake | 2 +- Tests/RunCMake/AndroidMK/bar.c | 3 +++ Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt | 3 +++ Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt | 3 +++ 5 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Tests/RunCMake/AndroidMK/bar.c hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 10:23:32 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:23:32 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-93-ge8cdbec Message-ID: <20161010142332.EBFE2F5C77@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 e8cdbec45e757352580476a329f4998074d1b10a (commit) via c22f3cf7153fcf766d0ecc17d72e93bf4209e0b2 (commit) via bf28a3873d633d233991f14e8e4d10c76f410deb (commit) from d3f1fcf6d19d4f4384861b4f342b632d249e1449 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8cdbec45e757352580476a329f4998074d1b10a commit e8cdbec45e757352580476a329f4998074d1b10a Merge: d3f1fcf c22f3cf Author: Brad King AuthorDate: Mon Oct 10 10:23:30 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:23:30 2016 -0400 Merge topic 'update-kwsys' c22f3cf7 Merge branch 'upstream-KWSys' into update-kwsys bf28a387 KWSys 2016-10-07 (dfe9b386) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/SystemTools.cxx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 10:23:35 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:23:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-95-g211e322 Message-ID: <20161010142335.EE3DAF5CC4@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 211e3223a6f96800b5c7187a58715a8e1e081869 (commit) via 7f90d5e5ccfa862ebd99bd79632cc9351fe2ee19 (commit) from e8cdbec45e757352580476a329f4998074d1b10a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=211e3223a6f96800b5c7187a58715a8e1e081869 commit 211e3223a6f96800b5c7187a58715a8e1e081869 Merge: e8cdbec 7f90d5e Author: Brad King AuthorDate: Mon Oct 10 10:23:33 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:23:33 2016 -0400 Merge topic 'test-cpack-improve-failure-messages' 7f90d5e5 Tests: Improve RunCMake.CPack_* failure message formatting ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CPack/VerifyResult.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 10:23:38 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:23:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-100-g9c7fc00 Message-ID: <20161010142338.C390CF5C6E@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 9c7fc00a45b6f0891c95fba707b0e2ce9d2e2dbf (commit) via 326d5fa74781d807b9ecc2feed1b433657c3a92b (commit) via 7d45db99563c83a1a85722b1ee0f1fe10f8967d3 (commit) via a28b8f95bca8ac99c811fe24cd1e291330a1cd28 (commit) via 66c6144cdafcae83fe4c36a4355a67aa69198809 (commit) from 211e3223a6f96800b5c7187a58715a8e1e081869 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c7fc00a45b6f0891c95fba707b0e2ce9d2e2dbf commit 9c7fc00a45b6f0891c95fba707b0e2ce9d2e2dbf Merge: 211e322 326d5fa Author: Brad King AuthorDate: Mon Oct 10 10:23:36 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:23:36 2016 -0400 Merge topic 'cmake-cleanup' 326d5fa7 Allow custom built libarchive to use custom built expat. 7d45db99 Don't require liblzma when using system libarchive a28b8f95 Don't require libbz2 when using system libarchive 66c6144c CMakeCPack: remove obsolete conditions ----------------------------------------------------------------------- Summary of changes: CMakeCPack.cmake | 345 +++++++++++++++++++++++++++--------------------------- CMakeLists.txt | 83 +++++++------ 2 files changed, 216 insertions(+), 212 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 10:23:41 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:23:41 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-110-g8fe948c Message-ID: <20161010142341.ACE53F5CAE@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 8fe948c54cd0a7a06b5c56e8a40dab945c5a08e7 (commit) via c637e0c53b5b81d6605018bd64ea2769f356662a (commit) via fbc1b75c2692d82f729359b0aeec7ad959662d54 (commit) via 3d0e95f64c996d3d54b387f7688f988dd843ac6a (commit) via 2a49d86d5dec66f7696bd7063459f504cc336a5e (commit) via b0301db23b12351720993a351fedf081ca0fa444 (commit) via 267e02097e90d05a16ffd1aa53fb7910b79aa0ec (commit) via 009019f2596de08c488588fd2c67a423f9fe92bf (commit) via 378849f41e574e72c577b549dfc2d5333ca8f9b5 (commit) via 4a3c49b4698f0e8c20c345770f551142088a3037 (commit) from 9c7fc00a45b6f0891c95fba707b0e2ce9d2e2dbf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8fe948c54cd0a7a06b5c56e8a40dab945c5a08e7 commit 8fe948c54cd0a7a06b5c56e8a40dab945c5a08e7 Merge: 9c7fc00 c637e0c Author: Brad King AuthorDate: Mon Oct 10 10:23:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:23:39 2016 -0400 Merge topic 'minor-cleanups' c637e0c5 cmMakefile: Return a string from GetDefineFlags fbc1b75c Test: Remove condition for CMake version no longer supported 3d0e95f6 cmLocalGenerator: Extract definition retrieval out of loop 2a49d86d Makefiles: Inline only use of method b0301db2 Makefiles: Make helper class independent of cmLocalGenerator 267e0209 cmMakefile: Remove pointless condition 009019f2 Makefiles: Extract identical code from condition 378849f4 Makefiles: Replace array access with local variable 4a3c49b4 Makefiles: Separate two coupled calls ----------------------------------------------------------------------- Summary of changes: Source/cmGhsMultiTargetGenerator.cxx | 2 +- Source/cmLocalGenerator.cxx | 5 +-- Source/cmLocalUnixMakefileGenerator3.cxx | 13 +++---- Source/cmMakefile.cxx | 6 ++-- Source/cmMakefile.h | 2 +- Source/cmMakefileTargetGenerator.cxx | 41 +++++++++++++--------- Source/cmMakefileTargetGenerator.h | 1 - Tests/FindPackageModeMakefileTest/CMakeLists.txt | 13 ++----- 8 files changed, 39 insertions(+), 44 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 10:23:44 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:23:44 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-114-gea533eb Message-ID: <20161010142344.7E724F5C5D@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 ea533eb71516a92e1528e358ffa374b16864eac6 (commit) via cc5e6b82c2ae8293a400b604e0366578f9097d94 (commit) via d9fde87d1a3a4de382d664bd121af957af6eaaea (commit) via d92c160db333bf65e52da1cb73a068b5d3f1db4f (commit) from 8fe948c54cd0a7a06b5c56e8a40dab945c5a08e7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea533eb71516a92e1528e358ffa374b16864eac6 commit ea533eb71516a92e1528e358ffa374b16864eac6 Merge: 8fe948c cc5e6b8 Author: Brad King AuthorDate: Mon Oct 10 10:23:42 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:23:42 2016 -0400 Merge topic 'ninja-cleanups' cc5e6b82 Ninja: Extract identical code from condition d9fde87d Ninja: Replace array access with local variable d92c160d Ninja: Separate two coupled calls ----------------------------------------------------------------------- Summary of changes: Source/cmLocalNinjaGenerator.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 10:23:50 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:23:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-137-g1e6aaef Message-ID: <20161010142350.ED765F5C9F@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 1e6aaefdeebbf09eaf7fa0e9dbc6a7faa2f9132a (commit) via a1cfc4fe3deed4d642773d0ae63dd524c3f2eba1 (commit) via 4079ba20d9d9c8d15fd28d9440d56c907dda811c (commit) via 17ab8e33f005aab3e493ac4535f63b6f229aacab (commit) via 7edfcd0e834a4dc8d3da9cada6ad6b9b46dfb4dd (commit) via 6c8dc7f1df6d3492d11ad994a35ee2f0b8a4e60b (commit) via 1efca9f427a5c537afc034aadf0c29073bfdfa22 (commit) via d9b5f0a301c23c2c0e56ad3fcb696de71c3d6365 (commit) via 1c70c6cc09f0f8be087db2aeae5ee6a3f1b47bda (commit) via 2b7baed719e4a6eb918ed6f22ee6031a40b7f316 (commit) via 7ba954925a876f4c753a4296236bc7d2f18eb0b8 (commit) via 6d98b15fc8b9a065325e3683afe94efce17dd162 (commit) via 869037ee86d1c0ab757840adf499ea270d4301e1 (commit) via 2f6462a634726d9d0ea8d8552454839d67183016 (commit) via 148b83a12185d7611ff7576464087430c3f2719c (commit) via 4457a9f181663701961dc209740974f48213e6e7 (commit) via 4d039c5b46e3cac29ff1d9ce3e768af1bca6b69a (commit) via c8ec8d6a7ec6c176bc14e7026dc755a9be8689cb (commit) via 3e8d47d18b4db6b4621ee5e4864dde234ad8a282 (commit) via 3b4895fa35e4a96022abd99b07002a7d2ab3a968 (commit) via 2232e97a6ed4a338b814d1ba3d62a7ffa9ef6e7f (commit) via 9a1d4e4ba170f4ac34c80593bd2fe8e1481a1181 (commit) via 8391b3015a82909828b7ada98e76d45aa11b892b (commit) from ea533eb71516a92e1528e358ffa374b16864eac6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e6aaefdeebbf09eaf7fa0e9dbc6a7faa2f9132a commit 1e6aaefdeebbf09eaf7fa0e9dbc6a7faa2f9132a Merge: ea533eb a1cfc4f Author: Brad King AuthorDate: Mon Oct 10 10:23:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:23:45 2016 -0400 Merge topic 'clean-up-link-configuration' a1cfc4fe cmMakefile: Simplify programmer error to an assert 4079ba20 cmMakefile: Implement LinkLibraries as an internal property 17ab8e33 cmMakefile: Inline method into only remaining caller 7edfcd0e cmMakefile: Inline method into caller 6c8dc7f1 cmake: Simplify find-package mode library addition 1efca9f4 cmMakefile: Remove obsolete parameter d9b5f0a3 cmTarget: Remove target name from parameter list 1c70c6cc cmMakefile: Use public API to find a target 2b7baed7 cmMakefile: Inline method into only caller 7ba95492 cmMakefile: Use public API to find a target 6d98b15f cmMakefile: Invert if() condition to remove else 869037ee cmMakefile: Remove ALIAS check 2f6462a6 cmMakefile: Collapse two consecutive if()s into one 148b83a1 cmMakefile: DeMorgan-invert condition 4457a9f1 cmMakefile: Return after error and remove else condition 4d039c5b cmMakefile: Invert handling of error condition ... ----------------------------------------------------------------------- Summary of changes: Source/cmCPluginAPI.cxx | 44 ++++++++- Source/cmLinkLibrariesCommand.cxx | 7 +- Source/cmMakefile.cxx | 147 ++++++++++++------------------- Source/cmMakefile.h | 16 +--- Source/cmTarget.cxx | 24 +---- Source/cmTarget.h | 8 +- Source/cmTargetLinkLibrariesCommand.cxx | 30 ++++++- Source/cmake.cxx | 2 +- 8 files changed, 134 insertions(+), 144 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 10:24:11 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:24:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-325-gd3f418e Message-ID: <20161010142411.43256F5CDB@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 d3f418e5be2c94933abfccf13e3aea031472c949 (commit) via 1e6aaefdeebbf09eaf7fa0e9dbc6a7faa2f9132a (commit) via ea533eb71516a92e1528e358ffa374b16864eac6 (commit) via 8fe948c54cd0a7a06b5c56e8a40dab945c5a08e7 (commit) via 9c7fc00a45b6f0891c95fba707b0e2ce9d2e2dbf (commit) via 211e3223a6f96800b5c7187a58715a8e1e081869 (commit) via e8cdbec45e757352580476a329f4998074d1b10a (commit) via d3f1fcf6d19d4f4384861b4f342b632d249e1449 (commit) via 19d4f942fe5fe2d84e9fc1f6abe9c237f6dceeec (commit) via ce002921344cceb42801d088ab82fcf8f21964da (commit) via e3c5aed6ae1b0dcdde51f5baea7f150395d21d9f (commit) via 785bfae867de0ad18463d618d45b4ae8c2712934 (commit) from 479b0e2175da23aa995c19cc03d2abbfae1ea551 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3f418e5be2c94933abfccf13e3aea031472c949 commit d3f418e5be2c94933abfccf13e3aea031472c949 Merge: 479b0e2 1e6aaef Author: Brad King AuthorDate: Mon Oct 10 10:24:00 2016 -0400 Commit: Brad King CommitDate: Mon Oct 10 10:24:00 2016 -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 Oct 10 10:34:22 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:34:22 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-327-g3826f1c Message-ID: <20161010143422.716FAF600E@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 3826f1c832b071df8bb7163d44ad1981724ad70b (commit) via 14252b2d864c26a9331421c600744464c9c3c08f (commit) from d3f418e5be2c94933abfccf13e3aea031472c949 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3826f1c832b071df8bb7163d44ad1981724ad70b commit 3826f1c832b071df8bb7163d44ad1981724ad70b Merge: d3f418e 14252b2 Author: Brad King AuthorDate: Mon Oct 10 10:34:21 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:34:21 2016 -0400 Merge topic 'extract-cmLinkLineComputer' into next 14252b2d Revert topic 'extract-cmLinkLineComputer' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14252b2d864c26a9331421c600744464c9c3c08f commit 14252b2d864c26a9331421c600744464c9c3c08f Author: Brad King AuthorDate: Mon Oct 10 10:34:00 2016 -0400 Commit: Brad King CommitDate: Mon Oct 10 10:34:00 2016 -0400 Revert topic 'extract-cmLinkLineComputer' It will have further discussion in its MR. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 048667a..e574957 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -300,8 +300,6 @@ set(SRCS cmInstallDirectoryGenerator.cxx cmLinkedTree.h cmLinkItem.h - cmLinkLineComputer.cxx - cmLinkLineComputer.h cmListFileCache.cxx cmListFileCache.h cmListFileLexer.c @@ -320,8 +318,6 @@ set(SRCS cmMakefileUtilityTargetGenerator.cxx cmMessenger.cxx cmMessenger.h - cmMSVC60LinkLineComputer.cxx - cmMSVC60LinkLineComputer.h cmOSXBundleGenerator.cxx cmOSXBundleGenerator.h cmOutputConverter.cxx @@ -549,8 +545,6 @@ set(SRCS ${SRCS} cmNinjaNormalTargetGenerator.h cmNinjaUtilityTargetGenerator.cxx cmNinjaUtilityTargetGenerator.h - cmNinjaLinkLineComputer.cxx - cmNinjaLinkLineComputer.h ) # Temporary variable for tools targets diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index b995fa1..14ea1a9 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -12,7 +12,6 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" #include "cmGlobalCommonGenerator.h" -#include "cmLinkLineComputer.h" #include "cmLocalCommonGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -60,8 +59,7 @@ void cmCommonTargetGenerator::AddFeatureFlags(std::string& flags, } } -void cmCommonTargetGenerator::AddModuleDefinitionFlag( - cmLinkLineComputer* linkLineComputer, std::string& flags) +void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags) { if (!this->ModuleDefinitionFile) { return; @@ -78,7 +76,7 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag( // vs6's "cl -link" pass it to the linker. std::string flag = defFileFlag; flag += this->LocalGenerator->ConvertToOutputFormat( - linkLineComputer->ConvertToLinkReference( + this->LocalGenerator->ConvertToLinkReference( this->ModuleDefinitionFile->GetFullPath()), cmOutputConverter::SHELL); this->LocalGenerator->AppendFlags(flags, flag); diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index fe27038..707b81e 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -16,7 +16,6 @@ class cmGlobalCommonGenerator; class cmLocalCommonGenerator; class cmMakefile; class cmSourceFile; -class cmLinkLineComputer; /** \class cmCommonTargetGenerator * \brief Common infrastructure for Makefile and Ninja per-target generators @@ -38,8 +37,7 @@ protected: bool GetFeatureAsBool(const std::string& feature); // Helper to add flag for windows .def file. - void AddModuleDefinitionFlag(cmLinkLineComputer* linkLineComputer, - std::string& flags); + void AddModuleDefinitionFlag(std::string& flags); cmGeneratorTarget* GeneratorTarget; cmMakefile* Makefile; diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index dd8b36f..959dfdb 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -5,7 +5,6 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalGhsMultiGenerator.h" -#include "cmLinkLineComputer.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" @@ -363,15 +362,9 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries( this->GeneratorTarget->GetCreateRuleVariable(language, config); bool useWatcomQuote = this->Makefile->IsOn(createRule + "_USE_WATCOM_QUOTE"); - CM_AUTO_PTR linkLineComputer( - this->GetGlobalGenerator()->CreateLinkLineComputer( - this->LocalGenerator, - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - linkLineComputer->SetUseWatcomQuote(useWatcomQuote); - this->LocalGenerator->GetTargetFlags( - linkLineComputer.get(), config, linkLibraries, flags, linkFlags, - frameworkPath, linkPath, this->GeneratorTarget); + config, linkLibraries, flags, linkFlags, frameworkPath, linkPath, + this->GeneratorTarget, useWatcomQuote); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); if (!linkPath.empty()) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 1aa6af1..7132ade 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -20,9 +20,7 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmInstallGenerator.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" -#include "cmMSVC60LinkLineComputer.h" #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmPolicies.h" @@ -1414,18 +1412,6 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() return autogenTargets; } -cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const -{ - return new cmLinkLineComputer(outputConverter, stateDir); -} - -cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const -{ - return new cmMSVC60LinkLineComputer(outputConverter, stateDir); -} - void cmGlobalGenerator::FinalizeTargetCompileInfo() { std::vector const langs = diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 38eaa76..74b4547 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -34,9 +34,7 @@ class cmExportBuildFileGenerator; class cmExternalMakefileProjectGenerator; class cmGeneratorTarget; class cmLocalGenerator; -class cmLinkLineComputer; class cmMakefile; -class cmOutputConverter; class cmake; /** \class cmGlobalGenerator @@ -107,12 +105,6 @@ public: */ virtual void Generate(); - virtual cmLinkLineComputer* CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const; - - cmLinkLineComputer* CreateMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const; - /** * Set/Get and Clear the enabled languages. */ diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 67df038..f5a0e68 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -11,7 +11,6 @@ #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" -#include "cmNinjaLinkLineComputer.h" #include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" @@ -65,14 +64,6 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os, os << "# " << comment.substr(lpos) << "\n\n"; } -cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory /* stateDir */) const -{ - return new cmNinjaLinkLineComputer( - outputConverter, - this->LocalGenerators[0]->GetStateSnapshot().GetDirectory(), this); -} - std::string cmGlobalNinjaGenerator::EncodeRuleName(std::string const& name) { // Ninja rule names must match "[a-zA-Z0-9_.-]+". Use ".xx" to encode @@ -839,8 +830,7 @@ static void EnsureTrailingSlash(std::string& path) #endif } -std::string cmGlobalNinjaGenerator::ConvertToNinjaPath( - const std::string& path) const +std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) { cmLocalNinjaGenerator* ng = static_cast(this->LocalGenerators[0]); @@ -1431,8 +1421,7 @@ void cmGlobalNinjaGenerator::InitOutputPathPrefix() EnsureTrailingSlash(this->OutputPathPrefix); } -std::string cmGlobalNinjaGenerator::NinjaOutputPath( - std::string const& path) const +std::string cmGlobalNinjaGenerator::NinjaOutputPath(std::string const& path) { if (!this->HasOutputPathPrefix() || cmSystemTools::FileIsFullPath(path)) { return path; diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 6b77a2b..dcf7406 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -70,10 +70,6 @@ public: std::string EncodePath(const std::string& path); static std::string EncodeDepfileSpace(const std::string& path); - cmLinkLineComputer* CreateLinkLineComputer( - cmOutputConverter* outputConverter, - cmState::Directory stateDir) const CM_OVERRIDE; - /** * Write the given @a comment to the output stream @a os. It * handles new line character properly. @@ -237,7 +233,7 @@ public: return this->RulesFileStream; } - std::string ConvertToNinjaPath(const std::string& path) const; + std::string ConvertToNinjaPath(const std::string& path); std::string ConvertToNinjaFolderRule(const std::string& path); struct MapToNinjaPathImpl @@ -337,7 +333,7 @@ public: bool SupportsConsolePool() const; bool SupportsImplicitOuts() const; - std::string NinjaOutputPath(std::string const& path) const; + std::string NinjaOutputPath(std::string const& path); bool HasOutputPathPrefix() const { return !this->OutputPathPrefix.empty(); } void StripNinjaOutputPathPrefixAsSuffix(std::string& path); diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx deleted file mode 100644 index 24f3578..0000000 --- a/Source/cmLinkLineComputer.cxx +++ /dev/null @@ -1,179 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#include "cmLinkLineComputer.h" -#include "cmComputeLinkInformation.h" -#include "cmGeneratorTarget.h" -#include "cmOutputConverter.h" - -cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir) - : StateDir(stateDir) - , OutputConverter(outputConverter) - , ForResponse(false) - , UseWatcomQuote(false) - , Relink(false) -{ -} - -cmLinkLineComputer::~cmLinkLineComputer() -{ -} - -void cmLinkLineComputer::SetUseWatcomQuote(bool useWatcomQuote) -{ - this->UseWatcomQuote = useWatcomQuote; -} - -void cmLinkLineComputer::SetForResponse(bool forResponse) -{ - this->ForResponse = forResponse; -} - -void cmLinkLineComputer::SetRelink(bool relink) -{ - this->Relink = relink; -} - -std::string cmLinkLineComputer::ConvertToLinkReference( - std::string const& lib) const -{ - std::string relLib = lib; - - if (cmOutputConverter::ContainedInDirectory( - this->StateDir.GetCurrentBinary(), lib, this->StateDir)) { - relLib = cmOutputConverter::ForceToRelativePath( - this->StateDir.GetCurrentBinary(), lib); - } - return relLib; -} - -std::string cmLinkLineComputer::ComputeLinkLibs(cmComputeLinkInformation& cli) -{ - std::string linkLibs; - typedef cmComputeLinkInformation::ItemVector ItemVector; - ItemVector const& items = cli.GetItems(); - for (ItemVector::const_iterator li = items.begin(); li != items.end(); - ++li) { - if (li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY) { - continue; - } - if (li->IsPath) { - linkLibs += - this->ConvertToOutputFormat(this->ConvertToLinkReference(li->Value)); - } else { - linkLibs += li->Value; - } - linkLibs += " "; - } - return linkLibs; -} - -std::string cmLinkLineComputer::ConvertToOutputFormat(std::string const& input) -{ - cmOutputConverter::OutputFormat shellFormat = (this->ForResponse) - ? cmOutputConverter::RESPONSE - : ((this->UseWatcomQuote) ? cmOutputConverter::WATCOMQUOTE - : cmOutputConverter::SHELL); - - return this->OutputConverter->ConvertToOutputFormat(input, shellFormat); -} - -std::string cmLinkLineComputer::ConvertToOutputForExisting( - std::string const& input) -{ - cmOutputConverter::OutputFormat shellFormat = (this->ForResponse) - ? cmOutputConverter::RESPONSE - : ((this->UseWatcomQuote) ? cmOutputConverter::WATCOMQUOTE - : cmOutputConverter::SHELL); - - return this->OutputConverter->ConvertToOutputForExisting(input, shellFormat); -} - -std::string cmLinkLineComputer::ComputeLinkPath( - cmComputeLinkInformation& cli, std::string const& libPathFlag, - std::string const& libPathTerminator) -{ - std::string linkPath; - std::vector const& libDirs = cli.GetDirectories(); - for (std::vector::const_iterator libDir = libDirs.begin(); - libDir != libDirs.end(); ++libDir) { - std::string libpath = this->ConvertToOutputForExisting(*libDir); - linkPath += " " + libPathFlag; - linkPath += libpath; - linkPath += libPathTerminator; - linkPath += " "; - } - return linkPath; -} - -std::string cmLinkLineComputer::ComputeRPath(cmComputeLinkInformation& cli) -{ - std::string rpath; - // Check what kind of rpath flags to use. - if (cli.GetRuntimeSep().empty()) { - // Each rpath entry gets its own option ("-R a -R b -R c") - std::vector runtimeDirs; - cli.GetRPath(runtimeDirs, this->Relink); - - for (std::vector::iterator ri = runtimeDirs.begin(); - ri != runtimeDirs.end(); ++ri) { - rpath += cli.GetRuntimeFlag(); - rpath += this->ConvertToOutputFormat(*ri); - rpath += " "; - } - } else { - // All rpath entries are combined ("-Wl,-rpath,a:b:c"). - std::string rpathString = cli.GetRPathString(this->Relink); - - // Store the rpath option in the stream. - if (!rpathString.empty()) { - rpath += cli.GetRuntimeFlag(); - rpath += - this->OutputConverter->EscapeForShell(rpathString, !this->ForResponse); - rpath += " "; - } - } - return rpath; -} - -std::string cmLinkLineComputer::ComputeFrameworkPath( - cmComputeLinkInformation& cli, std::string const& fwSearchFlag) -{ - std::string frameworkPath; - if (!fwSearchFlag.empty()) { - std::vector const& fwDirs = cli.GetFrameworkPaths(); - for (std::vector::const_iterator fdi = fwDirs.begin(); - fdi != fwDirs.end(); ++fdi) { - frameworkPath += fwSearchFlag; - frameworkPath += this->ConvertToOutputFormat(*fdi); - frameworkPath += " "; - } - } - return frameworkPath; -} - -std::string cmLinkLineComputer::ComputeLinkLibraries( - cmComputeLinkInformation& cli, std::string const& stdLibString) -{ - std::ostringstream fout; - fout << this->ComputeRPath(cli); - - // Write the library flags to the build rule. - fout << this->ComputeLinkLibs(cli); - - // Add the linker runtime search path if any. - std::string rpath_link = cli.GetRPathLinkString(); - if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) { - fout << cli.GetRPathLinkFlag(); - fout << this->OutputConverter->EscapeForShell(rpath_link, - !this->ForResponse); - fout << " "; - } - - if (!stdLibString.empty()) { - fout << stdLibString << " "; - } - - return fout.str(); -} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h deleted file mode 100644 index 1fb9b24..0000000 --- a/Source/cmLinkLineComputer.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#ifndef cmLinkLineComputer_h -#define cmLinkLineComputer_h - -#include "cmState.h" - -class cmComputeLinkInformation; -class cmOutputConverter; - -class cmLinkLineComputer -{ -public: - cmLinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir); - virtual ~cmLinkLineComputer(); - - void SetUseWatcomQuote(bool useWatcomQuote); - void SetForResponse(bool forResponse); - void SetRelink(bool relink); - - virtual std::string ConvertToLinkReference(std::string const& input) const; - - std::string ComputeLinkPath(cmComputeLinkInformation& cli, - std::string const& libPathFlag, - std::string const& libPathTerminator); - - std::string ComputeFrameworkPath(cmComputeLinkInformation& cli, - std::string const& fwSearchFlag); - - std::string ComputeLinkLibraries(cmComputeLinkInformation& cli, - std::string const& stdLibString); - -private: - std::string ComputeLinkLibs(cmComputeLinkInformation& cli); - std::string ComputeRPath(cmComputeLinkInformation& cli); - - std::string ConvertToOutputFormat(std::string const& input); - std::string ConvertToOutputForExisting(std::string const& input); - - cmState::Directory StateDir; - cmOutputConverter* OutputConverter; - - bool ForResponse; - bool UseWatcomQuote; - bool Relink; -}; - -#endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 5c31e3e..2284cf9 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -12,7 +12,6 @@ #include "cmInstallGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" -#include "cmLinkLineComputer.h" #include "cmMakefile.h" #include "cmSourceFile.h" #include "cmSystemTools.h" @@ -1149,12 +1148,11 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags, } void cmLocalGenerator::GetTargetFlags( - cmLinkLineComputer* linkLineComputer, const std::string& config, - std::string& linkLibs, std::string& flags, std::string& linkFlags, - std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target) + const std::string& config, std::string& linkLibs, std::string& flags, + std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, + cmGeneratorTarget* target, bool useWatcomQuote) { const std::string buildType = cmSystemTools::UpperCase(config); - cmComputeLinkInformation* pcli = target->GetLinkInformation(config); const char* libraryLinkVariable = "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library @@ -1204,10 +1202,8 @@ void cmLocalGenerator::GetTargetFlags( linkFlags += " "; } } - if (pcli) { - this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath); - } + this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target, + false, false, useWatcomQuote); } break; case cmState::EXECUTABLE: { linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); @@ -1226,10 +1222,8 @@ void cmLocalGenerator::GetTargetFlags( return; } this->AddLanguageFlags(flags, linkLanguage, buildType); - if (pcli) { - this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath); - } + this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target, + false, false, useWatcomQuote); if (cmSystemTools::IsOn( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") + @@ -1388,46 +1382,155 @@ std::string cmLocalGenerator::GetTargetFortranFlags( return std::string(); } +std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + // Work-ardound command line parsing limitations in MSVC 6.0 + if (this->Makefile->IsOn("MSVC60")) { + // Search for the last space. + std::string::size_type pos = lib.rfind(' '); + if (pos != lib.npos) { + // Find the slash after the last space, if any. + pos = lib.find('/', pos); + + // Convert the portion of the path with a space to a short path. + std::string sp; + if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) { + // Append the rest of the path with no space. + sp += lib.substr(pos); + + return sp; + } + } + } +#endif + + // Normal behavior. + return this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib); +} + /** * Output the linking rules on a command line. For executables, * targetLibrary should be a NULL pointer. For libraries, it should point * to the name of the library. This will not link a library against itself. */ -void cmLocalGenerator::OutputLinkLibraries( - cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer, - std::string& linkLibraries, std::string& frameworkPath, - std::string& linkPath) -{ +void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, + std::string& frameworkPath, + std::string& linkPath, + cmGeneratorTarget& tgt, bool relink, + bool forResponseFile, + bool useWatcomQuote) +{ + OutputFormat shellFormat = + (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); + bool escapeAllowMakeVars = !forResponseFile; + std::ostringstream fout; + std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); + cmComputeLinkInformation* pcli = tgt.GetLinkInformation(config); + if (!pcli) { + return; + } cmComputeLinkInformation& cli = *pcli; std::string linkLanguage = cli.GetLinkLanguage(); + std::string linkLibs; + std::string libPathFlag = this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG"); std::string libPathTerminator = this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR"); + // Append the framework search path flags. + std::string fwSearchFlagVar = "CMAKE_"; + fwSearchFlagVar += linkLanguage; + fwSearchFlagVar += "_FRAMEWORK_SEARCH_FLAG"; + const char* fwSearchFlag = this->Makefile->GetDefinition(fwSearchFlagVar); + if (fwSearchFlag && *fwSearchFlag) { + std::vector const& fwDirs = cli.GetFrameworkPaths(); + for (std::vector::const_iterator fdi = fwDirs.begin(); + fdi != fwDirs.end(); ++fdi) { + frameworkPath += fwSearchFlag; + frameworkPath += this->ConvertToOutputFormat(*fdi, shellFormat); + frameworkPath += " "; + } + } + + // Append the library search path flags. + std::vector const& libDirs = cli.GetDirectories(); + for (std::vector::const_iterator libDir = libDirs.begin(); + libDir != libDirs.end(); ++libDir) { + std::string libpath = + this->ConvertToOutputForExisting(*libDir, shellFormat); + linkPath += " " + libPathFlag; + linkPath += libpath; + linkPath += libPathTerminator; + linkPath += " "; + } + + // Append the link items. + typedef cmComputeLinkInformation::ItemVector ItemVector; + ItemVector const& items = cli.GetItems(); + for (ItemVector::const_iterator li = items.begin(); li != items.end(); + ++li) { + if (li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY) { + continue; + } + if (li->IsPath) { + linkLibs += this->ConvertToOutputFormat( + this->ConvertToLinkReference(li->Value), shellFormat); + } else { + linkLibs += li->Value; + } + linkLibs += " "; + } + + // Check what kind of rpath flags to use. + if (cli.GetRuntimeSep().empty()) { + // Each rpath entry gets its own option ("-R a -R b -R c") + std::vector runtimeDirs; + cli.GetRPath(runtimeDirs, relink); + + std::string rpath; + for (std::vector::iterator ri = runtimeDirs.begin(); + ri != runtimeDirs.end(); ++ri) { + rpath += cli.GetRuntimeFlag(); + rpath += this->ConvertToOutputFormat(*ri, shellFormat); + rpath += " "; + } + fout << rpath; + } else { + // All rpath entries are combined ("-Wl,-rpath,a:b:c"). + std::string rpath = cli.GetRPathString(relink); + + // Store the rpath option in the stream. + if (!rpath.empty()) { + fout << cli.GetRuntimeFlag(); + fout << this->EscapeForShell(rpath, escapeAllowMakeVars); + fout << " "; + } + } + + // Write the library flags to the build rule. + fout << linkLibs; + + // Add the linker runtime search path if any. + std::string rpath_link = cli.GetRPathLinkString(); + if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) { + fout << cli.GetRPathLinkFlag(); + fout << this->EscapeForShell(rpath_link, escapeAllowMakeVars); + fout << " "; + } + // Add standard libraries for this language. std::string standardLibsVar = "CMAKE_"; standardLibsVar += cli.GetLinkLanguage(); standardLibsVar += "_STANDARD_LIBRARIES"; - std::string stdLibString; if (const char* stdLibs = this->Makefile->GetDefinition(standardLibsVar)) { - stdLibString = stdLibs; + fout << stdLibs << " "; } - // Append the framework search path flags. - std::string fwSearchFlagVar = "CMAKE_"; - fwSearchFlagVar += linkLanguage; - fwSearchFlagVar += "_FRAMEWORK_SEARCH_FLAG"; - std::string fwSearchFlag = - this->Makefile->GetSafeDefinition(fwSearchFlagVar); - - frameworkPath = linkLineComputer->ComputeFrameworkPath(cli, fwSearchFlag); - linkPath = - linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator); - - linkLibraries = linkLineComputer->ComputeLinkLibraries(cli, stdLibString); + linkLibraries = fout.str(); } std::string cmLocalGenerator::GetLinkLibsCMP0065( diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 69c4101..e16ddab 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -19,13 +19,11 @@ #include #include -class cmComputeLinkInformation; class cmCustomCommandGenerator; class cmGeneratorTarget; class cmGlobalGenerator; class cmMakefile; class cmSourceFile; -class cmLinkLineComputer; /** \class cmLocalGenerator * \brief Create required build files for a directory. @@ -314,11 +312,10 @@ public: /** Fill out these strings for the given target. Libraries to link, * flags, and linkflags. */ - void GetTargetFlags(cmLinkLineComputer* linkLineComputer, - const std::string& config, std::string& linkLibs, + void GetTargetFlags(const std::string& config, std::string& linkLibs, std::string& flags, std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, - cmGeneratorTarget* target); + cmGeneratorTarget* target, bool useWatcomQuote); void GetTargetDefines(cmGeneratorTarget const* target, std::string const& config, std::string const& lang, std::set& defines) const; @@ -348,10 +345,10 @@ public: protected: ///! put all the libraries for a target on into the given stream - void OutputLinkLibraries(cmComputeLinkInformation* pcli, - cmLinkLineComputer* linkLineComputer, - std::string& linkLibraries, - std::string& frameworkPath, std::string& linkPath); + void OutputLinkLibraries(std::string& linkLibraries, + std::string& frameworkPath, std::string& linkPath, + cmGeneratorTarget&, bool relink, + bool forResponseFile, bool useWatcomQuote); // Expand rule variables in CMake of the type found in language rules void ExpandRuleVariables(std::string& string, @@ -373,6 +370,8 @@ protected: std::string& CreateSafeUniqueObjectFileName(const std::string& sin, std::string const& dir_max); + virtual std::string ConvertToLinkReference(std::string const& lib); + /** Check whether the native build system supports the given definition. Issues a warning. */ virtual bool CheckDefinition(std::string const& define) const; diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index f87aca2..5736581 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -120,6 +120,12 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() // Virtual protected methods. +std::string cmLocalNinjaGenerator::ConvertToLinkReference( + std::string const& lib) +{ + return this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); +} + std::string cmLocalNinjaGenerator::ConvertToIncludeReference( std::string const& path, cmOutputConverter::OutputFormat format, bool forceFullPaths) diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index b04788d..3061b57 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -76,6 +76,8 @@ public: void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg, cmNinjaDeps& ninjaDeps); + std::string ConvertToLinkReference(std::string const& lib) CM_OVERRIDE; + void ComputeObjectFilenames( std::map& mapping, cmGeneratorTarget const* gt = CM_NULLPTR) CM_OVERRIDE; diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx deleted file mode 100644 index 2b6df2a..0000000 --- a/Source/cmMSVC60LinkLineComputer.cxx +++ /dev/null @@ -1,36 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#include "cmMSVC60LinkLineComputer.h" - -#include "cmSystemTools.h" - -cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) - : cmLinkLineComputer(outputConverter, stateDir) -{ -} - -std::string cmMSVC60LinkLineComputer::ConvertToLinkReference( - std::string const& lib) const -{ -#if defined(_WIN32) && !defined(__CYGWIN__) - // Work-ardound command line parsing limitations in MSVC 6.0 - // Search for the last space. - std::string::size_type pos = lib.rfind(' '); - if (pos != lib.npos) { - // Find the slash after the last space, if any. - pos = lib.find('/', pos); - - // Convert the portion of the path with a space to a short path. - std::string sp; - if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) { - // Append the rest of the path with no space. - sp += lib.substr(pos); - return sp; - } - } -#endif - - return cmLinkLineComputer::ConvertToLinkReference(lib); -} diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h deleted file mode 100644 index ca9da31..0000000 --- a/Source/cmMSVC60LinkLineComputer.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#ifndef cmMSVC60LinkLineComputer_h -#define cmMSVC60LinkLineComputer_h - -#include "cmLinkLineComputer.h" - -class cmMSVC60LinkLineComputer : public cmLinkLineComputer -{ -public: - cmMSVC60LinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir); - - std::string ConvertToLinkReference(std::string const& input) const - CM_OVERRIDE; -}; - -#endif diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index bfc4857..79168d8 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -5,7 +5,6 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -216,14 +215,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->AppendFlags( linkFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); - { - CM_AUTO_PTR linkLineComputer( - this->CreateLinkLineComputer( - this->LocalGenerator, - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - - this->AddModuleDefinitionFlag(linkLineComputer.get(), linkFlags); - } + this->AddModuleDefinitionFlag(linkFlags); // Construct a list of files associated with this executable that // may need to be cleaned. @@ -304,18 +296,10 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Set path conversion for link script shells. this->LocalGenerator->SetLinkScriptShell(useLinkScript); - CM_AUTO_PTR linkLineComputer( - this->CreateLinkLineComputer( - this->LocalGenerator, - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - linkLineComputer->SetForResponse(useResponseFileForLibs); - linkLineComputer->SetUseWatcomQuote(useWatcomQuote); - linkLineComputer->SetRelink(relink); - // Collect up flags to link in needed libraries. std::string linkLibs; - this->CreateLinkLibs(linkLineComputer.get(), linkLibs, - useResponseFileForLibs, depends); + this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends, + useWatcomQuote); // Construct object file lists that may be needed to expand the // rule. diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 4488f06..8e25f43 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -5,7 +5,6 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -160,13 +159,7 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName); - - CM_AUTO_PTR linkLineComputer( - this->CreateLinkLineComputer( - this->LocalGenerator, - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - - this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); + this->AddModuleDefinitionFlag(extraFlags); if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(extraFlags, " -Wl,--no-as-needed"); @@ -191,13 +184,7 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_MODULE_LINKER_FLAGS", this->ConfigName); - - CM_AUTO_PTR linkLineComputer( - this->CreateLinkLineComputer( - this->LocalGenerator, - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - - this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); + this->AddModuleDefinitionFlag(extraFlags); this->WriteLibraryRules(linkRuleVar, extraFlags, relink); } @@ -504,17 +491,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Collect up flags to link in needed libraries. std::string linkLibs; if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { - - CM_AUTO_PTR linkLineComputer( - this->CreateLinkLineComputer( - this->LocalGenerator, - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - linkLineComputer->SetForResponse(useResponseFileForLibs); - linkLineComputer->SetUseWatcomQuote(useWatcomQuote); - linkLineComputer->SetRelink(relink); - - this->CreateLinkLibs(linkLineComputer.get(), linkLibs, - useResponseFileForLibs, depends); + this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends, + useWatcomQuote); } // Construct object file lists that may be needed to expand the diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 29df0a0..14102ef 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -10,7 +10,6 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -1584,28 +1583,15 @@ std::string cmMakefileTargetGenerator::CreateResponseFile( return responseFileName; } -cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) -{ - if (this->Makefile->IsOn("MSVC60")) { - return this->GlobalGenerator->CreateMSVC60LinkLineComputer(outputConverter, - stateDir); - } - return this->GlobalGenerator->CreateLinkLineComputer(outputConverter, - stateDir); -} - void cmMakefileTargetGenerator::CreateLinkLibs( - cmLinkLineComputer* linkLineComputer, std::string& linkLibs, - bool useResponseFile, std::vector& makefile_depends) + std::string& linkLibs, bool relink, bool useResponseFile, + std::vector& makefile_depends, bool useWatcomQuote) { std::string frameworkPath; std::string linkPath; - std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); - cmComputeLinkInformation* pcli = - this->GeneratorTarget->GetLinkInformation(config); - this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath); + this->LocalGenerator->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, + *this->GeneratorTarget, relink, + useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 69d9d28..df7b6aa 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -20,7 +20,6 @@ class cmGeneratedFileStream; class cmGeneratorTarget; class cmGlobalUnixMakefileGenerator3; class cmSourceFile; -class cmLinkLineComputer; /** \class cmMakefileTargetGenerator * \brief Support Routines for writing makefiles @@ -141,9 +140,6 @@ protected: std::vector& makefile_commands, std::vector& makefile_depends); - cmLinkLineComputer* CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir); - /** Create a response file with the given set of options. Returns the relative path from the target build working directory to the response file name. */ @@ -154,9 +150,9 @@ protected: bool CheckUseResponseFileForLibraries(std::string const& l) const; /** Create list of flags for link libraries. */ - void CreateLinkLibs(cmLinkLineComputer* linkLineComputer, - std::string& linkLibs, bool useResponseFile, - std::vector& makefile_depends); + void CreateLinkLibs(std::string& linkLibs, bool relink, bool useResponseFile, + std::vector& makefile_depends, + bool useWatcomQuote); /** Create lists of object files for linking and cleaning. */ void CreateObjectLists(bool useLinkScript, bool useArchiveRules, diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx deleted file mode 100644 index 3dcb20b..0000000 --- a/Source/cmNinjaLinkLineComputer.cxx +++ /dev/null @@ -1,19 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#include "cmNinjaLinkLineComputer.h" -#include "cmGlobalNinjaGenerator.h" - -cmNinjaLinkLineComputer::cmNinjaLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir, - cmGlobalNinjaGenerator const* gg) - : cmLinkLineComputer(outputConverter, stateDir) - , GG(gg) -{ -} - -std::string cmNinjaLinkLineComputer::ConvertToLinkReference( - std::string const& lib) const -{ - return GG->ConvertToNinjaPath(lib); -} diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h deleted file mode 100644 index a108568..0000000 --- a/Source/cmNinjaLinkLineComputer.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#ifndef cmNinjaLinkLineComputer_h -#define cmNinjaLinkLineComputer_h - -#include "cmLinkLineComputer.h" -#include "cmState.h" - -class cmGlobalNinjaGenerator; - -class cmNinjaLinkLineComputer : public cmLinkLineComputer -{ -public: - cmNinjaLinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir, - cmGlobalNinjaGenerator const* gg); - - std::string ConvertToLinkReference(std::string const& input) const - CM_OVERRIDE; - -private: - cmGlobalNinjaGenerator const* GG; -}; - -#endif diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index ab086eb..095c703 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -8,7 +8,6 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalNinjaGenerator.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" @@ -471,15 +470,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() vars["TARGET_FILE"] = localGen.ConvertToOutputFormat(targetOutputReal, cmOutputConverter::SHELL); - CM_AUTO_PTR linkLineComputer( - this->GetGlobalGenerator()->CreateLinkLineComputer( - this->GetLocalGenerator(), - this->GetLocalGenerator()->GetStateSnapshot().GetDirectory())); - linkLineComputer->SetUseWatcomQuote(useWatcomQuote); - - localGen.GetTargetFlags( - linkLineComputer.get(), this->GetConfigName(), vars["LINK_LIBRARIES"], - vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, linkPath, &genTarget); + localGen.GetTargetFlags(this->GetConfigName(), vars["LINK_LIBRARIES"], + vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, + linkPath, &genTarget, useWatcomQuote); if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") && (gt.GetType() == cmState::SHARED_LIBRARY || gt.IsExecutableWithExports())) { @@ -504,7 +497,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->addPoolNinjaVariable("JOB_POOL_LINK", >, vars); - this->AddModuleDefinitionFlag(linkLineComputer.get(), vars["LINK_FLAGS"]); + this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]); vars["LINK_FLAGS"] = cmGlobalNinjaGenerator::EncodeLiteral(vars["LINK_FLAGS"]); diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index e0fcb75..a2bdf49 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -7,7 +7,6 @@ #include "cmFileMonitor.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" -#include "cmLinkLineComputer.h" #include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -729,10 +728,8 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, std::string linkLanguageFlags; std::string frameworkPath; std::string linkPath; - cmLinkLineComputer linkLineComputer(lg, - lg->GetStateSnapshot().GetDirectory()); - lg->GetTargetFlags(&linkLineComputer, config, linkLibs, linkLanguageFlags, - linkFlags, frameworkPath, linkPath, target); + lg->GetTargetFlags(config, linkLibs, linkLanguageFlags, linkFlags, + frameworkPath, linkPath, target, false); linkLibs = cmSystemTools::TrimWhitespace(linkLibs); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index e400c35..14124f8 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -12,7 +12,6 @@ #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmGlobalGeneratorFactory.h" -#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmMessenger.h" @@ -583,10 +582,8 @@ bool cmake::FindPackage(const std::vector& args) gg->CreateGenerationObjects(); cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName()); cmLocalGenerator* lg = gtgt->GetLocalGenerator(); - cmLinkLineComputer linkLineComputer(lg, - lg->GetStateSnapshot().GetDirectory()); - lg->GetTargetFlags(&linkLineComputer, buildType, linkLibs, flags, - linkFlags, frameworkPath, linkPath, gtgt); + lg->GetTargetFlags(buildType, linkLibs, flags, linkFlags, frameworkPath, + linkPath, gtgt, false); linkLibs = frameworkPath + linkPath + linkLibs; printf("%s\n", linkLibs.c_str()); diff --git a/bootstrap b/bootstrap index fb8b1eb..889cc33 100755 --- a/bootstrap +++ b/bootstrap @@ -297,8 +297,6 @@ CMAKE_CXX_SOURCES="\ cmFileTimeComparison \ cmGlobalUnixMakefileGenerator3 \ cmLocalUnixMakefileGenerator3 \ - cmLinkLineComputer \ - cmMSVC60LinkLineComputer \ cmMakefileExecutableTargetGenerator \ cmMakefileLibraryTargetGenerator \ cmMakefileTargetGenerator \ ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 6 - Source/cmCommonTargetGenerator.cxx | 6 +- Source/cmCommonTargetGenerator.h | 4 +- Source/cmGhsMultiTargetGenerator.cxx | 11 +- Source/cmGlobalGenerator.cxx | 14 -- Source/cmGlobalGenerator.h | 8 -- Source/cmGlobalNinjaGenerator.cxx | 15 +- Source/cmGlobalNinjaGenerator.h | 8 +- Source/cmLinkLineComputer.cxx | 179 ------------------------ Source/cmLinkLineComputer.h | 50 ------- Source/cmLocalGenerator.cxx | 167 +++++++++++++++++----- Source/cmLocalGenerator.h | 17 ++- Source/cmLocalNinjaGenerator.cxx | 6 + Source/cmLocalNinjaGenerator.h | 2 + Source/cmMSVC60LinkLineComputer.cxx | 36 ----- Source/cmMSVC60LinkLineComputer.h | 19 --- Source/cmMakefileExecutableTargetGenerator.cxx | 22 +-- Source/cmMakefileLibraryTargetGenerator.cxx | 30 +--- Source/cmMakefileTargetGenerator.cxx | 24 +--- Source/cmMakefileTargetGenerator.h | 10 +- Source/cmNinjaLinkLineComputer.cxx | 19 --- Source/cmNinjaLinkLineComputer.h | 26 ---- Source/cmNinjaNormalTargetGenerator.cxx | 15 +- Source/cmServerProtocol.cxx | 7 +- Source/cmake.cxx | 7 +- bootstrap | 2 - 26 files changed, 183 insertions(+), 527 deletions(-) delete mode 100644 Source/cmLinkLineComputer.cxx delete mode 100644 Source/cmLinkLineComputer.h delete mode 100644 Source/cmMSVC60LinkLineComputer.cxx delete mode 100644 Source/cmMSVC60LinkLineComputer.h delete mode 100644 Source/cmNinjaLinkLineComputer.cxx delete mode 100644 Source/cmNinjaLinkLineComputer.h hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 10:39:12 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 10:39:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-330-g92810dc Message-ID: <20161010143912.11B7D14995@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 92810dc819dc45bad1a7aff6bb10b82c9d2451f7 (commit) via b6a174d2bcd5d64cff7a54a4744fe2b5811d6f9e (commit) via d0faa58a51114a97f3af6a951b6c4052ca19c9ee (commit) from 3826f1c832b071df8bb7163d44ad1981724ad70b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92810dc819dc45bad1a7aff6bb10b82c9d2451f7 commit 92810dc819dc45bad1a7aff6bb10b82c9d2451f7 Merge: 3826f1c b6a174d Author: Brad King AuthorDate: Mon Oct 10 10:39:10 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 10:39:10 2016 -0400 Merge topic 'remove-obsolete' into next b6a174d2 Makefiles: Remove query for CMAKE_OBJECT_NAME d0faa58a Makefiles: Remove forbidden flag logic https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b6a174d2bcd5d64cff7a54a4744fe2b5811d6f9e commit b6a174d2bcd5d64cff7a54a4744fe2b5811d6f9e Author: Stephen Kelly AuthorDate: Sun Oct 9 10:58:33 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 10:58:33 2016 +0200 Makefiles: Remove query for CMAKE_OBJECT_NAME it is not set. diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index d256a69..9f5bda9 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1207,9 +1207,7 @@ void cmMakefileTargetGenerator::WriteObjectsVariable( i != this->ExternalObjects.end(); ++i) { object = this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, *i); - *this->BuildFileStream << " " << lineContinue << "\n" - << this->Makefile->GetSafeDefinition( - "CMAKE_OBJECT_NAME"); + *this->BuildFileStream << " " << lineContinue << "\n"; *this->BuildFileStream << this->LocalGenerator->ConvertToQuotedOutputPath( i->c_str(), useWatcomQuote); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d0faa58a51114a97f3af6a951b6c4052ca19c9ee commit d0faa58a51114a97f3af6a951b6c4052ca19c9ee Author: Stephen Kelly AuthorDate: Sun Oct 9 10:58:33 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 9 10:58:33 2016 +0200 Makefiles: Remove forbidden flag logic This might have been needed some day in the past, but not anymore. diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index bb085ac..c09bac4 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -105,8 +105,6 @@ if("${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5") set(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1) endif() -set(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w) -set(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w) set(CMAKE_C_CREATE_SHARED_LIBRARY " -o ") set(CMAKE_CXX_CREATE_SHARED_LIBRARY diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 8e25f43..5db5c24 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -352,18 +352,6 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( commands, buildEcho, cmLocalUnixMakefileGenerator3::EchoLink, &progress); } - const char* forbiddenFlagVar = CM_NULLPTR; - switch (this->GeneratorTarget->GetType()) { - case cmState::SHARED_LIBRARY: - forbiddenFlagVar = "_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS"; - break; - case cmState::MODULE_LIBRARY: - forbiddenFlagVar = "_CREATE_SHARED_MODULE_FORBIDDEN_FLAGS"; - break; - default: - break; - } - // Clean files associated with this library. std::vector libCleanFiles; libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( @@ -585,11 +573,6 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( this->LocalGenerator->AddArchitectureFlags( langFlags, this->GeneratorTarget, linkLanguage, this->ConfigName); - // remove any language flags that might not work with the - // particular os - if (forbiddenFlagVar) { - this->RemoveForbiddenFlags(forbiddenFlagVar, linkLanguage, langFlags); - } vars.LanguageCompileFlags = langFlags.c_str(); // Construct the main link rule and expand placeholders. diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 14102ef..d256a69 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1416,52 +1416,6 @@ void cmMakefileTargetGenerator::CloseFileStreams() delete this->FlagFileStream; } -void cmMakefileTargetGenerator::RemoveForbiddenFlags( - const char* flagVar, const std::string& linkLang, std::string& linkFlags) -{ - // check for language flags that are not allowed at link time, and - // remove them, -w on darwin for gcc -w -dynamiclib sends -w to libtool - // which fails, there may be more] - - std::string removeFlags = "CMAKE_"; - removeFlags += linkLang; - removeFlags += flagVar; - std::string removeflags = this->Makefile->GetSafeDefinition(removeFlags); - std::vector removeList; - cmSystemTools::ExpandListArgument(removeflags, removeList); - - for (std::vector::iterator i = removeList.begin(); - i != removeList.end(); ++i) { - std::string tmp; - std::string::size_type lastPosition = 0; - - for (;;) { - std::string::size_type position = linkFlags.find(*i, lastPosition); - - if (position == std::string::npos) { - tmp += linkFlags.substr(lastPosition); - break; - } else { - std::string::size_type prefixLength = position - lastPosition; - tmp += linkFlags.substr(lastPosition, prefixLength); - lastPosition = position + i->length(); - - bool validFlagStart = - position == 0 || isspace(linkFlags[position - 1]); - - bool validFlagEnd = - lastPosition == linkFlags.size() || isspace(linkFlags[lastPosition]); - - if (!validFlagStart || !validFlagEnd) { - tmp += *i; - } - } - } - - linkFlags = tmp; - } -} - void cmMakefileTargetGenerator::CreateLinkScript( const char* name, std::vector const& link_commands, std::vector& makefile_commands, diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index df7b6aa..222161a 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -168,8 +168,6 @@ protected: const std::string& lang) CM_OVERRIDE; virtual void CloseFileStreams(); - void RemoveForbiddenFlags(const char* flagVar, const std::string& linkLang, - std::string& linkFlags); cmLocalUnixMakefileGenerator3* LocalGenerator; cmGlobalUnixMakefileGenerator3* GlobalGenerator; ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Darwin.cmake | 2 -- Source/cmMakefileLibraryTargetGenerator.cxx | 17 --------- Source/cmMakefileTargetGenerator.cxx | 50 +-------------------------- Source/cmMakefileTargetGenerator.h | 2 -- 4 files changed, 1 insertion(+), 70 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 11:31:27 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 11:31:27 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-146-g06b71ff Message-ID: <20161010153127.26EABF5DBB@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 06b71ff9fb41369e6dce0c2b9760d2d546d47dec (commit) via 9f240cff8ad14832dbc5472917b3b2e3fe813e46 (commit) via 5d8da06d60138c18eb68fab01b9b6e736ecd4914 (commit) via a033f8671272c382ba55c23f1269439cc4db4a97 (commit) via 111d90465f00559c808b7a02944f890af6c0fe89 (commit) via d231f3b738b31ebad075c49abcef972c268ba9d0 (commit) via fbc1a30b87f9af2f798e1f2dc61e94089a99e213 (commit) via ffff5c17a5b87984b9bcb7e6f20445b0efdcd124 (commit) via dcf9729eb9a3647fc3c9cd5f2e04a5419420fb61 (commit) from 1e6aaefdeebbf09eaf7fa0e9dbc6a7faa2f9132a (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 Oct 10 11:31:27 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 11:31:27 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-340-g1b79da2 Message-ID: <20161010153127.45F9AF5DBC@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 1b79da2c9939c0674970d36ca282f0e4f62fa8c5 (commit) via 06b71ff9fb41369e6dce0c2b9760d2d546d47dec (commit) via 9f240cff8ad14832dbc5472917b3b2e3fe813e46 (commit) via 5d8da06d60138c18eb68fab01b9b6e736ecd4914 (commit) via a033f8671272c382ba55c23f1269439cc4db4a97 (commit) via 111d90465f00559c808b7a02944f890af6c0fe89 (commit) via d231f3b738b31ebad075c49abcef972c268ba9d0 (commit) via fbc1a30b87f9af2f798e1f2dc61e94089a99e213 (commit) via ffff5c17a5b87984b9bcb7e6f20445b0efdcd124 (commit) via dcf9729eb9a3647fc3c9cd5f2e04a5419420fb61 (commit) from 92810dc819dc45bad1a7aff6bb10b82c9d2451f7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1b79da2c9939c0674970d36ca282f0e4f62fa8c5 commit 1b79da2c9939c0674970d36ca282f0e4f62fa8c5 Merge: 92810dc 06b71ff Author: Brad King AuthorDate: Mon Oct 10 11:31:15 2016 -0400 Commit: Brad King CommitDate: Mon Oct 10 11:31:15 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 11:31:27 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 11:31:27 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.7.0-rc1-32-g9f240cf Message-ID: <20161010153127.7AB4DF5DBD@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 9f240cff8ad14832dbc5472917b3b2e3fe813e46 (commit) via c22f3cf7153fcf766d0ecc17d72e93bf4209e0b2 (commit) via bf28a3873d633d233991f14e8e4d10c76f410deb (commit) via 5d8da06d60138c18eb68fab01b9b6e736ecd4914 (commit) via dda6775c940129d2a38fecd6cf6273f7d97ccca0 (commit) via a033f8671272c382ba55c23f1269439cc4db4a97 (commit) via 111d90465f00559c808b7a02944f890af6c0fe89 (commit) via 8cdac469d19f486b167006e4d4fcbf2a18c85866 (commit) via 2b9dad694a43d850af5fe83dd327fc82db29a012 (commit) via d231f3b738b31ebad075c49abcef972c268ba9d0 (commit) via 20e8dcf162b9963c9ff195525bc433df2bc2de2a (commit) via 845b98f45b09b399f914d9df3c6a6008d7558b1b (commit) via fbc1a30b87f9af2f798e1f2dc61e94089a99e213 (commit) via 80574a38e6cb6ac33630e878d9633f1267b53d2b (commit) via ffff5c17a5b87984b9bcb7e6f20445b0efdcd124 (commit) via 0c3a04777cc5fa8bc43b57b789e72630781ef56a (commit) via ebef3632c79491c402991967aab03a9c971cb70d (commit) via f59e87792943904dcb11e16380883e87395d115f (commit) via dcf9729eb9a3647fc3c9cd5f2e04a5419420fb61 (commit) via f53b01ff0fdead346f3f63310d4a7359db269fb4 (commit) via ca50c89e416934a586ad6839b2aaba8e7257cc2e (commit) from aac66d79743b3ad1bae0fd9facc9ac329fa9df53 (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: CMakeLists.txt | 8 ++- Help/variable/CMAKE_CODELITE_USE_TARGETS.rst | 5 +- Modules/CPackRPM.cmake | 68 ++++++++++++-------- Modules/FindProtobuf.cmake | 16 +++-- Modules/Platform/Android/ndk-stl-c++.cmake | 10 ++- Source/cmExportBuildAndroidMKGenerator.cxx | 12 ++++ Source/cmExtraCodeLiteGenerator.cxx | 4 +- Source/cmGlobalGenerator.cxx | 19 ++++++ Source/cmGlobalGenerator.h | 4 ++ Source/kwsys/SystemTools.cxx | 20 +++--- Tests/RunCMake/Android/android.cxx | 3 + Tests/RunCMake/Android/common.cmake | 6 +- Tests/RunCMake/AndroidMK/AndroidMK.cmake | 2 +- Tests/RunCMake/AndroidMK/bar.c | 3 + .../RunCMake/AndroidMK/expectedBuildAndroidMK.txt | 3 + .../AndroidMK/expectedInstallAndroidMK.txt | 3 + 16 files changed, 130 insertions(+), 56 deletions(-) create mode 100644 Tests/RunCMake/AndroidMK/bar.c hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 12:59:17 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 12:59:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-342-gdd75faf Message-ID: <20161010165917.B8FFEF5E29@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 dd75faf01aecc93c32cbc5941d29033e33af0521 (commit) via b1d67ae8a5a1334bfeaf802c55d517d8eaa0dbf9 (commit) from 1b79da2c9939c0674970d36ca282f0e4f62fa8c5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dd75faf01aecc93c32cbc5941d29033e33af0521 commit dd75faf01aecc93c32cbc5941d29033e33af0521 Merge: 1b79da2 b1d67ae Author: Brad King AuthorDate: Mon Oct 10 12:59:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 12:59:16 2016 -0400 Merge topic 'vs15-separate-flag-table' into next b1d67ae8 VS: Split flag table between v140 and v141 toolsets https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1d67ae8a5a1334bfeaf802c55d517d8eaa0dbf9 commit b1d67ae8a5a1334bfeaf802c55d517d8eaa0dbf9 Author: Brad King AuthorDate: Mon Oct 10 11:12:36 2016 -0400 Commit: Brad King CommitDate: Mon Oct 10 11:43:39 2016 -0400 VS: Split flag table between v140 and v141 toolsets In commit v3.7.0-rc1~156^2~1 (VS: Update v140 flag tables from VS 15 MSBuild files, 2016-09-02) we extended the v140 flag table with values from the v141 toolset that comes with VS 15. However, the v140 toolset that comes with VS 14 does not have all of these entries and so the flags just need to be passed without special mapping. In order to support both toolsets, split our CL flag table into separate copies for each version and switch off the toolset name. Closes: #16352 diff --git a/Source/cmVS14CLFlagTable.h b/Source/cmVS140CLFlagTable.h similarity index 95% copy from Source/cmVS14CLFlagTable.h copy to Source/cmVS140CLFlagTable.h index c48db68..317cc18 100644 --- a/Source/cmVS14CLFlagTable.h +++ b/Source/cmVS140CLFlagTable.h @@ -1,4 +1,4 @@ -static cmVS7FlagTable cmVS14CLFlagTable[] = { +static cmVS7FlagTable cmVS140CLFlagTable[] = { // Enum Properties { "DebugInformationFormat", "", "None", "None", 0 }, @@ -60,9 +60,6 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = { { "BufferSecurityCheck", "GS-", "Disable Security Check", "false", 0 }, { "BufferSecurityCheck", "GS", "Enable Security Check", "true", 0 }, - { "ControlFlowGuard", "guard:cf", "Yes", "Guard", 0 }, - { "ControlFlowGuard", "", "No", "false", 0 }, - { "EnableEnhancedInstructionSet", "arch:SSE", "Streaming SIMD Extensions", "StreamingSIMDExtensions", 0 }, { "EnableEnhancedInstructionSet", "arch:SSE2", "Streaming SIMD Extensions 2", @@ -79,10 +76,6 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = { { "FloatingPointModel", "fp:strict", "Strict", "Strict", 0 }, { "FloatingPointModel", "fp:fast", "Fast", "Fast", 0 }, - { "LanguageStandard", "std:c++14", "ISO C++14 Standard", "stdcpp14", 0 }, - { "LanguageStandard", "std:c++latest", "ISO C++ Latest Draft Standard", - "stdcpplatest", 0 }, - { "PrecompiledHeader", "Yc", "Create", "Create", cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, { "PrecompiledHeader", "Yu", "Use", "Use", @@ -171,9 +164,6 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = { { "TreatWChar_tAsBuiltInType", "Zc:wchar_t", "", "true", 0 }, { "ForceConformanceInForLoopScope", "Zc:forScope-", "", "false", 0 }, { "ForceConformanceInForLoopScope", "Zc:forScope", "", "true", 0 }, - { "RemoveUnreferencedCodeData", "Zc:inline", "", "true", 0 }, - { "EnforceTypeConversionRules", "Zc:rvalueCast-", "", "false", 0 }, - { "EnforceTypeConversionRules", "Zc:rvalueCast", "", "true", 0 }, { "RuntimeTypeInfo", "GR-", "", "false", 0 }, { "RuntimeTypeInfo", "GR", "", "true", 0 }, { "OpenMPSupport", "openmp-", "", "false", 0 }, @@ -225,8 +215,6 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = { "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, // String Properties - { "WarningVersion", "Wv:", "Warning Version", "", - cmVS7FlagTable::UserValue }, // Skip [TrackerLogDirectory] - no command line Switch. { "PreprocessOutputPath", "Fi", "Preprocess Output Path", "", cmVS7FlagTable::UserValue }, diff --git a/Source/cmVS14CLFlagTable.h b/Source/cmVS141CLFlagTable.h similarity index 99% rename from Source/cmVS14CLFlagTable.h rename to Source/cmVS141CLFlagTable.h index c48db68..895b3e8 100644 --- a/Source/cmVS14CLFlagTable.h +++ b/Source/cmVS141CLFlagTable.h @@ -1,4 +1,4 @@ -static cmVS7FlagTable cmVS14CLFlagTable[] = { +static cmVS7FlagTable cmVS141CLFlagTable[] = { // Enum Properties { "DebugInformationFormat", "", "None", "None", 0 }, diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index d81f59d..cb47f20 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -25,7 +25,8 @@ #include "cmVS12LinkFlagTable.h" #include "cmVS12MASMFlagTable.h" #include "cmVS12RCFlagTable.h" -#include "cmVS14CLFlagTable.h" +#include "cmVS140CLFlagTable.h" +#include "cmVS141CLFlagTable.h" #include "cmVS14LibFlagTable.h" #include "cmVS14LinkFlagTable.h" #include "cmVS14MASMFlagTable.h" @@ -43,7 +44,13 @@ cmIDEFlagTable const* cmVisualStudio10TargetGenerator::GetClFlagTable() const cmGlobalVisualStudioGenerator::VSVersion v = this->LocalGenerator->GetVersion(); if (v >= cmGlobalVisualStudioGenerator::VS14) { - return cmVS14CLFlagTable; + // FIXME: All flag table selection should be based on the toolset name. + // See issue #16153. For now, treat VS 15's toolset as a special case. + const char* toolset = this->GlobalGenerator->GetPlatformToolset(); + if (toolset && cmHasLiteralPrefix(toolset, "v141")) { + return cmVS141CLFlagTable; + } + return cmVS140CLFlagTable; } else if (v >= cmGlobalVisualStudioGenerator::VS12) { return cmVS12CLFlagTable; } else if (v == cmGlobalVisualStudioGenerator::VS11) { ----------------------------------------------------------------------- Summary of changes: Source/{cmVS14CLFlagTable.h => cmVS140CLFlagTable.h} | 14 +------------- Source/{cmVS14CLFlagTable.h => cmVS141CLFlagTable.h} | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 11 +++++++++-- 3 files changed, 11 insertions(+), 16 deletions(-) copy Source/{cmVS14CLFlagTable.h => cmVS140CLFlagTable.h} (95%) rename Source/{cmVS14CLFlagTable.h => cmVS141CLFlagTable.h} (99%) hooks/post-receive -- CMake From steveire at gmail.com Mon Oct 10 14:44:15 2016 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 10 Oct 2016 14:44:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-360-gf62d2c8 Message-ID: <20161010184415.43385F50E7@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 f62d2c869f7ebbb418bde71bff2ecbfc7a3993b2 (commit) via 4134030434ea88024ef46f9f00b19513fc3cec4c (commit) via f03d446e967af91460ff31eb52d840983b3d8cec (commit) via 3444105f9fe4fcee390c8d616e1a211a078a630b (commit) via 77c4202edc242c96087295585a85a20700bdb26f (commit) via 09b6cc66b09b9689ca01faee5e33ef101b46f972 (commit) via 0c978063259fb013856b617d680cebcdee51ab1a (commit) via 0152a01f11fc46f645fd765cc7b1be76cc07b52a (commit) via 011e6870e4a7f19476c162a8c011fd018d9a7e9c (commit) via cbca80f3516d7e5b2def6105a1b26b44bad7b6fe (commit) via d48f69d0f5f265d1c091a614098cae3ff4325fbe (commit) via ff8e321c6ade784b3f1b3b19a7783788872e44a9 (commit) via 80f57e67eefc905a726f2f35bd1672a188ea4c99 (commit) via 7ef834682547df5e0ccdcd503558dcbf1206a638 (commit) via 69295812065a5d07c07347add2fdcf8f36f993ba (commit) via 5b361fdda0f2808f0368b746a880981ebda0ade0 (commit) via 2e5d1990f382aa42e8a0ad34117ee1e5a9187153 (commit) via b3701f9a5213f2ff5b2bc197e9af5d1f2ff68a9c (commit) from dd75faf01aecc93c32cbc5941d29033e33af0521 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f62d2c869f7ebbb418bde71bff2ecbfc7a3993b2 commit f62d2c869f7ebbb418bde71bff2ecbfc7a3993b2 Merge: dd75faf 4134030 Author: Stephen Kelly AuthorDate: Mon Oct 10 14:44:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 14:44:12 2016 -0400 Merge topic 'extract-cmLinkLineComputer' into next 41340304 cmLinkLineComputer: Extract link libraries computation from cmLocalGenerator f03d446e cmLinkLineComputer: Move FrameworkPath computation from cmLocalGenerator 3444105f cmLocalGenerator: Inline last use of local variable 77c4202e cmLinkLineComputer: Move RPath computation from cmLocalGenerator 09b6cc66 cmLinkLineComputer: Move LinkPath computation from cmLocalGenerator 0c978063 cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGenerator 0152a01f cmLocalGenerator: Move variable to where it is used 011e6870 cmLocalGenerator: Use a std::string instead of char* cbca80f3 cmLocalGenerator: Move stringstream to where it is used d48f69d0 cmLocalGenerator: Move flag determination up in the function ff8e321c cmLocalGenerator: Separate stdlib content from library stream 80f57e67 cmLocalGenerator: Separate rpath content from library stream 7ef83468 cmLocalGenerator: Pass link library info to OutputLinkLibraries 69295812 Makefiles: Port CreateLinkLibs to cmLinkLineComputer 5b361fdd cmLinkLineComputer: Extract from cmLocalGenerator 2e5d1990 Ninja: Constify ... https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4134030434ea88024ef46f9f00b19513fc3cec4c commit 4134030434ea88024ef46f9f00b19513fc3cec4c Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:39 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:59 2016 +0200 cmLinkLineComputer: Extract link libraries computation from cmLocalGenerator Hide some methods which no longer need to be public. diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 41096ef..24f3578 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -152,3 +152,28 @@ std::string cmLinkLineComputer::ComputeFrameworkPath( } return frameworkPath; } + +std::string cmLinkLineComputer::ComputeLinkLibraries( + cmComputeLinkInformation& cli, std::string const& stdLibString) +{ + std::ostringstream fout; + fout << this->ComputeRPath(cli); + + // Write the library flags to the build rule. + fout << this->ComputeLinkLibs(cli); + + // Add the linker runtime search path if any. + std::string rpath_link = cli.GetRPathLinkString(); + if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) { + fout << cli.GetRPathLinkFlag(); + fout << this->OutputConverter->EscapeForShell(rpath_link, + !this->ForResponse); + fout << " "; + } + + if (!stdLibString.empty()) { + fout << stdLibString << " "; + } + + return fout.str(); +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index f72368a..1fb9b24 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -22,18 +22,20 @@ public: virtual std::string ConvertToLinkReference(std::string const& input) const; - std::string ComputeLinkLibs(cmComputeLinkInformation& cli); - std::string ComputeLinkPath(cmComputeLinkInformation& cli, std::string const& libPathFlag, std::string const& libPathTerminator); - std::string ComputeRPath(cmComputeLinkInformation& cli); - std::string ComputeFrameworkPath(cmComputeLinkInformation& cli, std::string const& fwSearchFlag); + std::string ComputeLinkLibraries(cmComputeLinkInformation& cli, + std::string const& stdLibString); + private: + std::string ComputeLinkLibs(cmComputeLinkInformation& cli); + std::string ComputeRPath(cmComputeLinkInformation& cli); + std::string ConvertToOutputFormat(std::string const& input); std::string ConvertToOutputForExisting(std::string const& input); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index ef9e355..3b19694 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1207,7 +1207,7 @@ void cmLocalGenerator::GetTargetFlags( } if (pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false); + frameworkPath, linkPath); } } break; case cmState::EXECUTABLE: { @@ -1229,7 +1229,7 @@ void cmLocalGenerator::GetTargetFlags( this->AddLanguageFlags(flags, linkLanguage, buildType); if (pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false); + frameworkPath, linkPath); } if (cmSystemTools::IsOn( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { @@ -1397,7 +1397,7 @@ std::string cmLocalGenerator::GetTargetFortranFlags( void cmLocalGenerator::OutputLinkLibraries( cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, - std::string& linkPath, bool forResponseFile) + std::string& linkPath) { cmComputeLinkInformation& cli = *pcli; @@ -1428,29 +1428,7 @@ void cmLocalGenerator::OutputLinkLibraries( linkPath = linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator); - std::string linkLibs = linkLineComputer->ComputeLinkLibs(cli); - - std::string rpath = linkLineComputer->ComputeRPath(cli); - - std::ostringstream fout; - fout << rpath; - - // Write the library flags to the build rule. - fout << linkLibs; - - // Add the linker runtime search path if any. - std::string rpath_link = cli.GetRPathLinkString(); - if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) { - fout << cli.GetRPathLinkFlag(); - fout << this->EscapeForShell(rpath_link, !forResponseFile); - fout << " "; - } - - if (!stdLibString.empty()) { - fout << stdLibString << " "; - } - - linkLibraries = fout.str(); + linkLibraries = linkLineComputer->ComputeLinkLibraries(cli, stdLibString); } std::string cmLocalGenerator::GetLinkLibsCMP0065( diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 4729acb..69c4101 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -351,8 +351,7 @@ protected: void OutputLinkLibraries(cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, - std::string& frameworkPath, std::string& linkPath, - bool forResponseFile); + std::string& frameworkPath, std::string& linkPath); // Expand rule variables in CMake of the type found in language rules void ExpandRuleVariables(std::string& string, diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e93c31d..1483fbb 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1610,8 +1610,7 @@ void cmMakefileTargetGenerator::CreateLinkLibs( cmComputeLinkInformation* pcli = this->GeneratorTarget->GetLinkInformation(config); this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, - useResponseFile); + frameworkPath, linkPath); linkLibs = frameworkPath + linkPath + linkLibs; if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f03d446e967af91460ff31eb52d840983b3d8cec commit f03d446e967af91460ff31eb52d840983b3d8cec Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:39 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:59 2016 +0200 cmLinkLineComputer: Move FrameworkPath computation from cmLocalGenerator Add UseWatcomQuote state, and remove corresponding method parameters. diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 04c45e5..5fbaea4 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -367,10 +367,11 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries( this->GetGlobalGenerator()->CreateLinkLineComputer( this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); + linkLineComputer->SetUseWatcomQuote(useWatcomQuote); this->LocalGenerator->GetTargetFlags( linkLineComputer.get(), config, linkLibraries, flags, linkFlags, - frameworkPath, linkPath, this->GeneratorTarget, useWatcomQuote); + frameworkPath, linkPath, this->GeneratorTarget); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); if (!linkPath.empty()) { diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 3675887..41096ef 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -136,3 +136,19 @@ std::string cmLinkLineComputer::ComputeRPath(cmComputeLinkInformation& cli) } return rpath; } + +std::string cmLinkLineComputer::ComputeFrameworkPath( + cmComputeLinkInformation& cli, std::string const& fwSearchFlag) +{ + std::string frameworkPath; + if (!fwSearchFlag.empty()) { + std::vector const& fwDirs = cli.GetFrameworkPaths(); + for (std::vector::const_iterator fdi = fwDirs.begin(); + fdi != fwDirs.end(); ++fdi) { + frameworkPath += fwSearchFlag; + frameworkPath += this->ConvertToOutputFormat(*fdi); + frameworkPath += " "; + } + } + return frameworkPath; +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index d33e832..f72368a 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -30,6 +30,9 @@ public: std::string ComputeRPath(cmComputeLinkInformation& cli); + std::string ComputeFrameworkPath(cmComputeLinkInformation& cli, + std::string const& fwSearchFlag); + private: std::string ConvertToOutputFormat(std::string const& input); std::string ConvertToOutputForExisting(std::string const& input); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index d41399a..ef9e355 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1151,8 +1151,7 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags, void cmLocalGenerator::GetTargetFlags( cmLinkLineComputer* linkLineComputer, const std::string& config, std::string& linkLibs, std::string& flags, std::string& linkFlags, - std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target, - bool useWatcomQuote) + std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target) { const std::string buildType = cmSystemTools::UpperCase(config); cmComputeLinkInformation* pcli = target->GetLinkInformation(config); @@ -1208,8 +1207,7 @@ void cmLocalGenerator::GetTargetFlags( } if (pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false, - useWatcomQuote); + frameworkPath, linkPath, false); } } break; case cmState::EXECUTABLE: { @@ -1231,8 +1229,7 @@ void cmLocalGenerator::GetTargetFlags( this->AddLanguageFlags(flags, linkLanguage, buildType); if (pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false, - useWatcomQuote); + frameworkPath, linkPath, false); } if (cmSystemTools::IsOn( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { @@ -1400,10 +1397,8 @@ std::string cmLocalGenerator::GetTargetFortranFlags( void cmLocalGenerator::OutputLinkLibraries( cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, - std::string& linkPath, bool forResponseFile, bool useWatcomQuote) + std::string& linkPath, bool forResponseFile) { - OutputFormat shellFormat = - (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); cmComputeLinkInformation& cli = *pcli; std::string linkLanguage = cli.GetLinkLanguage(); @@ -1428,16 +1423,8 @@ void cmLocalGenerator::OutputLinkLibraries( fwSearchFlagVar += "_FRAMEWORK_SEARCH_FLAG"; std::string fwSearchFlag = this->Makefile->GetSafeDefinition(fwSearchFlagVar); - if (!fwSearchFlag.empty()) { - std::vector const& fwDirs = cli.GetFrameworkPaths(); - for (std::vector::const_iterator fdi = fwDirs.begin(); - fdi != fwDirs.end(); ++fdi) { - frameworkPath += fwSearchFlag; - frameworkPath += this->ConvertToOutputFormat(*fdi, shellFormat); - frameworkPath += " "; - } - } + frameworkPath = linkLineComputer->ComputeFrameworkPath(cli, fwSearchFlag); linkPath = linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator); diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 75e01cb..4729acb 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -318,7 +318,7 @@ public: const std::string& config, std::string& linkLibs, std::string& flags, std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, - cmGeneratorTarget* target, bool useWatcomQuote); + cmGeneratorTarget* target); void GetTargetDefines(cmGeneratorTarget const* target, std::string const& config, std::string const& lang, std::set& defines) const; @@ -352,7 +352,7 @@ protected: cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath, - bool forResponseFile, bool useWatcomQuote); + bool forResponseFile); // Expand rule variables in CMake of the type found in language rules void ExpandRuleVariables(std::string& string, diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index f17e012..bfc4857 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -315,7 +315,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Collect up flags to link in needed libraries. std::string linkLibs; this->CreateLinkLibs(linkLineComputer.get(), linkLibs, - useResponseFileForLibs, depends, useWatcomQuote); + useResponseFileForLibs, depends); // Construct object file lists that may be needed to expand the // rule. diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index e0934b5..4488f06 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -514,7 +514,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( linkLineComputer->SetRelink(relink); this->CreateLinkLibs(linkLineComputer.get(), linkLibs, - useResponseFileForLibs, depends, useWatcomQuote); + useResponseFileForLibs, depends); } // Construct object file lists that may be needed to expand the diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 2c0c91c..e93c31d 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1602,8 +1602,7 @@ cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( void cmMakefileTargetGenerator::CreateLinkLibs( cmLinkLineComputer* linkLineComputer, std::string& linkLibs, - bool useResponseFile, std::vector& makefile_depends, - bool useWatcomQuote) + bool useResponseFile, std::vector& makefile_depends) { std::string frameworkPath; std::string linkPath; @@ -1612,7 +1611,7 @@ void cmMakefileTargetGenerator::CreateLinkLibs( this->GeneratorTarget->GetLinkInformation(config); this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, frameworkPath, linkPath, - useResponseFile, useWatcomQuote); + useResponseFile); linkLibs = frameworkPath + linkPath + linkLibs; if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 846b310..526cbcd 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -155,8 +155,7 @@ protected: /** Create list of flags for link libraries. */ void CreateLinkLibs(cmLinkLineComputer* linkLineComputer, std::string& linkLibs, bool useResponseFile, - std::vector& makefile_depends, - bool useWatcomQuote); + std::vector& makefile_depends); /** Create lists of object files for linking and cleaning. */ void CreateObjectLists(bool useLinkScript, bool useArchiveRules, diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index a458bbb..ab086eb 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -475,11 +475,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->GetGlobalGenerator()->CreateLinkLineComputer( this->GetLocalGenerator(), this->GetLocalGenerator()->GetStateSnapshot().GetDirectory())); + linkLineComputer->SetUseWatcomQuote(useWatcomQuote); - localGen.GetTargetFlags(linkLineComputer.get(), this->GetConfigName(), - vars["LINK_LIBRARIES"], vars["FLAGS"], - vars["LINK_FLAGS"], frameworkPath, linkPath, - &genTarget, useWatcomQuote); + localGen.GetTargetFlags( + linkLineComputer.get(), this->GetConfigName(), vars["LINK_LIBRARIES"], + vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, linkPath, &genTarget); if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") && (gt.GetType() == cmState::SHARED_LIBRARY || gt.IsExecutableWithExports())) { diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index d537cfd..e0fcb75 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -732,7 +732,7 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, cmLinkLineComputer linkLineComputer(lg, lg->GetStateSnapshot().GetDirectory()); lg->GetTargetFlags(&linkLineComputer, config, linkLibs, linkLanguageFlags, - linkFlags, frameworkPath, linkPath, target, false); + linkFlags, frameworkPath, linkPath, target); linkLibs = cmSystemTools::TrimWhitespace(linkLibs); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 50f77f4..e0f4000 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -586,7 +586,7 @@ bool cmake::FindPackage(const std::vector& args) cmLinkLineComputer linkLineComputer(lg, lg->GetStateSnapshot().GetDirectory()); lg->GetTargetFlags(&linkLineComputer, buildType, linkLibs, flags, - linkFlags, frameworkPath, linkPath, gtgt, false); + linkFlags, frameworkPath, linkPath, gtgt); linkLibs = frameworkPath + linkPath + linkLibs; printf("%s\n", linkLibs.c_str()); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3444105f9fe4fcee390c8d616e1a211a078a630b commit 3444105f9fe4fcee390c8d616e1a211a078a630b Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:38 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:59 2016 +0200 cmLocalGenerator: Inline last use of local variable diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 63c8aef..d41399a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1404,8 +1404,6 @@ void cmLocalGenerator::OutputLinkLibraries( { OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); - bool escapeAllowMakeVars = !forResponseFile; - cmComputeLinkInformation& cli = *pcli; std::string linkLanguage = cli.GetLinkLanguage(); @@ -1457,7 +1455,7 @@ void cmLocalGenerator::OutputLinkLibraries( std::string rpath_link = cli.GetRPathLinkString(); if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) { fout << cli.GetRPathLinkFlag(); - fout << this->EscapeForShell(rpath_link, escapeAllowMakeVars); + fout << this->EscapeForShell(rpath_link, !forResponseFile); fout << " "; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=77c4202edc242c96087295585a85a20700bdb26f commit 77c4202edc242c96087295585a85a20700bdb26f Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:38 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:59 2016 +0200 cmLinkLineComputer: Move RPath computation from cmLocalGenerator Add state for Relink and populate it at the point of cmLinkLineComputer initialization. This allows removal of the parameter in go-between methods. diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index a5e8b72..3675887 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -12,6 +12,7 @@ cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, , OutputConverter(outputConverter) , ForResponse(false) , UseWatcomQuote(false) + , Relink(false) { } @@ -29,6 +30,11 @@ void cmLinkLineComputer::SetForResponse(bool forResponse) this->ForResponse = forResponse; } +void cmLinkLineComputer::SetRelink(bool relink) +{ + this->Relink = relink; +} + std::string cmLinkLineComputer::ConvertToLinkReference( std::string const& lib) const { @@ -100,3 +106,33 @@ std::string cmLinkLineComputer::ComputeLinkPath( } return linkPath; } + +std::string cmLinkLineComputer::ComputeRPath(cmComputeLinkInformation& cli) +{ + std::string rpath; + // Check what kind of rpath flags to use. + if (cli.GetRuntimeSep().empty()) { + // Each rpath entry gets its own option ("-R a -R b -R c") + std::vector runtimeDirs; + cli.GetRPath(runtimeDirs, this->Relink); + + for (std::vector::iterator ri = runtimeDirs.begin(); + ri != runtimeDirs.end(); ++ri) { + rpath += cli.GetRuntimeFlag(); + rpath += this->ConvertToOutputFormat(*ri); + rpath += " "; + } + } else { + // All rpath entries are combined ("-Wl,-rpath,a:b:c"). + std::string rpathString = cli.GetRPathString(this->Relink); + + // Store the rpath option in the stream. + if (!rpathString.empty()) { + rpath += cli.GetRuntimeFlag(); + rpath += + this->OutputConverter->EscapeForShell(rpathString, !this->ForResponse); + rpath += " "; + } + } + return rpath; +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index d38213f..d33e832 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -18,6 +18,7 @@ public: void SetUseWatcomQuote(bool useWatcomQuote); void SetForResponse(bool forResponse); + void SetRelink(bool relink); virtual std::string ConvertToLinkReference(std::string const& input) const; @@ -27,6 +28,8 @@ public: std::string const& libPathFlag, std::string const& libPathTerminator); + std::string ComputeRPath(cmComputeLinkInformation& cli); + private: std::string ConvertToOutputFormat(std::string const& input); std::string ConvertToOutputForExisting(std::string const& input); @@ -36,6 +39,7 @@ private: bool ForResponse; bool UseWatcomQuote; + bool Relink; }; #endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index ab3d3b6..63c8aef 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1208,7 +1208,7 @@ void cmLocalGenerator::GetTargetFlags( } if (pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false, false, + frameworkPath, linkPath, false, useWatcomQuote); } } break; @@ -1231,7 +1231,7 @@ void cmLocalGenerator::GetTargetFlags( this->AddLanguageFlags(flags, linkLanguage, buildType); if (pcli) { this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, false, false, + frameworkPath, linkPath, false, useWatcomQuote); } if (cmSystemTools::IsOn( @@ -1400,8 +1400,7 @@ std::string cmLocalGenerator::GetTargetFortranFlags( void cmLocalGenerator::OutputLinkLibraries( cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, - std::string& linkPath, bool relink, bool forResponseFile, - bool useWatcomQuote) + std::string& linkPath, bool forResponseFile, bool useWatcomQuote) { OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); @@ -1446,31 +1445,7 @@ void cmLocalGenerator::OutputLinkLibraries( std::string linkLibs = linkLineComputer->ComputeLinkLibs(cli); - std::string rpath; - - // Check what kind of rpath flags to use. - if (cli.GetRuntimeSep().empty()) { - // Each rpath entry gets its own option ("-R a -R b -R c") - std::vector runtimeDirs; - cli.GetRPath(runtimeDirs, relink); - - for (std::vector::iterator ri = runtimeDirs.begin(); - ri != runtimeDirs.end(); ++ri) { - rpath += cli.GetRuntimeFlag(); - rpath += this->ConvertToOutputFormat(*ri, shellFormat); - rpath += " "; - } - } else { - // All rpath entries are combined ("-Wl,-rpath,a:b:c"). - std::string rpathString = cli.GetRPathString(relink); - - // Store the rpath option in the stream. - if (!rpathString.empty()) { - rpath += cli.GetRuntimeFlag(); - rpath += this->EscapeForShell(rpathString, escapeAllowMakeVars); - rpath += " "; - } - } + std::string rpath = linkLineComputer->ComputeRPath(cli); std::ostringstream fout; fout << rpath; diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 12b2b69..75e01cb 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -352,8 +352,7 @@ protected: cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath, - bool relink, bool forResponseFile, - bool useWatcomQuote); + bool forResponseFile, bool useWatcomQuote); // Expand rule variables in CMake of the type found in language rules void ExpandRuleVariables(std::string& string, diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index eaa5061..f17e012 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -310,10 +310,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->GetStateSnapshot().GetDirectory())); linkLineComputer->SetForResponse(useResponseFileForLibs); linkLineComputer->SetUseWatcomQuote(useWatcomQuote); + linkLineComputer->SetRelink(relink); // Collect up flags to link in needed libraries. std::string linkLibs; - this->CreateLinkLibs(linkLineComputer.get(), linkLibs, relink, + this->CreateLinkLibs(linkLineComputer.get(), linkLibs, useResponseFileForLibs, depends, useWatcomQuote); // Construct object file lists that may be needed to expand the diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index ccc6d9f..e0934b5 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -511,8 +511,9 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( this->LocalGenerator->GetStateSnapshot().GetDirectory())); linkLineComputer->SetForResponse(useResponseFileForLibs); linkLineComputer->SetUseWatcomQuote(useWatcomQuote); + linkLineComputer->SetRelink(relink); - this->CreateLinkLibs(linkLineComputer.get(), linkLibs, relink, + this->CreateLinkLibs(linkLineComputer.get(), linkLibs, useResponseFileForLibs, depends, useWatcomQuote); } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index d9102a6..2c0c91c 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1601,7 +1601,7 @@ cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( } void cmMakefileTargetGenerator::CreateLinkLibs( - cmLinkLineComputer* linkLineComputer, std::string& linkLibs, bool relink, + cmLinkLineComputer* linkLineComputer, std::string& linkLibs, bool useResponseFile, std::vector& makefile_depends, bool useWatcomQuote) { @@ -1611,7 +1611,7 @@ void cmMakefileTargetGenerator::CreateLinkLibs( cmComputeLinkInformation* pcli = this->GeneratorTarget->GetLinkInformation(config); this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, - frameworkPath, linkPath, relink, + frameworkPath, linkPath, useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 0930d89..846b310 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -154,7 +154,7 @@ protected: /** Create list of flags for link libraries. */ void CreateLinkLibs(cmLinkLineComputer* linkLineComputer, - std::string& linkLibs, bool relink, bool useResponseFile, + std::string& linkLibs, bool useResponseFile, std::vector& makefile_depends, bool useWatcomQuote); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09b6cc66b09b9689ca01faee5e33ef101b46f972 commit 09b6cc66b09b9689ca01faee5e33ef101b46f972 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:38 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:58 2016 +0200 cmLinkLineComputer: Move LinkPath computation from cmLocalGenerator Add a ConvertToOutputForExisting method which can be made virtual later to satisfy different generator needs. Pass additional strings as parameters for now. They can be turned into class state later. diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index b2b56bf..a5e8b72 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -72,3 +72,31 @@ std::string cmLinkLineComputer::ConvertToOutputFormat(std::string const& input) return this->OutputConverter->ConvertToOutputFormat(input, shellFormat); } + +std::string cmLinkLineComputer::ConvertToOutputForExisting( + std::string const& input) +{ + cmOutputConverter::OutputFormat shellFormat = (this->ForResponse) + ? cmOutputConverter::RESPONSE + : ((this->UseWatcomQuote) ? cmOutputConverter::WATCOMQUOTE + : cmOutputConverter::SHELL); + + return this->OutputConverter->ConvertToOutputForExisting(input, shellFormat); +} + +std::string cmLinkLineComputer::ComputeLinkPath( + cmComputeLinkInformation& cli, std::string const& libPathFlag, + std::string const& libPathTerminator) +{ + std::string linkPath; + std::vector const& libDirs = cli.GetDirectories(); + for (std::vector::const_iterator libDir = libDirs.begin(); + libDir != libDirs.end(); ++libDir) { + std::string libpath = this->ConvertToOutputForExisting(*libDir); + linkPath += " " + libPathFlag; + linkPath += libpath; + linkPath += libPathTerminator; + linkPath += " "; + } + return linkPath; +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index 2317385..d38213f 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -23,8 +23,13 @@ public: std::string ComputeLinkLibs(cmComputeLinkInformation& cli); + std::string ComputeLinkPath(cmComputeLinkInformation& cli, + std::string const& libPathFlag, + std::string const& libPathTerminator); + private: std::string ConvertToOutputFormat(std::string const& input); + std::string ConvertToOutputForExisting(std::string const& input); cmState::Directory StateDir; cmOutputConverter* OutputConverter; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 0d2fe86..ab3d3b6 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1441,17 +1441,8 @@ void cmLocalGenerator::OutputLinkLibraries( } } - // Append the library search path flags. - std::vector const& libDirs = cli.GetDirectories(); - for (std::vector::const_iterator libDir = libDirs.begin(); - libDir != libDirs.end(); ++libDir) { - std::string libpath = - this->ConvertToOutputForExisting(*libDir, shellFormat); - linkPath += " " + libPathFlag; - linkPath += libpath; - linkPath += libPathTerminator; - linkPath += " "; - } + linkPath = + linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator); std::string linkLibs = linkLineComputer->ComputeLinkLibs(cli); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c978063259fb013856b617d680cebcdee51ab1a commit 0c978063259fb013856b617d680cebcdee51ab1a Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:38 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:58 2016 +0200 cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGenerator Add a cmOutputConverter to the cmLinkLineComputer and factory methods to facilitate shell escapes. Add state to the cmLinkLineComputer to record whether outputting for response files or for watcom, to satisfy the cmOutputConverter API. These are constant for the lifetime of the cmLinkLineComputer, even when its functionality is extended in the future. This also keeps the signatures of cmLinkLineComputer relatively simple. Pass the cmComputeLinkInformation as a method parameter so that cmLinkLineComputer is free from target-specific state. An instance should be usable for all targets in a directory. diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 959bfc1..04c45e5 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -365,6 +365,7 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries( this->Makefile->IsOn(createRule + "_USE_WATCOM_QUOTE"); CM_AUTO_PTR linkLineComputer( this->GetGlobalGenerator()->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); this->LocalGenerator->GetTargetFlags( diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 2266e44..1aa6af1 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1415,15 +1415,15 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() } cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer( - cmState::Directory stateDir) const + cmOutputConverter* outputConverter, cmState::Directory stateDir) const { - return new cmLinkLineComputer(stateDir); + return new cmLinkLineComputer(outputConverter, stateDir); } cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer( - cmState::Directory stateDir) const + cmOutputConverter* outputConverter, cmState::Directory stateDir) const { - return new cmMSVC60LinkLineComputer(stateDir); + return new cmMSVC60LinkLineComputer(outputConverter, stateDir); } void cmGlobalGenerator::FinalizeTargetCompileInfo() diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 126eb6f..38eaa76 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -36,6 +36,7 @@ class cmGeneratorTarget; class cmLocalGenerator; class cmLinkLineComputer; class cmMakefile; +class cmOutputConverter; class cmake; /** \class cmGlobalGenerator @@ -107,10 +108,10 @@ public: virtual void Generate(); virtual cmLinkLineComputer* CreateLinkLineComputer( - cmState::Directory stateDir) const; + cmOutputConverter* outputConverter, cmState::Directory stateDir) const; cmLinkLineComputer* CreateMSVC60LinkLineComputer( - cmState::Directory stateDir) const; + cmOutputConverter* outputConverter, cmState::Directory stateDir) const; /** * Set/Get and Clear the enabled languages. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 65a1f25..67df038 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -66,9 +66,10 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os, } cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer( - cmState::Directory /* stateDir */) const + cmOutputConverter* outputConverter, cmState::Directory /* stateDir */) const { return new cmNinjaLinkLineComputer( + outputConverter, this->LocalGenerators[0]->GetStateSnapshot().GetDirectory(), this); } diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 87faf45..6b77a2b 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -70,8 +70,9 @@ public: std::string EncodePath(const std::string& path); static std::string EncodeDepfileSpace(const std::string& path); - cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir) const - CM_OVERRIDE; + cmLinkLineComputer* CreateLinkLineComputer( + cmOutputConverter* outputConverter, + cmState::Directory stateDir) const CM_OVERRIDE; /** * Write the given @a comment to the output stream @a os. It diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 7103a5b..b2b56bf 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -2,10 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLinkLineComputer.h" +#include "cmComputeLinkInformation.h" +#include "cmGeneratorTarget.h" #include "cmOutputConverter.h" -cmLinkLineComputer::cmLinkLineComputer(cmState::Directory stateDir) +cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, + cmState::Directory stateDir) : StateDir(stateDir) + , OutputConverter(outputConverter) + , ForResponse(false) + , UseWatcomQuote(false) { } @@ -13,6 +19,16 @@ cmLinkLineComputer::~cmLinkLineComputer() { } +void cmLinkLineComputer::SetUseWatcomQuote(bool useWatcomQuote) +{ + this->UseWatcomQuote = useWatcomQuote; +} + +void cmLinkLineComputer::SetForResponse(bool forResponse) +{ + this->ForResponse = forResponse; +} + std::string cmLinkLineComputer::ConvertToLinkReference( std::string const& lib) const { @@ -25,3 +41,34 @@ std::string cmLinkLineComputer::ConvertToLinkReference( } return relLib; } + +std::string cmLinkLineComputer::ComputeLinkLibs(cmComputeLinkInformation& cli) +{ + std::string linkLibs; + typedef cmComputeLinkInformation::ItemVector ItemVector; + ItemVector const& items = cli.GetItems(); + for (ItemVector::const_iterator li = items.begin(); li != items.end(); + ++li) { + if (li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY) { + continue; + } + if (li->IsPath) { + linkLibs += + this->ConvertToOutputFormat(this->ConvertToLinkReference(li->Value)); + } else { + linkLibs += li->Value; + } + linkLibs += " "; + } + return linkLibs; +} + +std::string cmLinkLineComputer::ConvertToOutputFormat(std::string const& input) +{ + cmOutputConverter::OutputFormat shellFormat = (this->ForResponse) + ? cmOutputConverter::RESPONSE + : ((this->UseWatcomQuote) ? cmOutputConverter::WATCOMQUOTE + : cmOutputConverter::SHELL); + + return this->OutputConverter->ConvertToOutputFormat(input, shellFormat); +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index bd4c740..2317385 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -6,16 +6,31 @@ #include "cmState.h" +class cmComputeLinkInformation; +class cmOutputConverter; + class cmLinkLineComputer { public: - cmLinkLineComputer(cmState::Directory stateDir); + cmLinkLineComputer(cmOutputConverter* outputConverter, + cmState::Directory stateDir); virtual ~cmLinkLineComputer(); + void SetUseWatcomQuote(bool useWatcomQuote); + void SetForResponse(bool forResponse); + virtual std::string ConvertToLinkReference(std::string const& input) const; + std::string ComputeLinkLibs(cmComputeLinkInformation& cli); + private: + std::string ConvertToOutputFormat(std::string const& input); + cmState::Directory StateDir; + cmOutputConverter* OutputConverter; + + bool ForResponse; + bool UseWatcomQuote; }; #endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 25755d7..0d2fe86 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1453,24 +1453,7 @@ void cmLocalGenerator::OutputLinkLibraries( linkPath += " "; } - std::string linkLibs; - - // Append the link items. - typedef cmComputeLinkInformation::ItemVector ItemVector; - ItemVector const& items = cli.GetItems(); - for (ItemVector::const_iterator li = items.begin(); li != items.end(); - ++li) { - if (li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY) { - continue; - } - if (li->IsPath) { - linkLibs += this->ConvertToOutputFormat( - linkLineComputer->ConvertToLinkReference(li->Value), shellFormat); - } else { - linkLibs += li->Value; - } - linkLibs += " "; - } + std::string linkLibs = linkLineComputer->ComputeLinkLibs(cli); std::string rpath; diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx index 89432ff..2b6df2a 100644 --- a/Source/cmMSVC60LinkLineComputer.cxx +++ b/Source/cmMSVC60LinkLineComputer.cxx @@ -5,8 +5,9 @@ #include "cmSystemTools.h" -cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer(cmState::Directory stateDir) - : cmLinkLineComputer(stateDir) +cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer( + cmOutputConverter* outputConverter, cmState::Directory stateDir) + : cmLinkLineComputer(outputConverter, stateDir) { } diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h index c159b61..ca9da31 100644 --- a/Source/cmMSVC60LinkLineComputer.h +++ b/Source/cmMSVC60LinkLineComputer.h @@ -9,7 +9,8 @@ class cmMSVC60LinkLineComputer : public cmLinkLineComputer { public: - cmMSVC60LinkLineComputer(cmState::Directory stateDir); + cmMSVC60LinkLineComputer(cmOutputConverter* outputConverter, + cmState::Directory stateDir); std::string ConvertToLinkReference(std::string const& input) const CM_OVERRIDE; diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 09967ff..eaa5061 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -219,6 +219,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) { CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); this->AddModuleDefinitionFlag(linkLineComputer.get(), linkFlags); @@ -305,7 +306,10 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); + linkLineComputer->SetForResponse(useResponseFileForLibs); + linkLineComputer->SetUseWatcomQuote(useWatcomQuote); // Collect up flags to link in needed libraries. std::string linkLibs; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index e32f3a7..ccc6d9f 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -163,6 +163,7 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); @@ -193,6 +194,7 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); @@ -505,7 +507,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( + this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory())); + linkLineComputer->SetForResponse(useResponseFileForLibs); + linkLineComputer->SetUseWatcomQuote(useWatcomQuote); this->CreateLinkLibs(linkLineComputer.get(), linkLibs, relink, useResponseFileForLibs, depends, useWatcomQuote); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index c74b381..d9102a6 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1590,12 +1590,14 @@ std::string cmMakefileTargetGenerator::CreateResponseFile( } cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( - cmState::Directory stateDir) + cmOutputConverter* outputConverter, cmState::Directory stateDir) { if (this->Makefile->IsOn("MSVC60")) { - return this->GlobalGenerator->CreateMSVC60LinkLineComputer(stateDir); + return this->GlobalGenerator->CreateMSVC60LinkLineComputer(outputConverter, + stateDir); } - return this->GlobalGenerator->CreateLinkLineComputer(stateDir); + return this->GlobalGenerator->CreateLinkLineComputer(outputConverter, + stateDir); } void cmMakefileTargetGenerator::CreateLinkLibs( diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 05de7ff..0930d89 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -140,7 +140,8 @@ protected: std::vector& makefile_commands, std::vector& makefile_depends); - cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir); + cmLinkLineComputer* CreateLinkLineComputer( + cmOutputConverter* outputConverter, cmState::Directory stateDir); /** Create a response file with the given set of options. Returns the relative path from the target build working directory to the diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx index dd74238..3dcb20b 100644 --- a/Source/cmNinjaLinkLineComputer.cxx +++ b/Source/cmNinjaLinkLineComputer.cxx @@ -5,8 +5,9 @@ #include "cmGlobalNinjaGenerator.h" cmNinjaLinkLineComputer::cmNinjaLinkLineComputer( - cmState::Directory stateDir, cmGlobalNinjaGenerator const* gg) - : cmLinkLineComputer(stateDir) + cmOutputConverter* outputConverter, cmState::Directory stateDir, + cmGlobalNinjaGenerator const* gg) + : cmLinkLineComputer(outputConverter, stateDir) , GG(gg) { } diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h index d86f214..a108568 100644 --- a/Source/cmNinjaLinkLineComputer.h +++ b/Source/cmNinjaLinkLineComputer.h @@ -12,7 +12,8 @@ class cmGlobalNinjaGenerator; class cmNinjaLinkLineComputer : public cmLinkLineComputer { public: - cmNinjaLinkLineComputer(cmState::Directory stateDir, + cmNinjaLinkLineComputer(cmOutputConverter* outputConverter, + cmState::Directory stateDir, cmGlobalNinjaGenerator const* gg); std::string ConvertToLinkReference(std::string const& input) const diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 9c22353..a458bbb 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -473,7 +473,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() CM_AUTO_PTR linkLineComputer( this->GetGlobalGenerator()->CreateLinkLineComputer( - localGen.GetStateSnapshot().GetDirectory())); + this->GetLocalGenerator(), + this->GetLocalGenerator()->GetStateSnapshot().GetDirectory())); localGen.GetTargetFlags(linkLineComputer.get(), this->GetConfigName(), vars["LINK_LIBRARIES"], vars["FLAGS"], diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a58510e..d537cfd 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -729,12 +729,10 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, std::string linkLanguageFlags; std::string frameworkPath; std::string linkPath; - CM_AUTO_PTR linkLineComputer( - lg->GetGlobalGenerator()->CreateLinkLineComputer( - lg->GetStateSnapshot().GetDirectory())); - lg->GetTargetFlags(linkLineComputer.get(), config, linkLibs, - linkLanguageFlags, linkFlags, frameworkPath, linkPath, - target, false); + cmLinkLineComputer linkLineComputer(lg, + lg->GetStateSnapshot().GetDirectory()); + lg->GetTargetFlags(&linkLineComputer, config, linkLibs, linkLanguageFlags, + linkFlags, frameworkPath, linkPath, target, false); linkLibs = cmSystemTools::TrimWhitespace(linkLibs); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 046b5f1..50f77f4 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -583,9 +583,9 @@ bool cmake::FindPackage(const std::vector& args) gg->CreateGenerationObjects(); cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName()); cmLocalGenerator* lg = gtgt->GetLocalGenerator(); - CM_AUTO_PTR linkLineComputer( - gg->CreateLinkLineComputer(lg->GetStateSnapshot().GetDirectory())); - lg->GetTargetFlags(linkLineComputer.get(), buildType, linkLibs, flags, + cmLinkLineComputer linkLineComputer(lg, + lg->GetStateSnapshot().GetDirectory()); + lg->GetTargetFlags(&linkLineComputer, buildType, linkLibs, flags, linkFlags, frameworkPath, linkPath, gtgt, false); linkLibs = frameworkPath + linkPath + linkLibs; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0152a01f11fc46f645fd765cc7b1be76cc07b52a commit 0152a01f11fc46f645fd765cc7b1be76cc07b52a Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:37 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:57 2016 +0200 cmLocalGenerator: Move variable to where it is used diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 3b3eea3..25755d7 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1411,8 +1411,6 @@ void cmLocalGenerator::OutputLinkLibraries( std::string linkLanguage = cli.GetLinkLanguage(); - std::string linkLibs; - std::string libPathFlag = this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG"); std::string libPathTerminator = @@ -1455,6 +1453,8 @@ void cmLocalGenerator::OutputLinkLibraries( linkPath += " "; } + std::string linkLibs; + // Append the link items. typedef cmComputeLinkInformation::ItemVector ItemVector; ItemVector const& items = cli.GetItems(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=011e6870e4a7f19476c162a8c011fd018d9a7e9c commit 011e6870e4a7f19476c162a8c011fd018d9a7e9c Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:37 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:56 2016 +0200 cmLocalGenerator: Use a std::string instead of char* diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 565c0cd..3b3eea3 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1431,8 +1431,9 @@ void cmLocalGenerator::OutputLinkLibraries( std::string fwSearchFlagVar = "CMAKE_"; fwSearchFlagVar += linkLanguage; fwSearchFlagVar += "_FRAMEWORK_SEARCH_FLAG"; - const char* fwSearchFlag = this->Makefile->GetDefinition(fwSearchFlagVar); - if (fwSearchFlag && *fwSearchFlag) { + std::string fwSearchFlag = + this->Makefile->GetSafeDefinition(fwSearchFlagVar); + if (!fwSearchFlag.empty()) { std::vector const& fwDirs = cli.GetFrameworkPaths(); for (std::vector::const_iterator fdi = fwDirs.begin(); fdi != fwDirs.end(); ++fdi) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbca80f3516d7e5b2def6105a1b26b44bad7b6fe commit cbca80f3516d7e5b2def6105a1b26b44bad7b6fe Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:37 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:56 2016 +0200 cmLocalGenerator: Move stringstream to where it is used diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index aec658a..565c0cd 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1406,7 +1406,6 @@ void cmLocalGenerator::OutputLinkLibraries( OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); bool escapeAllowMakeVars = !forResponseFile; - std::ostringstream fout; cmComputeLinkInformation& cli = *pcli; @@ -1498,6 +1497,7 @@ void cmLocalGenerator::OutputLinkLibraries( } } + std::ostringstream fout; fout << rpath; // Write the library flags to the build rule. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d48f69d0f5f265d1c091a614098cae3ff4325fbe commit d48f69d0f5f265d1c091a614098cae3ff4325fbe Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:37 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:55 2016 +0200 cmLocalGenerator: Move flag determination up in the function This content is independent of any targets. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9e32fd3..aec658a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1419,6 +1419,15 @@ void cmLocalGenerator::OutputLinkLibraries( std::string libPathTerminator = this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR"); + // Add standard libraries for this language. + std::string standardLibsVar = "CMAKE_"; + standardLibsVar += cli.GetLinkLanguage(); + standardLibsVar += "_STANDARD_LIBRARIES"; + std::string stdLibString; + if (const char* stdLibs = this->Makefile->GetDefinition(standardLibsVar)) { + stdLibString = stdLibs; + } + // Append the framework search path flags. std::string fwSearchFlagVar = "CMAKE_"; fwSearchFlagVar += linkLanguage; @@ -1502,14 +1511,6 @@ void cmLocalGenerator::OutputLinkLibraries( fout << " "; } - // Add standard libraries for this language. - std::string standardLibsVar = "CMAKE_"; - standardLibsVar += cli.GetLinkLanguage(); - standardLibsVar += "_STANDARD_LIBRARIES"; - std::string stdLibString; - if (const char* stdLibs = this->Makefile->GetDefinition(standardLibsVar)) { - stdLibString = stdLibs; - } if (!stdLibString.empty()) { fout << stdLibString << " "; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff8e321c6ade784b3f1b3b19a7783788872e44a9 commit ff8e321c6ade784b3f1b3b19a7783788872e44a9 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:37 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:55 2016 +0200 cmLocalGenerator: Separate stdlib content from library stream diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6de8f9a..9e32fd3 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1506,8 +1506,12 @@ void cmLocalGenerator::OutputLinkLibraries( std::string standardLibsVar = "CMAKE_"; standardLibsVar += cli.GetLinkLanguage(); standardLibsVar += "_STANDARD_LIBRARIES"; + std::string stdLibString; if (const char* stdLibs = this->Makefile->GetDefinition(standardLibsVar)) { - fout << stdLibs << " "; + stdLibString = stdLibs; + } + if (!stdLibString.empty()) { + fout << stdLibString << " "; } linkLibraries = fout.str(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80f57e67eefc905a726f2f35bd1672a188ea4c99 commit 80f57e67eefc905a726f2f35bd1672a188ea4c99 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:36 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:55 2016 +0200 cmLocalGenerator: Separate rpath content from library stream diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index ae4a0b2..6de8f9a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1463,32 +1463,34 @@ void cmLocalGenerator::OutputLinkLibraries( linkLibs += " "; } + std::string rpath; + // Check what kind of rpath flags to use. if (cli.GetRuntimeSep().empty()) { // Each rpath entry gets its own option ("-R a -R b -R c") std::vector runtimeDirs; cli.GetRPath(runtimeDirs, relink); - std::string rpath; for (std::vector::iterator ri = runtimeDirs.begin(); ri != runtimeDirs.end(); ++ri) { rpath += cli.GetRuntimeFlag(); rpath += this->ConvertToOutputFormat(*ri, shellFormat); rpath += " "; } - fout << rpath; } else { // All rpath entries are combined ("-Wl,-rpath,a:b:c"). - std::string rpath = cli.GetRPathString(relink); + std::string rpathString = cli.GetRPathString(relink); // Store the rpath option in the stream. - if (!rpath.empty()) { - fout << cli.GetRuntimeFlag(); - fout << this->EscapeForShell(rpath, escapeAllowMakeVars); - fout << " "; + if (!rpathString.empty()) { + rpath += cli.GetRuntimeFlag(); + rpath += this->EscapeForShell(rpathString, escapeAllowMakeVars); + rpath += " "; } } + fout << rpath; + // Write the library flags to the build rule. fout << linkLibs; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ef834682547df5e0ccdcd503558dcbf1206a638 commit 7ef834682547df5e0ccdcd503558dcbf1206a638 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:36 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:54 2016 +0200 cmLocalGenerator: Pass link library info to OutputLinkLibraries Remove the cmGeneratorTarget from the interface. This is simplification of the OutputLinkLibraries responsibilities so that it can be broken apart into multiple methods. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index c152a8b..ae4a0b2 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1155,6 +1155,7 @@ void cmLocalGenerator::GetTargetFlags( bool useWatcomQuote) { const std::string buildType = cmSystemTools::UpperCase(config); + cmComputeLinkInformation* pcli = target->GetLinkInformation(config); const char* libraryLinkVariable = "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library @@ -1205,9 +1206,11 @@ void cmLocalGenerator::GetTargetFlags( linkFlags += " "; } } - this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, - linkPath, *target, false, false, - useWatcomQuote); + if (pcli) { + this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, + frameworkPath, linkPath, false, false, + useWatcomQuote); + } } break; case cmState::EXECUTABLE: { linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); @@ -1226,9 +1229,11 @@ void cmLocalGenerator::GetTargetFlags( return; } this->AddLanguageFlags(flags, linkLanguage, buildType); - this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, - linkPath, *target, false, false, - useWatcomQuote); + if (pcli) { + this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, + frameworkPath, linkPath, false, false, + useWatcomQuote); + } if (cmSystemTools::IsOn( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") + @@ -1393,19 +1398,16 @@ std::string cmLocalGenerator::GetTargetFortranFlags( * to the name of the library. This will not link a library against itself. */ void cmLocalGenerator::OutputLinkLibraries( - cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, - std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget& tgt, - bool relink, bool forResponseFile, bool useWatcomQuote) + cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer, + std::string& linkLibraries, std::string& frameworkPath, + std::string& linkPath, bool relink, bool forResponseFile, + bool useWatcomQuote) { OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); bool escapeAllowMakeVars = !forResponseFile; std::ostringstream fout; - std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); - cmComputeLinkInformation* pcli = tgt.GetLinkInformation(config); - if (!pcli) { - return; - } + cmComputeLinkInformation& cli = *pcli; std::string linkLanguage = cli.GetLinkLanguage(); diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index e19cba2..12b2b69 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -19,6 +19,7 @@ #include #include +class cmComputeLinkInformation; class cmCustomCommandGenerator; class cmGeneratorTarget; class cmGlobalGenerator; @@ -347,11 +348,12 @@ public: protected: ///! put all the libraries for a target on into the given stream - void OutputLinkLibraries(cmLinkLineComputer* linkLineComputer, + void OutputLinkLibraries(cmComputeLinkInformation* pcli, + cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath, - cmGeneratorTarget&, bool relink, - bool forResponseFile, bool useWatcomQuote); + bool relink, bool forResponseFile, + bool useWatcomQuote); // Expand rule variables in CMake of the type found in language rules void ExpandRuleVariables(std::string& string, diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index d507326..c74b381 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1605,9 +1605,12 @@ void cmMakefileTargetGenerator::CreateLinkLibs( { std::string frameworkPath; std::string linkPath; - this->LocalGenerator->OutputLinkLibraries( - linkLineComputer, linkLibs, frameworkPath, linkPath, - *this->GeneratorTarget, relink, useResponseFile, useWatcomQuote); + std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); + cmComputeLinkInformation* pcli = + this->GeneratorTarget->GetLinkInformation(config); + this->LocalGenerator->OutputLinkLibraries(pcli, linkLineComputer, linkLibs, + frameworkPath, linkPath, relink, + useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69295812065a5d07c07347add2fdcf8f36f993ba commit 69295812065a5d07c07347add2fdcf8f36f993ba Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:36 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:54 2016 +0200 Makefiles: Port CreateLinkLibs to cmLinkLineComputer diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 3dc7007..09967ff 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -303,10 +303,14 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Set path conversion for link script shells. this->LocalGenerator->SetLinkScriptShell(useLinkScript); + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + // Collect up flags to link in needed libraries. std::string linkLibs; - this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends, - useWatcomQuote); + this->CreateLinkLibs(linkLineComputer.get(), linkLibs, relink, + useResponseFileForLibs, depends, useWatcomQuote); // Construct object file lists that may be needed to expand the // rule. diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b12e779..e32f3a7 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -502,8 +502,13 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Collect up flags to link in needed libraries. std::string linkLibs; if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { - this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends, - useWatcomQuote); + + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + + this->CreateLinkLibs(linkLineComputer.get(), linkLibs, relink, + useResponseFileForLibs, depends, useWatcomQuote); } // Construct object file lists that may be needed to expand the diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 7232248..d507326 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1599,18 +1599,14 @@ cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( } void cmMakefileTargetGenerator::CreateLinkLibs( - std::string& linkLibs, bool relink, bool useResponseFile, - std::vector& makefile_depends, bool useWatcomQuote) + cmLinkLineComputer* linkLineComputer, std::string& linkLibs, bool relink, + bool useResponseFile, std::vector& makefile_depends, + bool useWatcomQuote) { std::string frameworkPath; std::string linkPath; - - CM_AUTO_PTR linkLineComputer( - this->CreateLinkLineComputer( - this->LocalGenerator->GetStateSnapshot().GetDirectory())); - this->LocalGenerator->OutputLinkLibraries( - linkLineComputer.get(), linkLibs, frameworkPath, linkPath, + linkLineComputer, linkLibs, frameworkPath, linkPath, *this->GeneratorTarget, relink, useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 733a2f8..05de7ff 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -20,6 +20,7 @@ class cmGeneratedFileStream; class cmGeneratorTarget; class cmGlobalUnixMakefileGenerator3; class cmSourceFile; +class cmLinkLineComputer; /** \class cmMakefileTargetGenerator * \brief Support Routines for writing makefiles @@ -151,7 +152,8 @@ protected: bool CheckUseResponseFileForLibraries(std::string const& l) const; /** Create list of flags for link libraries. */ - void CreateLinkLibs(std::string& linkLibs, bool relink, bool useResponseFile, + void CreateLinkLibs(cmLinkLineComputer* linkLineComputer, + std::string& linkLibs, bool relink, bool useResponseFile, std::vector& makefile_depends, bool useWatcomQuote); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b361fdda0f2808f0368b746a880981ebda0ade0 commit 5b361fdda0f2808f0368b746a880981ebda0ade0 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:36 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:53 2016 +0200 cmLinkLineComputer: Extract from cmLocalGenerator CMake has several classes which have too many responsibilities. cmLocalGenerator is one of them. Start to extract the link line computation. Create generator-specific implementations of the interface to account for generator-specific behavior. Unfortunately MSVC60 has different behavior to everything else and CMake still generates makefiles for it. Isolate it with MSVC60-specific names. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index e574957..048667a 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -300,6 +300,8 @@ set(SRCS cmInstallDirectoryGenerator.cxx cmLinkedTree.h cmLinkItem.h + cmLinkLineComputer.cxx + cmLinkLineComputer.h cmListFileCache.cxx cmListFileCache.h cmListFileLexer.c @@ -318,6 +320,8 @@ set(SRCS cmMakefileUtilityTargetGenerator.cxx cmMessenger.cxx cmMessenger.h + cmMSVC60LinkLineComputer.cxx + cmMSVC60LinkLineComputer.h cmOSXBundleGenerator.cxx cmOSXBundleGenerator.h cmOutputConverter.cxx @@ -545,6 +549,8 @@ set(SRCS ${SRCS} cmNinjaNormalTargetGenerator.h cmNinjaUtilityTargetGenerator.cxx cmNinjaUtilityTargetGenerator.h + cmNinjaLinkLineComputer.cxx + cmNinjaLinkLineComputer.h ) # Temporary variable for tools targets diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 14ea1a9..b995fa1 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" #include "cmGlobalCommonGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalCommonGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -59,7 +60,8 @@ void cmCommonTargetGenerator::AddFeatureFlags(std::string& flags, } } -void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags) +void cmCommonTargetGenerator::AddModuleDefinitionFlag( + cmLinkLineComputer* linkLineComputer, std::string& flags) { if (!this->ModuleDefinitionFile) { return; @@ -76,7 +78,7 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag(std::string& flags) // vs6's "cl -link" pass it to the linker. std::string flag = defFileFlag; flag += this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToLinkReference( + linkLineComputer->ConvertToLinkReference( this->ModuleDefinitionFile->GetFullPath()), cmOutputConverter::SHELL); this->LocalGenerator->AppendFlags(flags, flag); diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index 707b81e..fe27038 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -16,6 +16,7 @@ class cmGlobalCommonGenerator; class cmLocalCommonGenerator; class cmMakefile; class cmSourceFile; +class cmLinkLineComputer; /** \class cmCommonTargetGenerator * \brief Common infrastructure for Makefile and Ninja per-target generators @@ -37,7 +38,8 @@ protected: bool GetFeatureAsBool(const std::string& feature); // Helper to add flag for windows .def file. - void AddModuleDefinitionFlag(std::string& flags); + void AddModuleDefinitionFlag(cmLinkLineComputer* linkLineComputer, + std::string& flags); cmGeneratorTarget* GeneratorTarget; cmMakefile* Makefile; diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index fac68f5..959bfc1 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -5,6 +5,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalGhsMultiGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" @@ -362,9 +363,13 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries( this->GeneratorTarget->GetCreateRuleVariable(language, config); bool useWatcomQuote = this->Makefile->IsOn(createRule + "_USE_WATCOM_QUOTE"); + CM_AUTO_PTR linkLineComputer( + this->GetGlobalGenerator()->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + this->LocalGenerator->GetTargetFlags( - config, linkLibraries, flags, linkFlags, frameworkPath, linkPath, - this->GeneratorTarget, useWatcomQuote); + linkLineComputer.get(), config, linkLibraries, flags, linkFlags, + frameworkPath, linkPath, this->GeneratorTarget, useWatcomQuote); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); if (!linkPath.empty()) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 7132ade..2266e44 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -20,7 +20,9 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmInstallGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" +#include "cmMSVC60LinkLineComputer.h" #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmPolicies.h" @@ -1412,6 +1414,18 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() return autogenTargets; } +cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer( + cmState::Directory stateDir) const +{ + return new cmLinkLineComputer(stateDir); +} + +cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer( + cmState::Directory stateDir) const +{ + return new cmMSVC60LinkLineComputer(stateDir); +} + void cmGlobalGenerator::FinalizeTargetCompileInfo() { std::vector const langs = diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 74b4547..126eb6f 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -34,6 +34,7 @@ class cmExportBuildFileGenerator; class cmExternalMakefileProjectGenerator; class cmGeneratorTarget; class cmLocalGenerator; +class cmLinkLineComputer; class cmMakefile; class cmake; @@ -105,6 +106,12 @@ public: */ virtual void Generate(); + virtual cmLinkLineComputer* CreateLinkLineComputer( + cmState::Directory stateDir) const; + + cmLinkLineComputer* CreateMSVC60LinkLineComputer( + cmState::Directory stateDir) const; + /** * Set/Get and Clear the enabled languages. */ diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index adb5a95..65a1f25 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -11,6 +11,7 @@ #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" +#include "cmNinjaLinkLineComputer.h" #include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" @@ -64,6 +65,13 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os, os << "# " << comment.substr(lpos) << "\n\n"; } +cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer( + cmState::Directory /* stateDir */) const +{ + return new cmNinjaLinkLineComputer( + this->LocalGenerators[0]->GetStateSnapshot().GetDirectory(), this); +} + std::string cmGlobalNinjaGenerator::EncodeRuleName(std::string const& name) { // Ninja rule names must match "[a-zA-Z0-9_.-]+". Use ".xx" to encode diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 5064b21..87faf45 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -70,6 +70,9 @@ public: std::string EncodePath(const std::string& path); static std::string EncodeDepfileSpace(const std::string& path); + cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir) const + CM_OVERRIDE; + /** * Write the given @a comment to the output stream @a os. It * handles new line character properly. diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx new file mode 100644 index 0000000..7103a5b --- /dev/null +++ b/Source/cmLinkLineComputer.cxx @@ -0,0 +1,27 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmLinkLineComputer.h" +#include "cmOutputConverter.h" + +cmLinkLineComputer::cmLinkLineComputer(cmState::Directory stateDir) + : StateDir(stateDir) +{ +} + +cmLinkLineComputer::~cmLinkLineComputer() +{ +} + +std::string cmLinkLineComputer::ConvertToLinkReference( + std::string const& lib) const +{ + std::string relLib = lib; + + if (cmOutputConverter::ContainedInDirectory( + this->StateDir.GetCurrentBinary(), lib, this->StateDir)) { + relLib = cmOutputConverter::ForceToRelativePath( + this->StateDir.GetCurrentBinary(), lib); + } + return relLib; +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h new file mode 100644 index 0000000..bd4c740 --- /dev/null +++ b/Source/cmLinkLineComputer.h @@ -0,0 +1,21 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmLinkLineComputer_h +#define cmLinkLineComputer_h + +#include "cmState.h" + +class cmLinkLineComputer +{ +public: + cmLinkLineComputer(cmState::Directory stateDir); + virtual ~cmLinkLineComputer(); + + virtual std::string ConvertToLinkReference(std::string const& input) const; + +private: + cmState::Directory StateDir; +}; + +#endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f1b7c6a..c152a8b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -12,6 +12,7 @@ #include "cmInstallGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" +#include "cmLinkLineComputer.h" #include "cmMakefile.h" #include "cmSourceFile.h" #include "cmSystemTools.h" @@ -1148,9 +1149,10 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags, } void cmLocalGenerator::GetTargetFlags( - const std::string& config, std::string& linkLibs, std::string& flags, - std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, - cmGeneratorTarget* target, bool useWatcomQuote) + cmLinkLineComputer* linkLineComputer, const std::string& config, + std::string& linkLibs, std::string& flags, std::string& linkFlags, + std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target, + bool useWatcomQuote) { const std::string buildType = cmSystemTools::UpperCase(config); const char* libraryLinkVariable = @@ -1203,8 +1205,9 @@ void cmLocalGenerator::GetTargetFlags( linkFlags += " "; } } - this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target, - false, false, useWatcomQuote); + this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, + linkPath, *target, false, false, + useWatcomQuote); } break; case cmState::EXECUTABLE: { linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); @@ -1223,8 +1226,9 @@ void cmLocalGenerator::GetTargetFlags( return; } this->AddLanguageFlags(flags, linkLanguage, buildType); - this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target, - false, false, useWatcomQuote); + this->OutputLinkLibraries(linkLineComputer, linkLibs, frameworkPath, + linkPath, *target, false, false, + useWatcomQuote); if (cmSystemTools::IsOn( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") + @@ -1383,51 +1387,15 @@ std::string cmLocalGenerator::GetTargetFortranFlags( return std::string(); } -std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) -{ -#if defined(_WIN32) && !defined(__CYGWIN__) - // Work-ardound command line parsing limitations in MSVC 6.0 - if (this->Makefile->IsOn("MSVC60")) { - // Search for the last space. - std::string::size_type pos = lib.rfind(' '); - if (pos != lib.npos) { - // Find the slash after the last space, if any. - pos = lib.find('/', pos); - - // Convert the portion of the path with a space to a short path. - std::string sp; - if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) { - // Append the rest of the path with no space. - sp += lib.substr(pos); - - return sp; - } - } - } -#endif - - // Normal behavior. - std::string relLib = lib; - cmState::Directory stateDir = this->GetStateSnapshot().GetDirectory(); - if (cmOutputConverter::ContainedInDirectory( - stateDir.GetCurrentBinary(), lib, stateDir)) { - relLib = cmOutputConverter::ForceToRelativePath( - stateDir.GetCurrentBinary(), lib); - } - return relLib; -} - /** * Output the linking rules on a command line. For executables, * targetLibrary should be a NULL pointer. For libraries, it should point * to the name of the library. This will not link a library against itself. */ -void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, - std::string& frameworkPath, - std::string& linkPath, - cmGeneratorTarget& tgt, bool relink, - bool forResponseFile, - bool useWatcomQuote) +void cmLocalGenerator::OutputLinkLibraries( + cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, + std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget& tgt, + bool relink, bool forResponseFile, bool useWatcomQuote) { OutputFormat shellFormat = (forResponseFile) ? RESPONSE : ((useWatcomQuote) ? WATCOMQUOTE : SHELL); @@ -1486,7 +1454,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, } if (li->IsPath) { linkLibs += this->ConvertToOutputFormat( - this->ConvertToLinkReference(li->Value), shellFormat); + linkLineComputer->ConvertToLinkReference(li->Value), shellFormat); } else { linkLibs += li->Value; } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index e16ddab..e19cba2 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -24,6 +24,7 @@ class cmGeneratorTarget; class cmGlobalGenerator; class cmMakefile; class cmSourceFile; +class cmLinkLineComputer; /** \class cmLocalGenerator * \brief Create required build files for a directory. @@ -312,7 +313,8 @@ public: /** Fill out these strings for the given target. Libraries to link, * flags, and linkflags. */ - void GetTargetFlags(const std::string& config, std::string& linkLibs, + void GetTargetFlags(cmLinkLineComputer* linkLineComputer, + const std::string& config, std::string& linkLibs, std::string& flags, std::string& linkFlags, std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target, bool useWatcomQuote); @@ -345,7 +347,8 @@ public: protected: ///! put all the libraries for a target on into the given stream - void OutputLinkLibraries(std::string& linkLibraries, + void OutputLinkLibraries(cmLinkLineComputer* linkLineComputer, + std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget&, bool relink, bool forResponseFile, bool useWatcomQuote); @@ -370,8 +373,6 @@ protected: std::string& CreateSafeUniqueObjectFileName(const std::string& sin, std::string const& dir_max); - virtual std::string ConvertToLinkReference(std::string const& lib); - /** Check whether the native build system supports the given definition. Issues a warning. */ virtual bool CheckDefinition(std::string const& define) const; diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index b04c11d..e25eb0f 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -120,12 +120,6 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() // Virtual protected methods. -std::string cmLocalNinjaGenerator::ConvertToLinkReference( - std::string const& lib) -{ - return this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib); -} - std::string cmLocalNinjaGenerator::ConvertToIncludeReference( std::string const& path, cmOutputConverter::OutputFormat format, bool forceFullPaths) diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 3061b57..b04788d 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -76,8 +76,6 @@ public: void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg, cmNinjaDeps& ninjaDeps); - std::string ConvertToLinkReference(std::string const& lib) CM_OVERRIDE; - void ComputeObjectFilenames( std::map& mapping, cmGeneratorTarget const* gt = CM_NULLPTR) CM_OVERRIDE; diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx new file mode 100644 index 0000000..89432ff --- /dev/null +++ b/Source/cmMSVC60LinkLineComputer.cxx @@ -0,0 +1,35 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmMSVC60LinkLineComputer.h" + +#include "cmSystemTools.h" + +cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer(cmState::Directory stateDir) + : cmLinkLineComputer(stateDir) +{ +} + +std::string cmMSVC60LinkLineComputer::ConvertToLinkReference( + std::string const& lib) const +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + // Work-ardound command line parsing limitations in MSVC 6.0 + // Search for the last space. + std::string::size_type pos = lib.rfind(' '); + if (pos != lib.npos) { + // Find the slash after the last space, if any. + pos = lib.find('/', pos); + + // Convert the portion of the path with a space to a short path. + std::string sp; + if (cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) { + // Append the rest of the path with no space. + sp += lib.substr(pos); + return sp; + } + } +#endif + + return cmLinkLineComputer::ConvertToLinkReference(lib); +} diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h new file mode 100644 index 0000000..c159b61 --- /dev/null +++ b/Source/cmMSVC60LinkLineComputer.h @@ -0,0 +1,18 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmMSVC60LinkLineComputer_h +#define cmMSVC60LinkLineComputer_h + +#include "cmLinkLineComputer.h" + +class cmMSVC60LinkLineComputer : public cmLinkLineComputer +{ +public: + cmMSVC60LinkLineComputer(cmState::Directory stateDir); + + std::string ConvertToLinkReference(std::string const& input) const + CM_OVERRIDE; +}; + +#endif diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 79168d8..3dc7007 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -5,6 +5,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -215,7 +216,13 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->AppendFlags( linkFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); - this->AddModuleDefinitionFlag(linkFlags); + { + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + + this->AddModuleDefinitionFlag(linkLineComputer.get(), linkFlags); + } // Construct a list of files associated with this executable that // may need to be cleaned. diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 8e25f43..b12e779 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -5,6 +5,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -159,7 +160,12 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName); - this->AddModuleDefinitionFlag(extraFlags); + + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + + this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(extraFlags, " -Wl,--no-as-needed"); @@ -184,7 +190,12 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig)); this->LocalGenerator->AddConfigVariableFlags( extraFlags, "CMAKE_MODULE_LINKER_FLAGS", this->ConfigName); - this->AddModuleDefinitionFlag(extraFlags); + + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + + this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); this->WriteLibraryRules(linkRuleVar, extraFlags, relink); } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 44ced11..7232248 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -10,6 +10,7 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" @@ -1588,15 +1589,29 @@ std::string cmMakefileTargetGenerator::CreateResponseFile( return responseFileName; } +cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( + cmState::Directory stateDir) +{ + if (this->Makefile->IsOn("MSVC60")) { + return this->GlobalGenerator->CreateMSVC60LinkLineComputer(stateDir); + } + return this->GlobalGenerator->CreateLinkLineComputer(stateDir); +} + void cmMakefileTargetGenerator::CreateLinkLibs( std::string& linkLibs, bool relink, bool useResponseFile, std::vector& makefile_depends, bool useWatcomQuote) { std::string frameworkPath; std::string linkPath; - this->LocalGenerator->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, - *this->GeneratorTarget, relink, - useResponseFile, useWatcomQuote); + + CM_AUTO_PTR linkLineComputer( + this->CreateLinkLineComputer( + this->LocalGenerator->GetStateSnapshot().GetDirectory())); + + this->LocalGenerator->OutputLinkLibraries( + linkLineComputer.get(), linkLibs, frameworkPath, linkPath, + *this->GeneratorTarget, relink, useResponseFile, useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 813af80..733a2f8 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -139,6 +139,8 @@ protected: std::vector& makefile_commands, std::vector& makefile_depends); + cmLinkLineComputer* CreateLinkLineComputer(cmState::Directory stateDir); + /** Create a response file with the given set of options. Returns the relative path from the target build working directory to the response file name. */ diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx new file mode 100644 index 0000000..dd74238 --- /dev/null +++ b/Source/cmNinjaLinkLineComputer.cxx @@ -0,0 +1,18 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmNinjaLinkLineComputer.h" +#include "cmGlobalNinjaGenerator.h" + +cmNinjaLinkLineComputer::cmNinjaLinkLineComputer( + cmState::Directory stateDir, cmGlobalNinjaGenerator const* gg) + : cmLinkLineComputer(stateDir) + , GG(gg) +{ +} + +std::string cmNinjaLinkLineComputer::ConvertToLinkReference( + std::string const& lib) const +{ + return GG->ConvertToNinjaPath(lib); +} diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h new file mode 100644 index 0000000..d86f214 --- /dev/null +++ b/Source/cmNinjaLinkLineComputer.h @@ -0,0 +1,25 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmNinjaLinkLineComputer_h +#define cmNinjaLinkLineComputer_h + +#include "cmLinkLineComputer.h" +#include "cmState.h" + +class cmGlobalNinjaGenerator; + +class cmNinjaLinkLineComputer : public cmLinkLineComputer +{ +public: + cmNinjaLinkLineComputer(cmState::Directory stateDir, + cmGlobalNinjaGenerator const* gg); + + std::string ConvertToLinkReference(std::string const& input) const + CM_OVERRIDE; + +private: + cmGlobalNinjaGenerator const* GG; +}; + +#endif diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 095c703..9c22353 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -8,6 +8,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalNinjaGenerator.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" @@ -470,9 +471,14 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() vars["TARGET_FILE"] = localGen.ConvertToOutputFormat(targetOutputReal, cmOutputConverter::SHELL); - localGen.GetTargetFlags(this->GetConfigName(), vars["LINK_LIBRARIES"], - vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, - linkPath, &genTarget, useWatcomQuote); + CM_AUTO_PTR linkLineComputer( + this->GetGlobalGenerator()->CreateLinkLineComputer( + localGen.GetStateSnapshot().GetDirectory())); + + localGen.GetTargetFlags(linkLineComputer.get(), this->GetConfigName(), + vars["LINK_LIBRARIES"], vars["FLAGS"], + vars["LINK_FLAGS"], frameworkPath, linkPath, + &genTarget, useWatcomQuote); if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") && (gt.GetType() == cmState::SHARED_LIBRARY || gt.IsExecutableWithExports())) { @@ -497,7 +503,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->addPoolNinjaVariable("JOB_POOL_LINK", >, vars); - this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]); + this->AddModuleDefinitionFlag(linkLineComputer.get(), vars["LINK_FLAGS"]); vars["LINK_FLAGS"] = cmGlobalNinjaGenerator::EncodeLiteral(vars["LINK_FLAGS"]); diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a2bdf49..a58510e 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -7,6 +7,7 @@ #include "cmFileMonitor.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmLinkLineComputer.h" #include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -728,8 +729,12 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, std::string linkLanguageFlags; std::string frameworkPath; std::string linkPath; - lg->GetTargetFlags(config, linkLibs, linkLanguageFlags, linkFlags, - frameworkPath, linkPath, target, false); + CM_AUTO_PTR linkLineComputer( + lg->GetGlobalGenerator()->CreateLinkLineComputer( + lg->GetStateSnapshot().GetDirectory())); + lg->GetTargetFlags(linkLineComputer.get(), config, linkLibs, + linkLanguageFlags, linkFlags, frameworkPath, linkPath, + target, false); linkLibs = cmSystemTools::TrimWhitespace(linkLibs); linkFlags = cmSystemTools::TrimWhitespace(linkFlags); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index dad8717..046b5f1 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -12,6 +12,7 @@ #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmGlobalGeneratorFactory.h" +#include "cmLinkLineComputer.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmMessenger.h" @@ -582,8 +583,10 @@ bool cmake::FindPackage(const std::vector& args) gg->CreateGenerationObjects(); cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName()); cmLocalGenerator* lg = gtgt->GetLocalGenerator(); - lg->GetTargetFlags(buildType, linkLibs, flags, linkFlags, frameworkPath, - linkPath, gtgt, false); + CM_AUTO_PTR linkLineComputer( + gg->CreateLinkLineComputer(lg->GetStateSnapshot().GetDirectory())); + lg->GetTargetFlags(linkLineComputer.get(), buildType, linkLibs, flags, + linkFlags, frameworkPath, linkPath, gtgt, false); linkLibs = frameworkPath + linkPath + linkLibs; printf("%s\n", linkLibs.c_str()); diff --git a/bootstrap b/bootstrap index 889cc33..fb8b1eb 100755 --- a/bootstrap +++ b/bootstrap @@ -297,6 +297,8 @@ CMAKE_CXX_SOURCES="\ cmFileTimeComparison \ cmGlobalUnixMakefileGenerator3 \ cmLocalUnixMakefileGenerator3 \ + cmLinkLineComputer \ + cmMSVC60LinkLineComputer \ cmMakefileExecutableTargetGenerator \ cmMakefileLibraryTargetGenerator \ cmMakefileTargetGenerator \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e5d1990f382aa42e8a0ad34117ee1e5a9187153 commit 2e5d1990f382aa42e8a0ad34117ee1e5a9187153 Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:35 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:53 2016 +0200 Ninja: Constify diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index f5a0e68..adb5a95 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -830,7 +830,8 @@ static void EnsureTrailingSlash(std::string& path) #endif } -std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) +std::string cmGlobalNinjaGenerator::ConvertToNinjaPath( + const std::string& path) const { cmLocalNinjaGenerator* ng = static_cast(this->LocalGenerators[0]); @@ -1421,7 +1422,8 @@ void cmGlobalNinjaGenerator::InitOutputPathPrefix() EnsureTrailingSlash(this->OutputPathPrefix); } -std::string cmGlobalNinjaGenerator::NinjaOutputPath(std::string const& path) +std::string cmGlobalNinjaGenerator::NinjaOutputPath( + std::string const& path) const { if (!this->HasOutputPathPrefix() || cmSystemTools::FileIsFullPath(path)) { return path; diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index dcf7406..5064b21 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -233,7 +233,7 @@ public: return this->RulesFileStream; } - std::string ConvertToNinjaPath(const std::string& path); + std::string ConvertToNinjaPath(const std::string& path) const; std::string ConvertToNinjaFolderRule(const std::string& path); struct MapToNinjaPathImpl @@ -333,7 +333,7 @@ public: bool SupportsConsolePool() const; bool SupportsImplicitOuts() const; - std::string NinjaOutputPath(std::string const& path); + std::string NinjaOutputPath(std::string const& path) const; bool HasOutputPathPrefix() const { return !this->OutputPathPrefix.empty(); } void StripNinjaOutputPathPrefixAsSuffix(std::string& path); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3701f9a5213f2ff5b2bc197e9af5d1f2ff68a9c commit b3701f9a5213f2ff5b2bc197e9af5d1f2ff68a9c Author: Stephen Kelly AuthorDate: Sat Oct 8 12:21:35 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 20:38:52 2016 +0200 cmLocalGenerator: Inline conversion into link computation Make it possible to invoke this functionality independent of cmLocalGenerator. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 025b82a..f1b7c6a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1407,7 +1407,14 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) #endif // Normal behavior. - return this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), lib); + std::string relLib = lib; + cmState::Directory stateDir = this->GetStateSnapshot().GetDirectory(); + if (cmOutputConverter::ContainedInDirectory( + stateDir.GetCurrentBinary(), lib, stateDir)) { + relLib = cmOutputConverter::ForceToRelativePath( + stateDir.GetCurrentBinary(), lib); + } + return relLib; } /** ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 6 + Source/cmCommonTargetGenerator.cxx | 6 +- Source/cmCommonTargetGenerator.h | 4 +- Source/cmGhsMultiTargetGenerator.cxx | 11 +- Source/cmGlobalGenerator.cxx | 14 ++ Source/cmGlobalGenerator.h | 8 ++ Source/cmGlobalNinjaGenerator.cxx | 15 +- Source/cmGlobalNinjaGenerator.h | 8 +- Source/cmLinkLineComputer.cxx | 179 ++++++++++++++++++++++++ Source/cmLinkLineComputer.h | 50 +++++++ Source/cmLocalGenerator.cxx | 167 +++++----------------- Source/cmLocalGenerator.h | 17 +-- Source/cmLocalNinjaGenerator.cxx | 6 - Source/cmLocalNinjaGenerator.h | 2 - Source/cmMSVC60LinkLineComputer.cxx | 36 +++++ Source/cmMSVC60LinkLineComputer.h | 19 +++ Source/cmMakefileExecutableTargetGenerator.cxx | 22 ++- Source/cmMakefileLibraryTargetGenerator.cxx | 30 +++- Source/cmMakefileTargetGenerator.cxx | 24 +++- Source/cmMakefileTargetGenerator.h | 10 +- Source/cmNinjaLinkLineComputer.cxx | 19 +++ Source/cmNinjaLinkLineComputer.h | 26 ++++ Source/cmNinjaNormalTargetGenerator.cxx | 15 +- Source/cmServerProtocol.cxx | 7 +- Source/cmake.cxx | 7 +- bootstrap | 2 + 26 files changed, 527 insertions(+), 183 deletions(-) create mode 100644 Source/cmLinkLineComputer.cxx create mode 100644 Source/cmLinkLineComputer.h create mode 100644 Source/cmMSVC60LinkLineComputer.cxx create mode 100644 Source/cmMSVC60LinkLineComputer.h create mode 100644 Source/cmNinjaLinkLineComputer.cxx create mode 100644 Source/cmNinjaLinkLineComputer.h hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 14:49:35 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 14:49:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-362-g275217f Message-ID: <20161010184935.4CF96F5C6B@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 275217f7c9a7b0252643b50f0431001802499daa (commit) via a3c98cb30edba8ba19bc05d4e08fd344f3440f32 (commit) from f62d2c869f7ebbb418bde71bff2ecbfc7a3993b2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=275217f7c9a7b0252643b50f0431001802499daa commit 275217f7c9a7b0252643b50f0431001802499daa Merge: f62d2c8 a3c98cb Author: Brad King AuthorDate: Mon Oct 10 14:49:34 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 14:49:34 2016 -0400 Merge topic 'ExternalProject-fix-CMAKE_CACHE_ARGS-list' into next a3c98cb3 ExternalProject: Fix regression in passing list to CMAKE_CACHE_ARGS https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3c98cb30edba8ba19bc05d4e08fd344f3440f32 commit a3c98cb30edba8ba19bc05d4e08fd344f3440f32 Author: Max Smolens AuthorDate: Mon Oct 10 11:39:57 2016 -0400 Commit: Brad King CommitDate: Mon Oct 10 14:40:12 2016 -0400 ExternalProject: Fix regression in passing list to CMAKE_CACHE_ARGS Fix passing a list to the CMAKE_CACHE_ARGS and CMAKE_CACHE_DEFAULT_ARGS options of ExternalProject_Add. Following commit v3.7.0-rc1~273^2~1 (prefer list(APPEND) over string(APPEND) where appropriate, 2016-08-08), the semicolon list separator after the first list element was missing in the generated cache. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index bbeeeed..4ba8537 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1160,7 +1160,7 @@ function(_ep_command_line_to_initial_cache var args force) endif() else() # Assume this is a list to append to the last var - list(APPEND accumulator "${line}") + string(APPEND accumulator ";${line}") endif() endforeach() # Catch the final line of the args diff --git a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake index c350a63..cb48be7 100644 --- a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake +++ b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake @@ -15,3 +15,12 @@ if(NOT "${CMAKE_MATCH_0}" MATCHES FORCE) set(RunCMake_TEST_FAILED "Expected forced FOO argument") return() endif() + +if(NOT "${_cache}" MATCHES "set\\(TEST_LIST \"A;B;C\".+\\)") + set(RunCMake_TEST_FAILED "Cannot find TEST_LIST argument in cache") + return() +endif() +if(NOT "${CMAKE_MATCH_0}" MATCHES FORCE) + set(RunCMake_TEST_FAILED "Expected forced TEST_LIST argument") + return() +endif() diff --git a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake index 62b1640..1f76fd0 100644 --- a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake +++ b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake @@ -5,4 +5,6 @@ include(ExternalProject) ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp" DOWNLOAD_COMMAND "" - CMAKE_CACHE_ARGS "-DFOO:STRING=$<1:BAR>$<0:BAD>") + CMAKE_CACHE_ARGS + "-DFOO:STRING=$<1:BAR>$<0:BAD>" + "-DTEST_LIST:STRING=A;B;C") diff --git a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake index aeee11f..c84932d 100644 --- a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake +++ b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake @@ -15,3 +15,12 @@ if("${CMAKE_MATCH_0}" MATCHES FORCE) set(RunCMake_TEST_FAILED "Expected not forced FOO argument") return() endif() + +if(NOT "${_cache}" MATCHES "set\\(TEST_LIST \"A;B;C\".+\\)") + set(RunCMake_TEST_FAILED "Cannot find TEST_LIST argument in cache") + return() +endif() +if("${CMAKE_MATCH_0}" MATCHES FORCE) + set(RunCMake_TEST_FAILED "Expected not forced TEST_LIST argument") + return() +endif() diff --git a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake index 3a83dbe..1b619c8 100644 --- a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake +++ b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake @@ -5,4 +5,6 @@ include(ExternalProject) ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp" DOWNLOAD_COMMAND "" - CMAKE_CACHE_DEFAULT_ARGS "-DFOO:STRING=$<1:BAR>$<0:BAD>") + CMAKE_CACHE_DEFAULT_ARGS + "-DFOO:STRING=$<1:BAR>$<0:BAD>" + "-DTEST_LIST:STRING=A;B;C") ----------------------------------------------------------------------- Summary of changes: Modules/ExternalProject.cmake | 2 +- Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake | 9 +++++++++ Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake | 4 +++- .../ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake | 9 +++++++++ Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake | 4 +++- 5 files changed, 25 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 14:55:31 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 14:55:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-164-g656ebac Message-ID: <20161010185531.06D3BF5E4A@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 656ebaca3be50e92edca3d9628b784f5ff1e6a99 (commit) via 4134030434ea88024ef46f9f00b19513fc3cec4c (commit) via f03d446e967af91460ff31eb52d840983b3d8cec (commit) via 3444105f9fe4fcee390c8d616e1a211a078a630b (commit) via 77c4202edc242c96087295585a85a20700bdb26f (commit) via 09b6cc66b09b9689ca01faee5e33ef101b46f972 (commit) via 0c978063259fb013856b617d680cebcdee51ab1a (commit) via 0152a01f11fc46f645fd765cc7b1be76cc07b52a (commit) via 011e6870e4a7f19476c162a8c011fd018d9a7e9c (commit) via cbca80f3516d7e5b2def6105a1b26b44bad7b6fe (commit) via d48f69d0f5f265d1c091a614098cae3ff4325fbe (commit) via ff8e321c6ade784b3f1b3b19a7783788872e44a9 (commit) via 80f57e67eefc905a726f2f35bd1672a188ea4c99 (commit) via 7ef834682547df5e0ccdcd503558dcbf1206a638 (commit) via 69295812065a5d07c07347add2fdcf8f36f993ba (commit) via 5b361fdda0f2808f0368b746a880981ebda0ade0 (commit) via 2e5d1990f382aa42e8a0ad34117ee1e5a9187153 (commit) via b3701f9a5213f2ff5b2bc197e9af5d1f2ff68a9c (commit) from 06b71ff9fb41369e6dce0c2b9760d2d546d47dec (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=656ebaca3be50e92edca3d9628b784f5ff1e6a99 commit 656ebaca3be50e92edca3d9628b784f5ff1e6a99 Merge: 06b71ff 4134030 Author: Brad King AuthorDate: Mon Oct 10 14:55:28 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 14:55:28 2016 -0400 Merge topic 'extract-cmLinkLineComputer' 41340304 cmLinkLineComputer: Extract link libraries computation from cmLocalGenerator f03d446e cmLinkLineComputer: Move FrameworkPath computation from cmLocalGenerator 3444105f cmLocalGenerator: Inline last use of local variable 77c4202e cmLinkLineComputer: Move RPath computation from cmLocalGenerator 09b6cc66 cmLinkLineComputer: Move LinkPath computation from cmLocalGenerator 0c978063 cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGenerator 0152a01f cmLocalGenerator: Move variable to where it is used 011e6870 cmLocalGenerator: Use a std::string instead of char* cbca80f3 cmLocalGenerator: Move stringstream to where it is used d48f69d0 cmLocalGenerator: Move flag determination up in the function ff8e321c cmLocalGenerator: Separate stdlib content from library stream 80f57e67 cmLocalGenerator: Separate rpath content from library stream 7ef83468 cmLocalGenerator: Pass link library info to OutputLinkLibraries 69295812 Makefiles: Port CreateLinkLibs to cmLinkLineComputer 5b361fdd cmLinkLineComputer: Extract from cmLocalGenerator 2e5d1990 Ninja: Constify ... ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 6 + Source/cmCommonTargetGenerator.cxx | 6 +- Source/cmCommonTargetGenerator.h | 4 +- Source/cmGhsMultiTargetGenerator.cxx | 11 +- Source/cmGlobalGenerator.cxx | 14 ++ Source/cmGlobalGenerator.h | 8 ++ Source/cmGlobalNinjaGenerator.cxx | 15 +- Source/cmGlobalNinjaGenerator.h | 8 +- Source/cmLinkLineComputer.cxx | 179 ++++++++++++++++++++++++ Source/cmLinkLineComputer.h | 50 +++++++ Source/cmLocalGenerator.cxx | 167 +++++----------------- Source/cmLocalGenerator.h | 17 +-- Source/cmLocalNinjaGenerator.cxx | 6 - Source/cmLocalNinjaGenerator.h | 2 - Source/cmMSVC60LinkLineComputer.cxx | 36 +++++ Source/cmMSVC60LinkLineComputer.h | 19 +++ Source/cmMakefileExecutableTargetGenerator.cxx | 22 ++- Source/cmMakefileLibraryTargetGenerator.cxx | 30 +++- Source/cmMakefileTargetGenerator.cxx | 24 +++- Source/cmMakefileTargetGenerator.h | 10 +- Source/cmNinjaLinkLineComputer.cxx | 19 +++ Source/cmNinjaLinkLineComputer.h | 26 ++++ Source/cmNinjaNormalTargetGenerator.cxx | 15 +- Source/cmServerProtocol.cxx | 7 +- Source/cmake.cxx | 7 +- bootstrap | 2 + 26 files changed, 527 insertions(+), 183 deletions(-) create mode 100644 Source/cmLinkLineComputer.cxx create mode 100644 Source/cmLinkLineComputer.h create mode 100644 Source/cmMSVC60LinkLineComputer.cxx create mode 100644 Source/cmMSVC60LinkLineComputer.h create mode 100644 Source/cmNinjaLinkLineComputer.cxx create mode 100644 Source/cmNinjaLinkLineComputer.h hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 14:55:59 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 14:55:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-364-g6cb01ac Message-ID: <20161010185603.9608CF5E57@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 6cb01ac244b6476c2677cf2b2114e9044886c747 (commit) via 656ebaca3be50e92edca3d9628b784f5ff1e6a99 (commit) from 275217f7c9a7b0252643b50f0431001802499daa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6cb01ac244b6476c2677cf2b2114e9044886c747 commit 6cb01ac244b6476c2677cf2b2114e9044886c747 Merge: 275217f 656ebac Author: Brad King AuthorDate: Mon Oct 10 14:55:52 2016 -0400 Commit: Brad King CommitDate: Mon Oct 10 14:55:52 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 10 15:51:18 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 10 Oct 2016 15:51:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-366-ge5c68d0 Message-ID: <20161010195124.2AAD9F5B2F@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 e5c68d04f4eb28ab4f967fe1f127be6b28c0ec92 (commit) via d9190f3308fb67f01f061038a06006af73a77da1 (commit) from 6cb01ac244b6476c2677cf2b2114e9044886c747 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5c68d04f4eb28ab4f967fe1f127be6b28c0ec92 commit e5c68d04f4eb28ab4f967fe1f127be6b28c0ec92 Merge: 6cb01ac d9190f3 Author: Brad King AuthorDate: Mon Oct 10 15:50:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 15:50:27 2016 -0400 Merge topic 'FindProtobuf-debug-suffix' into next d9190f33 FindProtobuf: Search for debug library named with `d` suffix https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9190f3308fb67f01f061038a06006af73a77da1 commit d9190f3308fb67f01f061038a06006af73a77da1 Author: Adam Martin AuthorDate: Mon Oct 10 14:17:10 2016 -0500 Commit: Brad King CommitDate: Mon Oct 10 15:44:21 2016 -0400 FindProtobuf: Search for debug library named with `d` suffix Protobuf now provides a CMake-based build system that optionally adds a suffix to the debug library name [1]. Update our `find_library` call to consider names with the default value for this suffix, `d`. [1] https://github.com/google/protobuf/blob/431cee60/cmake/libprotoc.cmake#L107 diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index 14e392a..3ffd5a7 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -264,7 +264,7 @@ function(_protobuf_find_libraries name filename) mark_as_advanced(${name}_LIBRARY_RELEASE) find_library(${name}_LIBRARY_DEBUG - NAMES ${filename} + NAMES ${filename}d ${filename} PATHS ${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug) mark_as_advanced(${name}_LIBRARY_DEBUG) ----------------------------------------------------------------------- Summary of changes: Modules/FindProtobuf.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From steveire at gmail.com Mon Oct 10 17:23:47 2016 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 10 Oct 2016 17:23:47 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-382-g885c6f5 Message-ID: <20161010212347.21B4BF59D9@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 885c6f5f348a45174cf5e3a799dc8c0f13c37e67 (commit) via ca40503553b08255ae8a67168ee840b9e7487011 (commit) via 8bb3d57e7eaa89fb394e33aa29849ee559f29915 (commit) via 0cd57caf76abd5560cf09b12c4e894e505980948 (commit) via fd5440694f9dd2d9d1d70d6bcd58a928c8d2e912 (commit) via adee2f4b870ad5aa27437feaf7360ae984afcf27 (commit) via 3855acab5f925de761e384007592f54b471eeacd (commit) via 331e584c686e3a20708287d807f18a60d64568b0 (commit) via 76624fb8470bdc63b3844f84edc3c941bc524f41 (commit) via 5e5c1c9224b7b10df29732ab16d7fbc052faba40 (commit) via 881c15b360a11f4951ba185e54fbaf8ec028b237 (commit) via 7c4ce8062620e6d1375316a5c8966690c475fc2a (commit) via beac5cbd01a48e0d53114ee0156f79108a6ab6ac (commit) via b2fa025ce3d264d9f3313a83ef77a0ded398d07f (commit) via 4bc4312ca064a82b3ac157ef0b67235e5cb02afc (commit) via d7f6a6164e7775eeabec0aa5d66c81a365b3d1f1 (commit) from e5c68d04f4eb28ab4f967fe1f127be6b28c0ec92 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=885c6f5f348a45174cf5e3a799dc8c0f13c37e67 commit 885c6f5f348a45174cf5e3a799dc8c0f13c37e67 Merge: e5c68d0 ca40503 Author: Stephen Kelly AuthorDate: Mon Oct 10 17:23:44 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 17:23:44 2016 -0400 Merge topic 'extract-cmRulePlaceholderExpander' into next ca405035 cmRulePlaceholderExpander: Port clients to direct-use 8bb3d57e cmRulePlaceholderExpander: Extract from cmLocalGenerator 0cd57caf cmLocalGenerator: Use strings instead of a Target in rule replacement fd544069 cmLocalGenerator: Use a converter in rule replacement API adee2f4b cmLocalGenerator: Store variable replacements as state 3855acab cmLocalGenerator: Merge loops which populate mapping 331e584c cmLocalGenerator: Populate variable mapping for all replacements 76624fb8 cmLocalGenerator: Extract compiler option replacement from loop 5e5c1c92 cmLocalGenerator: Populate a container of mappings for replacements 881c15b3 cmLocalGenerator: Move compiler option handling to be more direct 7c4ce806 cmLocalGenerator: Move variable to where it can be used easily beac5cbd cmLocalGenerator: Use the language from the compiler container b2fa025c cmLocalGenerator: Introduce a container of compiler names 4bc4312c cmLocalGenerator: Simplify loop with range algorithm d7f6a616 cmLocalGenerator: Remove the launcher from RuleVariables diff --cc Source/cmMakefileLibraryTargetGenerator.cxx index 8a621ea,9f5f0c1..cb8b5e8 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@@ -595,10 -609,25 +597,20 @@@ void cmMakefileLibraryTargetGenerator:: this->LocalGenerator->AddArchitectureFlags( langFlags, this->GeneratorTarget, linkLanguage, this->ConfigName); - // remove any language flags that might not work with the - // particular os - if (forbiddenFlagVar) { - this->RemoveForbiddenFlags(forbiddenFlagVar, linkLanguage, langFlags); - } vars.LanguageCompileFlags = langFlags.c_str(); + std::string launcher; + const char* val = this->LocalGenerator->GetRuleLauncher( + this->GeneratorTarget, "RULE_LAUNCH_LINK"); + if (val && *val) { + launcher = val; + launcher += " "; + } + + CM_AUTO_PTR rulePlaceholderExpander( + this->LocalGenerator->CreateRulePlaceholderExpander()); // Construct the main link rule and expand placeholders. - this->LocalGenerator->TargetImplib = targetOutPathImport; + rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport); if (useArchiveRules) { // Construct the individual object list strings. std::vector object_strings; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca40503553b08255ae8a67168ee840b9e7487011 commit ca40503553b08255ae8a67168ee840b9e7487011 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:58:50 2016 +0200 cmRulePlaceholderExpander: Port clients to direct-use Add a factory function to cmLocalGenerator so that variableMappings can be provided from it, and so that Ninja can always have a hard-coded TargetImpLib. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 615168d..1c3a97d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -133,6 +133,13 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) } } +cmRulePlaceholderExpander* cmLocalGenerator::CreateRulePlaceholderExpander() + const +{ + return new cmRulePlaceholderExpander(this->Compilers, this->VariableMappings, + this->CompilerSysroot); +} + cmLocalGenerator::~cmLocalGenerator() { cmDeleteAll(this->GeneratorTargets); @@ -561,17 +568,6 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->Makefile->GetStateSnapshot(); } -void cmLocalGenerator::ExpandRuleVariables(cmOutputConverter* outputConverter, - std::string& s, - const RuleVariables& replaceValues) -{ - cmRulePlaceholderExpander rulePlaceholderExpander( - this->Compilers, this->VariableMappings, this->CompilerSysroot); - rulePlaceholderExpander.SetTargetImpLib(this->TargetImplib); - rulePlaceholderExpander.ExpandRuleVariables(outputConverter, s, - replaceValues); -} - const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target, const std::string& prop) { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 6f8426d..055e1a9 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -24,6 +24,7 @@ class cmComputeLinkInformation; class cmCustomCommandGenerator; class cmGeneratorTarget; class cmGlobalGenerator; +class cmRulePlaceholderExpander; class cmMakefile; class cmSourceFile; class cmLinkLineComputer; @@ -85,6 +86,8 @@ public: return this->GlobalGenerator; } + virtual cmRulePlaceholderExpander* CreateRulePlaceholderExpander() const; + std::string GetLinkLibsCMP0065(std::string const& linkLanguage, cmGeneratorTarget& tgt) const; @@ -218,10 +221,6 @@ public: // preprocessed files and assembly files. void GetIndividualFileTargets(std::vector&) {} - struct RuleVariables : cmRulePlaceholderExpander::RuleVariables - { - }; - /** * Get the relative path from the generator output directory to a * per-target support directory. @@ -315,11 +314,6 @@ public: void CreateEvaluationFileOutputs(const std::string& config); void ProcessEvaluationFiles(std::vector& generatedFiles); - // Expand rule variables in CMake of the type found in language rules - void ExpandRuleVariables(cmOutputConverter* outputConverter, - std::string& string, - const RuleVariables& replaceValues); - const char* GetRuleLauncher(cmGeneratorTarget* target, const std::string& prop); @@ -362,10 +356,6 @@ protected: bool EmitUniversalBinaryFlags; - // Hack for ExpandRuleVariable until object-oriented version is - // committed. - std::string TargetImplib; - KWIML_INT_uint64_t BackwardsCompatibility; bool BackwardsCompatibilityFinal; diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 05596f8..1863376 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -10,6 +10,7 @@ #include "cmGlobalNinjaGenerator.h" #include "cmMakefile.h" #include "cmNinjaTargetGenerator.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -27,11 +28,19 @@ cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg, : cmLocalCommonGenerator(gg, mf, mf->GetState()->GetBinaryDirectory()) , HomeRelativeOutputPath("") { - this->TargetImplib = "$TARGET_IMPLIB"; } // Virtual public methods. +cmRulePlaceholderExpander* +cmLocalNinjaGenerator::CreateRulePlaceholderExpander() const +{ + cmRulePlaceholderExpander* ret = new cmRulePlaceholderExpander( + this->Compilers, this->VariableMappings, this->CompilerSysroot); + ret->SetTargetImpLib("$TARGET_IMPLIB"); + return ret; +} + cmLocalNinjaGenerator::~cmLocalNinjaGenerator() { } @@ -477,7 +486,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( // Expand rules in the empty string. It may insert the launcher and // perform replacements. - RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; std::string output; const std::vector& outputs = ccg.GetOutputs(); @@ -494,7 +503,10 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( std::string launcher = property_value; launcher += " "; - this->ExpandRuleVariables(this, launcher, vars); + CM_AUTO_PTR rulePlaceholderExpander( + this->CreateRulePlaceholderExpander()); + + rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 56aa9bf..95d8eb8 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -42,6 +42,8 @@ public: void Generate() CM_OVERRIDE; + cmRulePlaceholderExpander* CreateRulePlaceholderExpander() const CM_OVERRIDE; + std::string GetTargetDirectory(cmGeneratorTarget const* target) const CM_OVERRIDE; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 6906cbf..f30414c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -14,6 +14,7 @@ #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -945,6 +946,9 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( *content << dir; } + CM_AUTO_PTR rulePlaceholderExpander( + this->CreateRulePlaceholderExpander()); + // Add each command line to the set of commands. std::vector commands1; std::string currentBinDir = this->GetCurrentBinaryDirectory(); @@ -988,7 +992,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( if (val && *val) { // Expand rules in the empty string. It may insert the launcher and // perform replacements. - RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = target->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(target->GetType()); std::string output; @@ -1006,7 +1010,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( launcher = val; launcher += " "; - this->ExpandRuleVariables(this, launcher, vars); + rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 8d235c4..dd3fc36 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -11,6 +11,7 @@ #include "cmMakefile.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSystemTools.h" #include "cmake.h" @@ -331,7 +332,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string manifests = this->GetManifests(); - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); @@ -393,15 +394,17 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) launcher += " "; } + CM_AUTO_PTR rulePlaceholderExpander( + this->LocalGenerator->CreateRulePlaceholderExpander()); + // Expand placeholders in the commands. - this->LocalGenerator->TargetImplib = targetOutPathImport; + rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport); for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } - this->LocalGenerator->TargetImplib = ""; // Restore path conversion to normal shells. this->LocalGenerator->SetLinkScriptShell(false); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index fe37a83..9f5f0c1 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -11,6 +11,7 @@ #include "cmMakefile.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" @@ -532,7 +533,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string manifests = this->GetManifests(); - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.TargetPDB = targetOutPathPDB.c_str(); // Setup the target version. @@ -623,8 +624,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( launcher += " "; } + CM_AUTO_PTR rulePlaceholderExpander( + this->LocalGenerator->CreateRulePlaceholderExpander()); // Construct the main link rule and expand placeholders. - this->LocalGenerator->TargetImplib = targetOutPathImport; + rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport); if (useArchiveRules) { // Construct the individual object list strings. std::vector object_strings; @@ -638,8 +641,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveCreateCommands.begin(); i != archiveCreateCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + cmd, vars); real_link_commands.push_back(cmd); } } @@ -650,8 +653,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveAppendCommands.begin(); i != archiveAppendCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + cmd, vars); real_link_commands.push_back(cmd); } } @@ -661,8 +664,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveFinishCommands.begin(); i != archiveFinishCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); // If there is no ranlib the command will be ":". Skip it. if (!cmd.empty() && cmd[0] != ':') { real_link_commands.push_back(cmd); @@ -685,11 +688,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } } - this->LocalGenerator->TargetImplib = ""; // Restore path conversion to normal shells. this->LocalGenerator->SetLinkScriptShell(false); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index ed1fe16..3947c47 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -18,6 +18,7 @@ #include "cmMakefileLibraryTargetGenerator.h" #include "cmMakefileUtilityTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -543,7 +544,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( targetOutPathCompilePDB[targetOutPathCompilePDB.size() - 1] = '/'; } } - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.RuleLauncher = "RULE_LAUNCH_COMPILE"; vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); vars.CMTargetType = @@ -589,6 +590,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( bool const lang_has_assembly = lang_has_preprocessor; bool const lang_can_export_cmds = lang_has_preprocessor; + CM_AUTO_PTR rulePlaceholderExpander( + this->LocalGenerator->CreateRulePlaceholderExpander()); + // Construct the compile rules. { std::string compileRuleVar = "CMAKE_"; @@ -602,8 +606,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( if (this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS") && lang_can_export_cmds && compileCommands.size() == 1) { std::string compileCommand = compileCommands[0]; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, - compileCommand, vars); + + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + compileCommand, vars); std::string workingDirectory = cmSystemTools::CollapseFullPath( this->LocalGenerator->GetCurrentBinaryDirectory()); compileCommand.replace(compileCommand.find(langFlags), langFlags.size(), @@ -662,8 +667,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = compileCommands.begin(); i != compileCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } // Change the command working directory to the local build tree. @@ -726,8 +731,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = preprocessCommands.begin(); i != preprocessCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + *i, vars); } this->LocalGenerator->CreateCDCommand( @@ -774,8 +779,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = assemblyCommands.begin(); i != assemblyCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + *i, vars); } this->LocalGenerator->CreateCDCommand( diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 1f2e4ee..fe51f34 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -15,6 +15,7 @@ #include "cmNinjaTypes.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -167,7 +168,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) std::string rspcontent; if (!this->GetGlobalGenerator()->HasRule(ruleName)) { - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); @@ -248,13 +249,16 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) launcher += " "; } + CM_AUTO_PTR rulePlaceholderExpander( + this->GetLocalGenerator()->CreateRulePlaceholderExpander()); + // Rule for linking library/executable. std::vector linkCmds = this->ComputeLinkCmd(); for (std::vector::iterator i = linkCmds.begin(); i != linkCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, vars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), + *i, vars); } { // If there is no ranlib the command will be ":". Skip it. diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 11ecc84..0650e40 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -14,6 +14,7 @@ #include "cmNinjaNormalTargetGenerator.h" #include "cmNinjaUtilityTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -373,7 +374,7 @@ void cmNinjaTargetGenerator::WriteLanguageRules(const std::string& language) void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) { - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); @@ -453,6 +454,9 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) vars.Flags = flags.c_str(); vars.DependencyFile = depfile.c_str(); + CM_AUTO_PTR rulePlaceholderExpander( + this->GetLocalGenerator()->CreateRulePlaceholderExpander()); + std::string const tdi = this->GetLocalGenerator()->ConvertToOutputFormat( ConvertToNinjaPath(this->GetTargetDependInfoPath(lang)), cmLocalGenerator::SHELL); @@ -475,7 +479,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) std::string const ppDeptype = ""; // no deps= for multiple outputs std::string const ppDepfile = "$DEP_FILE"; - cmLocalGenerator::RuleVariables ppVars; + cmRulePlaceholderExpander::RuleVariables ppVars; ppVars.CMTargetName = vars.CMTargetName; ppVars.CMTargetType = vars.CMTargetType; ppVars.Language = vars.Language; @@ -506,8 +510,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = ppCmds.begin(); i != ppCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, ppVars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), + *i, ppVars); } // Run CMake dependency scanner on preprocessed output. @@ -620,8 +624,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, vars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), *i, + vars); } std::string cmdLine = @@ -974,7 +978,7 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( return; } - cmLocalGenerator::RuleVariables compileObjectVars; + cmRulePlaceholderExpander::RuleVariables compileObjectVars; compileObjectVars.Language = language.c_str(); std::string escapedSourceFileName = sourceFileName; @@ -1006,10 +1010,13 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( std::vector compileCmds; cmSystemTools::ExpandListArgument(compileCmd, compileCmds); + CM_AUTO_PTR rulePlaceholderExpander( + this->GetLocalGenerator()->CreateRulePlaceholderExpander()); + for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, compileObjectVars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), *i, + compileObjectVars); } std::string cmdLine = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8bb3d57e7eaa89fb394e33aa29849ee559f29915 commit 8bb3d57e7eaa89fb394e33aa29849ee559f29915 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:21:32 2016 +0200 cmRulePlaceholderExpander: Extract from cmLocalGenerator Implement cmLocalGenerator::ExpandRuleVariables in terms of the new class for source compatibility and to reduce diff noise in this commit. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 048667a..7d82a51 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -309,6 +309,8 @@ set(SRCS cmLocalCommonGenerator.h cmLocalGenerator.cxx cmLocalGenerator.h + cmRulePlaceholderExpander.cxx + cmRulePlaceholderExpander.h cmLocalUnixMakefileGenerator3.cxx cmLocale.h ${MACH_SRCS} diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9b2c426..615168d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -14,6 +14,7 @@ #include "cmInstallTargetGenerator.h" #include "cmLinkLineComputer.h" #include "cmMakefile.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmSystemTools.h" #include "cmTarget.h" @@ -560,287 +561,15 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->Makefile->GetStateSnapshot(); } -std::string cmLocalGenerator::ExpandRuleVariable( - cmOutputConverter* outputConverter, std::string const& variable, - const RuleVariables& replaceValues) -{ - if (replaceValues.LinkFlags) { - if (variable == "LINK_FLAGS") { - return replaceValues.LinkFlags; - } - } - if (replaceValues.Manifests) { - if (variable == "MANIFESTS") { - return replaceValues.Manifests; - } - } - if (replaceValues.Flags) { - if (variable == "FLAGS") { - return replaceValues.Flags; - } - } - - if (replaceValues.Source) { - if (variable == "SOURCE") { - return replaceValues.Source; - } - } - if (replaceValues.PreprocessedSource) { - if (variable == "PREPROCESSED_SOURCE") { - return replaceValues.PreprocessedSource; - } - } - if (replaceValues.AssemblySource) { - if (variable == "ASSEMBLY_SOURCE") { - return replaceValues.AssemblySource; - } - } - if (replaceValues.Object) { - if (variable == "OBJECT") { - return replaceValues.Object; - } - } - if (replaceValues.ObjectDir) { - if (variable == "OBJECT_DIR") { - return replaceValues.ObjectDir; - } - } - if (replaceValues.ObjectFileDir) { - if (variable == "OBJECT_FILE_DIR") { - return replaceValues.ObjectFileDir; - } - } - if (replaceValues.Objects) { - if (variable == "OBJECTS") { - return replaceValues.Objects; - } - } - if (replaceValues.ObjectsQuoted) { - if (variable == "OBJECTS_QUOTED") { - return replaceValues.ObjectsQuoted; - } - } - if (replaceValues.Defines && variable == "DEFINES") { - return replaceValues.Defines; - } - if (replaceValues.Includes && variable == "INCLUDES") { - return replaceValues.Includes; - } - if (replaceValues.TargetPDB) { - if (variable == "TARGET_PDB") { - return replaceValues.TargetPDB; - } - } - if (replaceValues.TargetCompilePDB) { - if (variable == "TARGET_COMPILE_PDB") { - return replaceValues.TargetCompilePDB; - } - } - if (replaceValues.DependencyFile) { - if (variable == "DEP_FILE") { - return replaceValues.DependencyFile; - } - } - - if (replaceValues.Target) { - if (variable == "TARGET_QUOTED") { - std::string targetQuoted = replaceValues.Target; - if (!targetQuoted.empty() && targetQuoted[0] != '\"') { - targetQuoted = '\"'; - targetQuoted += replaceValues.Target; - targetQuoted += '\"'; - } - return targetQuoted; - } - if (variable == "TARGET_UNQUOTED") { - std::string unquoted = replaceValues.Target; - std::string::size_type sz = unquoted.size(); - if (sz > 2 && unquoted[0] == '\"' && unquoted[sz - 1] == '\"') { - unquoted = unquoted.substr(1, sz - 2); - } - return unquoted; - } - if (replaceValues.LanguageCompileFlags) { - if (variable == "LANGUAGE_COMPILE_FLAGS") { - return replaceValues.LanguageCompileFlags; - } - } - if (replaceValues.Target) { - if (variable == "TARGET") { - return replaceValues.Target; - } - } - if (variable == "TARGET_IMPLIB") { - return this->TargetImplib; - } - if (variable == "TARGET_VERSION_MAJOR") { - if (replaceValues.TargetVersionMajor) { - return replaceValues.TargetVersionMajor; - } - return "0"; - } - if (variable == "TARGET_VERSION_MINOR") { - if (replaceValues.TargetVersionMinor) { - return replaceValues.TargetVersionMinor; - } - return "0"; - } - if (replaceValues.Target) { - if (variable == "TARGET_BASE") { - // Strip the last extension off the target name. - std::string targetBase = replaceValues.Target; - std::string::size_type pos = targetBase.rfind('.'); - if (pos != targetBase.npos) { - return targetBase.substr(0, pos); - } - return targetBase; - } - } - } - if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" || - variable == "TARGET_INSTALLNAME_DIR") { - // All these variables depend on TargetSOName - if (replaceValues.TargetSOName) { - if (variable == "TARGET_SONAME") { - return replaceValues.TargetSOName; - } - if (variable == "SONAME_FLAG" && replaceValues.SONameFlag) { - return replaceValues.SONameFlag; - } - if (replaceValues.TargetInstallNameDir && - variable == "TARGET_INSTALLNAME_DIR") { - return replaceValues.TargetInstallNameDir; - } - } - return ""; - } - if (replaceValues.LinkLibraries) { - if (variable == "LINK_LIBRARIES") { - return replaceValues.LinkLibraries; - } - } - if (replaceValues.Language) { - if (variable == "LANGUAGE") { - return replaceValues.Language; - } - } - if (replaceValues.CMTargetName) { - if (variable == "TARGET_NAME") { - return replaceValues.CMTargetName; - } - } - if (replaceValues.CMTargetType) { - if (variable == "TARGET_TYPE") { - return replaceValues.CMTargetType; - } - } - if (replaceValues.Output) { - if (variable == "OUTPUT") { - return replaceValues.Output; - } - } - if (variable == "CMAKE_COMMAND") { - return outputConverter->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), - SHELL); - } - - std::map::iterator compIt = - this->Compilers.find(variable); - - if (compIt != this->Compilers.end()) { - std::string ret = - this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]; - std::string const& compilerArg1 = - this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; - std::string const& compilerTarget = - this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; - std::string const& compilerOptionTarget = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_TARGET"]; - std::string const& compilerExternalToolchain = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionExternalToolchain = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionSysroot = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_SYSROOT"]; - - // if there is a required first argument to the compiler add it - // to the compiler string - if (!compilerArg1.empty()) { - ret += " "; - ret += compilerArg1; - } - if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { - ret += " "; - ret += compilerOptionTarget; - ret += compilerTarget; - } - if (!compilerExternalToolchain.empty() && - !compilerOptionExternalToolchain.empty()) { - ret += " "; - ret += compilerOptionExternalToolchain; - ret += outputConverter->EscapeForShell(compilerExternalToolchain, true); - } - if (this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { - ret += " "; - ret += compilerOptionSysroot; - ret += outputConverter->EscapeForShell(this->CompilerSysroot, true); - } - return ret; - } - - std::map::iterator mapIt = - this->VariableMappings.find(variable); - if (mapIt != this->VariableMappings.end()) { - if (variable.find("_FLAG") == variable.npos) { - return outputConverter->ConvertToOutputForExisting(mapIt->second); - } - return mapIt->second; - } - return variable; -} - void cmLocalGenerator::ExpandRuleVariables(cmOutputConverter* outputConverter, std::string& s, const RuleVariables& replaceValues) { - std::string::size_type start = s.find('<'); - // no variables to expand - if (start == s.npos) { - return; - } - std::string::size_type pos = 0; - std::string expandedInput; - while (start != s.npos && start < s.size() - 2) { - std::string::size_type end = s.find('>', start); - // if we find a < with no > we are done - if (end == s.npos) { - return; - } - char c = s[start + 1]; - // if the next char after the < is not A-Za-z then - // skip it and try to find the next < in the string - if (!isalpha(c)) { - start = s.find('<', start + 1); - } else { - // extract the var - std::string var = s.substr(start + 1, end - start - 1); - std::string replace = - this->ExpandRuleVariable(outputConverter, var, replaceValues); - expandedInput += s.substr(pos, start - pos); - expandedInput += replace; - // move to next one - start = s.find('<', start + var.size() + 2); - pos = end + 1; - } - } - // add the rest of the input - expandedInput += s.substr(pos, s.size() - pos); - s = expandedInput; + cmRulePlaceholderExpander rulePlaceholderExpander( + this->Compilers, this->VariableMappings, this->CompilerSysroot); + rulePlaceholderExpander.SetTargetImpLib(this->TargetImplib); + rulePlaceholderExpander.ExpandRuleVariables(outputConverter, s, + replaceValues); } const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target, diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index c51aa85..6f8426d 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -8,6 +8,7 @@ #include "cmListFileCache.h" #include "cmOutputConverter.h" #include "cmPolicies.h" +#include "cmRulePlaceholderExpander.h" #include "cmState.h" #include "cmake.h" @@ -217,41 +218,8 @@ public: // preprocessed files and assembly files. void GetIndividualFileTargets(std::vector&) {} - // Create a struct to hold the varibles passed into - // ExpandRuleVariables - struct RuleVariables + struct RuleVariables : cmRulePlaceholderExpander::RuleVariables { - RuleVariables() { memset(this, 0, sizeof(*this)); } - const char* CMTargetName; - const char* CMTargetType; - const char* TargetPDB; - const char* TargetCompilePDB; - const char* TargetVersionMajor; - const char* TargetVersionMinor; - const char* Language; - const char* Objects; - const char* Target; - const char* LinkLibraries; - const char* Source; - const char* AssemblySource; - const char* PreprocessedSource; - const char* Output; - const char* Object; - const char* ObjectDir; - const char* ObjectFileDir; - const char* Flags; - const char* ObjectsQuoted; - const char* SONameFlag; - const char* TargetSOName; - const char* TargetInstallNameDir; - const char* LinkFlags; - const char* Manifests; - const char* LanguageCompileFlags; - const char* Defines; - const char* Includes; - const char* RuleLauncher; - const char* DependencyFile; - const char* FilterPrefix; }; /** @@ -362,11 +330,6 @@ protected: std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath); - // Expand rule variables in a single string - std::string ExpandRuleVariable(cmOutputConverter* outputConverter, - std::string const& variable, - const RuleVariables& replaceValues); - // Handle old-style install rules stored in the targets. void GenerateTargetInstallRules( std::ostream& os, const std::string& config, diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx new file mode 100644 index 0000000..796c975 --- /dev/null +++ b/Source/cmRulePlaceholderExpander.cxx @@ -0,0 +1,299 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmRulePlaceholderExpander.h" + +#include "cmOutputConverter.h" +#include "cmSystemTools.h" + +cmRulePlaceholderExpander::cmRulePlaceholderExpander( + std::map const& compilers, + std::map const& variableMappings, + std::string const& compilerSysroot) + : Compilers(compilers) + , VariableMappings(variableMappings) + , CompilerSysroot(compilerSysroot) +{ +} + +std::string cmRulePlaceholderExpander::ExpandRuleVariable( + cmOutputConverter* outputConverter, std::string const& variable, + const RuleVariables& replaceValues) +{ + if (replaceValues.LinkFlags) { + if (variable == "LINK_FLAGS") { + return replaceValues.LinkFlags; + } + } + if (replaceValues.Manifests) { + if (variable == "MANIFESTS") { + return replaceValues.Manifests; + } + } + if (replaceValues.Flags) { + if (variable == "FLAGS") { + return replaceValues.Flags; + } + } + + if (replaceValues.Source) { + if (variable == "SOURCE") { + return replaceValues.Source; + } + } + if (replaceValues.PreprocessedSource) { + if (variable == "PREPROCESSED_SOURCE") { + return replaceValues.PreprocessedSource; + } + } + if (replaceValues.AssemblySource) { + if (variable == "ASSEMBLY_SOURCE") { + return replaceValues.AssemblySource; + } + } + if (replaceValues.Object) { + if (variable == "OBJECT") { + return replaceValues.Object; + } + } + if (replaceValues.ObjectDir) { + if (variable == "OBJECT_DIR") { + return replaceValues.ObjectDir; + } + } + if (replaceValues.ObjectFileDir) { + if (variable == "OBJECT_FILE_DIR") { + return replaceValues.ObjectFileDir; + } + } + if (replaceValues.Objects) { + if (variable == "OBJECTS") { + return replaceValues.Objects; + } + } + if (replaceValues.ObjectsQuoted) { + if (variable == "OBJECTS_QUOTED") { + return replaceValues.ObjectsQuoted; + } + } + if (replaceValues.Defines && variable == "DEFINES") { + return replaceValues.Defines; + } + if (replaceValues.Includes && variable == "INCLUDES") { + return replaceValues.Includes; + } + if (replaceValues.TargetPDB) { + if (variable == "TARGET_PDB") { + return replaceValues.TargetPDB; + } + } + if (replaceValues.TargetCompilePDB) { + if (variable == "TARGET_COMPILE_PDB") { + return replaceValues.TargetCompilePDB; + } + } + if (replaceValues.DependencyFile) { + if (variable == "DEP_FILE") { + return replaceValues.DependencyFile; + } + } + + if (replaceValues.Target) { + if (variable == "TARGET_QUOTED") { + std::string targetQuoted = replaceValues.Target; + if (!targetQuoted.empty() && targetQuoted[0] != '\"') { + targetQuoted = '\"'; + targetQuoted += replaceValues.Target; + targetQuoted += '\"'; + } + return targetQuoted; + } + if (variable == "TARGET_UNQUOTED") { + std::string unquoted = replaceValues.Target; + std::string::size_type sz = unquoted.size(); + if (sz > 2 && unquoted[0] == '\"' && unquoted[sz - 1] == '\"') { + unquoted = unquoted.substr(1, sz - 2); + } + return unquoted; + } + if (replaceValues.LanguageCompileFlags) { + if (variable == "LANGUAGE_COMPILE_FLAGS") { + return replaceValues.LanguageCompileFlags; + } + } + if (replaceValues.Target) { + if (variable == "TARGET") { + return replaceValues.Target; + } + } + if (variable == "TARGET_IMPLIB") { + return this->TargetImpLib; + } + if (variable == "TARGET_VERSION_MAJOR") { + if (replaceValues.TargetVersionMajor) { + return replaceValues.TargetVersionMajor; + } + return "0"; + } + if (variable == "TARGET_VERSION_MINOR") { + if (replaceValues.TargetVersionMinor) { + return replaceValues.TargetVersionMinor; + } + return "0"; + } + if (replaceValues.Target) { + if (variable == "TARGET_BASE") { + // Strip the last extension off the target name. + std::string targetBase = replaceValues.Target; + std::string::size_type pos = targetBase.rfind('.'); + if (pos != targetBase.npos) { + return targetBase.substr(0, pos); + } + return targetBase; + } + } + } + if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" || + variable == "TARGET_INSTALLNAME_DIR") { + // All these variables depend on TargetSOName + if (replaceValues.TargetSOName) { + if (variable == "TARGET_SONAME") { + return replaceValues.TargetSOName; + } + if (variable == "SONAME_FLAG" && replaceValues.SONameFlag) { + return replaceValues.SONameFlag; + } + if (replaceValues.TargetInstallNameDir && + variable == "TARGET_INSTALLNAME_DIR") { + return replaceValues.TargetInstallNameDir; + } + } + return ""; + } + if (replaceValues.LinkLibraries) { + if (variable == "LINK_LIBRARIES") { + return replaceValues.LinkLibraries; + } + } + if (replaceValues.Language) { + if (variable == "LANGUAGE") { + return replaceValues.Language; + } + } + if (replaceValues.CMTargetName) { + if (variable == "TARGET_NAME") { + return replaceValues.CMTargetName; + } + } + if (replaceValues.CMTargetType) { + if (variable == "TARGET_TYPE") { + return replaceValues.CMTargetType; + } + } + if (replaceValues.Output) { + if (variable == "OUTPUT") { + return replaceValues.Output; + } + } + if (variable == "CMAKE_COMMAND") { + return outputConverter->ConvertToOutputFormat( + cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), + cmOutputConverter::SHELL); + } + + std::map::iterator compIt = + this->Compilers.find(variable); + + if (compIt != this->Compilers.end()) { + std::string ret = + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]; + std::string const& compilerArg1 = + this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; + std::string const& compilerTarget = + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + std::string const& compilerOptionTarget = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_TARGET"]; + std::string const& compilerExternalToolchain = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionExternalToolchain = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionSysroot = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_SYSROOT"]; + + // if there is a required first argument to the compiler add it + // to the compiler string + if (!compilerArg1.empty()) { + ret += " "; + ret += compilerArg1; + } + if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { + ret += " "; + ret += compilerOptionTarget; + ret += compilerTarget; + } + if (!compilerExternalToolchain.empty() && + !compilerOptionExternalToolchain.empty()) { + ret += " "; + ret += compilerOptionExternalToolchain; + ret += outputConverter->EscapeForShell(compilerExternalToolchain, true); + } + if (this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { + ret += " "; + ret += compilerOptionSysroot; + ret += outputConverter->EscapeForShell(this->CompilerSysroot, true); + } + return ret; + } + + std::map::iterator mapIt = + this->VariableMappings.find(variable); + if (mapIt != this->VariableMappings.end()) { + if (variable.find("_FLAG") == variable.npos) { + return outputConverter->ConvertToOutputForExisting(mapIt->second); + } + return mapIt->second; + } + return variable; +} + +void cmRulePlaceholderExpander::ExpandRuleVariables( + cmOutputConverter* outputConverter, std::string& s, + const RuleVariables& replaceValues) +{ + std::string::size_type start = s.find('<'); + // no variables to expand + if (start == s.npos) { + return; + } + std::string::size_type pos = 0; + std::string expandedInput; + while (start != s.npos && start < s.size() - 2) { + std::string::size_type end = s.find('>', start); + // if we find a < with no > we are done + if (end == s.npos) { + return; + } + char c = s[start + 1]; + // if the next char after the < is not A-Za-z then + // skip it and try to find the next < in the string + if (!isalpha(c)) { + start = s.find('<', start + 1); + } else { + // extract the var + std::string var = s.substr(start + 1, end - start - 1); + std::string replace = + this->ExpandRuleVariable(outputConverter, var, replaceValues); + expandedInput += s.substr(pos, start - pos); + expandedInput += replace; + // move to next one + start = s.find('<', start + var.size() + 2); + pos = end + 1; + } + } + // add the rest of the input + expandedInput += s.substr(pos, s.size() - pos); + s = expandedInput; +} diff --git a/Source/cmRulePlaceholderExpander.h b/Source/cmRulePlaceholderExpander.h new file mode 100644 index 0000000..9140f8f --- /dev/null +++ b/Source/cmRulePlaceholderExpander.h @@ -0,0 +1,85 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmRulePlaceholderExpander_h +#define cmRulePlaceholderExpander_h + +#include + +#include +#include + +#include + +class cmGeneratorTarget; +class cmOutputConverter; + +class cmRulePlaceholderExpander +{ +public: + cmRulePlaceholderExpander( + std::map const& compilers, + std::map const& variableMappings, + std::string const& compilerSysroot); + + void SetTargetImpLib(std::string const& targetImpLib) + { + this->TargetImpLib = targetImpLib; + } + + // Create a struct to hold the varibles passed into + // ExpandRuleVariables + struct RuleVariables + { + RuleVariables() { memset(this, 0, sizeof(*this)); } + const char* CMTargetName; + const char* CMTargetType; + const char* TargetPDB; + const char* TargetCompilePDB; + const char* TargetVersionMajor; + const char* TargetVersionMinor; + const char* Language; + const char* Objects; + const char* Target; + const char* LinkLibraries; + const char* Source; + const char* AssemblySource; + const char* PreprocessedSource; + const char* Output; + const char* Object; + const char* ObjectDir; + const char* ObjectFileDir; + const char* Flags; + const char* ObjectsQuoted; + const char* SONameFlag; + const char* TargetSOName; + const char* TargetInstallNameDir; + const char* LinkFlags; + const char* Manifests; + const char* LanguageCompileFlags; + const char* Defines; + const char* Includes; + const char* RuleLauncher; + const char* DependencyFile; + const char* FilterPrefix; + }; + + // Expand rule variables in CMake of the type found in language rules + void ExpandRuleVariables(cmOutputConverter* outputConverter, + std::string& string, + const RuleVariables& replaceValues); + + // Expand rule variables in a single string + std::string ExpandRuleVariable(cmOutputConverter* outputConverter, + std::string const& variable, + const RuleVariables& replaceValues); + +private: + std::string TargetImpLib; + + std::map Compilers; + std::map VariableMappings; + std::string CompilerSysroot; +}; + +#endif diff --git a/bootstrap b/bootstrap index fb8b1eb..9936365 100755 --- a/bootstrap +++ b/bootstrap @@ -281,6 +281,7 @@ CMAKE_CXX_SOURCES="\ cmInstallDirectoryGenerator \ cmLocalCommonGenerator \ cmLocalGenerator \ + cmRulePlaceholderExpander \ cmInstalledFile \ cmInstallGenerator \ cmInstallExportGenerator \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0cd57caf76abd5560cf09b12c4e894e505980948 commit 0cd57caf76abd5560cf09b12c4e894e505980948 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Use strings instead of a Target in rule replacement Don't rely on the cmGeneratorTarget type needlessly. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2a8b3e5..9b2c426 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -724,12 +724,14 @@ std::string cmLocalGenerator::ExpandRuleVariable( return replaceValues.Language; } } - if (replaceValues.CMTarget) { + if (replaceValues.CMTargetName) { if (variable == "TARGET_NAME") { - return replaceValues.CMTarget->GetName(); + return replaceValues.CMTargetName; } + } + if (replaceValues.CMTargetType) { if (variable == "TARGET_TYPE") { - return cmState::GetTargetTypeName(replaceValues.CMTarget->GetType()); + return replaceValues.CMTargetType; } } if (replaceValues.Output) { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 7359f50..c51aa85 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -222,7 +222,8 @@ public: struct RuleVariables { RuleVariables() { memset(this, 0, sizeof(*this)); } - cmGeneratorTarget* CMTarget; + const char* CMTargetName; + const char* CMTargetType; const char* TargetPDB; const char* TargetCompilePDB; const char* TargetVersionMajor; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index a4c73dd..6906cbf 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -989,7 +989,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( // Expand rules in the empty string. It may insert the launcher and // perform replacements. RuleVariables vars; - vars.CMTarget = target; + vars.CMTargetName = target->GetName().c_str(); + vars.CMTargetType = cmState::GetTargetTypeName(target->GetType()); std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index ce71c04..8d235c4 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -332,7 +332,9 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string manifests = this->GetManifests(); cmLocalGenerator::RuleVariables vars; - vars.CMTarget = this->GeneratorTarget; + vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 4016cfa..fe37a83 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -552,7 +552,9 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( vars.TargetVersionMajor = targetVersionMajor.c_str(); vars.TargetVersionMinor = targetVersionMinor.c_str(); - vars.CMTarget = this->GeneratorTarget; + vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index a607ed6..ed1fe16 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -545,7 +545,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } cmLocalGenerator::RuleVariables vars; vars.RuleLauncher = "RULE_LAUNCH_COMPILE"; - vars.CMTarget = this->GeneratorTarget; + vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); vars.Language = lang.c_str(); vars.Target = targetOutPathReal.c_str(); vars.TargetPDB = targetOutPathPDB.c_str(); diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 0904d6b..1f2e4ee 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -168,7 +168,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) if (!this->GetGlobalGenerator()->HasRule(ruleName)) { cmLocalGenerator::RuleVariables vars; - vars.CMTarget = this->GetGeneratorTarget(); + vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); + vars.Language = this->TargetLinkLanguage.c_str(); std::string responseFlag; diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 1513318..11ecc84 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -374,7 +374,9 @@ void cmNinjaTargetGenerator::WriteLanguageRules(const std::string& language) void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) { cmLocalGenerator::RuleVariables vars; - vars.CMTarget = this->GetGeneratorTarget(); + vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); vars.Language = lang.c_str(); vars.Source = "$IN_ABS"; vars.Object = "$out"; @@ -474,7 +476,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) std::string const ppDepfile = "$DEP_FILE"; cmLocalGenerator::RuleVariables ppVars; - ppVars.CMTarget = vars.CMTarget; + ppVars.CMTargetName = vars.CMTargetName; + ppVars.CMTargetType = vars.CMTargetType; ppVars.Language = vars.Language; ppVars.Object = "$out"; // for RULE_LAUNCH_COMPILE ppVars.PreprocessedSource = "$out"; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd5440694f9dd2d9d1d70d6bcd58a928c8d2e912 commit fd5440694f9dd2d9d1d70d6bcd58a928c8d2e912 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Use a converter in rule replacement API The rule replacement API should not really be in cmLocalGenerator, but it was historically, and this coupled many other things together here too, such as output conversion. Make the output converter a parameter so that rule replacement can be removed from cmLocalGenerator. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2bc4506..2a8b3e5 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -561,7 +561,8 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const } std::string cmLocalGenerator::ExpandRuleVariable( - std::string const& variable, const RuleVariables& replaceValues) + cmOutputConverter* outputConverter, std::string const& variable, + const RuleVariables& replaceValues) { if (replaceValues.LinkFlags) { if (variable == "LINK_FLAGS") { @@ -737,7 +738,7 @@ std::string cmLocalGenerator::ExpandRuleVariable( } } if (variable == "CMAKE_COMMAND") { - return this->ConvertToOutputFormat( + return outputConverter->ConvertToOutputFormat( cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), SHELL); } @@ -780,12 +781,12 @@ std::string cmLocalGenerator::ExpandRuleVariable( !compilerOptionExternalToolchain.empty()) { ret += " "; ret += compilerOptionExternalToolchain; - ret += this->EscapeForShell(compilerExternalToolchain, true); + ret += outputConverter->EscapeForShell(compilerExternalToolchain, true); } if (this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { ret += " "; ret += compilerOptionSysroot; - ret += this->EscapeForShell(this->CompilerSysroot, true); + ret += outputConverter->EscapeForShell(this->CompilerSysroot, true); } return ret; } @@ -794,14 +795,15 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->VariableMappings.find(variable); if (mapIt != this->VariableMappings.end()) { if (variable.find("_FLAG") == variable.npos) { - return this->ConvertToOutputForExisting(mapIt->second); + return outputConverter->ConvertToOutputForExisting(mapIt->second); } return mapIt->second; } return variable; } -void cmLocalGenerator::ExpandRuleVariables(std::string& s, +void cmLocalGenerator::ExpandRuleVariables(cmOutputConverter* outputConverter, + std::string& s, const RuleVariables& replaceValues) { std::string::size_type start = s.find('<'); @@ -825,7 +827,8 @@ void cmLocalGenerator::ExpandRuleVariables(std::string& s, } else { // extract the var std::string var = s.substr(start + 1, end - start - 1); - std::string replace = this->ExpandRuleVariable(var, replaceValues); + std::string replace = + this->ExpandRuleVariable(outputConverter, var, replaceValues); expandedInput += s.substr(pos, start - pos); expandedInput += replace; // move to next one diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index d54fbff..7359f50 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -347,7 +347,8 @@ public: void ProcessEvaluationFiles(std::vector& generatedFiles); // Expand rule variables in CMake of the type found in language rules - void ExpandRuleVariables(std::string& string, + void ExpandRuleVariables(cmOutputConverter* outputConverter, + std::string& string, const RuleVariables& replaceValues); const char* GetRuleLauncher(cmGeneratorTarget* target, @@ -361,7 +362,8 @@ protected: std::string& frameworkPath, std::string& linkPath); // Expand rule variables in a single string - std::string ExpandRuleVariable(std::string const& variable, + std::string ExpandRuleVariable(cmOutputConverter* outputConverter, + std::string const& variable, const RuleVariables& replaceValues); // Handle old-style install rules stored in the targets. diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index ea711c0..05596f8 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -494,7 +494,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( std::string launcher = property_value; launcher += " "; - this->ExpandRuleVariables(launcher, vars); + this->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 92b58ba..a4c73dd 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1005,7 +1005,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( launcher = val; launcher += " "; - this->ExpandRuleVariables(launcher, vars); + this->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 88bd07e..ce71c04 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -396,7 +396,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } this->LocalGenerator->TargetImplib = ""; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index fb44a6c..4016cfa 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -636,7 +636,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveCreateCommands.begin(); i != archiveCreateCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(cmd, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); real_link_commands.push_back(cmd); } } @@ -647,7 +648,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveAppendCommands.begin(); i != archiveAppendCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(cmd, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); real_link_commands.push_back(cmd); } } @@ -657,7 +659,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveFinishCommands.begin(); i != archiveFinishCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(cmd, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); // If there is no ranlib the command will be ":". Skip it. if (!cmd.empty() && cmd[0] != ':') { real_link_commands.push_back(cmd); @@ -680,7 +683,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } } this->LocalGenerator->TargetImplib = ""; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 1483fbb..a607ed6 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -600,7 +600,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( if (this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS") && lang_can_export_cmds && compileCommands.size() == 1) { std::string compileCommand = compileCommands[0]; - this->LocalGenerator->ExpandRuleVariables(compileCommand, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, + compileCommand, vars); std::string workingDirectory = cmSystemTools::CollapseFullPath( this->LocalGenerator->GetCurrentBinaryDirectory()); compileCommand.replace(compileCommand.find(langFlags), langFlags.size(), @@ -659,7 +660,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = compileCommands.begin(); i != compileCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } // Change the command working directory to the local build tree. @@ -722,7 +724,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = preprocessCommands.begin(); i != preprocessCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } this->LocalGenerator->CreateCDCommand( @@ -769,7 +772,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = assemblyCommands.begin(); i != assemblyCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } this->LocalGenerator->CreateCDCommand( diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index a52f3ef..0904d6b 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -250,7 +250,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) for (std::vector::iterator i = linkCmds.begin(); i != linkCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, vars); } { // If there is no ranlib the command will be ":". Skip it. diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 5c13f47..1513318 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -503,7 +503,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = ppCmds.begin(); i != ppCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(*i, ppVars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, ppVars); } // Run CMake dependency scanner on preprocessed output. @@ -616,7 +617,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, vars); } std::string cmdLine = @@ -1003,7 +1005,8 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { - this->GetLocalGenerator()->ExpandRuleVariables(*i, compileObjectVars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, compileObjectVars); } std::string cmdLine = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=adee2f4b870ad5aa27437feaf7360ae984afcf27 commit adee2f4b870ad5aa27437feaf7360ae984afcf27 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Store variable replacements as state These do not change over the lifetime of the cmLocalGenerator. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index bc70620..2bc4506 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -40,6 +40,28 @@ #include #endif +// List of variables that are replaced when +// rules are expanced. These variables are +// replaced in the form with GetSafeDefinition(var). +// ${LANG} is replaced in the variable first with all enabled +// languages. +static const char* ruleReplaceVars[] = { + "CMAKE_${LANG}_COMPILER", + "CMAKE_SHARED_LIBRARY_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_${LANG}_FLAGS", + "CMAKE_SHARED_LIBRARY_${LANG}_FLAGS", + "CMAKE_${LANG}_LINK_FLAGS", + "CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG", + "CMAKE_${LANG}_ARCHIVE", + "CMAKE_AR", + "CMAKE_CURRENT_SOURCE_DIR", + "CMAKE_CURRENT_BINARY_DIR", + "CMAKE_RANLIB", + "CMAKE_LINKER", + "CMAKE_CL_SHOWINCLUDES_PREFIX" +}; + cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) : cmOutputConverter(makefile->GetStateSnapshot()) , StateSnapshot(makefile->GetStateSnapshot()) @@ -56,6 +78,58 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) this->BackwardsCompatibilityFinal = false; this->ComputeObjectMaxPath(); + + std::vector enabledLanguages = + this->GetState()->GetEnabledLanguages(); + + this->CompilerSysroot = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); + + for (std::vector::iterator i = enabledLanguages.begin(); + i != enabledLanguages.end(); ++i) { + std::string const& lang = *i; + if (lang == "NONE") { + continue; + } + this->Compilers["CMAKE_" + lang + "_COMPILER"] = lang; + + this->VariableMappings["CMAKE_" + lang + "_COMPILER"] = + this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER"); + + std::string const& compilerArg1 = "CMAKE_" + lang + "_COMPILER_ARG1"; + std::string const& compilerTarget = "CMAKE_" + lang + "_COMPILER_TARGET"; + std::string const& compilerOptionTarget = + "CMAKE_" + lang + "_COMPILE_OPTIONS_TARGET"; + std::string const& compilerExternalToolchain = + "CMAKE_" + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionExternalToolchain = + "CMAKE_" + lang + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionSysroot = + "CMAKE_" + lang + "_COMPILE_OPTIONS_SYSROOT"; + + this->VariableMappings[compilerArg1] = + this->Makefile->GetSafeDefinition(compilerArg1); + this->VariableMappings[compilerTarget] = + this->Makefile->GetSafeDefinition(compilerTarget); + this->VariableMappings[compilerOptionTarget] = + this->Makefile->GetSafeDefinition(compilerOptionTarget); + this->VariableMappings[compilerExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerExternalToolchain); + this->VariableMappings[compilerOptionExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); + this->VariableMappings[compilerOptionSysroot] = + this->Makefile->GetSafeDefinition(compilerOptionSysroot); + + for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); + replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { + std::string actualReplace = *replaceIter; + if (actualReplace.find("${LANG}") != actualReplace.npos) { + cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); + } + + this->VariableMappings[actualReplace] = + this->Makefile->GetSafeDefinition(actualReplace); + } + } } cmLocalGenerator::~cmLocalGenerator() @@ -486,28 +560,6 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->Makefile->GetStateSnapshot(); } -// List of variables that are replaced when -// rules are expanced. These variables are -// replaced in the form with GetSafeDefinition(var). -// ${LANG} is replaced in the variable first with all enabled -// languages. -static const char* ruleReplaceVars[] = { - "CMAKE_${LANG}_COMPILER", - "CMAKE_SHARED_LIBRARY_CREATE_${LANG}_FLAGS", - "CMAKE_SHARED_MODULE_CREATE_${LANG}_FLAGS", - "CMAKE_SHARED_MODULE_${LANG}_FLAGS", - "CMAKE_SHARED_LIBRARY_${LANG}_FLAGS", - "CMAKE_${LANG}_LINK_FLAGS", - "CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG", - "CMAKE_${LANG}_ARCHIVE", - "CMAKE_AR", - "CMAKE_CURRENT_SOURCE_DIR", - "CMAKE_CURRENT_BINARY_DIR", - "CMAKE_RANLIB", - "CMAKE_LINKER", - "CMAKE_CL_SHOWINCLUDES_PREFIX" -}; - std::string cmLocalGenerator::ExpandRuleVariable( std::string const& variable, const RuleVariables& replaceValues) { @@ -689,84 +741,29 @@ std::string cmLocalGenerator::ExpandRuleVariable( cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), SHELL); } - std::vector enabledLanguages = - this->GetState()->GetEnabledLanguages(); - - std::map compilers; - - std::map variableMappings; - - std::string compilerSysroot = - this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); - - for (std::vector::iterator i = enabledLanguages.begin(); - i != enabledLanguages.end(); ++i) { - std::string const& lang = *i; - if (lang == "NONE") { - continue; - } - compilers["CMAKE_" + lang + "_COMPILER"] = lang; - - variableMappings["CMAKE_" + lang + "_COMPILER"] = - this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER"); - - std::string const& compilerArg1 = "CMAKE_" + lang + "_COMPILER_ARG1"; - std::string const& compilerTarget = "CMAKE_" + lang + "_COMPILER_TARGET"; - std::string const& compilerOptionTarget = - "CMAKE_" + lang + "_COMPILE_OPTIONS_TARGET"; - std::string const& compilerExternalToolchain = - "CMAKE_" + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"; - std::string const& compilerOptionExternalToolchain = - "CMAKE_" + lang + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"; - std::string const& compilerOptionSysroot = - "CMAKE_" + lang + "_COMPILE_OPTIONS_SYSROOT"; - - variableMappings[compilerArg1] = - this->Makefile->GetSafeDefinition(compilerArg1); - variableMappings[compilerTarget] = - this->Makefile->GetSafeDefinition(compilerTarget); - variableMappings[compilerOptionTarget] = - this->Makefile->GetSafeDefinition(compilerOptionTarget); - variableMappings[compilerExternalToolchain] = - this->Makefile->GetSafeDefinition(compilerExternalToolchain); - variableMappings[compilerOptionExternalToolchain] = - this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); - variableMappings[compilerOptionSysroot] = - this->Makefile->GetSafeDefinition(compilerOptionSysroot); - - for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); - replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { - std::string const& lang = *i; - std::string actualReplace = *replaceIter; - if (actualReplace.find("${LANG}") != actualReplace.npos) { - cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); - } - - variableMappings[actualReplace] = - this->Makefile->GetSafeDefinition(actualReplace); - } - } std::map::iterator compIt = - compilers.find(variable); + this->Compilers.find(variable); - if (compIt != compilers.end()) { + if (compIt != this->Compilers.end()) { std::string ret = - variableMappings["CMAKE_" + compIt->second + "_COMPILER"]; + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]; std::string const& compilerArg1 = - variableMappings[compIt->first + "_COMPILER_ARG1"]; + this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; std::string const& compilerTarget = - variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; std::string const& compilerOptionTarget = - variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_TARGET"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_TARGET"]; std::string const& compilerExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; std::string const& compilerOptionExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; std::string const& compilerOptionSysroot = - variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_SYSROOT"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_SYSROOT"]; // if there is a required first argument to the compiler add it // to the compiler string @@ -785,17 +782,17 @@ std::string cmLocalGenerator::ExpandRuleVariable( ret += compilerOptionExternalToolchain; ret += this->EscapeForShell(compilerExternalToolchain, true); } - if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { + if (this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { ret += " "; ret += compilerOptionSysroot; - ret += this->EscapeForShell(compilerSysroot, true); + ret += this->EscapeForShell(this->CompilerSysroot, true); } return ret; } std::map::iterator mapIt = - variableMappings.find(variable); - if (mapIt != variableMappings.end()) { + this->VariableMappings.find(variable); + if (mapIt != this->VariableMappings.end()) { if (variable.find("_FLAG") == variable.npos) { return this->ConvertToOutputForExisting(mapIt->second); } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 44d10bb..d54fbff 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -390,6 +390,10 @@ protected: std::vector OwnedImportedGeneratorTargets; std::map AliasTargets; + std::map Compilers; + std::map VariableMappings; + std::string CompilerSysroot; + bool EmitUniversalBinaryFlags; // Hack for ExpandRuleVariable until object-oriented version is https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3855acab5f925de761e384007592f54b471eeacd commit 3855acab5f925de761e384007592f54b471eeacd Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Merge loops which populate mapping diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index b4b86da..bc70620 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -733,6 +733,18 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); variableMappings[compilerOptionSysroot] = this->Makefile->GetSafeDefinition(compilerOptionSysroot); + + for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); + replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { + std::string const& lang = *i; + std::string actualReplace = *replaceIter; + if (actualReplace.find("${LANG}") != actualReplace.npos) { + cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); + } + + variableMappings[actualReplace] = + this->Makefile->GetSafeDefinition(actualReplace); + } } std::map::iterator compIt = @@ -781,20 +793,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( return ret; } - for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); - replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { - for (std::vector::iterator i = enabledLanguages.begin(); - i != enabledLanguages.end(); ++i) { - std::string const& lang = *i; - std::string actualReplace = *replaceIter; - if (actualReplace.find("${LANG}") != actualReplace.npos) { - cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); - } - - variableMappings[actualReplace] = - this->Makefile->GetSafeDefinition(actualReplace); - } - } std::map::iterator mapIt = variableMappings.find(variable); if (mapIt != variableMappings.end()) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=331e584c686e3a20708287d807f18a60d64568b0 commit 331e584c686e3a20708287d807f18a60d64568b0 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Populate variable mapping for all replacements This reduces the final replacement to a simple query in the map, which is much more readable than what was here before. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 8d8b8e3..b4b86da 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -738,8 +738,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::map::iterator compIt = compilers.find(variable); - std::string replace = this->Makefile->GetSafeDefinition(variable); - if (compIt != compilers.end()) { std::string ret = variableMappings["CMAKE_" + compIt->second + "_COMPILER"]; @@ -783,7 +781,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( return ret; } - // loop over language specific replace variables for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { for (std::vector::iterator i = enabledLanguages.begin(); @@ -793,14 +790,18 @@ std::string cmLocalGenerator::ExpandRuleVariable( if (actualReplace.find("${LANG}") != actualReplace.npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); } - if (actualReplace == variable) { - // if the variable is not a FLAG then treat it like a path - if (variable.find("_FLAG") == variable.npos) { - return this->ConvertToOutputForExisting(replace); - } - return replace; - } + + variableMappings[actualReplace] = + this->Makefile->GetSafeDefinition(actualReplace); + } + } + std::map::iterator mapIt = + variableMappings.find(variable); + if (mapIt != variableMappings.end()) { + if (variable.find("_FLAG") == variable.npos) { + return this->ConvertToOutputForExisting(mapIt->second); } + return mapIt->second; } return variable; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76624fb8470bdc63b3844f84edc3c941bc524f41 commit 76624fb8470bdc63b3844f84edc3c941bc524f41 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Extract compiler option replacement from loop There is no need to be in the loop. Being there just adds to complexity. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 87b5e65..8d8b8e3 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -735,6 +735,54 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->Makefile->GetSafeDefinition(compilerOptionSysroot); } + std::map::iterator compIt = + compilers.find(variable); + + std::string replace = this->Makefile->GetSafeDefinition(variable); + + if (compIt != compilers.end()) { + std::string ret = + variableMappings["CMAKE_" + compIt->second + "_COMPILER"]; + std::string const& compilerArg1 = + variableMappings[compIt->first + "_COMPILER_ARG1"]; + std::string const& compilerTarget = + variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + std::string const& compilerOptionTarget = + variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_TARGET"]; + std::string const& compilerExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionSysroot = + variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_SYSROOT"]; + + // if there is a required first argument to the compiler add it + // to the compiler string + if (!compilerArg1.empty()) { + ret += " "; + ret += compilerArg1; + } + if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { + ret += " "; + ret += compilerOptionTarget; + ret += compilerTarget; + } + if (!compilerExternalToolchain.empty() && + !compilerOptionExternalToolchain.empty()) { + ret += " "; + ret += compilerOptionExternalToolchain; + ret += this->EscapeForShell(compilerExternalToolchain, true); + } + if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { + ret += " "; + ret += compilerOptionSysroot; + ret += this->EscapeForShell(compilerSysroot, true); + } + return ret; + } + // loop over language specific replace variables for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { @@ -742,55 +790,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( i != enabledLanguages.end(); ++i) { std::string const& lang = *i; std::string actualReplace = *replaceIter; - - std::map::iterator compIt = - compilers.find(variable); - - std::string replace = this->Makefile->GetSafeDefinition(variable); - - if (compIt != compilers.end()) { - std::string ret = variableMappings["CMAKE_" + lang + "_COMPILER"]; - std::string const& compilerArg1 = - variableMappings[compIt->first + "_COMPILER_ARG1"]; - std::string const& compilerTarget = - variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; - std::string const& compilerOptionTarget = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_TARGET"]; - std::string const& compilerExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionSysroot = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_SYSROOT"]; - - // if there is a required first argument to the compiler add it - // to the compiler string - if (!compilerArg1.empty()) { - ret += " "; - ret += compilerArg1; - } - if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { - ret += " "; - ret += compilerOptionTarget; - ret += compilerTarget; - } - if (!compilerExternalToolchain.empty() && - !compilerOptionExternalToolchain.empty()) { - ret += " "; - ret += compilerOptionExternalToolchain; - ret += this->EscapeForShell(compilerExternalToolchain, true); - } - if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { - ret += " "; - ret += compilerOptionSysroot; - ret += this->EscapeForShell(compilerSysroot, true); - } - return ret; - } if (actualReplace.find("${LANG}") != actualReplace.npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e5c1c9224b7b10df29732ab16d7fbc052faba40 commit 5e5c1c9224b7b10df29732ab16d7fbc052faba40 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Populate a container of mappings for replacements The same variables are replaced/retrieved from cmMakefile again and again. Use a container so that they don't have to be retrieved repeatedly, and to simplify the nested loop. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index d451270..87b5e65 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -693,6 +693,12 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->GetState()->GetEnabledLanguages(); std::map compilers; + + std::map variableMappings; + + std::string compilerSysroot = + this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); + for (std::vector::iterator i = enabledLanguages.begin(); i != enabledLanguages.end(); ++i) { std::string const& lang = *i; @@ -700,6 +706,33 @@ std::string cmLocalGenerator::ExpandRuleVariable( continue; } compilers["CMAKE_" + lang + "_COMPILER"] = lang; + + variableMappings["CMAKE_" + lang + "_COMPILER"] = + this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER"); + + std::string const& compilerArg1 = "CMAKE_" + lang + "_COMPILER_ARG1"; + std::string const& compilerTarget = "CMAKE_" + lang + "_COMPILER_TARGET"; + std::string const& compilerOptionTarget = + "CMAKE_" + lang + "_COMPILE_OPTIONS_TARGET"; + std::string const& compilerExternalToolchain = + "CMAKE_" + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionExternalToolchain = + "CMAKE_" + lang + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionSysroot = + "CMAKE_" + lang + "_COMPILE_OPTIONS_SYSROOT"; + + variableMappings[compilerArg1] = + this->Makefile->GetSafeDefinition(compilerArg1); + variableMappings[compilerTarget] = + this->Makefile->GetSafeDefinition(compilerTarget); + variableMappings[compilerOptionTarget] = + this->Makefile->GetSafeDefinition(compilerOptionTarget); + variableMappings[compilerExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerExternalToolchain); + variableMappings[compilerOptionExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); + variableMappings[compilerOptionSysroot] = + this->Makefile->GetSafeDefinition(compilerOptionSysroot); } // loop over language specific replace variables @@ -707,17 +740,8 @@ std::string cmLocalGenerator::ExpandRuleVariable( replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { for (std::vector::iterator i = enabledLanguages.begin(); i != enabledLanguages.end(); ++i) { - const char* lang = i->c_str(); + std::string const& lang = *i; std::string actualReplace = *replaceIter; - // If this is the compiler then look for the extra variable - // _COMPILER_ARG1 which must be the first argument to the compiler - const char* compilerArg1 = CM_NULLPTR; - const char* compilerTarget = CM_NULLPTR; - const char* compilerOptionTarget = CM_NULLPTR; - const char* compilerExternalToolchain = CM_NULLPTR; - const char* compilerOptionExternalToolchain = CM_NULLPTR; - const char* compilerSysroot = CM_NULLPTR; - const char* compilerOptionSysroot = CM_NULLPTR; std::map::iterator compIt = compilers.find(variable); @@ -725,40 +749,42 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::string replace = this->Makefile->GetSafeDefinition(variable); if (compIt != compilers.end()) { - std::string arg1 = compIt->first + "_ARG1"; - compilerArg1 = this->Makefile->GetDefinition(arg1); - compilerTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + "_COMPILER_TARGET"); - compilerOptionTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_TARGET"); - compilerExternalToolchain = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"); - compilerOptionExternalToolchain = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"); - compilerSysroot = this->Makefile->GetDefinition("CMAKE_SYSROOT"); - compilerOptionSysroot = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_SYSROOT"); - - std::string ret = this->ConvertToOutputForExisting(replace); + std::string ret = variableMappings["CMAKE_" + lang + "_COMPILER"]; + std::string const& compilerArg1 = + variableMappings[compIt->first + "_COMPILER_ARG1"]; + std::string const& compilerTarget = + variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + std::string const& compilerOptionTarget = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_TARGET"]; + std::string const& compilerExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionSysroot = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_SYSROOT"]; + // if there is a required first argument to the compiler add it // to the compiler string - if (compilerArg1) { + if (!compilerArg1.empty()) { ret += " "; ret += compilerArg1; } - if (compilerTarget && compilerOptionTarget) { + if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { ret += " "; ret += compilerOptionTarget; ret += compilerTarget; } - if (compilerExternalToolchain && compilerOptionExternalToolchain) { + if (!compilerExternalToolchain.empty() && + !compilerOptionExternalToolchain.empty()) { ret += " "; ret += compilerOptionExternalToolchain; ret += this->EscapeForShell(compilerExternalToolchain, true); } - if (compilerSysroot && compilerOptionSysroot) { + if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { ret += " "; ret += compilerOptionSysroot; ret += this->EscapeForShell(compilerSysroot, true); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=881c15b360a11f4951ba185e54fbaf8ec028b237 commit 881c15b360a11f4951ba185e54fbaf8ec028b237 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:48 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Move compiler option handling to be more direct diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 03f5d2c..d451270 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -740,6 +740,30 @@ std::string cmLocalGenerator::ExpandRuleVariable( compilerSysroot = this->Makefile->GetDefinition("CMAKE_SYSROOT"); compilerOptionSysroot = this->Makefile->GetDefinition( std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_SYSROOT"); + + std::string ret = this->ConvertToOutputForExisting(replace); + // if there is a required first argument to the compiler add it + // to the compiler string + if (compilerArg1) { + ret += " "; + ret += compilerArg1; + } + if (compilerTarget && compilerOptionTarget) { + ret += " "; + ret += compilerOptionTarget; + ret += compilerTarget; + } + if (compilerExternalToolchain && compilerOptionExternalToolchain) { + ret += " "; + ret += compilerOptionExternalToolchain; + ret += this->EscapeForShell(compilerExternalToolchain, true); + } + if (compilerSysroot && compilerOptionSysroot) { + ret += " "; + ret += compilerOptionSysroot; + ret += this->EscapeForShell(compilerSysroot, true); + } + return ret; } if (actualReplace.find("${LANG}") != actualReplace.npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); @@ -747,29 +771,7 @@ std::string cmLocalGenerator::ExpandRuleVariable( if (actualReplace == variable) { // if the variable is not a FLAG then treat it like a path if (variable.find("_FLAG") == variable.npos) { - std::string ret = this->ConvertToOutputForExisting(replace); - // if there is a required first argument to the compiler add it - // to the compiler string - if (compilerArg1) { - ret += " "; - ret += compilerArg1; - } - if (compilerTarget && compilerOptionTarget) { - ret += " "; - ret += compilerOptionTarget; - ret += compilerTarget; - } - if (compilerExternalToolchain && compilerOptionExternalToolchain) { - ret += " "; - ret += compilerOptionExternalToolchain; - ret += this->EscapeForShell(compilerExternalToolchain, true); - } - if (compilerSysroot && compilerOptionSysroot) { - ret += " "; - ret += compilerOptionSysroot; - ret += this->EscapeForShell(compilerSysroot, true); - } - return ret; + return this->ConvertToOutputForExisting(replace); } return replace; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c4ce8062620e6d1375316a5c8966690c475fc2a commit 7c4ce8062620e6d1375316a5c8966690c475fc2a Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:48 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Move variable to where it can be used easily diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index c405180..03f5d2c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -722,6 +722,8 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::map::iterator compIt = compilers.find(variable); + std::string replace = this->Makefile->GetSafeDefinition(variable); + if (compIt != compilers.end()) { std::string arg1 = compIt->first + "_ARG1"; compilerArg1 = this->Makefile->GetDefinition(arg1); @@ -743,7 +745,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); } if (actualReplace == variable) { - std::string replace = this->Makefile->GetSafeDefinition(variable); // if the variable is not a FLAG then treat it like a path if (variable.find("_FLAG") == variable.npos) { std::string ret = this->ConvertToOutputForExisting(replace); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=beac5cbd01a48e0d53114ee0156f79108a6ab6ac commit beac5cbd01a48e0d53114ee0156f79108a6ab6ac Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:48 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Use the language from the compiler container This is just to make follow-up diffs smaller. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a9de948..c405180 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -726,17 +726,18 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::string arg1 = compIt->first + "_ARG1"; compilerArg1 = this->Makefile->GetDefinition(arg1); compilerTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILER_TARGET"); + std::string("CMAKE_") + compIt->second + "_COMPILER_TARGET"); compilerOptionTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILE_OPTIONS_TARGET"); + std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_TARGET"); compilerExternalToolchain = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"); - compilerOptionExternalToolchain = - this->Makefile->GetDefinition(std::string("CMAKE_") + lang + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"); + std::string("CMAKE_") + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"); + compilerOptionExternalToolchain = this->Makefile->GetDefinition( + std::string("CMAKE_") + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"); compilerSysroot = this->Makefile->GetDefinition("CMAKE_SYSROOT"); compilerOptionSysroot = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILE_OPTIONS_SYSROOT"); + std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_SYSROOT"); } if (actualReplace.find("${LANG}") != actualReplace.npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2fa025ce3d264d9f3313a83ef77a0ded398d07f commit b2fa025ce3d264d9f3313a83ef77a0ded398d07f Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:48 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Introduce a container of compiler names Use it to determine when a rule replacement should gain extra options. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 4f285cf..a9de948 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -691,6 +691,17 @@ std::string cmLocalGenerator::ExpandRuleVariable( } std::vector enabledLanguages = this->GetState()->GetEnabledLanguages(); + + std::map compilers; + for (std::vector::iterator i = enabledLanguages.begin(); + i != enabledLanguages.end(); ++i) { + std::string const& lang = *i; + if (lang == "NONE") { + continue; + } + compilers["CMAKE_" + lang + "_COMPILER"] = lang; + } + // loop over language specific replace variables for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { @@ -707,9 +718,12 @@ std::string cmLocalGenerator::ExpandRuleVariable( const char* compilerOptionExternalToolchain = CM_NULLPTR; const char* compilerSysroot = CM_NULLPTR; const char* compilerOptionSysroot = CM_NULLPTR; - if (actualReplace == "CMAKE_${LANG}_COMPILER") { - std::string arg1 = actualReplace + "_ARG1"; - cmSystemTools::ReplaceString(arg1, "${LANG}", lang); + + std::map::iterator compIt = + compilers.find(variable); + + if (compIt != compilers.end()) { + std::string arg1 = compIt->first + "_ARG1"; compilerArg1 = this->Makefile->GetDefinition(arg1); compilerTarget = this->Makefile->GetDefinition( std::string("CMAKE_") + lang + "_COMPILER_TARGET"); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bc4312ca064a82b3ac157ef0b67235e5cb02afc commit 4bc4312ca064a82b3ac157ef0b67235e5cb02afc Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:48 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Simplify loop with range algorithm diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 138fe55..4f285cf 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -505,8 +505,7 @@ static const char* ruleReplaceVars[] = { "CMAKE_CURRENT_BINARY_DIR", "CMAKE_RANLIB", "CMAKE_LINKER", - "CMAKE_CL_SHOWINCLUDES_PREFIX", - CM_NULLPTR + "CMAKE_CL_SHOWINCLUDES_PREFIX" }; std::string cmLocalGenerator::ExpandRuleVariable( @@ -693,12 +692,12 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::vector enabledLanguages = this->GetState()->GetEnabledLanguages(); // loop over language specific replace variables - int pos = 0; - while (ruleReplaceVars[pos]) { + for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); + replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { for (std::vector::iterator i = enabledLanguages.begin(); i != enabledLanguages.end(); ++i) { const char* lang = i->c_str(); - std::string actualReplace = ruleReplaceVars[pos]; + std::string actualReplace = *replaceIter; // If this is the compiler then look for the extra variable // _COMPILER_ARG1 which must be the first argument to the compiler const char* compilerArg1 = CM_NULLPTR; @@ -759,7 +758,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( return replace; } } - pos++; } return variable; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7f6a6164e7775eeabec0aa5d66c81a365b3d1f1 commit d7f6a6164e7775eeabec0aa5d66c81a365b3d1f1 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:47 2016 +0200 Commit: Stephen Kelly CommitDate: Mon Oct 10 21:05:24 2016 +0200 cmLocalGenerator: Remove the launcher from RuleVariables This one is not like the others as it doesn't participate in substitutions. Keep ExpandRuleVariables doing only one thing and make callers responsible for inserting a launcher prefix, simplifying the code all-around. Remove now-obsolete InsertRuleLauncher method. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 3b19694..138fe55 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -767,10 +767,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( void cmLocalGenerator::ExpandRuleVariables(std::string& s, const RuleVariables& replaceValues) { - if (replaceValues.RuleLauncher) { - this->InsertRuleLauncher(s, replaceValues.CMTarget, - replaceValues.RuleLauncher); - } std::string::size_type start = s.find('<'); // no variables to expand if (start == s.npos) { @@ -814,17 +810,6 @@ const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target, return this->Makefile->GetProperty(prop); } -void cmLocalGenerator::InsertRuleLauncher(std::string& s, - cmGeneratorTarget* target, - const std::string& prop) -{ - if (const char* val = this->GetRuleLauncher(target, prop)) { - std::ostringstream wrapped; - wrapped << val << " " << s; - s = wrapped.str(); - } -} - std::string cmLocalGenerator::ConvertToIncludeReference( std::string const& path, OutputFormat format, bool forceFullPaths) { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 69c4101..44d10bb 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -346,6 +346,13 @@ public: void CreateEvaluationFileOutputs(const std::string& config); void ProcessEvaluationFiles(std::vector& generatedFiles); + // Expand rule variables in CMake of the type found in language rules + void ExpandRuleVariables(std::string& string, + const RuleVariables& replaceValues); + + const char* GetRuleLauncher(cmGeneratorTarget* target, + const std::string& prop); + protected: ///! put all the libraries for a target on into the given stream void OutputLinkLibraries(cmComputeLinkInformation* pcli, @@ -353,18 +360,10 @@ protected: std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath); - // Expand rule variables in CMake of the type found in language rules - void ExpandRuleVariables(std::string& string, - const RuleVariables& replaceValues); // Expand rule variables in a single string std::string ExpandRuleVariable(std::string const& variable, const RuleVariables& replaceValues); - const char* GetRuleLauncher(cmGeneratorTarget* target, - const std::string& prop); - void InsertRuleLauncher(std::string& s, cmGeneratorTarget* target, - const std::string& prop); - // Handle old-style install rules stored in the targets. void GenerateTargetInstallRules( std::ostream& os, const std::string& config, diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index e25eb0f..ea711c0 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -468,8 +468,8 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatements() std::string cmLocalNinjaGenerator::MakeCustomLauncher( cmCustomCommandGenerator const& ccg) { - const char* property = "RULE_LAUNCH_CUSTOM"; - const char* property_value = this->Makefile->GetProperty(property); + const char* property_value = + this->Makefile->GetProperty("RULE_LAUNCH_CUSTOM"); if (!property_value || !*property_value) { return std::string(); @@ -478,7 +478,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( // Expand rules in the empty string. It may insert the launcher and // perform replacements. RuleVariables vars; - vars.RuleLauncher = property; + std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { @@ -491,7 +491,9 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( } vars.Output = output.c_str(); - std::string launcher; + std::string launcher = property_value; + launcher += " "; + this->ExpandRuleVariables(launcher, vars); if (!launcher.empty()) { launcher += " "; diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index b04788d..56aa9bf 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -58,12 +58,6 @@ public: return this->HomeRelativeOutputPath; } - void ExpandRuleVariables(std::string& string, - const RuleVariables& replaceValues) - { - cmLocalGenerator::ExpandRuleVariables(string, replaceValues); - } - std::string BuildCommandLine(const std::vector& cmdLines); void AppendTargetOutputs(cmGeneratorTarget* target, cmNinjaDeps& outputs); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 02eef59..92b58ba 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -984,13 +984,11 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( std::string launcher; // Short-circuit if there is no launcher. - const char* prop = "RULE_LAUNCH_CUSTOM"; - const char* val = this->GetRuleLauncher(target, prop); + const char* val = this->GetRuleLauncher(target, "RULE_LAUNCH_CUSTOM"); if (val && *val) { // Expand rules in the empty string. It may insert the launcher and // perform replacements. RuleVariables vars; - vars.RuleLauncher = prop; vars.CMTarget = target; std::string output; const std::vector& outputs = ccg.GetOutputs(); @@ -1005,6 +1003,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( } vars.Output = output.c_str(); + launcher = val; + launcher += " "; this->ExpandRuleVariables(launcher, vars); if (!launcher.empty()) { launcher += " "; diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index bfc4857..88bd07e 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -332,7 +332,6 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string manifests = this->GetManifests(); cmLocalGenerator::RuleVariables vars; - vars.RuleLauncher = "RULE_LAUNCH_LINK"; vars.CMTarget = this->GeneratorTarget; vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); @@ -383,10 +382,20 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) real_link_commands.push_back(cmakeCommand); } + std::string launcher; + + const char* val = this->LocalGenerator->GetRuleLauncher( + this->GeneratorTarget, "RULE_LAUNCH_LINK"); + if (val && *val) { + launcher = val; + launcher += " "; + } + // Expand placeholders in the commands. this->LocalGenerator->TargetImplib = targetOutPathImport; for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { + *i = launcher + *i; this->LocalGenerator->ExpandRuleVariables(*i, vars); } this->LocalGenerator->TargetImplib = ""; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 4488f06..fb44a6c 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -552,7 +552,6 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( vars.TargetVersionMajor = targetVersionMajor.c_str(); vars.TargetVersionMinor = targetVersionMinor.c_str(); - vars.RuleLauncher = "RULE_LAUNCH_LINK"; vars.CMTarget = this->GeneratorTarget; vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); @@ -614,6 +613,14 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( } vars.LanguageCompileFlags = langFlags.c_str(); + std::string launcher; + const char* val = this->LocalGenerator->GetRuleLauncher( + this->GeneratorTarget, "RULE_LAUNCH_LINK"); + if (val && *val) { + launcher = val; + launcher += " "; + } + // Construct the main link rule and expand placeholders. this->LocalGenerator->TargetImplib = targetOutPathImport; if (useArchiveRules) { @@ -628,7 +635,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::const_iterator i = archiveCreateCommands.begin(); i != archiveCreateCommands.end(); ++i) { - std::string cmd = *i; + std::string cmd = launcher + *i; this->LocalGenerator->ExpandRuleVariables(cmd, vars); real_link_commands.push_back(cmd); } @@ -639,7 +646,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::const_iterator i = archiveAppendCommands.begin(); i != archiveAppendCommands.end(); ++i) { - std::string cmd = *i; + std::string cmd = launcher + *i; this->LocalGenerator->ExpandRuleVariables(cmd, vars); real_link_commands.push_back(cmd); } @@ -649,7 +656,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::const_iterator i = archiveFinishCommands.begin(); i != archiveFinishCommands.end(); ++i) { - std::string cmd = *i; + std::string cmd = launcher + *i; this->LocalGenerator->ExpandRuleVariables(cmd, vars); // If there is no ranlib the command will be ":". Skip it. if (!cmd.empty() && cmd[0] != ':') { @@ -672,6 +679,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Expand placeholders. for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { + *i = launcher + *i; this->LocalGenerator->ExpandRuleVariables(*i, vars); } } diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index ab086eb..a52f3ef 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -168,7 +168,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) if (!this->GetGlobalGenerator()->HasRule(ruleName)) { cmLocalGenerator::RuleVariables vars; - vars.RuleLauncher = "RULE_LAUNCH_LINK"; vars.CMTarget = this->GetGeneratorTarget(); vars.Language = this->TargetLinkLanguage.c_str(); @@ -238,10 +237,19 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) vars.LanguageCompileFlags = langFlags.c_str(); } + std::string launcher; + const char* val = this->GetLocalGenerator()->GetRuleLauncher( + this->GetGeneratorTarget(), "RULE_LAUNCH_LINK"); + if (val && *val) { + launcher = val; + launcher += " "; + } + // Rule for linking library/executable. std::vector linkCmds = this->ComputeLinkCmd(); for (std::vector::iterator i = linkCmds.begin(); i != linkCmds.end(); ++i) { + *i = launcher + *i; this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); } { diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index fb2581d..5c13f47 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -374,7 +374,6 @@ void cmNinjaTargetGenerator::WriteLanguageRules(const std::string& language) void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) { cmLocalGenerator::RuleVariables vars; - vars.RuleLauncher = "RULE_LAUNCH_COMPILE"; vars.CMTarget = this->GetGeneratorTarget(); vars.Language = lang.c_str(); vars.Source = "$IN_ABS"; @@ -456,6 +455,14 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) ConvertToNinjaPath(this->GetTargetDependInfoPath(lang)), cmLocalGenerator::SHELL); + std::string launcher; + const char* val = this->GetLocalGenerator()->GetRuleLauncher( + this->GetGeneratorTarget(), "RULE_LAUNCH_COMPILE"); + if (val && *val) { + launcher = val; + launcher += " "; + } + if (explicitPP) { // Lookup the explicit preprocessing rule. std::string const ppVar = "CMAKE_" + lang + "_PREPROCESS_SOURCE"; @@ -467,7 +474,6 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) std::string const ppDepfile = "$DEP_FILE"; cmLocalGenerator::RuleVariables ppVars; - ppVars.RuleLauncher = vars.RuleLauncher; ppVars.CMTarget = vars.CMTarget; ppVars.Language = vars.Language; ppVars.Object = "$out"; // for RULE_LAUNCH_COMPILE @@ -496,6 +502,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = ppCmds.begin(); i != ppCmds.end(); ++i) { + *i = launcher + *i; this->GetLocalGenerator()->ExpandRuleVariables(*i, ppVars); } @@ -608,6 +615,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { + *i = launcher + *i; this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); } ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 + Source/cmLocalGenerator.cxx | 412 +++++------------------- Source/cmLocalGenerator.h | 63 +--- Source/cmLocalNinjaGenerator.cxx | 28 +- Source/cmLocalNinjaGenerator.h | 8 +- Source/cmLocalUnixMakefileGenerator3.cxx | 17 +- Source/cmMakefileExecutableTargetGenerator.cxx | 27 +- Source/cmMakefileLibraryTargetGenerator.cxx | 40 ++- Source/cmMakefileTargetGenerator.cxx | 23 +- Source/cmNinjaNormalTargetGenerator.cxx | 24 +- Source/cmNinjaTargetGenerator.cxx | 41 ++- Source/cmRulePlaceholderExpander.cxx | 299 +++++++++++++++++ Source/cmRulePlaceholderExpander.h | 85 +++++ bootstrap | 1 + 14 files changed, 631 insertions(+), 439 deletions(-) create mode 100644 Source/cmRulePlaceholderExpander.cxx create mode 100644 Source/cmRulePlaceholderExpander.h hooks/post-receive -- CMake From steveire at gmail.com Mon Oct 10 18:05:13 2016 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 10 Oct 2016 18:05:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-384-g17bef2c Message-ID: <20161010220513.6FDFFF5FA5@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 17bef2cd6780731f77be1383f74ddb5d9c44bffc (commit) via 9dcfa5f09b2b6345c3a83612a69d3e94bc43aac9 (commit) from 885c6f5f348a45174cf5e3a799dc8c0f13c37e67 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17bef2cd6780731f77be1383f74ddb5d9c44bffc commit 17bef2cd6780731f77be1383f74ddb5d9c44bffc Merge: 885c6f5 9dcfa5f Author: Stephen Kelly AuthorDate: Mon Oct 10 18:05:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 18:05:12 2016 -0400 Merge topic 'extract-cmRulePlaceholderExpander' into next 9dcfa5f0 Fix output bug https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9dcfa5f09b2b6345c3a83612a69d3e94bc43aac9 commit 9dcfa5f09b2b6345c3a83612a69d3e94bc43aac9 Author: Stephen Kelly AuthorDate: Tue Oct 11 00:04:49 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 11 00:04:49 2016 +0200 Fix output bug diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx index 796c975..601c3b4 100644 --- a/Source/cmRulePlaceholderExpander.cxx +++ b/Source/cmRulePlaceholderExpander.cxx @@ -204,8 +204,8 @@ std::string cmRulePlaceholderExpander::ExpandRuleVariable( this->Compilers.find(variable); if (compIt != this->Compilers.end()) { - std::string ret = - this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]; + std::string ret = outputConverter->ConvertToOutputForExisting( + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]); std::string const& compilerArg1 = this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; std::string const& compilerTarget = ----------------------------------------------------------------------- Summary of changes: Source/cmRulePlaceholderExpander.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Mon Oct 10 18:44:24 2016 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 10 Oct 2016 18:44:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-394-g67c528c Message-ID: <20161010224424.100CAE6499@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 67c528c03d2c598e4922f932c5598d5da91bc408 (commit) via 6f0cee13fdadd4573e9dd57c1713d9a674abb713 (commit) via a60ea0a957978495bd8a2dacb17447ef9e0bc694 (commit) via 8b3af6a7ca2d4938568df8dc70c9d44c62ba9fe1 (commit) via 49afda6b4e94d7747058bf5174bda6c333c921c6 (commit) via 91bc8ec9b8941f15c9adca532afa2dea9d1c1fa1 (commit) via 3743af8aa6db573370b5f4d10b06d35ab507b894 (commit) via 780b5ea7c5b416e17f469235c08679fa3417262b (commit) via b9badf851e865ef7076abb49904785b026909a49 (commit) via b2c6630c566344c4289cf312adfa45f939820f54 (commit) from 17bef2cd6780731f77be1383f74ddb5d9c44bffc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67c528c03d2c598e4922f932c5598d5da91bc408 commit 67c528c03d2c598e4922f932c5598d5da91bc408 Merge: 17bef2c 6f0cee1 Author: Stephen Kelly AuthorDate: Mon Oct 10 18:44:22 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 10 18:44:22 2016 -0400 Merge topic 'extract-cmRulePlaceholderExpander' into next 6f0cee13 cmRulePlaceholderExpander: Port clients to direct-use a60ea0a9 cmRulePlaceholderExpander: Extract from cmLocalGenerator 8b3af6a7 cmLocalGenerator: Use strings instead of a Target in rule replacement 49afda6b cmLocalGenerator: Use a converter in rule replacement API 91bc8ec9 cmLocalGenerator: Store variable replacements as state 3743af8a cmLocalGenerator: Merge loops which populate mapping 780b5ea7 cmLocalGenerator: Populate variable mapping for all replacements b9badf85 cmLocalGenerator: Extract compiler option replacement from loop b2c6630c cmLocalGenerator: Populate a container of mappings for replacements https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f0cee13fdadd4573e9dd57c1713d9a674abb713 commit 6f0cee13fdadd4573e9dd57c1713d9a674abb713 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 11 00:43:48 2016 +0200 cmRulePlaceholderExpander: Port clients to direct-use Add a factory function to cmLocalGenerator so that variableMappings can be provided from it, and so that Ninja can always have a hard-coded TargetImpLib. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 615168d..1c3a97d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -133,6 +133,13 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) } } +cmRulePlaceholderExpander* cmLocalGenerator::CreateRulePlaceholderExpander() + const +{ + return new cmRulePlaceholderExpander(this->Compilers, this->VariableMappings, + this->CompilerSysroot); +} + cmLocalGenerator::~cmLocalGenerator() { cmDeleteAll(this->GeneratorTargets); @@ -561,17 +568,6 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->Makefile->GetStateSnapshot(); } -void cmLocalGenerator::ExpandRuleVariables(cmOutputConverter* outputConverter, - std::string& s, - const RuleVariables& replaceValues) -{ - cmRulePlaceholderExpander rulePlaceholderExpander( - this->Compilers, this->VariableMappings, this->CompilerSysroot); - rulePlaceholderExpander.SetTargetImpLib(this->TargetImplib); - rulePlaceholderExpander.ExpandRuleVariables(outputConverter, s, - replaceValues); -} - const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target, const std::string& prop) { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 6f8426d..055e1a9 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -24,6 +24,7 @@ class cmComputeLinkInformation; class cmCustomCommandGenerator; class cmGeneratorTarget; class cmGlobalGenerator; +class cmRulePlaceholderExpander; class cmMakefile; class cmSourceFile; class cmLinkLineComputer; @@ -85,6 +86,8 @@ public: return this->GlobalGenerator; } + virtual cmRulePlaceholderExpander* CreateRulePlaceholderExpander() const; + std::string GetLinkLibsCMP0065(std::string const& linkLanguage, cmGeneratorTarget& tgt) const; @@ -218,10 +221,6 @@ public: // preprocessed files and assembly files. void GetIndividualFileTargets(std::vector&) {} - struct RuleVariables : cmRulePlaceholderExpander::RuleVariables - { - }; - /** * Get the relative path from the generator output directory to a * per-target support directory. @@ -315,11 +314,6 @@ public: void CreateEvaluationFileOutputs(const std::string& config); void ProcessEvaluationFiles(std::vector& generatedFiles); - // Expand rule variables in CMake of the type found in language rules - void ExpandRuleVariables(cmOutputConverter* outputConverter, - std::string& string, - const RuleVariables& replaceValues); - const char* GetRuleLauncher(cmGeneratorTarget* target, const std::string& prop); @@ -362,10 +356,6 @@ protected: bool EmitUniversalBinaryFlags; - // Hack for ExpandRuleVariable until object-oriented version is - // committed. - std::string TargetImplib; - KWIML_INT_uint64_t BackwardsCompatibility; bool BackwardsCompatibilityFinal; diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 05596f8..1863376 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -10,6 +10,7 @@ #include "cmGlobalNinjaGenerator.h" #include "cmMakefile.h" #include "cmNinjaTargetGenerator.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -27,11 +28,19 @@ cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg, : cmLocalCommonGenerator(gg, mf, mf->GetState()->GetBinaryDirectory()) , HomeRelativeOutputPath("") { - this->TargetImplib = "$TARGET_IMPLIB"; } // Virtual public methods. +cmRulePlaceholderExpander* +cmLocalNinjaGenerator::CreateRulePlaceholderExpander() const +{ + cmRulePlaceholderExpander* ret = new cmRulePlaceholderExpander( + this->Compilers, this->VariableMappings, this->CompilerSysroot); + ret->SetTargetImpLib("$TARGET_IMPLIB"); + return ret; +} + cmLocalNinjaGenerator::~cmLocalNinjaGenerator() { } @@ -477,7 +486,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( // Expand rules in the empty string. It may insert the launcher and // perform replacements. - RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; std::string output; const std::vector& outputs = ccg.GetOutputs(); @@ -494,7 +503,10 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( std::string launcher = property_value; launcher += " "; - this->ExpandRuleVariables(this, launcher, vars); + CM_AUTO_PTR rulePlaceholderExpander( + this->CreateRulePlaceholderExpander()); + + rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 56aa9bf..95d8eb8 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -42,6 +42,8 @@ public: void Generate() CM_OVERRIDE; + cmRulePlaceholderExpander* CreateRulePlaceholderExpander() const CM_OVERRIDE; + std::string GetTargetDirectory(cmGeneratorTarget const* target) const CM_OVERRIDE; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 6906cbf..f30414c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -14,6 +14,7 @@ #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -945,6 +946,9 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( *content << dir; } + CM_AUTO_PTR rulePlaceholderExpander( + this->CreateRulePlaceholderExpander()); + // Add each command line to the set of commands. std::vector commands1; std::string currentBinDir = this->GetCurrentBinaryDirectory(); @@ -988,7 +992,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( if (val && *val) { // Expand rules in the empty string. It may insert the launcher and // perform replacements. - RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = target->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(target->GetType()); std::string output; @@ -1006,7 +1010,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( launcher = val; launcher += " "; - this->ExpandRuleVariables(this, launcher, vars); + rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 8d235c4..dd3fc36 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -11,6 +11,7 @@ #include "cmMakefile.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSystemTools.h" #include "cmake.h" @@ -331,7 +332,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string manifests = this->GetManifests(); - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); @@ -393,15 +394,17 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) launcher += " "; } + CM_AUTO_PTR rulePlaceholderExpander( + this->LocalGenerator->CreateRulePlaceholderExpander()); + // Expand placeholders in the commands. - this->LocalGenerator->TargetImplib = targetOutPathImport; + rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport); for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } - this->LocalGenerator->TargetImplib = ""; // Restore path conversion to normal shells. this->LocalGenerator->SetLinkScriptShell(false); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index fe37a83..9f5f0c1 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -11,6 +11,7 @@ #include "cmMakefile.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" @@ -532,7 +533,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string manifests = this->GetManifests(); - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.TargetPDB = targetOutPathPDB.c_str(); // Setup the target version. @@ -623,8 +624,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( launcher += " "; } + CM_AUTO_PTR rulePlaceholderExpander( + this->LocalGenerator->CreateRulePlaceholderExpander()); // Construct the main link rule and expand placeholders. - this->LocalGenerator->TargetImplib = targetOutPathImport; + rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport); if (useArchiveRules) { // Construct the individual object list strings. std::vector object_strings; @@ -638,8 +641,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveCreateCommands.begin(); i != archiveCreateCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + cmd, vars); real_link_commands.push_back(cmd); } } @@ -650,8 +653,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveAppendCommands.begin(); i != archiveAppendCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + cmd, vars); real_link_commands.push_back(cmd); } } @@ -661,8 +664,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveFinishCommands.begin(); i != archiveFinishCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); // If there is no ranlib the command will be ":". Skip it. if (!cmd.empty() && cmd[0] != ':') { real_link_commands.push_back(cmd); @@ -685,11 +688,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } } - this->LocalGenerator->TargetImplib = ""; // Restore path conversion to normal shells. this->LocalGenerator->SetLinkScriptShell(false); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index ed1fe16..3947c47 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -18,6 +18,7 @@ #include "cmMakefileLibraryTargetGenerator.h" #include "cmMakefileUtilityTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -543,7 +544,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( targetOutPathCompilePDB[targetOutPathCompilePDB.size() - 1] = '/'; } } - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.RuleLauncher = "RULE_LAUNCH_COMPILE"; vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); vars.CMTargetType = @@ -589,6 +590,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( bool const lang_has_assembly = lang_has_preprocessor; bool const lang_can_export_cmds = lang_has_preprocessor; + CM_AUTO_PTR rulePlaceholderExpander( + this->LocalGenerator->CreateRulePlaceholderExpander()); + // Construct the compile rules. { std::string compileRuleVar = "CMAKE_"; @@ -602,8 +606,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( if (this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS") && lang_can_export_cmds && compileCommands.size() == 1) { std::string compileCommand = compileCommands[0]; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, - compileCommand, vars); + + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + compileCommand, vars); std::string workingDirectory = cmSystemTools::CollapseFullPath( this->LocalGenerator->GetCurrentBinaryDirectory()); compileCommand.replace(compileCommand.find(langFlags), langFlags.size(), @@ -662,8 +667,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = compileCommands.begin(); i != compileCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } // Change the command working directory to the local build tree. @@ -726,8 +731,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = preprocessCommands.begin(); i != preprocessCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + *i, vars); } this->LocalGenerator->CreateCDCommand( @@ -774,8 +779,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = assemblyCommands.begin(); i != assemblyCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + *i, vars); } this->LocalGenerator->CreateCDCommand( diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 1f2e4ee..fe51f34 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -15,6 +15,7 @@ #include "cmNinjaTypes.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -167,7 +168,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) std::string rspcontent; if (!this->GetGlobalGenerator()->HasRule(ruleName)) { - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); @@ -248,13 +249,16 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) launcher += " "; } + CM_AUTO_PTR rulePlaceholderExpander( + this->GetLocalGenerator()->CreateRulePlaceholderExpander()); + // Rule for linking library/executable. std::vector linkCmds = this->ComputeLinkCmd(); for (std::vector::iterator i = linkCmds.begin(); i != linkCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, vars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), + *i, vars); } { // If there is no ranlib the command will be ":". Skip it. diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 11ecc84..0650e40 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -14,6 +14,7 @@ #include "cmNinjaNormalTargetGenerator.h" #include "cmNinjaUtilityTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -373,7 +374,7 @@ void cmNinjaTargetGenerator::WriteLanguageRules(const std::string& language) void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) { - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); @@ -453,6 +454,9 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) vars.Flags = flags.c_str(); vars.DependencyFile = depfile.c_str(); + CM_AUTO_PTR rulePlaceholderExpander( + this->GetLocalGenerator()->CreateRulePlaceholderExpander()); + std::string const tdi = this->GetLocalGenerator()->ConvertToOutputFormat( ConvertToNinjaPath(this->GetTargetDependInfoPath(lang)), cmLocalGenerator::SHELL); @@ -475,7 +479,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) std::string const ppDeptype = ""; // no deps= for multiple outputs std::string const ppDepfile = "$DEP_FILE"; - cmLocalGenerator::RuleVariables ppVars; + cmRulePlaceholderExpander::RuleVariables ppVars; ppVars.CMTargetName = vars.CMTargetName; ppVars.CMTargetType = vars.CMTargetType; ppVars.Language = vars.Language; @@ -506,8 +510,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = ppCmds.begin(); i != ppCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, ppVars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), + *i, ppVars); } // Run CMake dependency scanner on preprocessed output. @@ -620,8 +624,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, vars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), *i, + vars); } std::string cmdLine = @@ -974,7 +978,7 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( return; } - cmLocalGenerator::RuleVariables compileObjectVars; + cmRulePlaceholderExpander::RuleVariables compileObjectVars; compileObjectVars.Language = language.c_str(); std::string escapedSourceFileName = sourceFileName; @@ -1006,10 +1010,13 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( std::vector compileCmds; cmSystemTools::ExpandListArgument(compileCmd, compileCmds); + CM_AUTO_PTR rulePlaceholderExpander( + this->GetLocalGenerator()->CreateRulePlaceholderExpander()); + for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, compileObjectVars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), *i, + compileObjectVars); } std::string cmdLine = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a60ea0a957978495bd8a2dacb17447ef9e0bc694 commit a60ea0a957978495bd8a2dacb17447ef9e0bc694 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 11 00:43:48 2016 +0200 cmRulePlaceholderExpander: Extract from cmLocalGenerator Implement cmLocalGenerator::ExpandRuleVariables in terms of the new class for source compatibility and to reduce diff noise in this commit. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 048667a..7d82a51 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -309,6 +309,8 @@ set(SRCS cmLocalCommonGenerator.h cmLocalGenerator.cxx cmLocalGenerator.h + cmRulePlaceholderExpander.cxx + cmRulePlaceholderExpander.h cmLocalUnixMakefileGenerator3.cxx cmLocale.h ${MACH_SRCS} diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 3489188..615168d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -14,6 +14,7 @@ #include "cmInstallTargetGenerator.h" #include "cmLinkLineComputer.h" #include "cmMakefile.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmSystemTools.h" #include "cmTarget.h" @@ -560,287 +561,15 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->Makefile->GetStateSnapshot(); } -std::string cmLocalGenerator::ExpandRuleVariable( - cmOutputConverter* outputConverter, std::string const& variable, - const RuleVariables& replaceValues) -{ - if (replaceValues.LinkFlags) { - if (variable == "LINK_FLAGS") { - return replaceValues.LinkFlags; - } - } - if (replaceValues.Manifests) { - if (variable == "MANIFESTS") { - return replaceValues.Manifests; - } - } - if (replaceValues.Flags) { - if (variable == "FLAGS") { - return replaceValues.Flags; - } - } - - if (replaceValues.Source) { - if (variable == "SOURCE") { - return replaceValues.Source; - } - } - if (replaceValues.PreprocessedSource) { - if (variable == "PREPROCESSED_SOURCE") { - return replaceValues.PreprocessedSource; - } - } - if (replaceValues.AssemblySource) { - if (variable == "ASSEMBLY_SOURCE") { - return replaceValues.AssemblySource; - } - } - if (replaceValues.Object) { - if (variable == "OBJECT") { - return replaceValues.Object; - } - } - if (replaceValues.ObjectDir) { - if (variable == "OBJECT_DIR") { - return replaceValues.ObjectDir; - } - } - if (replaceValues.ObjectFileDir) { - if (variable == "OBJECT_FILE_DIR") { - return replaceValues.ObjectFileDir; - } - } - if (replaceValues.Objects) { - if (variable == "OBJECTS") { - return replaceValues.Objects; - } - } - if (replaceValues.ObjectsQuoted) { - if (variable == "OBJECTS_QUOTED") { - return replaceValues.ObjectsQuoted; - } - } - if (replaceValues.Defines && variable == "DEFINES") { - return replaceValues.Defines; - } - if (replaceValues.Includes && variable == "INCLUDES") { - return replaceValues.Includes; - } - if (replaceValues.TargetPDB) { - if (variable == "TARGET_PDB") { - return replaceValues.TargetPDB; - } - } - if (replaceValues.TargetCompilePDB) { - if (variable == "TARGET_COMPILE_PDB") { - return replaceValues.TargetCompilePDB; - } - } - if (replaceValues.DependencyFile) { - if (variable == "DEP_FILE") { - return replaceValues.DependencyFile; - } - } - - if (replaceValues.Target) { - if (variable == "TARGET_QUOTED") { - std::string targetQuoted = replaceValues.Target; - if (!targetQuoted.empty() && targetQuoted[0] != '\"') { - targetQuoted = '\"'; - targetQuoted += replaceValues.Target; - targetQuoted += '\"'; - } - return targetQuoted; - } - if (variable == "TARGET_UNQUOTED") { - std::string unquoted = replaceValues.Target; - std::string::size_type sz = unquoted.size(); - if (sz > 2 && unquoted[0] == '\"' && unquoted[sz - 1] == '\"') { - unquoted = unquoted.substr(1, sz - 2); - } - return unquoted; - } - if (replaceValues.LanguageCompileFlags) { - if (variable == "LANGUAGE_COMPILE_FLAGS") { - return replaceValues.LanguageCompileFlags; - } - } - if (replaceValues.Target) { - if (variable == "TARGET") { - return replaceValues.Target; - } - } - if (variable == "TARGET_IMPLIB") { - return this->TargetImplib; - } - if (variable == "TARGET_VERSION_MAJOR") { - if (replaceValues.TargetVersionMajor) { - return replaceValues.TargetVersionMajor; - } - return "0"; - } - if (variable == "TARGET_VERSION_MINOR") { - if (replaceValues.TargetVersionMinor) { - return replaceValues.TargetVersionMinor; - } - return "0"; - } - if (replaceValues.Target) { - if (variable == "TARGET_BASE") { - // Strip the last extension off the target name. - std::string targetBase = replaceValues.Target; - std::string::size_type pos = targetBase.rfind('.'); - if (pos != targetBase.npos) { - return targetBase.substr(0, pos); - } - return targetBase; - } - } - } - if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" || - variable == "TARGET_INSTALLNAME_DIR") { - // All these variables depend on TargetSOName - if (replaceValues.TargetSOName) { - if (variable == "TARGET_SONAME") { - return replaceValues.TargetSOName; - } - if (variable == "SONAME_FLAG" && replaceValues.SONameFlag) { - return replaceValues.SONameFlag; - } - if (replaceValues.TargetInstallNameDir && - variable == "TARGET_INSTALLNAME_DIR") { - return replaceValues.TargetInstallNameDir; - } - } - return ""; - } - if (replaceValues.LinkLibraries) { - if (variable == "LINK_LIBRARIES") { - return replaceValues.LinkLibraries; - } - } - if (replaceValues.Language) { - if (variable == "LANGUAGE") { - return replaceValues.Language; - } - } - if (replaceValues.CMTargetName) { - if (variable == "TARGET_NAME") { - return replaceValues.CMTargetName; - } - } - if (replaceValues.CMTargetType) { - if (variable == "TARGET_TYPE") { - return replaceValues.CMTargetType; - } - } - if (replaceValues.Output) { - if (variable == "OUTPUT") { - return replaceValues.Output; - } - } - if (variable == "CMAKE_COMMAND") { - return outputConverter->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), - SHELL); - } - - std::map::iterator compIt = - this->Compilers.find(variable); - - if (compIt != this->Compilers.end()) { - std::string ret = outputConverter->ConvertToOutputForExisting( - this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]); - std::string const& compilerArg1 = - this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; - std::string const& compilerTarget = - this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; - std::string const& compilerOptionTarget = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_TARGET"]; - std::string const& compilerExternalToolchain = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionExternalToolchain = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionSysroot = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_SYSROOT"]; - - // if there is a required first argument to the compiler add it - // to the compiler string - if (!compilerArg1.empty()) { - ret += " "; - ret += compilerArg1; - } - if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { - ret += " "; - ret += compilerOptionTarget; - ret += compilerTarget; - } - if (!compilerExternalToolchain.empty() && - !compilerOptionExternalToolchain.empty()) { - ret += " "; - ret += compilerOptionExternalToolchain; - ret += outputConverter->EscapeForShell(compilerExternalToolchain, true); - } - if (this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { - ret += " "; - ret += compilerOptionSysroot; - ret += outputConverter->EscapeForShell(this->CompilerSysroot, true); - } - return ret; - } - - std::map::iterator mapIt = - this->VariableMappings.find(variable); - if (mapIt != this->VariableMappings.end()) { - if (variable.find("_FLAG") == variable.npos) { - return outputConverter->ConvertToOutputForExisting(mapIt->second); - } - return mapIt->second; - } - return variable; -} - void cmLocalGenerator::ExpandRuleVariables(cmOutputConverter* outputConverter, std::string& s, const RuleVariables& replaceValues) { - std::string::size_type start = s.find('<'); - // no variables to expand - if (start == s.npos) { - return; - } - std::string::size_type pos = 0; - std::string expandedInput; - while (start != s.npos && start < s.size() - 2) { - std::string::size_type end = s.find('>', start); - // if we find a < with no > we are done - if (end == s.npos) { - return; - } - char c = s[start + 1]; - // if the next char after the < is not A-Za-z then - // skip it and try to find the next < in the string - if (!isalpha(c)) { - start = s.find('<', start + 1); - } else { - // extract the var - std::string var = s.substr(start + 1, end - start - 1); - std::string replace = - this->ExpandRuleVariable(outputConverter, var, replaceValues); - expandedInput += s.substr(pos, start - pos); - expandedInput += replace; - // move to next one - start = s.find('<', start + var.size() + 2); - pos = end + 1; - } - } - // add the rest of the input - expandedInput += s.substr(pos, s.size() - pos); - s = expandedInput; + cmRulePlaceholderExpander rulePlaceholderExpander( + this->Compilers, this->VariableMappings, this->CompilerSysroot); + rulePlaceholderExpander.SetTargetImpLib(this->TargetImplib); + rulePlaceholderExpander.ExpandRuleVariables(outputConverter, s, + replaceValues); } const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target, diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index c51aa85..6f8426d 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -8,6 +8,7 @@ #include "cmListFileCache.h" #include "cmOutputConverter.h" #include "cmPolicies.h" +#include "cmRulePlaceholderExpander.h" #include "cmState.h" #include "cmake.h" @@ -217,41 +218,8 @@ public: // preprocessed files and assembly files. void GetIndividualFileTargets(std::vector&) {} - // Create a struct to hold the varibles passed into - // ExpandRuleVariables - struct RuleVariables + struct RuleVariables : cmRulePlaceholderExpander::RuleVariables { - RuleVariables() { memset(this, 0, sizeof(*this)); } - const char* CMTargetName; - const char* CMTargetType; - const char* TargetPDB; - const char* TargetCompilePDB; - const char* TargetVersionMajor; - const char* TargetVersionMinor; - const char* Language; - const char* Objects; - const char* Target; - const char* LinkLibraries; - const char* Source; - const char* AssemblySource; - const char* PreprocessedSource; - const char* Output; - const char* Object; - const char* ObjectDir; - const char* ObjectFileDir; - const char* Flags; - const char* ObjectsQuoted; - const char* SONameFlag; - const char* TargetSOName; - const char* TargetInstallNameDir; - const char* LinkFlags; - const char* Manifests; - const char* LanguageCompileFlags; - const char* Defines; - const char* Includes; - const char* RuleLauncher; - const char* DependencyFile; - const char* FilterPrefix; }; /** @@ -362,11 +330,6 @@ protected: std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath); - // Expand rule variables in a single string - std::string ExpandRuleVariable(cmOutputConverter* outputConverter, - std::string const& variable, - const RuleVariables& replaceValues); - // Handle old-style install rules stored in the targets. void GenerateTargetInstallRules( std::ostream& os, const std::string& config, diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx new file mode 100644 index 0000000..601c3b4 --- /dev/null +++ b/Source/cmRulePlaceholderExpander.cxx @@ -0,0 +1,299 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmRulePlaceholderExpander.h" + +#include "cmOutputConverter.h" +#include "cmSystemTools.h" + +cmRulePlaceholderExpander::cmRulePlaceholderExpander( + std::map const& compilers, + std::map const& variableMappings, + std::string const& compilerSysroot) + : Compilers(compilers) + , VariableMappings(variableMappings) + , CompilerSysroot(compilerSysroot) +{ +} + +std::string cmRulePlaceholderExpander::ExpandRuleVariable( + cmOutputConverter* outputConverter, std::string const& variable, + const RuleVariables& replaceValues) +{ + if (replaceValues.LinkFlags) { + if (variable == "LINK_FLAGS") { + return replaceValues.LinkFlags; + } + } + if (replaceValues.Manifests) { + if (variable == "MANIFESTS") { + return replaceValues.Manifests; + } + } + if (replaceValues.Flags) { + if (variable == "FLAGS") { + return replaceValues.Flags; + } + } + + if (replaceValues.Source) { + if (variable == "SOURCE") { + return replaceValues.Source; + } + } + if (replaceValues.PreprocessedSource) { + if (variable == "PREPROCESSED_SOURCE") { + return replaceValues.PreprocessedSource; + } + } + if (replaceValues.AssemblySource) { + if (variable == "ASSEMBLY_SOURCE") { + return replaceValues.AssemblySource; + } + } + if (replaceValues.Object) { + if (variable == "OBJECT") { + return replaceValues.Object; + } + } + if (replaceValues.ObjectDir) { + if (variable == "OBJECT_DIR") { + return replaceValues.ObjectDir; + } + } + if (replaceValues.ObjectFileDir) { + if (variable == "OBJECT_FILE_DIR") { + return replaceValues.ObjectFileDir; + } + } + if (replaceValues.Objects) { + if (variable == "OBJECTS") { + return replaceValues.Objects; + } + } + if (replaceValues.ObjectsQuoted) { + if (variable == "OBJECTS_QUOTED") { + return replaceValues.ObjectsQuoted; + } + } + if (replaceValues.Defines && variable == "DEFINES") { + return replaceValues.Defines; + } + if (replaceValues.Includes && variable == "INCLUDES") { + return replaceValues.Includes; + } + if (replaceValues.TargetPDB) { + if (variable == "TARGET_PDB") { + return replaceValues.TargetPDB; + } + } + if (replaceValues.TargetCompilePDB) { + if (variable == "TARGET_COMPILE_PDB") { + return replaceValues.TargetCompilePDB; + } + } + if (replaceValues.DependencyFile) { + if (variable == "DEP_FILE") { + return replaceValues.DependencyFile; + } + } + + if (replaceValues.Target) { + if (variable == "TARGET_QUOTED") { + std::string targetQuoted = replaceValues.Target; + if (!targetQuoted.empty() && targetQuoted[0] != '\"') { + targetQuoted = '\"'; + targetQuoted += replaceValues.Target; + targetQuoted += '\"'; + } + return targetQuoted; + } + if (variable == "TARGET_UNQUOTED") { + std::string unquoted = replaceValues.Target; + std::string::size_type sz = unquoted.size(); + if (sz > 2 && unquoted[0] == '\"' && unquoted[sz - 1] == '\"') { + unquoted = unquoted.substr(1, sz - 2); + } + return unquoted; + } + if (replaceValues.LanguageCompileFlags) { + if (variable == "LANGUAGE_COMPILE_FLAGS") { + return replaceValues.LanguageCompileFlags; + } + } + if (replaceValues.Target) { + if (variable == "TARGET") { + return replaceValues.Target; + } + } + if (variable == "TARGET_IMPLIB") { + return this->TargetImpLib; + } + if (variable == "TARGET_VERSION_MAJOR") { + if (replaceValues.TargetVersionMajor) { + return replaceValues.TargetVersionMajor; + } + return "0"; + } + if (variable == "TARGET_VERSION_MINOR") { + if (replaceValues.TargetVersionMinor) { + return replaceValues.TargetVersionMinor; + } + return "0"; + } + if (replaceValues.Target) { + if (variable == "TARGET_BASE") { + // Strip the last extension off the target name. + std::string targetBase = replaceValues.Target; + std::string::size_type pos = targetBase.rfind('.'); + if (pos != targetBase.npos) { + return targetBase.substr(0, pos); + } + return targetBase; + } + } + } + if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" || + variable == "TARGET_INSTALLNAME_DIR") { + // All these variables depend on TargetSOName + if (replaceValues.TargetSOName) { + if (variable == "TARGET_SONAME") { + return replaceValues.TargetSOName; + } + if (variable == "SONAME_FLAG" && replaceValues.SONameFlag) { + return replaceValues.SONameFlag; + } + if (replaceValues.TargetInstallNameDir && + variable == "TARGET_INSTALLNAME_DIR") { + return replaceValues.TargetInstallNameDir; + } + } + return ""; + } + if (replaceValues.LinkLibraries) { + if (variable == "LINK_LIBRARIES") { + return replaceValues.LinkLibraries; + } + } + if (replaceValues.Language) { + if (variable == "LANGUAGE") { + return replaceValues.Language; + } + } + if (replaceValues.CMTargetName) { + if (variable == "TARGET_NAME") { + return replaceValues.CMTargetName; + } + } + if (replaceValues.CMTargetType) { + if (variable == "TARGET_TYPE") { + return replaceValues.CMTargetType; + } + } + if (replaceValues.Output) { + if (variable == "OUTPUT") { + return replaceValues.Output; + } + } + if (variable == "CMAKE_COMMAND") { + return outputConverter->ConvertToOutputFormat( + cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), + cmOutputConverter::SHELL); + } + + std::map::iterator compIt = + this->Compilers.find(variable); + + if (compIt != this->Compilers.end()) { + std::string ret = outputConverter->ConvertToOutputForExisting( + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]); + std::string const& compilerArg1 = + this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; + std::string const& compilerTarget = + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + std::string const& compilerOptionTarget = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_TARGET"]; + std::string const& compilerExternalToolchain = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionExternalToolchain = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionSysroot = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_SYSROOT"]; + + // if there is a required first argument to the compiler add it + // to the compiler string + if (!compilerArg1.empty()) { + ret += " "; + ret += compilerArg1; + } + if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { + ret += " "; + ret += compilerOptionTarget; + ret += compilerTarget; + } + if (!compilerExternalToolchain.empty() && + !compilerOptionExternalToolchain.empty()) { + ret += " "; + ret += compilerOptionExternalToolchain; + ret += outputConverter->EscapeForShell(compilerExternalToolchain, true); + } + if (this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { + ret += " "; + ret += compilerOptionSysroot; + ret += outputConverter->EscapeForShell(this->CompilerSysroot, true); + } + return ret; + } + + std::map::iterator mapIt = + this->VariableMappings.find(variable); + if (mapIt != this->VariableMappings.end()) { + if (variable.find("_FLAG") == variable.npos) { + return outputConverter->ConvertToOutputForExisting(mapIt->second); + } + return mapIt->second; + } + return variable; +} + +void cmRulePlaceholderExpander::ExpandRuleVariables( + cmOutputConverter* outputConverter, std::string& s, + const RuleVariables& replaceValues) +{ + std::string::size_type start = s.find('<'); + // no variables to expand + if (start == s.npos) { + return; + } + std::string::size_type pos = 0; + std::string expandedInput; + while (start != s.npos && start < s.size() - 2) { + std::string::size_type end = s.find('>', start); + // if we find a < with no > we are done + if (end == s.npos) { + return; + } + char c = s[start + 1]; + // if the next char after the < is not A-Za-z then + // skip it and try to find the next < in the string + if (!isalpha(c)) { + start = s.find('<', start + 1); + } else { + // extract the var + std::string var = s.substr(start + 1, end - start - 1); + std::string replace = + this->ExpandRuleVariable(outputConverter, var, replaceValues); + expandedInput += s.substr(pos, start - pos); + expandedInput += replace; + // move to next one + start = s.find('<', start + var.size() + 2); + pos = end + 1; + } + } + // add the rest of the input + expandedInput += s.substr(pos, s.size() - pos); + s = expandedInput; +} diff --git a/Source/cmRulePlaceholderExpander.h b/Source/cmRulePlaceholderExpander.h new file mode 100644 index 0000000..9140f8f --- /dev/null +++ b/Source/cmRulePlaceholderExpander.h @@ -0,0 +1,85 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmRulePlaceholderExpander_h +#define cmRulePlaceholderExpander_h + +#include + +#include +#include + +#include + +class cmGeneratorTarget; +class cmOutputConverter; + +class cmRulePlaceholderExpander +{ +public: + cmRulePlaceholderExpander( + std::map const& compilers, + std::map const& variableMappings, + std::string const& compilerSysroot); + + void SetTargetImpLib(std::string const& targetImpLib) + { + this->TargetImpLib = targetImpLib; + } + + // Create a struct to hold the varibles passed into + // ExpandRuleVariables + struct RuleVariables + { + RuleVariables() { memset(this, 0, sizeof(*this)); } + const char* CMTargetName; + const char* CMTargetType; + const char* TargetPDB; + const char* TargetCompilePDB; + const char* TargetVersionMajor; + const char* TargetVersionMinor; + const char* Language; + const char* Objects; + const char* Target; + const char* LinkLibraries; + const char* Source; + const char* AssemblySource; + const char* PreprocessedSource; + const char* Output; + const char* Object; + const char* ObjectDir; + const char* ObjectFileDir; + const char* Flags; + const char* ObjectsQuoted; + const char* SONameFlag; + const char* TargetSOName; + const char* TargetInstallNameDir; + const char* LinkFlags; + const char* Manifests; + const char* LanguageCompileFlags; + const char* Defines; + const char* Includes; + const char* RuleLauncher; + const char* DependencyFile; + const char* FilterPrefix; + }; + + // Expand rule variables in CMake of the type found in language rules + void ExpandRuleVariables(cmOutputConverter* outputConverter, + std::string& string, + const RuleVariables& replaceValues); + + // Expand rule variables in a single string + std::string ExpandRuleVariable(cmOutputConverter* outputConverter, + std::string const& variable, + const RuleVariables& replaceValues); + +private: + std::string TargetImpLib; + + std::map Compilers; + std::map VariableMappings; + std::string CompilerSysroot; +}; + +#endif diff --git a/bootstrap b/bootstrap index fb8b1eb..9936365 100755 --- a/bootstrap +++ b/bootstrap @@ -281,6 +281,7 @@ CMAKE_CXX_SOURCES="\ cmInstallDirectoryGenerator \ cmLocalCommonGenerator \ cmLocalGenerator \ + cmRulePlaceholderExpander \ cmInstalledFile \ cmInstallGenerator \ cmInstallExportGenerator \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b3af6a7ca2d4938568df8dc70c9d44c62ba9fe1 commit 8b3af6a7ca2d4938568df8dc70c9d44c62ba9fe1 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 11 00:43:48 2016 +0200 cmLocalGenerator: Use strings instead of a Target in rule replacement Don't rely on the cmGeneratorTarget type needlessly. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 0e407a5..3489188 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -724,12 +724,14 @@ std::string cmLocalGenerator::ExpandRuleVariable( return replaceValues.Language; } } - if (replaceValues.CMTarget) { + if (replaceValues.CMTargetName) { if (variable == "TARGET_NAME") { - return replaceValues.CMTarget->GetName(); + return replaceValues.CMTargetName; } + } + if (replaceValues.CMTargetType) { if (variable == "TARGET_TYPE") { - return cmState::GetTargetTypeName(replaceValues.CMTarget->GetType()); + return replaceValues.CMTargetType; } } if (replaceValues.Output) { @@ -747,7 +749,7 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->Compilers.find(variable); if (compIt != this->Compilers.end()) { - std::string ret = this->ConvertToOutputForExisting( + std::string ret = outputConverter->ConvertToOutputForExisting( this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]); std::string const& compilerArg1 = this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 7359f50..c51aa85 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -222,7 +222,8 @@ public: struct RuleVariables { RuleVariables() { memset(this, 0, sizeof(*this)); } - cmGeneratorTarget* CMTarget; + const char* CMTargetName; + const char* CMTargetType; const char* TargetPDB; const char* TargetCompilePDB; const char* TargetVersionMajor; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index a4c73dd..6906cbf 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -989,7 +989,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( // Expand rules in the empty string. It may insert the launcher and // perform replacements. RuleVariables vars; - vars.CMTarget = target; + vars.CMTargetName = target->GetName().c_str(); + vars.CMTargetType = cmState::GetTargetTypeName(target->GetType()); std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index ce71c04..8d235c4 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -332,7 +332,9 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string manifests = this->GetManifests(); cmLocalGenerator::RuleVariables vars; - vars.CMTarget = this->GeneratorTarget; + vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 4016cfa..fe37a83 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -552,7 +552,9 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( vars.TargetVersionMajor = targetVersionMajor.c_str(); vars.TargetVersionMinor = targetVersionMinor.c_str(); - vars.CMTarget = this->GeneratorTarget; + vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index a607ed6..ed1fe16 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -545,7 +545,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } cmLocalGenerator::RuleVariables vars; vars.RuleLauncher = "RULE_LAUNCH_COMPILE"; - vars.CMTarget = this->GeneratorTarget; + vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); vars.Language = lang.c_str(); vars.Target = targetOutPathReal.c_str(); vars.TargetPDB = targetOutPathPDB.c_str(); diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 0904d6b..1f2e4ee 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -168,7 +168,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) if (!this->GetGlobalGenerator()->HasRule(ruleName)) { cmLocalGenerator::RuleVariables vars; - vars.CMTarget = this->GetGeneratorTarget(); + vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); + vars.Language = this->TargetLinkLanguage.c_str(); std::string responseFlag; diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 1513318..11ecc84 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -374,7 +374,9 @@ void cmNinjaTargetGenerator::WriteLanguageRules(const std::string& language) void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) { cmLocalGenerator::RuleVariables vars; - vars.CMTarget = this->GetGeneratorTarget(); + vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); vars.Language = lang.c_str(); vars.Source = "$IN_ABS"; vars.Object = "$out"; @@ -474,7 +476,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) std::string const ppDepfile = "$DEP_FILE"; cmLocalGenerator::RuleVariables ppVars; - ppVars.CMTarget = vars.CMTarget; + ppVars.CMTargetName = vars.CMTargetName; + ppVars.CMTargetType = vars.CMTargetType; ppVars.Language = vars.Language; ppVars.Object = "$out"; // for RULE_LAUNCH_COMPILE ppVars.PreprocessedSource = "$out"; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=49afda6b4e94d7747058bf5174bda6c333c921c6 commit 49afda6b4e94d7747058bf5174bda6c333c921c6 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 11 00:43:47 2016 +0200 cmLocalGenerator: Use a converter in rule replacement API The rule replacement API should not really be in cmLocalGenerator, but it was historically, and this coupled many other things together here too, such as output conversion. Make the output converter a parameter so that rule replacement can be removed from cmLocalGenerator. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 23d3744..0e407a5 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -561,7 +561,8 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const } std::string cmLocalGenerator::ExpandRuleVariable( - std::string const& variable, const RuleVariables& replaceValues) + cmOutputConverter* outputConverter, std::string const& variable, + const RuleVariables& replaceValues) { if (replaceValues.LinkFlags) { if (variable == "LINK_FLAGS") { @@ -737,7 +738,7 @@ std::string cmLocalGenerator::ExpandRuleVariable( } } if (variable == "CMAKE_COMMAND") { - return this->ConvertToOutputFormat( + return outputConverter->ConvertToOutputFormat( cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), SHELL); } @@ -780,12 +781,12 @@ std::string cmLocalGenerator::ExpandRuleVariable( !compilerOptionExternalToolchain.empty()) { ret += " "; ret += compilerOptionExternalToolchain; - ret += this->EscapeForShell(compilerExternalToolchain, true); + ret += outputConverter->EscapeForShell(compilerExternalToolchain, true); } if (this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { ret += " "; ret += compilerOptionSysroot; - ret += this->EscapeForShell(this->CompilerSysroot, true); + ret += outputConverter->EscapeForShell(this->CompilerSysroot, true); } return ret; } @@ -794,14 +795,15 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->VariableMappings.find(variable); if (mapIt != this->VariableMappings.end()) { if (variable.find("_FLAG") == variable.npos) { - return this->ConvertToOutputForExisting(mapIt->second); + return outputConverter->ConvertToOutputForExisting(mapIt->second); } return mapIt->second; } return variable; } -void cmLocalGenerator::ExpandRuleVariables(std::string& s, +void cmLocalGenerator::ExpandRuleVariables(cmOutputConverter* outputConverter, + std::string& s, const RuleVariables& replaceValues) { std::string::size_type start = s.find('<'); @@ -825,7 +827,8 @@ void cmLocalGenerator::ExpandRuleVariables(std::string& s, } else { // extract the var std::string var = s.substr(start + 1, end - start - 1); - std::string replace = this->ExpandRuleVariable(var, replaceValues); + std::string replace = + this->ExpandRuleVariable(outputConverter, var, replaceValues); expandedInput += s.substr(pos, start - pos); expandedInput += replace; // move to next one diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index d54fbff..7359f50 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -347,7 +347,8 @@ public: void ProcessEvaluationFiles(std::vector& generatedFiles); // Expand rule variables in CMake of the type found in language rules - void ExpandRuleVariables(std::string& string, + void ExpandRuleVariables(cmOutputConverter* outputConverter, + std::string& string, const RuleVariables& replaceValues); const char* GetRuleLauncher(cmGeneratorTarget* target, @@ -361,7 +362,8 @@ protected: std::string& frameworkPath, std::string& linkPath); // Expand rule variables in a single string - std::string ExpandRuleVariable(std::string const& variable, + std::string ExpandRuleVariable(cmOutputConverter* outputConverter, + std::string const& variable, const RuleVariables& replaceValues); // Handle old-style install rules stored in the targets. diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index ea711c0..05596f8 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -494,7 +494,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( std::string launcher = property_value; launcher += " "; - this->ExpandRuleVariables(launcher, vars); + this->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 92b58ba..a4c73dd 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1005,7 +1005,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( launcher = val; launcher += " "; - this->ExpandRuleVariables(launcher, vars); + this->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 88bd07e..ce71c04 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -396,7 +396,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } this->LocalGenerator->TargetImplib = ""; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index fb44a6c..4016cfa 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -636,7 +636,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveCreateCommands.begin(); i != archiveCreateCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(cmd, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); real_link_commands.push_back(cmd); } } @@ -647,7 +648,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveAppendCommands.begin(); i != archiveAppendCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(cmd, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); real_link_commands.push_back(cmd); } } @@ -657,7 +659,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveFinishCommands.begin(); i != archiveFinishCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(cmd, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); // If there is no ranlib the command will be ":". Skip it. if (!cmd.empty() && cmd[0] != ':') { real_link_commands.push_back(cmd); @@ -680,7 +683,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } } this->LocalGenerator->TargetImplib = ""; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 1483fbb..a607ed6 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -600,7 +600,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( if (this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS") && lang_can_export_cmds && compileCommands.size() == 1) { std::string compileCommand = compileCommands[0]; - this->LocalGenerator->ExpandRuleVariables(compileCommand, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, + compileCommand, vars); std::string workingDirectory = cmSystemTools::CollapseFullPath( this->LocalGenerator->GetCurrentBinaryDirectory()); compileCommand.replace(compileCommand.find(langFlags), langFlags.size(), @@ -659,7 +660,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = compileCommands.begin(); i != compileCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } // Change the command working directory to the local build tree. @@ -722,7 +724,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = preprocessCommands.begin(); i != preprocessCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } this->LocalGenerator->CreateCDCommand( @@ -769,7 +772,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = assemblyCommands.begin(); i != assemblyCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } this->LocalGenerator->CreateCDCommand( diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index a52f3ef..0904d6b 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -250,7 +250,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) for (std::vector::iterator i = linkCmds.begin(); i != linkCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, vars); } { // If there is no ranlib the command will be ":". Skip it. diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 5c13f47..1513318 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -503,7 +503,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = ppCmds.begin(); i != ppCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(*i, ppVars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, ppVars); } // Run CMake dependency scanner on preprocessed output. @@ -616,7 +617,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, vars); } std::string cmdLine = @@ -1003,7 +1005,8 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { - this->GetLocalGenerator()->ExpandRuleVariables(*i, compileObjectVars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, compileObjectVars); } std::string cmdLine = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=91bc8ec9b8941f15c9adca532afa2dea9d1c1fa1 commit 91bc8ec9b8941f15c9adca532afa2dea9d1c1fa1 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 11 00:43:47 2016 +0200 cmLocalGenerator: Store variable replacements as state These do not change over the lifetime of the cmLocalGenerator. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 3543019..23d3744 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -40,6 +40,28 @@ #include #endif +// List of variables that are replaced when +// rules are expanced. These variables are +// replaced in the form with GetSafeDefinition(var). +// ${LANG} is replaced in the variable first with all enabled +// languages. +static const char* ruleReplaceVars[] = { + "CMAKE_${LANG}_COMPILER", + "CMAKE_SHARED_LIBRARY_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_${LANG}_FLAGS", + "CMAKE_SHARED_LIBRARY_${LANG}_FLAGS", + "CMAKE_${LANG}_LINK_FLAGS", + "CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG", + "CMAKE_${LANG}_ARCHIVE", + "CMAKE_AR", + "CMAKE_CURRENT_SOURCE_DIR", + "CMAKE_CURRENT_BINARY_DIR", + "CMAKE_RANLIB", + "CMAKE_LINKER", + "CMAKE_CL_SHOWINCLUDES_PREFIX" +}; + cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) : cmOutputConverter(makefile->GetStateSnapshot()) , StateSnapshot(makefile->GetStateSnapshot()) @@ -56,6 +78,58 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) this->BackwardsCompatibilityFinal = false; this->ComputeObjectMaxPath(); + + std::vector enabledLanguages = + this->GetState()->GetEnabledLanguages(); + + this->CompilerSysroot = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); + + for (std::vector::iterator i = enabledLanguages.begin(); + i != enabledLanguages.end(); ++i) { + std::string const& lang = *i; + if (lang == "NONE") { + continue; + } + this->Compilers["CMAKE_" + lang + "_COMPILER"] = lang; + + this->VariableMappings["CMAKE_" + lang + "_COMPILER"] = + this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER"); + + std::string const& compilerArg1 = "CMAKE_" + lang + "_COMPILER_ARG1"; + std::string const& compilerTarget = "CMAKE_" + lang + "_COMPILER_TARGET"; + std::string const& compilerOptionTarget = + "CMAKE_" + lang + "_COMPILE_OPTIONS_TARGET"; + std::string const& compilerExternalToolchain = + "CMAKE_" + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionExternalToolchain = + "CMAKE_" + lang + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionSysroot = + "CMAKE_" + lang + "_COMPILE_OPTIONS_SYSROOT"; + + this->VariableMappings[compilerArg1] = + this->Makefile->GetSafeDefinition(compilerArg1); + this->VariableMappings[compilerTarget] = + this->Makefile->GetSafeDefinition(compilerTarget); + this->VariableMappings[compilerOptionTarget] = + this->Makefile->GetSafeDefinition(compilerOptionTarget); + this->VariableMappings[compilerExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerExternalToolchain); + this->VariableMappings[compilerOptionExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); + this->VariableMappings[compilerOptionSysroot] = + this->Makefile->GetSafeDefinition(compilerOptionSysroot); + + for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); + replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { + std::string actualReplace = *replaceIter; + if (actualReplace.find("${LANG}") != actualReplace.npos) { + cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); + } + + this->VariableMappings[actualReplace] = + this->Makefile->GetSafeDefinition(actualReplace); + } + } } cmLocalGenerator::~cmLocalGenerator() @@ -486,28 +560,6 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->Makefile->GetStateSnapshot(); } -// List of variables that are replaced when -// rules are expanced. These variables are -// replaced in the form with GetSafeDefinition(var). -// ${LANG} is replaced in the variable first with all enabled -// languages. -static const char* ruleReplaceVars[] = { - "CMAKE_${LANG}_COMPILER", - "CMAKE_SHARED_LIBRARY_CREATE_${LANG}_FLAGS", - "CMAKE_SHARED_MODULE_CREATE_${LANG}_FLAGS", - "CMAKE_SHARED_MODULE_${LANG}_FLAGS", - "CMAKE_SHARED_LIBRARY_${LANG}_FLAGS", - "CMAKE_${LANG}_LINK_FLAGS", - "CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG", - "CMAKE_${LANG}_ARCHIVE", - "CMAKE_AR", - "CMAKE_CURRENT_SOURCE_DIR", - "CMAKE_CURRENT_BINARY_DIR", - "CMAKE_RANLIB", - "CMAKE_LINKER", - "CMAKE_CL_SHOWINCLUDES_PREFIX" -}; - std::string cmLocalGenerator::ExpandRuleVariable( std::string const& variable, const RuleVariables& replaceValues) { @@ -689,84 +741,29 @@ std::string cmLocalGenerator::ExpandRuleVariable( cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), SHELL); } - std::vector enabledLanguages = - this->GetState()->GetEnabledLanguages(); - - std::map compilers; - - std::map variableMappings; - - std::string compilerSysroot = - this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); - - for (std::vector::iterator i = enabledLanguages.begin(); - i != enabledLanguages.end(); ++i) { - std::string const& lang = *i; - if (lang == "NONE") { - continue; - } - compilers["CMAKE_" + lang + "_COMPILER"] = lang; - - variableMappings["CMAKE_" + lang + "_COMPILER"] = - this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER"); - - std::string const& compilerArg1 = "CMAKE_" + lang + "_COMPILER_ARG1"; - std::string const& compilerTarget = "CMAKE_" + lang + "_COMPILER_TARGET"; - std::string const& compilerOptionTarget = - "CMAKE_" + lang + "_COMPILE_OPTIONS_TARGET"; - std::string const& compilerExternalToolchain = - "CMAKE_" + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"; - std::string const& compilerOptionExternalToolchain = - "CMAKE_" + lang + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"; - std::string const& compilerOptionSysroot = - "CMAKE_" + lang + "_COMPILE_OPTIONS_SYSROOT"; - - variableMappings[compilerArg1] = - this->Makefile->GetSafeDefinition(compilerArg1); - variableMappings[compilerTarget] = - this->Makefile->GetSafeDefinition(compilerTarget); - variableMappings[compilerOptionTarget] = - this->Makefile->GetSafeDefinition(compilerOptionTarget); - variableMappings[compilerExternalToolchain] = - this->Makefile->GetSafeDefinition(compilerExternalToolchain); - variableMappings[compilerOptionExternalToolchain] = - this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); - variableMappings[compilerOptionSysroot] = - this->Makefile->GetSafeDefinition(compilerOptionSysroot); - - for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); - replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { - std::string const& lang = *i; - std::string actualReplace = *replaceIter; - if (actualReplace.find("${LANG}") != actualReplace.npos) { - cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); - } - - variableMappings[actualReplace] = - this->Makefile->GetSafeDefinition(actualReplace); - } - } std::map::iterator compIt = - compilers.find(variable); + this->Compilers.find(variable); - if (compIt != compilers.end()) { + if (compIt != this->Compilers.end()) { std::string ret = this->ConvertToOutputForExisting( - variableMappings["CMAKE_" + compIt->second + "_COMPILER"]); + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]); std::string const& compilerArg1 = - variableMappings[compIt->first + "_COMPILER_ARG1"]; + this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; std::string const& compilerTarget = - variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; std::string const& compilerOptionTarget = - variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_TARGET"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_TARGET"]; std::string const& compilerExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; std::string const& compilerOptionExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; std::string const& compilerOptionSysroot = - variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_SYSROOT"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_SYSROOT"]; // if there is a required first argument to the compiler add it // to the compiler string @@ -785,17 +782,17 @@ std::string cmLocalGenerator::ExpandRuleVariable( ret += compilerOptionExternalToolchain; ret += this->EscapeForShell(compilerExternalToolchain, true); } - if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { + if (this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { ret += " "; ret += compilerOptionSysroot; - ret += this->EscapeForShell(compilerSysroot, true); + ret += this->EscapeForShell(this->CompilerSysroot, true); } return ret; } std::map::iterator mapIt = - variableMappings.find(variable); - if (mapIt != variableMappings.end()) { + this->VariableMappings.find(variable); + if (mapIt != this->VariableMappings.end()) { if (variable.find("_FLAG") == variable.npos) { return this->ConvertToOutputForExisting(mapIt->second); } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 44d10bb..d54fbff 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -390,6 +390,10 @@ protected: std::vector OwnedImportedGeneratorTargets; std::map AliasTargets; + std::map Compilers; + std::map VariableMappings; + std::string CompilerSysroot; + bool EmitUniversalBinaryFlags; // Hack for ExpandRuleVariable until object-oriented version is https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3743af8aa6db573370b5f4d10b06d35ab507b894 commit 3743af8aa6db573370b5f4d10b06d35ab507b894 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 11 00:43:47 2016 +0200 cmLocalGenerator: Merge loops which populate mapping diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 3957641..3543019 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -733,6 +733,18 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); variableMappings[compilerOptionSysroot] = this->Makefile->GetSafeDefinition(compilerOptionSysroot); + + for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); + replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { + std::string const& lang = *i; + std::string actualReplace = *replaceIter; + if (actualReplace.find("${LANG}") != actualReplace.npos) { + cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); + } + + variableMappings[actualReplace] = + this->Makefile->GetSafeDefinition(actualReplace); + } } std::map::iterator compIt = @@ -781,20 +793,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( return ret; } - for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); - replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { - for (std::vector::iterator i = enabledLanguages.begin(); - i != enabledLanguages.end(); ++i) { - std::string const& lang = *i; - std::string actualReplace = *replaceIter; - if (actualReplace.find("${LANG}") != actualReplace.npos) { - cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); - } - - variableMappings[actualReplace] = - this->Makefile->GetSafeDefinition(actualReplace); - } - } std::map::iterator mapIt = variableMappings.find(variable); if (mapIt != variableMappings.end()) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=780b5ea7c5b416e17f469235c08679fa3417262b commit 780b5ea7c5b416e17f469235c08679fa3417262b Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 11 00:43:47 2016 +0200 cmLocalGenerator: Populate variable mapping for all replacements This reduces the final replacement to a simple query in the map, which is much more readable than what was here before. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 0cf2e54..3957641 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -738,8 +738,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::map::iterator compIt = compilers.find(variable); - std::string replace = this->Makefile->GetSafeDefinition(variable); - if (compIt != compilers.end()) { std::string ret = this->ConvertToOutputForExisting( variableMappings["CMAKE_" + compIt->second + "_COMPILER"]); @@ -783,7 +781,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( return ret; } - // loop over language specific replace variables for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { for (std::vector::iterator i = enabledLanguages.begin(); @@ -793,14 +790,18 @@ std::string cmLocalGenerator::ExpandRuleVariable( if (actualReplace.find("${LANG}") != actualReplace.npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); } - if (actualReplace == variable) { - // if the variable is not a FLAG then treat it like a path - if (variable.find("_FLAG") == variable.npos) { - return this->ConvertToOutputForExisting(replace); - } - return replace; - } + + variableMappings[actualReplace] = + this->Makefile->GetSafeDefinition(actualReplace); + } + } + std::map::iterator mapIt = + variableMappings.find(variable); + if (mapIt != variableMappings.end()) { + if (variable.find("_FLAG") == variable.npos) { + return this->ConvertToOutputForExisting(mapIt->second); } + return mapIt->second; } return variable; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9badf851e865ef7076abb49904785b026909a49 commit b9badf851e865ef7076abb49904785b026909a49 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 11 00:43:46 2016 +0200 cmLocalGenerator: Extract compiler option replacement from loop There is no need to be in the loop. Being there just adds to complexity. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f491895..0cf2e54 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -735,6 +735,54 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->Makefile->GetSafeDefinition(compilerOptionSysroot); } + std::map::iterator compIt = + compilers.find(variable); + + std::string replace = this->Makefile->GetSafeDefinition(variable); + + if (compIt != compilers.end()) { + std::string ret = this->ConvertToOutputForExisting( + variableMappings["CMAKE_" + compIt->second + "_COMPILER"]); + std::string const& compilerArg1 = + variableMappings[compIt->first + "_COMPILER_ARG1"]; + std::string const& compilerTarget = + variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + std::string const& compilerOptionTarget = + variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_TARGET"]; + std::string const& compilerExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionSysroot = + variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_SYSROOT"]; + + // if there is a required first argument to the compiler add it + // to the compiler string + if (!compilerArg1.empty()) { + ret += " "; + ret += compilerArg1; + } + if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { + ret += " "; + ret += compilerOptionTarget; + ret += compilerTarget; + } + if (!compilerExternalToolchain.empty() && + !compilerOptionExternalToolchain.empty()) { + ret += " "; + ret += compilerOptionExternalToolchain; + ret += this->EscapeForShell(compilerExternalToolchain, true); + } + if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { + ret += " "; + ret += compilerOptionSysroot; + ret += this->EscapeForShell(compilerSysroot, true); + } + return ret; + } + // loop over language specific replace variables for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { @@ -742,56 +790,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( i != enabledLanguages.end(); ++i) { std::string const& lang = *i; std::string actualReplace = *replaceIter; - - std::map::iterator compIt = - compilers.find(variable); - - std::string replace = this->Makefile->GetSafeDefinition(variable); - - if (compIt != compilers.end()) { - std::string ret = this->ConvertToOutputForExisting( - variableMappings["CMAKE_" + compIt->second + "_COMPILER"]); - std::string const& compilerArg1 = - variableMappings[compIt->first + "_COMPILER_ARG1"]; - std::string const& compilerTarget = - variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; - std::string const& compilerOptionTarget = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_TARGET"]; - std::string const& compilerExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionSysroot = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_SYSROOT"]; - - // if there is a required first argument to the compiler add it - // to the compiler string - if (!compilerArg1.empty()) { - ret += " "; - ret += compilerArg1; - } - if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { - ret += " "; - ret += compilerOptionTarget; - ret += compilerTarget; - } - if (!compilerExternalToolchain.empty() && - !compilerOptionExternalToolchain.empty()) { - ret += " "; - ret += compilerOptionExternalToolchain; - ret += this->EscapeForShell(compilerExternalToolchain, true); - } - if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { - ret += " "; - ret += compilerOptionSysroot; - ret += this->EscapeForShell(compilerSysroot, true); - } - return ret; - } if (actualReplace.find("${LANG}") != actualReplace.npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2c6630c566344c4289cf312adfa45f939820f54 commit b2c6630c566344c4289cf312adfa45f939820f54 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 11 00:43:30 2016 +0200 cmLocalGenerator: Populate a container of mappings for replacements The same variables are replaced/retrieved from cmMakefile again and again. Use a container so that they don't have to be retrieved repeatedly, and to simplify the nested loop. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index d451270..f491895 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -693,6 +693,12 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->GetState()->GetEnabledLanguages(); std::map compilers; + + std::map variableMappings; + + std::string compilerSysroot = + this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); + for (std::vector::iterator i = enabledLanguages.begin(); i != enabledLanguages.end(); ++i) { std::string const& lang = *i; @@ -700,6 +706,33 @@ std::string cmLocalGenerator::ExpandRuleVariable( continue; } compilers["CMAKE_" + lang + "_COMPILER"] = lang; + + variableMappings["CMAKE_" + lang + "_COMPILER"] = + this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER"); + + std::string const& compilerArg1 = "CMAKE_" + lang + "_COMPILER_ARG1"; + std::string const& compilerTarget = "CMAKE_" + lang + "_COMPILER_TARGET"; + std::string const& compilerOptionTarget = + "CMAKE_" + lang + "_COMPILE_OPTIONS_TARGET"; + std::string const& compilerExternalToolchain = + "CMAKE_" + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionExternalToolchain = + "CMAKE_" + lang + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionSysroot = + "CMAKE_" + lang + "_COMPILE_OPTIONS_SYSROOT"; + + variableMappings[compilerArg1] = + this->Makefile->GetSafeDefinition(compilerArg1); + variableMappings[compilerTarget] = + this->Makefile->GetSafeDefinition(compilerTarget); + variableMappings[compilerOptionTarget] = + this->Makefile->GetSafeDefinition(compilerOptionTarget); + variableMappings[compilerExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerExternalToolchain); + variableMappings[compilerOptionExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); + variableMappings[compilerOptionSysroot] = + this->Makefile->GetSafeDefinition(compilerOptionSysroot); } // loop over language specific replace variables @@ -707,17 +740,8 @@ std::string cmLocalGenerator::ExpandRuleVariable( replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { for (std::vector::iterator i = enabledLanguages.begin(); i != enabledLanguages.end(); ++i) { - const char* lang = i->c_str(); + std::string const& lang = *i; std::string actualReplace = *replaceIter; - // If this is the compiler then look for the extra variable - // _COMPILER_ARG1 which must be the first argument to the compiler - const char* compilerArg1 = CM_NULLPTR; - const char* compilerTarget = CM_NULLPTR; - const char* compilerOptionTarget = CM_NULLPTR; - const char* compilerExternalToolchain = CM_NULLPTR; - const char* compilerOptionExternalToolchain = CM_NULLPTR; - const char* compilerSysroot = CM_NULLPTR; - const char* compilerOptionSysroot = CM_NULLPTR; std::map::iterator compIt = compilers.find(variable); @@ -725,40 +749,43 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::string replace = this->Makefile->GetSafeDefinition(variable); if (compIt != compilers.end()) { - std::string arg1 = compIt->first + "_ARG1"; - compilerArg1 = this->Makefile->GetDefinition(arg1); - compilerTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + "_COMPILER_TARGET"); - compilerOptionTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_TARGET"); - compilerExternalToolchain = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"); - compilerOptionExternalToolchain = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"); - compilerSysroot = this->Makefile->GetDefinition("CMAKE_SYSROOT"); - compilerOptionSysroot = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_SYSROOT"); - - std::string ret = this->ConvertToOutputForExisting(replace); + std::string ret = this->ConvertToOutputForExisting( + variableMappings["CMAKE_" + compIt->second + "_COMPILER"]); + std::string const& compilerArg1 = + variableMappings[compIt->first + "_COMPILER_ARG1"]; + std::string const& compilerTarget = + variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + std::string const& compilerOptionTarget = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_TARGET"]; + std::string const& compilerExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionSysroot = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_SYSROOT"]; + // if there is a required first argument to the compiler add it // to the compiler string - if (compilerArg1) { + if (!compilerArg1.empty()) { ret += " "; ret += compilerArg1; } - if (compilerTarget && compilerOptionTarget) { + if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { ret += " "; ret += compilerOptionTarget; ret += compilerTarget; } - if (compilerExternalToolchain && compilerOptionExternalToolchain) { + if (!compilerExternalToolchain.empty() && + !compilerOptionExternalToolchain.empty()) { ret += " "; ret += compilerOptionExternalToolchain; ret += this->EscapeForShell(compilerExternalToolchain, true); } - if (compilerSysroot && compilerOptionSysroot) { + if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { ret += " "; ret += compilerOptionSysroot; ret += this->EscapeForShell(compilerSysroot, true); ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Tue Oct 11 00:01:15 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 11 Oct 2016 00:01:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-165-g2fb8e5b Message-ID: <20161011040115.E5EF5F5DF7@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 2fb8e5b1c46ea586233b19e612ba174aa74d004c (commit) from 656ebaca3be50e92edca3d9628b784f5ff1e6a99 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2fb8e5b1c46ea586233b19e612ba174aa74d004c commit 2fb8e5b1c46ea586233b19e612ba174aa74d004c Author: Kitware Robot AuthorDate: Tue Oct 11 00:01:06 2016 -0400 Commit: Kitware Robot CommitDate: Tue Oct 11 00:01:06 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index da91b74..e35ea30 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 7) -set(CMake_VERSION_PATCH 20161010) +set(CMake_VERSION_PATCH 20161011) #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 Oct 11 08:41:57 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 11 Oct 2016 08:41:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-396-g1c6b43d Message-ID: <20161011124157.6C79DE1E63@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 1c6b43d80fe151145e68ed1f718b31705abb1537 (commit) via bf86012ada901386dbf5545fdc820e81f3e6bf92 (commit) from 67c528c03d2c598e4922f932c5598d5da91bc408 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c6b43d80fe151145e68ed1f718b31705abb1537 commit 1c6b43d80fe151145e68ed1f718b31705abb1537 Merge: 67c528c bf86012 Author: Brad King AuthorDate: Tue Oct 11 08:41:56 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 11 08:41:56 2016 -0400 Merge topic 'cmake-gui-fix-extra-generator-names' into next bf86012a cmake-gui: Fix "extra" generator entries in drop-down list https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf86012ada901386dbf5545fdc820e81f3e6bf92 commit bf86012ada901386dbf5545fdc820e81f3e6bf92 Author: Brad King AuthorDate: Tue Oct 11 08:35:11 2016 -0400 Commit: Brad King CommitDate: Tue Oct 11 08:39:44 2016 -0400 cmake-gui: Fix "extra" generator entries in drop-down list Refactoring in commit v3.7.0-rc1~291^2~1 (Refactor extra generator registration to use factories, 2016-07-20) accidentally switched the order of the "extra - base" generator names to "base - extra". Switch it back. While this could affect all callers of the `GetRegisteredGenerators` method, only cmake-gui actually used this particular field. Closes: #16359 diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 14124f8..c8cf465 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -929,7 +929,7 @@ void cmake::GetRegisteredGenerators( gen != genList.end(); ++gen) { GeneratorInfo info; info.name = cmExternalMakefileProjectGenerator::CreateFullGeneratorName( - (*i)->GetName(), *gen); + *gen, (*i)->GetName()); info.baseName = *gen; info.extraName = (*i)->GetName(); info.supportsPlatform = false; ----------------------------------------------------------------------- Summary of changes: Source/cmake.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 11 10:25:59 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 11 Oct 2016 10:25:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-398-g86d03c3 Message-ID: <20161011142559.3D240F5CC4@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 86d03c32678c016cbd70d911d38439125d08e207 (commit) via f30fb4d5a450e287ea34667f42efa10e3426ac1f (commit) from 1c6b43d80fe151145e68ed1f718b31705abb1537 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=86d03c32678c016cbd70d911d38439125d08e207 commit 86d03c32678c016cbd70d911d38439125d08e207 Merge: 1c6b43d f30fb4d Author: Brad King AuthorDate: Tue Oct 11 10:25:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 11 10:25:58 2016 -0400 Merge topic 'extract-cmRulePlaceholderExpander' into next f30fb4d5 Revert topic 'extract-cmRulePlaceholderExpander' diff --cc Source/cmMakefileLibraryTargetGenerator.cxx index cb8b5e8,4488f06..8a621ea --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@@ -597,20 -607,15 +595,10 @@@ void cmMakefileLibraryTargetGenerator:: this->LocalGenerator->AddArchitectureFlags( langFlags, this->GeneratorTarget, linkLanguage, this->ConfigName); - // remove any language flags that might not work with the - // particular os - if (forbiddenFlagVar) { - this->RemoveForbiddenFlags(forbiddenFlagVar, linkLanguage, langFlags); - } vars.LanguageCompileFlags = langFlags.c_str(); - std::string launcher; - const char* val = this->LocalGenerator->GetRuleLauncher( - this->GeneratorTarget, "RULE_LAUNCH_LINK"); - if (val && *val) { - launcher = val; - launcher += " "; - } - - CM_AUTO_PTR rulePlaceholderExpander( - this->LocalGenerator->CreateRulePlaceholderExpander()); // Construct the main link rule and expand placeholders. - rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport); + this->LocalGenerator->TargetImplib = targetOutPathImport; if (useArchiveRules) { // Construct the individual object list strings. std::vector object_strings; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f30fb4d5a450e287ea34667f42efa10e3426ac1f commit f30fb4d5a450e287ea34667f42efa10e3426ac1f Author: Brad King AuthorDate: Tue Oct 11 10:25:42 2016 -0400 Commit: Brad King CommitDate: Tue Oct 11 10:25:42 2016 -0400 Revert topic 'extract-cmRulePlaceholderExpander' It needs revisions to deal with dashboard errors. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 7d82a51..048667a 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -309,8 +309,6 @@ set(SRCS cmLocalCommonGenerator.h cmLocalGenerator.cxx cmLocalGenerator.h - cmRulePlaceholderExpander.cxx - cmRulePlaceholderExpander.h cmLocalUnixMakefileGenerator3.cxx cmLocale.h ${MACH_SRCS} diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 1c3a97d..3b19694 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -14,7 +14,6 @@ #include "cmInstallTargetGenerator.h" #include "cmLinkLineComputer.h" #include "cmMakefile.h" -#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmSystemTools.h" #include "cmTarget.h" @@ -41,28 +40,6 @@ #include #endif -// List of variables that are replaced when -// rules are expanced. These variables are -// replaced in the form with GetSafeDefinition(var). -// ${LANG} is replaced in the variable first with all enabled -// languages. -static const char* ruleReplaceVars[] = { - "CMAKE_${LANG}_COMPILER", - "CMAKE_SHARED_LIBRARY_CREATE_${LANG}_FLAGS", - "CMAKE_SHARED_MODULE_CREATE_${LANG}_FLAGS", - "CMAKE_SHARED_MODULE_${LANG}_FLAGS", - "CMAKE_SHARED_LIBRARY_${LANG}_FLAGS", - "CMAKE_${LANG}_LINK_FLAGS", - "CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG", - "CMAKE_${LANG}_ARCHIVE", - "CMAKE_AR", - "CMAKE_CURRENT_SOURCE_DIR", - "CMAKE_CURRENT_BINARY_DIR", - "CMAKE_RANLIB", - "CMAKE_LINKER", - "CMAKE_CL_SHOWINCLUDES_PREFIX" -}; - cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) : cmOutputConverter(makefile->GetStateSnapshot()) , StateSnapshot(makefile->GetStateSnapshot()) @@ -79,65 +56,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) this->BackwardsCompatibilityFinal = false; this->ComputeObjectMaxPath(); - - std::vector enabledLanguages = - this->GetState()->GetEnabledLanguages(); - - this->CompilerSysroot = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); - - for (std::vector::iterator i = enabledLanguages.begin(); - i != enabledLanguages.end(); ++i) { - std::string const& lang = *i; - if (lang == "NONE") { - continue; - } - this->Compilers["CMAKE_" + lang + "_COMPILER"] = lang; - - this->VariableMappings["CMAKE_" + lang + "_COMPILER"] = - this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER"); - - std::string const& compilerArg1 = "CMAKE_" + lang + "_COMPILER_ARG1"; - std::string const& compilerTarget = "CMAKE_" + lang + "_COMPILER_TARGET"; - std::string const& compilerOptionTarget = - "CMAKE_" + lang + "_COMPILE_OPTIONS_TARGET"; - std::string const& compilerExternalToolchain = - "CMAKE_" + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"; - std::string const& compilerOptionExternalToolchain = - "CMAKE_" + lang + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"; - std::string const& compilerOptionSysroot = - "CMAKE_" + lang + "_COMPILE_OPTIONS_SYSROOT"; - - this->VariableMappings[compilerArg1] = - this->Makefile->GetSafeDefinition(compilerArg1); - this->VariableMappings[compilerTarget] = - this->Makefile->GetSafeDefinition(compilerTarget); - this->VariableMappings[compilerOptionTarget] = - this->Makefile->GetSafeDefinition(compilerOptionTarget); - this->VariableMappings[compilerExternalToolchain] = - this->Makefile->GetSafeDefinition(compilerExternalToolchain); - this->VariableMappings[compilerOptionExternalToolchain] = - this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); - this->VariableMappings[compilerOptionSysroot] = - this->Makefile->GetSafeDefinition(compilerOptionSysroot); - - for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); - replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { - std::string actualReplace = *replaceIter; - if (actualReplace.find("${LANG}") != actualReplace.npos) { - cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); - } - - this->VariableMappings[actualReplace] = - this->Makefile->GetSafeDefinition(actualReplace); - } - } -} - -cmRulePlaceholderExpander* cmLocalGenerator::CreateRulePlaceholderExpander() - const -{ - return new cmRulePlaceholderExpander(this->Compilers, this->VariableMappings, - this->CompilerSysroot); } cmLocalGenerator::~cmLocalGenerator() @@ -568,6 +486,325 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->Makefile->GetStateSnapshot(); } +// List of variables that are replaced when +// rules are expanced. These variables are +// replaced in the form with GetSafeDefinition(var). +// ${LANG} is replaced in the variable first with all enabled +// languages. +static const char* ruleReplaceVars[] = { + "CMAKE_${LANG}_COMPILER", + "CMAKE_SHARED_LIBRARY_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_${LANG}_FLAGS", + "CMAKE_SHARED_LIBRARY_${LANG}_FLAGS", + "CMAKE_${LANG}_LINK_FLAGS", + "CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG", + "CMAKE_${LANG}_ARCHIVE", + "CMAKE_AR", + "CMAKE_CURRENT_SOURCE_DIR", + "CMAKE_CURRENT_BINARY_DIR", + "CMAKE_RANLIB", + "CMAKE_LINKER", + "CMAKE_CL_SHOWINCLUDES_PREFIX", + CM_NULLPTR +}; + +std::string cmLocalGenerator::ExpandRuleVariable( + std::string const& variable, const RuleVariables& replaceValues) +{ + if (replaceValues.LinkFlags) { + if (variable == "LINK_FLAGS") { + return replaceValues.LinkFlags; + } + } + if (replaceValues.Manifests) { + if (variable == "MANIFESTS") { + return replaceValues.Manifests; + } + } + if (replaceValues.Flags) { + if (variable == "FLAGS") { + return replaceValues.Flags; + } + } + + if (replaceValues.Source) { + if (variable == "SOURCE") { + return replaceValues.Source; + } + } + if (replaceValues.PreprocessedSource) { + if (variable == "PREPROCESSED_SOURCE") { + return replaceValues.PreprocessedSource; + } + } + if (replaceValues.AssemblySource) { + if (variable == "ASSEMBLY_SOURCE") { + return replaceValues.AssemblySource; + } + } + if (replaceValues.Object) { + if (variable == "OBJECT") { + return replaceValues.Object; + } + } + if (replaceValues.ObjectDir) { + if (variable == "OBJECT_DIR") { + return replaceValues.ObjectDir; + } + } + if (replaceValues.ObjectFileDir) { + if (variable == "OBJECT_FILE_DIR") { + return replaceValues.ObjectFileDir; + } + } + if (replaceValues.Objects) { + if (variable == "OBJECTS") { + return replaceValues.Objects; + } + } + if (replaceValues.ObjectsQuoted) { + if (variable == "OBJECTS_QUOTED") { + return replaceValues.ObjectsQuoted; + } + } + if (replaceValues.Defines && variable == "DEFINES") { + return replaceValues.Defines; + } + if (replaceValues.Includes && variable == "INCLUDES") { + return replaceValues.Includes; + } + if (replaceValues.TargetPDB) { + if (variable == "TARGET_PDB") { + return replaceValues.TargetPDB; + } + } + if (replaceValues.TargetCompilePDB) { + if (variable == "TARGET_COMPILE_PDB") { + return replaceValues.TargetCompilePDB; + } + } + if (replaceValues.DependencyFile) { + if (variable == "DEP_FILE") { + return replaceValues.DependencyFile; + } + } + + if (replaceValues.Target) { + if (variable == "TARGET_QUOTED") { + std::string targetQuoted = replaceValues.Target; + if (!targetQuoted.empty() && targetQuoted[0] != '\"') { + targetQuoted = '\"'; + targetQuoted += replaceValues.Target; + targetQuoted += '\"'; + } + return targetQuoted; + } + if (variable == "TARGET_UNQUOTED") { + std::string unquoted = replaceValues.Target; + std::string::size_type sz = unquoted.size(); + if (sz > 2 && unquoted[0] == '\"' && unquoted[sz - 1] == '\"') { + unquoted = unquoted.substr(1, sz - 2); + } + return unquoted; + } + if (replaceValues.LanguageCompileFlags) { + if (variable == "LANGUAGE_COMPILE_FLAGS") { + return replaceValues.LanguageCompileFlags; + } + } + if (replaceValues.Target) { + if (variable == "TARGET") { + return replaceValues.Target; + } + } + if (variable == "TARGET_IMPLIB") { + return this->TargetImplib; + } + if (variable == "TARGET_VERSION_MAJOR") { + if (replaceValues.TargetVersionMajor) { + return replaceValues.TargetVersionMajor; + } + return "0"; + } + if (variable == "TARGET_VERSION_MINOR") { + if (replaceValues.TargetVersionMinor) { + return replaceValues.TargetVersionMinor; + } + return "0"; + } + if (replaceValues.Target) { + if (variable == "TARGET_BASE") { + // Strip the last extension off the target name. + std::string targetBase = replaceValues.Target; + std::string::size_type pos = targetBase.rfind('.'); + if (pos != targetBase.npos) { + return targetBase.substr(0, pos); + } + return targetBase; + } + } + } + if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" || + variable == "TARGET_INSTALLNAME_DIR") { + // All these variables depend on TargetSOName + if (replaceValues.TargetSOName) { + if (variable == "TARGET_SONAME") { + return replaceValues.TargetSOName; + } + if (variable == "SONAME_FLAG" && replaceValues.SONameFlag) { + return replaceValues.SONameFlag; + } + if (replaceValues.TargetInstallNameDir && + variable == "TARGET_INSTALLNAME_DIR") { + return replaceValues.TargetInstallNameDir; + } + } + return ""; + } + if (replaceValues.LinkLibraries) { + if (variable == "LINK_LIBRARIES") { + return replaceValues.LinkLibraries; + } + } + if (replaceValues.Language) { + if (variable == "LANGUAGE") { + return replaceValues.Language; + } + } + if (replaceValues.CMTarget) { + if (variable == "TARGET_NAME") { + return replaceValues.CMTarget->GetName(); + } + if (variable == "TARGET_TYPE") { + return cmState::GetTargetTypeName(replaceValues.CMTarget->GetType()); + } + } + if (replaceValues.Output) { + if (variable == "OUTPUT") { + return replaceValues.Output; + } + } + if (variable == "CMAKE_COMMAND") { + return this->ConvertToOutputFormat( + cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), + SHELL); + } + std::vector enabledLanguages = + this->GetState()->GetEnabledLanguages(); + // loop over language specific replace variables + int pos = 0; + while (ruleReplaceVars[pos]) { + for (std::vector::iterator i = enabledLanguages.begin(); + i != enabledLanguages.end(); ++i) { + const char* lang = i->c_str(); + std::string actualReplace = ruleReplaceVars[pos]; + // If this is the compiler then look for the extra variable + // _COMPILER_ARG1 which must be the first argument to the compiler + const char* compilerArg1 = CM_NULLPTR; + const char* compilerTarget = CM_NULLPTR; + const char* compilerOptionTarget = CM_NULLPTR; + const char* compilerExternalToolchain = CM_NULLPTR; + const char* compilerOptionExternalToolchain = CM_NULLPTR; + const char* compilerSysroot = CM_NULLPTR; + const char* compilerOptionSysroot = CM_NULLPTR; + if (actualReplace == "CMAKE_${LANG}_COMPILER") { + std::string arg1 = actualReplace + "_ARG1"; + cmSystemTools::ReplaceString(arg1, "${LANG}", lang); + compilerArg1 = this->Makefile->GetDefinition(arg1); + compilerTarget = this->Makefile->GetDefinition( + std::string("CMAKE_") + lang + "_COMPILER_TARGET"); + compilerOptionTarget = this->Makefile->GetDefinition( + std::string("CMAKE_") + lang + "_COMPILE_OPTIONS_TARGET"); + compilerExternalToolchain = this->Makefile->GetDefinition( + std::string("CMAKE_") + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"); + compilerOptionExternalToolchain = + this->Makefile->GetDefinition(std::string("CMAKE_") + lang + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"); + compilerSysroot = this->Makefile->GetDefinition("CMAKE_SYSROOT"); + compilerOptionSysroot = this->Makefile->GetDefinition( + std::string("CMAKE_") + lang + "_COMPILE_OPTIONS_SYSROOT"); + } + if (actualReplace.find("${LANG}") != actualReplace.npos) { + cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); + } + if (actualReplace == variable) { + std::string replace = this->Makefile->GetSafeDefinition(variable); + // if the variable is not a FLAG then treat it like a path + if (variable.find("_FLAG") == variable.npos) { + std::string ret = this->ConvertToOutputForExisting(replace); + // if there is a required first argument to the compiler add it + // to the compiler string + if (compilerArg1) { + ret += " "; + ret += compilerArg1; + } + if (compilerTarget && compilerOptionTarget) { + ret += " "; + ret += compilerOptionTarget; + ret += compilerTarget; + } + if (compilerExternalToolchain && compilerOptionExternalToolchain) { + ret += " "; + ret += compilerOptionExternalToolchain; + ret += this->EscapeForShell(compilerExternalToolchain, true); + } + if (compilerSysroot && compilerOptionSysroot) { + ret += " "; + ret += compilerOptionSysroot; + ret += this->EscapeForShell(compilerSysroot, true); + } + return ret; + } + return replace; + } + } + pos++; + } + return variable; +} + +void cmLocalGenerator::ExpandRuleVariables(std::string& s, + const RuleVariables& replaceValues) +{ + if (replaceValues.RuleLauncher) { + this->InsertRuleLauncher(s, replaceValues.CMTarget, + replaceValues.RuleLauncher); + } + std::string::size_type start = s.find('<'); + // no variables to expand + if (start == s.npos) { + return; + } + std::string::size_type pos = 0; + std::string expandedInput; + while (start != s.npos && start < s.size() - 2) { + std::string::size_type end = s.find('>', start); + // if we find a < with no > we are done + if (end == s.npos) { + return; + } + char c = s[start + 1]; + // if the next char after the < is not A-Za-z then + // skip it and try to find the next < in the string + if (!isalpha(c)) { + start = s.find('<', start + 1); + } else { + // extract the var + std::string var = s.substr(start + 1, end - start - 1); + std::string replace = this->ExpandRuleVariable(var, replaceValues); + expandedInput += s.substr(pos, start - pos); + expandedInput += replace; + // move to next one + start = s.find('<', start + var.size() + 2); + pos = end + 1; + } + } + // add the rest of the input + expandedInput += s.substr(pos, s.size() - pos); + s = expandedInput; +} + const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target, const std::string& prop) { @@ -577,6 +814,17 @@ const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target, return this->Makefile->GetProperty(prop); } +void cmLocalGenerator::InsertRuleLauncher(std::string& s, + cmGeneratorTarget* target, + const std::string& prop) +{ + if (const char* val = this->GetRuleLauncher(target, prop)) { + std::ostringstream wrapped; + wrapped << val << " " << s; + s = wrapped.str(); + } +} + std::string cmLocalGenerator::ConvertToIncludeReference( std::string const& path, OutputFormat format, bool forceFullPaths) { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 055e1a9..69c4101 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -8,7 +8,6 @@ #include "cmListFileCache.h" #include "cmOutputConverter.h" #include "cmPolicies.h" -#include "cmRulePlaceholderExpander.h" #include "cmState.h" #include "cmake.h" @@ -24,7 +23,6 @@ class cmComputeLinkInformation; class cmCustomCommandGenerator; class cmGeneratorTarget; class cmGlobalGenerator; -class cmRulePlaceholderExpander; class cmMakefile; class cmSourceFile; class cmLinkLineComputer; @@ -86,8 +84,6 @@ public: return this->GlobalGenerator; } - virtual cmRulePlaceholderExpander* CreateRulePlaceholderExpander() const; - std::string GetLinkLibsCMP0065(std::string const& linkLanguage, cmGeneratorTarget& tgt) const; @@ -221,6 +217,42 @@ public: // preprocessed files and assembly files. void GetIndividualFileTargets(std::vector&) {} + // Create a struct to hold the varibles passed into + // ExpandRuleVariables + struct RuleVariables + { + RuleVariables() { memset(this, 0, sizeof(*this)); } + cmGeneratorTarget* CMTarget; + const char* TargetPDB; + const char* TargetCompilePDB; + const char* TargetVersionMajor; + const char* TargetVersionMinor; + const char* Language; + const char* Objects; + const char* Target; + const char* LinkLibraries; + const char* Source; + const char* AssemblySource; + const char* PreprocessedSource; + const char* Output; + const char* Object; + const char* ObjectDir; + const char* ObjectFileDir; + const char* Flags; + const char* ObjectsQuoted; + const char* SONameFlag; + const char* TargetSOName; + const char* TargetInstallNameDir; + const char* LinkFlags; + const char* Manifests; + const char* LanguageCompileFlags; + const char* Defines; + const char* Includes; + const char* RuleLauncher; + const char* DependencyFile; + const char* FilterPrefix; + }; + /** * Get the relative path from the generator output directory to a * per-target support directory. @@ -314,9 +346,6 @@ public: void CreateEvaluationFileOutputs(const std::string& config); void ProcessEvaluationFiles(std::vector& generatedFiles); - const char* GetRuleLauncher(cmGeneratorTarget* target, - const std::string& prop); - protected: ///! put all the libraries for a target on into the given stream void OutputLinkLibraries(cmComputeLinkInformation* pcli, @@ -324,6 +353,18 @@ protected: std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath); + // Expand rule variables in CMake of the type found in language rules + void ExpandRuleVariables(std::string& string, + const RuleVariables& replaceValues); + // Expand rule variables in a single string + std::string ExpandRuleVariable(std::string const& variable, + const RuleVariables& replaceValues); + + const char* GetRuleLauncher(cmGeneratorTarget* target, + const std::string& prop); + void InsertRuleLauncher(std::string& s, cmGeneratorTarget* target, + const std::string& prop); + // Handle old-style install rules stored in the targets. void GenerateTargetInstallRules( std::ostream& os, const std::string& config, @@ -350,12 +391,12 @@ protected: std::vector OwnedImportedGeneratorTargets; std::map AliasTargets; - std::map Compilers; - std::map VariableMappings; - std::string CompilerSysroot; - bool EmitUniversalBinaryFlags; + // Hack for ExpandRuleVariable until object-oriented version is + // committed. + std::string TargetImplib; + KWIML_INT_uint64_t BackwardsCompatibility; bool BackwardsCompatibilityFinal; diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 1863376..e25eb0f 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -10,7 +10,6 @@ #include "cmGlobalNinjaGenerator.h" #include "cmMakefile.h" #include "cmNinjaTargetGenerator.h" -#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -28,19 +27,11 @@ cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg, : cmLocalCommonGenerator(gg, mf, mf->GetState()->GetBinaryDirectory()) , HomeRelativeOutputPath("") { + this->TargetImplib = "$TARGET_IMPLIB"; } // Virtual public methods. -cmRulePlaceholderExpander* -cmLocalNinjaGenerator::CreateRulePlaceholderExpander() const -{ - cmRulePlaceholderExpander* ret = new cmRulePlaceholderExpander( - this->Compilers, this->VariableMappings, this->CompilerSysroot); - ret->SetTargetImpLib("$TARGET_IMPLIB"); - return ret; -} - cmLocalNinjaGenerator::~cmLocalNinjaGenerator() { } @@ -477,8 +468,8 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatements() std::string cmLocalNinjaGenerator::MakeCustomLauncher( cmCustomCommandGenerator const& ccg) { - const char* property_value = - this->Makefile->GetProperty("RULE_LAUNCH_CUSTOM"); + const char* property = "RULE_LAUNCH_CUSTOM"; + const char* property_value = this->Makefile->GetProperty(property); if (!property_value || !*property_value) { return std::string(); @@ -486,8 +477,8 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( // Expand rules in the empty string. It may insert the launcher and // perform replacements. - cmRulePlaceholderExpander::RuleVariables vars; - + RuleVariables vars; + vars.RuleLauncher = property; std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { @@ -500,13 +491,8 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( } vars.Output = output.c_str(); - std::string launcher = property_value; - launcher += " "; - - CM_AUTO_PTR rulePlaceholderExpander( - this->CreateRulePlaceholderExpander()); - - rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars); + std::string launcher; + this->ExpandRuleVariables(launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 95d8eb8..b04788d 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -42,8 +42,6 @@ public: void Generate() CM_OVERRIDE; - cmRulePlaceholderExpander* CreateRulePlaceholderExpander() const CM_OVERRIDE; - std::string GetTargetDirectory(cmGeneratorTarget const* target) const CM_OVERRIDE; @@ -60,6 +58,12 @@ public: return this->HomeRelativeOutputPath; } + void ExpandRuleVariables(std::string& string, + const RuleVariables& replaceValues) + { + cmLocalGenerator::ExpandRuleVariables(string, replaceValues); + } + std::string BuildCommandLine(const std::vector& cmdLines); void AppendTargetOutputs(cmGeneratorTarget* target, cmNinjaDeps& outputs); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index f30414c..02eef59 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -14,7 +14,6 @@ #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" #include "cmOutputConverter.h" -#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -946,9 +945,6 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( *content << dir; } - CM_AUTO_PTR rulePlaceholderExpander( - this->CreateRulePlaceholderExpander()); - // Add each command line to the set of commands. std::vector commands1; std::string currentBinDir = this->GetCurrentBinaryDirectory(); @@ -988,13 +984,14 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( std::string launcher; // Short-circuit if there is no launcher. - const char* val = this->GetRuleLauncher(target, "RULE_LAUNCH_CUSTOM"); + const char* prop = "RULE_LAUNCH_CUSTOM"; + const char* val = this->GetRuleLauncher(target, prop); if (val && *val) { // Expand rules in the empty string. It may insert the launcher and // perform replacements. - cmRulePlaceholderExpander::RuleVariables vars; - vars.CMTargetName = target->GetName().c_str(); - vars.CMTargetType = cmState::GetTargetTypeName(target->GetType()); + RuleVariables vars; + vars.RuleLauncher = prop; + vars.CMTarget = target; std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { @@ -1008,9 +1005,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( } vars.Output = output.c_str(); - launcher = val; - launcher += " "; - rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars); + this->ExpandRuleVariables(launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index dd3fc36..bfc4857 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -11,7 +11,6 @@ #include "cmMakefile.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" -#include "cmRulePlaceholderExpander.h" #include "cmSystemTools.h" #include "cmake.h" @@ -332,10 +331,9 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string manifests = this->GetManifests(); - cmRulePlaceholderExpander::RuleVariables vars; - vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); - vars.CMTargetType = - cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); + cmLocalGenerator::RuleVariables vars; + vars.RuleLauncher = "RULE_LAUNCH_LINK"; + vars.CMTarget = this->GeneratorTarget; vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); @@ -385,26 +383,13 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) real_link_commands.push_back(cmakeCommand); } - std::string launcher; - - const char* val = this->LocalGenerator->GetRuleLauncher( - this->GeneratorTarget, "RULE_LAUNCH_LINK"); - if (val && *val) { - launcher = val; - launcher += " "; - } - - CM_AUTO_PTR rulePlaceholderExpander( - this->LocalGenerator->CreateRulePlaceholderExpander()); - // Expand placeholders in the commands. - rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport); + this->LocalGenerator->TargetImplib = targetOutPathImport; for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { - *i = launcher + *i; - rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + this->LocalGenerator->ExpandRuleVariables(*i, vars); } + this->LocalGenerator->TargetImplib = ""; // Restore path conversion to normal shells. this->LocalGenerator->SetLinkScriptShell(false); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 9f5f0c1..4488f06 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -11,7 +11,6 @@ #include "cmMakefile.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" -#include "cmRulePlaceholderExpander.h" #include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" @@ -533,7 +532,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string manifests = this->GetManifests(); - cmRulePlaceholderExpander::RuleVariables vars; + cmLocalGenerator::RuleVariables vars; vars.TargetPDB = targetOutPathPDB.c_str(); // Setup the target version. @@ -553,9 +552,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( vars.TargetVersionMajor = targetVersionMajor.c_str(); vars.TargetVersionMinor = targetVersionMinor.c_str(); - vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); - vars.CMTargetType = - cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); + vars.RuleLauncher = "RULE_LAUNCH_LINK"; + vars.CMTarget = this->GeneratorTarget; vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); @@ -616,18 +614,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( } vars.LanguageCompileFlags = langFlags.c_str(); - std::string launcher; - const char* val = this->LocalGenerator->GetRuleLauncher( - this->GeneratorTarget, "RULE_LAUNCH_LINK"); - if (val && *val) { - launcher = val; - launcher += " "; - } - - CM_AUTO_PTR rulePlaceholderExpander( - this->LocalGenerator->CreateRulePlaceholderExpander()); // Construct the main link rule and expand placeholders. - rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport); + this->LocalGenerator->TargetImplib = targetOutPathImport; if (useArchiveRules) { // Construct the individual object list strings. std::vector object_strings; @@ -640,9 +628,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::const_iterator i = archiveCreateCommands.begin(); i != archiveCreateCommands.end(); ++i) { - std::string cmd = launcher + *i; - rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, - cmd, vars); + std::string cmd = *i; + this->LocalGenerator->ExpandRuleVariables(cmd, vars); real_link_commands.push_back(cmd); } } @@ -652,9 +639,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::const_iterator i = archiveAppendCommands.begin(); i != archiveAppendCommands.end(); ++i) { - std::string cmd = launcher + *i; - rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, - cmd, vars); + std::string cmd = *i; + this->LocalGenerator->ExpandRuleVariables(cmd, vars); real_link_commands.push_back(cmd); } } @@ -663,9 +649,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::const_iterator i = archiveFinishCommands.begin(); i != archiveFinishCommands.end(); ++i) { - std::string cmd = launcher + *i; - rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, cmd, - vars); + std::string cmd = *i; + this->LocalGenerator->ExpandRuleVariables(cmd, vars); // If there is no ranlib the command will be ":". Skip it. if (!cmd.empty() && cmd[0] != ':') { real_link_commands.push_back(cmd); @@ -687,11 +672,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Expand placeholders. for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { - *i = launcher + *i; - rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + this->LocalGenerator->ExpandRuleVariables(*i, vars); } } + this->LocalGenerator->TargetImplib = ""; // Restore path conversion to normal shells. this->LocalGenerator->SetLinkScriptShell(false); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 3947c47..1483fbb 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -18,7 +18,6 @@ #include "cmMakefileLibraryTargetGenerator.h" #include "cmMakefileUtilityTargetGenerator.h" #include "cmOutputConverter.h" -#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -544,11 +543,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( targetOutPathCompilePDB[targetOutPathCompilePDB.size() - 1] = '/'; } } - cmRulePlaceholderExpander::RuleVariables vars; + cmLocalGenerator::RuleVariables vars; vars.RuleLauncher = "RULE_LAUNCH_COMPILE"; - vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); - vars.CMTargetType = - cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); + vars.CMTarget = this->GeneratorTarget; vars.Language = lang.c_str(); vars.Target = targetOutPathReal.c_str(); vars.TargetPDB = targetOutPathPDB.c_str(); @@ -590,9 +587,6 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( bool const lang_has_assembly = lang_has_preprocessor; bool const lang_can_export_cmds = lang_has_preprocessor; - CM_AUTO_PTR rulePlaceholderExpander( - this->LocalGenerator->CreateRulePlaceholderExpander()); - // Construct the compile rules. { std::string compileRuleVar = "CMAKE_"; @@ -606,9 +600,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( if (this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS") && lang_can_export_cmds && compileCommands.size() == 1) { std::string compileCommand = compileCommands[0]; - - rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, - compileCommand, vars); + this->LocalGenerator->ExpandRuleVariables(compileCommand, vars); std::string workingDirectory = cmSystemTools::CollapseFullPath( this->LocalGenerator->GetCurrentBinaryDirectory()); compileCommand.replace(compileCommand.find(langFlags), langFlags.size(), @@ -667,8 +659,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = compileCommands.begin(); i != compileCommands.end(); ++i) { - rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + this->LocalGenerator->ExpandRuleVariables(*i, vars); } // Change the command working directory to the local build tree. @@ -731,8 +722,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = preprocessCommands.begin(); i != preprocessCommands.end(); ++i) { - rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, - *i, vars); + this->LocalGenerator->ExpandRuleVariables(*i, vars); } this->LocalGenerator->CreateCDCommand( @@ -779,8 +769,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = assemblyCommands.begin(); i != assemblyCommands.end(); ++i) { - rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, - *i, vars); + this->LocalGenerator->ExpandRuleVariables(*i, vars); } this->LocalGenerator->CreateCDCommand( diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index fe51f34..ab086eb 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -15,7 +15,6 @@ #include "cmNinjaTypes.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" -#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -168,11 +167,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) std::string rspcontent; if (!this->GetGlobalGenerator()->HasRule(ruleName)) { - cmRulePlaceholderExpander::RuleVariables vars; - vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); - vars.CMTargetType = - cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); - + cmLocalGenerator::RuleVariables vars; + vars.RuleLauncher = "RULE_LAUNCH_LINK"; + vars.CMTarget = this->GetGeneratorTarget(); vars.Language = this->TargetLinkLanguage.c_str(); std::string responseFlag; @@ -241,24 +238,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) vars.LanguageCompileFlags = langFlags.c_str(); } - std::string launcher; - const char* val = this->GetLocalGenerator()->GetRuleLauncher( - this->GetGeneratorTarget(), "RULE_LAUNCH_LINK"); - if (val && *val) { - launcher = val; - launcher += " "; - } - - CM_AUTO_PTR rulePlaceholderExpander( - this->GetLocalGenerator()->CreateRulePlaceholderExpander()); - // Rule for linking library/executable. std::vector linkCmds = this->ComputeLinkCmd(); for (std::vector::iterator i = linkCmds.begin(); i != linkCmds.end(); ++i) { - *i = launcher + *i; - rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), - *i, vars); + this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); } { // If there is no ranlib the command will be ":". Skip it. diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 0650e40..fb2581d 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -14,7 +14,6 @@ #include "cmNinjaNormalTargetGenerator.h" #include "cmNinjaUtilityTargetGenerator.h" #include "cmOutputConverter.h" -#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -374,10 +373,9 @@ void cmNinjaTargetGenerator::WriteLanguageRules(const std::string& language) void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) { - cmRulePlaceholderExpander::RuleVariables vars; - vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); - vars.CMTargetType = - cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); + cmLocalGenerator::RuleVariables vars; + vars.RuleLauncher = "RULE_LAUNCH_COMPILE"; + vars.CMTarget = this->GetGeneratorTarget(); vars.Language = lang.c_str(); vars.Source = "$IN_ABS"; vars.Object = "$out"; @@ -454,21 +452,10 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) vars.Flags = flags.c_str(); vars.DependencyFile = depfile.c_str(); - CM_AUTO_PTR rulePlaceholderExpander( - this->GetLocalGenerator()->CreateRulePlaceholderExpander()); - std::string const tdi = this->GetLocalGenerator()->ConvertToOutputFormat( ConvertToNinjaPath(this->GetTargetDependInfoPath(lang)), cmLocalGenerator::SHELL); - std::string launcher; - const char* val = this->GetLocalGenerator()->GetRuleLauncher( - this->GetGeneratorTarget(), "RULE_LAUNCH_COMPILE"); - if (val && *val) { - launcher = val; - launcher += " "; - } - if (explicitPP) { // Lookup the explicit preprocessing rule. std::string const ppVar = "CMAKE_" + lang + "_PREPROCESS_SOURCE"; @@ -479,9 +466,9 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) std::string const ppDeptype = ""; // no deps= for multiple outputs std::string const ppDepfile = "$DEP_FILE"; - cmRulePlaceholderExpander::RuleVariables ppVars; - ppVars.CMTargetName = vars.CMTargetName; - ppVars.CMTargetType = vars.CMTargetType; + cmLocalGenerator::RuleVariables ppVars; + ppVars.RuleLauncher = vars.RuleLauncher; + ppVars.CMTarget = vars.CMTarget; ppVars.Language = vars.Language; ppVars.Object = "$out"; // for RULE_LAUNCH_COMPILE ppVars.PreprocessedSource = "$out"; @@ -509,9 +496,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = ppCmds.begin(); i != ppCmds.end(); ++i) { - *i = launcher + *i; - rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), - *i, ppVars); + this->GetLocalGenerator()->ExpandRuleVariables(*i, ppVars); } // Run CMake dependency scanner on preprocessed output. @@ -623,9 +608,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { - *i = launcher + *i; - rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), *i, - vars); + this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); } std::string cmdLine = @@ -978,7 +961,7 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( return; } - cmRulePlaceholderExpander::RuleVariables compileObjectVars; + cmLocalGenerator::RuleVariables compileObjectVars; compileObjectVars.Language = language.c_str(); std::string escapedSourceFileName = sourceFileName; @@ -1010,13 +993,9 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( std::vector compileCmds; cmSystemTools::ExpandListArgument(compileCmd, compileCmds); - CM_AUTO_PTR rulePlaceholderExpander( - this->GetLocalGenerator()->CreateRulePlaceholderExpander()); - for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { - rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), *i, - compileObjectVars); + this->GetLocalGenerator()->ExpandRuleVariables(*i, compileObjectVars); } std::string cmdLine = diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx deleted file mode 100644 index 601c3b4..0000000 --- a/Source/cmRulePlaceholderExpander.cxx +++ /dev/null @@ -1,299 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmRulePlaceholderExpander.h" - -#include "cmOutputConverter.h" -#include "cmSystemTools.h" - -cmRulePlaceholderExpander::cmRulePlaceholderExpander( - std::map const& compilers, - std::map const& variableMappings, - std::string const& compilerSysroot) - : Compilers(compilers) - , VariableMappings(variableMappings) - , CompilerSysroot(compilerSysroot) -{ -} - -std::string cmRulePlaceholderExpander::ExpandRuleVariable( - cmOutputConverter* outputConverter, std::string const& variable, - const RuleVariables& replaceValues) -{ - if (replaceValues.LinkFlags) { - if (variable == "LINK_FLAGS") { - return replaceValues.LinkFlags; - } - } - if (replaceValues.Manifests) { - if (variable == "MANIFESTS") { - return replaceValues.Manifests; - } - } - if (replaceValues.Flags) { - if (variable == "FLAGS") { - return replaceValues.Flags; - } - } - - if (replaceValues.Source) { - if (variable == "SOURCE") { - return replaceValues.Source; - } - } - if (replaceValues.PreprocessedSource) { - if (variable == "PREPROCESSED_SOURCE") { - return replaceValues.PreprocessedSource; - } - } - if (replaceValues.AssemblySource) { - if (variable == "ASSEMBLY_SOURCE") { - return replaceValues.AssemblySource; - } - } - if (replaceValues.Object) { - if (variable == "OBJECT") { - return replaceValues.Object; - } - } - if (replaceValues.ObjectDir) { - if (variable == "OBJECT_DIR") { - return replaceValues.ObjectDir; - } - } - if (replaceValues.ObjectFileDir) { - if (variable == "OBJECT_FILE_DIR") { - return replaceValues.ObjectFileDir; - } - } - if (replaceValues.Objects) { - if (variable == "OBJECTS") { - return replaceValues.Objects; - } - } - if (replaceValues.ObjectsQuoted) { - if (variable == "OBJECTS_QUOTED") { - return replaceValues.ObjectsQuoted; - } - } - if (replaceValues.Defines && variable == "DEFINES") { - return replaceValues.Defines; - } - if (replaceValues.Includes && variable == "INCLUDES") { - return replaceValues.Includes; - } - if (replaceValues.TargetPDB) { - if (variable == "TARGET_PDB") { - return replaceValues.TargetPDB; - } - } - if (replaceValues.TargetCompilePDB) { - if (variable == "TARGET_COMPILE_PDB") { - return replaceValues.TargetCompilePDB; - } - } - if (replaceValues.DependencyFile) { - if (variable == "DEP_FILE") { - return replaceValues.DependencyFile; - } - } - - if (replaceValues.Target) { - if (variable == "TARGET_QUOTED") { - std::string targetQuoted = replaceValues.Target; - if (!targetQuoted.empty() && targetQuoted[0] != '\"') { - targetQuoted = '\"'; - targetQuoted += replaceValues.Target; - targetQuoted += '\"'; - } - return targetQuoted; - } - if (variable == "TARGET_UNQUOTED") { - std::string unquoted = replaceValues.Target; - std::string::size_type sz = unquoted.size(); - if (sz > 2 && unquoted[0] == '\"' && unquoted[sz - 1] == '\"') { - unquoted = unquoted.substr(1, sz - 2); - } - return unquoted; - } - if (replaceValues.LanguageCompileFlags) { - if (variable == "LANGUAGE_COMPILE_FLAGS") { - return replaceValues.LanguageCompileFlags; - } - } - if (replaceValues.Target) { - if (variable == "TARGET") { - return replaceValues.Target; - } - } - if (variable == "TARGET_IMPLIB") { - return this->TargetImpLib; - } - if (variable == "TARGET_VERSION_MAJOR") { - if (replaceValues.TargetVersionMajor) { - return replaceValues.TargetVersionMajor; - } - return "0"; - } - if (variable == "TARGET_VERSION_MINOR") { - if (replaceValues.TargetVersionMinor) { - return replaceValues.TargetVersionMinor; - } - return "0"; - } - if (replaceValues.Target) { - if (variable == "TARGET_BASE") { - // Strip the last extension off the target name. - std::string targetBase = replaceValues.Target; - std::string::size_type pos = targetBase.rfind('.'); - if (pos != targetBase.npos) { - return targetBase.substr(0, pos); - } - return targetBase; - } - } - } - if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" || - variable == "TARGET_INSTALLNAME_DIR") { - // All these variables depend on TargetSOName - if (replaceValues.TargetSOName) { - if (variable == "TARGET_SONAME") { - return replaceValues.TargetSOName; - } - if (variable == "SONAME_FLAG" && replaceValues.SONameFlag) { - return replaceValues.SONameFlag; - } - if (replaceValues.TargetInstallNameDir && - variable == "TARGET_INSTALLNAME_DIR") { - return replaceValues.TargetInstallNameDir; - } - } - return ""; - } - if (replaceValues.LinkLibraries) { - if (variable == "LINK_LIBRARIES") { - return replaceValues.LinkLibraries; - } - } - if (replaceValues.Language) { - if (variable == "LANGUAGE") { - return replaceValues.Language; - } - } - if (replaceValues.CMTargetName) { - if (variable == "TARGET_NAME") { - return replaceValues.CMTargetName; - } - } - if (replaceValues.CMTargetType) { - if (variable == "TARGET_TYPE") { - return replaceValues.CMTargetType; - } - } - if (replaceValues.Output) { - if (variable == "OUTPUT") { - return replaceValues.Output; - } - } - if (variable == "CMAKE_COMMAND") { - return outputConverter->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), - cmOutputConverter::SHELL); - } - - std::map::iterator compIt = - this->Compilers.find(variable); - - if (compIt != this->Compilers.end()) { - std::string ret = outputConverter->ConvertToOutputForExisting( - this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]); - std::string const& compilerArg1 = - this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; - std::string const& compilerTarget = - this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; - std::string const& compilerOptionTarget = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_TARGET"]; - std::string const& compilerExternalToolchain = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionExternalToolchain = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionSysroot = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_SYSROOT"]; - - // if there is a required first argument to the compiler add it - // to the compiler string - if (!compilerArg1.empty()) { - ret += " "; - ret += compilerArg1; - } - if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { - ret += " "; - ret += compilerOptionTarget; - ret += compilerTarget; - } - if (!compilerExternalToolchain.empty() && - !compilerOptionExternalToolchain.empty()) { - ret += " "; - ret += compilerOptionExternalToolchain; - ret += outputConverter->EscapeForShell(compilerExternalToolchain, true); - } - if (this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { - ret += " "; - ret += compilerOptionSysroot; - ret += outputConverter->EscapeForShell(this->CompilerSysroot, true); - } - return ret; - } - - std::map::iterator mapIt = - this->VariableMappings.find(variable); - if (mapIt != this->VariableMappings.end()) { - if (variable.find("_FLAG") == variable.npos) { - return outputConverter->ConvertToOutputForExisting(mapIt->second); - } - return mapIt->second; - } - return variable; -} - -void cmRulePlaceholderExpander::ExpandRuleVariables( - cmOutputConverter* outputConverter, std::string& s, - const RuleVariables& replaceValues) -{ - std::string::size_type start = s.find('<'); - // no variables to expand - if (start == s.npos) { - return; - } - std::string::size_type pos = 0; - std::string expandedInput; - while (start != s.npos && start < s.size() - 2) { - std::string::size_type end = s.find('>', start); - // if we find a < with no > we are done - if (end == s.npos) { - return; - } - char c = s[start + 1]; - // if the next char after the < is not A-Za-z then - // skip it and try to find the next < in the string - if (!isalpha(c)) { - start = s.find('<', start + 1); - } else { - // extract the var - std::string var = s.substr(start + 1, end - start - 1); - std::string replace = - this->ExpandRuleVariable(outputConverter, var, replaceValues); - expandedInput += s.substr(pos, start - pos); - expandedInput += replace; - // move to next one - start = s.find('<', start + var.size() + 2); - pos = end + 1; - } - } - // add the rest of the input - expandedInput += s.substr(pos, s.size() - pos); - s = expandedInput; -} diff --git a/Source/cmRulePlaceholderExpander.h b/Source/cmRulePlaceholderExpander.h deleted file mode 100644 index 9140f8f..0000000 --- a/Source/cmRulePlaceholderExpander.h +++ /dev/null @@ -1,85 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ - -#ifndef cmRulePlaceholderExpander_h -#define cmRulePlaceholderExpander_h - -#include - -#include -#include - -#include - -class cmGeneratorTarget; -class cmOutputConverter; - -class cmRulePlaceholderExpander -{ -public: - cmRulePlaceholderExpander( - std::map const& compilers, - std::map const& variableMappings, - std::string const& compilerSysroot); - - void SetTargetImpLib(std::string const& targetImpLib) - { - this->TargetImpLib = targetImpLib; - } - - // Create a struct to hold the varibles passed into - // ExpandRuleVariables - struct RuleVariables - { - RuleVariables() { memset(this, 0, sizeof(*this)); } - const char* CMTargetName; - const char* CMTargetType; - const char* TargetPDB; - const char* TargetCompilePDB; - const char* TargetVersionMajor; - const char* TargetVersionMinor; - const char* Language; - const char* Objects; - const char* Target; - const char* LinkLibraries; - const char* Source; - const char* AssemblySource; - const char* PreprocessedSource; - const char* Output; - const char* Object; - const char* ObjectDir; - const char* ObjectFileDir; - const char* Flags; - const char* ObjectsQuoted; - const char* SONameFlag; - const char* TargetSOName; - const char* TargetInstallNameDir; - const char* LinkFlags; - const char* Manifests; - const char* LanguageCompileFlags; - const char* Defines; - const char* Includes; - const char* RuleLauncher; - const char* DependencyFile; - const char* FilterPrefix; - }; - - // Expand rule variables in CMake of the type found in language rules - void ExpandRuleVariables(cmOutputConverter* outputConverter, - std::string& string, - const RuleVariables& replaceValues); - - // Expand rule variables in a single string - std::string ExpandRuleVariable(cmOutputConverter* outputConverter, - std::string const& variable, - const RuleVariables& replaceValues); - -private: - std::string TargetImpLib; - - std::map Compilers; - std::map VariableMappings; - std::string CompilerSysroot; -}; - -#endif diff --git a/bootstrap b/bootstrap index 9936365..fb8b1eb 100755 --- a/bootstrap +++ b/bootstrap @@ -281,7 +281,6 @@ CMAKE_CXX_SOURCES="\ cmInstallDirectoryGenerator \ cmLocalCommonGenerator \ cmLocalGenerator \ - cmRulePlaceholderExpander \ cmInstalledFile \ cmInstallGenerator \ cmInstallExportGenerator \ ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 - Source/cmLocalGenerator.cxx | 412 +++++++++++++++++++----- Source/cmLocalGenerator.h | 63 +++- Source/cmLocalNinjaGenerator.cxx | 28 +- Source/cmLocalNinjaGenerator.h | 8 +- Source/cmLocalUnixMakefileGenerator3.cxx | 17 +- Source/cmMakefileExecutableTargetGenerator.cxx | 27 +- Source/cmMakefileLibraryTargetGenerator.cxx | 40 +-- Source/cmMakefileTargetGenerator.cxx | 23 +- Source/cmNinjaNormalTargetGenerator.cxx | 24 +- Source/cmNinjaTargetGenerator.cxx | 41 +-- Source/cmRulePlaceholderExpander.cxx | 299 ----------------- Source/cmRulePlaceholderExpander.h | 85 ----- bootstrap | 1 - 14 files changed, 439 insertions(+), 631 deletions(-) delete mode 100644 Source/cmRulePlaceholderExpander.cxx delete mode 100644 Source/cmRulePlaceholderExpander.h hooks/post-receive -- CMake From kwrobot at kitware.com Wed Oct 12 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 12 Oct 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-166-g8eb6038 Message-ID: <20161012040107.2F6E5F48F5@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 8eb6038d0d98da7f7e04462a72bd2e7529a7baff (commit) from 2fb8e5b1c46ea586233b19e612ba174aa74d004c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8eb6038d0d98da7f7e04462a72bd2e7529a7baff commit 8eb6038d0d98da7f7e04462a72bd2e7529a7baff Author: Kitware Robot AuthorDate: Wed Oct 12 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Wed Oct 12 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e35ea30..e298fc3 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 7) -set(CMake_VERSION_PATCH 20161011) +set(CMake_VERSION_PATCH 20161012) #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 Oct 12 08:54:30 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 12 Oct 2016 08:54:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-401-g3a087b7 Message-ID: <20161012125430.77ACCF5D92@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 3a087b7b57b8d3625655930b086588cfc14c3829 (commit) via 632326a7c762aa039d245a506553c9f06d23cd10 (commit) via 2fb8e5b1c46ea586233b19e612ba174aa74d004c (commit) from 86d03c32678c016cbd70d911d38439125d08e207 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a087b7b57b8d3625655930b086588cfc14c3829 commit 3a087b7b57b8d3625655930b086588cfc14c3829 Merge: 86d03c3 632326a Author: Brad King AuthorDate: Wed Oct 12 08:54:29 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 12 08:54:29 2016 -0400 Merge topic 'FindSDL-mingw-mwindows' into next 632326a7 FindSDL: Add -mwindows to link flags for MinGW, correct wording 2fb8e5b1 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=632326a7c762aa039d245a506553c9f06d23cd10 commit 632326a7c762aa039d245a506553c9f06d23cd10 Author: Emil Laine AuthorDate: Thu Sep 15 15:29:33 2016 +0300 Commit: Brad King CommitDate: Wed Oct 12 08:49:16 2016 -0400 FindSDL: Add -mwindows to link flags for MinGW, correct wording The `-mwindows` flag is needed to avoid creating an additional console window when starting SDL applications built with MinGW. There is no `mwindows` library. See also https://cygwin.com/ml/cygwin/2007-04/msg00027.html diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake index c0cdd98..4e4411f 100644 --- a/Modules/FindSDL.cmake +++ b/Modules/FindSDL.cmake @@ -122,11 +122,10 @@ if(NOT APPLE) find_package(Threads) endif() -# MinGW needs an additional library, mwindows -# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -lmwindows -# (Actually on second look, I think it only needs one of the m* libraries.) +# MinGW needs an additional link flag, -mwindows +# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -mwindows if(MINGW) - set(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW") + set(MINGW32_LIBRARY mingw32 "-mwindows" CACHE STRING "link flags for MinGW") endif() if(SDL_LIBRARY_TEMP) ----------------------------------------------------------------------- Summary of changes: Modules/FindSDL.cmake | 7 +++---- Source/CMakeVersion.cmake | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 12 08:58:42 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 12 Oct 2016 08:58:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-410-g7151a2f Message-ID: <20161012125842.84A07F5EDB@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 7151a2f464b03bf024dca0165678299ca35e8c6c (commit) via 5380948faec94270f9b799fba6f8b0e7c9ad0899 (commit) via 1aee54ed87f94ceb91fb6c9693160fa41313b7ca (commit) via 24c86e1c3ff5b507815e081f2173bc5b77358e78 (commit) via 6db64ad43202af66270d996775e1504ba676b63d (commit) via d3df00ae5330de935eafd0f315017ae0f89a6968 (commit) via 10160f691c5fa6849a02383d727b30da648aa878 (commit) via 0838d20e506ed6bf064b51f7ef2d026c76b4af3d (commit) via 8f33de92ba4fc152b0e2b63008732ce0ad4ba18c (commit) from 3a087b7b57b8d3625655930b086588cfc14c3829 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7151a2f464b03bf024dca0165678299ca35e8c6c commit 7151a2f464b03bf024dca0165678299ca35e8c6c Merge: 3a087b7 5380948 Author: Brad King AuthorDate: Wed Oct 12 08:58:38 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 12 08:58:38 2016 -0400 Merge topic 'vs-default-generator' into next 5380948f cmake: Fix default VS generator selection for Microsoft Build Tools 1aee54ed cmake: Simplify default generator search by switching direction 24c86e1c cmake: Use array iteration for default generator VS variants 6db64ad4 cmake: Use array iteration for default generator list d3df00ae cmake: Rename default generator selection list variable 10160f69 cmake: Rename default generator selection internal variable 0838d20e cmake: Simplify VS registry entry lookup 8f33de92 cmake: Factor out default generator selection into helper https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5380948faec94270f9b799fba6f8b0e7c9ad0899 commit 5380948faec94270f9b799fba6f8b0e7c9ad0899 Author: Brad King AuthorDate: Tue Oct 11 13:36:41 2016 -0400 Commit: Brad King CommitDate: Tue Oct 11 13:39:58 2016 -0400 cmake: Fix default VS generator selection for Microsoft Build Tools Some versions of the VS tools do not install the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\$v;InstallDir but all appear to set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\$v\Setup\VC;ProductDir Update our search to consider both entries. Closes: #16360 diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 78f8c48..b4ab42e 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1467,17 +1467,23 @@ void cmake::CreateDefaultGlobalGenerator() { "8.0", "Visual Studio 8 2005" }, // { "7.1", "Visual Studio 7 .NET 2003" } }; + static const char* const vsEntries[] = { + "\\Setup\\VC;ProductDir", // + ";InstallDir" // + }; for (VSVersionedGenerator const* g = cmArrayBegin(vsGenerators); found.empty() && g != cmArrayEnd(vsGenerators); ++g) { for (const char* const* v = cmArrayBegin(vsVariants); found.empty() && v != cmArrayEnd(vsVariants); ++v) { - std::string reg = vsregBase + *v + g->MSVersion; - reg += ";InstallDir"; - std::string dir; - if (cmSystemTools::ReadRegistryValue(reg, dir, - cmSystemTools::KeyWOW64_32) && - cmSystemTools::PathExists(dir)) { - found = g->GeneratorName; + for (const char* const* e = cmArrayBegin(vsEntries); + found.empty() && e != cmArrayEnd(vsEntries); ++e) { + std::string const reg = vsregBase + *v + g->MSVersion + *e; + std::string dir; + if (cmSystemTools::ReadRegistryValue(reg, dir, + cmSystemTools::KeyWOW64_32) && + cmSystemTools::PathExists(dir)) { + found = g->GeneratorName; + } } } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1aee54ed87f94ceb91fb6c9693160fa41313b7ca commit 1aee54ed87f94ceb91fb6c9693160fa41313b7ca Author: Brad King AuthorDate: Tue Oct 11 13:29:37 2016 -0400 Commit: Brad King CommitDate: Tue Oct 11 13:32:33 2016 -0400 cmake: Simplify default generator search by switching direction Search from newest to oldest and stop once found. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 96a7b9a..78f8c48 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1458,20 +1458,19 @@ void cmake::CreateDefaultGlobalGenerator() const char* GeneratorName; }; static VSVersionedGenerator const vsGenerators[] = { - /* clang-format needs this comment to break after the opening brace */ - { "7.1", "Visual Studio 7 .NET 2003" }, - { "8.0", "Visual Studio 8 2005" }, - { "9.0", "Visual Studio 9 2008" }, - { "10.0", "Visual Studio 10 2010" }, - { "11.0", "Visual Studio 11 2012" }, - { "12.0", "Visual Studio 12 2013" }, - { "14.0", "Visual Studio 14 2015" }, - { "15.0", "Visual Studio 15" } + { "15.0", "Visual Studio 15" }, // + { "14.0", "Visual Studio 14 2015" }, // + { "12.0", "Visual Studio 12 2013" }, // + { "11.0", "Visual Studio 11 2012" }, // + { "10.0", "Visual Studio 10 2010" }, // + { "9.0", "Visual Studio 9 2008" }, // + { "8.0", "Visual Studio 8 2005" }, // + { "7.1", "Visual Studio 7 .NET 2003" } }; for (VSVersionedGenerator const* g = cmArrayBegin(vsGenerators); - g != cmArrayEnd(vsGenerators); ++g) { + found.empty() && g != cmArrayEnd(vsGenerators); ++g) { for (const char* const* v = cmArrayBegin(vsVariants); - v != cmArrayEnd(vsVariants); ++v) { + found.empty() && v != cmArrayEnd(vsVariants); ++v) { std::string reg = vsregBase + *v + g->MSVersion; reg += ";InstallDir"; std::string dir; @@ -1479,7 +1478,6 @@ void cmake::CreateDefaultGlobalGenerator() cmSystemTools::KeyWOW64_32) && cmSystemTools::PathExists(dir)) { found = g->GeneratorName; - break; } } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24c86e1c3ff5b507815e081f2173bc5b77358e78 commit 24c86e1c3ff5b507815e081f2173bc5b77358e78 Author: Brad King AuthorDate: Tue Oct 11 13:14:26 2016 -0400 Commit: Brad King CommitDate: Tue Oct 11 13:19:01 2016 -0400 cmake: Use array iteration for default generator VS variants diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 6ffa308..96a7b9a 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1448,10 +1448,10 @@ void cmake::CreateDefaultGlobalGenerator() // Try to find the newest VS installed on the computer and // use that as a default if -G is not specified const std::string vsregBase = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"; - std::vector vsVerions; - vsVerions.push_back("VisualStudio\\"); - vsVerions.push_back("VCExpress\\"); - vsVerions.push_back("WDExpress\\"); + static const char* const vsVariants[] = { + /* clang-format needs this comment to break after the opening brace */ + "VisualStudio\\", "VCExpress\\", "WDExpress\\" + }; struct VSVersionedGenerator { const char* MSVersion; @@ -1470,8 +1470,9 @@ void cmake::CreateDefaultGlobalGenerator() }; for (VSVersionedGenerator const* g = cmArrayBegin(vsGenerators); g != cmArrayEnd(vsGenerators); ++g) { - for (size_t b = 0; b < vsVerions.size(); b++) { - std::string reg = vsregBase + vsVerions[b] + g->MSVersion; + for (const char* const* v = cmArrayBegin(vsVariants); + v != cmArrayEnd(vsVariants); ++v) { + std::string reg = vsregBase + *v + g->MSVersion; reg += ";InstallDir"; std::string dir; if (cmSystemTools::ReadRegistryValue(reg, dir, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6db64ad43202af66270d996775e1504ba676b63d commit 6db64ad43202af66270d996775e1504ba676b63d Author: Brad King AuthorDate: Tue Oct 11 13:09:38 2016 -0400 Commit: Brad King CommitDate: Tue Oct 11 13:17:48 2016 -0400 cmake: Use array iteration for default generator list diff --git a/Source/cmake.cxx b/Source/cmake.cxx index d74b7c1..6ffa308 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1466,18 +1466,18 @@ void cmake::CreateDefaultGlobalGenerator() { "11.0", "Visual Studio 11 2012" }, { "12.0", "Visual Studio 12 2013" }, { "14.0", "Visual Studio 14 2015" }, - { "15.0", "Visual Studio 15" }, - { 0, 0 } + { "15.0", "Visual Studio 15" } }; - for (int i = 0; vsGenerators[i].MSVersion != 0; i++) { + for (VSVersionedGenerator const* g = cmArrayBegin(vsGenerators); + g != cmArrayEnd(vsGenerators); ++g) { for (size_t b = 0; b < vsVerions.size(); b++) { - std::string reg = vsregBase + vsVerions[b] + vsGenerators[i].MSVersion; + std::string reg = vsregBase + vsVerions[b] + g->MSVersion; reg += ";InstallDir"; std::string dir; if (cmSystemTools::ReadRegistryValue(reg, dir, cmSystemTools::KeyWOW64_32) && cmSystemTools::PathExists(dir)) { - found = vsGenerators[i].GeneratorName; + found = g->GeneratorName; break; } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3df00ae5330de935eafd0f315017ae0f89a6968 commit d3df00ae5330de935eafd0f315017ae0f89a6968 Author: Brad King AuthorDate: Tue Oct 11 13:06:58 2016 -0400 Commit: Brad King CommitDate: Tue Oct 11 13:16:24 2016 -0400 cmake: Rename default generator selection list variable diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ed4d453..d74b7c1 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1452,12 +1452,12 @@ void cmake::CreateDefaultGlobalGenerator() vsVerions.push_back("VisualStudio\\"); vsVerions.push_back("VCExpress\\"); vsVerions.push_back("WDExpress\\"); - struct VSRegistryEntryName + struct VSVersionedGenerator { const char* MSVersion; const char* GeneratorName; }; - VSRegistryEntryName version[] = { + static VSVersionedGenerator const vsGenerators[] = { /* clang-format needs this comment to break after the opening brace */ { "7.1", "Visual Studio 7 .NET 2003" }, { "8.0", "Visual Studio 8 2005" }, @@ -1469,15 +1469,15 @@ void cmake::CreateDefaultGlobalGenerator() { "15.0", "Visual Studio 15" }, { 0, 0 } }; - for (int i = 0; version[i].MSVersion != 0; i++) { + for (int i = 0; vsGenerators[i].MSVersion != 0; i++) { for (size_t b = 0; b < vsVerions.size(); b++) { - std::string reg = vsregBase + vsVerions[b] + version[i].MSVersion; + std::string reg = vsregBase + vsVerions[b] + vsGenerators[i].MSVersion; reg += ";InstallDir"; std::string dir; if (cmSystemTools::ReadRegistryValue(reg, dir, cmSystemTools::KeyWOW64_32) && cmSystemTools::PathExists(dir)) { - found = version[i].GeneratorName; + found = vsGenerators[i].GeneratorName; break; } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=10160f691c5fa6849a02383d727b30da648aa878 commit 10160f691c5fa6849a02383d727b30da648aa878 Author: Brad King AuthorDate: Tue Oct 11 11:50:56 2016 -0400 Commit: Brad King CommitDate: Tue Oct 11 11:50:56 2016 -0400 cmake: Rename default generator selection internal variable diff --git a/Source/cmake.cxx b/Source/cmake.cxx index be08fc7..ed4d453 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1444,7 +1444,7 @@ int cmake::ActualConfigure() void cmake::CreateDefaultGlobalGenerator() { #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW) - std::string installedCompiler; + std::string found; // Try to find the newest VS installed on the computer and // use that as a default if -G is not specified const std::string vsregBase = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"; @@ -1477,13 +1477,12 @@ void cmake::CreateDefaultGlobalGenerator() if (cmSystemTools::ReadRegistryValue(reg, dir, cmSystemTools::KeyWOW64_32) && cmSystemTools::PathExists(dir)) { - installedCompiler = version[i].GeneratorName; + found = version[i].GeneratorName; break; } } } - cmGlobalGenerator* gen = - this->CreateGlobalGenerator(installedCompiler.c_str()); + cmGlobalGenerator* gen = this->CreateGlobalGenerator(found); if (!gen) { gen = new cmGlobalNMakeMakefileGenerator(this); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0838d20e506ed6bf064b51f7ef2d026c76b4af3d commit 0838d20e506ed6bf064b51f7ef2d026c76b4af3d Author: Brad King AuthorDate: Tue Oct 11 11:35:49 2016 -0400 Commit: Brad King CommitDate: Tue Oct 11 11:46:45 2016 -0400 cmake: Simplify VS registry entry lookup diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 3bf7f38..be08fc7 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1447,7 +1447,7 @@ void cmake::CreateDefaultGlobalGenerator() std::string installedCompiler; // Try to find the newest VS installed on the computer and // use that as a default if -G is not specified - const std::string vsregBase = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"; + const std::string vsregBase = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"; std::vector vsVerions; vsVerions.push_back("VisualStudio\\"); vsVerions.push_back("VCExpress\\"); @@ -1472,9 +1472,11 @@ void cmake::CreateDefaultGlobalGenerator() for (int i = 0; version[i].MSVersion != 0; i++) { for (size_t b = 0; b < vsVerions.size(); b++) { std::string reg = vsregBase + vsVerions[b] + version[i].MSVersion; - reg += ";InstallDir]"; - cmSystemTools::ExpandRegistryValues(reg, cmSystemTools::KeyWOW64_32); - if (!(reg == "/registry")) { + reg += ";InstallDir"; + std::string dir; + if (cmSystemTools::ReadRegistryValue(reg, dir, + cmSystemTools::KeyWOW64_32) && + cmSystemTools::PathExists(dir)) { installedCompiler = version[i].GeneratorName; break; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f33de92ba4fc152b0e2b63008732ce0ad4ba18c commit 8f33de92ba4fc152b0e2b63008732ce0ad4ba18c Author: Brad King AuthorDate: Tue Oct 11 11:25:28 2016 -0400 Commit: Brad King CommitDate: Tue Oct 11 11:30:46 2016 -0400 cmake: Factor out default generator selection into helper diff --git a/Source/cmake.cxx b/Source/cmake.cxx index e0f4000..3bf7f38 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1313,54 +1313,7 @@ int cmake::ActualConfigure() cmSystemTools::SetForceUnixPaths( this->GlobalGenerator->GetForceUnixPaths()); } else { -#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW) - std::string installedCompiler; - // Try to find the newest VS installed on the computer and - // use that as a default if -G is not specified - const std::string vsregBase = - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"; - std::vector vsVerions; - vsVerions.push_back("VisualStudio\\"); - vsVerions.push_back("VCExpress\\"); - vsVerions.push_back("WDExpress\\"); - struct VSRegistryEntryName - { - const char* MSVersion; - const char* GeneratorName; - }; - VSRegistryEntryName version[] = { - /* clang-format needs this comment to break after the opening brace */ - { "7.1", "Visual Studio 7 .NET 2003" }, - { "8.0", "Visual Studio 8 2005" }, - { "9.0", "Visual Studio 9 2008" }, - { "10.0", "Visual Studio 10 2010" }, - { "11.0", "Visual Studio 11 2012" }, - { "12.0", "Visual Studio 12 2013" }, - { "14.0", "Visual Studio 14 2015" }, - { "15.0", "Visual Studio 15" }, - { 0, 0 } - }; - for (int i = 0; version[i].MSVersion != 0; i++) { - for (size_t b = 0; b < vsVerions.size(); b++) { - std::string reg = vsregBase + vsVerions[b] + version[i].MSVersion; - reg += ";InstallDir]"; - cmSystemTools::ExpandRegistryValues(reg, cmSystemTools::KeyWOW64_32); - if (!(reg == "/registry")) { - installedCompiler = version[i].GeneratorName; - break; - } - } - } - cmGlobalGenerator* gen = - this->CreateGlobalGenerator(installedCompiler.c_str()); - if (!gen) { - gen = new cmGlobalNMakeMakefileGenerator(this); - } - this->SetGlobalGenerator(gen); - std::cout << "-- Building for: " << gen->GetName() << "\n"; -#else - this->SetGlobalGenerator(new cmGlobalUnixMakefileGenerator3(this)); -#endif + this->CreateDefaultGlobalGenerator(); } if (!this->GlobalGenerator) { cmSystemTools::Error("Could not create generator"); @@ -1488,6 +1441,57 @@ int cmake::ActualConfigure() return 0; } +void cmake::CreateDefaultGlobalGenerator() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW) + std::string installedCompiler; + // Try to find the newest VS installed on the computer and + // use that as a default if -G is not specified + const std::string vsregBase = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"; + std::vector vsVerions; + vsVerions.push_back("VisualStudio\\"); + vsVerions.push_back("VCExpress\\"); + vsVerions.push_back("WDExpress\\"); + struct VSRegistryEntryName + { + const char* MSVersion; + const char* GeneratorName; + }; + VSRegistryEntryName version[] = { + /* clang-format needs this comment to break after the opening brace */ + { "7.1", "Visual Studio 7 .NET 2003" }, + { "8.0", "Visual Studio 8 2005" }, + { "9.0", "Visual Studio 9 2008" }, + { "10.0", "Visual Studio 10 2010" }, + { "11.0", "Visual Studio 11 2012" }, + { "12.0", "Visual Studio 12 2013" }, + { "14.0", "Visual Studio 14 2015" }, + { "15.0", "Visual Studio 15" }, + { 0, 0 } + }; + for (int i = 0; version[i].MSVersion != 0; i++) { + for (size_t b = 0; b < vsVerions.size(); b++) { + std::string reg = vsregBase + vsVerions[b] + version[i].MSVersion; + reg += ";InstallDir]"; + cmSystemTools::ExpandRegistryValues(reg, cmSystemTools::KeyWOW64_32); + if (!(reg == "/registry")) { + installedCompiler = version[i].GeneratorName; + break; + } + } + } + cmGlobalGenerator* gen = + this->CreateGlobalGenerator(installedCompiler.c_str()); + if (!gen) { + gen = new cmGlobalNMakeMakefileGenerator(this); + } + this->SetGlobalGenerator(gen); + std::cout << "-- Building for: " << gen->GetName() << "\n"; +#else + this->SetGlobalGenerator(new cmGlobalUnixMakefileGenerator3(this)); +#endif +} + void cmake::PreLoadCMakeFiles() { std::vector args; diff --git a/Source/cmake.h b/Source/cmake.h index ae1a502..865748b 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -500,6 +500,8 @@ private: // Print a list of valid generators to stderr. void PrintGeneratorList(); + void CreateDefaultGlobalGenerator(); + /** * Convert a message type between a warning and an error, based on the state * of the error output CMake variables, in the cache. ----------------------------------------------------------------------- Summary of changes: Source/cmake.cxx | 106 +++++++++++++++++++++++++++++------------------------- Source/cmake.h | 2 ++ 2 files changed, 60 insertions(+), 48 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 12 09:51:08 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 12 Oct 2016 09:51:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-413-ge00cdcd Message-ID: <20161012135108.4E519F4FA1@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 e00cdcdd433824b1692856231c7e9791164f0ab3 (commit) via 3984b09071ebad215d71203603c5913830ae335a (commit) via 4d832fc7f94e7af9ab4ddec8dd0c8086d757bf66 (commit) from 7151a2f464b03bf024dca0165678299ca35e8c6c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e00cdcdd433824b1692856231c7e9791164f0ab3 commit e00cdcdd433824b1692856231c7e9791164f0ab3 Merge: 7151a2f 3984b09 Author: Brad King AuthorDate: Wed Oct 12 09:51:06 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 12 09:51:06 2016 -0400 Merge topic 'vs-host-x64-tools' into next 3984b090 VS: Provide an option to use x64 host tools 4d832fc7 Help: Document VS and Xcode toolset selection https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3984b09071ebad215d71203603c5913830ae335a commit 3984b09071ebad215d71203603c5913830ae335a Author: Brad King AuthorDate: Fri Oct 7 15:57:04 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 16:06:42 2016 -0400 VS: Provide an option to use x64 host tools Visual Studio provides toolchains that are themselves built for 32-bit or 64-bit host architectures. By default it uses the 32-bit tools, but it can be told to prefer the 64-bit tools on 64-bit hosts. Extend the `CMAKE_GENERATOR_TOOLSET` specification to provide a way to request use of the 64-bit host tools. Closes: #15622 diff --git a/Help/generator/VS_TOOLSET_HOST_ARCH.txt b/Help/generator/VS_TOOLSET_HOST_ARCH.txt new file mode 100644 index 0000000..58e9223 --- /dev/null +++ b/Help/generator/VS_TOOLSET_HOST_ARCH.txt @@ -0,0 +1,10 @@ +For each toolset that comes with this version of Visual Studio, there are +variants that are themselves compiled for 32-bit (x86) and 64-bit (x64) hosts +(independent of the architecture they target). By default Visual Studio +chooses the 32-bit variant even on a 64-bit host. One may request use of the +64-bit host tools by adding ``host=x64`` to the toolset specification: + +``host=x64`` + Select the 64-bit variant of the default toolset. +``,host=x64`` + Select the 64-bit variant of the ```` toolset. diff --git a/Help/generator/Visual Studio 12 2013.rst b/Help/generator/Visual Studio 12 2013.rst index c7358b9..5071b20 100644 --- a/Help/generator/Visual Studio 12 2013.rst +++ b/Help/generator/Visual Studio 12 2013.rst @@ -24,3 +24,5 @@ Toolset Selection The ``v120`` toolset that comes with Visual Studio 12 2013 is selected by default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. + +.. include:: VS_TOOLSET_HOST_ARCH.txt diff --git a/Help/generator/Visual Studio 14 2015.rst b/Help/generator/Visual Studio 14 2015.rst index 0d776e9..64254b5 100644 --- a/Help/generator/Visual Studio 14 2015.rst +++ b/Help/generator/Visual Studio 14 2015.rst @@ -21,3 +21,5 @@ Toolset Selection The ``v140`` toolset that comes with Visual Studio 14 2015 is selected by default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. + +.. include:: VS_TOOLSET_HOST_ARCH.txt diff --git a/Help/generator/Visual Studio 15.rst b/Help/generator/Visual Studio 15.rst index 5bd1882..2eb9052 100644 --- a/Help/generator/Visual Studio 15.rst +++ b/Help/generator/Visual Studio 15.rst @@ -21,3 +21,5 @@ Toolset Selection The ``v141`` toolset that comes with Visual Studio 15 is selected by default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. + +.. include:: VS_TOOLSET_HOST_ARCH.txt diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 145efc6..59d8ab6 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -182,6 +182,11 @@ Id flags: ${testflags} else() set(id_toolset "") endif() + if(CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE) + set(id_PreferredToolArchitecture "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}") + else() + set(id_PreferredToolArchitecture "") + endif() if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") set(id_system "Windows Phone") elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index 2870a11..50be9cb 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -16,6 +16,9 @@ @id_WindowsSDKDesktopARMSupport@ + + @id_PreferredToolArchitecture@ + Application @id_toolset@ diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index caaac87..02ffa41 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -145,10 +145,36 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset( return false; } - this->GeneratorToolset = ts; + if (!this->ParseGeneratorToolset(ts, mf)) { + return false; + } if (const char* toolset = this->GetPlatformToolset()) { mf->AddDefinition("CMAKE_VS_PLATFORM_TOOLSET", toolset); } + if (const char* hostArch = this->GetPlatformToolsetHostArchitecture()) { + mf->AddDefinition("CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE", hostArch); + } + return true; +} + +bool cmGlobalVisualStudio10Generator::ParseGeneratorToolset( + std::string const& ts, cmMakefile* mf) +{ + if (ts.find_first_of(",=") != ts.npos) { + std::ostringstream e; + /* clang-format off */ + e << + "Generator\n" + " " << this->GetName() << "\n" + "does not recognize the toolset\n" + " " << ts << "\n" + "that was specified."; + /* clang-format on */ + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + + this->GeneratorToolset = ts; return true; } @@ -322,6 +348,15 @@ const char* cmGlobalVisualStudio10Generator::GetPlatformToolset() const return 0; } +const char* +cmGlobalVisualStudio10Generator::GetPlatformToolsetHostArchitecture() const +{ + if (!this->GeneratorToolsetHostArchitecture.empty()) { + return this->GeneratorToolsetHostArchitecture.c_str(); + } + return CM_NULLPTR; +} + void cmGlobalVisualStudio10Generator::FindMakeProgram(cmMakefile* mf) { this->cmGlobalVisualStudio8Generator::FindMakeProgram(mf); diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 19c60aa..f8a50ac 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -22,6 +22,7 @@ public: virtual bool SetSystemName(std::string const& s, cmMakefile* mf); virtual bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf); virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf); + virtual bool ParseGeneratorToolset(std::string const& ts, cmMakefile* mf); virtual void GenerateBuildCommand( std::vector& makeCommand, const std::string& makeProgram, @@ -48,6 +49,9 @@ public: /** The toolset name for the target platform. */ const char* GetPlatformToolset() const; + /** The toolset host architecture name (e.g. x64 for 64-bit host tools). */ + const char* GetPlatformToolsetHostArchitecture() const; + /** Return the CMAKE_SYSTEM_NAME. */ std::string const& GetSystemName() const { return this->SystemName; } @@ -101,6 +105,7 @@ protected: std::string const& GetMSBuildCommand(); std::string GeneratorToolset; + std::string GeneratorToolsetHostArchitecture; std::string DefaultPlatformToolset; std::string WindowsTargetPlatformVersion; std::string SystemName; diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 5fdeec7..ec7916c 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -96,6 +96,21 @@ bool cmGlobalVisualStudio12Generator::MatchesGeneratorName( return false; } +bool cmGlobalVisualStudio12Generator::ParseGeneratorToolset( + std::string const& ts, cmMakefile* mf) +{ + std::string::size_type ts_end = ts.size(); + if (cmHasLiteralSuffix(ts, ",host=x64")) { + this->GeneratorToolsetHostArchitecture = "x64"; + ts_end -= 9; + } else if (ts == "host=x64") { + this->GeneratorToolsetHostArchitecture = "x64"; + ts_end = 0; + } + return this->cmGlobalVisualStudio11Generator::ParseGeneratorToolset( + ts.substr(0, ts_end), mf); +} + bool cmGlobalVisualStudio12Generator::InitializeWindowsPhone(cmMakefile* mf) { if (!this->SelectWindowsPhoneToolset(this->DefaultPlatformToolset)) { diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index 78bb637..cdda512 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -22,6 +22,9 @@ public: // version number virtual const char* GetToolsVersion() { return "12.0"; } protected: + bool ParseGeneratorToolset(std::string const& ts, + cmMakefile* mf) CM_OVERRIDE; + virtual bool InitializeWindowsPhone(cmMakefile* mf); virtual bool InitializeWindowsStore(cmMakefile* mf); virtual bool SelectWindowsPhoneToolset(std::string& toolset) const; diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 6690bfa..4a9df04 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -322,6 +322,15 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("\n", 1); } + if (const char* hostArch = + this->GlobalGenerator->GetPlatformToolsetHostArchitecture()) { + this->WriteString("\n", 1); + this->WriteString("", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(hostArch) + << "\n"; + this->WriteString("\n", 1); + } + this->WriteProjectConfigurations(); this->WriteString("\n", 1); this->WriteString("", 2); diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt new file mode 100644 index 0000000..5737e95 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at CMakeLists.txt:[0-9]+ \(project\): + Generator + + .* + + does not recognize the toolset + + Test Toolset,host=x6[45] + + that was specified\.$ diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake new file mode 100644 index 0000000..2fc38e5 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake @@ -0,0 +1 @@ +message(FATAL_ERROR "This should not be reached!") diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake index 283a2a0..e8ce47d 100644 --- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake @@ -6,6 +6,21 @@ run_cmake(NoToolset) if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode" AND NOT XCODE_BELOW_3) set(RunCMake_GENERATOR_TOOLSET "Test Toolset") run_cmake(TestToolset) + if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[245]") + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64") + run_cmake(TestToolsetHostArchBoth) + set(RunCMake_GENERATOR_TOOLSET ",host=x64") + run_cmake(TestToolsetHostArchOnly) + set(RunCMake_GENERATOR_TOOLSET "host=x64") + run_cmake(TestToolsetHostArchOnly) + set(RunCMake_GENERATOR_TOOLSET "Test Toolset") + run_cmake(TestToolsetHostArchNone) + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x65") + run_cmake(BadToolsetHostArch) + else() + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64") + run_cmake(BadToolsetHostArch) + endif() else() set(RunCMake_GENERATOR_TOOLSET "Bad Toolset") run_cmake(BadToolset) diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt new file mode 100644 index 0000000..f0b6d46 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='x64' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt new file mode 100644 index 0000000..576b40c --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt new file mode 100644 index 0000000..8271bd4 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='v[0-9]+' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='x64' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d832fc7f94e7af9ab4ddec8dd0c8086d757bf66 commit 4d832fc7f94e7af9ab4ddec8dd0c8086d757bf66 Author: Brad King AuthorDate: Fri Oct 7 15:56:14 2016 -0400 Commit: Brad King CommitDate: Fri Oct 7 15:57:02 2016 -0400 Help: Document VS and Xcode toolset selection Add explicit sections to the individual generator documentation to cover the `cmake -T` option along with the default behavior for each generator. diff --git a/Help/generator/Visual Studio 10 2010.rst b/Help/generator/Visual Studio 10 2010.rst index c694443..04eef10 100644 --- a/Help/generator/Visual Studio 10 2010.rst +++ b/Help/generator/Visual Studio 10 2010.rst @@ -17,3 +17,10 @@ a target platform name optionally at the end of this generator name: For compatibility with CMake versions prior to 3.0, one may specify this generator using the name ``Visual Studio 10`` without the year component. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v100`` toolset that comes with Visual Studio 10 2010 is selected by +default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/generator/Visual Studio 11 2012.rst b/Help/generator/Visual Studio 11 2012.rst index 2f1e729..347a153 100644 --- a/Help/generator/Visual Studio 11 2012.rst +++ b/Help/generator/Visual Studio 11 2012.rst @@ -20,3 +20,10 @@ a target platform name optionally at the end of this generator name: For compatibility with CMake versions prior to 3.0, one may specify this generator using the name "Visual Studio 11" without the year component. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v110`` toolset that comes with Visual Studio 11 2012 is selected by +default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/generator/Visual Studio 12 2013.rst b/Help/generator/Visual Studio 12 2013.rst index 6e8545b..c7358b9 100644 --- a/Help/generator/Visual Studio 12 2013.rst +++ b/Help/generator/Visual Studio 12 2013.rst @@ -17,3 +17,10 @@ a target platform name optionally at the end of this generator name: For compatibility with CMake versions prior to 3.0, one may specify this generator using the name "Visual Studio 12" without the year component. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v120`` toolset that comes with Visual Studio 12 2013 is selected by +default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/generator/Visual Studio 14 2015.rst b/Help/generator/Visual Studio 14 2015.rst index 707caf9..0d776e9 100644 --- a/Help/generator/Visual Studio 14 2015.rst +++ b/Help/generator/Visual Studio 14 2015.rst @@ -14,3 +14,10 @@ a target platform name optionally at the end of this generator name: ``Visual Studio 14 2015 ARM`` Specify target platform ``ARM``. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v140`` toolset that comes with Visual Studio 14 2015 is selected by +default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/generator/Visual Studio 15.rst b/Help/generator/Visual Studio 15.rst index ae456eb..5bd1882 100644 --- a/Help/generator/Visual Studio 15.rst +++ b/Help/generator/Visual Studio 15.rst @@ -14,3 +14,10 @@ a target platform name optionally at the end of this generator name: ``Visual Studio 15 ARM`` Specify target platform ``ARM``. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v141`` toolset that comes with Visual Studio 15 is selected by +default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/generator/Xcode.rst b/Help/generator/Xcode.rst index d8a6790..25ff4c7 100644 --- a/Help/generator/Xcode.rst +++ b/Help/generator/Xcode.rst @@ -2,3 +2,10 @@ Xcode ----- Generate Xcode project files. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +By default Xcode is allowed to select its own default toolchain. +The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt index fa0e4c1..9b3f717 100644 --- a/Help/manual/OPTIONS_BUILD.txt +++ b/Help/manual/OPTIONS_BUILD.txt @@ -52,13 +52,12 @@ Specify toolset name if supported by generator. Some CMake generators support a toolset name to be given to the - native build system to choose a compiler. This is supported only on - specific generators: - - :: + native build system to choose a compiler. + See the :variable:`CMAKE_GENERATOR_TOOLSET` variable. + This is supported only on specific generators: - Visual Studio >= 10 - Xcode >= 3.0 + * :ref:`Visual Studio Generators` for VS 2010 and above + * The :generator:`Xcode` generator for Xcode 3.0 and above See native build system documentation for allowed toolset names. ----------------------------------------------------------------------- Summary of changes: Help/generator/VS_TOOLSET_HOST_ARCH.txt | 10 ++++++ Help/generator/Visual Studio 10 2010.rst | 7 ++++ Help/generator/Visual Studio 11 2012.rst | 7 ++++ Help/generator/Visual Studio 12 2013.rst | 9 +++++ Help/generator/Visual Studio 14 2015.rst | 9 +++++ Help/generator/Visual Studio 15.rst | 9 +++++ Help/generator/Xcode.rst | 7 ++++ Help/manual/OPTIONS_BUILD.txt | 11 +++--- Modules/CMakeDetermineCompilerId.cmake | 5 +++ Modules/CompilerId/VS-10.vcxproj.in | 3 ++ Source/cmGlobalVisualStudio10Generator.cxx | 37 +++++++++++++++++++- Source/cmGlobalVisualStudio10Generator.h | 5 +++ Source/cmGlobalVisualStudio12Generator.cxx | 15 ++++++++ Source/cmGlobalVisualStudio12Generator.h | 3 ++ Source/cmVisualStudio10TargetGenerator.cxx | 9 +++++ .../BadToolsetHostArch-result.txt} | 0 .../GeneratorToolset/BadToolsetHostArch-stderr.txt | 10 ++++++ .../BadToolsetHostArch.cmake} | 0 Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake | 15 ++++++++ .../TestToolsetHostArchBoth-stdout.txt | 2 ++ .../GeneratorToolset/TestToolsetHostArchBoth.cmake | 2 ++ .../TestToolsetHostArchNone-stdout.txt | 2 ++ .../GeneratorToolset/TestToolsetHostArchNone.cmake | 2 ++ .../TestToolsetHostArchOnly-stdout.txt | 2 ++ .../GeneratorToolset/TestToolsetHostArchOnly.cmake | 2 ++ 25 files changed, 176 insertions(+), 7 deletions(-) create mode 100644 Help/generator/VS_TOOLSET_HOST_ARCH.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => GeneratorToolset/BadToolsetHostArch-result.txt} (100%) create mode 100644 Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt copy Tests/RunCMake/{GeneratorPlatform/BadPlatform.cmake => GeneratorToolset/BadToolsetHostArch.cmake} (100%) create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Thu Oct 13 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 13 Oct 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-167-g429cc18 Message-ID: <20161013040107.87B3FF5DC2@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 429cc18fca163a90c7f6c85d932925ea6aef2667 (commit) from 8eb6038d0d98da7f7e04462a72bd2e7529a7baff (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=429cc18fca163a90c7f6c85d932925ea6aef2667 commit 429cc18fca163a90c7f6c85d932925ea6aef2667 Author: Kitware Robot AuthorDate: Thu Oct 13 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Thu Oct 13 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e298fc3..0013346 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 7) -set(CMake_VERSION_PATCH 20161012) +set(CMake_VERSION_PATCH 20161013) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From rleigh at codelibre.net Thu Oct 13 02:51:40 2016 From: rleigh at codelibre.net (Roger Leigh) Date: Thu, 13 Oct 2016 02:51:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-416-g5ee591d Message-ID: <20161013065140.B91F8F3D41@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 5ee591dbad84c38eb03e8d6d7f3c35ad9f010d87 (commit) via 6f3a8f0febae0753d0114b2d4dc53a788ce4637e (commit) via 8eb6038d0d98da7f7e04462a72bd2e7529a7baff (commit) from e00cdcdd433824b1692856231c7e9791164f0ab3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ee591dbad84c38eb03e8d6d7f3c35ad9f010d87 commit 5ee591dbad84c38eb03e8d6d7f3c35ad9f010d87 Merge: e00cdcd 6f3a8f0 Author: Roger Leigh AuthorDate: Thu Oct 13 02:51:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 02:51:39 2016 -0400 Merge topic 'ice-3.6.3' into next 6f3a8f0f FindIce: Add support for version 3.6.3 8eb6038d CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f3a8f0febae0753d0114b2d4dc53a788ce4637e commit 6f3a8f0febae0753d0114b2d4dc53a788ce4637e Author: Roger Leigh AuthorDate: Wed Oct 12 22:41:51 2016 +0100 Commit: Roger Leigh CommitDate: Wed Oct 12 22:41:51 2016 +0100 FindIce: Add support for version 3.6.3 diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake index 39dc171..a61d4a8 100644 --- a/Modules/FindIce.cmake +++ b/Modules/FindIce.cmake @@ -131,6 +131,7 @@ function(_Ice_FIND) set(ice_versions 3 3.6 + 3.6.3 3.6.2 3.6.1 3.6.0 ----------------------------------------------------------------------- Summary of changes: Modules/FindIce.cmake | 1 + Source/CMakeVersion.cmake | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 08:19:57 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:19:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-418-gba0bb60 Message-ID: <20161013121957.66878F5D8B@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 ba0bb60882068d0581254e0c3dd99dfda44fedf8 (commit) via 6e5a3655cac2937861b1f1f1e66ac7c1fa41c626 (commit) from 5ee591dbad84c38eb03e8d6d7f3c35ad9f010d87 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba0bb60882068d0581254e0c3dd99dfda44fedf8 commit ba0bb60882068d0581254e0c3dd99dfda44fedf8 Merge: 5ee591d 6e5a365 Author: Brad King AuthorDate: Thu Oct 13 08:19:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 08:19:55 2016 -0400 Merge topic 'ice-3.6.3' into next 6e5a3655 FindIce: Add support for version 3.6.3 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e5a3655cac2937861b1f1f1e66ac7c1fa41c626 commit 6e5a3655cac2937861b1f1f1e66ac7c1fa41c626 Author: Roger Leigh AuthorDate: Wed Oct 12 22:41:51 2016 +0100 Commit: Brad King CommitDate: Thu Oct 13 08:19:27 2016 -0400 FindIce: Add support for version 3.6.3 diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake index 39dc171..a61d4a8 100644 --- a/Modules/FindIce.cmake +++ b/Modules/FindIce.cmake @@ -131,6 +131,7 @@ function(_Ice_FIND) set(ice_versions 3 3.6 + 3.6.3 3.6.2 3.6.1 3.6.0 ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 08:25:51 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:25:51 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-169-g0123500 Message-ID: <20161013122551.8F5C2F5F04@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 0123500309d293103c79ba7485b46152bbe6afbb (commit) via bf86012ada901386dbf5545fdc820e81f3e6bf92 (commit) from 429cc18fca163a90c7f6c85d932925ea6aef2667 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0123500309d293103c79ba7485b46152bbe6afbb commit 0123500309d293103c79ba7485b46152bbe6afbb Merge: 429cc18 bf86012 Author: Brad King AuthorDate: Thu Oct 13 08:25:49 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 08:25:49 2016 -0400 Merge topic 'cmake-gui-fix-extra-generator-names' bf86012a cmake-gui: Fix "extra" generator entries in drop-down list ----------------------------------------------------------------------- Summary of changes: Source/cmake.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 08:25:55 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:25:55 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-171-g3b07c58 Message-ID: <20161013122555.3DCC6F5F07@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 3b07c58dbdb7fb02b7a61ea4bc3ea78d1bdbea9c (commit) via b1d67ae8a5a1334bfeaf802c55d517d8eaa0dbf9 (commit) from 0123500309d293103c79ba7485b46152bbe6afbb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b07c58dbdb7fb02b7a61ea4bc3ea78d1bdbea9c commit 3b07c58dbdb7fb02b7a61ea4bc3ea78d1bdbea9c Merge: 0123500 b1d67ae Author: Brad King AuthorDate: Thu Oct 13 08:25:52 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 08:25:52 2016 -0400 Merge topic 'vs15-separate-flag-table' b1d67ae8 VS: Split flag table between v140 and v141 toolsets ----------------------------------------------------------------------- Summary of changes: Source/{cmVS14CLFlagTable.h => cmVS140CLFlagTable.h} | 14 +------------- Source/{cmVS14CLFlagTable.h => cmVS141CLFlagTable.h} | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 11 +++++++++-- 3 files changed, 11 insertions(+), 16 deletions(-) copy Source/{cmVS14CLFlagTable.h => cmVS140CLFlagTable.h} (95%) rename Source/{cmVS14CLFlagTable.h => cmVS141CLFlagTable.h} (99%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 08:25:58 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:25:58 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-173-g9d0e556 Message-ID: <20161013122558.3E9A3F5F09@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 9d0e556904e476d550b6cacfb4e927d63f1b5a37 (commit) via a3c98cb30edba8ba19bc05d4e08fd344f3440f32 (commit) from 3b07c58dbdb7fb02b7a61ea4bc3ea78d1bdbea9c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d0e556904e476d550b6cacfb4e927d63f1b5a37 commit 9d0e556904e476d550b6cacfb4e927d63f1b5a37 Merge: 3b07c58 a3c98cb Author: Brad King AuthorDate: Thu Oct 13 08:25:56 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 08:25:56 2016 -0400 Merge topic 'ExternalProject-fix-CMAKE_CACHE_ARGS-list' a3c98cb3 ExternalProject: Fix regression in passing list to CMAKE_CACHE_ARGS ----------------------------------------------------------------------- Summary of changes: Modules/ExternalProject.cmake | 2 +- Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake | 9 +++++++++ Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake | 4 +++- .../ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake | 9 +++++++++ Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake | 4 +++- 5 files changed, 25 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 08:26:01 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:26:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-176-g2be36b0 Message-ID: <20161013122601.4A39BF5D8E@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 2be36b0ab5efe5775aaaa47d659ec984ed014b8d (commit) via b6a174d2bcd5d64cff7a54a4744fe2b5811d6f9e (commit) via d0faa58a51114a97f3af6a951b6c4052ca19c9ee (commit) from 9d0e556904e476d550b6cacfb4e927d63f1b5a37 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2be36b0ab5efe5775aaaa47d659ec984ed014b8d commit 2be36b0ab5efe5775aaaa47d659ec984ed014b8d Merge: 9d0e556 b6a174d Author: Brad King AuthorDate: Thu Oct 13 08:25:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 08:25:58 2016 -0400 Merge topic 'remove-obsolete' b6a174d2 Makefiles: Remove query for CMAKE_OBJECT_NAME d0faa58a Makefiles: Remove forbidden flag logic ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Darwin.cmake | 2 -- Source/cmMakefileLibraryTargetGenerator.cxx | 17 --------- Source/cmMakefileTargetGenerator.cxx | 50 +-------------------------- Source/cmMakefileTargetGenerator.h | 2 -- 4 files changed, 1 insertion(+), 70 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 08:26:04 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:26:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-178-gbd74517 Message-ID: <20161013122604.447FBF5F09@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 bd74517325fddc0592973f26634c5985490e9d21 (commit) via d9190f3308fb67f01f061038a06006af73a77da1 (commit) from 2be36b0ab5efe5775aaaa47d659ec984ed014b8d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd74517325fddc0592973f26634c5985490e9d21 commit bd74517325fddc0592973f26634c5985490e9d21 Merge: 2be36b0 d9190f3 Author: Brad King AuthorDate: Thu Oct 13 08:26:02 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 08:26:02 2016 -0400 Merge topic 'FindProtobuf-debug-suffix' d9190f33 FindProtobuf: Search for debug library named with `d` suffix ----------------------------------------------------------------------- Summary of changes: Modules/FindProtobuf.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 08:26:07 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:26:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-180-g30fe9f0 Message-ID: <20161013122607.399C3F5F11@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 30fe9f024353dcb9799680e1da73d21745a53b3d (commit) via 632326a7c762aa039d245a506553c9f06d23cd10 (commit) from bd74517325fddc0592973f26634c5985490e9d21 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30fe9f024353dcb9799680e1da73d21745a53b3d commit 30fe9f024353dcb9799680e1da73d21745a53b3d Merge: bd74517 632326a Author: Brad King AuthorDate: Thu Oct 13 08:26:05 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 08:26:05 2016 -0400 Merge topic 'FindSDL-mingw-mwindows' 632326a7 FindSDL: Add -mwindows to link flags for MinGW, correct wording ----------------------------------------------------------------------- Summary of changes: Modules/FindSDL.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 08:26:10 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:26:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-189-g1b592b6 Message-ID: <20161013122610.3B791F5F08@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 1b592b6458ce033b04ba2aa0ee4cf5ace0fd042c (commit) via 5380948faec94270f9b799fba6f8b0e7c9ad0899 (commit) via 1aee54ed87f94ceb91fb6c9693160fa41313b7ca (commit) via 24c86e1c3ff5b507815e081f2173bc5b77358e78 (commit) via 6db64ad43202af66270d996775e1504ba676b63d (commit) via d3df00ae5330de935eafd0f315017ae0f89a6968 (commit) via 10160f691c5fa6849a02383d727b30da648aa878 (commit) via 0838d20e506ed6bf064b51f7ef2d026c76b4af3d (commit) via 8f33de92ba4fc152b0e2b63008732ce0ad4ba18c (commit) from 30fe9f024353dcb9799680e1da73d21745a53b3d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1b592b6458ce033b04ba2aa0ee4cf5ace0fd042c commit 1b592b6458ce033b04ba2aa0ee4cf5ace0fd042c Merge: 30fe9f0 5380948 Author: Brad King AuthorDate: Thu Oct 13 08:26:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 08:26:07 2016 -0400 Merge topic 'vs-default-generator' 5380948f cmake: Fix default VS generator selection for Microsoft Build Tools 1aee54ed cmake: Simplify default generator search by switching direction 24c86e1c cmake: Use array iteration for default generator VS variants 6db64ad4 cmake: Use array iteration for default generator list d3df00ae cmake: Rename default generator selection list variable 10160f69 cmake: Rename default generator selection internal variable 0838d20e cmake: Simplify VS registry entry lookup 8f33de92 cmake: Factor out default generator selection into helper ----------------------------------------------------------------------- Summary of changes: Source/cmake.cxx | 106 +++++++++++++++++++++++++++++------------------------- Source/cmake.h | 2 ++ 2 files changed, 60 insertions(+), 48 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 08:26:28 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:26:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-427-g0fb7df0 Message-ID: <20161013122628.8DAE4F5F13@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 0fb7df0c9ee9d269daaeae76c6bd840eb114be3d (commit) via 1b592b6458ce033b04ba2aa0ee4cf5ace0fd042c (commit) via 30fe9f024353dcb9799680e1da73d21745a53b3d (commit) via bd74517325fddc0592973f26634c5985490e9d21 (commit) via 2be36b0ab5efe5775aaaa47d659ec984ed014b8d (commit) via 9d0e556904e476d550b6cacfb4e927d63f1b5a37 (commit) via 3b07c58dbdb7fb02b7a61ea4bc3ea78d1bdbea9c (commit) via 0123500309d293103c79ba7485b46152bbe6afbb (commit) via 429cc18fca163a90c7f6c85d932925ea6aef2667 (commit) from ba0bb60882068d0581254e0c3dd99dfda44fedf8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0fb7df0c9ee9d269daaeae76c6bd840eb114be3d commit 0fb7df0c9ee9d269daaeae76c6bd840eb114be3d Merge: ba0bb60 1b592b6 Author: Brad King AuthorDate: Thu Oct 13 08:26:18 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 08:26:18 2016 -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 Oct 13 08:46:40 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:46:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-429-g48e27d6 Message-ID: <20161013124640.E3289E6AEF@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 48e27d6151459a671aa7611d298813eb9c2fedc3 (commit) via ccdc3d300f3f0f3e8492e580a21513b9664c9aca (commit) from 0fb7df0c9ee9d269daaeae76c6bd840eb114be3d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=48e27d6151459a671aa7611d298813eb9c2fedc3 commit 48e27d6151459a671aa7611d298813eb9c2fedc3 Merge: 0fb7df0 ccdc3d3 Author: Brad King AuthorDate: Thu Oct 13 08:46:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 08:46:39 2016 -0400 Merge topic 'msbuild-json' into next ccdc3d30 Add a script to convert from MSBuild XML to a JSON format https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccdc3d300f3f0f3e8492e580a21513b9664c9aca commit ccdc3d300f3f0f3e8492e580a21513b9664c9aca Author: Don Olmstead AuthorDate: Mon Oct 10 17:52:49 2016 -0700 Commit: Brad King CommitDate: Wed Oct 12 14:40:18 2016 -0400 Add a script to convert from MSBuild XML to a JSON format This will supersede the `cmparseMSBuildXML.py` script once we have support for loading the JSON files instead of using hard-coded flag tables. diff --git a/Source/cmConvertMSBuildXMLToJSON.py b/Source/cmConvertMSBuildXMLToJSON.py new file mode 100644 index 0000000..93ab8a8 --- /dev/null +++ b/Source/cmConvertMSBuildXMLToJSON.py @@ -0,0 +1,453 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +import argparse +import codecs +import copy +import logging +import json +import os + +from collections import OrderedDict +from xml.dom.minidom import parse, parseString, Element + + +class VSFlags: + """Flags corresponding to cmIDEFlagTable.""" + UserValue = "UserValue" # (1 << 0) + UserIgnored = "UserIgnored" # (1 << 1) + UserRequired = "UserRequired" # (1 << 2) + Continue = "Continue" #(1 << 3) + SemicolonAppendable = "SemicolonAppendable" # (1 << 4) + UserFollowing = "UserFollowing" # (1 << 5) + CaseInsensitive = "CaseInsensitive" # (1 << 6) + UserValueIgnored = [UserValue, UserIgnored] + UserValueRequired = [UserValue, UserRequired] + + +def vsflags(*args): + """Combines the flags.""" + values = [] + + for arg in args: + __append_list(values, arg) + + return values + + +def read_msbuild_xml(path, values={}): + """Reads the MS Build XML file at the path and returns its contents. + + Keyword arguments: + values -- The map to append the contents to (default {}) + """ + + # Attempt to read the file contents + try: + document = parse(path) + except Exception as e: + logging.exception('Could not read MS Build XML file at %s', path) + return values + + # Convert the XML to JSON format + logging.info('Processing MS Build XML file at %s', path) + + # Get the rule node + rule = document.getElementsByTagName('Rule')[0] + + rule_name = rule.attributes['Name'].value + + logging.info('Found rules for %s', rule_name) + + # Proprocess Argument values + __preprocess_arguments(rule) + + # Get all the values + converted_values = [] + __convert(rule, 'EnumProperty', converted_values, __convert_enum) + __convert(rule, 'BoolProperty', converted_values, __convert_bool) + __convert(rule, 'StringListProperty', converted_values, + __convert_string_list) + __convert(rule, 'StringProperty', converted_values, __convert_string) + __convert(rule, 'IntProperty', converted_values, __convert_string) + + values[rule_name] = converted_values + + return values + + +def read_msbuild_json(path, values=[]): + """Reads the MS Build JSON file at the path and returns its contents. + + Keyword arguments: + values -- The list to append the contents to (default []) + """ + if not os.path.exists(path): + logging.info('Could not find MS Build JSON file at %s', path) + return values + + try: + values.extend(__read_json_file(path)) + except Exception as e: + logging.exception('Could not read MS Build JSON file at %s', path) + return values + + logging.info('Processing MS Build JSON file at %s', path) + + return values + + +def main(): + """Script entrypoint.""" + # Parse the arguments + parser = argparse.ArgumentParser( + description='Convert MSBuild XML to JSON format') + + parser.add_argument( + '-t', '--toolchain', help='The name of the toolchain', required=True) + parser.add_argument( + '-o', '--output', help='The output directory', default='') + parser.add_argument( + '-r', + '--overwrite', + help='Whether previously output should be overwritten', + dest='overwrite', + action='store_true') + parser.set_defaults(overwrite=False) + parser.add_argument( + '-d', + '--debug', + help="Debug tool output", + action="store_const", + dest="loglevel", + const=logging.DEBUG, + default=logging.WARNING) + parser.add_argument( + '-v', + '--verbose', + help="Verbose output", + action="store_const", + dest="loglevel", + const=logging.INFO) + parser.add_argument('input', help='The input files', nargs='+') + + args = parser.parse_args() + + toolchain = args.toolchain + + logging.basicConfig(level=args.loglevel) + logging.info('Creating %s toolchain files', toolchain) + + values = {} + + # Iterate through the inputs + for input in args.input: + input = __get_path(input) + + read_msbuild_xml(input, values) + + # Determine if the output directory needs to be created + output_dir = __get_path(args.output) + + if not os.path.exists(output_dir): + os.mkdir(output_dir) + logging.info('Created output directory %s', output_dir) + + for key, value in values.items(): + output_path = __output_path(toolchain, key, output_dir) + + if os.path.exists(output_path) and not args.overwrite: + logging.info('Comparing previous output to current') + + __merge_json_values(value, read_msbuild_json(output_path)) + else: + logging.info('Original output will be overwritten') + + logging.info('Writing MS Build JSON file at %s', output_path) + + __write_json_file(output_path, value) + + +########################################################################################### +# private joining functions +def __merge_json_values(current, previous): + """Merges the values between the current and previous run of the script.""" + for value in current: + name = value['name'] + + # Find the previous value + previous_value = __find_and_remove_value(previous, value) + + if previous_value is not None: + flags = value['flags'] + previous_flags = previous_value['flags'] + + if flags != previous_flags: + logging.warning( + 'Flags for %s are different. Using previous value.', name) + + value['flags'] = previous_flags + else: + logging.warning('Value %s is a new value', name) + + for value in previous: + name = value['name'] + logging.warning( + 'Value %s not present in current run. Appending value.', name) + + current.append(value) + + +def __find_and_remove_value(list, compare): + """Finds the value in the list that corresponds with the value of compare.""" + # next throws if there are no matches + try: + found = next(value for value in list + if value['name'] == compare['name'] and value['switch'] == + compare['switch']) + except: + return None + + list.remove(found) + + return found + + +########################################################################################### +# private xml functions +def __convert(root, tag, values, func): + """Converts the tag type found in the root and converts them using the func + and appends them to the values. + """ + elements = root.getElementsByTagName(tag) + + for element in elements: + converted = func(element) + + # Append to the list + __append_list(values, converted) + + +def __convert_enum(node): + """Converts an EnumProperty node to JSON format.""" + name = __get_attribute(node, 'Name') + logging.debug('Found EnumProperty named %s', name) + + converted_values = [] + + for value in node.getElementsByTagName('EnumValue'): + converted = __convert_node(value) + + converted['value'] = converted['name'] + converted['name'] = name + + # Modify flags when there is an argument child + __with_argument(value, converted) + + converted_values.append(converted) + + return converted_values + + +def __convert_bool(node): + """Converts an BoolProperty node to JSON format.""" + converted = __convert_node(node, default_value='true') + + # Check for a switch for reversing the value + reverse_switch = __get_attribute(node, 'ReverseSwitch') + + if reverse_switch: + converted_reverse = copy.deepcopy(converted) + + converted_reverse['switch'] = reverse_switch + converted_reverse['value'] = 'false' + + return [converted_reverse, converted] + + # Modify flags when there is an argument child + __with_argument(node, converted) + + return __check_for_flag(converted) + + +def __convert_string_list(node): + """Converts a StringListProperty node to JSON format.""" + converted = __convert_node(node) + + # Determine flags for the string list + flags = vsflags(VSFlags.UserValue) + + # Check for a separator to determine if it is semicolon appendable + # If not present assume the value should be ; + separator = __get_attribute(node, 'Separator', default_value=';') + + if separator == ';': + flags = vsflags(flags, VSFlags.SemicolonAppendable) + + converted['flags'] = flags + + return __check_for_flag(converted) + + +def __convert_string(node): + """Converts a StringProperty node to JSON format.""" + converted = __convert_node(node, default_flags=vsflags(VSFlags.UserValue)) + + return __check_for_flag(converted) + + +def __convert_node(node, default_value='', default_flags=vsflags()): + """Converts a XML node to a JSON equivalent.""" + name = __get_attribute(node, 'Name') + logging.debug('Found %s named %s', node.tagName, name) + + converted = {} + converted['name'] = name + converted['switch'] = __get_attribute(node, 'Switch') + converted['comment'] = __get_attribute(node, 'DisplayName') + converted['value'] = default_value + + # Check for the Flags attribute in case it was created during preprocessing + flags = __get_attribute(node, 'Flags') + + if flags: + flags = flags.split(',') + else: + flags = default_flags + + converted['flags'] = flags + + return converted + + +def __check_for_flag(value): + """Checks whether the value has a switch value. + + If not then returns None as it should not be added. + """ + if value['switch']: + return value + else: + logging.warning('Skipping %s which has no command line switch', + value['name']) + return None + + +def __with_argument(node, value): + """Modifies the flags in value if the node contains an Argument.""" + arguments = node.getElementsByTagName('Argument') + + if arguments: + logging.debug('Found argument within %s', value['name']) + value['flags'] = vsflags(VSFlags.UserValueIgnored, VSFlags.Continue) + + +def __preprocess_arguments(root): + """Preprocesses occurrances of Argument within the root. + + Argument XML values reference other values within the document by name. The + referenced value does not contain a switch. This function will add the + switch associated with the argument. + """ + # Set the flags to require a value + flags = ','.join(vsflags(VSFlags.UserValueRequired)) + + # Search through the arguments + arguments = root.getElementsByTagName('Argument') + + for argument in arguments: + reference = __get_attribute(argument, 'Property') + found = None + + # Look for the argument within the root's children + for child in root.childNodes: + # Ignore Text nodes + if isinstance(child, Element): + name = __get_attribute(child, 'Name') + + if name == reference: + found = child + break + + if found is not None: + logging.info('Found property named %s', reference) + # Get the associated switch + switch = __get_attribute(argument.parentNode, 'Switch') + + # See if there is already a switch associated with the element. + if __get_attribute(found, 'Switch'): + logging.debug('Copying node %s', reference) + clone = found.cloneNode(True) + root.insertBefore(clone, found) + found = clone + + found.setAttribute('Switch', switch) + found.setAttribute('Flags', flags) + else: + logging.warning('Could not find property named %s', reference) + + +def __get_attribute(node, name, default_value=''): + """Retrieves the attribute of the given name from the node. + + If not present then the default_value is used. + """ + if node.hasAttribute(name): + return node.attributes[name].value.strip() + else: + return default_value + + +########################################################################################### +# private path functions +def __get_path(path): + """Gets the path to the file.""" + if not os.path.isabs(path): + path = os.path.join(os.getcwd(), path) + + return os.path.normpath(path) + + +def __output_path(toolchain, rule, output_dir): + """Gets the output path for a file given the toolchain, rule and output_dir""" + filename = '%s_%s.json' % (toolchain, rule) + return os.path.join(output_dir, filename) + + +########################################################################################### +# private JSON file functions +def __read_json_file(path): + """Reads a JSON file at the path.""" + with open(path, 'r') as f: + return json.load(f) + + +def __write_json_file(path, values): + """Writes a JSON file at the path with the values provided.""" + # Sort the keys to ensure ordering + sort_order = ['name', 'switch', 'comment', 'value', 'flags'] + sorted_values = [ + OrderedDict( + sorted( + value.items(), key=lambda value: sort_order.index(value[0]))) + for value in values + ] + + with open(path, 'w') as f: + json.dump(sorted_values, f, indent=2, separators=(',', ': ')) + + +########################################################################################### +# private list helpers +def __append_list(append_to, value): + """Appends the value to the list.""" + if value is not None: + if isinstance(value, list): + append_to.extend(value) + else: + append_to.append(value) + +########################################################################################### +# main entry point +if __name__ == "__main__": + main() ----------------------------------------------------------------------- Summary of changes: Source/cmConvertMSBuildXMLToJSON.py | 453 +++++++++++++++++++++++++++++++++++ 1 file changed, 453 insertions(+) create mode 100644 Source/cmConvertMSBuildXMLToJSON.py hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 08:47:46 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:47:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-431-g605a85b Message-ID: <20161013124747.038D8F2067@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 605a85bd1cfb5601c9ec77cf9e45019f9faf23a2 (commit) via 19ffc0729fdc12b8c0874db7ae1c5e576b48ba10 (commit) from 48e27d6151459a671aa7611d298813eb9c2fedc3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=605a85bd1cfb5601c9ec77cf9e45019f9faf23a2 commit 605a85bd1cfb5601c9ec77cf9e45019f9faf23a2 Merge: 48e27d6 19ffc07 Author: Brad King AuthorDate: Thu Oct 13 08:47:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 08:47:45 2016 -0400 Merge topic 'st2-exclude-patterns-variable' into next 19ffc072 Sublime: Exclude build tree from source tree project only optionally https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19ffc0729fdc12b8c0874db7ae1c5e576b48ba10 commit 19ffc0729fdc12b8c0874db7ae1c5e576b48ba10 Author: Bruno Pedrosa AuthorDate: Mon Oct 10 21:18:54 2016 +0200 Commit: Brad King CommitDate: Wed Oct 12 12:38:00 2016 -0400 Sublime: Exclude build tree from source tree project only optionally Create a `CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE` variable to control addition of the build tree to `folder_exclude_patterns` in the `.sublime-project`. Change the default of this behavior to OFF. Closes: #16351 diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index f76c467..064a9e3 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -159,6 +159,7 @@ Variables that Change Behavior /variable/CMAKE_PROJECT_PROJECT-NAME_INCLUDE /variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY /variable/CMAKE_STAGING_PREFIX + /variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE /variable/CMAKE_SYSTEM_APPBUNDLE_PATH /variable/CMAKE_SYSTEM_FRAMEWORK_PATH /variable/CMAKE_SYSTEM_IGNORE_PATH diff --git a/Help/release/dev/st2-exclude-patterns-variable.rst b/Help/release/dev/st2-exclude-patterns-variable.rst new file mode 100644 index 0000000..8706c1f --- /dev/null +++ b/Help/release/dev/st2-exclude-patterns-variable.rst @@ -0,0 +1,7 @@ +st2-exclude-patterns-variable +----------------------------- + +* The :generator:`Sublime Text 2` extra generator no longer excludes the + build tree from the ``.sublime-project`` when it is inside the source tree. + The :variable:`CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE` variable + was added to control the behavior explicitly. diff --git a/Help/variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE.rst b/Help/variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE.rst new file mode 100644 index 0000000..d654425 --- /dev/null +++ b/Help/variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE.rst @@ -0,0 +1,7 @@ +CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE +--------------------------------------- + +If this variable evaluates to ``ON`` at the end of the top-level +``CMakeLists.txt`` file, the :generator:`Sublime Text 2` extra generator +excludes the build tree from the ``.sublime-project`` if it is inside the +source tree. diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 5ae969b..41f82a2 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -55,10 +55,14 @@ cmExtraSublimeTextGenerator::GetFactory() cmExtraSublimeTextGenerator::cmExtraSublimeTextGenerator() : cmExternalMakefileProjectGenerator() { + this->ExcludeBuildFolder = false; } void cmExtraSublimeTextGenerator::Generate() { + this->ExcludeBuildFolder = this->GlobalGenerator->GlobalSettingIsOn( + "CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE"); + // for each sub project in the project create a sublime text 2 project for (std::map >::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); @@ -84,6 +88,7 @@ void cmExtraSublimeTextGenerator::CreateNewProjectFile( const std::vector& lgs, const std::string& filename) { const cmMakefile* mf = lgs[0]->GetMakefile(); + cmGeneratedFileStream fout(filename.c_str()); if (!fout) { return; @@ -102,8 +107,10 @@ void cmExtraSublimeTextGenerator::CreateNewProjectFile( if ((!outputRelativeToSourceRoot.empty()) && ((outputRelativeToSourceRoot.length() < 3) || (outputRelativeToSourceRoot.substr(0, 3) != "../"))) { - fout << ",\n\t\t\t\"folder_exclude_patterns\": [\"" - << outputRelativeToSourceRoot << "\"]"; + if (this->ExcludeBuildFolder) { + fout << ",\n\t\t\t\"folder_exclude_patterns\": [\"" + << outputRelativeToSourceRoot << "\"]"; + } } } else { fout << "\t{\n\t\t\t\"path\": \"./\""; diff --git a/Source/cmExtraSublimeTextGenerator.h b/Source/cmExtraSublimeTextGenerator.h index c917992..0c58221 100644 --- a/Source/cmExtraSublimeTextGenerator.h +++ b/Source/cmExtraSublimeTextGenerator.h @@ -64,6 +64,8 @@ private: std::string ComputeDefines(cmSourceFile* source, cmLocalGenerator* lg, cmGeneratorTarget* gtgt); + + bool ExcludeBuildFolder; }; #endif ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 1 + Help/release/dev/st2-exclude-patterns-variable.rst | 7 +++++++ Help/variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE.rst | 7 +++++++ Source/cmExtraSublimeTextGenerator.cxx | 11 +++++++++-- Source/cmExtraSublimeTextGenerator.h | 2 ++ 5 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 Help/release/dev/st2-exclude-patterns-variable.rst create mode 100644 Help/variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 08:57:21 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 08:57:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-433-gc481462 Message-ID: <20161013125721.9D87AF5799@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 c481462afca694c44b0405042195bfc4ba032e79 (commit) via ff9ecb35546cab4421e66493156f14dba345236f (commit) from 605a85bd1cfb5601c9ec77cf9e45019f9faf23a2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c481462afca694c44b0405042195bfc4ba032e79 commit c481462afca694c44b0405042195bfc4ba032e79 Merge: 605a85b ff9ecb3 Author: Brad King AuthorDate: Thu Oct 13 08:57:20 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 08:57:20 2016 -0400 Merge topic 'vs-host-x64-tools' into next ff9ecb35 fixup! VS: Provide an option to use x64 host tools https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff9ecb35546cab4421e66493156f14dba345236f commit ff9ecb35546cab4421e66493156f14dba345236f Author: Brad King AuthorDate: Thu Oct 13 08:56:26 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 08:56:26 2016 -0400 fixup! VS: Provide an option to use x64 host tools diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 75fc2e4..0ddfc9a 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -220,6 +220,19 @@ bool cmGlobalXCodeGenerator::SetGeneratorToolset(std::string const& ts, cmMakefile* mf) { if (this->XcodeVersion >= 30) { + if (ts.find_first_of(",=") != ts.npos) { + std::ostringstream e; + /* clang-format off */ + e << + "Generator\n" + " " << this->GetName() << "\n" + "does not recognize the toolset\n" + " " << ts << "\n" + "that was specified."; + /* clang-format on */ + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } this->GeneratorToolset = ts; if (!this->GeneratorToolset.empty()) { mf->AddDefinition("CMAKE_XCODE_PLATFORM_TOOLSET", ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalXCodeGenerator.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 09:00:04 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 09:00:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-436-g1ae7aa2 Message-ID: <20161013130005.C1150F58AD@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 1ae7aa2924d658d9f0afe3b839038ea13f284d14 (commit) via b446295d63fc481a66569fd363b02779009311a3 (commit) via 779939a00ebc21419404737f2fc2b34e7775f086 (commit) from c481462afca694c44b0405042195bfc4ba032e79 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ae7aa2924d658d9f0afe3b839038ea13f284d14 commit 1ae7aa2924d658d9f0afe3b839038ea13f284d14 Merge: c481462 b446295 Author: Brad King AuthorDate: Thu Oct 13 09:00:02 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 09:00:02 2016 -0400 Merge topic 'vs-host-x64-tools' into next b446295d VS: Provide an option to use x64 host tools 779939a0 Help: Document VS and Xcode toolset selection https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b446295d63fc481a66569fd363b02779009311a3 commit b446295d63fc481a66569fd363b02779009311a3 Author: Brad King AuthorDate: Fri Oct 7 15:57:04 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 08:59:32 2016 -0400 VS: Provide an option to use x64 host tools Visual Studio provides toolchains that are themselves built for 32-bit or 64-bit host architectures. By default it uses the 32-bit tools, but it can be told to prefer the 64-bit tools on 64-bit hosts. Extend the `CMAKE_GENERATOR_TOOLSET` specification to provide a way to request use of the 64-bit host tools. Closes: #15622 diff --git a/Help/generator/VS_TOOLSET_HOST_ARCH.txt b/Help/generator/VS_TOOLSET_HOST_ARCH.txt new file mode 100644 index 0000000..58e9223 --- /dev/null +++ b/Help/generator/VS_TOOLSET_HOST_ARCH.txt @@ -0,0 +1,10 @@ +For each toolset that comes with this version of Visual Studio, there are +variants that are themselves compiled for 32-bit (x86) and 64-bit (x64) hosts +(independent of the architecture they target). By default Visual Studio +chooses the 32-bit variant even on a 64-bit host. One may request use of the +64-bit host tools by adding ``host=x64`` to the toolset specification: + +``host=x64`` + Select the 64-bit variant of the default toolset. +``,host=x64`` + Select the 64-bit variant of the ```` toolset. diff --git a/Help/generator/Visual Studio 12 2013.rst b/Help/generator/Visual Studio 12 2013.rst index c7358b9..5071b20 100644 --- a/Help/generator/Visual Studio 12 2013.rst +++ b/Help/generator/Visual Studio 12 2013.rst @@ -24,3 +24,5 @@ Toolset Selection The ``v120`` toolset that comes with Visual Studio 12 2013 is selected by default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. + +.. include:: VS_TOOLSET_HOST_ARCH.txt diff --git a/Help/generator/Visual Studio 14 2015.rst b/Help/generator/Visual Studio 14 2015.rst index 0d776e9..64254b5 100644 --- a/Help/generator/Visual Studio 14 2015.rst +++ b/Help/generator/Visual Studio 14 2015.rst @@ -21,3 +21,5 @@ Toolset Selection The ``v140`` toolset that comes with Visual Studio 14 2015 is selected by default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. + +.. include:: VS_TOOLSET_HOST_ARCH.txt diff --git a/Help/generator/Visual Studio 15.rst b/Help/generator/Visual Studio 15.rst index 5bd1882..2eb9052 100644 --- a/Help/generator/Visual Studio 15.rst +++ b/Help/generator/Visual Studio 15.rst @@ -21,3 +21,5 @@ Toolset Selection The ``v141`` toolset that comes with Visual Studio 15 is selected by default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. + +.. include:: VS_TOOLSET_HOST_ARCH.txt diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 145efc6..59d8ab6 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -182,6 +182,11 @@ Id flags: ${testflags} else() set(id_toolset "") endif() + if(CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE) + set(id_PreferredToolArchitecture "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}") + else() + set(id_PreferredToolArchitecture "") + endif() if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") set(id_system "Windows Phone") elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index 2870a11..50be9cb 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -16,6 +16,9 @@ @id_WindowsSDKDesktopARMSupport@ + + @id_PreferredToolArchitecture@ + Application @id_toolset@ diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index caaac87..02ffa41 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -145,10 +145,36 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset( return false; } - this->GeneratorToolset = ts; + if (!this->ParseGeneratorToolset(ts, mf)) { + return false; + } if (const char* toolset = this->GetPlatformToolset()) { mf->AddDefinition("CMAKE_VS_PLATFORM_TOOLSET", toolset); } + if (const char* hostArch = this->GetPlatformToolsetHostArchitecture()) { + mf->AddDefinition("CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE", hostArch); + } + return true; +} + +bool cmGlobalVisualStudio10Generator::ParseGeneratorToolset( + std::string const& ts, cmMakefile* mf) +{ + if (ts.find_first_of(",=") != ts.npos) { + std::ostringstream e; + /* clang-format off */ + e << + "Generator\n" + " " << this->GetName() << "\n" + "does not recognize the toolset\n" + " " << ts << "\n" + "that was specified."; + /* clang-format on */ + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + + this->GeneratorToolset = ts; return true; } @@ -322,6 +348,15 @@ const char* cmGlobalVisualStudio10Generator::GetPlatformToolset() const return 0; } +const char* +cmGlobalVisualStudio10Generator::GetPlatformToolsetHostArchitecture() const +{ + if (!this->GeneratorToolsetHostArchitecture.empty()) { + return this->GeneratorToolsetHostArchitecture.c_str(); + } + return CM_NULLPTR; +} + void cmGlobalVisualStudio10Generator::FindMakeProgram(cmMakefile* mf) { this->cmGlobalVisualStudio8Generator::FindMakeProgram(mf); diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 19c60aa..f8a50ac 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -22,6 +22,7 @@ public: virtual bool SetSystemName(std::string const& s, cmMakefile* mf); virtual bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf); virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf); + virtual bool ParseGeneratorToolset(std::string const& ts, cmMakefile* mf); virtual void GenerateBuildCommand( std::vector& makeCommand, const std::string& makeProgram, @@ -48,6 +49,9 @@ public: /** The toolset name for the target platform. */ const char* GetPlatformToolset() const; + /** The toolset host architecture name (e.g. x64 for 64-bit host tools). */ + const char* GetPlatformToolsetHostArchitecture() const; + /** Return the CMAKE_SYSTEM_NAME. */ std::string const& GetSystemName() const { return this->SystemName; } @@ -101,6 +105,7 @@ protected: std::string const& GetMSBuildCommand(); std::string GeneratorToolset; + std::string GeneratorToolsetHostArchitecture; std::string DefaultPlatformToolset; std::string WindowsTargetPlatformVersion; std::string SystemName; diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 5fdeec7..ec7916c 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -96,6 +96,21 @@ bool cmGlobalVisualStudio12Generator::MatchesGeneratorName( return false; } +bool cmGlobalVisualStudio12Generator::ParseGeneratorToolset( + std::string const& ts, cmMakefile* mf) +{ + std::string::size_type ts_end = ts.size(); + if (cmHasLiteralSuffix(ts, ",host=x64")) { + this->GeneratorToolsetHostArchitecture = "x64"; + ts_end -= 9; + } else if (ts == "host=x64") { + this->GeneratorToolsetHostArchitecture = "x64"; + ts_end = 0; + } + return this->cmGlobalVisualStudio11Generator::ParseGeneratorToolset( + ts.substr(0, ts_end), mf); +} + bool cmGlobalVisualStudio12Generator::InitializeWindowsPhone(cmMakefile* mf) { if (!this->SelectWindowsPhoneToolset(this->DefaultPlatformToolset)) { diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index 78bb637..cdda512 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -22,6 +22,9 @@ public: // version number virtual const char* GetToolsVersion() { return "12.0"; } protected: + bool ParseGeneratorToolset(std::string const& ts, + cmMakefile* mf) CM_OVERRIDE; + virtual bool InitializeWindowsPhone(cmMakefile* mf); virtual bool InitializeWindowsStore(cmMakefile* mf); virtual bool SelectWindowsPhoneToolset(std::string& toolset) const; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 75fc2e4..0ddfc9a 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -220,6 +220,19 @@ bool cmGlobalXCodeGenerator::SetGeneratorToolset(std::string const& ts, cmMakefile* mf) { if (this->XcodeVersion >= 30) { + if (ts.find_first_of(",=") != ts.npos) { + std::ostringstream e; + /* clang-format off */ + e << + "Generator\n" + " " << this->GetName() << "\n" + "does not recognize the toolset\n" + " " << ts << "\n" + "that was specified."; + /* clang-format on */ + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } this->GeneratorToolset = ts; if (!this->GeneratorToolset.empty()) { mf->AddDefinition("CMAKE_XCODE_PLATFORM_TOOLSET", diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 6690bfa..4a9df04 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -322,6 +322,15 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("\n", 1); } + if (const char* hostArch = + this->GlobalGenerator->GetPlatformToolsetHostArchitecture()) { + this->WriteString("\n", 1); + this->WriteString("", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(hostArch) + << "\n"; + this->WriteString("\n", 1); + } + this->WriteProjectConfigurations(); this->WriteString("\n", 1); this->WriteString("", 2); diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt new file mode 100644 index 0000000..5737e95 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at CMakeLists.txt:[0-9]+ \(project\): + Generator + + .* + + does not recognize the toolset + + Test Toolset,host=x6[45] + + that was specified\.$ diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake new file mode 100644 index 0000000..2fc38e5 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake @@ -0,0 +1 @@ +message(FATAL_ERROR "This should not be reached!") diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake index 283a2a0..e8ce47d 100644 --- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake @@ -6,6 +6,21 @@ run_cmake(NoToolset) if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode" AND NOT XCODE_BELOW_3) set(RunCMake_GENERATOR_TOOLSET "Test Toolset") run_cmake(TestToolset) + if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[245]") + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64") + run_cmake(TestToolsetHostArchBoth) + set(RunCMake_GENERATOR_TOOLSET ",host=x64") + run_cmake(TestToolsetHostArchOnly) + set(RunCMake_GENERATOR_TOOLSET "host=x64") + run_cmake(TestToolsetHostArchOnly) + set(RunCMake_GENERATOR_TOOLSET "Test Toolset") + run_cmake(TestToolsetHostArchNone) + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x65") + run_cmake(BadToolsetHostArch) + else() + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64") + run_cmake(BadToolsetHostArch) + endif() else() set(RunCMake_GENERATOR_TOOLSET "Bad Toolset") run_cmake(BadToolset) diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt new file mode 100644 index 0000000..f0b6d46 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='x64' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt new file mode 100644 index 0000000..576b40c --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt new file mode 100644 index 0000000..8271bd4 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='v[0-9]+' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='x64' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=779939a00ebc21419404737f2fc2b34e7775f086 commit 779939a00ebc21419404737f2fc2b34e7775f086 Author: Brad King AuthorDate: Fri Oct 7 15:56:14 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 08:59:27 2016 -0400 Help: Document VS and Xcode toolset selection Add explicit sections to the individual generator documentation to cover the `cmake -T` option along with the default behavior for each generator. diff --git a/Help/generator/Visual Studio 10 2010.rst b/Help/generator/Visual Studio 10 2010.rst index c694443..04eef10 100644 --- a/Help/generator/Visual Studio 10 2010.rst +++ b/Help/generator/Visual Studio 10 2010.rst @@ -17,3 +17,10 @@ a target platform name optionally at the end of this generator name: For compatibility with CMake versions prior to 3.0, one may specify this generator using the name ``Visual Studio 10`` without the year component. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v100`` toolset that comes with Visual Studio 10 2010 is selected by +default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/generator/Visual Studio 11 2012.rst b/Help/generator/Visual Studio 11 2012.rst index 2f1e729..347a153 100644 --- a/Help/generator/Visual Studio 11 2012.rst +++ b/Help/generator/Visual Studio 11 2012.rst @@ -20,3 +20,10 @@ a target platform name optionally at the end of this generator name: For compatibility with CMake versions prior to 3.0, one may specify this generator using the name "Visual Studio 11" without the year component. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v110`` toolset that comes with Visual Studio 11 2012 is selected by +default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/generator/Visual Studio 12 2013.rst b/Help/generator/Visual Studio 12 2013.rst index 6e8545b..c7358b9 100644 --- a/Help/generator/Visual Studio 12 2013.rst +++ b/Help/generator/Visual Studio 12 2013.rst @@ -17,3 +17,10 @@ a target platform name optionally at the end of this generator name: For compatibility with CMake versions prior to 3.0, one may specify this generator using the name "Visual Studio 12" without the year component. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v120`` toolset that comes with Visual Studio 12 2013 is selected by +default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/generator/Visual Studio 14 2015.rst b/Help/generator/Visual Studio 14 2015.rst index 707caf9..0d776e9 100644 --- a/Help/generator/Visual Studio 14 2015.rst +++ b/Help/generator/Visual Studio 14 2015.rst @@ -14,3 +14,10 @@ a target platform name optionally at the end of this generator name: ``Visual Studio 14 2015 ARM`` Specify target platform ``ARM``. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v140`` toolset that comes with Visual Studio 14 2015 is selected by +default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/generator/Visual Studio 15.rst b/Help/generator/Visual Studio 15.rst index ae456eb..5bd1882 100644 --- a/Help/generator/Visual Studio 15.rst +++ b/Help/generator/Visual Studio 15.rst @@ -14,3 +14,10 @@ a target platform name optionally at the end of this generator name: ``Visual Studio 15 ARM`` Specify target platform ``ARM``. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v141`` toolset that comes with Visual Studio 15 is selected by +default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/generator/Xcode.rst b/Help/generator/Xcode.rst index d8a6790..25ff4c7 100644 --- a/Help/generator/Xcode.rst +++ b/Help/generator/Xcode.rst @@ -2,3 +2,10 @@ Xcode ----- Generate Xcode project files. + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +By default Xcode is allowed to select its own default toolchain. +The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt index fa0e4c1..9b3f717 100644 --- a/Help/manual/OPTIONS_BUILD.txt +++ b/Help/manual/OPTIONS_BUILD.txt @@ -52,13 +52,12 @@ Specify toolset name if supported by generator. Some CMake generators support a toolset name to be given to the - native build system to choose a compiler. This is supported only on - specific generators: - - :: + native build system to choose a compiler. + See the :variable:`CMAKE_GENERATOR_TOOLSET` variable. + This is supported only on specific generators: - Visual Studio >= 10 - Xcode >= 3.0 + * :ref:`Visual Studio Generators` for VS 2010 and above + * The :generator:`Xcode` generator for Xcode 3.0 and above See native build system documentation for allowed toolset names. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 09:03:35 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 09:03:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-191-g9273eed Message-ID: <20161013130335.C6869F5C17@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 9273eed4040986aef97e73812bb418b946a82fe9 (commit) via ccdc3d300f3f0f3e8492e580a21513b9664c9aca (commit) from 1b592b6458ce033b04ba2aa0ee4cf5ace0fd042c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9273eed4040986aef97e73812bb418b946a82fe9 commit 9273eed4040986aef97e73812bb418b946a82fe9 Merge: 1b592b6 ccdc3d3 Author: Brad King AuthorDate: Thu Oct 13 09:03:32 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 09:03:32 2016 -0400 Merge topic 'msbuild-json' ccdc3d30 Add a script to convert from MSBuild XML to a JSON format ----------------------------------------------------------------------- Summary of changes: Source/cmConvertMSBuildXMLToJSON.py | 453 +++++++++++++++++++++++++++++++++++ 1 file changed, 453 insertions(+) create mode 100644 Source/cmConvertMSBuildXMLToJSON.py hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 09:03:38 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 09:03:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-193-gd61bfcb Message-ID: <20161013130338.DED4BF5C16@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 d61bfcbf47361c2b8d04b56fe189ca33e299aa16 (commit) via 6e5a3655cac2937861b1f1f1e66ac7c1fa41c626 (commit) from 9273eed4040986aef97e73812bb418b946a82fe9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d61bfcbf47361c2b8d04b56fe189ca33e299aa16 commit d61bfcbf47361c2b8d04b56fe189ca33e299aa16 Merge: 9273eed 6e5a365 Author: Brad King AuthorDate: Thu Oct 13 09:03:36 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 09:03:36 2016 -0400 Merge topic 'ice-3.6.3' 6e5a3655 FindIce: Add support for version 3.6.3 ----------------------------------------------------------------------- Summary of changes: Modules/FindIce.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 09:08:13 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 09:08:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-439-gc942de4 Message-ID: <20161013130813.1D3D7F60F6@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 c942de4483d282f22af403b71965ae3abdcf1a9b (commit) via d61bfcbf47361c2b8d04b56fe189ca33e299aa16 (commit) via 9273eed4040986aef97e73812bb418b946a82fe9 (commit) from 1ae7aa2924d658d9f0afe3b839038ea13f284d14 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c942de4483d282f22af403b71965ae3abdcf1a9b commit c942de4483d282f22af403b71965ae3abdcf1a9b Merge: 1ae7aa2 d61bfcb Author: Brad King AuthorDate: Thu Oct 13 09:08:05 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 09:08:05 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 09:15:28 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 09:15:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-197-gac5c492 Message-ID: <20161013131528.D81A8F5D6C@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 ac5c49239051d0caeb57b6a2f66eca5993309f0c (commit) via d0255d55e1228f6f7133eb36053bd474fb6ae884 (commit) via acd2eab2f3eadc47828351707fdd23917d002234 (commit) via 271170144a41d3390b29064216fd1fa938ae6da4 (commit) from d61bfcbf47361c2b8d04b56fe189ca33e299aa16 (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 Thu Oct 13 09:15:29 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 09:15:29 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-444-g49fe82b Message-ID: <20161013131529.8E07CF5D6E@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 49fe82b52d6dd1c034b130ff17dd6c9f9511ce63 (commit) via ac5c49239051d0caeb57b6a2f66eca5993309f0c (commit) via d0255d55e1228f6f7133eb36053bd474fb6ae884 (commit) via acd2eab2f3eadc47828351707fdd23917d002234 (commit) via 271170144a41d3390b29064216fd1fa938ae6da4 (commit) from c942de4483d282f22af403b71965ae3abdcf1a9b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=49fe82b52d6dd1c034b130ff17dd6c9f9511ce63 commit 49fe82b52d6dd1c034b130ff17dd6c9f9511ce63 Merge: c942de4 ac5c492 Author: Brad King AuthorDate: Thu Oct 13 09:15:03 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 09:15:03 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 09:15:31 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 09:15:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.7.0-rc1-38-gd0255d5 Message-ID: <20161013131531.A20D6F5D6E@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 d0255d55e1228f6f7133eb36053bd474fb6ae884 (commit) via bf86012ada901386dbf5545fdc820e81f3e6bf92 (commit) via acd2eab2f3eadc47828351707fdd23917d002234 (commit) via a3c98cb30edba8ba19bc05d4e08fd344f3440f32 (commit) via 271170144a41d3390b29064216fd1fa938ae6da4 (commit) via b1d67ae8a5a1334bfeaf802c55d517d8eaa0dbf9 (commit) from 9f240cff8ad14832dbc5472917b3b2e3fe813e46 (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/ExternalProject.cmake | 2 +- Source/{cmVS14CLFlagTable.h => cmVS140CLFlagTable.h} | 14 +------------- Source/{cmVS14CLFlagTable.h => cmVS141CLFlagTable.h} | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 11 +++++++++-- Source/cmake.cxx | 2 +- .../ExternalProject/CMAKE_CACHE_ARGS-check.cmake | 9 +++++++++ Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake | 4 +++- .../ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake | 9 +++++++++ .../ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake | 4 +++- 9 files changed, 37 insertions(+), 20 deletions(-) copy Source/{cmVS14CLFlagTable.h => cmVS140CLFlagTable.h} (95%) rename Source/{cmVS14CLFlagTable.h => cmVS141CLFlagTable.h} (99%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 09:33:51 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 09:33:51 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-447-gb0ab354 Message-ID: <20161013133351.DE11BF61E4@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 b0ab3549ef8113079c1f2957977b389a3858ab3a (commit) via 4551b1ae134a3d1f6c7a30a9b941000a466a11ef (commit) via 39b08858f676f0251898ffc7601ad216bb87ae21 (commit) from 49fe82b52d6dd1c034b130ff17dd6c9f9511ce63 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0ab3549ef8113079c1f2957977b389a3858ab3a commit b0ab3549ef8113079c1f2957977b389a3858ab3a Merge: 49fe82b 4551b1a Author: Brad King AuthorDate: Thu Oct 13 09:33:51 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 09:33:51 2016 -0400 Merge topic 'consoleBuf' into next 4551b1ae Enable Unicode output to Windows consoles 39b08858 cmSystemTools: Flush output buffer for list_item_verbose https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4551b1ae134a3d1f6c7a30a9b941000a466a11ef commit 4551b1ae134a3d1f6c7a30a9b941000a466a11ef Author: D?vis Mos?ns AuthorDate: Sat Oct 1 03:11:35 2016 +0300 Commit: Brad King CommitDate: Thu Oct 13 09:31:20 2016 -0400 Enable Unicode output to Windows consoles Use KWSys ConsoleBuf to replace the `streambuf` on `std::cout` and `std::cerr` so that process output can be encoded correctly for display in a Windows console. diff --git a/CMakeLists.txt b/CMakeLists.txt index b8a635f..1bc4b4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,6 +260,7 @@ macro (CMAKE_BUILD_UTILITIES) set(KWSYS_USE_MD5 1) set(KWSYS_USE_Process 1) set(KWSYS_USE_CommandLineArguments 1) + set(KWSYS_USE_ConsoleBuf 1) set(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source) set(KWSYS_INSTALL_DOC_DIR "${CMAKE_DOC_DIR}") add_subdirectory(Source/kwsys) diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index a3281ab..1e9bb0f 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -17,6 +17,9 @@ #include #include +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include +#endif #include #include #include @@ -84,6 +87,11 @@ int cpackDefinitionArgument(const char* argument, const char* cValue, // this is CPack. int main(int argc, char const* const* argv) { +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) + // Replace streambuf so we can output Unicode to console + cmsys::ConsoleBuf::Manager consoleOut(std::cout); + cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); +#endif cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = args.argc(); diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 0d1f1ce..3f71011 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -18,6 +18,9 @@ #include #include +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include +#endif #include #include #include @@ -153,6 +156,11 @@ static void cmakemainProgressCallback(const char* m, float prog, int main(int ac, char const* const* av) { +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) + // Replace streambuf so we can output Unicode to console + cmsys::ConsoleBuf::Manager consoleOut(std::cout); + cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); +#endif cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(ac, av); ac = args.argc(); diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 8ab17b9..1acd240 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -10,6 +10,9 @@ #include "cmake.h" #include +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include +#endif #include #include #include @@ -110,6 +113,11 @@ static const char* cmDocumentationOptions[][2] = { // this is a test driver program for cmCTest. int main(int argc, char const* const* argv) { +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) + // Replace streambuf so we can output Unicode to console + cmsys::ConsoleBuf::Manager consoleOut(std::cout); + cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); +#endif cmsys::Encoding::CommandLineArguments encoding_args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = encoding_args.argc(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=39b08858f676f0251898ffc7601ad216bb87ae21 commit 39b08858f676f0251898ffc7601ad216bb87ae21 Author: D?vis Mos?ns AuthorDate: Tue Oct 11 22:46:10 2016 +0300 Commit: Brad King CommitDate: Thu Oct 13 09:24:45 2016 -0400 cmSystemTools: Flush output buffer for list_item_verbose When `std::cout` and `FILE *stdout` are used at same time need to explicitly flush otherwise they can be out of sync. diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index d800ef8..0a3a1ab 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1499,6 +1499,7 @@ void list_item_verbose(FILE* out, struct archive_entry* entry) { fprintf(out, " -> %s", archive_entry_symlink(entry)); } + fflush(out); } long copy_data(struct archive* ar, struct archive* aw) ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 1 + Source/CPack/cpack.cxx | 8 ++++++++ Source/cmSystemTools.cxx | 1 + Source/cmakemain.cxx | 8 ++++++++ Source/ctest.cxx | 8 ++++++++ 5 files changed, 26 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 10:19:40 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 10:19:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-452-gec4d7d2 Message-ID: <20161013141940.E2418F5EE6@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 ec4d7d2ff0b8442ed1f735376f22ea2ece1a9f8c (commit) via 08b9a0fdfa02f50e6ae2aeca1963e8f47d041dd2 (commit) via ca4029fa9aada8e5d86eb81cc5ef9c7e9efe7715 (commit) via 2e242b5c1e6b24e4ed59692b9338e295b792f70e (commit) via 6699d46a2a7f12d35926def3e4db3c7a0a5f7449 (commit) from b0ab3549ef8113079c1f2957977b389a3858ab3a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec4d7d2ff0b8442ed1f735376f22ea2ece1a9f8c commit ec4d7d2ff0b8442ed1f735376f22ea2ece1a9f8c Merge: b0ab354 08b9a0f Author: Brad King AuthorDate: Thu Oct 13 10:19:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 10:19:39 2016 -0400 Merge topic 'FindBoost-minor-cleanup' into next 08b9a0fd FindBoost: Simplify library dir detection with cascading if/elseif/else ca4029fa FindBoost: Minor style updates 2e242b5c FindBoost: Use list(INSERT) to simplify suffix list generation 6699d46a FindBoost: Use string(APPEND) in more cases https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=08b9a0fdfa02f50e6ae2aeca1963e8f47d041dd2 commit 08b9a0fdfa02f50e6ae2aeca1963e8f47d041dd2 Author: Alex Turbov AuthorDate: Thu Oct 13 15:17:53 2016 +0700 Commit: Brad King CommitDate: Thu Oct 13 10:19:07 2016 -0400 FindBoost: Simplify library dir detection with cascading if/elseif/else diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 6976038..9bd7a30 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1681,13 +1681,11 @@ if(Boost_FOUND) endif() if(EXISTS "${_boost_LIB_DIR}/lib") - set(_boost_LIB_DIR ${_boost_LIB_DIR}/lib) + string(APPEND _boost_LIB_DIR /lib) + elseif(EXISTS "${_boost_LIB_DIR}/stage/lib") + string(APPEND _boost_LIB_DIR "/stage/lib") else() - if(EXISTS "${_boost_LIB_DIR}/stage/lib") - set(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib) - else() - set(_boost_LIB_DIR "") - endif() + set(_boost_LIB_DIR "") endif() if(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca4029fa9aada8e5d86eb81cc5ef9c7e9efe7715 commit ca4029fa9aada8e5d86eb81cc5ef9c7e9efe7715 Author: Alex Turbov AuthorDate: Thu Oct 13 15:17:53 2016 +0700 Commit: Brad King CommitDate: Thu Oct 13 10:17:24 2016 -0400 FindBoost: Minor style updates diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index fc68135..6976038 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1392,7 +1392,7 @@ if( Boost_USE_STATIC_LIBS ) if(WIN32) list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .lib .a) else() - set(CMAKE_FIND_LIBRARY_SUFFIXES .a ) + set(CMAKE_FIND_LIBRARY_SUFFIXES .a) endif() endif() @@ -1418,7 +1418,7 @@ endif() set(_boost_STATIC_RUNTIME_WORKAROUND false) if(WIN32 AND Boost_USE_STATIC_LIBS) if(NOT DEFINED Boost_USE_STATIC_RUNTIME) - set(_boost_STATIC_RUNTIME_WORKAROUND true) + set(_boost_STATIC_RUNTIME_WORKAROUND TRUE) endif() endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e242b5c1e6b24e4ed59692b9338e295b792f70e commit 2e242b5c1e6b24e4ed59692b9338e295b792f70e Author: Alex Turbov AuthorDate: Thu Oct 13 15:17:53 2016 +0700 Commit: Brad King CommitDate: Thu Oct 13 10:16:46 2016 -0400 FindBoost: Use list(INSERT) to simplify suffix list generation diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 84ba061..fc68135 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1390,7 +1390,7 @@ endif() if( Boost_USE_STATIC_LIBS ) set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) if(WIN32) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .lib .a) else() set(CMAKE_FIND_LIBRARY_SUFFIXES .a ) endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6699d46a2a7f12d35926def3e4db3c7a0a5f7449 commit 6699d46a2a7f12d35926def3e4db3c7a0a5f7449 Author: Alex Turbov AuthorDate: Thu Oct 13 15:17:53 2016 +0700 Commit: Brad King CommitDate: Thu Oct 13 10:15:34 2016 -0400 FindBoost: Use string(APPEND) in more cases diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 184fb05..84ba061 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1313,13 +1313,13 @@ string(APPEND _boost_DEBUG_ABI_TAG "d") # p using the STLport standard library rather than the # default one supplied with your compiler if(Boost_USE_STLPORT) - set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p") - set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}p") + string(APPEND _boost_RELEASE_ABI_TAG "p") + string(APPEND _boost_DEBUG_ABI_TAG "p") endif() # n using the STLport deprecated "native iostreams" feature if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS) - set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n") - set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}n") + string(APPEND _boost_RELEASE_ABI_TAG "n") + string(APPEND _boost_DEBUG_ABI_TAG "n") endif() if(Boost_DEBUG) ----------------------------------------------------------------------- Summary of changes: Modules/FindBoost.cmake | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 13:15:42 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 13:15:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-454-g4edd6e2 Message-ID: <20161013171542.E0768F5E5F@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 4edd6e2a616a192b207268dc6bf2d9d3bf7a3031 (commit) via 9977899df2c6c7687353882eff01150546ef42a9 (commit) from ec4d7d2ff0b8442ed1f735376f22ea2ece1a9f8c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4edd6e2a616a192b207268dc6bf2d9d3bf7a3031 commit 4edd6e2a616a192b207268dc6bf2d9d3bf7a3031 Merge: ec4d7d2 9977899 Author: Brad King AuthorDate: Thu Oct 13 13:15:42 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 13:15:42 2016 -0400 Merge topic 'ninja-rc-regression' into next 9977899d Ninja: Fix RC language depfile generation with cmcldeps https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9977899df2c6c7687353882eff01150546ef42a9 commit 9977899df2c6c7687353882eff01150546ef42a9 Author: Ben Boeckel AuthorDate: Thu Oct 13 12:42:54 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 13:03:57 2016 -0400 Ninja: Fix RC language depfile generation with cmcldeps In commit v3.7.0-rc1~275^2 (Ninja: Use full path for all source files, 2016-08-05), the source path was changed to use an absolute path. Inside of `cmcldeps` for `.rc` file compilation, it uses a separate argument for the path to the source file. This ended up causing `cmcldeps` to transform the following call: cmcldeps.exe RC source.rc ... C:/full/path/to/source.rc into: ... C:/full/path/to//Tc source.rc which is invalid. Update the source filename to use the full path to the source file so that the path is replaced properly. diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index fb2581d..46a6161 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -427,7 +427,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) : mf->GetSafeDefinition("CMAKE_CXX_COMPILER"); cldeps = "\""; cldeps += cmSystemTools::GetCMClDepsCommand(); - cldeps += "\" " + lang + " $in \"$DEP_FILE\" $out \""; + cldeps += "\" " + lang + " " + vars.Source + " \"$DEP_FILE\" $out \""; cldeps += mf->GetSafeDefinition("CMAKE_CL_SHOWINCLUDES_PREFIX"); cldeps += "\" \"" + cl + "\" "; } ----------------------------------------------------------------------- Summary of changes: Source/cmNinjaTargetGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 13:38:23 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 13:38:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-458-g70184a7 Message-ID: <20161013173823.0B30AF65A5@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 70184a7716b16cef891d80d57c506571aa6d2744 (commit) via 2f79b22ce049a15e4d4190bbe5e80a3bad9492e8 (commit) via 33cb0173d5ebcde2a8621edaa66f8401133d5cc9 (commit) via 933e54d3ccf59fd756997752a041ee84e5f85897 (commit) from 4edd6e2a616a192b207268dc6bf2d9d3bf7a3031 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70184a7716b16cef891d80d57c506571aa6d2744 commit 70184a7716b16cef891d80d57c506571aa6d2744 Merge: 4edd6e2 2f79b22 Author: Brad King AuthorDate: Thu Oct 13 13:38:22 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 13:38:22 2016 -0400 Merge topic 'LINK_WHAT_YOU_USE-allow-OFF' into next 2f79b22c Merge branch 'backport-LINK_WHAT_YOU_USE-allow-OFF' into LINK_WHAT_YOU_USE-allow-OFF 33cb0173 Honor LINK_WHAT_YOU_USE when set to OFF 933e54d3 Honor LINK_WHAT_YOU_USE when set to OFF https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2f79b22ce049a15e4d4190bbe5e80a3bad9492e8 commit 2f79b22ce049a15e4d4190bbe5e80a3bad9492e8 Merge: 33cb017 933e54d Author: Brad King AuthorDate: Thu Oct 13 13:35:40 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 13:35:40 2016 -0400 Merge branch 'backport-LINK_WHAT_YOU_USE-allow-OFF' into LINK_WHAT_YOU_USE-allow-OFF https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33cb0173d5ebcde2a8621edaa66f8401133d5cc9 commit 33cb0173d5ebcde2a8621edaa66f8401133d5cc9 Author: Jamie Snape AuthorDate: Wed Oct 12 18:15:35 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 13:34:35 2016 -0400 Honor LINK_WHAT_YOU_USE when set to OFF Explicitly setting variable CMAKE_LINK_WHAT_YOU_USE or property LINK_WHAT_YOU_USE to OFF should not cause LWYU to run. Fix the property lookup to use GetPropertyAsBool. diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index bfc4857..ed34ce6 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -198,7 +198,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->GetLinkLibsCMP0065( linkLanguage, *this->GeneratorTarget)); - if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { + if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(linkFlags, " -Wl,--no-as-needed"); } @@ -375,7 +375,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) vars.LinkFlags = linkFlags.c_str(); vars.Manifests = manifests.c_str(); - if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { + if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE")) { std::string cmakeCommand = this->LocalGenerator->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); cmakeCommand += " -E __run_iwyu --lwyu="; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 4488f06..860b912 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -168,7 +168,7 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags); - if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { + if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(extraFlags, " -Wl,--no-as-needed"); } this->WriteLibraryRules(linkRuleVar, extraFlags, relink); @@ -660,7 +660,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Get the set of commands. std::string linkRule = this->GetLinkRule(linkRuleVar); cmSystemTools::ExpandListArgument(linkRule, real_link_commands); - if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE") && + if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE") && (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY)) { std::string cmakeCommand = this->LocalGenerator->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index ab086eb..34fad9d 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -316,7 +316,7 @@ std::vector cmNinjaNormalTargetGenerator::ComputeLinkCmd() const char* linkCmd = mf->GetDefinition(linkCmdVar); if (linkCmd) { cmSystemTools::ExpandListArgument(linkCmd, linkCmds); - if (this->GetGeneratorTarget()->GetProperty("LINK_WHAT_YOU_USE")) { + if (this->GetGeneratorTarget()->GetPropertyAsBool("LINK_WHAT_YOU_USE")) { std::string cmakeCommand = this->GetLocalGenerator()->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); @@ -512,7 +512,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() vars["LINK_PATH"] = frameworkPath + linkPath; std::string lwyuFlags; - if (genTarget.GetProperty("LINK_WHAT_YOU_USE")) { + if (genTarget.GetPropertyAsBool("LINK_WHAT_YOU_USE")) { lwyuFlags = " -Wl,--no-as-needed"; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=933e54d3ccf59fd756997752a041ee84e5f85897 commit 933e54d3ccf59fd756997752a041ee84e5f85897 Author: Jamie Snape AuthorDate: Wed Oct 12 18:15:35 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 13:32:22 2016 -0400 Honor LINK_WHAT_YOU_USE when set to OFF Explicitly setting variable CMAKE_LINK_WHAT_YOU_USE or property LINK_WHAT_YOU_USE to OFF should not cause LWYU to run. Fix the property lookup to use GetPropertyAsBool. diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index cb20117..4a6990e 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -192,7 +192,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->AppendFlags( linkFlags, this->Makefile->GetDefinition(export_flag_var)); } - if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { + if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(linkFlags, " -Wl,--no-as-needed"); } @@ -354,7 +354,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) vars.LinkFlags = linkFlags.c_str(); vars.Manifests = manifests.c_str(); - if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { + if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE")) { std::string cmakeCommand = this->LocalGenerator->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); cmakeCommand += " -E __run_iwyu --lwyu="; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b969bfb..2b1d7cc 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -161,7 +161,7 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName); this->AddModuleDefinitionFlag(extraFlags); - if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { + if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(extraFlags, " -Wl,--no-as-needed"); } this->WriteLibraryRules(linkRuleVar, extraFlags, relink); @@ -638,7 +638,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Get the set of commands. std::string linkRule = this->GetLinkRule(linkRuleVar); cmSystemTools::ExpandListArgument(linkRule, real_link_commands); - if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE") && + if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE") && (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY)) { std::string cmakeCommand = this->LocalGenerator->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 095c703..5b56813 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -315,7 +315,7 @@ std::vector cmNinjaNormalTargetGenerator::ComputeLinkCmd() const char* linkCmd = mf->GetDefinition(linkCmdVar); if (linkCmd) { cmSystemTools::ExpandListArgument(linkCmd, linkCmds); - if (this->GetGeneratorTarget()->GetProperty("LINK_WHAT_YOU_USE")) { + if (this->GetGeneratorTarget()->GetPropertyAsBool("LINK_WHAT_YOU_USE")) { std::string cmakeCommand = this->GetLocalGenerator()->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); @@ -505,7 +505,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() vars["LINK_PATH"] = frameworkPath + linkPath; std::string lwyuFlags; - if (genTarget.GetProperty("LINK_WHAT_YOU_USE")) { + if (genTarget.GetPropertyAsBool("LINK_WHAT_YOU_USE")) { lwyuFlags = " -Wl,--no-as-needed"; } ----------------------------------------------------------------------- Summary of changes: Source/cmMakefileExecutableTargetGenerator.cxx | 4 ++-- Source/cmMakefileLibraryTargetGenerator.cxx | 4 ++-- Source/cmNinjaNormalTargetGenerator.cxx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 13 14:11:33 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Oct 2016 14:11:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-460-g0be1721 Message-ID: <20161013181133.CBF12E64C9@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 0be1721b533ae213fc255aeb5063f3dee204c8d2 (commit) via 20278872e3d8145f4aa81ea6cde01144daa3ca8f (commit) from 70184a7716b16cef891d80d57c506571aa6d2744 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0be1721b533ae213fc255aeb5063f3dee204c8d2 commit 0be1721b533ae213fc255aeb5063f3dee204c8d2 Merge: 70184a7 2027887 Author: Brad King AuthorDate: Thu Oct 13 14:11:33 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 13 14:11:33 2016 -0400 Merge topic 'ninja-framework-POST_BUILD' into next 20278872 Ninja: Fix POST_BUILD commands on macOS Frameworks https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20278872e3d8145f4aa81ea6cde01144daa3ca8f commit 20278872e3d8145f4aa81ea6cde01144daa3ca8f Author: Brad King AuthorDate: Thu Oct 13 13:51:10 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 14:04:12 2016 -0400 Ninja: Fix POST_BUILD commands on macOS Frameworks The condition added by commit v2.8.12~179^2 (OS X: Fix regression handling frameworks for Ninja, 2013-07-16) for excluding use of versioning symlinks on macOS Frameworks must match that used for POST_BUILD selection. Otherwise we place the POST_BUILD commands after a symlink step that is never added. Closes: #16363 diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 095c703..6d915ea 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -645,7 +645,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() std::string postBuildCmdLine = localGen.BuildCommandLine(postBuildCmdLines); cmNinjaVars symlinkVars; - if (targetOutput == targetOutputReal) { + bool const symlinkNeeded = + (targetOutput != targetOutputReal && !gt.IsFrameworkOnApple()); + if (!symlinkNeeded) { vars["POST_BUILD"] = postBuildCmdLine; } else { vars["POST_BUILD"] = ":"; @@ -687,7 +689,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() commandLineLengthLimit, &usedResponseFile); this->WriteLinkRule(usedResponseFile); - if (targetOutput != targetOutputReal && !gt.IsFrameworkOnApple()) { + if (symlinkNeeded) { if (targetType == cmState::EXECUTABLE) { globalGen.WriteBuild( this->GetBuildFileStream(), diff --git a/Tests/Framework/CMakeLists.txt b/Tests/Framework/CMakeLists.txt index 29f9838..271aaf1 100644 --- a/Tests/Framework/CMakeLists.txt +++ b/Tests/Framework/CMakeLists.txt @@ -51,6 +51,11 @@ install(TARGETS foo bar # duplicate install rules for the pieces of the framework. ) +# test that framework post-build commands run +add_custom_command(TARGET foo POST_BUILD COMMAND ${CMAKE_COMMAND} -E touch foo-post-build) +add_custom_target(fooCustom ALL COMMAND ${CMAKE_COMMAND} -E copy foo-post-build foo-custom) +add_dependencies(fooCustom foo) + # Make a static library and apply the framework properties to it to verify # that everything still builds correctly, but it will not actually produce # a framework... The framework properties only apply when the library type ----------------------------------------------------------------------- Summary of changes: Source/cmNinjaNormalTargetGenerator.cxx | 6 ++++-- Tests/Framework/CMakeLists.txt | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Oct 14 00:01:13 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 14 Oct 2016 00:01:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-198-g4c921e5 Message-ID: <20161014040114.33D8BF6413@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 4c921e5c7b8170b95ba13c33e0f8ae21dd78055e (commit) from ac5c49239051d0caeb57b6a2f66eca5993309f0c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c921e5c7b8170b95ba13c33e0f8ae21dd78055e commit 4c921e5c7b8170b95ba13c33e0f8ae21dd78055e Author: Kitware Robot AuthorDate: Fri Oct 14 00:01:08 2016 -0400 Commit: Kitware Robot CommitDate: Fri Oct 14 00:01:08 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0013346..662ba9f 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 7) -set(CMake_VERSION_PATCH 20161013) +set(CMake_VERSION_PATCH 20161014) #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 Fri Oct 14 08:44:04 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 08:44:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-462-g7509065 Message-ID: <20161014124404.99031C1C57@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 750906500d08cff001762412c2f307022836a879 (commit) via 2ef26ebebf2a405f342ed8623a185ec1bd4b4b38 (commit) from 0be1721b533ae213fc255aeb5063f3dee204c8d2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=750906500d08cff001762412c2f307022836a879 commit 750906500d08cff001762412c2f307022836a879 Merge: 0be1721 2ef26eb Author: Brad King AuthorDate: Fri Oct 14 08:44:03 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 08:44:03 2016 -0400 Merge topic 'consoleBuf' into next 2ef26ebe Revert "Enable Unicode output to Windows consoles" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2ef26ebebf2a405f342ed8623a185ec1bd4b4b38 commit 2ef26ebebf2a405f342ed8623a185ec1bd4b4b38 Author: Brad King AuthorDate: Fri Oct 14 08:43:23 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 08:43:23 2016 -0400 Revert "Enable Unicode output to Windows consoles" This reverts commit 4551b1ae134a3d1f6c7a30a9b941000a466a11ef. It causes RunCMake.IncludeWhatYouUse to fail with Ninja on Windows. This needs to be investigated and fixed first. diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bc4b4e..b8a635f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,7 +260,6 @@ macro (CMAKE_BUILD_UTILITIES) set(KWSYS_USE_MD5 1) set(KWSYS_USE_Process 1) set(KWSYS_USE_CommandLineArguments 1) - set(KWSYS_USE_ConsoleBuf 1) set(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source) set(KWSYS_INSTALL_DOC_DIR "${CMAKE_DOC_DIR}") add_subdirectory(Source/kwsys) diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 1e9bb0f..a3281ab 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -17,9 +17,6 @@ #include #include -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include -#endif #include #include #include @@ -87,11 +84,6 @@ int cpackDefinitionArgument(const char* argument, const char* cValue, // this is CPack. int main(int argc, char const* const* argv) { -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) - // Replace streambuf so we can output Unicode to console - cmsys::ConsoleBuf::Manager consoleOut(std::cout); - cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); -#endif cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = args.argc(); diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 3f71011..0d1f1ce 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -18,9 +18,6 @@ #include #include -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include -#endif #include #include #include @@ -156,11 +153,6 @@ static void cmakemainProgressCallback(const char* m, float prog, int main(int ac, char const* const* av) { -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) - // Replace streambuf so we can output Unicode to console - cmsys::ConsoleBuf::Manager consoleOut(std::cout); - cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); -#endif cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(ac, av); ac = args.argc(); diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 1acd240..8ab17b9 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -10,9 +10,6 @@ #include "cmake.h" #include -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include -#endif #include #include #include @@ -113,11 +110,6 @@ static const char* cmDocumentationOptions[][2] = { // this is a test driver program for cmCTest. int main(int argc, char const* const* argv) { -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) - // Replace streambuf so we can output Unicode to console - cmsys::ConsoleBuf::Manager consoleOut(std::cout); - cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); -#endif cmsys::Encoding::CommandLineArguments encoding_args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = encoding_args.argc(); ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 1 - Source/CPack/cpack.cxx | 8 -------- Source/cmakemain.cxx | 8 -------- Source/ctest.cxx | 8 -------- 4 files changed, 25 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:01:53 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:01:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-464-g14ab1e9 Message-ID: <20161014130153.D1ADAF5A63@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 14ab1e900306331d66ab6ef384cf1cc2f85dab1b (commit) via 3f9274f610a957bf9186365a212a50a6785acbed (commit) from 750906500d08cff001762412c2f307022836a879 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14ab1e900306331d66ab6ef384cf1cc2f85dab1b commit 14ab1e900306331d66ab6ef384cf1cc2f85dab1b Merge: 7509065 3f9274f Author: Brad King AuthorDate: Fri Oct 14 09:01:50 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 09:01:50 2016 -0400 Merge topic 'vs-host-x64-tools' into next 3f9274f6 fixup! VS: Provide an option to use x64 host tools https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f9274f610a957bf9186365a212a50a6785acbed commit 3f9274f610a957bf9186365a212a50a6785acbed Author: Brad King AuthorDate: Fri Oct 14 09:01:34 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 09:01:34 2016 -0400 fixup! VS: Provide an option to use x64 host tools diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index f76c467..ef7f0c0 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -82,6 +82,7 @@ Variables that Provide Information /variable/CMAKE_VS_NsightTegra_VERSION /variable/CMAKE_VS_PLATFORM_NAME /variable/CMAKE_VS_PLATFORM_TOOLSET + /variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE /variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION /variable/CMAKE_XCODE_PLATFORM_TOOLSET /variable/PROJECT_BINARY_DIR diff --git a/Help/release/dev/vs-host-x64-tools.rst b/Help/release/dev/vs-host-x64-tools.rst new file mode 100644 index 0000000..e42881a --- /dev/null +++ b/Help/release/dev/vs-host-x64-tools.rst @@ -0,0 +1,7 @@ +vs-host-x64-tools +----------------- + +* The :ref:`Visual Studio Generators` for VS 2013 and above learned to + support a ``host=x64`` option in the :variable:`CMAKE_GENERATOR_TOOLSET` + value (e.g. via the :manual:`cmake(1)` ``-T`` option) to request use + of a VS 64-bit toolchain on 64-bit hosts. diff --git a/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst new file mode 100644 index 0000000..2af3a93 --- /dev/null +++ b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst @@ -0,0 +1,12 @@ +CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE +------------------------------------------- + +Visual Studio preferred tool architecture (``x64`` or empty). + +The :ref:`Visual Studio Generators` for VS 2013 and above support optional +selection of a 64-bit toolchain on 64-bit hosts by specifying a ``host=64`` +value in the :variable:`CMAKE_GENERATOR_TOOLSET` option. The value of this +variable indicates the selected toolchain architecture preference. Note +that this is only a preference specified in the generated project files. +MSBuild may still choose a different tool architecture, such as when on +a 32-bit host. ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 1 + Help/release/dev/vs-host-x64-tools.rst | 7 +++++++ .../CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst | 12 ++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 Help/release/dev/vs-host-x64-tools.rst create mode 100644 Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:02:39 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:02:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-202-gf0579e2 Message-ID: <20161014130239.3DA80F5B93@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 f0579e2fda1922f32efbf3e2b160cc004aafd99a (commit) via 2f79b22ce049a15e4d4190bbe5e80a3bad9492e8 (commit) via 33cb0173d5ebcde2a8621edaa66f8401133d5cc9 (commit) via 933e54d3ccf59fd756997752a041ee84e5f85897 (commit) from 4c921e5c7b8170b95ba13c33e0f8ae21dd78055e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0579e2fda1922f32efbf3e2b160cc004aafd99a commit f0579e2fda1922f32efbf3e2b160cc004aafd99a Merge: 4c921e5 2f79b22 Author: Brad King AuthorDate: Fri Oct 14 09:02:36 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 09:02:36 2016 -0400 Merge topic 'LINK_WHAT_YOU_USE-allow-OFF' 2f79b22c Merge branch 'backport-LINK_WHAT_YOU_USE-allow-OFF' into LINK_WHAT_YOU_USE-allow-OFF 33cb0173 Honor LINK_WHAT_YOU_USE when set to OFF 933e54d3 Honor LINK_WHAT_YOU_USE when set to OFF ----------------------------------------------------------------------- Summary of changes: Source/cmMakefileExecutableTargetGenerator.cxx | 4 ++-- Source/cmMakefileLibraryTargetGenerator.cxx | 4 ++-- Source/cmNinjaNormalTargetGenerator.cxx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:02:42 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:02:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-204-g03622ee Message-ID: <20161014130242.4449AF5B93@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 03622ee2d0947b01a56527ea34cbe43fb9c8eba6 (commit) via 9977899df2c6c7687353882eff01150546ef42a9 (commit) from f0579e2fda1922f32efbf3e2b160cc004aafd99a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=03622ee2d0947b01a56527ea34cbe43fb9c8eba6 commit 03622ee2d0947b01a56527ea34cbe43fb9c8eba6 Merge: f0579e2 9977899 Author: Brad King AuthorDate: Fri Oct 14 09:02:40 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 09:02:40 2016 -0400 Merge topic 'ninja-rc-regression' 9977899d Ninja: Fix RC language depfile generation with cmcldeps ----------------------------------------------------------------------- Summary of changes: Source/cmNinjaTargetGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:02:45 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:02:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-206-gdabd177 Message-ID: <20161014130245.2148BF5B99@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 dabd17792215535bdbc0fc5ad032e2a59e7505d2 (commit) via 20278872e3d8145f4aa81ea6cde01144daa3ca8f (commit) from 03622ee2d0947b01a56527ea34cbe43fb9c8eba6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dabd17792215535bdbc0fc5ad032e2a59e7505d2 commit dabd17792215535bdbc0fc5ad032e2a59e7505d2 Merge: 03622ee 2027887 Author: Brad King AuthorDate: Fri Oct 14 09:02:43 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 09:02:43 2016 -0400 Merge topic 'ninja-framework-POST_BUILD' 20278872 Ninja: Fix POST_BUILD commands on macOS Frameworks ----------------------------------------------------------------------- Summary of changes: Source/cmNinjaNormalTargetGenerator.cxx | 6 ++++-- Tests/Framework/CMakeLists.txt | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:02:48 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:02:48 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-208-g8b49667 Message-ID: <20161014130248.53759F5B9A@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 8b496672fe0ae641bcb45aec04094db9987732bb (commit) via 19ffc0729fdc12b8c0874db7ae1c5e576b48ba10 (commit) from dabd17792215535bdbc0fc5ad032e2a59e7505d2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b496672fe0ae641bcb45aec04094db9987732bb commit 8b496672fe0ae641bcb45aec04094db9987732bb Merge: dabd177 19ffc07 Author: Brad King AuthorDate: Fri Oct 14 09:02:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 09:02:45 2016 -0400 Merge topic 'st2-exclude-patterns-variable' 19ffc072 Sublime: Exclude build tree from source tree project only optionally ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 1 + Help/release/dev/st2-exclude-patterns-variable.rst | 7 +++++++ Help/variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE.rst | 7 +++++++ Source/cmExtraSublimeTextGenerator.cxx | 11 +++++++++-- Source/cmExtraSublimeTextGenerator.h | 2 ++ 5 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 Help/release/dev/st2-exclude-patterns-variable.rst create mode 100644 Help/variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE.rst hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:02:50 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:02:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-213-g02946e0 Message-ID: <20161014130250.EA893F5B93@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 02946e0b956061092c2406ed94ab3d9a0beeaffb (commit) via 08b9a0fdfa02f50e6ae2aeca1963e8f47d041dd2 (commit) via ca4029fa9aada8e5d86eb81cc5ef9c7e9efe7715 (commit) via 2e242b5c1e6b24e4ed59692b9338e295b792f70e (commit) via 6699d46a2a7f12d35926def3e4db3c7a0a5f7449 (commit) from 8b496672fe0ae641bcb45aec04094db9987732bb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=02946e0b956061092c2406ed94ab3d9a0beeaffb commit 02946e0b956061092c2406ed94ab3d9a0beeaffb Merge: 8b49667 08b9a0f Author: Brad King AuthorDate: Fri Oct 14 09:02:48 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 09:02:48 2016 -0400 Merge topic 'FindBoost-minor-cleanup' 08b9a0fd FindBoost: Simplify library dir detection with cascading if/elseif/else ca4029fa FindBoost: Minor style updates 2e242b5c FindBoost: Use list(INSERT) to simplify suffix list generation 6699d46a FindBoost: Use string(APPEND) in more cases ----------------------------------------------------------------------- Summary of changes: Modules/FindBoost.cmake | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:02:53 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:02:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-215-geb923da Message-ID: <20161014130253.986BBF5B9B@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 eb923da2c41ab811a6adec44ef87f3aa8bd26849 (commit) via 39b08858f676f0251898ffc7601ad216bb87ae21 (commit) from 02946e0b956061092c2406ed94ab3d9a0beeaffb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb923da2c41ab811a6adec44ef87f3aa8bd26849 commit eb923da2c41ab811a6adec44ef87f3aa8bd26849 Merge: 02946e0 39b0885 Author: Brad King AuthorDate: Fri Oct 14 09:02:51 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 09:02:51 2016 -0400 Merge topic 'flush-archive-list' 39b08858 cmSystemTools: Flush output buffer for list_item_verbose ----------------------------------------------------------------------- Summary of changes: Source/cmSystemTools.cxx | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:03:25 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:03:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-472-g2b1e512 Message-ID: <20161014130325.59A5DF5BE5@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 2b1e5125bb08ba16a8c9a18a48adc67a4df0b8d7 (commit) via eb923da2c41ab811a6adec44ef87f3aa8bd26849 (commit) via 02946e0b956061092c2406ed94ab3d9a0beeaffb (commit) via 8b496672fe0ae641bcb45aec04094db9987732bb (commit) via dabd17792215535bdbc0fc5ad032e2a59e7505d2 (commit) via 03622ee2d0947b01a56527ea34cbe43fb9c8eba6 (commit) via f0579e2fda1922f32efbf3e2b160cc004aafd99a (commit) via 4c921e5c7b8170b95ba13c33e0f8ae21dd78055e (commit) from 14ab1e900306331d66ab6ef384cf1cc2f85dab1b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2b1e5125bb08ba16a8c9a18a48adc67a4df0b8d7 commit 2b1e5125bb08ba16a8c9a18a48adc67a4df0b8d7 Merge: 14ab1e9 eb923da Author: Brad King AuthorDate: Fri Oct 14 09:03:05 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 09:03:05 2016 -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 Fri Oct 14 09:22:20 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:22:20 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-474-gfd1f119 Message-ID: <20161014132220.609C0E1778@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 fd1f119877d70c15ff420b7ae63d6a518386aeaf (commit) via 7490ae768d8e709a7778ae25a13484e8fd09871c (commit) from 2b1e5125bb08ba16a8c9a18a48adc67a4df0b8d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd1f119877d70c15ff420b7ae63d6a518386aeaf commit fd1f119877d70c15ff420b7ae63d6a518386aeaf Merge: 2b1e512 7490ae7 Author: Brad King AuthorDate: Fri Oct 14 09:22:19 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 09:22:19 2016 -0400 Merge topic 'vs-host-x64-tools' into next 7490ae76 fixup! VS: Provide an option to use x64 host tools https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7490ae768d8e709a7778ae25a13484e8fd09871c commit 7490ae768d8e709a7778ae25a13484e8fd09871c Author: Brad King AuthorDate: Fri Oct 14 09:21:40 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 09:21:40 2016 -0400 fixup! VS: Provide an option to use x64 host tools diff --git a/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst index 2af3a93..4c04e97 100644 --- a/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst +++ b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst @@ -1,12 +1,10 @@ CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE ------------------------------------------- -Visual Studio preferred tool architecture (``x64`` or empty). +Visual Studio preferred tool architecture. The :ref:`Visual Studio Generators` for VS 2013 and above support optional selection of a 64-bit toolchain on 64-bit hosts by specifying a ``host=64`` -value in the :variable:`CMAKE_GENERATOR_TOOLSET` option. The value of this -variable indicates the selected toolchain architecture preference. Note -that this is only a preference specified in the generated project files. -MSBuild may still choose a different tool architecture, such as when on -a 32-bit host. +value in the :variable:`CMAKE_GENERATOR_TOOLSET` option. CMake provides +the selected toolchain architecture preference in this variable (either +``x64`` or empty). ----------------------------------------------------------------------- Summary of changes: .../variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:22:46 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:22:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-476-ged05c2d Message-ID: <20161014132246.7AC53F5EAF@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 ed05c2d38e4a9224b0d2978c7f6eea8278598dd3 (commit) via d079e71c290c3c55a2db5180953daf014a964c25 (commit) from fd1f119877d70c15ff420b7ae63d6a518386aeaf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed05c2d38e4a9224b0d2978c7f6eea8278598dd3 commit ed05c2d38e4a9224b0d2978c7f6eea8278598dd3 Merge: fd1f119 d079e71 Author: Brad King AuthorDate: Fri Oct 14 09:22:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 09:22:45 2016 -0400 Merge topic 'vs-host-x64-tools' into next d079e71c VS: Provide an option to use x64 host tools https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d079e71c290c3c55a2db5180953daf014a964c25 commit d079e71c290c3c55a2db5180953daf014a964c25 Author: Brad King AuthorDate: Fri Oct 7 15:57:04 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 09:22:26 2016 -0400 VS: Provide an option to use x64 host tools Visual Studio provides toolchains that are themselves built for 32-bit or 64-bit host architectures. By default it uses the 32-bit tools, but it can be told to prefer the 64-bit tools on 64-bit hosts. Extend the `CMAKE_GENERATOR_TOOLSET` specification to provide a way to request use of the 64-bit host tools. Closes: #15622 diff --git a/Help/generator/VS_TOOLSET_HOST_ARCH.txt b/Help/generator/VS_TOOLSET_HOST_ARCH.txt new file mode 100644 index 0000000..58e9223 --- /dev/null +++ b/Help/generator/VS_TOOLSET_HOST_ARCH.txt @@ -0,0 +1,10 @@ +For each toolset that comes with this version of Visual Studio, there are +variants that are themselves compiled for 32-bit (x86) and 64-bit (x64) hosts +(independent of the architecture they target). By default Visual Studio +chooses the 32-bit variant even on a 64-bit host. One may request use of the +64-bit host tools by adding ``host=x64`` to the toolset specification: + +``host=x64`` + Select the 64-bit variant of the default toolset. +``,host=x64`` + Select the 64-bit variant of the ```` toolset. diff --git a/Help/generator/Visual Studio 12 2013.rst b/Help/generator/Visual Studio 12 2013.rst index c7358b9..5071b20 100644 --- a/Help/generator/Visual Studio 12 2013.rst +++ b/Help/generator/Visual Studio 12 2013.rst @@ -24,3 +24,5 @@ Toolset Selection The ``v120`` toolset that comes with Visual Studio 12 2013 is selected by default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. + +.. include:: VS_TOOLSET_HOST_ARCH.txt diff --git a/Help/generator/Visual Studio 14 2015.rst b/Help/generator/Visual Studio 14 2015.rst index 0d776e9..64254b5 100644 --- a/Help/generator/Visual Studio 14 2015.rst +++ b/Help/generator/Visual Studio 14 2015.rst @@ -21,3 +21,5 @@ Toolset Selection The ``v140`` toolset that comes with Visual Studio 14 2015 is selected by default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. + +.. include:: VS_TOOLSET_HOST_ARCH.txt diff --git a/Help/generator/Visual Studio 15.rst b/Help/generator/Visual Studio 15.rst index 5bd1882..2eb9052 100644 --- a/Help/generator/Visual Studio 15.rst +++ b/Help/generator/Visual Studio 15.rst @@ -21,3 +21,5 @@ Toolset Selection The ``v141`` toolset that comes with Visual Studio 15 is selected by default. The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. + +.. include:: VS_TOOLSET_HOST_ARCH.txt diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index f76c467..ef7f0c0 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -82,6 +82,7 @@ Variables that Provide Information /variable/CMAKE_VS_NsightTegra_VERSION /variable/CMAKE_VS_PLATFORM_NAME /variable/CMAKE_VS_PLATFORM_TOOLSET + /variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE /variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION /variable/CMAKE_XCODE_PLATFORM_TOOLSET /variable/PROJECT_BINARY_DIR diff --git a/Help/release/dev/vs-host-x64-tools.rst b/Help/release/dev/vs-host-x64-tools.rst new file mode 100644 index 0000000..e42881a --- /dev/null +++ b/Help/release/dev/vs-host-x64-tools.rst @@ -0,0 +1,7 @@ +vs-host-x64-tools +----------------- + +* The :ref:`Visual Studio Generators` for VS 2013 and above learned to + support a ``host=x64`` option in the :variable:`CMAKE_GENERATOR_TOOLSET` + value (e.g. via the :manual:`cmake(1)` ``-T`` option) to request use + of a VS 64-bit toolchain on 64-bit hosts. diff --git a/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst new file mode 100644 index 0000000..4c04e97 --- /dev/null +++ b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst @@ -0,0 +1,10 @@ +CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE +------------------------------------------- + +Visual Studio preferred tool architecture. + +The :ref:`Visual Studio Generators` for VS 2013 and above support optional +selection of a 64-bit toolchain on 64-bit hosts by specifying a ``host=64`` +value in the :variable:`CMAKE_GENERATOR_TOOLSET` option. CMake provides +the selected toolchain architecture preference in this variable (either +``x64`` or empty). diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 145efc6..59d8ab6 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -182,6 +182,11 @@ Id flags: ${testflags} else() set(id_toolset "") endif() + if(CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE) + set(id_PreferredToolArchitecture "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}") + else() + set(id_PreferredToolArchitecture "") + endif() if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") set(id_system "Windows Phone") elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index 2870a11..50be9cb 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -16,6 +16,9 @@ @id_WindowsSDKDesktopARMSupport@ + + @id_PreferredToolArchitecture@ + Application @id_toolset@ diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index caaac87..02ffa41 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -145,10 +145,36 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset( return false; } - this->GeneratorToolset = ts; + if (!this->ParseGeneratorToolset(ts, mf)) { + return false; + } if (const char* toolset = this->GetPlatformToolset()) { mf->AddDefinition("CMAKE_VS_PLATFORM_TOOLSET", toolset); } + if (const char* hostArch = this->GetPlatformToolsetHostArchitecture()) { + mf->AddDefinition("CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE", hostArch); + } + return true; +} + +bool cmGlobalVisualStudio10Generator::ParseGeneratorToolset( + std::string const& ts, cmMakefile* mf) +{ + if (ts.find_first_of(",=") != ts.npos) { + std::ostringstream e; + /* clang-format off */ + e << + "Generator\n" + " " << this->GetName() << "\n" + "does not recognize the toolset\n" + " " << ts << "\n" + "that was specified."; + /* clang-format on */ + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + + this->GeneratorToolset = ts; return true; } @@ -322,6 +348,15 @@ const char* cmGlobalVisualStudio10Generator::GetPlatformToolset() const return 0; } +const char* +cmGlobalVisualStudio10Generator::GetPlatformToolsetHostArchitecture() const +{ + if (!this->GeneratorToolsetHostArchitecture.empty()) { + return this->GeneratorToolsetHostArchitecture.c_str(); + } + return CM_NULLPTR; +} + void cmGlobalVisualStudio10Generator::FindMakeProgram(cmMakefile* mf) { this->cmGlobalVisualStudio8Generator::FindMakeProgram(mf); diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 19c60aa..f8a50ac 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -22,6 +22,7 @@ public: virtual bool SetSystemName(std::string const& s, cmMakefile* mf); virtual bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf); virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf); + virtual bool ParseGeneratorToolset(std::string const& ts, cmMakefile* mf); virtual void GenerateBuildCommand( std::vector& makeCommand, const std::string& makeProgram, @@ -48,6 +49,9 @@ public: /** The toolset name for the target platform. */ const char* GetPlatformToolset() const; + /** The toolset host architecture name (e.g. x64 for 64-bit host tools). */ + const char* GetPlatformToolsetHostArchitecture() const; + /** Return the CMAKE_SYSTEM_NAME. */ std::string const& GetSystemName() const { return this->SystemName; } @@ -101,6 +105,7 @@ protected: std::string const& GetMSBuildCommand(); std::string GeneratorToolset; + std::string GeneratorToolsetHostArchitecture; std::string DefaultPlatformToolset; std::string WindowsTargetPlatformVersion; std::string SystemName; diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 5fdeec7..ec7916c 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -96,6 +96,21 @@ bool cmGlobalVisualStudio12Generator::MatchesGeneratorName( return false; } +bool cmGlobalVisualStudio12Generator::ParseGeneratorToolset( + std::string const& ts, cmMakefile* mf) +{ + std::string::size_type ts_end = ts.size(); + if (cmHasLiteralSuffix(ts, ",host=x64")) { + this->GeneratorToolsetHostArchitecture = "x64"; + ts_end -= 9; + } else if (ts == "host=x64") { + this->GeneratorToolsetHostArchitecture = "x64"; + ts_end = 0; + } + return this->cmGlobalVisualStudio11Generator::ParseGeneratorToolset( + ts.substr(0, ts_end), mf); +} + bool cmGlobalVisualStudio12Generator::InitializeWindowsPhone(cmMakefile* mf) { if (!this->SelectWindowsPhoneToolset(this->DefaultPlatformToolset)) { diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index 78bb637..cdda512 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -22,6 +22,9 @@ public: // version number virtual const char* GetToolsVersion() { return "12.0"; } protected: + bool ParseGeneratorToolset(std::string const& ts, + cmMakefile* mf) CM_OVERRIDE; + virtual bool InitializeWindowsPhone(cmMakefile* mf); virtual bool InitializeWindowsStore(cmMakefile* mf); virtual bool SelectWindowsPhoneToolset(std::string& toolset) const; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 75fc2e4..0ddfc9a 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -220,6 +220,19 @@ bool cmGlobalXCodeGenerator::SetGeneratorToolset(std::string const& ts, cmMakefile* mf) { if (this->XcodeVersion >= 30) { + if (ts.find_first_of(",=") != ts.npos) { + std::ostringstream e; + /* clang-format off */ + e << + "Generator\n" + " " << this->GetName() << "\n" + "does not recognize the toolset\n" + " " << ts << "\n" + "that was specified."; + /* clang-format on */ + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } this->GeneratorToolset = ts; if (!this->GeneratorToolset.empty()) { mf->AddDefinition("CMAKE_XCODE_PLATFORM_TOOLSET", diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 6690bfa..4a9df04 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -322,6 +322,15 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("\n", 1); } + if (const char* hostArch = + this->GlobalGenerator->GetPlatformToolsetHostArchitecture()) { + this->WriteString("\n", 1); + this->WriteString("", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(hostArch) + << "\n"; + this->WriteString("\n", 1); + } + this->WriteProjectConfigurations(); this->WriteString("\n", 1); this->WriteString("", 2); diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt new file mode 100644 index 0000000..5737e95 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at CMakeLists.txt:[0-9]+ \(project\): + Generator + + .* + + does not recognize the toolset + + Test Toolset,host=x6[45] + + that was specified\.$ diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake new file mode 100644 index 0000000..2fc38e5 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake @@ -0,0 +1 @@ +message(FATAL_ERROR "This should not be reached!") diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake index 283a2a0..e8ce47d 100644 --- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake @@ -6,6 +6,21 @@ run_cmake(NoToolset) if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode" AND NOT XCODE_BELOW_3) set(RunCMake_GENERATOR_TOOLSET "Test Toolset") run_cmake(TestToolset) + if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[245]") + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64") + run_cmake(TestToolsetHostArchBoth) + set(RunCMake_GENERATOR_TOOLSET ",host=x64") + run_cmake(TestToolsetHostArchOnly) + set(RunCMake_GENERATOR_TOOLSET "host=x64") + run_cmake(TestToolsetHostArchOnly) + set(RunCMake_GENERATOR_TOOLSET "Test Toolset") + run_cmake(TestToolsetHostArchNone) + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x65") + run_cmake(BadToolsetHostArch) + else() + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64") + run_cmake(BadToolsetHostArch) + endif() else() set(RunCMake_GENERATOR_TOOLSET "Bad Toolset") run_cmake(BadToolset) diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt new file mode 100644 index 0000000..f0b6d46 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='x64' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt new file mode 100644 index 0000000..576b40c --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt new file mode 100644 index 0000000..8271bd4 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='v[0-9]+' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='x64' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:25:36 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:25:36 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-218-ga8513d8 Message-ID: <20161014132536.7CC0EF5F13@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 a8513d8a80dbf654915a3176673e7f7ef544a957 (commit) via d079e71c290c3c55a2db5180953daf014a964c25 (commit) via 779939a00ebc21419404737f2fc2b34e7775f086 (commit) from eb923da2c41ab811a6adec44ef87f3aa8bd26849 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8513d8a80dbf654915a3176673e7f7ef544a957 commit a8513d8a80dbf654915a3176673e7f7ef544a957 Merge: eb923da d079e71 Author: Brad King AuthorDate: Fri Oct 14 09:25:34 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 09:25:34 2016 -0400 Merge topic 'vs-host-x64-tools' d079e71c VS: Provide an option to use x64 host tools 779939a0 Help: Document VS and Xcode toolset selection ----------------------------------------------------------------------- Summary of changes: Help/generator/VS_TOOLSET_HOST_ARCH.txt | 10 ++++++ Help/generator/Visual Studio 10 2010.rst | 7 ++++ Help/generator/Visual Studio 11 2012.rst | 7 ++++ Help/generator/Visual Studio 12 2013.rst | 9 +++++ Help/generator/Visual Studio 14 2015.rst | 9 +++++ Help/generator/Visual Studio 15.rst | 9 +++++ Help/generator/Xcode.rst | 7 ++++ Help/manual/OPTIONS_BUILD.txt | 11 +++--- Help/manual/cmake-variables.7.rst | 1 + Help/release/dev/vs-host-x64-tools.rst | 7 ++++ ...CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst | 10 ++++++ Modules/CMakeDetermineCompilerId.cmake | 5 +++ Modules/CompilerId/VS-10.vcxproj.in | 3 ++ Source/cmGlobalVisualStudio10Generator.cxx | 37 +++++++++++++++++++- Source/cmGlobalVisualStudio10Generator.h | 5 +++ Source/cmGlobalVisualStudio12Generator.cxx | 15 ++++++++ Source/cmGlobalVisualStudio12Generator.h | 3 ++ Source/cmGlobalXCodeGenerator.cxx | 13 +++++++ Source/cmVisualStudio10TargetGenerator.cxx | 9 +++++ .../BadToolsetHostArch-result.txt} | 0 .../GeneratorToolset/BadToolsetHostArch-stderr.txt | 10 ++++++ .../BadToolsetHostArch.cmake} | 0 Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake | 15 ++++++++ .../TestToolsetHostArchBoth-stdout.txt | 2 ++ .../GeneratorToolset/TestToolsetHostArchBoth.cmake | 2 ++ .../TestToolsetHostArchNone-stdout.txt | 2 ++ .../GeneratorToolset/TestToolsetHostArchNone.cmake | 2 ++ .../TestToolsetHostArchOnly-stdout.txt | 2 ++ .../GeneratorToolset/TestToolsetHostArchOnly.cmake | 2 ++ 29 files changed, 207 insertions(+), 7 deletions(-) create mode 100644 Help/generator/VS_TOOLSET_HOST_ARCH.txt create mode 100644 Help/release/dev/vs-host-x64-tools.rst create mode 100644 Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => GeneratorToolset/BadToolsetHostArch-result.txt} (100%) create mode 100644 Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt copy Tests/RunCMake/{GeneratorPlatform/BadPlatform.cmake => GeneratorToolset/BadToolsetHostArch.cmake} (100%) create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:25:52 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:25:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-478-g1ed28ad Message-ID: <20161014132552.67B7CF5F1B@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 1ed28ad0edd0e85f7d4a03be5c0d38bf36203437 (commit) via a8513d8a80dbf654915a3176673e7f7ef544a957 (commit) from ed05c2d38e4a9224b0d2978c7f6eea8278598dd3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ed28ad0edd0e85f7d4a03be5c0d38bf36203437 commit 1ed28ad0edd0e85f7d4a03be5c0d38bf36203437 Merge: ed05c2d a8513d8 Author: Brad King AuthorDate: Fri Oct 14 09:25:43 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 09:25:43 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 09:46:40 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 09:46:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-482-gee304e8 Message-ID: <20161014134640.318F4E63EC@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 ee304e8a3b7e3eae55cbf7ef06589f27441c1bf8 (commit) via 70e268da3e5f8e00bdf065786cd685a9660fe1c4 (commit) via 47092d3e809be971264a8d5416ff3cb9255f6565 (commit) via 7db671a14374fdbfb8ae87ab9618bca111f4e8a5 (commit) from 1ed28ad0edd0e85f7d4a03be5c0d38bf36203437 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ee304e8a3b7e3eae55cbf7ef06589f27441c1bf8 commit ee304e8a3b7e3eae55cbf7ef06589f27441c1bf8 Merge: 1ed28ad 70e268d Author: Brad King AuthorDate: Fri Oct 14 09:46:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 09:46:39 2016 -0400 Merge topic 'cmcldeps-more-safety' into next 70e268da cmcldeps: prefer the /TC flag 47092d3e cmcldeps: append strings as strings 7db671a1 cmcldeps: search for single-byte strings as characters https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70e268da3e5f8e00bdf065786cd685a9660fe1c4 commit 70e268da3e5f8e00bdf065786cd685a9660fe1c4 Author: Ben Boeckel AuthorDate: Thu Oct 13 12:48:37 2016 -0400 Commit: Ben Boeckel CommitDate: Fri Oct 14 09:27:43 2016 -0400 cmcldeps: prefer the /TC flag The /TC flag causes all source files to be processed as C source files. We know that there is only one, so this is safe. diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index bfbb5fd..b86ad6e 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -279,12 +279,7 @@ int main() clrest = replace(clrest, "/fo", "/out:"); clrest = replace(clrest, objfile, objfile + ".dep.obj "); - // rc: src\x\x.rc -> cl: /Tc src\x\x.rc - if (srcfile.find(' ') != std::string::npos) - srcfile = "\"" + srcfile + "\""; - clrest = replace(clrest, srcfile, "/Tc " + srcfile); - - cl = "\"" + cl + "\" /P /DRC_INVOKED "; + cl = "\"" + cl + "\" /P /DRC_INVOKED /TC "; // call cl in object dir so the .i is generated there std::string objdir; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47092d3e809be971264a8d5416ff3cb9255f6565 commit 47092d3e809be971264a8d5416ff3cb9255f6565 Author: Ben Boeckel AuthorDate: Thu Oct 13 12:48:24 2016 -0400 Commit: Ben Boeckel CommitDate: Fri Oct 14 09:27:43 2016 -0400 cmcldeps: append strings as strings diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index aed67b9..bfbb5fd 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -205,7 +205,7 @@ static int process(const std::string& srcfilename, const std::string& dfile, std::vector command; for (std::vector::iterator i = args.begin(); i != args.end(); ++i) { - command.push_back(i->c_str()); + command.push_back(*i); } // run the command int exit_code = 0; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7db671a14374fdbfb8ae87ab9618bca111f4e8a5 commit 7db671a14374fdbfb8ae87ab9618bca111f4e8a5 Author: Ben Boeckel AuthorDate: Thu Oct 13 12:47:50 2016 -0400 Commit: Ben Boeckel CommitDate: Fri Oct 14 09:27:43 2016 -0400 cmcldeps: search for single-byte strings as characters diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index 167d60a..aed67b9 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -258,7 +258,7 @@ int main() // needed to suppress filename output of msvc tools std::string srcfilename; { - std::string::size_type pos = srcfile.rfind("\\"); + std::string::size_type pos = srcfile.rfind('\\'); if (pos == std::string::npos) { srcfilename = srcfile; } else { @@ -280,7 +280,7 @@ int main() clrest = replace(clrest, objfile, objfile + ".dep.obj "); // rc: src\x\x.rc -> cl: /Tc src\x\x.rc - if (srcfile.find(" ") != std::string::npos) + if (srcfile.find(' ') != std::string::npos) srcfile = "\"" + srcfile + "\""; clrest = replace(clrest, srcfile, "/Tc " + srcfile); ----------------------------------------------------------------------- Summary of changes: Source/cmcldeps.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 10:55:55 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 10:55:55 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-488-ge0a44b6 Message-ID: <20161014145555.2D21FF581B@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 e0a44b614ced7559f596649ac159f35bc65aa35d (commit) via 0d818632978a450f1afaf687c867e62e885457f7 (commit) via a975b21cecc1ce45eeca9dc1b2103268f508317a (commit) via 2d6fba67804ffcdeb1ca95198aacb326dd8fc4e7 (commit) via f6386a768e98b77a0128ac2aac4d07e241b17da4 (commit) via 1a64962b7cf100fae2db569d2444e2b060787c1c (commit) from ee304e8a3b7e3eae55cbf7ef06589f27441c1bf8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0a44b614ced7559f596649ac159f35bc65aa35d commit e0a44b614ced7559f596649ac159f35bc65aa35d Merge: ee304e8 0d81863 Author: Brad King AuthorDate: Fri Oct 14 10:55:46 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 10:55:46 2016 -0400 Merge branch 'master' into next https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0d818632978a450f1afaf687c867e62e885457f7 commit 0d818632978a450f1afaf687c867e62e885457f7 Merge: a8513d8 a975b21 Author: Brad King AuthorDate: Fri Oct 14 10:55:31 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 10:55:31 2016 -0400 Merge branch 'release' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a975b21cecc1ce45eeca9dc1b2103268f508317a commit a975b21cecc1ce45eeca9dc1b2103268f508317a Merge: 2d6fba6 2027887 Author: Brad King AuthorDate: Thu Oct 13 14:09:43 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 14:09:43 2016 -0400 Merge branch 'ninja-framework-POST_BUILD' into release https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d6fba67804ffcdeb1ca95198aacb326dd8fc4e7 commit 2d6fba67804ffcdeb1ca95198aacb326dd8fc4e7 Merge: f6386a7 933e54d Author: Brad King AuthorDate: Thu Oct 13 13:38:28 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 13:38:28 2016 -0400 Merge branch 'backport-LINK_WHAT_YOU_USE-allow-OFF' into release https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f6386a768e98b77a0128ac2aac4d07e241b17da4 commit f6386a768e98b77a0128ac2aac4d07e241b17da4 Merge: 1a64962 9977899 Author: Brad King AuthorDate: Thu Oct 13 13:15:46 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 13:15:46 2016 -0400 Merge branch 'ninja-rc-regression' into release https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a64962b7cf100fae2db569d2444e2b060787c1c commit 1a64962b7cf100fae2db569d2444e2b060787c1c Merge: d0255d5 6e5a365 Author: Brad King AuthorDate: Thu Oct 13 08:20:08 2016 -0400 Commit: Brad King CommitDate: Thu Oct 13 08:20:08 2016 -0400 Merge branch 'ice-3.6.3' into release ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 10:55:59 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 10:55:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-223-g0d81863 Message-ID: <20161014145559.95322F57BE@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 0d818632978a450f1afaf687c867e62e885457f7 (commit) via a975b21cecc1ce45eeca9dc1b2103268f508317a (commit) via 2d6fba67804ffcdeb1ca95198aacb326dd8fc4e7 (commit) via f6386a768e98b77a0128ac2aac4d07e241b17da4 (commit) via 1a64962b7cf100fae2db569d2444e2b060787c1c (commit) from a8513d8a80dbf654915a3176673e7f7ef544a957 (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 Fri Oct 14 10:55:59 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 10:55:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.7.0-rc1-46-ga975b21 Message-ID: <20161014145559.B4712F5822@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 a975b21cecc1ce45eeca9dc1b2103268f508317a (commit) via 20278872e3d8145f4aa81ea6cde01144daa3ca8f (commit) via 2d6fba67804ffcdeb1ca95198aacb326dd8fc4e7 (commit) via 933e54d3ccf59fd756997752a041ee84e5f85897 (commit) via f6386a768e98b77a0128ac2aac4d07e241b17da4 (commit) via 9977899df2c6c7687353882eff01150546ef42a9 (commit) via 1a64962b7cf100fae2db569d2444e2b060787c1c (commit) via 6e5a3655cac2937861b1f1f1e66ac7c1fa41c626 (commit) from d0255d55e1228f6f7133eb36053bd474fb6ae884 (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/FindIce.cmake | 1 + Source/cmMakefileExecutableTargetGenerator.cxx | 4 ++-- Source/cmMakefileLibraryTargetGenerator.cxx | 4 ++-- Source/cmNinjaNormalTargetGenerator.cxx | 10 ++++++---- Source/cmNinjaTargetGenerator.cxx | 2 +- Tests/Framework/CMakeLists.txt | 5 +++++ 6 files changed, 17 insertions(+), 9 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 14:46:10 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 14:46:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-490-gc7a826a Message-ID: <20161014184611.43E92F5063@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 c7a826a42d0d31dc494da0c07ba23af24b152554 (commit) via 78b00f1d10f5bb0a152d7825ef554836b52f7977 (commit) from e0a44b614ced7559f596649ac159f35bc65aa35d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c7a826a42d0d31dc494da0c07ba23af24b152554 commit c7a826a42d0d31dc494da0c07ba23af24b152554 Merge: e0a44b6 78b00f1 Author: Brad King AuthorDate: Fri Oct 14 14:46:06 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 14:46:06 2016 -0400 Merge topic 'doc-clarify-ctest-APPEND' into next 78b00f1d Help: Clarify `ctest_*` APPEND option behavior https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78b00f1d10f5bb0a152d7825ef554836b52f7977 commit 78b00f1d10f5bb0a152d7825ef554836b52f7977 Author: Brad King AuthorDate: Fri Oct 14 14:42:48 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 14:43:46 2016 -0400 Help: Clarify `ctest_*` APPEND option behavior Explicitly state that this marks the `.xml` to tell the dashboard server to append it to previously submitted results and that it does not cause results to be appended to the `.xml` file. diff --git a/Help/command/ctest_build.rst b/Help/command/ctest_build.rst index d3ceb2d..55bb4a3 100644 --- a/Help/command/ctest_build.rst +++ b/Help/command/ctest_build.rst @@ -30,9 +30,11 @@ The options are: :variable:`CTEST_BINARY_DIRECTORY` variable is used. ``APPEND`` - Mark results for append to those previously submitted to a + Mark ``Build.xml`` for append to results previously submitted to a dashboard server since the last :command:`ctest_start` call. Append semantics are defined by the dashboard server in use. + This does *not* cause results to be appended to a ``.xml`` file + produced by a previous call to this command. ``CONFIGURATION `` Specify the build configuration (e.g. ``Debug``). If not diff --git a/Help/command/ctest_configure.rst b/Help/command/ctest_configure.rst index b11e77c..2dea07b 100644 --- a/Help/command/ctest_configure.rst +++ b/Help/command/ctest_configure.rst @@ -23,9 +23,11 @@ The options are: :variable:`CTEST_SOURCE_DIRECTORY` variable is used. ``APPEND`` - Mark results for append to those previously submitted to a + Mark ``Configure.xml`` for append to results previously submitted to a dashboard server since the last :command:`ctest_start` call. Append semantics are defined by the dashboard server in use. + This does *not* cause results to be appended to a ``.xml`` file + produced by a previous call to this command. ``OPTIONS `` Specify command-line arguments to pass to the configuration tool. diff --git a/Help/command/ctest_coverage.rst b/Help/command/ctest_coverage.rst index ec1ee25..8d27b9c 100644 --- a/Help/command/ctest_coverage.rst +++ b/Help/command/ctest_coverage.rst @@ -22,9 +22,11 @@ The options are: :variable:`CTEST_BINARY_DIRECTORY` variable is used. ``APPEND`` - Mark results for append to those previously submitted to a + Mark ``Coverage.xml`` for append to results previously submitted to a dashboard server since the last :command:`ctest_start` call. Append semantics are defined by the dashboard server in use. + This does *not* cause results to be appended to a ``.xml`` file + produced by a previous call to this command. ``LABELS`` Filter the coverage report to include only source files labeled diff --git a/Help/command/ctest_test.rst b/Help/command/ctest_test.rst index 551bc58..ce50d42 100644 --- a/Help/command/ctest_test.rst +++ b/Help/command/ctest_test.rst @@ -32,9 +32,11 @@ The options are: :variable:`CTEST_BINARY_DIRECTORY` variable is used. ``APPEND`` - Mark results for append to those previously submitted to a + Mark ``Test.xml`` for append to results previously submitted to a dashboard server since the last :command:`ctest_start` call. Append semantics are defined by the dashboard server in use. + This does *not* cause results to be appended to a ``.xml`` file + produced by a previous call to this command. ``START `` Specify the beginning of a range of test numbers. ----------------------------------------------------------------------- Summary of changes: Help/command/ctest_build.rst | 4 +++- Help/command/ctest_configure.rst | 4 +++- Help/command/ctest_coverage.rst | 4 +++- Help/command/ctest_test.rst | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 15:42:04 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 15:42:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-492-g2af5a40 Message-ID: <20161014194204.5ECF5E0E72@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 2af5a4054363955c94feeb26d6b33bdcc2dc5736 (commit) via 3823ed3ab7a4ae1b0663ae89608386d03cc6709a (commit) from c7a826a42d0d31dc494da0c07ba23af24b152554 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2af5a4054363955c94feeb26d6b33bdcc2dc5736 commit 2af5a4054363955c94feeb26d6b33bdcc2dc5736 Merge: c7a826a 3823ed3 Author: Brad King AuthorDate: Fri Oct 14 15:42:03 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 15:42:03 2016 -0400 Merge topic 'doc-math-EXPR' into next 3823ed3a Help: Fix math(EXPR) documentation formatting https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3823ed3ab7a4ae1b0663ae89608386d03cc6709a commit 3823ed3ab7a4ae1b0663ae89608386d03cc6709a Author: Brad King AuthorDate: Fri Oct 14 15:41:03 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 15:41:49 2016 -0400 Help: Fix math(EXPR) documentation formatting diff --git a/Help/command/math.rst b/Help/command/math.rst index d4deb16..f99dc3d 100644 --- a/Help/command/math.rst +++ b/Help/command/math.rst @@ -5,9 +5,10 @@ Mathematical expressions. :: - math(EXPR ) + math(EXPR ) ``EXPR`` evaluates mathematical expression and returns result in the -output variable. Example mathematical expression is '5 * ( 10 + 13 -)'. Supported operators are + - * / % | & ^ ~ << >> * / %. They have -the same meaning as they do in C code. +output variable. Example mathematical expression is ``5 * (10 + 13)``. +Supported operators are ``+``, ``-``, ``*``, ``/``, ``%``, ``|``, ``&``, +``^``, ``~``, ``<<``, ``>>``, and ``(...)``. They have the same meaning +as they do in C code. ----------------------------------------------------------------------- Summary of changes: Help/command/math.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 14 15:47:45 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 14 Oct 2016 15:47:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-494-g749587d Message-ID: <20161014194745.51A82F5484@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 749587d10ed558c20e8f45d2190999ebdda6c9c9 (commit) via c05d9b0569a2a2c43db6f09a53fed7b54ae97d32 (commit) from 2af5a4054363955c94feeb26d6b33bdcc2dc5736 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=749587d10ed558c20e8f45d2190999ebdda6c9c9 commit 749587d10ed558c20e8f45d2190999ebdda6c9c9 Merge: 2af5a40 c05d9b0 Author: Brad King AuthorDate: Fri Oct 14 15:47:44 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 14 15:47:44 2016 -0400 Merge topic 'doc-math-EXPR' into next c05d9b05 Help: Fix math(EXPR) documentation formatting https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c05d9b0569a2a2c43db6f09a53fed7b54ae97d32 commit c05d9b0569a2a2c43db6f09a53fed7b54ae97d32 Author: Brad King AuthorDate: Fri Oct 14 15:41:03 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 15:47:30 2016 -0400 Help: Fix math(EXPR) documentation formatting diff --git a/Help/command/math.rst b/Help/command/math.rst index d4deb16..f99dc3d 100644 --- a/Help/command/math.rst +++ b/Help/command/math.rst @@ -5,9 +5,10 @@ Mathematical expressions. :: - math(EXPR ) + math(EXPR ) ``EXPR`` evaluates mathematical expression and returns result in the -output variable. Example mathematical expression is '5 * ( 10 + 13 -)'. Supported operators are + - * / % | & ^ ~ << >> * / %. They have -the same meaning as they do in C code. +output variable. Example mathematical expression is ``5 * (10 + 13)``. +Supported operators are ``+``, ``-``, ``*``, ``/``, ``%``, ``|``, ``&``, +``^``, ``~``, ``<<``, ``>>``, and ``(...)``. They have the same meaning +as they do in C code. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Sat Oct 15 00:01:15 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 15 Oct 2016 00:01:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-224-gac5b80e Message-ID: <20161015040115.347F9F60E1@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 ac5b80e76c102d43749555c9bc888f9ac9b7436e (commit) from 0d818632978a450f1afaf687c867e62e885457f7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac5b80e76c102d43749555c9bc888f9ac9b7436e commit ac5b80e76c102d43749555c9bc888f9ac9b7436e Author: Kitware Robot AuthorDate: Sat Oct 15 00:01:10 2016 -0400 Commit: Kitware Robot CommitDate: Sat Oct 15 00:01:10 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 662ba9f..f52fe69 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 7) -set(CMake_VERSION_PATCH 20161014) +set(CMake_VERSION_PATCH 20161015) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From steveire at gmail.com Sat Oct 15 05:14:55 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sat, 15 Oct 2016 05:14:55 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-514-g590f2a3 Message-ID: <20161015091455.066BAF208E@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 590f2a365ed4ee2cc3a7fd93f55b2ab869fc3004 (commit) via a5dfe2391b8d60fc2f6b5778687a9a338b6ed561 (commit) via a365ab39a149ee2d71804e8dfd9a8c4636db9fac (commit) via d409cb7bb7724b742efaa289d9183f5f5a840638 (commit) via fa9dbc56a15aec71ac2eda7890efd0116797f373 (commit) via 848ae2a663ef83e059561d94b33d551154642231 (commit) via a0a720e6a70133e361762101ce69a0b3f1ab244d (commit) via 637e3f3ee131cf30f7337db06314f4a1af22c245 (commit) via 05251e6d80b03ae14d6a89765f14c2eb10979bd4 (commit) via fbf1721c94b40ea86eeb183a1916f2066eb64bdc (commit) via 390a7d8647c13570dc6416fceb884dc51c8ef6f9 (commit) via e32a6bdd990571bafb8537110128d28a593150b7 (commit) via 7863fba1f6f37db2f75834d0d6a3fbbc680e731c (commit) via 8096682e4edb542a48bbf66c085911db5f00be02 (commit) via 7d57c1a2c926011bc2e4c7a65b802763ec4efbcb (commit) via a55cac4ba475ff61da4146272246512a52247323 (commit) via 705fcf522be16eee03b1757274b23ada6547e6bd (commit) via 1fb6f672bd2bd041edb772b0627278383a00fb62 (commit) via 60b3f216c18aa317656433bcc0b724e6abd8d02f (commit) via aaa5dbbf64392dad518668ac1d046d624dac41f3 (commit) from 749587d10ed558c20e8f45d2190999ebdda6c9c9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=590f2a365ed4ee2cc3a7fd93f55b2ab869fc3004 commit 590f2a365ed4ee2cc3a7fd93f55b2ab869fc3004 Merge: 749587d a5dfe23 Author: Stephen Kelly AuthorDate: Sat Oct 15 05:14:52 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 15 05:14:52 2016 -0400 Merge topic 'extract-computed-target-properties' into next a5dfe239 cmTarget: Implement GetProperty in terms of cmState::Snapshot a365ab39 cmTarget: Group code for checking written properties together d409cb7b cmTarget: Move sanity checks and computed property access to callers fa9dbc56 cmGeneratorTarget: Implement cmTargetPropertyComputer interface 848ae2a6 cmTargetPropertyComputer: Template some methods on the Target a0a720e6 cm{,Generator}Target: Add global generator accessors 637e3f3e cmTargetPropertyComputer: Unify whitelist handling from cmTarget 05251e6d cmTargetPropertyComputer: Move whitelist check from cmTarget fbf1721c cmTargetPropertyComputer: Extract into new files 390a7d86 cmTargetPropertyComputer: Implement GetProperty without cmMakefile e32a6bdd cmListFileBacktrace: Add a method to retrieve the Bottom of a snapshot 7863fba1 cmTarget: Extract GetLocation method 8096682e cmTarget: Extract GetSources method 7d57c1a2 cmTarget: Extract location computation methods a55cac4b cmTarget: Split property computation into separate class 705fcf52 cmTarget: Move IMPORTED check to callers ... https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5dfe2391b8d60fc2f6b5778687a9a338b6ed561 commit a5dfe2391b8d60fc2f6b5778687a9a338b6ed561 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:26 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTarget: Implement GetProperty in terms of cmState::Snapshot diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index d8bc64a..b2b7cd6 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1215,10 +1215,16 @@ const char* cmTarget::GetProperty(const std::string& prop) const return this->GetName().c_str(); } if (prop == propBINARY_DIR) { - return this->GetMakefile()->GetCurrentBinaryDirectory(); + return this->GetMakefile() + ->GetStateSnapshot() + .GetDirectory() + .GetCurrentBinary(); } if (prop == propSOURCE_DIR) { - return this->GetMakefile()->GetCurrentSourceDirectory(); + return this->GetMakefile() + ->GetStateSnapshot() + .GetDirectory() + .GetCurrentSource(); } } @@ -1227,7 +1233,8 @@ const char* cmTarget::GetProperty(const std::string& prop) const const bool chain = this->GetMakefile()->GetState()->IsPropertyChained( prop, cmProperty::TARGET); if (chain) { - return this->Makefile->GetProperty(prop, chain); + return this->Makefile->GetStateSnapshot().GetDirectory().GetProperty( + prop, chain); } } return retVal; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a365ab39a149ee2d71804e8dfd9a8c4636db9fac commit a365ab39a149ee2d71804e8dfd9a8c4636db9fac Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:26 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTarget: Group code for checking written properties together diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ef13b26..d8bc64a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -852,7 +852,20 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; + } else if (prop == "EXPORT_NAME" && this->IsImported()) { + std::ostringstream e; + e << "EXPORT_NAME property can't be set on imported targets (\"" + << this->Name << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } else if (prop == "SOURCES" && this->IsImported()) { + std::ostringstream e; + e << "SOURCES property can't be set on imported targets (\"" << this->Name + << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; } + if (prop == "INCLUDE_DIRECTORIES") { this->Internal->IncludeDirectoriesEntries.clear(); this->Internal->IncludeDirectoriesBacktraces.clear(); @@ -885,11 +898,6 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); this->Internal->CompileDefinitionsBacktraces.push_back(lfbt); } - } else if (prop == "EXPORT_NAME" && this->IsImported()) { - std::ostringstream e; - e << "EXPORT_NAME property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); } else if (prop == "LINK_LIBRARIES") { this->Internal->LinkImplementationPropertyEntries.clear(); this->Internal->LinkImplementationPropertyBacktraces.clear(); @@ -899,14 +907,6 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) this->Internal->LinkImplementationPropertyBacktraces.push_back(lfbt); } } else if (prop == "SOURCES") { - if (this->IsImported()) { - std::ostringstream e; - e << "SOURCES property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); - return; - } - this->Internal->SourceEntries.clear(); this->Internal->SourceBacktraces.clear(); if (value) { @@ -932,6 +932,18 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; + } else if (prop == "EXPORT_NAME" && this->IsImported()) { + std::ostringstream e; + e << "EXPORT_NAME property can't be set on imported targets (\"" + << this->Name << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } else if (prop == "SOURCES" && this->IsImported()) { + std::ostringstream e; + e << "SOURCES property can't be set on imported targets (\"" << this->Name + << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; } if (prop == "INCLUDE_DIRECTORIES") { if (value && *value) { @@ -957,11 +969,6 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); this->Internal->CompileDefinitionsBacktraces.push_back(lfbt); } - } else if (prop == "EXPORT_NAME" && this->IsImported()) { - std::ostringstream e; - e << "EXPORT_NAME property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); } else if (prop == "LINK_LIBRARIES") { if (value && *value) { cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); @@ -969,13 +976,6 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, this->Internal->LinkImplementationPropertyBacktraces.push_back(lfbt); } } else if (prop == "SOURCES") { - if (this->IsImported()) { - std::ostringstream e; - e << "SOURCES property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); - return; - } cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); this->Internal->SourceEntries.push_back(value); this->Internal->SourceBacktraces.push_back(lfbt); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d409cb7bb7724b742efaa289d9183f5f5a840638 commit d409cb7bb7724b742efaa289d9183f5f5a840638 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:26 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTarget: Move sanity checks and computed property access to callers The GetProperty method is now just accessing contained data, meaning it can be implemented in cmState. Remove the cmMakefile context from the signature as a result and remove the overload with the same signature. As a side-effect, the CMP0026 warning now gives a backtrace to the target when issued from a generator expression. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 050fcb8..b0ff13e 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -397,6 +397,18 @@ std::string cmGeneratorTarget::GetExportName() const const char* cmGeneratorTarget::GetProperty(const std::string& prop) const { + if (!cmTargetPropertyComputer::PassesWhitelist( + this->GetType(), prop, this->Makefile->GetMessenger(), + this->GetBacktrace())) { + return 0; + } + if (const char* result = cmTargetPropertyComputer::GetProperty( + this, prop, this->Makefile->GetMessenger(), this->GetBacktrace())) { + return result; + } + if (cmSystemTools::GetFatalErrorOccured()) { + return CM_NULLPTR; + } return this->Target->GetProperty(prop); } diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index ba03568..b38950a 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -6,6 +6,7 @@ #include "cmPropertyDefinition.h" #include "cmSourceFile.h" #include "cmState.h" +#include "cmTargetPropertyComputer.h" #include "cmTest.h" #include "cmake.h" @@ -246,8 +247,18 @@ bool cmGetPropertyCommand::HandleTargetMode() } return this->StoreResult(CM_NULLPTR); } - return this->StoreResult( - target->GetProperty(this->PropertyName, this->Makefile)); + const char* prop_cstr = 0; + cmListFileBacktrace bt = this->Makefile->GetBacktrace(); + cmMessenger* messenger = this->Makefile->GetMessenger(); + if (cmTargetPropertyComputer::PassesWhitelist( + target->GetType(), this->PropertyName, messenger, bt)) { + prop_cstr = cmTargetPropertyComputer::GetProperty( + target, this->PropertyName, messenger, bt); + if (!prop_cstr) { + prop_cstr = target->GetProperty(this->PropertyName); + } + } + return this->StoreResult(prop_cstr); } std::ostringstream e; e << "could not find TARGET " << this->Name diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx index fe09442..94f8942 100644 --- a/Source/cmGetTargetPropertyCommand.cxx +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetTargetPropertyCommand.h" +#include "cmTargetPropertyComputer.h" + // cmSetTargetPropertyCommand bool cmGetTargetPropertyCommand::InitialPass( std::vector const& args, cmExecutionStatus&) @@ -22,7 +24,17 @@ bool cmGetTargetPropertyCommand::InitialPass( prop_exists = true; } } else if (!args[2].empty()) { - const char* prop_cstr = tgt->GetProperty(args[2], this->Makefile); + const char* prop_cstr = 0; + cmListFileBacktrace bt = this->Makefile->GetBacktrace(); + cmMessenger* messenger = this->Makefile->GetMessenger(); + if (cmTargetPropertyComputer::PassesWhitelist(tgt->GetType(), args[2], + messenger, bt)) { + prop_cstr = + cmTargetPropertyComputer::GetProperty(tgt, args[2], messenger, bt); + if (!prop_cstr) { + prop_cstr = tgt->GetProperty(args[2]); + } + } if (prop_cstr) { prop = prop_cstr; prop_exists = true; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 9b2043c..ef13b26 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1131,26 +1131,6 @@ void cmTarget::CheckProperty(const std::string& prop, const char* cmTarget::GetProperty(const std::string& prop) const { - return this->GetProperty(prop, this->Makefile); -} - -const char* cmTarget::GetProperty(const std::string& prop, - cmMakefile* context) const -{ - if (!cmTargetPropertyComputer::PassesWhitelist(this->GetType(), prop, - context->GetMessenger(), - context->GetBacktrace())) { - return CM_NULLPTR; - } - - if (const char* result = cmTargetPropertyComputer::GetProperty( - this, prop, context->GetMessenger(), context->GetBacktrace())) { - return result; - } - if (cmSystemTools::GetFatalErrorOccured()) { - return CM_NULLPTR; - } - static UNORDERED_SET specialProps; #define MAKE_STATIC_PROP(PROP) static const std::string prop##PROP = #PROP MAKE_STATIC_PROP(LINK_LIBRARIES); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 2d259ed..d48e7e2 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -200,7 +200,6 @@ public: void AppendProperty(const std::string& prop, const char* value, bool asString = false); const char* GetProperty(const std::string& prop) const; - const char* GetProperty(const std::string& prop, cmMakefile* context) const; bool GetPropertyAsBool(const std::string& prop) const; void CheckProperty(const std::string& prop, cmMakefile* context) const; diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt index e4dbb71..d4e5b29 100644 --- a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt +++ b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) in CMakeLists.txt: +CMake Warning \(dev\) at TARGET_PROPERTY-LOCATION.cmake:2 \(add_library\): Policy CMP0026 is not set: Disallow use of the LOCATION target property. Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy command to set the policy and suppress this warning. @@ -7,4 +7,6 @@ CMake Warning \(dev\) in CMakeLists.txt: name directly with add_custom_command, or use the generator expression \$, as appropriate. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa9dbc56a15aec71ac2eda7890efd0116797f373 commit fa9dbc56a15aec71ac2eda7890efd0116797f373 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:26 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmGeneratorTarget: Implement cmTargetPropertyComputer interface Populate a local member for the sources property when the instance is created. Pass the parameter to avoid the policy check when doing so. Ordinarily, the GetSources function should not be called unconditionally (at generate time), but we need to do so here in case the property is read in a generator expression. The intent is to be able to implement cmGeneratorTarget without requiring cmTarget. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index fb732a6..050fcb8 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -18,6 +18,7 @@ #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" +#include "cmTargetPropertyComputer.h" #include "cm_auto_ptr.hxx" #include "cmake.h" @@ -42,6 +43,28 @@ #define UNORDERED_SET std::set #endif +template <> +const char* cmTargetPropertyComputer::GetSources( + cmGeneratorTarget const* tgt, cmMessenger* /* messenger */, + cmListFileBacktrace const& /* context */) +{ + return tgt->GetSourcesProperty(); +} + +template <> +const char* cmTargetPropertyComputer::ComputeLocationForBuild< + cmGeneratorTarget>(cmGeneratorTarget const* tgt) +{ + return tgt->GetLocation(""); +} + +template <> +const char* cmTargetPropertyComputer::ComputeLocation( + cmGeneratorTarget const* tgt, const std::string& config) +{ + return tgt->GetLocation(config); +} + class cmGeneratorTarget::TargetPropertyEntry { static cmLinkImplItem NoLinkImplItem; @@ -320,6 +343,21 @@ cmGeneratorTarget::~cmGeneratorTarget() cmDeleteAll(this->LinkInformation); } +const char* cmGeneratorTarget::GetSourcesProperty() const +{ + std::vector values; + for (std::vector::const_iterator + it = this->SourceEntries.begin(), + end = this->SourceEntries.end(); + it != end; ++it) { + values.push_back((*it)->ge->GetInput()); + } + static std::string value; + value.clear(); + value = cmJoin(values, ""); + return value.c_str(); +} + cmGlobalGenerator* cmGeneratorTarget::GetGlobalGenerator() const { return this->GetLocalGenerator()->GetGlobalGenerator(); diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index bfbd790..15e46b8 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -532,6 +532,8 @@ public: std::string GetFortranModuleDirectory(std::string const& working_dir) const; + const char* GetSourcesProperty() const; + private: void AddSourceCommon(const std::string& src); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=848ae2a663ef83e059561d94b33d551154642231 commit 848ae2a663ef83e059561d94b33d551154642231 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:25 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTargetPropertyComputer: Template some methods on the Target Implement the methods for cmTarget in the cmTarget source. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 76a12d4..9b2043c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -35,6 +35,134 @@ #define UNORDERED_SET std::set #endif +template <> +const char* cmTargetPropertyComputer::ComputeLocationForBuild( + cmTarget const* tgt) +{ + static std::string loc; + if (tgt->IsImported()) { + loc = tgt->ImportedGetFullPath("", false); + return loc.c_str(); + } + + cmGlobalGenerator* gg = tgt->GetGlobalGenerator(); + if (!gg->GetConfigureDoneCMP0026()) { + gg->CreateGenerationObjects(); + } + cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); + loc = gt->GetLocationForBuild(); + return loc.c_str(); +} + +template <> +const char* cmTargetPropertyComputer::ComputeLocation( + cmTarget const* tgt, const std::string& config) +{ + static std::string loc; + if (tgt->IsImported()) { + loc = tgt->ImportedGetFullPath(config, false); + return loc.c_str(); + } + + cmGlobalGenerator* gg = tgt->GetGlobalGenerator(); + if (!gg->GetConfigureDoneCMP0026()) { + gg->CreateGenerationObjects(); + } + cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); + loc = gt->GetFullPath(config, false); + return loc.c_str(); +} + +template <> +const char* cmTargetPropertyComputer::GetSources( + cmTarget const* tgt, cmMessenger* messenger, + cmListFileBacktrace const& context) +{ + cmStringRange entries = tgt->GetSourceEntries(); + if (entries.empty()) { + return CM_NULLPTR; + } + + std::ostringstream ss; + const char* sep = ""; + for (std::vector::const_iterator i = entries.begin(); + i != entries.end(); ++i) { + std::string const& entry = *i; + + std::vector files; + cmSystemTools::ExpandListArgument(entry, files); + for (std::vector::const_iterator li = files.begin(); + li != files.end(); ++li) { + if (cmHasLiteralPrefix(*li, "$size() - 1] == '>') { + std::string objLibName = li->substr(17, li->size() - 18); + + if (cmGeneratorExpression::Find(objLibName) != std::string::npos) { + ss << sep; + sep = ";"; + ss << *li; + continue; + } + + bool addContent = false; + bool noMessage = true; + std::ostringstream e; + cmake::MessageType messageType = cmake::AUTHOR_WARNING; + switch (context.GetBottom().GetPolicy(cmPolicies::CMP0051)) { + case cmPolicies::WARN: + e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0051) << "\n"; + noMessage = false; + case cmPolicies::OLD: + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + addContent = true; + } + if (!noMessage) { + e << "Target \"" << tgt->GetName() + << "\" contains " + "$ generator expression in its sources " + "list. " + "This content was not previously part of the SOURCES " + "property " + "when that property was read at configure time. Code " + "reading " + "that property needs to be adapted to ignore the generator " + "expression using the string(GENEX_STRIP) command."; + messenger->IssueMessage(messageType, e.str(), context); + } + if (addContent) { + ss << sep; + sep = ";"; + ss << *li; + } + } else if (cmGeneratorExpression::Find(*li) == std::string::npos) { + ss << sep; + sep = ";"; + ss << *li; + } else { + cmSourceFile* sf = tgt->GetMakefile()->GetOrCreateSource(*li); + // Construct what is known about this source file location. + cmSourceFileLocation const& location = sf->GetLocation(); + std::string sname = location.GetDirectory(); + if (!sname.empty()) { + sname += "/"; + } + sname += location.GetName(); + + ss << sep; + sep = ";"; + // Append this list entry. + ss << sname; + } + } + } + static std::string srcs; + srcs = ss.str(); + return srcs.c_str(); +} + class cmTargetInternals { public: diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx index 3e39a8f..21408d1 100644 --- a/Source/cmTargetPropertyComputer.cxx +++ b/Source/cmTargetPropertyComputer.cxx @@ -9,7 +9,6 @@ #include "cmMessenger.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" -#include "cmSystemTools.h" #include "cmTarget.h" #if defined(CMake_HAVE_CXX_UNORDERED_SET) @@ -54,194 +53,6 @@ bool cmTargetPropertyComputer::HandleLocationPropertyPolicy( return messageType != cmake::FATAL_ERROR; } -const char* cmTargetPropertyComputer::ComputeLocationForBuild( - cmTarget const* tgt) -{ - static std::string loc; - if (tgt->IsImported()) { - loc = tgt->ImportedGetFullPath("", false); - return loc.c_str(); - } - - cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); - if (!gg->GetConfigureDoneCMP0026()) { - gg->CreateGenerationObjects(); - } - cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); - loc = gt->GetLocationForBuild(); - return loc.c_str(); -} - -const char* cmTargetPropertyComputer::ComputeLocation( - cmTarget const* tgt, std::string const& config) -{ - static std::string loc; - if (tgt->IsImported()) { - loc = tgt->ImportedGetFullPath(config, false); - return loc.c_str(); - } - - cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); - if (!gg->GetConfigureDoneCMP0026()) { - gg->CreateGenerationObjects(); - } - cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); - loc = gt->GetFullPath(config, false); - return loc.c_str(); -} - -const char* cmTargetPropertyComputer::GetProperty( - cmTarget const* tgt, const std::string& prop, cmMessenger* messenger, - cmListFileBacktrace const& context) -{ - if (const char* loc = GetLocation(tgt, prop, messenger, context)) { - return loc; - } - if (cmSystemTools::GetFatalErrorOccured()) { - return CM_NULLPTR; - } - if (prop == "SOURCES") { - return GetSources(tgt, messenger, context); - } - return CM_NULLPTR; -} - -const char* cmTargetPropertyComputer::GetLocation( - cmTarget const* tgt, const std::string& prop, cmMessenger* messenger, - cmListFileBacktrace const& context) -{ - // Watch for special "computed" properties that are dependent on - // other properties or variables. Always recompute them. - if (tgt->GetType() == cmState::EXECUTABLE || - tgt->GetType() == cmState::STATIC_LIBRARY || - tgt->GetType() == cmState::SHARED_LIBRARY || - tgt->GetType() == cmState::MODULE_LIBRARY || - tgt->GetType() == cmState::UNKNOWN_LIBRARY) { - static const std::string propLOCATION = "LOCATION"; - if (prop == propLOCATION) { - if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), messenger, context)) { - return CM_NULLPTR; - } - return ComputeLocationForBuild(tgt); - } - - // Support "LOCATION_". - else if (cmHasLiteralPrefix(prop, "LOCATION_")) { - if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), messenger, context)) { - return CM_NULLPTR; - } - const char* configName = prop.c_str() + 9; - return ComputeLocation(tgt, configName); - } - - // Support "_LOCATION". - else if (cmHasLiteralSuffix(prop, "_LOCATION") && - !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { - std::string configName(prop.c_str(), prop.size() - 9); - if (configName != "IMPORTED") { - if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), messenger, - context)) { - return CM_NULLPTR; - } - return ComputeLocation(tgt, configName); - } - } - } - return CM_NULLPTR; -} - -const char* cmTargetPropertyComputer::GetSources( - cmTarget const* tgt, cmMessenger* messenger, - cmListFileBacktrace const& context) -{ - cmStringRange entries = tgt->GetSourceEntries(); - if (entries.empty()) { - return CM_NULLPTR; - } - - std::ostringstream ss; - const char* sep = ""; - for (std::vector::const_iterator i = entries.begin(); - i != entries.end(); ++i) { - std::string const& entry = *i; - - std::vector files; - cmSystemTools::ExpandListArgument(entry, files); - for (std::vector::const_iterator li = files.begin(); - li != files.end(); ++li) { - if (cmHasLiteralPrefix(*li, "$size() - 1] == '>') { - std::string objLibName = li->substr(17, li->size() - 18); - - if (cmGeneratorExpression::Find(objLibName) != std::string::npos) { - ss << sep; - sep = ";"; - ss << *li; - continue; - } - - bool addContent = false; - bool noMessage = true; - std::ostringstream e; - cmake::MessageType messageType = cmake::AUTHOR_WARNING; - switch (context.GetBottom().GetPolicy(cmPolicies::CMP0051)) { - case cmPolicies::WARN: - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0051) << "\n"; - noMessage = false; - case cmPolicies::OLD: - break; - case cmPolicies::REQUIRED_ALWAYS: - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::NEW: - addContent = true; - } - if (!noMessage) { - e << "Target \"" << tgt->GetName() - << "\" contains " - "$ generator expression in its sources " - "list. " - "This content was not previously part of the SOURCES " - "property " - "when that property was read at configure time. Code " - "reading " - "that property needs to be adapted to ignore the generator " - "expression using the string(GENEX_STRIP) command."; - messenger->IssueMessage(messageType, e.str(), context); - } - if (addContent) { - ss << sep; - sep = ";"; - ss << *li; - } - } else if (cmGeneratorExpression::Find(*li) == std::string::npos) { - ss << sep; - sep = ";"; - ss << *li; - } else { - cmSourceFile* sf = tgt->GetMakefile()->GetOrCreateSource(*li); - // Construct what is known about this source file location. - cmSourceFileLocation const& location = sf->GetLocation(); - std::string sname = location.GetDirectory(); - if (!sname.empty()) { - sname += "/"; - } - sname += location.GetName(); - - ss << sep; - sep = ";"; - // Append this list entry. - ss << sname; - } - } - } - static std::string srcs; - srcs = ss.str(); - return srcs.c_str(); -} - bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( const std::string& prop) { diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index 941614b..ed9a4e2 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -6,6 +6,7 @@ #include // IWYU pragma: keep #include "cmListFileCache.h" +#include "cmSystemTools.h" #include #include @@ -16,12 +17,22 @@ class cmMessenger; class cmTargetPropertyComputer { public: - static const char* GetProperty(cmTarget const* tgt, const std::string& prop, + template + static const char* GetProperty(Target const* tgt, const std::string& prop, cmMessenger* messenger, - cmListFileBacktrace const& context); - - static std::map ComputeFileLocations( - cmTarget const* tgt); + cmListFileBacktrace const& context) + { + if (const char* loc = GetLocation(tgt, prop, messenger, context)) { + return loc; + } + if (cmSystemTools::GetFatalErrorOccured()) { + return CM_NULLPTR; + } + if (prop == "SOURCES") { + return GetSources(tgt, messenger, context); + } + return CM_NULLPTR; + } static bool WhiteListedInterfaceProperty(const std::string& prop); @@ -34,14 +45,65 @@ private: cmMessenger* messenger, cmListFileBacktrace const& context); - static const char* ComputeLocationForBuild(cmTarget const* tgt); - static const char* ComputeLocation(cmTarget const* tgt, + template + static const char* ComputeLocationForBuild(Target const* tgt); + template + static const char* ComputeLocation(Target const* tgt, std::string const& config); - static const char* GetLocation(cmTarget const* tgt, std::string const& prop, + + template + static const char* GetLocation(Target const* tgt, std::string const& prop, cmMessenger* messenger, - cmListFileBacktrace const& context); + cmListFileBacktrace const& context) + + { + // Watch for special "computed" properties that are dependent on + // other properties or variables. Always recompute them. + if (tgt->GetType() == cmState::EXECUTABLE || + tgt->GetType() == cmState::STATIC_LIBRARY || + tgt->GetType() == cmState::SHARED_LIBRARY || + tgt->GetType() == cmState::MODULE_LIBRARY || + tgt->GetType() == cmState::UNKNOWN_LIBRARY) { + static const std::string propLOCATION = "LOCATION"; + if (prop == propLOCATION) { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), messenger, + context)) { + return CM_NULLPTR; + } + return ComputeLocationForBuild(tgt); + } + + // Support "LOCATION_". + else if (cmHasLiteralPrefix(prop, "LOCATION_")) { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), messenger, + context)) { + return CM_NULLPTR; + } + const char* configName = prop.c_str() + 9; + return ComputeLocation(tgt, configName); + } + + // Support "_LOCATION". + else if (cmHasLiteralSuffix(prop, "_LOCATION") && + !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { + std::string configName(prop.c_str(), prop.size() - 9); + if (configName != "IMPORTED") { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), messenger, + context)) { + return CM_NULLPTR; + } + return ComputeLocation(tgt, configName); + } + } + } + return CM_NULLPTR; + } - static const char* GetSources(cmTarget const* tgt, cmMessenger* messenger, + template + static const char* GetSources(Target const* tgt, cmMessenger* messenger, cmListFileBacktrace const& context); }; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0a720e6a70133e361762101ce69a0b3f1ab244d commit a0a720e6a70133e361762101ce69a0b3f1ab244d Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:25 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cm{,Generator}Target: Add global generator accessors Provide 'static polymorphism' between the types in this aspect so that they can be used indiscriminately in a C++ template. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index d622ad9..fb732a6 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -320,6 +320,11 @@ cmGeneratorTarget::~cmGeneratorTarget() cmDeleteAll(this->LinkInformation); } +cmGlobalGenerator* cmGeneratorTarget::GetGlobalGenerator() const +{ + return this->GetLocalGenerator()->GetGlobalGenerator(); +} + cmLocalGenerator* cmGeneratorTarget::GetLocalGenerator() const { return this->LocalGenerator; diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 68ffd5c..bfbd790 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -32,6 +32,8 @@ public: cmLocalGenerator* GetLocalGenerator() const; + cmGlobalGenerator* GetGlobalGenerator() const; + bool IsImported() const; bool IsImportedGloballyVisible() const; const char* GetLocation(const std::string& config) const; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 52f1d04..76a12d4 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -272,6 +272,11 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, } } +cmGlobalGenerator* cmTarget::GetGlobalGenerator() const +{ + return this->GetMakefile()->GetGlobalGenerator(); +} + void cmTarget::AddUtility(const std::string& u, cmMakefile* makefile) { if (this->Utilities.insert(u).second && makefile) { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 84f43b3..2d259ed 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -30,6 +30,7 @@ class cmMakefile; class cmSourceFile; +class cmGlobalGenerator; class cmTargetInternals; class cmTargetInternalPointer @@ -76,6 +77,8 @@ public: */ cmState::TargetType GetType() const { return this->TargetTypeValue; } + cmGlobalGenerator* GetGlobalGenerator() const; + ///! Set/Get the name of the target const std::string& GetName() const { return this->Name; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=637e3f3ee131cf30f7337db06314f4a1af22c245 commit 637e3f3ee131cf30f7337db06314f4a1af22c245 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:24 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTargetPropertyComputer: Unify whitelist handling from cmTarget diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 3d16c50..52f1d04 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -709,13 +709,9 @@ cmBacktraceRange cmTarget::GetLinkImplementationBacktraces() const void cmTarget::SetProperty(const std::string& prop, const char* value) { - if (this->GetType() == cmState::INTERFACE_LIBRARY && - !cmTargetPropertyComputer::WhiteListedInterfaceProperty(prop)) { - std::ostringstream e; - e << "INTERFACE_LIBRARY targets may only have whitelisted properties. " - "The property \"" - << prop << "\" is not allowed."; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + if (!cmTargetPropertyComputer::PassesWhitelist( + this->GetType(), prop, this->Makefile->GetMessenger(), + this->Makefile->GetBacktrace())) { return; } if (prop == "NAME") { @@ -793,13 +789,9 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) void cmTarget::AppendProperty(const std::string& prop, const char* value, bool asString) { - if (this->GetType() == cmState::INTERFACE_LIBRARY && - !cmTargetPropertyComputer::WhiteListedInterfaceProperty(prop)) { - std::ostringstream e; - e << "INTERFACE_LIBRARY targets may only have whitelisted properties. " - "The property \"" - << prop << "\" is not allowed."; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + if (!cmTargetPropertyComputer::PassesWhitelist( + this->GetType(), prop, this->Makefile->GetMessenger(), + this->Makefile->GetBacktrace())) { return; } if (prop == "NAME") { @@ -1012,13 +1004,9 @@ const char* cmTarget::GetProperty(const std::string& prop) const const char* cmTarget::GetProperty(const std::string& prop, cmMakefile* context) const { - if (this->GetType() == cmState::INTERFACE_LIBRARY && - !cmTargetPropertyComputer::WhiteListedInterfaceProperty(prop)) { - std::ostringstream e; - e << "INTERFACE_LIBRARY targets may only have whitelisted properties. " - "The property \"" - << prop << "\" is not allowed."; - context->IssueMessage(cmake::FATAL_ERROR, e.str()); + if (!cmTargetPropertyComputer::PassesWhitelist(this->GetType(), prop, + context->GetMessenger(), + context->GetBacktrace())) { return CM_NULLPTR; } diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx index 18135fa..3e39a8f 100644 --- a/Source/cmTargetPropertyComputer.cxx +++ b/Source/cmTargetPropertyComputer.cxx @@ -270,3 +270,19 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( return false; } + +bool cmTargetPropertyComputer::PassesWhitelist( + cmState::TargetType tgtType, std::string const& prop, cmMessenger* messenger, + cmListFileBacktrace const& context) +{ + if (tgtType == cmState::INTERFACE_LIBRARY && + !WhiteListedInterfaceProperty(prop)) { + std::ostringstream e; + e << "INTERFACE_LIBRARY targets may only have whitelisted properties. " + "The property \"" + << prop << "\" is not allowed."; + messenger->IssueMessage(cmake::FATAL_ERROR, e.str(), context); + return false; + } + return true; +} diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index 1d2e4ed..941614b 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -25,6 +25,10 @@ public: static bool WhiteListedInterfaceProperty(const std::string& prop); + static bool PassesWhitelist(cmState::TargetType tgtType, + std::string const& prop, cmMessenger* messenger, + cmListFileBacktrace const& context); + private: static bool HandleLocationPropertyPolicy(std::string const& tgtName, cmMessenger* messenger, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05251e6d80b03ae14d6a89765f14c2eb10979bd4 commit 05251e6d80b03ae14d6a89765f14c2eb10979bd4 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:24 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTargetPropertyComputer: Move whitelist check from cmTarget diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 63a6fe9..3d16c50 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -707,38 +707,10 @@ cmBacktraceRange cmTarget::GetLinkImplementationBacktraces() const return cmMakeRange(this->Internal->LinkImplementationPropertyBacktraces); } -static bool whiteListedInterfaceProperty(const std::string& prop) -{ - if (cmHasLiteralPrefix(prop, "INTERFACE_")) { - return true; - } - static UNORDERED_SET builtIns; - if (builtIns.empty()) { - builtIns.insert("COMPATIBLE_INTERFACE_BOOL"); - builtIns.insert("COMPATIBLE_INTERFACE_NUMBER_MAX"); - builtIns.insert("COMPATIBLE_INTERFACE_NUMBER_MIN"); - builtIns.insert("COMPATIBLE_INTERFACE_STRING"); - builtIns.insert("EXPORT_NAME"); - builtIns.insert("IMPORTED"); - builtIns.insert("NAME"); - builtIns.insert("TYPE"); - } - - if (builtIns.count(prop)) { - return true; - } - - if (cmHasLiteralPrefix(prop, "MAP_IMPORTED_CONFIG_")) { - return true; - } - - return false; -} - void cmTarget::SetProperty(const std::string& prop, const char* value) { if (this->GetType() == cmState::INTERFACE_LIBRARY && - !whiteListedInterfaceProperty(prop)) { + !cmTargetPropertyComputer::WhiteListedInterfaceProperty(prop)) { std::ostringstream e; e << "INTERFACE_LIBRARY targets may only have whitelisted properties. " "The property \"" @@ -822,7 +794,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, bool asString) { if (this->GetType() == cmState::INTERFACE_LIBRARY && - !whiteListedInterfaceProperty(prop)) { + !cmTargetPropertyComputer::WhiteListedInterfaceProperty(prop)) { std::ostringstream e; e << "INTERFACE_LIBRARY targets may only have whitelisted properties. " "The property \"" @@ -1041,7 +1013,7 @@ const char* cmTarget::GetProperty(const std::string& prop, cmMakefile* context) const { if (this->GetType() == cmState::INTERFACE_LIBRARY && - !whiteListedInterfaceProperty(prop)) { + !cmTargetPropertyComputer::WhiteListedInterfaceProperty(prop)) { std::ostringstream e; e << "INTERFACE_LIBRARY targets may only have whitelisted properties. " "The property \"" diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx index f15cb43..18135fa 100644 --- a/Source/cmTargetPropertyComputer.cxx +++ b/Source/cmTargetPropertyComputer.cxx @@ -154,7 +154,7 @@ const char* cmTargetPropertyComputer::GetLocation( } const char* cmTargetPropertyComputer::GetSources( - cmTarget const* tgt,cmMessenger* messenger, + cmTarget const* tgt, cmMessenger* messenger, cmListFileBacktrace const& context) { cmStringRange entries = tgt->GetSourceEntries(); @@ -241,3 +241,32 @@ const char* cmTargetPropertyComputer::GetSources( srcs = ss.str(); return srcs.c_str(); } + +bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( + const std::string& prop) +{ + if (cmHasLiteralPrefix(prop, "INTERFACE_")) { + return true; + } + static UNORDERED_SET builtIns; + if (builtIns.empty()) { + builtIns.insert("COMPATIBLE_INTERFACE_BOOL"); + builtIns.insert("COMPATIBLE_INTERFACE_NUMBER_MAX"); + builtIns.insert("COMPATIBLE_INTERFACE_NUMBER_MIN"); + builtIns.insert("COMPATIBLE_INTERFACE_STRING"); + builtIns.insert("EXPORT_NAME"); + builtIns.insert("IMPORTED"); + builtIns.insert("NAME"); + builtIns.insert("TYPE"); + } + + if (builtIns.count(prop)) { + return true; + } + + if (cmHasLiteralPrefix(prop, "MAP_IMPORTED_CONFIG_")) { + return true; + } + + return false; +} diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index b7c1df4..1d2e4ed 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -23,6 +23,8 @@ public: static std::map ComputeFileLocations( cmTarget const* tgt); + static bool WhiteListedInterfaceProperty(const std::string& prop); + private: static bool HandleLocationPropertyPolicy(std::string const& tgtName, cmMessenger* messenger, @@ -35,9 +37,8 @@ private: cmMessenger* messenger, cmListFileBacktrace const& context); - static const char* GetSources(cmTarget const* tgt, - cmMessenger* messenger, - cmListFileBacktrace const& context); + static const char* GetSources(cmTarget const* tgt, cmMessenger* messenger, + cmListFileBacktrace const& context); }; #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fbf1721c94b40ea86eeb183a1916f2066eb64bdc commit fbf1721c94b40ea86eeb183a1916f2066eb64bdc Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:24 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTargetPropertyComputer: Extract into new files diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 048667a..c9e77c3 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -362,6 +362,8 @@ set(SRCS cmSystemTools.h cmTarget.cxx cmTarget.h + cmTargetPropertyComputer.cxx + cmTargetPropertyComputer.h cmTargetExport.h cmTest.cxx cmTest.h diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 27ea157..63a6fe9 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -14,6 +14,7 @@ #include "cmSourceFile.h" #include "cmSourceFileLocation.h" #include "cmSystemTools.h" +#include "cmTargetPropertyComputer.h" #include "cmake.h" #include @@ -1031,251 +1032,6 @@ void cmTarget::CheckProperty(const std::string& prop, } } -class cmTargetPropertyComputer -{ -public: - static const char* GetProperty(cmTarget const* tgt, const std::string& prop, - cmMessenger* messenger, - cmListFileBacktrace const& context); - -private: - static bool HandleLocationPropertyPolicy(std::string const& tgtName, - cmMessenger* messenger, - cmListFileBacktrace const& context); - - static const char* ComputeLocationForBuild(cmTarget const* tgt); - static const char* ComputeLocation(cmTarget const* tgt, - std::string const& config); - static const char* GetLocation(cmTarget const* tgt, - std::string const& config, - cmMessenger* messenger, - cmListFileBacktrace const& context); - - static const char* GetSources(cmTarget const* tgt, cmMessenger* messenger, - cmListFileBacktrace const& context); -}; - -bool cmTargetPropertyComputer::HandleLocationPropertyPolicy( - std::string const& tgtName, cmMessenger* messenger, - cmListFileBacktrace const& context) -{ - std::ostringstream e; - const char* modal = CM_NULLPTR; - cmake::MessageType messageType = cmake::AUTHOR_WARNING; - switch (context.GetBottom().GetPolicy(cmPolicies::CMP0026)) { - case cmPolicies::WARN: - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0026) << "\n"; - modal = "should"; - case cmPolicies::OLD: - break; - case cmPolicies::REQUIRED_ALWAYS: - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::NEW: - modal = "may"; - messageType = cmake::FATAL_ERROR; - } - - if (modal) { - e << "The LOCATION property " << modal << " not be read from target \"" - << tgtName - << "\". Use the target name directly with " - "add_custom_command, or use the generator expression $, " - "as appropriate.\n"; - messenger->IssueMessage(messageType, e.str(), context); - } - - return messageType != cmake::FATAL_ERROR; -} - -const char* cmTargetPropertyComputer::ComputeLocationForBuild( - cmTarget const* tgt) -{ - static std::string loc; - if (tgt->IsImported()) { - loc = tgt->ImportedGetFullPath("", false); - return loc.c_str(); - } - - cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); - if (!gg->GetConfigureDoneCMP0026()) { - gg->CreateGenerationObjects(); - } - cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); - loc = gt->GetLocationForBuild(); - return loc.c_str(); -} - -const char* cmTargetPropertyComputer::ComputeLocation( - cmTarget const* tgt, std::string const& config) -{ - static std::string loc; - if (tgt->IsImported()) { - loc = tgt->ImportedGetFullPath(config, false); - return loc.c_str(); - } - - cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); - if (!gg->GetConfigureDoneCMP0026()) { - gg->CreateGenerationObjects(); - } - cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); - loc = gt->GetFullPath(config, false); - return loc.c_str(); -} - -const char* cmTargetPropertyComputer::GetLocation( - cmTarget const* tgt, const std::string& prop, cmMessenger* messenger, - cmListFileBacktrace const& context) -{ - // Watch for special "computed" properties that are dependent on - // other properties or variables. Always recompute them. - if (tgt->GetType() == cmState::EXECUTABLE || - tgt->GetType() == cmState::STATIC_LIBRARY || - tgt->GetType() == cmState::SHARED_LIBRARY || - tgt->GetType() == cmState::MODULE_LIBRARY || - tgt->GetType() == cmState::UNKNOWN_LIBRARY) { - static const std::string propLOCATION = "LOCATION"; - if (prop == propLOCATION) { - if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), messenger, context)) { - return CM_NULLPTR; - } - return ComputeLocationForBuild(tgt); - } - - // Support "LOCATION_". - else if (cmHasLiteralPrefix(prop, "LOCATION_")) { - if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), messenger, context)) { - return CM_NULLPTR; - } - const char* configName = prop.c_str() + 9; - return ComputeLocation(tgt, configName); - } - - // Support "_LOCATION". - else if (cmHasLiteralSuffix(prop, "_LOCATION") && - !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { - std::string configName(prop.c_str(), prop.size() - 9); - if (configName != "IMPORTED") { - if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), messenger, - context)) { - return CM_NULLPTR; - } - return ComputeLocation(tgt, configName); - } - } - } - return CM_NULLPTR; -} - -const char* cmTargetPropertyComputer::GetSources( - cmTarget const* tgt, cmMessenger* messenger, - cmListFileBacktrace const& context) -{ - cmStringRange entries = tgt->GetSourceEntries(); - - if (entries.empty()) { - return CM_NULLPTR; - } - - std::ostringstream ss; - const char* sep = ""; - for (std::vector::const_iterator i = entries.begin(); - i != entries.end(); ++i) { - std::string const& entry = *i; - - std::vector files; - cmSystemTools::ExpandListArgument(entry, files); - for (std::vector::const_iterator li = files.begin(); - li != files.end(); ++li) { - if (cmHasLiteralPrefix(*li, "$size() - 1] == '>') { - std::string objLibName = li->substr(17, li->size() - 18); - - if (cmGeneratorExpression::Find(objLibName) != std::string::npos) { - ss << sep; - sep = ";"; - ss << *li; - continue; - } - - bool addContent = false; - bool noMessage = true; - std::ostringstream e; - cmake::MessageType messageType = cmake::AUTHOR_WARNING; - switch (context.GetBottom().GetPolicy(cmPolicies::CMP0051)) { - case cmPolicies::WARN: - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0051) << "\n"; - noMessage = false; - case cmPolicies::OLD: - break; - case cmPolicies::REQUIRED_ALWAYS: - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::NEW: - addContent = true; - } - if (!noMessage) { - e << "Target \"" << tgt->GetName() - << "\" contains " - "$ generator expression in its sources " - "list. " - "This content was not previously part of the SOURCES " - "property " - "when that property was read at configure time. Code " - "reading " - "that property needs to be adapted to ignore the generator " - "expression using the string(GENEX_STRIP) command."; - messenger->IssueMessage(messageType, e.str(), context); - } - if (addContent) { - ss << sep; - sep = ";"; - ss << *li; - } - } else if (cmGeneratorExpression::Find(*li) == std::string::npos) { - ss << sep; - sep = ";"; - ss << *li; - } else { - cmSourceFile* sf = tgt->GetMakefile()->GetOrCreateSource(*li); - // Construct what is known about this source file location. - cmSourceFileLocation const& location = sf->GetLocation(); - std::string sname = location.GetDirectory(); - if (!sname.empty()) { - sname += "/"; - } - sname += location.GetName(); - - ss << sep; - sep = ";"; - // Append this list entry. - ss << sname; - } - } - } - static std::string srcs; - srcs = ss.str(); - return srcs.c_str(); -} - -const char* cmTargetPropertyComputer::GetProperty( - cmTarget const* tgt, const std::string& prop, cmMessenger* messenger, - cmListFileBacktrace const& context) -{ - if (const char* loc = GetLocation(tgt, prop, messenger, context)) { - return loc; - } - if (cmSystemTools::GetFatalErrorOccured()) { - return CM_NULLPTR; - } - if (prop == "SOURCES") { - return GetSources(tgt, messenger, context); - } - return CM_NULLPTR; -} - const char* cmTarget::GetProperty(const std::string& prop) const { return this->GetProperty(prop, this->Makefile); diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx new file mode 100644 index 0000000..f15cb43 --- /dev/null +++ b/Source/cmTargetPropertyComputer.cxx @@ -0,0 +1,243 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmTargetPropertyComputer.h" + +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmMessenger.h" +#include "cmSourceFile.h" +#include "cmSourceFileLocation.h" +#include "cmSystemTools.h" +#include "cmTarget.h" + +#if defined(CMake_HAVE_CXX_UNORDERED_SET) +#include +#define UNORDERED_SET std::unordered_set +#elif defined(CMAKE_BUILD_WITH_CMAKE) +#include +#define UNORDERED_SET cmsys::hash_set +#else +#define UNORDERED_SET std::set +#endif + +bool cmTargetPropertyComputer::HandleLocationPropertyPolicy( + std::string const& tgtName, cmMessenger* messenger, + cmListFileBacktrace const& context) +{ + std::ostringstream e; + const char* modal = CM_NULLPTR; + cmake::MessageType messageType = cmake::AUTHOR_WARNING; + switch (context.GetBottom().GetPolicy(cmPolicies::CMP0026)) { + case cmPolicies::WARN: + e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0026) << "\n"; + modal = "should"; + case cmPolicies::OLD: + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + modal = "may"; + messageType = cmake::FATAL_ERROR; + } + + if (modal) { + e << "The LOCATION property " << modal << " not be read from target \"" + << tgtName + << "\". Use the target name directly with " + "add_custom_command, or use the generator expression $, " + "as appropriate.\n"; + messenger->IssueMessage(messageType, e.str(), context); + } + + return messageType != cmake::FATAL_ERROR; +} + +const char* cmTargetPropertyComputer::ComputeLocationForBuild( + cmTarget const* tgt) +{ + static std::string loc; + if (tgt->IsImported()) { + loc = tgt->ImportedGetFullPath("", false); + return loc.c_str(); + } + + cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); + if (!gg->GetConfigureDoneCMP0026()) { + gg->CreateGenerationObjects(); + } + cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); + loc = gt->GetLocationForBuild(); + return loc.c_str(); +} + +const char* cmTargetPropertyComputer::ComputeLocation( + cmTarget const* tgt, std::string const& config) +{ + static std::string loc; + if (tgt->IsImported()) { + loc = tgt->ImportedGetFullPath(config, false); + return loc.c_str(); + } + + cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); + if (!gg->GetConfigureDoneCMP0026()) { + gg->CreateGenerationObjects(); + } + cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); + loc = gt->GetFullPath(config, false); + return loc.c_str(); +} + +const char* cmTargetPropertyComputer::GetProperty( + cmTarget const* tgt, const std::string& prop, cmMessenger* messenger, + cmListFileBacktrace const& context) +{ + if (const char* loc = GetLocation(tgt, prop, messenger, context)) { + return loc; + } + if (cmSystemTools::GetFatalErrorOccured()) { + return CM_NULLPTR; + } + if (prop == "SOURCES") { + return GetSources(tgt, messenger, context); + } + return CM_NULLPTR; +} + +const char* cmTargetPropertyComputer::GetLocation( + cmTarget const* tgt, const std::string& prop, cmMessenger* messenger, + cmListFileBacktrace const& context) +{ + // Watch for special "computed" properties that are dependent on + // other properties or variables. Always recompute them. + if (tgt->GetType() == cmState::EXECUTABLE || + tgt->GetType() == cmState::STATIC_LIBRARY || + tgt->GetType() == cmState::SHARED_LIBRARY || + tgt->GetType() == cmState::MODULE_LIBRARY || + tgt->GetType() == cmState::UNKNOWN_LIBRARY) { + static const std::string propLOCATION = "LOCATION"; + if (prop == propLOCATION) { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), messenger, context)) { + return CM_NULLPTR; + } + return ComputeLocationForBuild(tgt); + } + + // Support "LOCATION_". + else if (cmHasLiteralPrefix(prop, "LOCATION_")) { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), messenger, context)) { + return CM_NULLPTR; + } + const char* configName = prop.c_str() + 9; + return ComputeLocation(tgt, configName); + } + + // Support "_LOCATION". + else if (cmHasLiteralSuffix(prop, "_LOCATION") && + !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { + std::string configName(prop.c_str(), prop.size() - 9); + if (configName != "IMPORTED") { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), messenger, + context)) { + return CM_NULLPTR; + } + return ComputeLocation(tgt, configName); + } + } + } + return CM_NULLPTR; +} + +const char* cmTargetPropertyComputer::GetSources( + cmTarget const* tgt,cmMessenger* messenger, + cmListFileBacktrace const& context) +{ + cmStringRange entries = tgt->GetSourceEntries(); + if (entries.empty()) { + return CM_NULLPTR; + } + + std::ostringstream ss; + const char* sep = ""; + for (std::vector::const_iterator i = entries.begin(); + i != entries.end(); ++i) { + std::string const& entry = *i; + + std::vector files; + cmSystemTools::ExpandListArgument(entry, files); + for (std::vector::const_iterator li = files.begin(); + li != files.end(); ++li) { + if (cmHasLiteralPrefix(*li, "$size() - 1] == '>') { + std::string objLibName = li->substr(17, li->size() - 18); + + if (cmGeneratorExpression::Find(objLibName) != std::string::npos) { + ss << sep; + sep = ";"; + ss << *li; + continue; + } + + bool addContent = false; + bool noMessage = true; + std::ostringstream e; + cmake::MessageType messageType = cmake::AUTHOR_WARNING; + switch (context.GetBottom().GetPolicy(cmPolicies::CMP0051)) { + case cmPolicies::WARN: + e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0051) << "\n"; + noMessage = false; + case cmPolicies::OLD: + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + addContent = true; + } + if (!noMessage) { + e << "Target \"" << tgt->GetName() + << "\" contains " + "$ generator expression in its sources " + "list. " + "This content was not previously part of the SOURCES " + "property " + "when that property was read at configure time. Code " + "reading " + "that property needs to be adapted to ignore the generator " + "expression using the string(GENEX_STRIP) command."; + messenger->IssueMessage(messageType, e.str(), context); + } + if (addContent) { + ss << sep; + sep = ";"; + ss << *li; + } + } else if (cmGeneratorExpression::Find(*li) == std::string::npos) { + ss << sep; + sep = ";"; + ss << *li; + } else { + cmSourceFile* sf = tgt->GetMakefile()->GetOrCreateSource(*li); + // Construct what is known about this source file location. + cmSourceFileLocation const& location = sf->GetLocation(); + std::string sname = location.GetDirectory(); + if (!sname.empty()) { + sname += "/"; + } + sname += location.GetName(); + + ss << sep; + sep = ";"; + // Append this list entry. + ss << sname; + } + } + } + static std::string srcs; + srcs = ss.str(); + return srcs.c_str(); +} diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h new file mode 100644 index 0000000..b7c1df4 --- /dev/null +++ b/Source/cmTargetPropertyComputer.h @@ -0,0 +1,43 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cmTargetPropertyComputer_h +#define cmTargetPropertyComputer_h + +#include // IWYU pragma: keep + +#include "cmListFileCache.h" + +#include +#include + +class cmTarget; +class cmMessenger; + +class cmTargetPropertyComputer +{ +public: + static const char* GetProperty(cmTarget const* tgt, const std::string& prop, + cmMessenger* messenger, + cmListFileBacktrace const& context); + + static std::map ComputeFileLocations( + cmTarget const* tgt); + +private: + static bool HandleLocationPropertyPolicy(std::string const& tgtName, + cmMessenger* messenger, + cmListFileBacktrace const& context); + + static const char* ComputeLocationForBuild(cmTarget const* tgt); + static const char* ComputeLocation(cmTarget const* tgt, + std::string const& config); + static const char* GetLocation(cmTarget const* tgt, std::string const& prop, + cmMessenger* messenger, + cmListFileBacktrace const& context); + + static const char* GetSources(cmTarget const* tgt, + cmMessenger* messenger, + cmListFileBacktrace const& context); +}; + +#endif diff --git a/bootstrap b/bootstrap index fb8b1eb..15963c0 100755 --- a/bootstrap +++ b/bootstrap @@ -310,6 +310,7 @@ CMAKE_CXX_SOURCES="\ cmBootstrapCommands2 \ cmCommandsForBootstrap \ cmTarget \ + cmTargetPropertyComputer \ cmTest \ cmCustomCommand \ cmCustomCommandGenerator \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=390a7d8647c13570dc6416fceb884dc51c8ef6f9 commit 390a7d8647c13570dc6416fceb884dc51c8ef6f9 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:24 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTargetPropertyComputer: Implement GetProperty without cmMakefile Only a cmMessenger and a backtrace are needed. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c9aabb8..27ea157 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -8,6 +8,7 @@ #include "cmGlobalGenerator.h" #include "cmListFileCache.h" #include "cmMakefile.h" +#include "cmMessenger.h" #include "cmOutputConverter.h" #include "cmProperty.h" #include "cmSourceFile.h" @@ -1034,29 +1035,34 @@ class cmTargetPropertyComputer { public: static const char* GetProperty(cmTarget const* tgt, const std::string& prop, - cmMakefile* context); + cmMessenger* messenger, + cmListFileBacktrace const& context); private: static bool HandleLocationPropertyPolicy(std::string const& tgtName, - cmMakefile* context); + cmMessenger* messenger, + cmListFileBacktrace const& context); static const char* ComputeLocationForBuild(cmTarget const* tgt); static const char* ComputeLocation(cmTarget const* tgt, std::string const& config); static const char* GetLocation(cmTarget const* tgt, std::string const& config, - cmMakefile* context); + cmMessenger* messenger, + cmListFileBacktrace const& context); - static const char* GetSources(cmTarget const* tgt, cmMakefile* context); + static const char* GetSources(cmTarget const* tgt, cmMessenger* messenger, + cmListFileBacktrace const& context); }; bool cmTargetPropertyComputer::HandleLocationPropertyPolicy( - std::string const& tgtName, cmMakefile* context) + std::string const& tgtName, cmMessenger* messenger, + cmListFileBacktrace const& context) { std::ostringstream e; const char* modal = CM_NULLPTR; cmake::MessageType messageType = cmake::AUTHOR_WARNING; - switch (context->GetPolicyStatus(cmPolicies::CMP0026)) { + switch (context.GetBottom().GetPolicy(cmPolicies::CMP0026)) { case cmPolicies::WARN: e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0026) << "\n"; modal = "should"; @@ -1075,7 +1081,7 @@ bool cmTargetPropertyComputer::HandleLocationPropertyPolicy( << "\". Use the target name directly with " "add_custom_command, or use the generator expression $, " "as appropriate.\n"; - context->IssueMessage(messageType, e.str()); + messenger->IssueMessage(messageType, e.str(), context); } return messageType != cmake::FATAL_ERROR; @@ -1117,9 +1123,9 @@ const char* cmTargetPropertyComputer::ComputeLocation( return loc.c_str(); } -const char* cmTargetPropertyComputer::GetLocation(cmTarget const* tgt, - const std::string& prop, - cmMakefile* context) +const char* cmTargetPropertyComputer::GetLocation( + cmTarget const* tgt, const std::string& prop, cmMessenger* messenger, + cmListFileBacktrace const& context) { // Watch for special "computed" properties that are dependent on // other properties or variables. Always recompute them. @@ -1131,7 +1137,7 @@ const char* cmTargetPropertyComputer::GetLocation(cmTarget const* tgt, static const std::string propLOCATION = "LOCATION"; if (prop == propLOCATION) { if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), context)) { + !HandleLocationPropertyPolicy(tgt->GetName(), messenger, context)) { return CM_NULLPTR; } return ComputeLocationForBuild(tgt); @@ -1140,7 +1146,7 @@ const char* cmTargetPropertyComputer::GetLocation(cmTarget const* tgt, // Support "LOCATION_". else if (cmHasLiteralPrefix(prop, "LOCATION_")) { if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), context)) { + !HandleLocationPropertyPolicy(tgt->GetName(), messenger, context)) { return CM_NULLPTR; } const char* configName = prop.c_str() + 9; @@ -1153,7 +1159,8 @@ const char* cmTargetPropertyComputer::GetLocation(cmTarget const* tgt, std::string configName(prop.c_str(), prop.size() - 9); if (configName != "IMPORTED") { if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), context)) { + !HandleLocationPropertyPolicy(tgt->GetName(), messenger, + context)) { return CM_NULLPTR; } return ComputeLocation(tgt, configName); @@ -1163,8 +1170,9 @@ const char* cmTargetPropertyComputer::GetLocation(cmTarget const* tgt, return CM_NULLPTR; } -const char* cmTargetPropertyComputer::GetSources(cmTarget const* tgt, - cmMakefile* context) +const char* cmTargetPropertyComputer::GetSources( + cmTarget const* tgt, cmMessenger* messenger, + cmListFileBacktrace const& context) { cmStringRange entries = tgt->GetSourceEntries(); @@ -1197,7 +1205,7 @@ const char* cmTargetPropertyComputer::GetSources(cmTarget const* tgt, bool noMessage = true; std::ostringstream e; cmake::MessageType messageType = cmake::AUTHOR_WARNING; - switch (context->GetPolicyStatus(cmPolicies::CMP0051)) { + switch (context.GetBottom().GetPolicy(cmPolicies::CMP0051)) { case cmPolicies::WARN: e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0051) << "\n"; noMessage = false; @@ -1219,7 +1227,7 @@ const char* cmTargetPropertyComputer::GetSources(cmTarget const* tgt, "reading " "that property needs to be adapted to ignore the generator " "expression using the string(GENEX_STRIP) command."; - context->IssueMessage(messageType, e.str()); + messenger->IssueMessage(messageType, e.str(), context); } if (addContent) { ss << sep; @@ -1252,18 +1260,18 @@ const char* cmTargetPropertyComputer::GetSources(cmTarget const* tgt, return srcs.c_str(); } -const char* cmTargetPropertyComputer::GetProperty(cmTarget const* tgt, - const std::string& prop, - cmMakefile* context) +const char* cmTargetPropertyComputer::GetProperty( + cmTarget const* tgt, const std::string& prop, cmMessenger* messenger, + cmListFileBacktrace const& context) { - if (const char* loc = GetLocation(tgt, prop, context)) { + if (const char* loc = GetLocation(tgt, prop, messenger, context)) { return loc; } if (cmSystemTools::GetFatalErrorOccured()) { return CM_NULLPTR; } if (prop == "SOURCES") { - return GetSources(tgt, context); + return GetSources(tgt, messenger, context); } return CM_NULLPTR; } @@ -1286,8 +1294,8 @@ const char* cmTarget::GetProperty(const std::string& prop, return CM_NULLPTR; } - if (const char* result = - cmTargetPropertyComputer::GetProperty(this, prop, context)) { + if (const char* result = cmTargetPropertyComputer::GetProperty( + this, prop, context->GetMessenger(), context->GetBacktrace())) { return result; } if (cmSystemTools::GetFatalErrorOccured()) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e32a6bdd990571bafb8537110128d28a593150b7 commit e32a6bdd990571bafb8537110128d28a593150b7 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:24 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmListFileBacktrace: Add a method to retrieve the Bottom of a snapshot diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 4dacee0..fd779c7 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -120,6 +120,8 @@ public: cmListFileBacktrace& operator=(cmListFileBacktrace const& r); ~cmListFileBacktrace(); + cmState::Snapshot GetBottom() const { return this->Bottom; } + // Get a backtrace with the given file scope added to the top. // May not be called until after construction with a valid snapshot. cmListFileBacktrace Push(std::string const& file) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7863fba1f6f37db2f75834d0d6a3fbbc680e731c commit 7863fba1f6f37db2f75834d0d6a3fbbc680e731c Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:24 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTarget: Extract GetLocation method diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f39cd4b..c9aabb8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1043,6 +1043,9 @@ private: static const char* ComputeLocationForBuild(cmTarget const* tgt); static const char* ComputeLocation(cmTarget const* tgt, std::string const& config); + static const char* GetLocation(cmTarget const* tgt, + std::string const& config, + cmMakefile* context); static const char* GetSources(cmTarget const* tgt, cmMakefile* context); }; @@ -1114,6 +1117,52 @@ const char* cmTargetPropertyComputer::ComputeLocation( return loc.c_str(); } +const char* cmTargetPropertyComputer::GetLocation(cmTarget const* tgt, + const std::string& prop, + cmMakefile* context) +{ + // Watch for special "computed" properties that are dependent on + // other properties or variables. Always recompute them. + if (tgt->GetType() == cmState::EXECUTABLE || + tgt->GetType() == cmState::STATIC_LIBRARY || + tgt->GetType() == cmState::SHARED_LIBRARY || + tgt->GetType() == cmState::MODULE_LIBRARY || + tgt->GetType() == cmState::UNKNOWN_LIBRARY) { + static const std::string propLOCATION = "LOCATION"; + if (prop == propLOCATION) { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), context)) { + return CM_NULLPTR; + } + return ComputeLocationForBuild(tgt); + } + + // Support "LOCATION_". + else if (cmHasLiteralPrefix(prop, "LOCATION_")) { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), context)) { + return CM_NULLPTR; + } + const char* configName = prop.c_str() + 9; + return ComputeLocation(tgt, configName); + } + + // Support "_LOCATION". + else if (cmHasLiteralSuffix(prop, "_LOCATION") && + !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { + std::string configName(prop.c_str(), prop.size() - 9); + if (configName != "IMPORTED") { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), context)) { + return CM_NULLPTR; + } + return ComputeLocation(tgt, configName); + } + } + } + return CM_NULLPTR; +} + const char* cmTargetPropertyComputer::GetSources(cmTarget const* tgt, cmMakefile* context) { @@ -1207,44 +1256,11 @@ const char* cmTargetPropertyComputer::GetProperty(cmTarget const* tgt, const std::string& prop, cmMakefile* context) { - // Watch for special "computed" properties that are dependent on - // other properties or variables. Always recompute them. - if (tgt->GetType() == cmState::EXECUTABLE || - tgt->GetType() == cmState::STATIC_LIBRARY || - tgt->GetType() == cmState::SHARED_LIBRARY || - tgt->GetType() == cmState::MODULE_LIBRARY || - tgt->GetType() == cmState::UNKNOWN_LIBRARY) { - static const std::string propLOCATION = "LOCATION"; - if (prop == propLOCATION) { - if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), context)) { - return CM_NULLPTR; - } - return ComputeLocationForBuild(tgt); - } - - // Support "LOCATION_". - else if (cmHasLiteralPrefix(prop, "LOCATION_")) { - if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), context)) { - return CM_NULLPTR; - } - const char* configName = prop.c_str() + 9; - return ComputeLocation(tgt, configName); - } - - // Support "_LOCATION". - else if (cmHasLiteralSuffix(prop, "_LOCATION") && - !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { - std::string configName(prop.c_str(), prop.size() - 9); - if (configName != "IMPORTED") { - if (!tgt->IsImported() && - !HandleLocationPropertyPolicy(tgt->GetName(), context)) { - return CM_NULLPTR; - } - return ComputeLocation(tgt, configName); - } - } + if (const char* loc = GetLocation(tgt, prop, context)) { + return loc; + } + if (cmSystemTools::GetFatalErrorOccured()) { + return CM_NULLPTR; } if (prop == "SOURCES") { return GetSources(tgt, context); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8096682e4edb542a48bbf66c085911db5f00be02 commit 8096682e4edb542a48bbf66c085911db5f00be02 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:23 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTarget: Extract GetSources method diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 0913725..f39cd4b 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1043,6 +1043,8 @@ private: static const char* ComputeLocationForBuild(cmTarget const* tgt); static const char* ComputeLocation(cmTarget const* tgt, std::string const& config); + + static const char* GetSources(cmTarget const* tgt, cmMakefile* context); }; bool cmTargetPropertyComputer::HandleLocationPropertyPolicy( @@ -1112,6 +1114,95 @@ const char* cmTargetPropertyComputer::ComputeLocation( return loc.c_str(); } +const char* cmTargetPropertyComputer::GetSources(cmTarget const* tgt, + cmMakefile* context) +{ + cmStringRange entries = tgt->GetSourceEntries(); + + if (entries.empty()) { + return CM_NULLPTR; + } + + std::ostringstream ss; + const char* sep = ""; + for (std::vector::const_iterator i = entries.begin(); + i != entries.end(); ++i) { + std::string const& entry = *i; + + std::vector files; + cmSystemTools::ExpandListArgument(entry, files); + for (std::vector::const_iterator li = files.begin(); + li != files.end(); ++li) { + if (cmHasLiteralPrefix(*li, "$size() - 1] == '>') { + std::string objLibName = li->substr(17, li->size() - 18); + + if (cmGeneratorExpression::Find(objLibName) != std::string::npos) { + ss << sep; + sep = ";"; + ss << *li; + continue; + } + + bool addContent = false; + bool noMessage = true; + std::ostringstream e; + cmake::MessageType messageType = cmake::AUTHOR_WARNING; + switch (context->GetPolicyStatus(cmPolicies::CMP0051)) { + case cmPolicies::WARN: + e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0051) << "\n"; + noMessage = false; + case cmPolicies::OLD: + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + addContent = true; + } + if (!noMessage) { + e << "Target \"" << tgt->GetName() + << "\" contains " + "$ generator expression in its sources " + "list. " + "This content was not previously part of the SOURCES " + "property " + "when that property was read at configure time. Code " + "reading " + "that property needs to be adapted to ignore the generator " + "expression using the string(GENEX_STRIP) command."; + context->IssueMessage(messageType, e.str()); + } + if (addContent) { + ss << sep; + sep = ";"; + ss << *li; + } + } else if (cmGeneratorExpression::Find(*li) == std::string::npos) { + ss << sep; + sep = ";"; + ss << *li; + } else { + cmSourceFile* sf = tgt->GetMakefile()->GetOrCreateSource(*li); + // Construct what is known about this source file location. + cmSourceFileLocation const& location = sf->GetLocation(); + std::string sname = location.GetDirectory(); + if (!sname.empty()) { + sname += "/"; + } + sname += location.GetName(); + + ss << sep; + sep = ";"; + // Append this list entry. + ss << sname; + } + } + } + static std::string srcs; + srcs = ss.str(); + return srcs.c_str(); +} + const char* cmTargetPropertyComputer::GetProperty(cmTarget const* tgt, const std::string& prop, cmMakefile* context) @@ -1156,89 +1247,7 @@ const char* cmTargetPropertyComputer::GetProperty(cmTarget const* tgt, } } if (prop == "SOURCES") { - cmStringRange entries = tgt->GetSourceEntries(); - if (entries.empty()) { - return CM_NULLPTR; - } - - std::ostringstream ss; - const char* sep = ""; - for (std::vector::const_iterator i = entries.begin(); - i != entries.end(); ++i) { - std::string const& entry = *i; - - std::vector files; - cmSystemTools::ExpandListArgument(entry, files); - for (std::vector::const_iterator li = files.begin(); - li != files.end(); ++li) { - if (cmHasLiteralPrefix(*li, "$size() - 1] == '>') { - std::string objLibName = li->substr(17, li->size() - 18); - - if (cmGeneratorExpression::Find(objLibName) != std::string::npos) { - ss << sep; - sep = ";"; - ss << *li; - continue; - } - - bool addContent = false; - bool noMessage = true; - std::ostringstream e; - cmake::MessageType messageType = cmake::AUTHOR_WARNING; - switch (context->GetPolicyStatus(cmPolicies::CMP0051)) { - case cmPolicies::WARN: - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0051) << "\n"; - noMessage = false; - case cmPolicies::OLD: - break; - case cmPolicies::REQUIRED_ALWAYS: - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::NEW: - addContent = true; - } - if (!noMessage) { - e << "Target \"" << tgt->GetName() - << "\" contains " - "$ generator expression in its sources " - "list. " - "This content was not previously part of the SOURCES " - "property " - "when that property was read at configure time. Code " - "reading " - "that property needs to be adapted to ignore the generator " - "expression using the string(GENEX_STRIP) command."; - context->IssueMessage(messageType, e.str()); - } - if (addContent) { - ss << sep; - sep = ";"; - ss << *li; - } - } else if (cmGeneratorExpression::Find(*li) == std::string::npos) { - ss << sep; - sep = ";"; - ss << *li; - } else { - cmSourceFile* sf = tgt->GetMakefile()->GetOrCreateSource(*li); - // Construct what is known about this source file location. - cmSourceFileLocation const& location = sf->GetLocation(); - std::string sname = location.GetDirectory(); - if (!sname.empty()) { - sname += "/"; - } - sname += location.GetName(); - - ss << sep; - sep = ";"; - // Append this list entry. - ss << sname; - } - } - } - static std::string srcs; - srcs = ss.str(); - return srcs.c_str(); + return GetSources(tgt, context); } return CM_NULLPTR; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d57c1a2c926011bc2e4c7a65b802763ec4efbcb commit 7d57c1a2c926011bc2e4c7a65b802763ec4efbcb Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:23 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTarget: Extract location computation methods diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index eb19df55..0913725 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1039,6 +1039,10 @@ public: private: static bool HandleLocationPropertyPolicy(std::string const& tgtName, cmMakefile* context); + + static const char* ComputeLocationForBuild(cmTarget const* tgt); + static const char* ComputeLocation(cmTarget const* tgt, + std::string const& config); }; bool cmTargetPropertyComputer::HandleLocationPropertyPolicy( @@ -1072,6 +1076,42 @@ bool cmTargetPropertyComputer::HandleLocationPropertyPolicy( return messageType != cmake::FATAL_ERROR; } +const char* cmTargetPropertyComputer::ComputeLocationForBuild( + cmTarget const* tgt) +{ + static std::string loc; + if (tgt->IsImported()) { + loc = tgt->ImportedGetFullPath("", false); + return loc.c_str(); + } + + cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); + if (!gg->GetConfigureDoneCMP0026()) { + gg->CreateGenerationObjects(); + } + cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); + loc = gt->GetLocationForBuild(); + return loc.c_str(); +} + +const char* cmTargetPropertyComputer::ComputeLocation( + cmTarget const* tgt, std::string const& config) +{ + static std::string loc; + if (tgt->IsImported()) { + loc = tgt->ImportedGetFullPath(config, false); + return loc.c_str(); + } + + cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); + if (!gg->GetConfigureDoneCMP0026()) { + gg->CreateGenerationObjects(); + } + cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); + loc = gt->GetFullPath(config, false); + return loc.c_str(); +} + const char* cmTargetPropertyComputer::GetProperty(cmTarget const* tgt, const std::string& prop, cmMakefile* context) @@ -1089,31 +1129,7 @@ const char* cmTargetPropertyComputer::GetProperty(cmTarget const* tgt, !HandleLocationPropertyPolicy(tgt->GetName(), context)) { return CM_NULLPTR; } - - // Set the LOCATION property of the target. - // - // For an imported target this is the location of an arbitrary - // available configuration. - // - if (tgt->IsImported()) { - static std::string loc; - loc = tgt->ImportedGetFullPath("", false); - return loc.c_str(); - } else { - // For a non-imported target this is deprecated because it - // cannot take into account the per-configuration name of the - // target because the configuration type may not be known at - // CMake time. - cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); - if (!gg->GetConfigureDoneCMP0026()) { - gg->CreateGenerationObjects(); - } - cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); - static std::string loc; - loc = gt->GetLocationForBuild(); - return loc.c_str(); - } - + return ComputeLocationForBuild(tgt); } // Support "LOCATION_". @@ -1123,22 +1139,9 @@ const char* cmTargetPropertyComputer::GetProperty(cmTarget const* tgt, return CM_NULLPTR; } const char* configName = prop.c_str() + 9; - - if (tgt->IsImported()) { - static std::string loc; - loc = tgt->ImportedGetFullPath(configName, false); - return loc.c_str(); - } else { - cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); - if (!gg->GetConfigureDoneCMP0026()) { - gg->CreateGenerationObjects(); - } - cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); - static std::string loc; - loc = gt->GetFullPath(configName, false); - return loc.c_str(); - } + return ComputeLocation(tgt, configName); } + // Support "_LOCATION". else if (cmHasLiteralSuffix(prop, "_LOCATION") && !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { @@ -1148,20 +1151,7 @@ const char* cmTargetPropertyComputer::GetProperty(cmTarget const* tgt, !HandleLocationPropertyPolicy(tgt->GetName(), context)) { return CM_NULLPTR; } - if (tgt->IsImported()) { - static std::string loc; - loc = tgt->ImportedGetFullPath(configName, false); - return loc.c_str(); - } else { - cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); - if (!gg->GetConfigureDoneCMP0026()) { - gg->CreateGenerationObjects(); - } - cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); - static std::string loc; - loc = gt->GetFullPath(configName, false); - return loc.c_str(); - } + return ComputeLocation(tgt, configName); } } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a55cac4ba475ff61da4146272246512a52247323 commit a55cac4ba475ff61da4146272246512a52247323 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:23 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTarget: Split property computation into separate class Everything related to property computation will be moved here and eventually shared with cmGeneratorTarget. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 62e2d1c..eb19df55 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1030,7 +1030,19 @@ void cmTarget::CheckProperty(const std::string& prop, } } -bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const +class cmTargetPropertyComputer +{ +public: + static const char* GetProperty(cmTarget const* tgt, const std::string& prop, + cmMakefile* context); + +private: + static bool HandleLocationPropertyPolicy(std::string const& tgtName, + cmMakefile* context); +}; + +bool cmTargetPropertyComputer::HandleLocationPropertyPolicy( + std::string const& tgtName, cmMakefile* context) { std::ostringstream e; const char* modal = CM_NULLPTR; @@ -1050,7 +1062,7 @@ bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const if (modal) { e << "The LOCATION property " << modal << " not be read from target \"" - << this->GetName() + << tgtName << "\". Use the target name directly with " "add_custom_command, or use the generator expression $, " "as appropriate.\n"; @@ -1060,36 +1072,21 @@ bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const return messageType != cmake::FATAL_ERROR; } -const char* cmTarget::GetProperty(const std::string& prop) const -{ - return this->GetProperty(prop, this->Makefile); -} - -const char* cmTarget::GetProperty(const std::string& prop, - cmMakefile* context) const +const char* cmTargetPropertyComputer::GetProperty(cmTarget const* tgt, + const std::string& prop, + cmMakefile* context) { - if (this->GetType() == cmState::INTERFACE_LIBRARY && - !whiteListedInterfaceProperty(prop)) { - std::ostringstream e; - e << "INTERFACE_LIBRARY targets may only have whitelisted properties. " - "The property \"" - << prop << "\" is not allowed."; - context->IssueMessage(cmake::FATAL_ERROR, e.str()); - return CM_NULLPTR; - } - // Watch for special "computed" properties that are dependent on // other properties or variables. Always recompute them. - if (this->GetType() == cmState::EXECUTABLE || - this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY || - this->GetType() == cmState::UNKNOWN_LIBRARY) { + if (tgt->GetType() == cmState::EXECUTABLE || + tgt->GetType() == cmState::STATIC_LIBRARY || + tgt->GetType() == cmState::SHARED_LIBRARY || + tgt->GetType() == cmState::MODULE_LIBRARY || + tgt->GetType() == cmState::UNKNOWN_LIBRARY) { static const std::string propLOCATION = "LOCATION"; if (prop == propLOCATION) { - - if (!this->IsImported() && - !this->HandleLocationPropertyPolicy(context)) { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), context)) { return CM_NULLPTR; } @@ -1098,20 +1095,20 @@ const char* cmTarget::GetProperty(const std::string& prop, // For an imported target this is the location of an arbitrary // available configuration. // - if (this->IsImported()) { + if (tgt->IsImported()) { static std::string loc; - loc = this->ImportedGetFullPath("", false); + loc = tgt->ImportedGetFullPath("", false); return loc.c_str(); } else { // For a non-imported target this is deprecated because it // cannot take into account the per-configuration name of the // target because the configuration type may not be known at // CMake time. - cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator(); + cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); if (!gg->GetConfigureDoneCMP0026()) { gg->CreateGenerationObjects(); } - cmGeneratorTarget* gt = gg->FindGeneratorTarget(this->GetName()); + cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); static std::string loc; loc = gt->GetLocationForBuild(); return loc.c_str(); @@ -1121,22 +1118,22 @@ const char* cmTarget::GetProperty(const std::string& prop, // Support "LOCATION_". else if (cmHasLiteralPrefix(prop, "LOCATION_")) { - if (!this->IsImported() && - !this->HandleLocationPropertyPolicy(context)) { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), context)) { return CM_NULLPTR; } const char* configName = prop.c_str() + 9; - if (this->IsImported()) { + if (tgt->IsImported()) { static std::string loc; - loc = this->ImportedGetFullPath(configName, false); + loc = tgt->ImportedGetFullPath(configName, false); return loc.c_str(); } else { - cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator(); + cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); if (!gg->GetConfigureDoneCMP0026()) { gg->CreateGenerationObjects(); } - cmGeneratorTarget* gt = gg->FindGeneratorTarget(this->GetName()); + cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); static std::string loc; loc = gt->GetFullPath(configName, false); return loc.c_str(); @@ -1147,20 +1144,20 @@ const char* cmTarget::GetProperty(const std::string& prop, !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { std::string configName(prop.c_str(), prop.size() - 9); if (configName != "IMPORTED") { - if (!this->IsImported() && - !this->HandleLocationPropertyPolicy(context)) { + if (!tgt->IsImported() && + !HandleLocationPropertyPolicy(tgt->GetName(), context)) { return CM_NULLPTR; } - if (this->IsImported()) { + if (tgt->IsImported()) { static std::string loc; - loc = this->ImportedGetFullPath(configName, false); + loc = tgt->ImportedGetFullPath(configName, false); return loc.c_str(); } else { - cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator(); + cmGlobalGenerator* gg = tgt->GetMakefile()->GetGlobalGenerator(); if (!gg->GetConfigureDoneCMP0026()) { gg->CreateGenerationObjects(); } - cmGeneratorTarget* gt = gg->FindGeneratorTarget(this->GetName()); + cmGeneratorTarget* gt = gg->FindGeneratorTarget(tgt->GetName()); static std::string loc; loc = gt->GetFullPath(configName, false); return loc.c_str(); @@ -1169,15 +1166,15 @@ const char* cmTarget::GetProperty(const std::string& prop, } } if (prop == "SOURCES") { - if (this->Internal->SourceEntries.empty()) { + cmStringRange entries = tgt->GetSourceEntries(); + if (entries.empty()) { return CM_NULLPTR; } std::ostringstream ss; const char* sep = ""; - for (std::vector::const_iterator i = - this->Internal->SourceEntries.begin(); - i != this->Internal->SourceEntries.end(); ++i) { + for (std::vector::const_iterator i = entries.begin(); + i != entries.end(); ++i) { std::string const& entry = *i; std::vector files; @@ -1211,7 +1208,7 @@ const char* cmTarget::GetProperty(const std::string& prop, addContent = true; } if (!noMessage) { - e << "Target \"" << this->Name + e << "Target \"" << tgt->GetName() << "\" contains " "$ generator expression in its sources " "list. " @@ -1233,7 +1230,7 @@ const char* cmTarget::GetProperty(const std::string& prop, sep = ";"; ss << *li; } else { - cmSourceFile* sf = this->Makefile->GetOrCreateSource(*li); + cmSourceFile* sf = tgt->GetMakefile()->GetOrCreateSource(*li); // Construct what is known about this source file location. cmSourceFileLocation const& location = sf->GetLocation(); std::string sname = location.GetDirectory(); @@ -1253,6 +1250,35 @@ const char* cmTarget::GetProperty(const std::string& prop, srcs = ss.str(); return srcs.c_str(); } + return CM_NULLPTR; +} + +const char* cmTarget::GetProperty(const std::string& prop) const +{ + return this->GetProperty(prop, this->Makefile); +} + +const char* cmTarget::GetProperty(const std::string& prop, + cmMakefile* context) const +{ + if (this->GetType() == cmState::INTERFACE_LIBRARY && + !whiteListedInterfaceProperty(prop)) { + std::ostringstream e; + e << "INTERFACE_LIBRARY targets may only have whitelisted properties. " + "The property \"" + << prop << "\" is not allowed."; + context->IssueMessage(cmake::FATAL_ERROR, e.str()); + return CM_NULLPTR; + } + + if (const char* result = + cmTargetPropertyComputer::GetProperty(this, prop, context)) { + return result; + } + if (cmSystemTools::GetFatalErrorOccured()) { + return CM_NULLPTR; + } + static UNORDERED_SET specialProps; #define MAKE_STATIC_PROP(PROP) static const std::string prop##PROP = #PROP MAKE_STATIC_PROP(LINK_LIBRARIES); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 1c81081..84f43b3 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -267,9 +267,10 @@ public: bool operator()(cmTarget const* t1, cmTarget const* t2) const; }; -private: - bool HandleLocationPropertyPolicy(cmMakefile* context) const; + std::string ImportedGetFullPath(const std::string& config, + bool implib) const; +private: const char* GetSuffixVariableInternal(bool implib) const; const char* GetPrefixVariableInternal(bool implib) const; @@ -278,9 +279,6 @@ private: void SetPropertyDefault(const std::string& property, const char* default_value); - std::string ImportedGetFullPath(const std::string& config, - bool implib) const; - private: cmPropertyMap Properties; std::set SystemIncludeDirectories; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=705fcf522be16eee03b1757274b23ada6547e6bd commit 705fcf522be16eee03b1757274b23ada6547e6bd Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:23 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTarget: Move IMPORTED check to callers This way the policy can be checked without depending on cmTarget. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 129dd63..62e2d1c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1032,9 +1032,6 @@ void cmTarget::CheckProperty(const std::string& prop, bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const { - if (this->IsImported()) { - return true; - } std::ostringstream e; const char* modal = CM_NULLPTR; cmake::MessageType messageType = cmake::AUTHOR_WARNING; @@ -1090,7 +1087,9 @@ const char* cmTarget::GetProperty(const std::string& prop, this->GetType() == cmState::UNKNOWN_LIBRARY) { static const std::string propLOCATION = "LOCATION"; if (prop == propLOCATION) { - if (!this->HandleLocationPropertyPolicy(context)) { + + if (!this->IsImported() && + !this->HandleLocationPropertyPolicy(context)) { return CM_NULLPTR; } @@ -1122,7 +1121,8 @@ const char* cmTarget::GetProperty(const std::string& prop, // Support "LOCATION_". else if (cmHasLiteralPrefix(prop, "LOCATION_")) { - if (!this->HandleLocationPropertyPolicy(context)) { + if (!this->IsImported() && + !this->HandleLocationPropertyPolicy(context)) { return CM_NULLPTR; } const char* configName = prop.c_str() + 9; @@ -1147,7 +1147,8 @@ const char* cmTarget::GetProperty(const std::string& prop, !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { std::string configName(prop.c_str(), prop.size() - 9); if (configName != "IMPORTED") { - if (!this->HandleLocationPropertyPolicy(context)) { + if (!this->IsImported() && + !this->HandleLocationPropertyPolicy(context)) { return CM_NULLPTR; } if (this->IsImported()) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1fb6f672bd2bd041edb772b0627278383a00fb62 commit 1fb6f672bd2bd041edb772b0627278383a00fb62 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:23 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTarget: Move SOURCES property computation before the rest The SOURCES have to be computed. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ca2c37d..129dd63 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1167,6 +1167,91 @@ const char* cmTarget::GetProperty(const std::string& prop, } } } + if (prop == "SOURCES") { + if (this->Internal->SourceEntries.empty()) { + return CM_NULLPTR; + } + + std::ostringstream ss; + const char* sep = ""; + for (std::vector::const_iterator i = + this->Internal->SourceEntries.begin(); + i != this->Internal->SourceEntries.end(); ++i) { + std::string const& entry = *i; + + std::vector files; + cmSystemTools::ExpandListArgument(entry, files); + for (std::vector::const_iterator li = files.begin(); + li != files.end(); ++li) { + if (cmHasLiteralPrefix(*li, "$size() - 1] == '>') { + std::string objLibName = li->substr(17, li->size() - 18); + + if (cmGeneratorExpression::Find(objLibName) != std::string::npos) { + ss << sep; + sep = ";"; + ss << *li; + continue; + } + + bool addContent = false; + bool noMessage = true; + std::ostringstream e; + cmake::MessageType messageType = cmake::AUTHOR_WARNING; + switch (context->GetPolicyStatus(cmPolicies::CMP0051)) { + case cmPolicies::WARN: + e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0051) << "\n"; + noMessage = false; + case cmPolicies::OLD: + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + addContent = true; + } + if (!noMessage) { + e << "Target \"" << this->Name + << "\" contains " + "$ generator expression in its sources " + "list. " + "This content was not previously part of the SOURCES " + "property " + "when that property was read at configure time. Code " + "reading " + "that property needs to be adapted to ignore the generator " + "expression using the string(GENEX_STRIP) command."; + context->IssueMessage(messageType, e.str()); + } + if (addContent) { + ss << sep; + sep = ";"; + ss << *li; + } + } else if (cmGeneratorExpression::Find(*li) == std::string::npos) { + ss << sep; + sep = ";"; + ss << *li; + } else { + cmSourceFile* sf = this->Makefile->GetOrCreateSource(*li); + // Construct what is known about this source file location. + cmSourceFileLocation const& location = sf->GetLocation(); + std::string sname = location.GetDirectory(); + if (!sname.empty()) { + sname += "/"; + } + sname += location.GetName(); + + ss << sep; + sep = ";"; + // Append this list entry. + ss << sname; + } + } + } + static std::string srcs; + srcs = ss.str(); + return srcs.c_str(); + } static UNORDERED_SET specialProps; #define MAKE_STATIC_PROP(PROP) static const std::string prop##PROP = #PROP MAKE_STATIC_PROP(LINK_LIBRARIES); @@ -1256,91 +1341,6 @@ const char* cmTarget::GetProperty(const std::string& prop, if (prop == propSOURCE_DIR) { return this->GetMakefile()->GetCurrentSourceDirectory(); } - if (prop == propSOURCES) { - if (this->Internal->SourceEntries.empty()) { - return CM_NULLPTR; - } - - std::ostringstream ss; - const char* sep = ""; - for (std::vector::const_iterator i = - this->Internal->SourceEntries.begin(); - i != this->Internal->SourceEntries.end(); ++i) { - std::string const& entry = *i; - - std::vector files; - cmSystemTools::ExpandListArgument(entry, files); - for (std::vector::const_iterator li = files.begin(); - li != files.end(); ++li) { - if (cmHasLiteralPrefix(*li, "$size() - 1] == '>') { - std::string objLibName = li->substr(17, li->size() - 18); - - if (cmGeneratorExpression::Find(objLibName) != std::string::npos) { - ss << sep; - sep = ";"; - ss << *li; - continue; - } - - bool addContent = false; - bool noMessage = true; - std::ostringstream e; - cmake::MessageType messageType = cmake::AUTHOR_WARNING; - switch (context->GetPolicyStatus(cmPolicies::CMP0051)) { - case cmPolicies::WARN: - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0051) << "\n"; - noMessage = false; - case cmPolicies::OLD: - break; - case cmPolicies::REQUIRED_ALWAYS: - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::NEW: - addContent = true; - } - if (!noMessage) { - e << "Target \"" << this->Name - << "\" contains " - "$ generator expression in its sources " - "list. " - "This content was not previously part of the SOURCES " - "property " - "when that property was read at configure time. Code " - "reading " - "that property needs to be adapted to ignore the generator " - "expression using the string(GENEX_STRIP) command."; - context->IssueMessage(messageType, e.str()); - } - if (addContent) { - ss << sep; - sep = ";"; - ss << *li; - } - } else if (cmGeneratorExpression::Find(*li) == std::string::npos) { - ss << sep; - sep = ";"; - ss << *li; - } else { - cmSourceFile* sf = this->Makefile->GetOrCreateSource(*li); - // Construct what is known about this source file location. - cmSourceFileLocation const& location = sf->GetLocation(); - std::string sname = location.GetDirectory(); - if (!sname.empty()) { - sname += "/"; - } - sname += location.GetName(); - - ss << sep; - sep = ";"; - // Append this list entry. - ss << sname; - } - } - } - static std::string srcs; - srcs = ss.str(); - return srcs.c_str(); - } } const char* retVal = this->Properties.GetPropertyValue(prop); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60b3f216c18aa317656433bcc0b724e6abd8d02f commit 60b3f216c18aa317656433bcc0b724e6abd8d02f Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:22 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTarget: Remove mutable marker from properties diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 7eb0ebf..d622ad9 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3950,7 +3950,7 @@ void cmGeneratorTarget::ComputeVersionedName(std::string& vName, std::vector cmGeneratorTarget::GetPropertyKeys() const { - cmPropertyMap propsObject = this->Target->GetProperties(); + cmPropertyMap const& propsObject = this->Target->GetProperties(); std::vector props; props.reserve(propsObject.size()); for (cmPropertyMap::const_iterator it = propsObject.begin(); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 3d88688..1c81081 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -208,7 +208,7 @@ public: } // Get the properties - cmPropertyMap& GetProperties() const { return this->Properties; } + cmPropertyMap const& GetProperties() const { return this->Properties; } bool GetMappedConfig(std::string const& desired_config, const char** loc, const char** imp, std::string& suffix) const; @@ -282,7 +282,7 @@ private: bool implib) const; private: - mutable cmPropertyMap Properties; + cmPropertyMap Properties; std::set SystemIncludeDirectories; std::set LinkDirectoriesEmmitted; std::set Utilities; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aaa5dbbf64392dad518668ac1d046d624dac41f3 commit aaa5dbbf64392dad518668ac1d046d624dac41f3 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:22 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:14:21 2016 +0200 cmTarget: Use static storage for computed properties Avoid having to populate a mutable container to return a value. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 651bcc8..ca2c37d 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1100,8 +1100,9 @@ const char* cmTarget::GetProperty(const std::string& prop, // available configuration. // if (this->IsImported()) { - this->Properties.SetProperty( - propLOCATION, this->ImportedGetFullPath("", false).c_str()); + static std::string loc; + loc = this->ImportedGetFullPath("", false); + return loc.c_str(); } else { // For a non-imported target this is deprecated because it // cannot take into account the per-configuration name of the @@ -1112,7 +1113,9 @@ const char* cmTarget::GetProperty(const std::string& prop, gg->CreateGenerationObjects(); } cmGeneratorTarget* gt = gg->FindGeneratorTarget(this->GetName()); - this->Properties.SetProperty(propLOCATION, gt->GetLocationForBuild()); + static std::string loc; + loc = gt->GetLocationForBuild(); + return loc.c_str(); } } @@ -1125,16 +1128,18 @@ const char* cmTarget::GetProperty(const std::string& prop, const char* configName = prop.c_str() + 9; if (this->IsImported()) { - this->Properties.SetProperty( - prop, this->ImportedGetFullPath(configName, false).c_str()); + static std::string loc; + loc = this->ImportedGetFullPath(configName, false); + return loc.c_str(); } else { cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator(); if (!gg->GetConfigureDoneCMP0026()) { gg->CreateGenerationObjects(); } cmGeneratorTarget* gt = gg->FindGeneratorTarget(this->GetName()); - this->Properties.SetProperty( - prop, gt->GetFullPath(configName, false).c_str()); + static std::string loc; + loc = gt->GetFullPath(configName, false); + return loc.c_str(); } } // Support "_LOCATION". @@ -1146,16 +1151,18 @@ const char* cmTarget::GetProperty(const std::string& prop, return CM_NULLPTR; } if (this->IsImported()) { - this->Properties.SetProperty( - prop, this->ImportedGetFullPath(configName, false).c_str()); + static std::string loc; + loc = this->ImportedGetFullPath(configName, false); + return loc.c_str(); } else { cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator(); if (!gg->GetConfigureDoneCMP0026()) { gg->CreateGenerationObjects(); } cmGeneratorTarget* gt = gg->FindGeneratorTarget(this->GetName()); - this->Properties.SetProperty( - prop, gt->GetFullPath(configName, false).c_str()); + static std::string loc; + loc = gt->GetFullPath(configName, false); + return loc.c_str(); } } } @@ -1330,7 +1337,9 @@ const char* cmTarget::GetProperty(const std::string& prop, } } } - this->Properties.SetProperty("SOURCES", ss.str().c_str()); + static std::string srcs; + srcs = ss.str(); + return srcs.c_str(); } } ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 + Source/cmGeneratorTarget.cxx | 57 ++- Source/cmGeneratorTarget.h | 4 + Source/cmGetPropertyCommand.cxx | 15 +- Source/cmGetTargetPropertyCommand.cxx | 14 +- Source/cmListFileCache.h | 2 + Source/cmTarget.cxx | 457 ++++++++------------ Source/cmTarget.h | 16 +- Source/cmTargetPropertyComputer.cxx | 99 +++++ Source/cmTargetPropertyComputer.h | 110 +++++ .../TARGET_PROPERTY-LOCATION-stderr.txt | 4 +- bootstrap | 1 + 12 files changed, 487 insertions(+), 294 deletions(-) create mode 100644 Source/cmTargetPropertyComputer.cxx create mode 100644 Source/cmTargetPropertyComputer.h hooks/post-receive -- CMake From steveire at gmail.com Sat Oct 15 05:26:10 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sat, 15 Oct 2016 05:26:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-531-g2c0f3a3 Message-ID: <20161015092610.9E935F5F28@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 2c0f3a34e5bd163b5194da61c9d1c0d89dc4f68d (commit) via b59b6dd9d27de7839c7b23a3094db33298038896 (commit) via bdddd4234e977f65ee7df8adcd3888706dfd0dda (commit) via f796e1b6f6984b200453a13e6b8640353ff9488b (commit) via c75a9d660169ddd1e7be57486d3813ca73886b55 (commit) via 46ad0d2183230d1af93242efbdcce20d55514efb (commit) via 2628dec12cb22546d2a21032f53fb0ef096faec8 (commit) via 315b9a31895ca6bb26eba12bff3a0fe9cd37568a (commit) via d5feb5b34cd9f595bf42aa934738b918785e3e87 (commit) via efba22e1deebcfc3924d5f14c026104eb4b62d28 (commit) via b29425f7aafe07eff526f3c7defb317856b72984 (commit) via f009d8f5e2e4007b93494c5d22ba25b41a4872a1 (commit) via 6cd27a853a1c77e5da0a9a14140284a7674cf18c (commit) via 8b0e4795687a2ea289d1313db24d75bcf3cd13bc (commit) via 88016e2e9f13d60c4a0b88fb64ffd802a2d9e534 (commit) via be87cb0c444595fa1970e257031252669c201d3e (commit) via 425cd1670fdd40b752af71e5f28952ae4fcec4ac (commit) from 590f2a365ed4ee2cc3a7fd93f55b2ab869fc3004 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c0f3a34e5bd163b5194da61c9d1c0d89dc4f68d commit 2c0f3a34e5bd163b5194da61c9d1c0d89dc4f68d Merge: 590f2a3 b59b6dd Author: Stephen Kelly AuthorDate: Sat Oct 15 05:26:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Oct 15 05:26:07 2016 -0400 Merge topic 'extract-cmRulePlaceholderExpander' into next b59b6dd9 cmRulePlaceholderExpander: Port clients to direct-use bdddd423 cmRulePlaceholderExpander: Extract from cmLocalGenerator f796e1b6 cmLocalGenerator: Move memset to cxx file c75a9d66 cmLocalGenerator: Use strings instead of a Target in rule replacement 46ad0d21 cmLocalGenerator: Use a converter in rule replacement API 2628dec1 cmLocalGenerator: Store variable replacements as state 315b9a31 cmLocalGenerator: Merge loops which populate mapping d5feb5b3 cmLocalGenerator: Populate variable mapping for all replacements efba22e1 cmLocalGenerator: Extract compiler option replacement from loop b29425f7 cmLocalGenerator: Populate a container of mappings for replacements f009d8f5 cmLocalGenerator: Move compiler option handling to be more direct 6cd27a85 cmLocalGenerator: Move variable to where it can be used easily 8b0e4795 cmLocalGenerator: Use the language from the compiler container 88016e2e cmLocalGenerator: Introduce a container of compiler names be87cb0c cmLocalGenerator: Simplify loop with range algorithm 425cd167 cmLocalGenerator: Remove the launcher from RuleVariables https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b59b6dd9d27de7839c7b23a3094db33298038896 commit b59b6dd9d27de7839c7b23a3094db33298038896 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmRulePlaceholderExpander: Port clients to direct-use Add a factory function to cmLocalGenerator so that variableMappings can be provided from it, and so that Ninja can always have a hard-coded TargetImpLib. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 615168d..1c3a97d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -133,6 +133,13 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) } } +cmRulePlaceholderExpander* cmLocalGenerator::CreateRulePlaceholderExpander() + const +{ + return new cmRulePlaceholderExpander(this->Compilers, this->VariableMappings, + this->CompilerSysroot); +} + cmLocalGenerator::~cmLocalGenerator() { cmDeleteAll(this->GeneratorTargets); @@ -561,17 +568,6 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->Makefile->GetStateSnapshot(); } -void cmLocalGenerator::ExpandRuleVariables(cmOutputConverter* outputConverter, - std::string& s, - const RuleVariables& replaceValues) -{ - cmRulePlaceholderExpander rulePlaceholderExpander( - this->Compilers, this->VariableMappings, this->CompilerSysroot); - rulePlaceholderExpander.SetTargetImpLib(this->TargetImplib); - rulePlaceholderExpander.ExpandRuleVariables(outputConverter, s, - replaceValues); -} - const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target, const std::string& prop) { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 6f8426d..055e1a9 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -24,6 +24,7 @@ class cmComputeLinkInformation; class cmCustomCommandGenerator; class cmGeneratorTarget; class cmGlobalGenerator; +class cmRulePlaceholderExpander; class cmMakefile; class cmSourceFile; class cmLinkLineComputer; @@ -85,6 +86,8 @@ public: return this->GlobalGenerator; } + virtual cmRulePlaceholderExpander* CreateRulePlaceholderExpander() const; + std::string GetLinkLibsCMP0065(std::string const& linkLanguage, cmGeneratorTarget& tgt) const; @@ -218,10 +221,6 @@ public: // preprocessed files and assembly files. void GetIndividualFileTargets(std::vector&) {} - struct RuleVariables : cmRulePlaceholderExpander::RuleVariables - { - }; - /** * Get the relative path from the generator output directory to a * per-target support directory. @@ -315,11 +314,6 @@ public: void CreateEvaluationFileOutputs(const std::string& config); void ProcessEvaluationFiles(std::vector& generatedFiles); - // Expand rule variables in CMake of the type found in language rules - void ExpandRuleVariables(cmOutputConverter* outputConverter, - std::string& string, - const RuleVariables& replaceValues); - const char* GetRuleLauncher(cmGeneratorTarget* target, const std::string& prop); @@ -362,10 +356,6 @@ protected: bool EmitUniversalBinaryFlags; - // Hack for ExpandRuleVariable until object-oriented version is - // committed. - std::string TargetImplib; - KWIML_INT_uint64_t BackwardsCompatibility; bool BackwardsCompatibilityFinal; diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 05596f8..1863376 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -10,6 +10,7 @@ #include "cmGlobalNinjaGenerator.h" #include "cmMakefile.h" #include "cmNinjaTargetGenerator.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -27,11 +28,19 @@ cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg, : cmLocalCommonGenerator(gg, mf, mf->GetState()->GetBinaryDirectory()) , HomeRelativeOutputPath("") { - this->TargetImplib = "$TARGET_IMPLIB"; } // Virtual public methods. +cmRulePlaceholderExpander* +cmLocalNinjaGenerator::CreateRulePlaceholderExpander() const +{ + cmRulePlaceholderExpander* ret = new cmRulePlaceholderExpander( + this->Compilers, this->VariableMappings, this->CompilerSysroot); + ret->SetTargetImpLib("$TARGET_IMPLIB"); + return ret; +} + cmLocalNinjaGenerator::~cmLocalNinjaGenerator() { } @@ -477,7 +486,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( // Expand rules in the empty string. It may insert the launcher and // perform replacements. - RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; std::string output; const std::vector& outputs = ccg.GetOutputs(); @@ -494,7 +503,10 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( std::string launcher = property_value; launcher += " "; - this->ExpandRuleVariables(this, launcher, vars); + CM_AUTO_PTR rulePlaceholderExpander( + this->CreateRulePlaceholderExpander()); + + rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 56aa9bf..95d8eb8 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -42,6 +42,8 @@ public: void Generate() CM_OVERRIDE; + cmRulePlaceholderExpander* CreateRulePlaceholderExpander() const CM_OVERRIDE; + std::string GetTargetDirectory(cmGeneratorTarget const* target) const CM_OVERRIDE; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 6906cbf..f30414c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -14,6 +14,7 @@ #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -945,6 +946,9 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( *content << dir; } + CM_AUTO_PTR rulePlaceholderExpander( + this->CreateRulePlaceholderExpander()); + // Add each command line to the set of commands. std::vector commands1; std::string currentBinDir = this->GetCurrentBinaryDirectory(); @@ -988,7 +992,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( if (val && *val) { // Expand rules in the empty string. It may insert the launcher and // perform replacements. - RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = target->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(target->GetType()); std::string output; @@ -1006,7 +1010,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( launcher = val; launcher += " "; - this->ExpandRuleVariables(this, launcher, vars); + rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index fafff01..7eca0a8 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -11,6 +11,7 @@ #include "cmMakefile.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSystemTools.h" #include "cmake.h" @@ -331,7 +332,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string manifests = this->GetManifests(); - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); @@ -393,15 +394,17 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) launcher += " "; } + CM_AUTO_PTR rulePlaceholderExpander( + this->LocalGenerator->CreateRulePlaceholderExpander()); + // Expand placeholders in the commands. - this->LocalGenerator->TargetImplib = targetOutPathImport; + rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport); for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } - this->LocalGenerator->TargetImplib = ""; // Restore path conversion to normal shells. this->LocalGenerator->SetLinkScriptShell(false); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 1ae34d6..00a9100 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -11,6 +11,7 @@ #include "cmMakefile.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" @@ -520,7 +521,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string manifests = this->GetManifests(); - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.TargetPDB = targetOutPathPDB.c_str(); // Setup the target version. @@ -606,8 +607,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( launcher += " "; } + CM_AUTO_PTR rulePlaceholderExpander( + this->LocalGenerator->CreateRulePlaceholderExpander()); // Construct the main link rule and expand placeholders. - this->LocalGenerator->TargetImplib = targetOutPathImport; + rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport); if (useArchiveRules) { // Construct the individual object list strings. std::vector object_strings; @@ -621,8 +624,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveCreateCommands.begin(); i != archiveCreateCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + cmd, vars); real_link_commands.push_back(cmd); } } @@ -633,8 +636,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveAppendCommands.begin(); i != archiveAppendCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + cmd, vars); real_link_commands.push_back(cmd); } } @@ -644,8 +647,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveFinishCommands.begin(); i != archiveFinishCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); // If there is no ranlib the command will be ":". Skip it. if (!cmd.empty() && cmd[0] != ':') { real_link_commands.push_back(cmd); @@ -668,11 +671,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } } - this->LocalGenerator->TargetImplib = ""; // Restore path conversion to normal shells. this->LocalGenerator->SetLinkScriptShell(false); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 9492a61..cbfe850 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -18,6 +18,7 @@ #include "cmMakefileLibraryTargetGenerator.h" #include "cmMakefileUtilityTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -543,7 +544,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( targetOutPathCompilePDB[targetOutPathCompilePDB.size() - 1] = '/'; } } - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.RuleLauncher = "RULE_LAUNCH_COMPILE"; vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); vars.CMTargetType = @@ -589,6 +590,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( bool const lang_has_assembly = lang_has_preprocessor; bool const lang_can_export_cmds = lang_has_preprocessor; + CM_AUTO_PTR rulePlaceholderExpander( + this->LocalGenerator->CreateRulePlaceholderExpander()); + // Construct the compile rules. { std::string compileRuleVar = "CMAKE_"; @@ -602,8 +606,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( if (this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS") && lang_can_export_cmds && compileCommands.size() == 1) { std::string compileCommand = compileCommands[0]; - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, - compileCommand, vars); + + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + compileCommand, vars); std::string workingDirectory = cmSystemTools::CollapseFullPath( this->LocalGenerator->GetCurrentBinaryDirectory()); compileCommand.replace(compileCommand.find(langFlags), langFlags.size(), @@ -662,8 +667,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = compileCommands.begin(); i != compileCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } // Change the command working directory to the local build tree. @@ -726,8 +731,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = preprocessCommands.begin(); i != preprocessCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + *i, vars); } this->LocalGenerator->CreateCDCommand( @@ -774,8 +779,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = assemblyCommands.begin(); i != assemblyCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, - vars); + rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, + *i, vars); } this->LocalGenerator->CreateCDCommand( diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 3adc068..b28b19a 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -15,6 +15,7 @@ #include "cmNinjaTypes.h" #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -167,7 +168,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) std::string rspcontent; if (!this->GetGlobalGenerator()->HasRule(ruleName)) { - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); @@ -248,13 +249,16 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) launcher += " "; } + CM_AUTO_PTR rulePlaceholderExpander( + this->GetLocalGenerator()->CreateRulePlaceholderExpander()); + // Rule for linking library/executable. std::vector linkCmds = this->ComputeLinkCmd(); for (std::vector::iterator i = linkCmds.begin(); i != linkCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, vars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), + *i, vars); } { // If there is no ranlib the command will be ":". Skip it. diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index c718ad4..1ac6cd4 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -14,6 +14,7 @@ #include "cmNinjaNormalTargetGenerator.h" #include "cmNinjaUtilityTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -373,7 +374,7 @@ void cmNinjaTargetGenerator::WriteLanguageRules(const std::string& language) void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) { - cmLocalGenerator::RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); @@ -453,6 +454,9 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) vars.Flags = flags.c_str(); vars.DependencyFile = depfile.c_str(); + CM_AUTO_PTR rulePlaceholderExpander( + this->GetLocalGenerator()->CreateRulePlaceholderExpander()); + std::string const tdi = this->GetLocalGenerator()->ConvertToOutputFormat( ConvertToNinjaPath(this->GetTargetDependInfoPath(lang)), cmLocalGenerator::SHELL); @@ -475,7 +479,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) std::string const ppDeptype = ""; // no deps= for multiple outputs std::string const ppDepfile = "$DEP_FILE"; - cmLocalGenerator::RuleVariables ppVars; + cmRulePlaceholderExpander::RuleVariables ppVars; ppVars.CMTargetName = vars.CMTargetName; ppVars.CMTargetType = vars.CMTargetType; ppVars.Language = vars.Language; @@ -506,8 +510,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = ppCmds.begin(); i != ppCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, ppVars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), + *i, ppVars); } // Run CMake dependency scanner on preprocessed output. @@ -620,8 +624,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, vars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), *i, + vars); } std::string cmdLine = @@ -974,7 +978,7 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( return; } - cmLocalGenerator::RuleVariables compileObjectVars; + cmRulePlaceholderExpander::RuleVariables compileObjectVars; compileObjectVars.Language = language.c_str(); std::string escapedSourceFileName = sourceFileName; @@ -1006,10 +1010,13 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( std::vector compileCmds; cmSystemTools::ExpandListArgument(compileCmd, compileCmds); + CM_AUTO_PTR rulePlaceholderExpander( + this->GetLocalGenerator()->CreateRulePlaceholderExpander()); + for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { - this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), - *i, compileObjectVars); + rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), *i, + compileObjectVars); } std::string cmdLine = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bdddd4234e977f65ee7df8adcd3888706dfd0dda commit bdddd4234e977f65ee7df8adcd3888706dfd0dda Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmRulePlaceholderExpander: Extract from cmLocalGenerator Implement cmLocalGenerator::ExpandRuleVariables in terms of the new class for source compatibility and to reduce diff noise in this commit. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 048667a..7d82a51 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -309,6 +309,8 @@ set(SRCS cmLocalCommonGenerator.h cmLocalGenerator.cxx cmLocalGenerator.h + cmRulePlaceholderExpander.cxx + cmRulePlaceholderExpander.h cmLocalUnixMakefileGenerator3.cxx cmLocale.h ${MACH_SRCS} diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 849ffe4..615168d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -14,6 +14,7 @@ #include "cmInstallTargetGenerator.h" #include "cmLinkLineComputer.h" #include "cmMakefile.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmSystemTools.h" #include "cmTarget.h" @@ -560,292 +561,15 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->Makefile->GetStateSnapshot(); } -cmLocalGenerator::RuleVariables::RuleVariables() -{ - memset(this, 0, sizeof(*this)); -} - -std::string cmLocalGenerator::ExpandRuleVariable( - cmOutputConverter* outputConverter, std::string const& variable, - const RuleVariables& replaceValues) -{ - if (replaceValues.LinkFlags) { - if (variable == "LINK_FLAGS") { - return replaceValues.LinkFlags; - } - } - if (replaceValues.Manifests) { - if (variable == "MANIFESTS") { - return replaceValues.Manifests; - } - } - if (replaceValues.Flags) { - if (variable == "FLAGS") { - return replaceValues.Flags; - } - } - - if (replaceValues.Source) { - if (variable == "SOURCE") { - return replaceValues.Source; - } - } - if (replaceValues.PreprocessedSource) { - if (variable == "PREPROCESSED_SOURCE") { - return replaceValues.PreprocessedSource; - } - } - if (replaceValues.AssemblySource) { - if (variable == "ASSEMBLY_SOURCE") { - return replaceValues.AssemblySource; - } - } - if (replaceValues.Object) { - if (variable == "OBJECT") { - return replaceValues.Object; - } - } - if (replaceValues.ObjectDir) { - if (variable == "OBJECT_DIR") { - return replaceValues.ObjectDir; - } - } - if (replaceValues.ObjectFileDir) { - if (variable == "OBJECT_FILE_DIR") { - return replaceValues.ObjectFileDir; - } - } - if (replaceValues.Objects) { - if (variable == "OBJECTS") { - return replaceValues.Objects; - } - } - if (replaceValues.ObjectsQuoted) { - if (variable == "OBJECTS_QUOTED") { - return replaceValues.ObjectsQuoted; - } - } - if (replaceValues.Defines && variable == "DEFINES") { - return replaceValues.Defines; - } - if (replaceValues.Includes && variable == "INCLUDES") { - return replaceValues.Includes; - } - if (replaceValues.TargetPDB) { - if (variable == "TARGET_PDB") { - return replaceValues.TargetPDB; - } - } - if (replaceValues.TargetCompilePDB) { - if (variable == "TARGET_COMPILE_PDB") { - return replaceValues.TargetCompilePDB; - } - } - if (replaceValues.DependencyFile) { - if (variable == "DEP_FILE") { - return replaceValues.DependencyFile; - } - } - - if (replaceValues.Target) { - if (variable == "TARGET_QUOTED") { - std::string targetQuoted = replaceValues.Target; - if (!targetQuoted.empty() && targetQuoted[0] != '\"') { - targetQuoted = '\"'; - targetQuoted += replaceValues.Target; - targetQuoted += '\"'; - } - return targetQuoted; - } - if (variable == "TARGET_UNQUOTED") { - std::string unquoted = replaceValues.Target; - std::string::size_type sz = unquoted.size(); - if (sz > 2 && unquoted[0] == '\"' && unquoted[sz - 1] == '\"') { - unquoted = unquoted.substr(1, sz - 2); - } - return unquoted; - } - if (replaceValues.LanguageCompileFlags) { - if (variable == "LANGUAGE_COMPILE_FLAGS") { - return replaceValues.LanguageCompileFlags; - } - } - if (replaceValues.Target) { - if (variable == "TARGET") { - return replaceValues.Target; - } - } - if (variable == "TARGET_IMPLIB") { - return this->TargetImplib; - } - if (variable == "TARGET_VERSION_MAJOR") { - if (replaceValues.TargetVersionMajor) { - return replaceValues.TargetVersionMajor; - } - return "0"; - } - if (variable == "TARGET_VERSION_MINOR") { - if (replaceValues.TargetVersionMinor) { - return replaceValues.TargetVersionMinor; - } - return "0"; - } - if (replaceValues.Target) { - if (variable == "TARGET_BASE") { - // Strip the last extension off the target name. - std::string targetBase = replaceValues.Target; - std::string::size_type pos = targetBase.rfind('.'); - if (pos != targetBase.npos) { - return targetBase.substr(0, pos); - } - return targetBase; - } - } - } - if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" || - variable == "TARGET_INSTALLNAME_DIR") { - // All these variables depend on TargetSOName - if (replaceValues.TargetSOName) { - if (variable == "TARGET_SONAME") { - return replaceValues.TargetSOName; - } - if (variable == "SONAME_FLAG" && replaceValues.SONameFlag) { - return replaceValues.SONameFlag; - } - if (replaceValues.TargetInstallNameDir && - variable == "TARGET_INSTALLNAME_DIR") { - return replaceValues.TargetInstallNameDir; - } - } - return ""; - } - if (replaceValues.LinkLibraries) { - if (variable == "LINK_LIBRARIES") { - return replaceValues.LinkLibraries; - } - } - if (replaceValues.Language) { - if (variable == "LANGUAGE") { - return replaceValues.Language; - } - } - if (replaceValues.CMTargetName) { - if (variable == "TARGET_NAME") { - return replaceValues.CMTargetName; - } - } - if (replaceValues.CMTargetType) { - if (variable == "TARGET_TYPE") { - return replaceValues.CMTargetType; - } - } - if (replaceValues.Output) { - if (variable == "OUTPUT") { - return replaceValues.Output; - } - } - if (variable == "CMAKE_COMMAND") { - return outputConverter->ConvertToOutputFormat( - cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), - SHELL); - } - - std::map::iterator compIt = - this->Compilers.find(variable); - - if (compIt != this->Compilers.end()) { - std::string ret = outputConverter->ConvertToOutputForExisting( - this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]); - std::string const& compilerArg1 = - this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; - std::string const& compilerTarget = - this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; - std::string const& compilerOptionTarget = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_TARGET"]; - std::string const& compilerExternalToolchain = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionExternalToolchain = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionSysroot = - this->VariableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_SYSROOT"]; - - // if there is a required first argument to the compiler add it - // to the compiler string - if (!compilerArg1.empty()) { - ret += " "; - ret += compilerArg1; - } - if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { - ret += " "; - ret += compilerOptionTarget; - ret += compilerTarget; - } - if (!compilerExternalToolchain.empty() && - !compilerOptionExternalToolchain.empty()) { - ret += " "; - ret += compilerOptionExternalToolchain; - ret += outputConverter->EscapeForShell(compilerExternalToolchain, true); - } - if (!this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { - ret += " "; - ret += compilerOptionSysroot; - ret += outputConverter->EscapeForShell(this->CompilerSysroot, true); - } - return ret; - } - - std::map::iterator mapIt = - this->VariableMappings.find(variable); - if (mapIt != this->VariableMappings.end()) { - if (variable.find("_FLAG") == variable.npos) { - return outputConverter->ConvertToOutputForExisting(mapIt->second); - } - return mapIt->second; - } - return variable; -} - void cmLocalGenerator::ExpandRuleVariables(cmOutputConverter* outputConverter, std::string& s, const RuleVariables& replaceValues) { - std::string::size_type start = s.find('<'); - // no variables to expand - if (start == s.npos) { - return; - } - std::string::size_type pos = 0; - std::string expandedInput; - while (start != s.npos && start < s.size() - 2) { - std::string::size_type end = s.find('>', start); - // if we find a < with no > we are done - if (end == s.npos) { - return; - } - char c = s[start + 1]; - // if the next char after the < is not A-Za-z then - // skip it and try to find the next < in the string - if (!isalpha(c)) { - start = s.find('<', start + 1); - } else { - // extract the var - std::string var = s.substr(start + 1, end - start - 1); - std::string replace = - this->ExpandRuleVariable(outputConverter, var, replaceValues); - expandedInput += s.substr(pos, start - pos); - expandedInput += replace; - // move to next one - start = s.find('<', start + var.size() + 2); - pos = end + 1; - } - } - // add the rest of the input - expandedInput += s.substr(pos, s.size() - pos); - s = expandedInput; + cmRulePlaceholderExpander rulePlaceholderExpander( + this->Compilers, this->VariableMappings, this->CompilerSysroot); + rulePlaceholderExpander.SetTargetImpLib(this->TargetImplib); + rulePlaceholderExpander.ExpandRuleVariables(outputConverter, s, + replaceValues); } const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target, diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 6e6791d..6f8426d 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -8,6 +8,7 @@ #include "cmListFileCache.h" #include "cmOutputConverter.h" #include "cmPolicies.h" +#include "cmRulePlaceholderExpander.h" #include "cmState.h" #include "cmake.h" @@ -217,41 +218,8 @@ public: // preprocessed files and assembly files. void GetIndividualFileTargets(std::vector&) {} - // Create a struct to hold the varibles passed into - // ExpandRuleVariables - struct RuleVariables + struct RuleVariables : cmRulePlaceholderExpander::RuleVariables { - RuleVariables(); - const char* CMTargetName; - const char* CMTargetType; - const char* TargetPDB; - const char* TargetCompilePDB; - const char* TargetVersionMajor; - const char* TargetVersionMinor; - const char* Language; - const char* Objects; - const char* Target; - const char* LinkLibraries; - const char* Source; - const char* AssemblySource; - const char* PreprocessedSource; - const char* Output; - const char* Object; - const char* ObjectDir; - const char* ObjectFileDir; - const char* Flags; - const char* ObjectsQuoted; - const char* SONameFlag; - const char* TargetSOName; - const char* TargetInstallNameDir; - const char* LinkFlags; - const char* Manifests; - const char* LanguageCompileFlags; - const char* Defines; - const char* Includes; - const char* RuleLauncher; - const char* DependencyFile; - const char* FilterPrefix; }; /** @@ -362,11 +330,6 @@ protected: std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath); - // Expand rule variables in a single string - std::string ExpandRuleVariable(cmOutputConverter* outputConverter, - std::string const& variable, - const RuleVariables& replaceValues); - // Handle old-style install rules stored in the targets. void GenerateTargetInstallRules( std::ostream& os, const std::string& config, diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx new file mode 100644 index 0000000..361321e --- /dev/null +++ b/Source/cmRulePlaceholderExpander.cxx @@ -0,0 +1,304 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmRulePlaceholderExpander.h" + +#include "cmOutputConverter.h" +#include "cmSystemTools.h" + +cmRulePlaceholderExpander::cmRulePlaceholderExpander( + std::map const& compilers, + std::map const& variableMappings, + std::string const& compilerSysroot) + : Compilers(compilers) + , VariableMappings(variableMappings) + , CompilerSysroot(compilerSysroot) +{ +} + +cmRulePlaceholderExpander::RuleVariables::RuleVariables() +{ + memset(this, 0, sizeof(*this)); +} + +std::string cmRulePlaceholderExpander::ExpandRuleVariable( + cmOutputConverter* outputConverter, std::string const& variable, + const RuleVariables& replaceValues) +{ + if (replaceValues.LinkFlags) { + if (variable == "LINK_FLAGS") { + return replaceValues.LinkFlags; + } + } + if (replaceValues.Manifests) { + if (variable == "MANIFESTS") { + return replaceValues.Manifests; + } + } + if (replaceValues.Flags) { + if (variable == "FLAGS") { + return replaceValues.Flags; + } + } + + if (replaceValues.Source) { + if (variable == "SOURCE") { + return replaceValues.Source; + } + } + if (replaceValues.PreprocessedSource) { + if (variable == "PREPROCESSED_SOURCE") { + return replaceValues.PreprocessedSource; + } + } + if (replaceValues.AssemblySource) { + if (variable == "ASSEMBLY_SOURCE") { + return replaceValues.AssemblySource; + } + } + if (replaceValues.Object) { + if (variable == "OBJECT") { + return replaceValues.Object; + } + } + if (replaceValues.ObjectDir) { + if (variable == "OBJECT_DIR") { + return replaceValues.ObjectDir; + } + } + if (replaceValues.ObjectFileDir) { + if (variable == "OBJECT_FILE_DIR") { + return replaceValues.ObjectFileDir; + } + } + if (replaceValues.Objects) { + if (variable == "OBJECTS") { + return replaceValues.Objects; + } + } + if (replaceValues.ObjectsQuoted) { + if (variable == "OBJECTS_QUOTED") { + return replaceValues.ObjectsQuoted; + } + } + if (replaceValues.Defines && variable == "DEFINES") { + return replaceValues.Defines; + } + if (replaceValues.Includes && variable == "INCLUDES") { + return replaceValues.Includes; + } + if (replaceValues.TargetPDB) { + if (variable == "TARGET_PDB") { + return replaceValues.TargetPDB; + } + } + if (replaceValues.TargetCompilePDB) { + if (variable == "TARGET_COMPILE_PDB") { + return replaceValues.TargetCompilePDB; + } + } + if (replaceValues.DependencyFile) { + if (variable == "DEP_FILE") { + return replaceValues.DependencyFile; + } + } + + if (replaceValues.Target) { + if (variable == "TARGET_QUOTED") { + std::string targetQuoted = replaceValues.Target; + if (!targetQuoted.empty() && targetQuoted[0] != '\"') { + targetQuoted = '\"'; + targetQuoted += replaceValues.Target; + targetQuoted += '\"'; + } + return targetQuoted; + } + if (variable == "TARGET_UNQUOTED") { + std::string unquoted = replaceValues.Target; + std::string::size_type sz = unquoted.size(); + if (sz > 2 && unquoted[0] == '\"' && unquoted[sz - 1] == '\"') { + unquoted = unquoted.substr(1, sz - 2); + } + return unquoted; + } + if (replaceValues.LanguageCompileFlags) { + if (variable == "LANGUAGE_COMPILE_FLAGS") { + return replaceValues.LanguageCompileFlags; + } + } + if (replaceValues.Target) { + if (variable == "TARGET") { + return replaceValues.Target; + } + } + if (variable == "TARGET_IMPLIB") { + return this->TargetImpLib; + } + if (variable == "TARGET_VERSION_MAJOR") { + if (replaceValues.TargetVersionMajor) { + return replaceValues.TargetVersionMajor; + } + return "0"; + } + if (variable == "TARGET_VERSION_MINOR") { + if (replaceValues.TargetVersionMinor) { + return replaceValues.TargetVersionMinor; + } + return "0"; + } + if (replaceValues.Target) { + if (variable == "TARGET_BASE") { + // Strip the last extension off the target name. + std::string targetBase = replaceValues.Target; + std::string::size_type pos = targetBase.rfind('.'); + if (pos != targetBase.npos) { + return targetBase.substr(0, pos); + } + return targetBase; + } + } + } + if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" || + variable == "TARGET_INSTALLNAME_DIR") { + // All these variables depend on TargetSOName + if (replaceValues.TargetSOName) { + if (variable == "TARGET_SONAME") { + return replaceValues.TargetSOName; + } + if (variable == "SONAME_FLAG" && replaceValues.SONameFlag) { + return replaceValues.SONameFlag; + } + if (replaceValues.TargetInstallNameDir && + variable == "TARGET_INSTALLNAME_DIR") { + return replaceValues.TargetInstallNameDir; + } + } + return ""; + } + if (replaceValues.LinkLibraries) { + if (variable == "LINK_LIBRARIES") { + return replaceValues.LinkLibraries; + } + } + if (replaceValues.Language) { + if (variable == "LANGUAGE") { + return replaceValues.Language; + } + } + if (replaceValues.CMTargetName) { + if (variable == "TARGET_NAME") { + return replaceValues.CMTargetName; + } + } + if (replaceValues.CMTargetType) { + if (variable == "TARGET_TYPE") { + return replaceValues.CMTargetType; + } + } + if (replaceValues.Output) { + if (variable == "OUTPUT") { + return replaceValues.Output; + } + } + if (variable == "CMAKE_COMMAND") { + return outputConverter->ConvertToOutputFormat( + cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), + cmOutputConverter::SHELL); + } + + std::map::iterator compIt = + this->Compilers.find(variable); + + if (compIt != this->Compilers.end()) { + std::string ret = outputConverter->ConvertToOutputForExisting( + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]); + std::string const& compilerArg1 = + this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; + std::string const& compilerTarget = + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + std::string const& compilerOptionTarget = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_TARGET"]; + std::string const& compilerExternalToolchain = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionExternalToolchain = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionSysroot = + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_SYSROOT"]; + + // if there is a required first argument to the compiler add it + // to the compiler string + if (!compilerArg1.empty()) { + ret += " "; + ret += compilerArg1; + } + if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { + ret += " "; + ret += compilerOptionTarget; + ret += compilerTarget; + } + if (!compilerExternalToolchain.empty() && + !compilerOptionExternalToolchain.empty()) { + ret += " "; + ret += compilerOptionExternalToolchain; + ret += outputConverter->EscapeForShell(compilerExternalToolchain, true); + } + if (!this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { + ret += " "; + ret += compilerOptionSysroot; + ret += outputConverter->EscapeForShell(this->CompilerSysroot, true); + } + return ret; + } + + std::map::iterator mapIt = + this->VariableMappings.find(variable); + if (mapIt != this->VariableMappings.end()) { + if (variable.find("_FLAG") == variable.npos) { + return outputConverter->ConvertToOutputForExisting(mapIt->second); + } + return mapIt->second; + } + return variable; +} + +void cmRulePlaceholderExpander::ExpandRuleVariables( + cmOutputConverter* outputConverter, std::string& s, + const RuleVariables& replaceValues) +{ + std::string::size_type start = s.find('<'); + // no variables to expand + if (start == s.npos) { + return; + } + std::string::size_type pos = 0; + std::string expandedInput; + while (start != s.npos && start < s.size() - 2) { + std::string::size_type end = s.find('>', start); + // if we find a < with no > we are done + if (end == s.npos) { + return; + } + char c = s[start + 1]; + // if the next char after the < is not A-Za-z then + // skip it and try to find the next < in the string + if (!isalpha(c)) { + start = s.find('<', start + 1); + } else { + // extract the var + std::string var = s.substr(start + 1, end - start - 1); + std::string replace = + this->ExpandRuleVariable(outputConverter, var, replaceValues); + expandedInput += s.substr(pos, start - pos); + expandedInput += replace; + // move to next one + start = s.find('<', start + var.size() + 2); + pos = end + 1; + } + } + // add the rest of the input + expandedInput += s.substr(pos, s.size() - pos); + s = expandedInput; +} diff --git a/Source/cmRulePlaceholderExpander.h b/Source/cmRulePlaceholderExpander.h new file mode 100644 index 0000000..444419c --- /dev/null +++ b/Source/cmRulePlaceholderExpander.h @@ -0,0 +1,83 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmRulePlaceholderExpander_h +#define cmRulePlaceholderExpander_h + +#include // IWYU pragma: keep + +#include +#include + +class cmGeneratorTarget; +class cmOutputConverter; + +class cmRulePlaceholderExpander +{ +public: + cmRulePlaceholderExpander( + std::map const& compilers, + std::map const& variableMappings, + std::string const& compilerSysroot); + + void SetTargetImpLib(std::string const& targetImpLib) + { + this->TargetImpLib = targetImpLib; + } + + // Create a struct to hold the varibles passed into + // ExpandRuleVariables + struct RuleVariables + { + RuleVariables(); + const char* CMTargetName; + const char* CMTargetType; + const char* TargetPDB; + const char* TargetCompilePDB; + const char* TargetVersionMajor; + const char* TargetVersionMinor; + const char* Language; + const char* Objects; + const char* Target; + const char* LinkLibraries; + const char* Source; + const char* AssemblySource; + const char* PreprocessedSource; + const char* Output; + const char* Object; + const char* ObjectDir; + const char* ObjectFileDir; + const char* Flags; + const char* ObjectsQuoted; + const char* SONameFlag; + const char* TargetSOName; + const char* TargetInstallNameDir; + const char* LinkFlags; + const char* Manifests; + const char* LanguageCompileFlags; + const char* Defines; + const char* Includes; + const char* RuleLauncher; + const char* DependencyFile; + const char* FilterPrefix; + }; + + // Expand rule variables in CMake of the type found in language rules + void ExpandRuleVariables(cmOutputConverter* outputConverter, + std::string& string, + const RuleVariables& replaceValues); + + // Expand rule variables in a single string + std::string ExpandRuleVariable(cmOutputConverter* outputConverter, + std::string const& variable, + const RuleVariables& replaceValues); + +private: + std::string TargetImpLib; + + std::map Compilers; + std::map VariableMappings; + std::string CompilerSysroot; +}; + +#endif diff --git a/bootstrap b/bootstrap index fb8b1eb..9936365 100755 --- a/bootstrap +++ b/bootstrap @@ -281,6 +281,7 @@ CMAKE_CXX_SOURCES="\ cmInstallDirectoryGenerator \ cmLocalCommonGenerator \ cmLocalGenerator \ + cmRulePlaceholderExpander \ cmInstalledFile \ cmInstallGenerator \ cmInstallExportGenerator \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f796e1b6f6984b200453a13e6b8640353ff9488b commit f796e1b6f6984b200453a13e6b8640353ff9488b Author: Stephen Kelly AuthorDate: Tue Oct 11 19:33:42 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Move memset to cxx file diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index fad7fae..849ffe4 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -560,6 +560,11 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->Makefile->GetStateSnapshot(); } +cmLocalGenerator::RuleVariables::RuleVariables() +{ + memset(this, 0, sizeof(*this)); +} + std::string cmLocalGenerator::ExpandRuleVariable( cmOutputConverter* outputConverter, std::string const& variable, const RuleVariables& replaceValues) diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index c51aa85..6e6791d 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -221,7 +221,7 @@ public: // ExpandRuleVariables struct RuleVariables { - RuleVariables() { memset(this, 0, sizeof(*this)); } + RuleVariables(); const char* CMTargetName; const char* CMTargetType; const char* TargetPDB; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c75a9d660169ddd1e7be57486d3813ca73886b55 commit c75a9d660169ddd1e7be57486d3813ca73886b55 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Use strings instead of a Target in rule replacement Don't rely on the cmGeneratorTarget type needlessly. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6dd90c8..fad7fae 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -724,12 +724,14 @@ std::string cmLocalGenerator::ExpandRuleVariable( return replaceValues.Language; } } - if (replaceValues.CMTarget) { + if (replaceValues.CMTargetName) { if (variable == "TARGET_NAME") { - return replaceValues.CMTarget->GetName(); + return replaceValues.CMTargetName; } + } + if (replaceValues.CMTargetType) { if (variable == "TARGET_TYPE") { - return cmState::GetTargetTypeName(replaceValues.CMTarget->GetType()); + return replaceValues.CMTargetType; } } if (replaceValues.Output) { @@ -747,7 +749,7 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->Compilers.find(variable); if (compIt != this->Compilers.end()) { - std::string ret = this->ConvertToOutputForExisting( + std::string ret = outputConverter->ConvertToOutputForExisting( this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]); std::string const& compilerArg1 = this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 7359f50..c51aa85 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -222,7 +222,8 @@ public: struct RuleVariables { RuleVariables() { memset(this, 0, sizeof(*this)); } - cmGeneratorTarget* CMTarget; + const char* CMTargetName; + const char* CMTargetType; const char* TargetPDB; const char* TargetCompilePDB; const char* TargetVersionMajor; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index a4c73dd..6906cbf 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -989,7 +989,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( // Expand rules in the empty string. It may insert the launcher and // perform replacements. RuleVariables vars; - vars.CMTarget = target; + vars.CMTargetName = target->GetName().c_str(); + vars.CMTargetType = cmState::GetTargetTypeName(target->GetType()); std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 92d6185..fafff01 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -332,7 +332,9 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string manifests = this->GetManifests(); cmLocalGenerator::RuleVariables vars; - vars.CMTarget = this->GeneratorTarget; + vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 0566c1b..1ae34d6 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -540,7 +540,9 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( vars.TargetVersionMajor = targetVersionMajor.c_str(); vars.TargetVersionMinor = targetVersionMinor.c_str(); - vars.CMTarget = this->GeneratorTarget; + vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 77643d1..9492a61 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -545,7 +545,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } cmLocalGenerator::RuleVariables vars; vars.RuleLauncher = "RULE_LAUNCH_COMPILE"; - vars.CMTarget = this->GeneratorTarget; + vars.CMTargetName = this->GeneratorTarget->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GeneratorTarget->GetType()); vars.Language = lang.c_str(); vars.Target = targetOutPathReal.c_str(); vars.TargetPDB = targetOutPathPDB.c_str(); diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 154f3c3..3adc068 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -168,7 +168,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) if (!this->GetGlobalGenerator()->HasRule(ruleName)) { cmLocalGenerator::RuleVariables vars; - vars.CMTarget = this->GetGeneratorTarget(); + vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); + vars.Language = this->TargetLinkLanguage.c_str(); std::string responseFlag; diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 8ae055f..c718ad4 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -374,7 +374,9 @@ void cmNinjaTargetGenerator::WriteLanguageRules(const std::string& language) void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) { cmLocalGenerator::RuleVariables vars; - vars.CMTarget = this->GetGeneratorTarget(); + vars.CMTargetName = this->GetGeneratorTarget()->GetName().c_str(); + vars.CMTargetType = + cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()); vars.Language = lang.c_str(); vars.Source = "$IN_ABS"; vars.Object = "$out"; @@ -474,7 +476,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) std::string const ppDepfile = "$DEP_FILE"; cmLocalGenerator::RuleVariables ppVars; - ppVars.CMTarget = vars.CMTarget; + ppVars.CMTargetName = vars.CMTargetName; + ppVars.CMTargetType = vars.CMTargetType; ppVars.Language = vars.Language; ppVars.Object = "$out"; // for RULE_LAUNCH_COMPILE ppVars.PreprocessedSource = "$out"; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=46ad0d2183230d1af93242efbdcce20d55514efb commit 46ad0d2183230d1af93242efbdcce20d55514efb Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:50 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Use a converter in rule replacement API The rule replacement API should not really be in cmLocalGenerator, but it was historically, and this coupled many other things together here too, such as output conversion. Make the output converter a parameter so that rule replacement can be removed from cmLocalGenerator. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 42e4b63..6dd90c8 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -561,7 +561,8 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const } std::string cmLocalGenerator::ExpandRuleVariable( - std::string const& variable, const RuleVariables& replaceValues) + cmOutputConverter* outputConverter, std::string const& variable, + const RuleVariables& replaceValues) { if (replaceValues.LinkFlags) { if (variable == "LINK_FLAGS") { @@ -737,7 +738,7 @@ std::string cmLocalGenerator::ExpandRuleVariable( } } if (variable == "CMAKE_COMMAND") { - return this->ConvertToOutputFormat( + return outputConverter->ConvertToOutputFormat( cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), SHELL); } @@ -780,12 +781,12 @@ std::string cmLocalGenerator::ExpandRuleVariable( !compilerOptionExternalToolchain.empty()) { ret += " "; ret += compilerOptionExternalToolchain; - ret += this->EscapeForShell(compilerExternalToolchain, true); + ret += outputConverter->EscapeForShell(compilerExternalToolchain, true); } if (!this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { ret += " "; ret += compilerOptionSysroot; - ret += this->EscapeForShell(this->CompilerSysroot, true); + ret += outputConverter->EscapeForShell(this->CompilerSysroot, true); } return ret; } @@ -794,14 +795,15 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->VariableMappings.find(variable); if (mapIt != this->VariableMappings.end()) { if (variable.find("_FLAG") == variable.npos) { - return this->ConvertToOutputForExisting(mapIt->second); + return outputConverter->ConvertToOutputForExisting(mapIt->second); } return mapIt->second; } return variable; } -void cmLocalGenerator::ExpandRuleVariables(std::string& s, +void cmLocalGenerator::ExpandRuleVariables(cmOutputConverter* outputConverter, + std::string& s, const RuleVariables& replaceValues) { std::string::size_type start = s.find('<'); @@ -825,7 +827,8 @@ void cmLocalGenerator::ExpandRuleVariables(std::string& s, } else { // extract the var std::string var = s.substr(start + 1, end - start - 1); - std::string replace = this->ExpandRuleVariable(var, replaceValues); + std::string replace = + this->ExpandRuleVariable(outputConverter, var, replaceValues); expandedInput += s.substr(pos, start - pos); expandedInput += replace; // move to next one diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index d54fbff..7359f50 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -347,7 +347,8 @@ public: void ProcessEvaluationFiles(std::vector& generatedFiles); // Expand rule variables in CMake of the type found in language rules - void ExpandRuleVariables(std::string& string, + void ExpandRuleVariables(cmOutputConverter* outputConverter, + std::string& string, const RuleVariables& replaceValues); const char* GetRuleLauncher(cmGeneratorTarget* target, @@ -361,7 +362,8 @@ protected: std::string& frameworkPath, std::string& linkPath); // Expand rule variables in a single string - std::string ExpandRuleVariable(std::string const& variable, + std::string ExpandRuleVariable(cmOutputConverter* outputConverter, + std::string const& variable, const RuleVariables& replaceValues); // Handle old-style install rules stored in the targets. diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index ea711c0..05596f8 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -494,7 +494,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( std::string launcher = property_value; launcher += " "; - this->ExpandRuleVariables(launcher, vars); + this->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 92b58ba..a4c73dd 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1005,7 +1005,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( launcher = val; launcher += " "; - this->ExpandRuleVariables(launcher, vars); + this->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index da29b60..92d6185 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -396,7 +396,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } this->LocalGenerator->TargetImplib = ""; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 5700c62..0566c1b 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -619,7 +619,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveCreateCommands.begin(); i != archiveCreateCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(cmd, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); real_link_commands.push_back(cmd); } } @@ -630,7 +631,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveAppendCommands.begin(); i != archiveAppendCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(cmd, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); real_link_commands.push_back(cmd); } } @@ -640,7 +642,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( archiveFinishCommands.begin(); i != archiveFinishCommands.end(); ++i) { std::string cmd = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(cmd, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, cmd, + vars); // If there is no ranlib the command will be ":". Skip it. if (!cmd.empty() && cmd[0] != ':') { real_link_commands.push_back(cmd); @@ -663,7 +666,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { *i = launcher + *i; - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } } this->LocalGenerator->TargetImplib = ""; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 84ae726..77643d1 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -600,7 +600,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( if (this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS") && lang_can_export_cmds && compileCommands.size() == 1) { std::string compileCommand = compileCommands[0]; - this->LocalGenerator->ExpandRuleVariables(compileCommand, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, + compileCommand, vars); std::string workingDirectory = cmSystemTools::CollapseFullPath( this->LocalGenerator->GetCurrentBinaryDirectory()); compileCommand.replace(compileCommand.find(langFlags), langFlags.size(), @@ -659,7 +660,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = compileCommands.begin(); i != compileCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } // Change the command working directory to the local build tree. @@ -722,7 +724,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = preprocessCommands.begin(); i != preprocessCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } this->LocalGenerator->CreateCDCommand( @@ -769,7 +772,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Expand placeholders in the commands. for (std::vector::iterator i = assemblyCommands.begin(); i != assemblyCommands.end(); ++i) { - this->LocalGenerator->ExpandRuleVariables(*i, vars); + this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i, + vars); } this->LocalGenerator->CreateCDCommand( diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 64c434a..154f3c3 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -250,7 +250,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) for (std::vector::iterator i = linkCmds.begin(); i != linkCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, vars); } { // If there is no ranlib the command will be ":". Skip it. diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index f85ea81..8ae055f 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -503,7 +503,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = ppCmds.begin(); i != ppCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(*i, ppVars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, ppVars); } // Run CMake dependency scanner on preprocessed output. @@ -616,7 +617,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { *i = launcher + *i; - this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, vars); } std::string cmdLine = @@ -1003,7 +1005,8 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { - this->GetLocalGenerator()->ExpandRuleVariables(*i, compileObjectVars); + this->GetLocalGenerator()->ExpandRuleVariables(this->GetLocalGenerator(), + *i, compileObjectVars); } std::string cmdLine = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2628dec12cb22546d2a21032f53fb0ef096faec8 commit 2628dec12cb22546d2a21032f53fb0ef096faec8 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Store variable replacements as state These do not change over the lifetime of the cmLocalGenerator. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 3543019..42e4b63 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -40,6 +40,28 @@ #include #endif +// List of variables that are replaced when +// rules are expanced. These variables are +// replaced in the form with GetSafeDefinition(var). +// ${LANG} is replaced in the variable first with all enabled +// languages. +static const char* ruleReplaceVars[] = { + "CMAKE_${LANG}_COMPILER", + "CMAKE_SHARED_LIBRARY_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_${LANG}_FLAGS", + "CMAKE_SHARED_LIBRARY_${LANG}_FLAGS", + "CMAKE_${LANG}_LINK_FLAGS", + "CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG", + "CMAKE_${LANG}_ARCHIVE", + "CMAKE_AR", + "CMAKE_CURRENT_SOURCE_DIR", + "CMAKE_CURRENT_BINARY_DIR", + "CMAKE_RANLIB", + "CMAKE_LINKER", + "CMAKE_CL_SHOWINCLUDES_PREFIX" +}; + cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) : cmOutputConverter(makefile->GetStateSnapshot()) , StateSnapshot(makefile->GetStateSnapshot()) @@ -56,6 +78,58 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) this->BackwardsCompatibilityFinal = false; this->ComputeObjectMaxPath(); + + std::vector enabledLanguages = + this->GetState()->GetEnabledLanguages(); + + this->CompilerSysroot = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); + + for (std::vector::iterator i = enabledLanguages.begin(); + i != enabledLanguages.end(); ++i) { + std::string const& lang = *i; + if (lang == "NONE") { + continue; + } + this->Compilers["CMAKE_" + lang + "_COMPILER"] = lang; + + this->VariableMappings["CMAKE_" + lang + "_COMPILER"] = + this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER"); + + std::string const& compilerArg1 = "CMAKE_" + lang + "_COMPILER_ARG1"; + std::string const& compilerTarget = "CMAKE_" + lang + "_COMPILER_TARGET"; + std::string const& compilerOptionTarget = + "CMAKE_" + lang + "_COMPILE_OPTIONS_TARGET"; + std::string const& compilerExternalToolchain = + "CMAKE_" + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionExternalToolchain = + "CMAKE_" + lang + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionSysroot = + "CMAKE_" + lang + "_COMPILE_OPTIONS_SYSROOT"; + + this->VariableMappings[compilerArg1] = + this->Makefile->GetSafeDefinition(compilerArg1); + this->VariableMappings[compilerTarget] = + this->Makefile->GetSafeDefinition(compilerTarget); + this->VariableMappings[compilerOptionTarget] = + this->Makefile->GetSafeDefinition(compilerOptionTarget); + this->VariableMappings[compilerExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerExternalToolchain); + this->VariableMappings[compilerOptionExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); + this->VariableMappings[compilerOptionSysroot] = + this->Makefile->GetSafeDefinition(compilerOptionSysroot); + + for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); + replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { + std::string actualReplace = *replaceIter; + if (actualReplace.find("${LANG}") != actualReplace.npos) { + cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); + } + + this->VariableMappings[actualReplace] = + this->Makefile->GetSafeDefinition(actualReplace); + } + } } cmLocalGenerator::~cmLocalGenerator() @@ -486,28 +560,6 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->Makefile->GetStateSnapshot(); } -// List of variables that are replaced when -// rules are expanced. These variables are -// replaced in the form with GetSafeDefinition(var). -// ${LANG} is replaced in the variable first with all enabled -// languages. -static const char* ruleReplaceVars[] = { - "CMAKE_${LANG}_COMPILER", - "CMAKE_SHARED_LIBRARY_CREATE_${LANG}_FLAGS", - "CMAKE_SHARED_MODULE_CREATE_${LANG}_FLAGS", - "CMAKE_SHARED_MODULE_${LANG}_FLAGS", - "CMAKE_SHARED_LIBRARY_${LANG}_FLAGS", - "CMAKE_${LANG}_LINK_FLAGS", - "CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG", - "CMAKE_${LANG}_ARCHIVE", - "CMAKE_AR", - "CMAKE_CURRENT_SOURCE_DIR", - "CMAKE_CURRENT_BINARY_DIR", - "CMAKE_RANLIB", - "CMAKE_LINKER", - "CMAKE_CL_SHOWINCLUDES_PREFIX" -}; - std::string cmLocalGenerator::ExpandRuleVariable( std::string const& variable, const RuleVariables& replaceValues) { @@ -689,84 +741,29 @@ std::string cmLocalGenerator::ExpandRuleVariable( cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()), SHELL); } - std::vector enabledLanguages = - this->GetState()->GetEnabledLanguages(); - - std::map compilers; - - std::map variableMappings; - - std::string compilerSysroot = - this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); - - for (std::vector::iterator i = enabledLanguages.begin(); - i != enabledLanguages.end(); ++i) { - std::string const& lang = *i; - if (lang == "NONE") { - continue; - } - compilers["CMAKE_" + lang + "_COMPILER"] = lang; - - variableMappings["CMAKE_" + lang + "_COMPILER"] = - this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER"); - - std::string const& compilerArg1 = "CMAKE_" + lang + "_COMPILER_ARG1"; - std::string const& compilerTarget = "CMAKE_" + lang + "_COMPILER_TARGET"; - std::string const& compilerOptionTarget = - "CMAKE_" + lang + "_COMPILE_OPTIONS_TARGET"; - std::string const& compilerExternalToolchain = - "CMAKE_" + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"; - std::string const& compilerOptionExternalToolchain = - "CMAKE_" + lang + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"; - std::string const& compilerOptionSysroot = - "CMAKE_" + lang + "_COMPILE_OPTIONS_SYSROOT"; - - variableMappings[compilerArg1] = - this->Makefile->GetSafeDefinition(compilerArg1); - variableMappings[compilerTarget] = - this->Makefile->GetSafeDefinition(compilerTarget); - variableMappings[compilerOptionTarget] = - this->Makefile->GetSafeDefinition(compilerOptionTarget); - variableMappings[compilerExternalToolchain] = - this->Makefile->GetSafeDefinition(compilerExternalToolchain); - variableMappings[compilerOptionExternalToolchain] = - this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); - variableMappings[compilerOptionSysroot] = - this->Makefile->GetSafeDefinition(compilerOptionSysroot); - - for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); - replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { - std::string const& lang = *i; - std::string actualReplace = *replaceIter; - if (actualReplace.find("${LANG}") != actualReplace.npos) { - cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); - } - - variableMappings[actualReplace] = - this->Makefile->GetSafeDefinition(actualReplace); - } - } std::map::iterator compIt = - compilers.find(variable); + this->Compilers.find(variable); - if (compIt != compilers.end()) { + if (compIt != this->Compilers.end()) { std::string ret = this->ConvertToOutputForExisting( - variableMappings["CMAKE_" + compIt->second + "_COMPILER"]); + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER"]); std::string const& compilerArg1 = - variableMappings[compIt->first + "_COMPILER_ARG1"]; + this->VariableMappings[compIt->first + "_COMPILER_ARG1"]; std::string const& compilerTarget = - variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + this->VariableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; std::string const& compilerOptionTarget = - variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_TARGET"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_TARGET"]; std::string const& compilerExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; std::string const& compilerOptionExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; std::string const& compilerOptionSysroot = - variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_SYSROOT"]; + this->VariableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_SYSROOT"]; // if there is a required first argument to the compiler add it // to the compiler string @@ -785,17 +782,17 @@ std::string cmLocalGenerator::ExpandRuleVariable( ret += compilerOptionExternalToolchain; ret += this->EscapeForShell(compilerExternalToolchain, true); } - if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { + if (!this->CompilerSysroot.empty() && !compilerOptionSysroot.empty()) { ret += " "; ret += compilerOptionSysroot; - ret += this->EscapeForShell(compilerSysroot, true); + ret += this->EscapeForShell(this->CompilerSysroot, true); } return ret; } std::map::iterator mapIt = - variableMappings.find(variable); - if (mapIt != variableMappings.end()) { + this->VariableMappings.find(variable); + if (mapIt != this->VariableMappings.end()) { if (variable.find("_FLAG") == variable.npos) { return this->ConvertToOutputForExisting(mapIt->second); } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 44d10bb..d54fbff 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -390,6 +390,10 @@ protected: std::vector OwnedImportedGeneratorTargets; std::map AliasTargets; + std::map Compilers; + std::map VariableMappings; + std::string CompilerSysroot; + bool EmitUniversalBinaryFlags; // Hack for ExpandRuleVariable until object-oriented version is https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=315b9a31895ca6bb26eba12bff3a0fe9cd37568a commit 315b9a31895ca6bb26eba12bff3a0fe9cd37568a Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Merge loops which populate mapping diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 3957641..3543019 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -733,6 +733,18 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); variableMappings[compilerOptionSysroot] = this->Makefile->GetSafeDefinition(compilerOptionSysroot); + + for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); + replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { + std::string const& lang = *i; + std::string actualReplace = *replaceIter; + if (actualReplace.find("${LANG}") != actualReplace.npos) { + cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); + } + + variableMappings[actualReplace] = + this->Makefile->GetSafeDefinition(actualReplace); + } } std::map::iterator compIt = @@ -781,20 +793,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( return ret; } - for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); - replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { - for (std::vector::iterator i = enabledLanguages.begin(); - i != enabledLanguages.end(); ++i) { - std::string const& lang = *i; - std::string actualReplace = *replaceIter; - if (actualReplace.find("${LANG}") != actualReplace.npos) { - cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); - } - - variableMappings[actualReplace] = - this->Makefile->GetSafeDefinition(actualReplace); - } - } std::map::iterator mapIt = variableMappings.find(variable); if (mapIt != variableMappings.end()) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5feb5b34cd9f595bf42aa934738b918785e3e87 commit d5feb5b34cd9f595bf42aa934738b918785e3e87 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Populate variable mapping for all replacements This reduces the final replacement to a simple query in the map, which is much more readable than what was here before. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 0cf2e54..3957641 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -738,8 +738,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::map::iterator compIt = compilers.find(variable); - std::string replace = this->Makefile->GetSafeDefinition(variable); - if (compIt != compilers.end()) { std::string ret = this->ConvertToOutputForExisting( variableMappings["CMAKE_" + compIt->second + "_COMPILER"]); @@ -783,7 +781,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( return ret; } - // loop over language specific replace variables for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { for (std::vector::iterator i = enabledLanguages.begin(); @@ -793,14 +790,18 @@ std::string cmLocalGenerator::ExpandRuleVariable( if (actualReplace.find("${LANG}") != actualReplace.npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); } - if (actualReplace == variable) { - // if the variable is not a FLAG then treat it like a path - if (variable.find("_FLAG") == variable.npos) { - return this->ConvertToOutputForExisting(replace); - } - return replace; - } + + variableMappings[actualReplace] = + this->Makefile->GetSafeDefinition(actualReplace); + } + } + std::map::iterator mapIt = + variableMappings.find(variable); + if (mapIt != variableMappings.end()) { + if (variable.find("_FLAG") == variable.npos) { + return this->ConvertToOutputForExisting(mapIt->second); } + return mapIt->second; } return variable; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efba22e1deebcfc3924d5f14c026104eb4b62d28 commit efba22e1deebcfc3924d5f14c026104eb4b62d28 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Extract compiler option replacement from loop There is no need to be in the loop. Being there just adds to complexity. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f491895..0cf2e54 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -735,6 +735,54 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->Makefile->GetSafeDefinition(compilerOptionSysroot); } + std::map::iterator compIt = + compilers.find(variable); + + std::string replace = this->Makefile->GetSafeDefinition(variable); + + if (compIt != compilers.end()) { + std::string ret = this->ConvertToOutputForExisting( + variableMappings["CMAKE_" + compIt->second + "_COMPILER"]); + std::string const& compilerArg1 = + variableMappings[compIt->first + "_COMPILER_ARG1"]; + std::string const& compilerTarget = + variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + std::string const& compilerOptionTarget = + variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_TARGET"]; + std::string const& compilerExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionSysroot = + variableMappings["CMAKE_" + compIt->second + "_COMPILE_OPTIONS_SYSROOT"]; + + // if there is a required first argument to the compiler add it + // to the compiler string + if (!compilerArg1.empty()) { + ret += " "; + ret += compilerArg1; + } + if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { + ret += " "; + ret += compilerOptionTarget; + ret += compilerTarget; + } + if (!compilerExternalToolchain.empty() && + !compilerOptionExternalToolchain.empty()) { + ret += " "; + ret += compilerOptionExternalToolchain; + ret += this->EscapeForShell(compilerExternalToolchain, true); + } + if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { + ret += " "; + ret += compilerOptionSysroot; + ret += this->EscapeForShell(compilerSysroot, true); + } + return ret; + } + // loop over language specific replace variables for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { @@ -742,56 +790,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( i != enabledLanguages.end(); ++i) { std::string const& lang = *i; std::string actualReplace = *replaceIter; - - std::map::iterator compIt = - compilers.find(variable); - - std::string replace = this->Makefile->GetSafeDefinition(variable); - - if (compIt != compilers.end()) { - std::string ret = this->ConvertToOutputForExisting( - variableMappings["CMAKE_" + compIt->second + "_COMPILER"]); - std::string const& compilerArg1 = - variableMappings[compIt->first + "_COMPILER_ARG1"]; - std::string const& compilerTarget = - variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; - std::string const& compilerOptionTarget = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_TARGET"]; - std::string const& compilerExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionExternalToolchain = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; - std::string const& compilerOptionSysroot = - variableMappings["CMAKE_" + compIt->second + - "_COMPILE_OPTIONS_SYSROOT"]; - - // if there is a required first argument to the compiler add it - // to the compiler string - if (!compilerArg1.empty()) { - ret += " "; - ret += compilerArg1; - } - if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { - ret += " "; - ret += compilerOptionTarget; - ret += compilerTarget; - } - if (!compilerExternalToolchain.empty() && - !compilerOptionExternalToolchain.empty()) { - ret += " "; - ret += compilerOptionExternalToolchain; - ret += this->EscapeForShell(compilerExternalToolchain, true); - } - if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { - ret += " "; - ret += compilerOptionSysroot; - ret += this->EscapeForShell(compilerSysroot, true); - } - return ret; - } if (actualReplace.find("${LANG}") != actualReplace.npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b29425f7aafe07eff526f3c7defb317856b72984 commit b29425f7aafe07eff526f3c7defb317856b72984 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:49 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Populate a container of mappings for replacements The same variables are replaced/retrieved from cmMakefile again and again. Use a container so that they don't have to be retrieved repeatedly, and to simplify the nested loop. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index d451270..f491895 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -693,6 +693,12 @@ std::string cmLocalGenerator::ExpandRuleVariable( this->GetState()->GetEnabledLanguages(); std::map compilers; + + std::map variableMappings; + + std::string compilerSysroot = + this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); + for (std::vector::iterator i = enabledLanguages.begin(); i != enabledLanguages.end(); ++i) { std::string const& lang = *i; @@ -700,6 +706,33 @@ std::string cmLocalGenerator::ExpandRuleVariable( continue; } compilers["CMAKE_" + lang + "_COMPILER"] = lang; + + variableMappings["CMAKE_" + lang + "_COMPILER"] = + this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER"); + + std::string const& compilerArg1 = "CMAKE_" + lang + "_COMPILER_ARG1"; + std::string const& compilerTarget = "CMAKE_" + lang + "_COMPILER_TARGET"; + std::string const& compilerOptionTarget = + "CMAKE_" + lang + "_COMPILE_OPTIONS_TARGET"; + std::string const& compilerExternalToolchain = + "CMAKE_" + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionExternalToolchain = + "CMAKE_" + lang + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"; + std::string const& compilerOptionSysroot = + "CMAKE_" + lang + "_COMPILE_OPTIONS_SYSROOT"; + + variableMappings[compilerArg1] = + this->Makefile->GetSafeDefinition(compilerArg1); + variableMappings[compilerTarget] = + this->Makefile->GetSafeDefinition(compilerTarget); + variableMappings[compilerOptionTarget] = + this->Makefile->GetSafeDefinition(compilerOptionTarget); + variableMappings[compilerExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerExternalToolchain); + variableMappings[compilerOptionExternalToolchain] = + this->Makefile->GetSafeDefinition(compilerOptionExternalToolchain); + variableMappings[compilerOptionSysroot] = + this->Makefile->GetSafeDefinition(compilerOptionSysroot); } // loop over language specific replace variables @@ -707,17 +740,8 @@ std::string cmLocalGenerator::ExpandRuleVariable( replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { for (std::vector::iterator i = enabledLanguages.begin(); i != enabledLanguages.end(); ++i) { - const char* lang = i->c_str(); + std::string const& lang = *i; std::string actualReplace = *replaceIter; - // If this is the compiler then look for the extra variable - // _COMPILER_ARG1 which must be the first argument to the compiler - const char* compilerArg1 = CM_NULLPTR; - const char* compilerTarget = CM_NULLPTR; - const char* compilerOptionTarget = CM_NULLPTR; - const char* compilerExternalToolchain = CM_NULLPTR; - const char* compilerOptionExternalToolchain = CM_NULLPTR; - const char* compilerSysroot = CM_NULLPTR; - const char* compilerOptionSysroot = CM_NULLPTR; std::map::iterator compIt = compilers.find(variable); @@ -725,40 +749,43 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::string replace = this->Makefile->GetSafeDefinition(variable); if (compIt != compilers.end()) { - std::string arg1 = compIt->first + "_ARG1"; - compilerArg1 = this->Makefile->GetDefinition(arg1); - compilerTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + "_COMPILER_TARGET"); - compilerOptionTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_TARGET"); - compilerExternalToolchain = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + - "_COMPILER_EXTERNAL_TOOLCHAIN"); - compilerOptionExternalToolchain = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"); - compilerSysroot = this->Makefile->GetDefinition("CMAKE_SYSROOT"); - compilerOptionSysroot = this->Makefile->GetDefinition( - std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_SYSROOT"); - - std::string ret = this->ConvertToOutputForExisting(replace); + std::string ret = this->ConvertToOutputForExisting( + variableMappings["CMAKE_" + compIt->second + "_COMPILER"]); + std::string const& compilerArg1 = + variableMappings[compIt->first + "_COMPILER_ARG1"]; + std::string const& compilerTarget = + variableMappings["CMAKE_" + compIt->second + "_COMPILER_TARGET"]; + std::string const& compilerOptionTarget = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_TARGET"]; + std::string const& compilerExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionExternalToolchain = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"]; + std::string const& compilerOptionSysroot = + variableMappings["CMAKE_" + compIt->second + + "_COMPILE_OPTIONS_SYSROOT"]; + // if there is a required first argument to the compiler add it // to the compiler string - if (compilerArg1) { + if (!compilerArg1.empty()) { ret += " "; ret += compilerArg1; } - if (compilerTarget && compilerOptionTarget) { + if (!compilerTarget.empty() && !compilerOptionTarget.empty()) { ret += " "; ret += compilerOptionTarget; ret += compilerTarget; } - if (compilerExternalToolchain && compilerOptionExternalToolchain) { + if (!compilerExternalToolchain.empty() && + !compilerOptionExternalToolchain.empty()) { ret += " "; ret += compilerOptionExternalToolchain; ret += this->EscapeForShell(compilerExternalToolchain, true); } - if (compilerSysroot && compilerOptionSysroot) { + if (!compilerSysroot.empty() && !compilerOptionSysroot.empty()) { ret += " "; ret += compilerOptionSysroot; ret += this->EscapeForShell(compilerSysroot, true); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f009d8f5e2e4007b93494c5d22ba25b41a4872a1 commit f009d8f5e2e4007b93494c5d22ba25b41a4872a1 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:48 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Move compiler option handling to be more direct diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 03f5d2c..d451270 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -740,6 +740,30 @@ std::string cmLocalGenerator::ExpandRuleVariable( compilerSysroot = this->Makefile->GetDefinition("CMAKE_SYSROOT"); compilerOptionSysroot = this->Makefile->GetDefinition( std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_SYSROOT"); + + std::string ret = this->ConvertToOutputForExisting(replace); + // if there is a required first argument to the compiler add it + // to the compiler string + if (compilerArg1) { + ret += " "; + ret += compilerArg1; + } + if (compilerTarget && compilerOptionTarget) { + ret += " "; + ret += compilerOptionTarget; + ret += compilerTarget; + } + if (compilerExternalToolchain && compilerOptionExternalToolchain) { + ret += " "; + ret += compilerOptionExternalToolchain; + ret += this->EscapeForShell(compilerExternalToolchain, true); + } + if (compilerSysroot && compilerOptionSysroot) { + ret += " "; + ret += compilerOptionSysroot; + ret += this->EscapeForShell(compilerSysroot, true); + } + return ret; } if (actualReplace.find("${LANG}") != actualReplace.npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); @@ -747,29 +771,7 @@ std::string cmLocalGenerator::ExpandRuleVariable( if (actualReplace == variable) { // if the variable is not a FLAG then treat it like a path if (variable.find("_FLAG") == variable.npos) { - std::string ret = this->ConvertToOutputForExisting(replace); - // if there is a required first argument to the compiler add it - // to the compiler string - if (compilerArg1) { - ret += " "; - ret += compilerArg1; - } - if (compilerTarget && compilerOptionTarget) { - ret += " "; - ret += compilerOptionTarget; - ret += compilerTarget; - } - if (compilerExternalToolchain && compilerOptionExternalToolchain) { - ret += " "; - ret += compilerOptionExternalToolchain; - ret += this->EscapeForShell(compilerExternalToolchain, true); - } - if (compilerSysroot && compilerOptionSysroot) { - ret += " "; - ret += compilerOptionSysroot; - ret += this->EscapeForShell(compilerSysroot, true); - } - return ret; + return this->ConvertToOutputForExisting(replace); } return replace; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6cd27a853a1c77e5da0a9a14140284a7674cf18c commit 6cd27a853a1c77e5da0a9a14140284a7674cf18c Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:48 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Move variable to where it can be used easily diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index c405180..03f5d2c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -722,6 +722,8 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::map::iterator compIt = compilers.find(variable); + std::string replace = this->Makefile->GetSafeDefinition(variable); + if (compIt != compilers.end()) { std::string arg1 = compIt->first + "_ARG1"; compilerArg1 = this->Makefile->GetDefinition(arg1); @@ -743,7 +745,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); } if (actualReplace == variable) { - std::string replace = this->Makefile->GetSafeDefinition(variable); // if the variable is not a FLAG then treat it like a path if (variable.find("_FLAG") == variable.npos) { std::string ret = this->ConvertToOutputForExisting(replace); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b0e4795687a2ea289d1313db24d75bcf3cd13bc commit 8b0e4795687a2ea289d1313db24d75bcf3cd13bc Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:48 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Use the language from the compiler container This is just to make follow-up diffs smaller. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a9de948..c405180 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -726,17 +726,18 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::string arg1 = compIt->first + "_ARG1"; compilerArg1 = this->Makefile->GetDefinition(arg1); compilerTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILER_TARGET"); + std::string("CMAKE_") + compIt->second + "_COMPILER_TARGET"); compilerOptionTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILE_OPTIONS_TARGET"); + std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_TARGET"); compilerExternalToolchain = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"); - compilerOptionExternalToolchain = - this->Makefile->GetDefinition(std::string("CMAKE_") + lang + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"); + std::string("CMAKE_") + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"); + compilerOptionExternalToolchain = this->Makefile->GetDefinition( + std::string("CMAKE_") + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"); compilerSysroot = this->Makefile->GetDefinition("CMAKE_SYSROOT"); compilerOptionSysroot = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILE_OPTIONS_SYSROOT"); + std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_SYSROOT"); } if (actualReplace.find("${LANG}") != actualReplace.npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88016e2e9f13d60c4a0b88fb64ffd802a2d9e534 commit 88016e2e9f13d60c4a0b88fb64ffd802a2d9e534 Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:48 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Introduce a container of compiler names Use it to determine when a rule replacement should gain extra options. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 4f285cf..a9de948 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -691,6 +691,17 @@ std::string cmLocalGenerator::ExpandRuleVariable( } std::vector enabledLanguages = this->GetState()->GetEnabledLanguages(); + + std::map compilers; + for (std::vector::iterator i = enabledLanguages.begin(); + i != enabledLanguages.end(); ++i) { + std::string const& lang = *i; + if (lang == "NONE") { + continue; + } + compilers["CMAKE_" + lang + "_COMPILER"] = lang; + } + // loop over language specific replace variables for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { @@ -707,9 +718,12 @@ std::string cmLocalGenerator::ExpandRuleVariable( const char* compilerOptionExternalToolchain = CM_NULLPTR; const char* compilerSysroot = CM_NULLPTR; const char* compilerOptionSysroot = CM_NULLPTR; - if (actualReplace == "CMAKE_${LANG}_COMPILER") { - std::string arg1 = actualReplace + "_ARG1"; - cmSystemTools::ReplaceString(arg1, "${LANG}", lang); + + std::map::iterator compIt = + compilers.find(variable); + + if (compIt != compilers.end()) { + std::string arg1 = compIt->first + "_ARG1"; compilerArg1 = this->Makefile->GetDefinition(arg1); compilerTarget = this->Makefile->GetDefinition( std::string("CMAKE_") + lang + "_COMPILER_TARGET"); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be87cb0c444595fa1970e257031252669c201d3e commit be87cb0c444595fa1970e257031252669c201d3e Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:48 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Simplify loop with range algorithm diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 138fe55..4f285cf 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -505,8 +505,7 @@ static const char* ruleReplaceVars[] = { "CMAKE_CURRENT_BINARY_DIR", "CMAKE_RANLIB", "CMAKE_LINKER", - "CMAKE_CL_SHOWINCLUDES_PREFIX", - CM_NULLPTR + "CMAKE_CL_SHOWINCLUDES_PREFIX" }; std::string cmLocalGenerator::ExpandRuleVariable( @@ -693,12 +692,12 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::vector enabledLanguages = this->GetState()->GetEnabledLanguages(); // loop over language specific replace variables - int pos = 0; - while (ruleReplaceVars[pos]) { + for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); + replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { for (std::vector::iterator i = enabledLanguages.begin(); i != enabledLanguages.end(); ++i) { const char* lang = i->c_str(); - std::string actualReplace = ruleReplaceVars[pos]; + std::string actualReplace = *replaceIter; // If this is the compiler then look for the extra variable // _COMPILER_ARG1 which must be the first argument to the compiler const char* compilerArg1 = CM_NULLPTR; @@ -759,7 +758,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( return replace; } } - pos++; } return variable; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=425cd1670fdd40b752af71e5f28952ae4fcec4ac commit 425cd1670fdd40b752af71e5f28952ae4fcec4ac Author: Stephen Kelly AuthorDate: Sun Oct 9 10:34:47 2016 +0200 Commit: Stephen Kelly CommitDate: Sat Oct 15 11:25:12 2016 +0200 cmLocalGenerator: Remove the launcher from RuleVariables This one is not like the others as it doesn't participate in substitutions. Keep ExpandRuleVariables doing only one thing and make callers responsible for inserting a launcher prefix, simplifying the code all-around. Remove now-obsolete InsertRuleLauncher method. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 3b19694..138fe55 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -767,10 +767,6 @@ std::string cmLocalGenerator::ExpandRuleVariable( void cmLocalGenerator::ExpandRuleVariables(std::string& s, const RuleVariables& replaceValues) { - if (replaceValues.RuleLauncher) { - this->InsertRuleLauncher(s, replaceValues.CMTarget, - replaceValues.RuleLauncher); - } std::string::size_type start = s.find('<'); // no variables to expand if (start == s.npos) { @@ -814,17 +810,6 @@ const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target, return this->Makefile->GetProperty(prop); } -void cmLocalGenerator::InsertRuleLauncher(std::string& s, - cmGeneratorTarget* target, - const std::string& prop) -{ - if (const char* val = this->GetRuleLauncher(target, prop)) { - std::ostringstream wrapped; - wrapped << val << " " << s; - s = wrapped.str(); - } -} - std::string cmLocalGenerator::ConvertToIncludeReference( std::string const& path, OutputFormat format, bool forceFullPaths) { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 69c4101..44d10bb 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -346,6 +346,13 @@ public: void CreateEvaluationFileOutputs(const std::string& config); void ProcessEvaluationFiles(std::vector& generatedFiles); + // Expand rule variables in CMake of the type found in language rules + void ExpandRuleVariables(std::string& string, + const RuleVariables& replaceValues); + + const char* GetRuleLauncher(cmGeneratorTarget* target, + const std::string& prop); + protected: ///! put all the libraries for a target on into the given stream void OutputLinkLibraries(cmComputeLinkInformation* pcli, @@ -353,18 +360,10 @@ protected: std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath); - // Expand rule variables in CMake of the type found in language rules - void ExpandRuleVariables(std::string& string, - const RuleVariables& replaceValues); // Expand rule variables in a single string std::string ExpandRuleVariable(std::string const& variable, const RuleVariables& replaceValues); - const char* GetRuleLauncher(cmGeneratorTarget* target, - const std::string& prop); - void InsertRuleLauncher(std::string& s, cmGeneratorTarget* target, - const std::string& prop); - // Handle old-style install rules stored in the targets. void GenerateTargetInstallRules( std::ostream& os, const std::string& config, diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index e25eb0f..ea711c0 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -468,8 +468,8 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatements() std::string cmLocalNinjaGenerator::MakeCustomLauncher( cmCustomCommandGenerator const& ccg) { - const char* property = "RULE_LAUNCH_CUSTOM"; - const char* property_value = this->Makefile->GetProperty(property); + const char* property_value = + this->Makefile->GetProperty("RULE_LAUNCH_CUSTOM"); if (!property_value || !*property_value) { return std::string(); @@ -478,7 +478,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( // Expand rules in the empty string. It may insert the launcher and // perform replacements. RuleVariables vars; - vars.RuleLauncher = property; + std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { @@ -491,7 +491,9 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( } vars.Output = output.c_str(); - std::string launcher; + std::string launcher = property_value; + launcher += " "; + this->ExpandRuleVariables(launcher, vars); if (!launcher.empty()) { launcher += " "; diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index b04788d..56aa9bf 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -58,12 +58,6 @@ public: return this->HomeRelativeOutputPath; } - void ExpandRuleVariables(std::string& string, - const RuleVariables& replaceValues) - { - cmLocalGenerator::ExpandRuleVariables(string, replaceValues); - } - std::string BuildCommandLine(const std::vector& cmdLines); void AppendTargetOutputs(cmGeneratorTarget* target, cmNinjaDeps& outputs); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 02eef59..92b58ba 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -984,13 +984,11 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( std::string launcher; // Short-circuit if there is no launcher. - const char* prop = "RULE_LAUNCH_CUSTOM"; - const char* val = this->GetRuleLauncher(target, prop); + const char* val = this->GetRuleLauncher(target, "RULE_LAUNCH_CUSTOM"); if (val && *val) { // Expand rules in the empty string. It may insert the launcher and // perform replacements. RuleVariables vars; - vars.RuleLauncher = prop; vars.CMTarget = target; std::string output; const std::vector& outputs = ccg.GetOutputs(); @@ -1005,6 +1003,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( } vars.Output = output.c_str(); + launcher = val; + launcher += " "; this->ExpandRuleVariables(launcher, vars); if (!launcher.empty()) { launcher += " "; diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index ed34ce6..da29b60 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -332,7 +332,6 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string manifests = this->GetManifests(); cmLocalGenerator::RuleVariables vars; - vars.RuleLauncher = "RULE_LAUNCH_LINK"; vars.CMTarget = this->GeneratorTarget; vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); @@ -383,10 +382,20 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) real_link_commands.push_back(cmakeCommand); } + std::string launcher; + + const char* val = this->LocalGenerator->GetRuleLauncher( + this->GeneratorTarget, "RULE_LAUNCH_LINK"); + if (val && *val) { + launcher = val; + launcher += " "; + } + // Expand placeholders in the commands. this->LocalGenerator->TargetImplib = targetOutPathImport; for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { + *i = launcher + *i; this->LocalGenerator->ExpandRuleVariables(*i, vars); } this->LocalGenerator->TargetImplib = ""; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index a19d70e..5700c62 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -540,7 +540,6 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( vars.TargetVersionMajor = targetVersionMajor.c_str(); vars.TargetVersionMinor = targetVersionMinor.c_str(); - vars.RuleLauncher = "RULE_LAUNCH_LINK"; vars.CMTarget = this->GeneratorTarget; vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); @@ -597,6 +596,14 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( vars.LanguageCompileFlags = langFlags.c_str(); + std::string launcher; + const char* val = this->LocalGenerator->GetRuleLauncher( + this->GeneratorTarget, "RULE_LAUNCH_LINK"); + if (val && *val) { + launcher = val; + launcher += " "; + } + // Construct the main link rule and expand placeholders. this->LocalGenerator->TargetImplib = targetOutPathImport; if (useArchiveRules) { @@ -611,7 +618,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::const_iterator i = archiveCreateCommands.begin(); i != archiveCreateCommands.end(); ++i) { - std::string cmd = *i; + std::string cmd = launcher + *i; this->LocalGenerator->ExpandRuleVariables(cmd, vars); real_link_commands.push_back(cmd); } @@ -622,7 +629,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::const_iterator i = archiveAppendCommands.begin(); i != archiveAppendCommands.end(); ++i) { - std::string cmd = *i; + std::string cmd = launcher + *i; this->LocalGenerator->ExpandRuleVariables(cmd, vars); real_link_commands.push_back(cmd); } @@ -632,7 +639,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( for (std::vector::const_iterator i = archiveFinishCommands.begin(); i != archiveFinishCommands.end(); ++i) { - std::string cmd = *i; + std::string cmd = launcher + *i; this->LocalGenerator->ExpandRuleVariables(cmd, vars); // If there is no ranlib the command will be ":". Skip it. if (!cmd.empty() && cmd[0] != ':') { @@ -655,6 +662,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Expand placeholders. for (std::vector::iterator i = real_link_commands.begin(); i != real_link_commands.end(); ++i) { + *i = launcher + *i; this->LocalGenerator->ExpandRuleVariables(*i, vars); } } diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index d729114..64c434a 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -168,7 +168,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) if (!this->GetGlobalGenerator()->HasRule(ruleName)) { cmLocalGenerator::RuleVariables vars; - vars.RuleLauncher = "RULE_LAUNCH_LINK"; vars.CMTarget = this->GetGeneratorTarget(); vars.Language = this->TargetLinkLanguage.c_str(); @@ -238,10 +237,19 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) vars.LanguageCompileFlags = langFlags.c_str(); } + std::string launcher; + const char* val = this->GetLocalGenerator()->GetRuleLauncher( + this->GetGeneratorTarget(), "RULE_LAUNCH_LINK"); + if (val && *val) { + launcher = val; + launcher += " "; + } + // Rule for linking library/executable. std::vector linkCmds = this->ComputeLinkCmd(); for (std::vector::iterator i = linkCmds.begin(); i != linkCmds.end(); ++i) { + *i = launcher + *i; this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); } { diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 46a6161..f85ea81 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -374,7 +374,6 @@ void cmNinjaTargetGenerator::WriteLanguageRules(const std::string& language) void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) { cmLocalGenerator::RuleVariables vars; - vars.RuleLauncher = "RULE_LAUNCH_COMPILE"; vars.CMTarget = this->GetGeneratorTarget(); vars.Language = lang.c_str(); vars.Source = "$IN_ABS"; @@ -456,6 +455,14 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) ConvertToNinjaPath(this->GetTargetDependInfoPath(lang)), cmLocalGenerator::SHELL); + std::string launcher; + const char* val = this->GetLocalGenerator()->GetRuleLauncher( + this->GetGeneratorTarget(), "RULE_LAUNCH_COMPILE"); + if (val && *val) { + launcher = val; + launcher += " "; + } + if (explicitPP) { // Lookup the explicit preprocessing rule. std::string const ppVar = "CMAKE_" + lang + "_PREPROCESS_SOURCE"; @@ -467,7 +474,6 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) std::string const ppDepfile = "$DEP_FILE"; cmLocalGenerator::RuleVariables ppVars; - ppVars.RuleLauncher = vars.RuleLauncher; ppVars.CMTarget = vars.CMTarget; ppVars.Language = vars.Language; ppVars.Object = "$out"; // for RULE_LAUNCH_COMPILE @@ -496,6 +502,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = ppCmds.begin(); i != ppCmds.end(); ++i) { + *i = launcher + *i; this->GetLocalGenerator()->ExpandRuleVariables(*i, ppVars); } @@ -608,6 +615,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { + *i = launcher + *i; this->GetLocalGenerator()->ExpandRuleVariables(*i, vars); } ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 + Source/cmLocalGenerator.cxx | 412 +++++------------------- Source/cmLocalGenerator.h | 63 +--- Source/cmLocalNinjaGenerator.cxx | 28 +- Source/cmLocalNinjaGenerator.h | 8 +- Source/cmLocalUnixMakefileGenerator3.cxx | 17 +- Source/cmMakefileExecutableTargetGenerator.cxx | 27 +- Source/cmMakefileLibraryTargetGenerator.cxx | 40 ++- Source/cmMakefileTargetGenerator.cxx | 23 +- Source/cmNinjaNormalTargetGenerator.cxx | 24 +- Source/cmNinjaTargetGenerator.cxx | 41 ++- Source/cmRulePlaceholderExpander.cxx | 304 +++++++++++++++++ Source/cmRulePlaceholderExpander.h | 83 +++++ bootstrap | 1 + 14 files changed, 634 insertions(+), 439 deletions(-) create mode 100644 Source/cmRulePlaceholderExpander.cxx create mode 100644 Source/cmRulePlaceholderExpander.h hooks/post-receive -- CMake From kwrobot at kitware.com Sun Oct 16 00:01:25 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 16 Oct 2016 00:01:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-225-g5ebba22 Message-ID: <20161016040146.3F16EF608A@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 5ebba228823ffc96e82f4b6cc1103c2f2ed8cfa7 (commit) from ac5b80e76c102d43749555c9bc888f9ac9b7436e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ebba228823ffc96e82f4b6cc1103c2f2ed8cfa7 commit 5ebba228823ffc96e82f4b6cc1103c2f2ed8cfa7 Author: Kitware Robot AuthorDate: Sun Oct 16 00:01:17 2016 -0400 Commit: Kitware Robot CommitDate: Sun Oct 16 00:01:17 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index f52fe69..953fc4c 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 7) -set(CMake_VERSION_PATCH 20161015) +set(CMake_VERSION_PATCH 20161016) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From steveire at gmail.com Sun Oct 16 06:09:31 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sun, 16 Oct 2016 06:09:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-533-g0fde927b Message-ID: <20161016100931.7BF4BB1599@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 0fde927b36aa8972da15fefa3e0f01ee22c6bcef (commit) via d1e7a46ad99e411a20740ffa651f9affee9ae427 (commit) from 2c0f3a34e5bd163b5194da61c9d1c0d89dc4f68d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0fde927b36aa8972da15fefa3e0f01ee22c6bcef commit 0fde927b36aa8972da15fefa3e0f01ee22c6bcef Merge: 2c0f3a3 d1e7a46 Author: Stephen Kelly AuthorDate: Sun Oct 16 06:09:30 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 16 06:09:30 2016 -0400 Merge topic 'extract-computed-target-properties' into next d1e7a46a fixup! cmTarget: Move sanity checks and computed property access to callers https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1e7a46ad99e411a20740ffa651f9affee9ae427 commit d1e7a46ad99e411a20740ffa651f9affee9ae427 Author: Stephen Kelly AuthorDate: Sun Oct 16 12:08:55 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 16 12:08:55 2016 +0200 fixup! cmTarget: Move sanity checks and computed property access to callers diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index b38950a..0a59933 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -10,6 +10,16 @@ #include "cmTest.h" #include "cmake.h" +#ifdef __clang__ +extern template const char* cmTargetPropertyComputer::ComputeLocationForBuild( + cmTarget const* tgt); +extern template const char* cmTargetPropertyComputer::ComputeLocation( + cmTarget const* tgt, std::string const& config); +extern template const char* cmTargetPropertyComputer::GetSources( + cmTarget const* tgt, cmMessenger* messenger, + cmListFileBacktrace const& context); +#endif + cmGetPropertyCommand::cmGetPropertyCommand() { this->InfoType = OutValue; diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx index 94f8942..d009bc3 100644 --- a/Source/cmGetTargetPropertyCommand.cxx +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -4,6 +4,16 @@ #include "cmTargetPropertyComputer.h" +#ifdef __clang__ +extern template const char* cmTargetPropertyComputer::ComputeLocationForBuild( + cmTarget const* tgt); +extern template const char* cmTargetPropertyComputer::ComputeLocation( + cmTarget const* tgt, std::string const& config); +extern template const char* cmTargetPropertyComputer::GetSources( + cmTarget const* tgt, cmMessenger* messenger, + cmListFileBacktrace const& context); +#endif + // cmSetTargetPropertyCommand bool cmGetTargetPropertyCommand::InitialPass( std::vector const& args, cmExecutionStatus&) ----------------------------------------------------------------------- Summary of changes: Source/cmGetPropertyCommand.cxx | 10 ++++++++++ Source/cmGetTargetPropertyCommand.cxx | 10 ++++++++++ 2 files changed, 20 insertions(+) hooks/post-receive -- CMake From steveire at gmail.com Sun Oct 16 06:09:55 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sun, 16 Oct 2016 06:09:55 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-537-gd1f0e30 Message-ID: <20161016100955.EA496C1C56@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 d1f0e3064827cbaa929e8d55ae69ec40fda43a45 (commit) via d94460ce3ff089c7746d24378f899008a2e5385d (commit) via 4b9292a9458d25a9394190de5ac9d9d056768070 (commit) via a89dc5374b8798e6dbe699b7a074ec7cd9be36e8 (commit) from 0fde927b36aa8972da15fefa3e0f01ee22c6bcef (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1f0e3064827cbaa929e8d55ae69ec40fda43a45 commit d1f0e3064827cbaa929e8d55ae69ec40fda43a45 Merge: 0fde927b d94460c Author: Stephen Kelly AuthorDate: Sun Oct 16 06:09:54 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 16 06:09:54 2016 -0400 Merge topic 'extract-computed-target-properties' into next d94460ce cmTarget: Implement GetProperty in terms of cmState::Snapshot 4b9292a9 cmTarget: Group code for checking written properties together a89dc537 cmTarget: Move sanity checks and computed property access to callers https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d94460ce3ff089c7746d24378f899008a2e5385d commit d94460ce3ff089c7746d24378f899008a2e5385d Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:26 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 16 12:09:43 2016 +0200 cmTarget: Implement GetProperty in terms of cmState::Snapshot diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index d8bc64a..b2b7cd6 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1215,10 +1215,16 @@ const char* cmTarget::GetProperty(const std::string& prop) const return this->GetName().c_str(); } if (prop == propBINARY_DIR) { - return this->GetMakefile()->GetCurrentBinaryDirectory(); + return this->GetMakefile() + ->GetStateSnapshot() + .GetDirectory() + .GetCurrentBinary(); } if (prop == propSOURCE_DIR) { - return this->GetMakefile()->GetCurrentSourceDirectory(); + return this->GetMakefile() + ->GetStateSnapshot() + .GetDirectory() + .GetCurrentSource(); } } @@ -1227,7 +1233,8 @@ const char* cmTarget::GetProperty(const std::string& prop) const const bool chain = this->GetMakefile()->GetState()->IsPropertyChained( prop, cmProperty::TARGET); if (chain) { - return this->Makefile->GetProperty(prop, chain); + return this->Makefile->GetStateSnapshot().GetDirectory().GetProperty( + prop, chain); } } return retVal; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b9292a9458d25a9394190de5ac9d9d056768070 commit 4b9292a9458d25a9394190de5ac9d9d056768070 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:26 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 16 12:09:42 2016 +0200 cmTarget: Group code for checking written properties together diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ef13b26..d8bc64a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -852,7 +852,20 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; + } else if (prop == "EXPORT_NAME" && this->IsImported()) { + std::ostringstream e; + e << "EXPORT_NAME property can't be set on imported targets (\"" + << this->Name << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } else if (prop == "SOURCES" && this->IsImported()) { + std::ostringstream e; + e << "SOURCES property can't be set on imported targets (\"" << this->Name + << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; } + if (prop == "INCLUDE_DIRECTORIES") { this->Internal->IncludeDirectoriesEntries.clear(); this->Internal->IncludeDirectoriesBacktraces.clear(); @@ -885,11 +898,6 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); this->Internal->CompileDefinitionsBacktraces.push_back(lfbt); } - } else if (prop == "EXPORT_NAME" && this->IsImported()) { - std::ostringstream e; - e << "EXPORT_NAME property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); } else if (prop == "LINK_LIBRARIES") { this->Internal->LinkImplementationPropertyEntries.clear(); this->Internal->LinkImplementationPropertyBacktraces.clear(); @@ -899,14 +907,6 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) this->Internal->LinkImplementationPropertyBacktraces.push_back(lfbt); } } else if (prop == "SOURCES") { - if (this->IsImported()) { - std::ostringstream e; - e << "SOURCES property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); - return; - } - this->Internal->SourceEntries.clear(); this->Internal->SourceBacktraces.clear(); if (value) { @@ -932,6 +932,18 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; + } else if (prop == "EXPORT_NAME" && this->IsImported()) { + std::ostringstream e; + e << "EXPORT_NAME property can't be set on imported targets (\"" + << this->Name << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } else if (prop == "SOURCES" && this->IsImported()) { + std::ostringstream e; + e << "SOURCES property can't be set on imported targets (\"" << this->Name + << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; } if (prop == "INCLUDE_DIRECTORIES") { if (value && *value) { @@ -957,11 +969,6 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); this->Internal->CompileDefinitionsBacktraces.push_back(lfbt); } - } else if (prop == "EXPORT_NAME" && this->IsImported()) { - std::ostringstream e; - e << "EXPORT_NAME property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); } else if (prop == "LINK_LIBRARIES") { if (value && *value) { cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); @@ -969,13 +976,6 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, this->Internal->LinkImplementationPropertyBacktraces.push_back(lfbt); } } else if (prop == "SOURCES") { - if (this->IsImported()) { - std::ostringstream e; - e << "SOURCES property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); - return; - } cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); this->Internal->SourceEntries.push_back(value); this->Internal->SourceBacktraces.push_back(lfbt); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a89dc5374b8798e6dbe699b7a074ec7cd9be36e8 commit a89dc5374b8798e6dbe699b7a074ec7cd9be36e8 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:26 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 16 12:09:42 2016 +0200 cmTarget: Move sanity checks and computed property access to callers The GetProperty method is now just accessing contained data, meaning it can be implemented in cmState. Remove the cmMakefile context from the signature as a result and remove the overload with the same signature. As a side-effect, the CMP0026 warning now gives a backtrace to the target when issued from a generator expression. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 050fcb8..b0ff13e 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -397,6 +397,18 @@ std::string cmGeneratorTarget::GetExportName() const const char* cmGeneratorTarget::GetProperty(const std::string& prop) const { + if (!cmTargetPropertyComputer::PassesWhitelist( + this->GetType(), prop, this->Makefile->GetMessenger(), + this->GetBacktrace())) { + return 0; + } + if (const char* result = cmTargetPropertyComputer::GetProperty( + this, prop, this->Makefile->GetMessenger(), this->GetBacktrace())) { + return result; + } + if (cmSystemTools::GetFatalErrorOccured()) { + return CM_NULLPTR; + } return this->Target->GetProperty(prop); } diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index ba03568..0a59933 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -6,9 +6,20 @@ #include "cmPropertyDefinition.h" #include "cmSourceFile.h" #include "cmState.h" +#include "cmTargetPropertyComputer.h" #include "cmTest.h" #include "cmake.h" +#ifdef __clang__ +extern template const char* cmTargetPropertyComputer::ComputeLocationForBuild( + cmTarget const* tgt); +extern template const char* cmTargetPropertyComputer::ComputeLocation( + cmTarget const* tgt, std::string const& config); +extern template const char* cmTargetPropertyComputer::GetSources( + cmTarget const* tgt, cmMessenger* messenger, + cmListFileBacktrace const& context); +#endif + cmGetPropertyCommand::cmGetPropertyCommand() { this->InfoType = OutValue; @@ -246,8 +257,18 @@ bool cmGetPropertyCommand::HandleTargetMode() } return this->StoreResult(CM_NULLPTR); } - return this->StoreResult( - target->GetProperty(this->PropertyName, this->Makefile)); + const char* prop_cstr = 0; + cmListFileBacktrace bt = this->Makefile->GetBacktrace(); + cmMessenger* messenger = this->Makefile->GetMessenger(); + if (cmTargetPropertyComputer::PassesWhitelist( + target->GetType(), this->PropertyName, messenger, bt)) { + prop_cstr = cmTargetPropertyComputer::GetProperty( + target, this->PropertyName, messenger, bt); + if (!prop_cstr) { + prop_cstr = target->GetProperty(this->PropertyName); + } + } + return this->StoreResult(prop_cstr); } std::ostringstream e; e << "could not find TARGET " << this->Name diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx index fe09442..d009bc3 100644 --- a/Source/cmGetTargetPropertyCommand.cxx +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -2,6 +2,18 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetTargetPropertyCommand.h" +#include "cmTargetPropertyComputer.h" + +#ifdef __clang__ +extern template const char* cmTargetPropertyComputer::ComputeLocationForBuild( + cmTarget const* tgt); +extern template const char* cmTargetPropertyComputer::ComputeLocation( + cmTarget const* tgt, std::string const& config); +extern template const char* cmTargetPropertyComputer::GetSources( + cmTarget const* tgt, cmMessenger* messenger, + cmListFileBacktrace const& context); +#endif + // cmSetTargetPropertyCommand bool cmGetTargetPropertyCommand::InitialPass( std::vector const& args, cmExecutionStatus&) @@ -22,7 +34,17 @@ bool cmGetTargetPropertyCommand::InitialPass( prop_exists = true; } } else if (!args[2].empty()) { - const char* prop_cstr = tgt->GetProperty(args[2], this->Makefile); + const char* prop_cstr = 0; + cmListFileBacktrace bt = this->Makefile->GetBacktrace(); + cmMessenger* messenger = this->Makefile->GetMessenger(); + if (cmTargetPropertyComputer::PassesWhitelist(tgt->GetType(), args[2], + messenger, bt)) { + prop_cstr = + cmTargetPropertyComputer::GetProperty(tgt, args[2], messenger, bt); + if (!prop_cstr) { + prop_cstr = tgt->GetProperty(args[2]); + } + } if (prop_cstr) { prop = prop_cstr; prop_exists = true; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 9b2043c..ef13b26 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1131,26 +1131,6 @@ void cmTarget::CheckProperty(const std::string& prop, const char* cmTarget::GetProperty(const std::string& prop) const { - return this->GetProperty(prop, this->Makefile); -} - -const char* cmTarget::GetProperty(const std::string& prop, - cmMakefile* context) const -{ - if (!cmTargetPropertyComputer::PassesWhitelist(this->GetType(), prop, - context->GetMessenger(), - context->GetBacktrace())) { - return CM_NULLPTR; - } - - if (const char* result = cmTargetPropertyComputer::GetProperty( - this, prop, context->GetMessenger(), context->GetBacktrace())) { - return result; - } - if (cmSystemTools::GetFatalErrorOccured()) { - return CM_NULLPTR; - } - static UNORDERED_SET specialProps; #define MAKE_STATIC_PROP(PROP) static const std::string prop##PROP = #PROP MAKE_STATIC_PROP(LINK_LIBRARIES); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 2d259ed..d48e7e2 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -200,7 +200,6 @@ public: void AppendProperty(const std::string& prop, const char* value, bool asString = false); const char* GetProperty(const std::string& prop) const; - const char* GetProperty(const std::string& prop, cmMakefile* context) const; bool GetPropertyAsBool(const std::string& prop) const; void CheckProperty(const std::string& prop, cmMakefile* context) const; diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt index e4dbb71..d4e5b29 100644 --- a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt +++ b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) in CMakeLists.txt: +CMake Warning \(dev\) at TARGET_PROPERTY-LOCATION.cmake:2 \(add_library\): Policy CMP0026 is not set: Disallow use of the LOCATION target property. Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy command to set the policy and suppress this warning. @@ -7,4 +7,6 @@ CMake Warning \(dev\) in CMakeLists.txt: name directly with add_custom_command, or use the generator expression \$, as appropriate. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From steveire at gmail.com Sun Oct 16 07:55:00 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sun, 16 Oct 2016 07:55:00 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-539-g0e69f51 Message-ID: <20161016115500.67D24F5DA5@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 0e69f517951fefc4f4917d3101259c8a7a7fbc66 (commit) via 75ace0a67d0b57eecaf1862e8a5dc68efa0a724b (commit) from d1f0e3064827cbaa929e8d55ae69ec40fda43a45 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e69f517951fefc4f4917d3101259c8a7a7fbc66 commit 0e69f517951fefc4f4917d3101259c8a7a7fbc66 Merge: d1f0e30 75ace0a Author: Stephen Kelly AuthorDate: Sun Oct 16 07:54:59 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 16 07:54:59 2016 -0400 Merge topic 'extract-computed-target-properties' into next 75ace0a6 fixup! cmTarget: Move sanity checks and computed property access to callers https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75ace0a67d0b57eecaf1862e8a5dc68efa0a724b commit 75ace0a67d0b57eecaf1862e8a5dc68efa0a724b Author: Stephen Kelly AuthorDate: Sun Oct 16 13:54:29 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 16 13:54:29 2016 +0200 fixup! cmTarget: Move sanity checks and computed property access to callers diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 0a59933..39445dd 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -10,16 +10,6 @@ #include "cmTest.h" #include "cmake.h" -#ifdef __clang__ -extern template const char* cmTargetPropertyComputer::ComputeLocationForBuild( - cmTarget const* tgt); -extern template const char* cmTargetPropertyComputer::ComputeLocation( - cmTarget const* tgt, std::string const& config); -extern template const char* cmTargetPropertyComputer::GetSources( - cmTarget const* tgt, cmMessenger* messenger, - cmListFileBacktrace const& context); -#endif - cmGetPropertyCommand::cmGetPropertyCommand() { this->InfoType = OutValue; @@ -262,8 +252,8 @@ bool cmGetPropertyCommand::HandleTargetMode() cmMessenger* messenger = this->Makefile->GetMessenger(); if (cmTargetPropertyComputer::PassesWhitelist( target->GetType(), this->PropertyName, messenger, bt)) { - prop_cstr = cmTargetPropertyComputer::GetProperty( - target, this->PropertyName, messenger, bt); + prop_cstr = + target->GetComputedProperty(this->PropertyName, messenger, bt); if (!prop_cstr) { prop_cstr = target->GetProperty(this->PropertyName); } diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx index d009bc3..6a816d8 100644 --- a/Source/cmGetTargetPropertyCommand.cxx +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -4,16 +4,6 @@ #include "cmTargetPropertyComputer.h" -#ifdef __clang__ -extern template const char* cmTargetPropertyComputer::ComputeLocationForBuild( - cmTarget const* tgt); -extern template const char* cmTargetPropertyComputer::ComputeLocation( - cmTarget const* tgt, std::string const& config); -extern template const char* cmTargetPropertyComputer::GetSources( - cmTarget const* tgt, cmMessenger* messenger, - cmListFileBacktrace const& context); -#endif - // cmSetTargetPropertyCommand bool cmGetTargetPropertyCommand::InitialPass( std::vector const& args, cmExecutionStatus&) @@ -39,8 +29,7 @@ bool cmGetTargetPropertyCommand::InitialPass( cmMessenger* messenger = this->Makefile->GetMessenger(); if (cmTargetPropertyComputer::PassesWhitelist(tgt->GetType(), args[2], messenger, bt)) { - prop_cstr = - cmTargetPropertyComputer::GetProperty(tgt, args[2], messenger, bt); + prop_cstr = tgt->GetComputedProperty(args[2], messenger, bt); if (!prop_cstr) { prop_cstr = tgt->GetProperty(args[2]); } diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index b2b7cd6..3a22309 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1129,6 +1129,13 @@ void cmTarget::CheckProperty(const std::string& prop, } } +const char* cmTarget::GetComputedProperty( + const std::string& prop, cmMessenger* messenger, + cmListFileBacktrace const& context) const +{ + return cmTargetPropertyComputer::GetProperty(this, prop, messenger, context); +} + const char* cmTarget::GetProperty(const std::string& prop) const { static UNORDERED_SET specialProps; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index d48e7e2..bd00b3d 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -202,6 +202,9 @@ public: const char* GetProperty(const std::string& prop) const; bool GetPropertyAsBool(const std::string& prop) const; void CheckProperty(const std::string& prop, cmMakefile* context) const; + const char* GetComputedProperty(const std::string& prop, + cmMessenger* messenger, + cmListFileBacktrace const& context) const; bool IsImported() const { return this->IsImportedTarget; } bool IsImportedGloballyVisible() const ----------------------------------------------------------------------- Summary of changes: Source/cmGetPropertyCommand.cxx | 14 ++------------ Source/cmGetTargetPropertyCommand.cxx | 13 +------------ Source/cmTarget.cxx | 7 +++++++ Source/cmTarget.h | 3 +++ 4 files changed, 13 insertions(+), 24 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Sun Oct 16 07:58:35 2016 From: steveire at gmail.com (Stephen Kelly) Date: Sun, 16 Oct 2016 07:58:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-543-g1ebf573 Message-ID: <20161016115835.50D43F5E6A@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 1ebf57341d671befa62b4065b7565a01f1fe06aa (commit) via cef59bb8bac6b6d38025cc492235953c5ff7654b (commit) via 0d57b07ad99cefc5df9e65d6c14aeaddf5d64b88 (commit) via c3fb0d95ad114c9f9680e885c4c2263b43c437dc (commit) from 0e69f517951fefc4f4917d3101259c8a7a7fbc66 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ebf57341d671befa62b4065b7565a01f1fe06aa commit 1ebf57341d671befa62b4065b7565a01f1fe06aa Merge: 0e69f51 cef59bb Author: Stephen Kelly AuthorDate: Sun Oct 16 07:58:33 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 16 07:58:33 2016 -0400 Merge topic 'extract-computed-target-properties' into next cef59bb8 cmTarget: Implement GetProperty in terms of cmState::Snapshot 0d57b07a cmTarget: Group code for checking written properties together c3fb0d95 cmTarget: Move sanity checks and computed property access to callers https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cef59bb8bac6b6d38025cc492235953c5ff7654b commit cef59bb8bac6b6d38025cc492235953c5ff7654b Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:26 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 16 13:57:53 2016 +0200 cmTarget: Implement GetProperty in terms of cmState::Snapshot diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f109444..3a22309 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1222,10 +1222,16 @@ const char* cmTarget::GetProperty(const std::string& prop) const return this->GetName().c_str(); } if (prop == propBINARY_DIR) { - return this->GetMakefile()->GetCurrentBinaryDirectory(); + return this->GetMakefile() + ->GetStateSnapshot() + .GetDirectory() + .GetCurrentBinary(); } if (prop == propSOURCE_DIR) { - return this->GetMakefile()->GetCurrentSourceDirectory(); + return this->GetMakefile() + ->GetStateSnapshot() + .GetDirectory() + .GetCurrentSource(); } } @@ -1234,7 +1240,8 @@ const char* cmTarget::GetProperty(const std::string& prop) const const bool chain = this->GetMakefile()->GetState()->IsPropertyChained( prop, cmProperty::TARGET); if (chain) { - return this->Makefile->GetProperty(prop, chain); + return this->Makefile->GetStateSnapshot().GetDirectory().GetProperty( + prop, chain); } } return retVal; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0d57b07ad99cefc5df9e65d6c14aeaddf5d64b88 commit 0d57b07ad99cefc5df9e65d6c14aeaddf5d64b88 Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:26 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 16 13:57:53 2016 +0200 cmTarget: Group code for checking written properties together diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index e80768d..f109444 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -852,7 +852,20 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; + } else if (prop == "EXPORT_NAME" && this->IsImported()) { + std::ostringstream e; + e << "EXPORT_NAME property can't be set on imported targets (\"" + << this->Name << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } else if (prop == "SOURCES" && this->IsImported()) { + std::ostringstream e; + e << "SOURCES property can't be set on imported targets (\"" << this->Name + << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; } + if (prop == "INCLUDE_DIRECTORIES") { this->Internal->IncludeDirectoriesEntries.clear(); this->Internal->IncludeDirectoriesBacktraces.clear(); @@ -885,11 +898,6 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); this->Internal->CompileDefinitionsBacktraces.push_back(lfbt); } - } else if (prop == "EXPORT_NAME" && this->IsImported()) { - std::ostringstream e; - e << "EXPORT_NAME property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); } else if (prop == "LINK_LIBRARIES") { this->Internal->LinkImplementationPropertyEntries.clear(); this->Internal->LinkImplementationPropertyBacktraces.clear(); @@ -899,14 +907,6 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) this->Internal->LinkImplementationPropertyBacktraces.push_back(lfbt); } } else if (prop == "SOURCES") { - if (this->IsImported()) { - std::ostringstream e; - e << "SOURCES property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); - return; - } - this->Internal->SourceEntries.clear(); this->Internal->SourceBacktraces.clear(); if (value) { @@ -932,6 +932,18 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; + } else if (prop == "EXPORT_NAME" && this->IsImported()) { + std::ostringstream e; + e << "EXPORT_NAME property can't be set on imported targets (\"" + << this->Name << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } else if (prop == "SOURCES" && this->IsImported()) { + std::ostringstream e; + e << "SOURCES property can't be set on imported targets (\"" << this->Name + << "\")\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; } if (prop == "INCLUDE_DIRECTORIES") { if (value && *value) { @@ -957,11 +969,6 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); this->Internal->CompileDefinitionsBacktraces.push_back(lfbt); } - } else if (prop == "EXPORT_NAME" && this->IsImported()) { - std::ostringstream e; - e << "EXPORT_NAME property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); } else if (prop == "LINK_LIBRARIES") { if (value && *value) { cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); @@ -969,13 +976,6 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, this->Internal->LinkImplementationPropertyBacktraces.push_back(lfbt); } } else if (prop == "SOURCES") { - if (this->IsImported()) { - std::ostringstream e; - e << "SOURCES property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); - return; - } cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); this->Internal->SourceEntries.push_back(value); this->Internal->SourceBacktraces.push_back(lfbt); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3fb0d95ad114c9f9680e885c4c2263b43c437dc commit c3fb0d95ad114c9f9680e885c4c2263b43c437dc Author: Stephen Kelly AuthorDate: Thu Oct 13 00:18:26 2016 +0200 Commit: Stephen Kelly CommitDate: Sun Oct 16 13:56:12 2016 +0200 cmTarget: Move sanity checks and computed property access to callers The GetProperty method is now just accessing contained data, meaning it can be implemented in cmState. Remove the cmMakefile context from the signature as a result and remove the overload with the same signature. Add a GetComputedProperty to cmTarget so that templates can be properly instantiated. Otherwise the Commands would need to be able to reach the specializations which are currently in cmTarget.cxx. As a side-effect, the CMP0026 warning now gives a backtrace to the target when issued from a generator expression. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 050fcb8..b0ff13e 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -397,6 +397,18 @@ std::string cmGeneratorTarget::GetExportName() const const char* cmGeneratorTarget::GetProperty(const std::string& prop) const { + if (!cmTargetPropertyComputer::PassesWhitelist( + this->GetType(), prop, this->Makefile->GetMessenger(), + this->GetBacktrace())) { + return 0; + } + if (const char* result = cmTargetPropertyComputer::GetProperty( + this, prop, this->Makefile->GetMessenger(), this->GetBacktrace())) { + return result; + } + if (cmSystemTools::GetFatalErrorOccured()) { + return CM_NULLPTR; + } return this->Target->GetProperty(prop); } diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index ba03568..39445dd 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -6,6 +6,7 @@ #include "cmPropertyDefinition.h" #include "cmSourceFile.h" #include "cmState.h" +#include "cmTargetPropertyComputer.h" #include "cmTest.h" #include "cmake.h" @@ -246,8 +247,18 @@ bool cmGetPropertyCommand::HandleTargetMode() } return this->StoreResult(CM_NULLPTR); } - return this->StoreResult( - target->GetProperty(this->PropertyName, this->Makefile)); + const char* prop_cstr = 0; + cmListFileBacktrace bt = this->Makefile->GetBacktrace(); + cmMessenger* messenger = this->Makefile->GetMessenger(); + if (cmTargetPropertyComputer::PassesWhitelist( + target->GetType(), this->PropertyName, messenger, bt)) { + prop_cstr = + target->GetComputedProperty(this->PropertyName, messenger, bt); + if (!prop_cstr) { + prop_cstr = target->GetProperty(this->PropertyName); + } + } + return this->StoreResult(prop_cstr); } std::ostringstream e; e << "could not find TARGET " << this->Name diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx index fe09442..6a816d8 100644 --- a/Source/cmGetTargetPropertyCommand.cxx +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetTargetPropertyCommand.h" +#include "cmTargetPropertyComputer.h" + // cmSetTargetPropertyCommand bool cmGetTargetPropertyCommand::InitialPass( std::vector const& args, cmExecutionStatus&) @@ -22,7 +24,16 @@ bool cmGetTargetPropertyCommand::InitialPass( prop_exists = true; } } else if (!args[2].empty()) { - const char* prop_cstr = tgt->GetProperty(args[2], this->Makefile); + const char* prop_cstr = 0; + cmListFileBacktrace bt = this->Makefile->GetBacktrace(); + cmMessenger* messenger = this->Makefile->GetMessenger(); + if (cmTargetPropertyComputer::PassesWhitelist(tgt->GetType(), args[2], + messenger, bt)) { + prop_cstr = tgt->GetComputedProperty(args[2], messenger, bt); + if (!prop_cstr) { + prop_cstr = tgt->GetProperty(args[2]); + } + } if (prop_cstr) { prop = prop_cstr; prop_exists = true; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 9b2043c..e80768d 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1129,28 +1129,15 @@ void cmTarget::CheckProperty(const std::string& prop, } } -const char* cmTarget::GetProperty(const std::string& prop) const +const char* cmTarget::GetComputedProperty( + const std::string& prop, cmMessenger* messenger, + cmListFileBacktrace const& context) const { - return this->GetProperty(prop, this->Makefile); + return cmTargetPropertyComputer::GetProperty(this, prop, messenger, context); } -const char* cmTarget::GetProperty(const std::string& prop, - cmMakefile* context) const +const char* cmTarget::GetProperty(const std::string& prop) const { - if (!cmTargetPropertyComputer::PassesWhitelist(this->GetType(), prop, - context->GetMessenger(), - context->GetBacktrace())) { - return CM_NULLPTR; - } - - if (const char* result = cmTargetPropertyComputer::GetProperty( - this, prop, context->GetMessenger(), context->GetBacktrace())) { - return result; - } - if (cmSystemTools::GetFatalErrorOccured()) { - return CM_NULLPTR; - } - static UNORDERED_SET specialProps; #define MAKE_STATIC_PROP(PROP) static const std::string prop##PROP = #PROP MAKE_STATIC_PROP(LINK_LIBRARIES); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 2d259ed..bd00b3d 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -200,9 +200,11 @@ public: void AppendProperty(const std::string& prop, const char* value, bool asString = false); const char* GetProperty(const std::string& prop) const; - const char* GetProperty(const std::string& prop, cmMakefile* context) const; bool GetPropertyAsBool(const std::string& prop) const; void CheckProperty(const std::string& prop, cmMakefile* context) const; + const char* GetComputedProperty(const std::string& prop, + cmMessenger* messenger, + cmListFileBacktrace const& context) const; bool IsImported() const { return this->IsImportedTarget; } bool IsImportedGloballyVisible() const diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt index e4dbb71..d4e5b29 100644 --- a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt +++ b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-LOCATION-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) in CMakeLists.txt: +CMake Warning \(dev\) at TARGET_PROPERTY-LOCATION.cmake:2 \(add_library\): Policy CMP0026 is not set: Disallow use of the LOCATION target property. Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy command to set the policy and suppress this warning. @@ -7,4 +7,6 @@ CMake Warning \(dev\) in CMakeLists.txt: name directly with add_custom_command, or use the generator expression \$, as appropriate. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From gjasny at googlemail.com Sun Oct 16 15:24:52 2016 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 16 Oct 2016 15:24:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-547-g54379ca Message-ID: <20161016192452.CCD36F5F75@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 54379cab91d6b2d6940d65fa8dd31530bd30ae52 (commit) via 25dbc485565649f54d64b57f6a35b651b8a15165 (commit) via 5ebba228823ffc96e82f4b6cc1103c2f2ed8cfa7 (commit) via ac5b80e76c102d43749555c9bc888f9ac9b7436e (commit) from 1ebf57341d671befa62b4065b7565a01f1fe06aa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54379cab91d6b2d6940d65fa8dd31530bd30ae52 commit 54379cab91d6b2d6940d65fa8dd31530bd30ae52 Merge: 1ebf573 25dbc48 Author: Gregor Jasny AuthorDate: Sun Oct 16 15:24:51 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 16 15:24:51 2016 -0400 Merge topic '16355-osx-deployment-target-on-cross-compile' into next 25dbc485 Darwin: Do not try to set deployment target when crosscompiling (#16355) 5ebba228 CMake Nightly Date Stamp ac5b80e7 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=25dbc485565649f54d64b57f6a35b651b8a15165 commit 25dbc485565649f54d64b57f6a35b651b8a15165 Author: Gregor Jasny AuthorDate: Sun Oct 16 20:56:36 2016 +0200 Commit: Gregor Jasny CommitDate: Sun Oct 16 20:59:27 2016 +0200 Darwin: Do not try to set deployment target when crosscompiling (#16355) diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake index 427909d..39374e1 100644 --- a/Modules/Platform/Darwin-Initialize.cmake +++ b/Modules/Platform/Darwin-Initialize.cmake @@ -90,7 +90,7 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode endif() endforeach() - if(NOT CMAKE_OSX_DEPLOYMENT_TARGET AND _CURRENT_OSX_VERSION VERSION_LESS _CMAKE_OSX_DEPLOYMENT_TARGET) + if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_OSX_DEPLOYMENT_TARGET AND _CURRENT_OSX_VERSION VERSION_LESS _CMAKE_OSX_DEPLOYMENT_TARGET) set(CMAKE_OSX_DEPLOYMENT_TARGET ${_CURRENT_OSX_VERSION} CACHE STRING "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value." FORCE) endif() ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Darwin-Initialize.cmake | 2 +- Source/CMakeVersion.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From gjasny at googlemail.com Sun Oct 16 15:32:19 2016 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 16 Oct 2016 15:32:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-549-ga23f4f0 Message-ID: <20161016193226.9FA13F6154@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 a23f4f0666fdbfb7ab75635f62e216b5d5d158d0 (commit) via 9ce8fbf522e84f3f596e90453b4c652514a00099 (commit) from 54379cab91d6b2d6940d65fa8dd31530bd30ae52 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a23f4f0666fdbfb7ab75635f62e216b5d5d158d0 commit a23f4f0666fdbfb7ab75635f62e216b5d5d158d0 Merge: 54379ca 9ce8fbf Author: Gregor Jasny AuthorDate: Sun Oct 16 15:32:13 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 16 15:32:13 2016 -0400 Merge topic 'refactor-folder-name-retrieval' into next 9ce8fbf5 Refactor IDE folder name retrieval into GetEffectiveFolderName() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ce8fbf522e84f3f596e90453b4c652514a00099 commit 9ce8fbf522e84f3f596e90453b4c652514a00099 Author: Gregor Jasny AuthorDate: Tue Aug 30 20:55:37 2016 +0200 Commit: Gregor Jasny CommitDate: Sun Oct 16 21:27:47 2016 +0200 Refactor IDE folder name retrieval into GetEffectiveFolderName() diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 7eb0ebf..eb9f419 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1767,6 +1767,22 @@ std::string cmGeneratorTarget::GetMacContentDirectory( return fpath; } +std::string cmGeneratorTarget::GetEffectiveFolderName() const +{ + std::string effectiveFolder; + + if (!this->GlobalGenerator->UseFolderProperty()) { + return effectiveFolder; + } + + const char* targetFolder = this->GetProperty("FOLDER"); + if (targetFolder) { + effectiveFolder += targetFolder; + } + + return effectiveFolder; +} + cmGeneratorTarget::CompileInfo const* cmGeneratorTarget::GetCompileInfo( const std::string& config) const { diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 68ffd5c..9382726 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -220,6 +220,9 @@ public: std::string GetMacContentDirectory(const std::string& config = CM_NULLPTR, bool implib = false) const; + /** @return folder prefix for IDEs. */ + std::string GetEffectiveFolderName() const; + cmTarget* Target; cmMakefile* Makefile; cmLocalGenerator* LocalGenerator; diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 5fbaea4..3154f8d 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -44,9 +44,7 @@ cmGhsMultiTargetGenerator::~cmGhsMultiTargetGenerator() std::string cmGhsMultiTargetGenerator::GetRelBuildFilePath( const cmGeneratorTarget* target) { - std::string output; - char const* folderProp = target->GetProperty("FOLDER"); - output = NULL == folderProp ? "" : folderProp; + std::string output = target->GetEffectiveFolderName(); cmSystemTools::ConvertToUnixSlashes(output); if (!output.empty()) { output += "/"; diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 1aa6af1..7d0c2da 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2377,7 +2377,7 @@ const char* cmGlobalGenerator::GetPredefinedTargetsFolder() return "CMakePredefinedTargets"; } -bool cmGlobalGenerator::UseFolderProperty() +bool cmGlobalGenerator::UseFolderProperty() const { const char* prop = this->GetCMakeInstance()->GetState()->GetGlobalProperty("USE_FOLDERS"); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 38eaa76..c3498e0 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -334,6 +334,8 @@ public: i.e. "Can I build Debug and Release in the same tree?" */ virtual bool IsMultiConfig() const { return false; } + virtual bool UseFolderProperty() const; + std::string GetSharedLibFlagsForLanguage(std::string const& lang) const; /** Generate an .rule file path for a given command output. */ @@ -463,7 +465,6 @@ protected: std::string const& name) const; const char* GetPredefinedTargetsFolder(); - virtual bool UseFolderProperty(); private: #if defined(CMAKE_BUILD_WITH_CMAKE) diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 0eac338..d4ae677 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -439,11 +439,7 @@ void cmGlobalGhsMultiGenerator::UpdateBuildFiles( tgtsI != tgts.end(); ++tgtsI) { const cmGeneratorTarget* tgt = *tgtsI; if (IsTgtForBuild(tgt)) { - char const* rawFolderName = tgt->GetProperty("FOLDER"); - if (NULL == rawFolderName) { - rawFolderName = ""; - } - std::string folderName(rawFolderName); + std::string folderName = tgt->GetEffectiveFolderName(); if (this->TargetFolderBuildStreams.end() == this->TargetFolderBuildStreams.find(folderName)) { this->AddFilesUpToPath( diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 3637fed..0287def 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -409,8 +409,8 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( // Create "solution folder" information from FOLDER target property // if (written && this->UseFolderProperty()) { - const char* targetFolder = target->GetProperty("FOLDER"); - if (targetFolder) { + const std::string targetFolder = target->GetEffectiveFolderName(); + if (!targetFolder.empty()) { std::vector tokens = cmSystemTools::SplitString(targetFolder, '/', false); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 0ddfc9a..7b1afa5 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2723,8 +2723,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateOrGetPBXGroup( { std::string s; std::string target; - const char* targetFolder = gtgt->GetProperty("FOLDER"); - if (targetFolder) { + const std::string targetFolder = gtgt->GetEffectiveFolderName(); + if (!targetFolder.empty()) { target = targetFolder; target += "/"; } ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 16 ++++++++++++++++ Source/cmGeneratorTarget.h | 3 +++ Source/cmGhsMultiTargetGenerator.cxx | 4 +--- Source/cmGlobalGenerator.cxx | 2 +- Source/cmGlobalGenerator.h | 3 ++- Source/cmGlobalGhsMultiGenerator.cxx | 6 +----- Source/cmGlobalVisualStudio7Generator.cxx | 4 ++-- Source/cmGlobalXCodeGenerator.cxx | 4 ++-- 8 files changed, 28 insertions(+), 14 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Oct 17 00:01:05 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 17 Oct 2016 00:01:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-226-g0cbe2ed Message-ID: <20161017040105.E8619F5FF5@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 0cbe2edb23d581233c518beafe92a2c9d4f529ac (commit) from 5ebba228823ffc96e82f4b6cc1103c2f2ed8cfa7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0cbe2edb23d581233c518beafe92a2c9d4f529ac commit 0cbe2edb23d581233c518beafe92a2c9d4f529ac Author: Kitware Robot AuthorDate: Mon Oct 17 00:01:03 2016 -0400 Commit: Kitware Robot CommitDate: Mon Oct 17 00:01:03 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 953fc4c..3640ea8 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 7) -set(CMake_VERSION_PATCH 20161016) +set(CMake_VERSION_PATCH 20161017) #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 Oct 17 10:05:08 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:05:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-551-gf014b34 Message-ID: <20161017140508.06DFDF6356@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 f014b3408a942ed1be8e0bbe7767ec8e6f092f5f (commit) via e8bafb6fcbb46bad4dfcb8dab1347c8e5f9a8090 (commit) from a23f4f0666fdbfb7ab75635f62e216b5d5d158d0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f014b3408a942ed1be8e0bbe7767ec8e6f092f5f commit f014b3408a942ed1be8e0bbe7767ec8e6f092f5f Merge: a23f4f0 e8bafb6 Author: Brad King AuthorDate: Mon Oct 17 10:05:06 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 10:05:06 2016 -0400 Merge topic 'osx-no-deployment-target-on-cross-compile' into next e8bafb6f OS X: Do not try to set deployment target when cross-compiling https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8bafb6fcbb46bad4dfcb8dab1347c8e5f9a8090 commit e8bafb6fcbb46bad4dfcb8dab1347c8e5f9a8090 Author: Gregor Jasny AuthorDate: Sun Oct 16 20:56:36 2016 +0200 Commit: Brad King CommitDate: Mon Oct 17 10:02:17 2016 -0400 OS X: Do not try to set deployment target when cross-compiling The change in commit v3.4.0-rc2~6^2 (Xcode: Adjust deployment target SDK version to host version, 2015-10-11) does not make sense when cross-compiling. Make it conditional to fix this regression in some cross-compiling cases. Closes: #16355 diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake index 427909d..39374e1 100644 --- a/Modules/Platform/Darwin-Initialize.cmake +++ b/Modules/Platform/Darwin-Initialize.cmake @@ -90,7 +90,7 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode endif() endforeach() - if(NOT CMAKE_OSX_DEPLOYMENT_TARGET AND _CURRENT_OSX_VERSION VERSION_LESS _CMAKE_OSX_DEPLOYMENT_TARGET) + if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_OSX_DEPLOYMENT_TARGET AND _CURRENT_OSX_VERSION VERSION_LESS _CMAKE_OSX_DEPLOYMENT_TARGET) set(CMAKE_OSX_DEPLOYMENT_TARGET ${_CURRENT_OSX_VERSION} CACHE STRING "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value." FORCE) endif() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 10:06:13 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:06:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-553-gfddd061 Message-ID: <20161017140613.21007F6367@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 fddd06191565ba067f82b0baa6f33beabe78ccab (commit) via e6ec80ae7c193b318b02c30f7a8f0355635ee170 (commit) from f014b3408a942ed1be8e0bbe7767ec8e6f092f5f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fddd06191565ba067f82b0baa6f33beabe78ccab commit fddd06191565ba067f82b0baa6f33beabe78ccab Merge: f014b34 e6ec80a Author: Brad King AuthorDate: Mon Oct 17 10:06:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 10:06:12 2016 -0400 Merge topic 'refactor-folder-name-retrieval' into next e6ec80ae fixup! Refactor IDE folder name retrieval into GetEffectiveFolderName() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6ec80ae7c193b318b02c30f7a8f0355635ee170 commit e6ec80ae7c193b318b02c30f7a8f0355635ee170 Author: Brad King AuthorDate: Mon Oct 17 10:05:58 2016 -0400 Commit: Brad King CommitDate: Mon Oct 17 10:05:58 2016 -0400 fixup! Refactor IDE folder name retrieval into GetEffectiveFolderName() diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index eb9f419..f11149a 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1769,18 +1769,18 @@ std::string cmGeneratorTarget::GetMacContentDirectory( std::string cmGeneratorTarget::GetEffectiveFolderName() const { - std::string effectiveFolder; + std::string effectiveFolder; - if (!this->GlobalGenerator->UseFolderProperty()) { - return effectiveFolder; - } + if (!this->GlobalGenerator->UseFolderProperty()) { + return effectiveFolder; + } - const char* targetFolder = this->GetProperty("FOLDER"); - if (targetFolder) { - effectiveFolder += targetFolder; - } + const char* targetFolder = this->GetProperty("FOLDER"); + if (targetFolder) { + effectiveFolder += targetFolder; + } - return effectiveFolder; + return effectiveFolder; } cmGeneratorTarget::CompileInfo const* cmGeneratorTarget::GetCompileInfo( ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 10:08:17 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:08:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-555-gb09b420 Message-ID: <20161017140818.0ACFCF63A1@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 b09b42069ca7cfe9510fafbf8e5282a49bb45e93 (commit) via 3b6f1587bed536e3d31e6665aff35aa27f5e79bc (commit) from fddd06191565ba067f82b0baa6f33beabe78ccab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b09b42069ca7cfe9510fafbf8e5282a49bb45e93 commit b09b42069ca7cfe9510fafbf8e5282a49bb45e93 Merge: fddd061 3b6f158 Author: Brad King AuthorDate: Mon Oct 17 10:08:17 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 10:08:17 2016 -0400 Merge topic 'refactor-folder-name-retrieval' into next 3b6f1587 Factor IDE folder name retrieval out into helper method https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b6f1587bed536e3d31e6665aff35aa27f5e79bc commit 3b6f1587bed536e3d31e6665aff35aa27f5e79bc Author: Gregor Jasny AuthorDate: Tue Aug 30 20:55:37 2016 +0200 Commit: Brad King CommitDate: Mon Oct 17 10:06:18 2016 -0400 Factor IDE folder name retrieval out into helper method Add a `cmGeneratorTarget::GetEffectiveFolderName` helper to abstract lookup of the `FOLDER` property in combination with checking for generator support of folders. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 7eb0ebf..f11149a 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1767,6 +1767,22 @@ std::string cmGeneratorTarget::GetMacContentDirectory( return fpath; } +std::string cmGeneratorTarget::GetEffectiveFolderName() const +{ + std::string effectiveFolder; + + if (!this->GlobalGenerator->UseFolderProperty()) { + return effectiveFolder; + } + + const char* targetFolder = this->GetProperty("FOLDER"); + if (targetFolder) { + effectiveFolder += targetFolder; + } + + return effectiveFolder; +} + cmGeneratorTarget::CompileInfo const* cmGeneratorTarget::GetCompileInfo( const std::string& config) const { diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 68ffd5c..9382726 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -220,6 +220,9 @@ public: std::string GetMacContentDirectory(const std::string& config = CM_NULLPTR, bool implib = false) const; + /** @return folder prefix for IDEs. */ + std::string GetEffectiveFolderName() const; + cmTarget* Target; cmMakefile* Makefile; cmLocalGenerator* LocalGenerator; diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 5fbaea4..3154f8d 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -44,9 +44,7 @@ cmGhsMultiTargetGenerator::~cmGhsMultiTargetGenerator() std::string cmGhsMultiTargetGenerator::GetRelBuildFilePath( const cmGeneratorTarget* target) { - std::string output; - char const* folderProp = target->GetProperty("FOLDER"); - output = NULL == folderProp ? "" : folderProp; + std::string output = target->GetEffectiveFolderName(); cmSystemTools::ConvertToUnixSlashes(output); if (!output.empty()) { output += "/"; diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 1aa6af1..7d0c2da 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2377,7 +2377,7 @@ const char* cmGlobalGenerator::GetPredefinedTargetsFolder() return "CMakePredefinedTargets"; } -bool cmGlobalGenerator::UseFolderProperty() +bool cmGlobalGenerator::UseFolderProperty() const { const char* prop = this->GetCMakeInstance()->GetState()->GetGlobalProperty("USE_FOLDERS"); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 38eaa76..c3498e0 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -334,6 +334,8 @@ public: i.e. "Can I build Debug and Release in the same tree?" */ virtual bool IsMultiConfig() const { return false; } + virtual bool UseFolderProperty() const; + std::string GetSharedLibFlagsForLanguage(std::string const& lang) const; /** Generate an .rule file path for a given command output. */ @@ -463,7 +465,6 @@ protected: std::string const& name) const; const char* GetPredefinedTargetsFolder(); - virtual bool UseFolderProperty(); private: #if defined(CMAKE_BUILD_WITH_CMAKE) diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 0eac338..d4ae677 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -439,11 +439,7 @@ void cmGlobalGhsMultiGenerator::UpdateBuildFiles( tgtsI != tgts.end(); ++tgtsI) { const cmGeneratorTarget* tgt = *tgtsI; if (IsTgtForBuild(tgt)) { - char const* rawFolderName = tgt->GetProperty("FOLDER"); - if (NULL == rawFolderName) { - rawFolderName = ""; - } - std::string folderName(rawFolderName); + std::string folderName = tgt->GetEffectiveFolderName(); if (this->TargetFolderBuildStreams.end() == this->TargetFolderBuildStreams.find(folderName)) { this->AddFilesUpToPath( diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 3637fed..0287def 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -409,8 +409,8 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( // Create "solution folder" information from FOLDER target property // if (written && this->UseFolderProperty()) { - const char* targetFolder = target->GetProperty("FOLDER"); - if (targetFolder) { + const std::string targetFolder = target->GetEffectiveFolderName(); + if (!targetFolder.empty()) { std::vector tokens = cmSystemTools::SplitString(targetFolder, '/', false); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 0ddfc9a..7b1afa5 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2723,8 +2723,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateOrGetPBXGroup( { std::string s; std::string target; - const char* targetFolder = gtgt->GetProperty("FOLDER"); - if (targetFolder) { + const std::string targetFolder = gtgt->GetEffectiveFolderName(); + if (!targetFolder.empty()) { target = targetFolder; target += "/"; } ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 10:14:58 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:14:58 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-228-g6f7c02a Message-ID: <20161017141458.488AEF346B@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 6f7c02ab0ac83fcb23f147a41902d5ac97d4a299 (commit) via 78b00f1d10f5bb0a152d7825ef554836b52f7977 (commit) from 0cbe2edb23d581233c518beafe92a2c9d4f529ac (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f7c02ab0ac83fcb23f147a41902d5ac97d4a299 commit 6f7c02ab0ac83fcb23f147a41902d5ac97d4a299 Merge: 0cbe2ed 78b00f1 Author: Brad King AuthorDate: Mon Oct 17 10:14:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 10:14:55 2016 -0400 Merge topic 'doc-clarify-ctest-APPEND' 78b00f1d Help: Clarify `ctest_*` APPEND option behavior ----------------------------------------------------------------------- Summary of changes: Help/command/ctest_build.rst | 4 +++- Help/command/ctest_configure.rst | 4 +++- Help/command/ctest_coverage.rst | 4 +++- Help/command/ctest_test.rst | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 10:15:01 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:15:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-230-g5fdee6d Message-ID: <20161017141501.7D2F2F366A@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 5fdee6d402798545280f8dc2955b21d4fe61605c (commit) via c05d9b0569a2a2c43db6f09a53fed7b54ae97d32 (commit) from 6f7c02ab0ac83fcb23f147a41902d5ac97d4a299 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5fdee6d402798545280f8dc2955b21d4fe61605c commit 5fdee6d402798545280f8dc2955b21d4fe61605c Merge: 6f7c02a c05d9b0 Author: Brad King AuthorDate: Mon Oct 17 10:14:59 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 10:14:59 2016 -0400 Merge topic 'doc-math-EXPR' c05d9b05 Help: Fix math(EXPR) documentation formatting ----------------------------------------------------------------------- Summary of changes: Help/command/math.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 10:15:04 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:15:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-232-g69be823 Message-ID: <20161017141504.3FE45F36F1@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 69be82394dcd9044c9aa392e0aa078a6e09ec460 (commit) via e8bafb6fcbb46bad4dfcb8dab1347c8e5f9a8090 (commit) from 5fdee6d402798545280f8dc2955b21d4fe61605c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69be82394dcd9044c9aa392e0aa078a6e09ec460 commit 69be82394dcd9044c9aa392e0aa078a6e09ec460 Merge: 5fdee6d e8bafb6 Author: Brad King AuthorDate: Mon Oct 17 10:15:02 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 10:15:02 2016 -0400 Merge topic 'osx-no-deployment-target-on-cross-compile' e8bafb6f OS X: Do not try to set deployment target when cross-compiling ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Darwin-Initialize.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 10:15:14 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:15:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-236-g274ff52 Message-ID: <20161017141514.73D64F3789@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 274ff520925deea9bf9532673c15b96616521615 (commit) via 70e268da3e5f8e00bdf065786cd685a9660fe1c4 (commit) via 47092d3e809be971264a8d5416ff3cb9255f6565 (commit) via 7db671a14374fdbfb8ae87ab9618bca111f4e8a5 (commit) from 69be82394dcd9044c9aa392e0aa078a6e09ec460 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=274ff520925deea9bf9532673c15b96616521615 commit 274ff520925deea9bf9532673c15b96616521615 Merge: 69be823 70e268d Author: Brad King AuthorDate: Mon Oct 17 10:15:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 10:15:12 2016 -0400 Merge topic 'cmcldeps-more-safety' 70e268da cmcldeps: prefer the /TC flag 47092d3e cmcldeps: append strings as strings 7db671a1 cmcldeps: search for single-byte strings as characters ----------------------------------------------------------------------- Summary of changes: Source/cmcldeps.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 10:15:17 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:15:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-238-g248527e Message-ID: <20161017141517.2E9EEF373B@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 248527ed930ea69f9d6953a47b708044c48d5921 (commit) via 3b6f1587bed536e3d31e6665aff35aa27f5e79bc (commit) from 274ff520925deea9bf9532673c15b96616521615 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=248527ed930ea69f9d6953a47b708044c48d5921 commit 248527ed930ea69f9d6953a47b708044c48d5921 Merge: 274ff52 3b6f158 Author: Brad King AuthorDate: Mon Oct 17 10:15:15 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 10:15:15 2016 -0400 Merge topic 'refactor-folder-name-retrieval' 3b6f1587 Factor IDE folder name retrieval out into helper method ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 16 ++++++++++++++++ Source/cmGeneratorTarget.h | 3 +++ Source/cmGhsMultiTargetGenerator.cxx | 4 +--- Source/cmGlobalGenerator.cxx | 2 +- Source/cmGlobalGenerator.h | 3 ++- Source/cmGlobalGhsMultiGenerator.cxx | 6 +----- Source/cmGlobalVisualStudio7Generator.cxx | 4 ++-- Source/cmGlobalXCodeGenerator.cxx | 4 ++-- 8 files changed, 28 insertions(+), 14 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 10:15:21 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:15:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-255-g9a2048f Message-ID: <20161017141521.36C2AF38A9@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 9a2048f1ea6687530e209992c3f5eafcbc02b2a9 (commit) via b59b6dd9d27de7839c7b23a3094db33298038896 (commit) via bdddd4234e977f65ee7df8adcd3888706dfd0dda (commit) via f796e1b6f6984b200453a13e6b8640353ff9488b (commit) via c75a9d660169ddd1e7be57486d3813ca73886b55 (commit) via 46ad0d2183230d1af93242efbdcce20d55514efb (commit) via 2628dec12cb22546d2a21032f53fb0ef096faec8 (commit) via 315b9a31895ca6bb26eba12bff3a0fe9cd37568a (commit) via d5feb5b34cd9f595bf42aa934738b918785e3e87 (commit) via efba22e1deebcfc3924d5f14c026104eb4b62d28 (commit) via b29425f7aafe07eff526f3c7defb317856b72984 (commit) via f009d8f5e2e4007b93494c5d22ba25b41a4872a1 (commit) via 6cd27a853a1c77e5da0a9a14140284a7674cf18c (commit) via 8b0e4795687a2ea289d1313db24d75bcf3cd13bc (commit) via 88016e2e9f13d60c4a0b88fb64ffd802a2d9e534 (commit) via be87cb0c444595fa1970e257031252669c201d3e (commit) via 425cd1670fdd40b752af71e5f28952ae4fcec4ac (commit) from 248527ed930ea69f9d6953a47b708044c48d5921 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a2048f1ea6687530e209992c3f5eafcbc02b2a9 commit 9a2048f1ea6687530e209992c3f5eafcbc02b2a9 Merge: 248527e b59b6dd Author: Brad King AuthorDate: Mon Oct 17 10:15:17 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 10:15:17 2016 -0400 Merge topic 'extract-cmRulePlaceholderExpander' b59b6dd9 cmRulePlaceholderExpander: Port clients to direct-use bdddd423 cmRulePlaceholderExpander: Extract from cmLocalGenerator f796e1b6 cmLocalGenerator: Move memset to cxx file c75a9d66 cmLocalGenerator: Use strings instead of a Target in rule replacement 46ad0d21 cmLocalGenerator: Use a converter in rule replacement API 2628dec1 cmLocalGenerator: Store variable replacements as state 315b9a31 cmLocalGenerator: Merge loops which populate mapping d5feb5b3 cmLocalGenerator: Populate variable mapping for all replacements efba22e1 cmLocalGenerator: Extract compiler option replacement from loop b29425f7 cmLocalGenerator: Populate a container of mappings for replacements f009d8f5 cmLocalGenerator: Move compiler option handling to be more direct 6cd27a85 cmLocalGenerator: Move variable to where it can be used easily 8b0e4795 cmLocalGenerator: Use the language from the compiler container 88016e2e cmLocalGenerator: Introduce a container of compiler names be87cb0c cmLocalGenerator: Simplify loop with range algorithm 425cd167 cmLocalGenerator: Remove the launcher from RuleVariables ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 + Source/cmLocalGenerator.cxx | 412 +++++------------------- Source/cmLocalGenerator.h | 63 +--- Source/cmLocalNinjaGenerator.cxx | 28 +- Source/cmLocalNinjaGenerator.h | 8 +- Source/cmLocalUnixMakefileGenerator3.cxx | 17 +- Source/cmMakefileExecutableTargetGenerator.cxx | 27 +- Source/cmMakefileLibraryTargetGenerator.cxx | 40 ++- Source/cmMakefileTargetGenerator.cxx | 23 +- Source/cmNinjaNormalTargetGenerator.cxx | 24 +- Source/cmNinjaTargetGenerator.cxx | 41 ++- Source/cmRulePlaceholderExpander.cxx | 304 +++++++++++++++++ Source/cmRulePlaceholderExpander.h | 83 +++++ bootstrap | 1 + 14 files changed, 634 insertions(+), 439 deletions(-) create mode 100644 Source/cmRulePlaceholderExpander.cxx create mode 100644 Source/cmRulePlaceholderExpander.h hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 10:15:24 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:15:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-275-g188c762 Message-ID: <20161017141524.74CB5F366A@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 188c762f8a5f690708109a3cb8d44693e599adb1 (commit) via cef59bb8bac6b6d38025cc492235953c5ff7654b (commit) via 0d57b07ad99cefc5df9e65d6c14aeaddf5d64b88 (commit) via c3fb0d95ad114c9f9680e885c4c2263b43c437dc (commit) via fa9dbc56a15aec71ac2eda7890efd0116797f373 (commit) via 848ae2a663ef83e059561d94b33d551154642231 (commit) via a0a720e6a70133e361762101ce69a0b3f1ab244d (commit) via 637e3f3ee131cf30f7337db06314f4a1af22c245 (commit) via 05251e6d80b03ae14d6a89765f14c2eb10979bd4 (commit) via fbf1721c94b40ea86eeb183a1916f2066eb64bdc (commit) via 390a7d8647c13570dc6416fceb884dc51c8ef6f9 (commit) via e32a6bdd990571bafb8537110128d28a593150b7 (commit) via 7863fba1f6f37db2f75834d0d6a3fbbc680e731c (commit) via 8096682e4edb542a48bbf66c085911db5f00be02 (commit) via 7d57c1a2c926011bc2e4c7a65b802763ec4efbcb (commit) via a55cac4ba475ff61da4146272246512a52247323 (commit) via 705fcf522be16eee03b1757274b23ada6547e6bd (commit) via 1fb6f672bd2bd041edb772b0627278383a00fb62 (commit) via 60b3f216c18aa317656433bcc0b724e6abd8d02f (commit) via aaa5dbbf64392dad518668ac1d046d624dac41f3 (commit) from 9a2048f1ea6687530e209992c3f5eafcbc02b2a9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=188c762f8a5f690708109a3cb8d44693e599adb1 commit 188c762f8a5f690708109a3cb8d44693e599adb1 Merge: 9a2048f cef59bb Author: Brad King AuthorDate: Mon Oct 17 10:15:21 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 10:15:21 2016 -0400 Merge topic 'extract-computed-target-properties' cef59bb8 cmTarget: Implement GetProperty in terms of cmState::Snapshot 0d57b07a cmTarget: Group code for checking written properties together c3fb0d95 cmTarget: Move sanity checks and computed property access to callers fa9dbc56 cmGeneratorTarget: Implement cmTargetPropertyComputer interface 848ae2a6 cmTargetPropertyComputer: Template some methods on the Target a0a720e6 cm{,Generator}Target: Add global generator accessors 637e3f3e cmTargetPropertyComputer: Unify whitelist handling from cmTarget 05251e6d cmTargetPropertyComputer: Move whitelist check from cmTarget fbf1721c cmTargetPropertyComputer: Extract into new files 390a7d86 cmTargetPropertyComputer: Implement GetProperty without cmMakefile e32a6bdd cmListFileBacktrace: Add a method to retrieve the Bottom of a snapshot 7863fba1 cmTarget: Extract GetLocation method 8096682e cmTarget: Extract GetSources method 7d57c1a2 cmTarget: Extract location computation methods a55cac4b cmTarget: Split property computation into separate class 705fcf52 cmTarget: Move IMPORTED check to callers ... ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 + Source/cmGeneratorTarget.cxx | 57 ++- Source/cmGeneratorTarget.h | 4 + Source/cmGetPropertyCommand.cxx | 15 +- Source/cmGetTargetPropertyCommand.cxx | 13 +- Source/cmListFileCache.h | 2 + Source/cmTarget.cxx | 458 ++++++++------------ Source/cmTarget.h | 19 +- Source/cmTargetPropertyComputer.cxx | 99 +++++ Source/cmTargetPropertyComputer.h | 110 +++++ .../TARGET_PROPERTY-LOCATION-stderr.txt | 4 +- bootstrap | 1 + 12 files changed, 493 insertions(+), 291 deletions(-) create mode 100644 Source/cmTargetPropertyComputer.cxx create mode 100644 Source/cmTargetPropertyComputer.h hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 10:15:40 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:15:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-564-gc7f69a3 Message-ID: <20161017141540.BED10F3A2A@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 c7f69a3ee6d693e6fb6d563d7914afb12abdca82 (commit) via 188c762f8a5f690708109a3cb8d44693e599adb1 (commit) via 9a2048f1ea6687530e209992c3f5eafcbc02b2a9 (commit) via 248527ed930ea69f9d6953a47b708044c48d5921 (commit) via 274ff520925deea9bf9532673c15b96616521615 (commit) via 69be82394dcd9044c9aa392e0aa078a6e09ec460 (commit) via 5fdee6d402798545280f8dc2955b21d4fe61605c (commit) via 6f7c02ab0ac83fcb23f147a41902d5ac97d4a299 (commit) via 0cbe2edb23d581233c518beafe92a2c9d4f529ac (commit) from b09b42069ca7cfe9510fafbf8e5282a49bb45e93 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c7f69a3ee6d693e6fb6d563d7914afb12abdca82 commit c7f69a3ee6d693e6fb6d563d7914afb12abdca82 Merge: b09b420 188c762 Author: Brad King AuthorDate: Mon Oct 17 10:15:33 2016 -0400 Commit: Brad King CommitDate: Mon Oct 17 10:15:33 2016 -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 Oct 17 10:19:00 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 10:19:00 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-568-ga954000 Message-ID: <20161017141900.B86CEF5A4C@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 a9540002c5101e533e1896a4150462f20ceac68f (commit) via 2810e561829b0db36961442f0332939e1b74ccdf (commit) via 834f52a6f41ec5ae8429afa2d374f96458963cf3 (commit) via 7aaed265ade4c3b38967e83095497280a7a55153 (commit) from c7f69a3ee6d693e6fb6d563d7914afb12abdca82 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9540002c5101e533e1896a4150462f20ceac68f commit a9540002c5101e533e1896a4150462f20ceac68f Merge: c7f69a3 2810e56 Author: Brad King AuthorDate: Mon Oct 17 10:18:59 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 10:18:59 2016 -0400 Merge topic 'math-EXPR-unary' into next 2810e561 math(EXPR): Add support for unary `+` and `-` expressions 834f52a6 cmExprParser: Revise indentation style to match rest of CMake 7aaed265 cmExprParser: Port to bison 3 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2810e561829b0db36961442f0332939e1b74ccdf commit 2810e561829b0db36961442f0332939e1b74ccdf Author: Brad King AuthorDate: Fri Oct 14 15:28:51 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 15:35:15 2016 -0400 math(EXPR): Add support for unary `+` and `-` expressions Closes: #8996 diff --git a/Help/release/dev/math-EXPR-unary.rst b/Help/release/dev/math-EXPR-unary.rst new file mode 100644 index 0000000..d4af15b0 --- /dev/null +++ b/Help/release/dev/math-EXPR-unary.rst @@ -0,0 +1,5 @@ +math-EXPR-unary +--------------- + +* The :command:`math(EXPR)` command gained support for unary + ``+`` and ``-`` expressions. diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx index 6eef2db..d11d0b6 100644 --- a/Source/cmExprParser.cxx +++ b/Source/cmExprParser.cxx @@ -422,18 +422,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 12 +#define YYFINAL 17 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 25 +#define YYLAST 30 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 17 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 9 +#define YYNNTS 10 /* YYNRULES -- Number of rules. */ -#define YYNRULES 20 +#define YYNRULES 23 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 34 +#define YYNSTATES 39 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -483,7 +483,7 @@ static const yytype_uint8 yyrline[] = { 0, 70, 70, 75, 78, 83, 86, 91, 94, 99, 102, 105, 110, 113, 116, 121, 124, 127, 130, 135, - 138 + 138, 141, 146, 149 }; #endif @@ -496,7 +496,7 @@ static const char *const yytname[] = "exp_DIVIDE", "exp_MOD", "exp_SHIFTLEFT", "exp_SHIFTRIGHT", "exp_OPENPARENT", "exp_CLOSEPARENT", "exp_OR", "exp_AND", "exp_XOR", "exp_NOT", "exp_NUMBER", "$accept", "start", "exp", "bitwiseor", - "bitwisexor", "bitwiseand", "shift", "term", "factor", YY_NULLPTR + "bitwisexor", "bitwiseand", "shift", "term", "unary", "factor", YY_NULLPTR }; #endif @@ -510,10 +510,10 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -14 +#define YYPACT_NINF -8 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-14))) + (!!((Yystate) == (-8))) #define YYTABLE_NINF -1 @@ -524,10 +524,10 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int8 yypact[] = { - -10, -10, -14, 18, 7, 6, 8, 2, 1, -4, - -14, 3, -14, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -14, 6, 8, 2, 1, 1, -4, - -4, -14, -14, -14 + 0, 0, 0, 0, -8, 2, -7, -5, 8, 3, + 10, 1, -8, -8, -8, -8, 6, -8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -8, -5, + 8, 3, 10, 10, 1, 1, -8, -8, -8 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -535,22 +535,22 @@ static const yytype_int8 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 19, 0, 2, 3, 5, 7, 9, 12, - 15, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 20, 4, 6, 8, 10, 11, 13, - 14, 16, 17, 18 + 0, 0, 0, 0, 22, 0, 2, 3, 5, 7, + 9, 12, 15, 19, 20, 21, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, + 6, 8, 10, 11, 13, 14, 16, 17, 18 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -14, -14, 21, 10, 11, 9, 0, -6, -13 + -8, -8, 12, 5, 11, 9, -2, 4, -1, -8 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 3, 4, 5, 6, 7, 8, 9, 10 + -1, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -558,26 +558,28 @@ static const yytype_int8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 1, 20, 21, 22, 18, 19, 2, 31, 32, 33, - 16, 17, 29, 30, 23, 13, 27, 28, 12, 13, - 14, 15, 11, 24, 26, 25 + 14, 15, 17, 1, 2, 18, 25, 26, 27, 19, + 3, 21, 22, 23, 24, 16, 4, 28, 18, 32, + 33, 20, 0, 29, 36, 37, 38, 34, 35, 31, + 30 }; -static const yytype_uint8 yycheck[] = +static const yytype_int8 yycheck[] = { - 10, 5, 6, 7, 3, 4, 16, 20, 21, 22, - 8, 9, 18, 19, 11, 12, 16, 17, 0, 12, - 14, 13, 1, 13, 15, 14 + 1, 2, 0, 3, 4, 12, 5, 6, 7, 14, + 10, 8, 9, 3, 4, 3, 16, 11, 12, 21, + 22, 13, -1, 18, 25, 26, 27, 23, 24, 20, + 19 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 10, 16, 18, 19, 20, 21, 22, 23, 24, - 25, 19, 0, 12, 14, 13, 8, 9, 3, 4, - 5, 6, 7, 11, 20, 21, 22, 23, 23, 24, - 24, 25, 25, 25 + 0, 3, 4, 10, 16, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 25, 25, 19, 0, 12, 14, + 13, 8, 9, 3, 4, 5, 6, 7, 11, 20, + 21, 22, 23, 23, 24, 24, 25, 25, 25 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -585,7 +587,7 @@ static const yytype_uint8 yyr1[] = { 0, 17, 18, 19, 19, 20, 20, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, - 25 + 25, 25, 26, 26 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -593,7 +595,7 @@ static const yytype_uint8 yyr2[] = { 0, 2, 1, 1, 3, 1, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, - 3 + 2, 2, 1, 3 }; @@ -1280,7 +1282,7 @@ yyreduce: { cmExpr_yyget_extra(yyscanner)->SetResult((yyvsp[0].Number)); } -#line 1284 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1286 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 3: @@ -1288,7 +1290,7 @@ yyreduce: { (yyval.Number) = (yyvsp[0].Number); } -#line 1292 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1294 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 4: @@ -1296,7 +1298,7 @@ yyreduce: { (yyval.Number) = (yyvsp[-2].Number) | (yyvsp[0].Number); } -#line 1300 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1302 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 5: @@ -1304,7 +1306,7 @@ yyreduce: { (yyval.Number) = (yyvsp[0].Number); } -#line 1308 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1310 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 6: @@ -1312,7 +1314,7 @@ yyreduce: { (yyval.Number) = (yyvsp[-2].Number) ^ (yyvsp[0].Number); } -#line 1316 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1318 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 7: @@ -1320,7 +1322,7 @@ yyreduce: { (yyval.Number) = (yyvsp[0].Number); } -#line 1324 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1326 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 8: @@ -1328,7 +1330,7 @@ yyreduce: { (yyval.Number) = (yyvsp[-2].Number) & (yyvsp[0].Number); } -#line 1332 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1334 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 9: @@ -1336,7 +1338,7 @@ yyreduce: { (yyval.Number) = (yyvsp[0].Number); } -#line 1340 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1342 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 10: @@ -1344,7 +1346,7 @@ yyreduce: { (yyval.Number) = (yyvsp[-2].Number) << (yyvsp[0].Number); } -#line 1348 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1350 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 11: @@ -1352,7 +1354,7 @@ yyreduce: { (yyval.Number) = (yyvsp[-2].Number) >> (yyvsp[0].Number); } -#line 1356 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1358 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 12: @@ -1360,7 +1362,7 @@ yyreduce: { (yyval.Number) = (yyvsp[0].Number); } -#line 1364 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1366 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 13: @@ -1368,7 +1370,7 @@ yyreduce: { (yyval.Number) = (yyvsp[-2].Number) + (yyvsp[0].Number); } -#line 1372 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1374 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 14: @@ -1376,7 +1378,7 @@ yyreduce: { (yyval.Number) = (yyvsp[-2].Number) - (yyvsp[0].Number); } -#line 1380 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1382 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 15: @@ -1384,7 +1386,7 @@ yyreduce: { (yyval.Number) = (yyvsp[0].Number); } -#line 1388 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1390 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 16: @@ -1392,7 +1394,7 @@ yyreduce: { (yyval.Number) = (yyvsp[-2].Number) * (yyvsp[0].Number); } -#line 1396 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1398 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 17: @@ -1400,7 +1402,7 @@ yyreduce: { (yyval.Number) = (yyvsp[-2].Number) / (yyvsp[0].Number); } -#line 1404 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1406 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 18: @@ -1408,7 +1410,7 @@ yyreduce: { (yyval.Number) = (yyvsp[-2].Number) % (yyvsp[0].Number); } -#line 1412 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1414 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 19: @@ -1416,19 +1418,43 @@ yyreduce: { (yyval.Number) = (yyvsp[0].Number); } -#line 1420 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1422 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 20: #line 138 "cmExprParser.y" /* yacc.c:1646 */ { + (yyval.Number) = + (yyvsp[0].Number); + } +#line 1430 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 21: +#line 141 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = - (yyvsp[0].Number); + } +#line 1438 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 22: +#line 146 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1446 "cmExprParser.cxx" /* yacc.c:1646 */ + break; + + case 23: +#line 149 "cmExprParser.y" /* yacc.c:1646 */ + { (yyval.Number) = (yyvsp[-1].Number); } -#line 1428 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1454 "cmExprParser.cxx" /* yacc.c:1646 */ break; -#line 1432 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1458 "cmExprParser.cxx" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1658,7 +1684,7 @@ yyreturn: #endif return yyresult; } -#line 143 "cmExprParser.y" /* yacc.c:1906 */ +#line 154 "cmExprParser.y" /* yacc.c:1906 */ /* End of grammar */ diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y index ce467cf..c7c4a7b 100644 --- a/Source/cmExprParser.y +++ b/Source/cmExprParser.y @@ -118,19 +118,30 @@ shift: } term: - factor { + unary { $$ = $1; } -| term exp_TIMES factor { +| term exp_TIMES unary { $$ = $1 * $3; } -| term exp_DIVIDE factor { +| term exp_DIVIDE unary { $$ = $1 / $3; } -| term exp_MOD factor { +| term exp_MOD unary { $$ = $1 % $3; } +unary: + factor { + $$ = $1; + } +| exp_PLUS unary { + $$ = + $2; + } +| exp_MINUS unary { + $$ = - $2; + } + factor: exp_NUMBER { $$ = $1; diff --git a/Tests/MathTest/CMakeLists.txt b/Tests/MathTest/CMakeLists.txt index ed2c7d4..f764b3a 100644 --- a/Tests/MathTest/CMakeLists.txt +++ b/Tests/MathTest/CMakeLists.txt @@ -10,6 +10,9 @@ set(expressions "1 +(3*4) + 10 >> 2" "10000 / 20 / 4" "10000 / (20 / 4)" + "-1 + +1" + "+1 - -1" + "+1 - - + + -(-3 + - - +1)" ) set(FILE_EXPRESSIONS "") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=834f52a6f41ec5ae8429afa2d374f96458963cf3 commit 834f52a6f41ec5ae8429afa2d374f96458963cf3 Author: Brad King AuthorDate: Fri Oct 14 15:25:14 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 15:30:50 2016 -0400 cmExprParser: Revise indentation style to match rest of CMake diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx index 49d6c2f..6eef2db 100644 --- a/Source/cmExprParser.cxx +++ b/Source/cmExprParser.cxx @@ -481,9 +481,9 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 70, 70, 76, 79, 83, 86, 90, 93, 97, - 100, 103, 108, 111, 114, 118, 121, 124, 127, 131, - 134 + 0, 70, 70, 75, 78, 83, 86, 91, 94, 99, + 102, 105, 110, 113, 116, 121, 124, 127, 130, 135, + 138 }; #endif @@ -495,7 +495,7 @@ static const char *const yytname[] = "$end", "error", "$undefined", "exp_PLUS", "exp_MINUS", "exp_TIMES", "exp_DIVIDE", "exp_MOD", "exp_SHIFTLEFT", "exp_SHIFTRIGHT", "exp_OPENPARENT", "exp_CLOSEPARENT", "exp_OR", "exp_AND", "exp_XOR", - "exp_NOT", "exp_NUMBER", "$accept", "Start", "exp", "bitwiseor", + "exp_NOT", "exp_NUMBER", "$accept", "start", "exp", "bitwiseor", "bitwisexor", "bitwiseand", "shift", "term", "factor", YY_NULLPTR }; #endif @@ -1276,123 +1276,159 @@ yyreduce: switch (yyn) { case 2: -#line 71 "cmExprParser.y" /* yacc.c:1646 */ +#line 70 "cmExprParser.y" /* yacc.c:1646 */ { - cmExpr_yyget_extra(yyscanner)->SetResult((yyvsp[0].Number)); -} + cmExpr_yyget_extra(yyscanner)->SetResult((yyvsp[0].Number)); + } #line 1284 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 3: -#line 77 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[0].Number);} -#line 1290 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 75 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1292 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 4: -#line 80 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[-2].Number) | (yyvsp[0].Number);} -#line 1296 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 78 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) | (yyvsp[0].Number); + } +#line 1300 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 5: -#line 84 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[0].Number);} -#line 1302 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 83 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1308 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 6: -#line 87 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[-2].Number) ^ (yyvsp[0].Number);} -#line 1308 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 86 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) ^ (yyvsp[0].Number); + } +#line 1316 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 7: #line 91 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[0].Number);} -#line 1314 "cmExprParser.cxx" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1324 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 8: #line 94 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[-2].Number) & (yyvsp[0].Number);} -#line 1320 "cmExprParser.cxx" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) & (yyvsp[0].Number); + } +#line 1332 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 9: -#line 98 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[0].Number);} -#line 1326 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 99 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1340 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 10: -#line 101 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[-2].Number) << (yyvsp[0].Number);} -#line 1332 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 102 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) << (yyvsp[0].Number); + } +#line 1348 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 11: -#line 104 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[-2].Number) >> (yyvsp[0].Number);} -#line 1338 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 105 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) >> (yyvsp[0].Number); + } +#line 1356 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 12: -#line 109 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[0].Number);} -#line 1344 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 110 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1364 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 13: -#line 112 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[-2].Number) + (yyvsp[0].Number);} -#line 1350 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 113 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) + (yyvsp[0].Number); + } +#line 1372 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 14: -#line 115 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[-2].Number) - (yyvsp[0].Number);} -#line 1356 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 116 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) - (yyvsp[0].Number); + } +#line 1380 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 15: -#line 119 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[0].Number);} -#line 1362 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 121 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1388 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 16: -#line 122 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[-2].Number) * (yyvsp[0].Number);} -#line 1368 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 124 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) * (yyvsp[0].Number); + } +#line 1396 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 17: -#line 125 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[-2].Number) / (yyvsp[0].Number);} -#line 1374 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 127 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) / (yyvsp[0].Number); + } +#line 1404 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 18: -#line 128 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[-2].Number) % (yyvsp[0].Number);} -#line 1380 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 130 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-2].Number) % (yyvsp[0].Number); + } +#line 1412 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 19: -#line 132 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[0].Number);} -#line 1386 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 135 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[0].Number); + } +#line 1420 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 20: -#line 135 "cmExprParser.y" /* yacc.c:1646 */ - {(yyval.Number) = (yyvsp[-1].Number);} -#line 1392 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 138 "cmExprParser.y" /* yacc.c:1646 */ + { + (yyval.Number) = (yyvsp[-1].Number); + } +#line 1428 "cmExprParser.cxx" /* yacc.c:1646 */ break; -#line 1396 "cmExprParser.cxx" /* yacc.c:1646 */ +#line 1432 "cmExprParser.cxx" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1622,7 +1658,7 @@ yyreturn: #endif return yyresult; } -#line 139 "cmExprParser.y" /* yacc.c:1906 */ +#line 143 "cmExprParser.y" /* yacc.c:1906 */ /* End of grammar */ diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y index b511fa7..ce467cf 100644 --- a/Source/cmExprParser.y +++ b/Source/cmExprParser.y @@ -66,76 +66,80 @@ static void cmExpr_yyerror(yyscan_t yyscanner, const char* message); %% -Start: -exp -{ - cmExpr_yyget_extra(yyscanner)->SetResult($1); -} +start: + exp { + cmExpr_yyget_extra(yyscanner)->SetResult($1); + } exp: -bitwiseor -{$$ = $1;} -| -exp exp_OR bitwiseor -{$$ = $1 | $3;} + bitwiseor { + $$ = $1; + } +| exp exp_OR bitwiseor { + $$ = $1 | $3; + } bitwiseor: -bitwisexor -{$$ = $1;} -| -bitwiseor exp_XOR bitwisexor -{$$ = $1 ^ $3;} + bitwisexor { + $$ = $1; + } +| bitwiseor exp_XOR bitwisexor { + $$ = $1 ^ $3; + } bitwisexor: -bitwiseand -{$$ = $1;} -| -bitwisexor exp_AND bitwiseand -{$$ = $1 & $3;} + bitwiseand { + $$ = $1; + } +| bitwisexor exp_AND bitwiseand { + $$ = $1 & $3; + } bitwiseand: -shift -{$$ = $1;} -| -bitwiseand exp_SHIFTLEFT shift -{$$ = $1 << $3;} -| -bitwiseand exp_SHIFTRIGHT shift -{$$ = $1 >> $3;} - + shift { + $$ = $1; + } +| bitwiseand exp_SHIFTLEFT shift { + $$ = $1 << $3; + } +| bitwiseand exp_SHIFTRIGHT shift { + $$ = $1 >> $3; + } shift: -term -{$$ = $1;} -| -shift exp_PLUS term -{$$ = $1 + $3;} -| -shift exp_MINUS term -{$$ = $1 - $3;} + term { + $$ = $1; + } +| shift exp_PLUS term { + $$ = $1 + $3; + } +| shift exp_MINUS term { + $$ = $1 - $3; + } term: -factor -{$$ = $1;} -| -term exp_TIMES factor -{$$ = $1 * $3;} -| -term exp_DIVIDE factor -{$$ = $1 / $3;} -| -term exp_MOD factor -{$$ = $1 % $3;} + factor { + $$ = $1; + } +| term exp_TIMES factor { + $$ = $1 * $3; + } +| term exp_DIVIDE factor { + $$ = $1 / $3; + } +| term exp_MOD factor { + $$ = $1 % $3; + } factor: -exp_NUMBER -{$$ = $1;} -| -exp_OPENPARENT exp exp_CLOSEPARENT -{$$ = $2;} + exp_NUMBER { + $$ = $1; + } +| exp_OPENPARENT exp exp_CLOSEPARENT { + $$ = $2; + } ; - %% /* End of grammar */ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7aaed265ade4c3b38967e83095497280a7a55153 commit 7aaed265ade4c3b38967e83095497280a7a55153 Author: Brad King AuthorDate: Fri Oct 14 15:08:48 2016 -0400 Commit: Brad King CommitDate: Fri Oct 14 15:30:49 2016 -0400 cmExprParser: Port to bison 3 Use %-directives to specify the scanner/lexer arguments and update the yyerror signature. Reduce the list of post-bison modifications needed. diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx index 077106f..49d6c2f 100644 --- a/Source/cmExprParser.cxx +++ b/Source/cmExprParser.cxx @@ -1,12 +1,13 @@ -/* A Bison parser, made by GNU Bison 1.875d. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ -/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, - 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Bison implementation for Yacc-like parsers in C - This program is free software; you can redistribute it and/or modify + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,17 +15,23 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local @@ -33,76 +40,35 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* turn off some warning as this is generated code */ -#if defined(_MSC_VER) -# pragma warning ( disable : 4702 ) /* unreachable code */ -#endif - /* Identify Bison output. */ #define YYBISON 1 +/* Bison version. */ +#define YYBISON_VERSION "3.0.4" + /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 - -/* If NAME_PREFIX is specified substitute the variables and functions - names. */ -#define yyparse cmExpr_yyparse -#define yylex cmExpr_yylex -#define yyerror cmExpr_yyerror -#define yylval cmExpr_yylval -#define yychar cmExpr_yychar -#define yydebug cmExpr_yydebug -#define yynerrs cmExpr_yynerrs - +/* Push parsers. */ +#define YYPUSH 0 -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - exp_PLUS = 258, - exp_MINUS = 259, - exp_TIMES = 260, - exp_DIVIDE = 261, - exp_MOD = 262, - exp_SHIFTLEFT = 263, - exp_SHIFTRIGHT = 264, - exp_OPENPARENT = 265, - exp_CLOSEPARENT = 266, - exp_OR = 267, - exp_AND = 268, - exp_XOR = 269, - exp_NOT = 270, - exp_NUMBER = 271 - }; -#endif -#define exp_PLUS 258 -#define exp_MINUS 259 -#define exp_TIMES 260 -#define exp_DIVIDE 261 -#define exp_MOD 262 -#define exp_SHIFTLEFT 263 -#define exp_SHIFTRIGHT 264 -#define exp_OPENPARENT 265 -#define exp_CLOSEPARENT 266 -#define exp_OR 267 -#define exp_AND 268 -#define exp_XOR 269 -#define exp_NOT 270 -#define exp_NUMBER 271 +/* Pull parsers. */ +#define YYPULL 1 +/* Substitute the variable and function names. */ +#define yyparse cmExpr_yyparse +#define yylex cmExpr_yylex +#define yyerror cmExpr_yyerror +#define yydebug cmExpr_yydebug +#define yynerrs cmExpr_yynerrs /* Copy the first part of user declarations. */ - +#line 1 "cmExprParser.y" /* yacc.c:339 */ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ @@ -112,24 +78,15 @@ This file must be translated to C and modified to build everywhere. Run bison like this: - bison --yacc --name-prefix=cmExpr_yy --defines=cmExprParserTokens.h - -ocmExprParser.cxx cmExprParser.y + bison --yacc --name-prefix=cmExpr_yy --defines=cmExprParserTokens.h -ocmExprParser.cxx cmExprParser.y Modify cmExprParser.cxx: - - remove TABs - - add __HP_aCC to the #if test for yyerrorlab warning suppression + - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] */ -/* Configure the parser to use a lexer object. */ -#define YYPARSE_PARAM yyscanner -#define YYLEX_PARAM yyscanner -#define YYERROR_VERBOSE 1 -#define cmExpr_yyerror(x) \ - cmExprError(yyscanner, x) -#define yyGetParser (cmExpr_yyget_extra(yyscanner)) - /*-------------------------------------------------------------------------*/ +#define YYDEBUG 1 #include "cmExprParserHelper.h" /* Interface to parser object. */ #include "cmExprLexer.h" /* Interface to lexer object. */ #include "cmExprParserTokens.h" /* Need YYSTYPE for YY_DECL. */ @@ -139,99 +96,281 @@ Modify cmExprParser.cxx: /* Forward declare the lexer entry point. */ YY_DECL; -/* Internal utility functions. */ -static void cmExprError(yyscan_t yyscanner, const char* message); - -#define YYDEBUG 1 -//#define YYMAXDEPTH 100000 -//#define YYINITDEPTH 10000 - +/* Helper function to forward error callback from parser. */ +static void cmExpr_yyerror(yyscan_t yyscanner, const char* message); /* Disable some warnings in the generated code. */ #ifdef _MSC_VER # pragma warning (disable: 4102) /* Unused goto label. */ -# pragma warning (disable: 4065) /* Switch statement contains default but - no case. */ +# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ #endif +#line 109 "cmExprParser.cxx" /* yacc.c:339 */ -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else -# define YYERROR_VERBOSE 0 +# define YYERROR_VERBOSE 1 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "cmExprParserTokens.h". */ +#ifndef YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED +# define YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int cmExpr_yydebug; #endif -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -typedef int YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + exp_PLUS = 258, + exp_MINUS = 259, + exp_TIMES = 260, + exp_DIVIDE = 261, + exp_MOD = 262, + exp_SHIFTLEFT = 263, + exp_SHIFTRIGHT = 264, + exp_OPENPARENT = 265, + exp_CLOSEPARENT = 266, + exp_OR = 267, + exp_AND = 268, + exp_XOR = 269, + exp_NOT = 270, + exp_NUMBER = 271 + }; #endif +/* Tokens. */ +#define exp_PLUS 258 +#define exp_MINUS 259 +#define exp_TIMES 260 +#define exp_DIVIDE 261 +#define exp_MOD 262 +#define exp_SHIFTLEFT 263 +#define exp_SHIFTRIGHT 264 +#define exp_OPENPARENT 265 +#define exp_CLOSEPARENT 266 +#define exp_OR 267 +#define exp_AND 268 +#define exp_XOR 269 +#define exp_NOT 270 +#define exp_NUMBER 271 + +/* Value type. */ + +int cmExpr_yyparse (yyscan_t yyscanner); + +#endif /* !YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED */ /* Copy the second part of user declarations. */ +#line 186 "cmExprParser.cxx" /* yacc.c:358 */ + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif -/* Line 214 of yacc.c. */ +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) -#if ! defined (yyoverflow) || YYERROR_VERBOSE +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif -# ifndef YYFREE -# define YYFREE free +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ # endif -# ifndef YYMALLOC -# define YYMALLOC malloc +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + + +#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# endif -# else -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif # endif # endif # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ + /* Pacify GCC's 'empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif +# else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif # endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - short int yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -239,74 +378,74 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined (__GNUC__) && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (0) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ while (0) #endif -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short int yysigned_char; -#endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ -/* YYFINAL -- State number of the termination state. */ +/* YYFINAL -- State number of the termination state. */ #define YYFINAL 12 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 25 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 17 -/* YYNNTS -- Number of nonterminals. */ +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 9 -/* YYNRULES -- Number of rules. */ +/* YYNRULES -- Number of rules. */ #define YYNRULES 20 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 34 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 271 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ +static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -339,79 +478,62 @@ static const unsigned char yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const unsigned char yyprhs[] = -{ - 0, 0, 3, 5, 7, 11, 13, 17, 19, 23, - 25, 29, 33, 35, 39, 43, 45, 49, 53, 57, - 59 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yysigned_char yyrhs[] = + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_uint8 yyrline[] = { - 18, 0, -1, 19, -1, 20, -1, 19, 12, 20, - -1, 21, -1, 20, 14, 21, -1, 22, -1, 21, - 13, 22, -1, 23, -1, 22, 8, 23, -1, 22, - 9, 23, -1, 24, -1, 23, 3, 24, -1, 23, - 4, 24, -1, 25, -1, 24, 5, 25, -1, 24, - 6, 25, -1, 24, 7, 25, -1, 16, -1, 10, - 19, 11, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned char yyrline[] = -{ - 0, 94, 94, 100, 103, 107, 110, 114, 117, 121, - 124, 127, 132, 135, 138, 142, 145, 148, 151, 155, - 158 + 0, 70, 70, 76, 79, 83, 86, 90, 93, 97, + 100, 103, 108, 111, 114, 118, 121, 124, 127, 131, + 134 }; #endif -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +#if YYDEBUG || YYERROR_VERBOSE || 1 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "exp_PLUS", "exp_MINUS", "exp_TIMES", "exp_DIVIDE", "exp_MOD", "exp_SHIFTLEFT", "exp_SHIFTRIGHT", "exp_OPENPARENT", "exp_CLOSEPARENT", "exp_OR", "exp_AND", "exp_XOR", "exp_NOT", "exp_NUMBER", "$accept", "Start", "exp", "bitwiseor", - "bitwisexor", "bitwiseand", "shift", "term", "factor", 0 + "bitwisexor", "bitwiseand", "shift", "term", "factor", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271 }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = -{ - 0, 17, 18, 19, 19, 20, 20, 21, 21, 22, - 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, - 25 -}; +#define YYPACT_NINF -14 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-14))) + +#define YYTABLE_NINF -1 + +#define yytable_value_is_error(Yytable_value) \ + 0 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int8 yypact[] = { - 0, 2, 1, 1, 3, 1, 3, 1, 3, 1, - 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, - 3 + -10, -10, -14, 18, 7, 6, 8, 2, 1, -4, + -14, 3, -14, -10, -10, -10, -10, -10, -10, -10, + -10, -10, -10, -14, 6, 8, 2, 1, 1, -4, + -4, -14, -14, -14 }; -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const unsigned char yydefact[] = + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = { 0, 0, 19, 0, 2, 3, 5, 7, 9, 12, 15, 0, 1, 0, 0, 0, 0, 0, 0, 0, @@ -419,51 +541,38 @@ static const unsigned char yydefact[] = 14, 16, 17, 18 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yysigned_char yydefgoto[] = + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = { - -1, 3, 4, 5, 6, 7, 8, 9, 10 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -14 -static const yysigned_char yypact[] = -{ - -10, -10, -14, 18, 7, 6, 8, 2, 1, -4, - -14, 3, -14, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -14, 6, 8, 2, 1, 1, -4, - -4, -14, -14, -14 + -14, -14, 21, 10, 11, 9, 0, -6, -13 }; -/* YYPGOTO[NTERM-NUM]. */ -static const yysigned_char yypgoto[] = + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = { - -14, -14, 21, 10, 11, 9, 0, -6, -13 + -1, 3, 4, 5, 6, 7, 8, 9, 10 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const unsigned char yytable[] = + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_uint8 yytable[] = { 1, 20, 21, 22, 18, 19, 2, 31, 32, 33, 16, 17, 29, 30, 23, 13, 27, 28, 12, 13, 14, 15, 11, 24, 26, 25 }; -static const unsigned char yycheck[] = +static const yytype_uint8 yycheck[] = { 10, 5, 6, 7, 3, 4, 16, 20, 21, 22, 8, 9, 18, 19, 11, 12, 16, 17, 0, 12, 14, 13, 1, 13, 15, 14 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const unsigned char yystos[] = + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = { 0, 10, 16, 18, 19, 20, 21, 22, 23, 24, 25, 19, 0, 12, 14, 13, 8, 9, 3, 4, @@ -471,78 +580,57 @@ static const unsigned char yystos[] = 24, 25, 25, 25 }; -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 17, 18, 19, 19, 20, 20, 21, 21, 22, + 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, + 25 +}; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 3, 1, 3, 1, 3, 1, + 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, + 3 +}; -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -#define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror ("syntax error: cannot back up");\ - YYERROR; \ - } \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (yyscanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ while (0) -#define YYTERROR 1 -#define YYERRCODE 256 - -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ - -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - ((Current).first_line = (Rhs)[1].first_line, \ - (Current).first_column = (Rhs)[1].first_column, \ - (Current).last_line = (Rhs)[N].last_line, \ - (Current).last_column = (Rhs)[N].last_column) -#endif +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval) -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -552,54 +640,85 @@ while (0) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ } while (0) -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (0) +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + -# define YYDSYMPRINTF(Title, Token, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, yyscanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ } while (0) + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + YYUSE (yyscanner); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + YYUSE (yytype); +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, yyscan_t yyscanner) +{ + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner); + YYFPRINTF (yyoutput, ")"); +} + /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) static void -yy_stack_print (short int *bottom, short int *top) -#else -static void -yy_stack_print (bottom, top) - short int *bottom; - short int *top; -#endif +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) { YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ } while (0) @@ -607,29 +726,30 @@ do { \ | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_reduce_print (int yyrule) -#else static void -yy_reduce_print (yyrule) - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, yyscan_t yyscanner) { + unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; int yyi; - unsigned int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , yyscanner); + YYFPRINTF (stderr, "\n"); + } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, yyscanner); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that @@ -637,15 +757,14 @@ do { \ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -653,58 +772,40 @@ int yydebug; if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ -#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif - #if YYERROR_VERBOSE # ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) +# if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -# else -yystrlen (yystr) - const char *yystr; -# endif { - const char *yys = yystr; - - while (*yys++ != '\0') + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) continue; - - return yys - yystr - 1; + return yylen; } # endif # endif # ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * -# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -# else -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif { char *yyd = yydest; const char *yys = yysrc; @@ -717,91 +818,207 @@ yystpcpy (yydest, yysrc) # endif # endif -#endif /* !YYERROR_VERBOSE */ +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; - + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ + if (! yyres) + return yystrlen (yystr); -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } - if (yytype < YYNTOKENS) + switch (yycount) { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ } - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - switch (yytype) + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) { - default: - break; + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; } - YYFPRINTF (yyoutput, ")"); + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } +#endif /* YYERROR_VERBOSE */ -#endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) static void -yydestruct (int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yytype, yyvaluep) - int yytype; - YYSTYPE *yyvaluep; -#endif +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t yyscanner) { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - switch (yytype) - { - - default: - break; - } + YYUSE (yyvaluep); + YYUSE (yyscanner); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM); -# else -int yyparse (); -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - @@ -810,90 +1027,76 @@ int yyparse (); | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int -yyparse (void) -#else int -yyparse () - -#endif -#endif +yyparse (yyscan_t yyscanner) { - /* The lookahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Number of syntax errors so far. */ + int yynerrs; - /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - short int *yyssp; + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; -#define YYPOPSTACK (yyvsp--, yyssp--) + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - - + yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; /*------------------------------------------------------------. @@ -901,8 +1104,7 @@ int yynerrs; `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ + have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: @@ -915,49 +1117,46 @@ int yynerrs; #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - short int *yyss1 = yyss; - - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyoverflowlab; + goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - short int *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyoverflowlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -965,16 +1164,18 @@ int yynerrs; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -982,14 +1183,12 @@ int yynerrs; `-----------*/ yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -998,7 +1197,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (&yylval, yyscanner); } if (yychar <= YYEOF) @@ -1009,7 +1208,7 @@ yybackup: else { yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to @@ -1020,31 +1219,28 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + goto yynewstate; @@ -1066,7 +1262,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1080,118 +1276,145 @@ yyreduce: switch (yyn) { case 2: - +#line 71 "cmExprParser.y" /* yacc.c:1646 */ { - yyGetParser->SetResult(yyvsp[0].Number); + cmExpr_yyget_extra(yyscanner)->SetResult((yyvsp[0].Number)); } +#line 1284 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 3: - - {yyval.Number = yyvsp[0].Number;} +#line 77 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[0].Number);} +#line 1290 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 4: - - {yyval.Number = yyvsp[-2].Number | yyvsp[0].Number;} +#line 80 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[-2].Number) | (yyvsp[0].Number);} +#line 1296 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 5: - - {yyval.Number = yyvsp[0].Number;} +#line 84 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[0].Number);} +#line 1302 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 6: - - {yyval.Number = yyvsp[-2].Number ^ yyvsp[0].Number;} +#line 87 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[-2].Number) ^ (yyvsp[0].Number);} +#line 1308 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 7: - - {yyval.Number = yyvsp[0].Number;} +#line 91 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[0].Number);} +#line 1314 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 8: - - {yyval.Number = yyvsp[-2].Number & yyvsp[0].Number;} +#line 94 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[-2].Number) & (yyvsp[0].Number);} +#line 1320 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 9: - - {yyval.Number = yyvsp[0].Number;} +#line 98 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[0].Number);} +#line 1326 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 10: - - {yyval.Number = yyvsp[-2].Number << yyvsp[0].Number;} +#line 101 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[-2].Number) << (yyvsp[0].Number);} +#line 1332 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 11: - - {yyval.Number = yyvsp[-2].Number >> yyvsp[0].Number;} +#line 104 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[-2].Number) >> (yyvsp[0].Number);} +#line 1338 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 12: - - {yyval.Number = yyvsp[0].Number;} +#line 109 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[0].Number);} +#line 1344 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 13: - - {yyval.Number = yyvsp[-2].Number + yyvsp[0].Number;} +#line 112 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[-2].Number) + (yyvsp[0].Number);} +#line 1350 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 14: - - {yyval.Number = yyvsp[-2].Number - yyvsp[0].Number;} +#line 115 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[-2].Number) - (yyvsp[0].Number);} +#line 1356 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 15: - - {yyval.Number = yyvsp[0].Number;} +#line 119 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[0].Number);} +#line 1362 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 16: - - {yyval.Number = yyvsp[-2].Number * yyvsp[0].Number;} +#line 122 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[-2].Number) * (yyvsp[0].Number);} +#line 1368 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 17: - - {yyval.Number = yyvsp[-2].Number / yyvsp[0].Number;} +#line 125 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[-2].Number) / (yyvsp[0].Number);} +#line 1374 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 18: - - {yyval.Number = yyvsp[-2].Number % yyvsp[0].Number;} +#line 128 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[-2].Number) % (yyvsp[0].Number);} +#line 1380 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 19: - - {yyval.Number = yyvsp[0].Number;} +#line 132 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[0].Number);} +#line 1386 "cmExprParser.cxx" /* yacc.c:1646 */ break; case 20: - - {yyval.Number = yyvsp[-1].Number;} +#line 135 "cmExprParser.y" /* yacc.c:1646 */ + {(yyval.Number) = (yyvsp[-1].Number);} +#line 1392 "cmExprParser.cxx" /* yacc.c:1646 */ break; +#line 1396 "cmExprParser.cxx" /* yacc.c:1646 */ + default: break; } - -/* Line 1010 of yacc.c. */ - - - yyvsp -= yylen; - yyssp -= yylen; - - + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -1206,74 +1429,52 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - const char* yyprefix; - char *yymsg; - int yyx; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 0; - - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); - yycount += 1; - if (yycount == 5) - { - yysize = 0; - break; - } - } - yysize += (sizeof ("syntax error, unexpected ") - + yystrlen (yytname[yytype])); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) +#if ! YYERROR_VERBOSE + yyerror (yyscanner, YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - - if (yycount < 5) - { - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) { - yyp = yystpcpy (yyp, yyprefix); - yyp = yystpcpy (yyp, yytname[yyx]); - yyprefix = " or "; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); + yyerror (yyscanner, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } - else - yyerror ("syntax error; also virtual memory exhausted"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); +# undef YYSYNTAX_ERROR +#endif } @@ -1281,31 +1482,23 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) { - /* If at end of input, pop the error token, - then the rest of the stack, then return failure. */ - if (yychar == YYEOF) - for (;;) - { - YYPOPSTACK; - if (yyssp == yyss) - YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - } + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; } else - { - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); - yychar = YYEMPTY; - - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, yyscanner); + yychar = YYEMPTY; + } } +#if 0 /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -1316,15 +1509,17 @@ yyerrlab: `---------------------------------------------------*/ yyerrorlab: -#if defined( __GNUC__ ) || defined(__HP_aCC) - /* Pacify GCC when the user code never invokes YYERROR and the label - yyerrorlab therefore never appears in user code. */ - if (0) + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) goto yyerrorlab; -#endif - yyvsp -= yylen; - yyssp -= yylen; + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; @@ -1333,40 +1528,42 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ +#endif + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - YYPOPSTACK; + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, yyscanner); + YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - - YYDPRINTF ((stderr, "Shifting error token, ")); - + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -1386,33 +1583,52 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (yyscanner, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, yyscanner); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, yyscanner); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif return yyresult; } - - - +#line 139 "cmExprParser.y" /* yacc.c:1906 */ /* End of grammar */ /*--------------------------------------------------------------------------*/ -void cmExprError(yyscan_t yyscanner, const char* message) +void cmExpr_yyerror(yyscan_t yyscanner, const char* message) { - yyGetParser->Error(message); + cmExpr_yyget_extra(yyscanner)->Error(message); } - diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y index a265c20..b511fa7 100644 --- a/Source/cmExprParser.y +++ b/Source/cmExprParser.y @@ -10,21 +10,12 @@ Run bison like this: bison --yacc --name-prefix=cmExpr_yy --defines=cmExprParserTokens.h -ocmExprParser.cxx cmExprParser.y Modify cmExprParser.cxx: - - remove TABs - - remove use of the 'register' storage class specifier - - add __HP_aCC to the #if test for yyerrorlab warning suppression + - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] */ -/* Configure the parser to use a lexer object. */ -#define YYPARSE_PARAM yyscanner -#define YYLEX_PARAM yyscanner -#define YYERROR_VERBOSE 1 -#define cmExpr_yyerror(x) \ - cmExprError(yyscanner, x) -#define yyGetParser (cmExpr_yyget_extra(yyscanner)) - /*-------------------------------------------------------------------------*/ +#define YYDEBUG 1 #include "cmExprParserHelper.h" /* Interface to parser object. */ #include "cmExprLexer.h" /* Interface to lexer object. */ #include "cmExprParserTokens.h" /* Need YYSTYPE for YY_DECL. */ @@ -34,13 +25,8 @@ Modify cmExprParser.cxx: /* Forward declare the lexer entry point. */ YY_DECL; -/* Internal utility functions. */ -static void cmExprError(yyscan_t yyscanner, const char* message); - -#define YYDEBUG 1 -//#define YYMAXDEPTH 100000 -//#define YYINITDEPTH 10000 - +/* Helper function to forward error callback from parser. */ +static void cmExpr_yyerror(yyscan_t yyscanner, const char* message); /* Disable some warnings in the generated code. */ #ifdef _MSC_VER @@ -50,7 +36,13 @@ static void cmExprError(yyscan_t yyscanner, const char* message); %} /* Generate a reentrant parser object. */ -%pure_parser +%define api.pure + +/* Configure the parser to use a lexer object. */ +%lex-param {yyscan_t yyscanner} +%parse-param {yyscan_t yyscanner} + +%define parse.error verbose /*-------------------------------------------------------------------------*/ /* Tokens */ @@ -77,7 +69,7 @@ static void cmExprError(yyscan_t yyscanner, const char* message); Start: exp { - yyGetParser->SetResult($1); + cmExpr_yyget_extra(yyscanner)->SetResult($1); } exp: @@ -148,8 +140,8 @@ exp_OPENPARENT exp exp_CLOSEPARENT /* End of grammar */ /*--------------------------------------------------------------------------*/ -void cmExprError(yyscan_t yyscanner, const char* message) +void cmExpr_yyerror(yyscan_t yyscanner, const char* message) { - yyGetParser->Error(message); + cmExpr_yyget_extra(yyscanner)->Error(message); } diff --git a/Source/cmExprParserTokens.h b/Source/cmExprParserTokens.h index 0309c09..84b2bbd 100644 --- a/Source/cmExprParserTokens.h +++ b/Source/cmExprParserTokens.h @@ -1,12 +1,13 @@ -/* A Bison parser, made by GNU Bison 1.875d. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ -/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, - 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Bison interface for Yacc-like parsers in C - This program is free software; you can redistribute it and/or modify + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,37 +15,53 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + along with this program. If not, see . */ -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. -/* Tokens. */ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +#ifndef YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED +# define YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int cmExpr_yydebug; +#endif + +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - exp_PLUS = 258, - exp_MINUS = 259, - exp_TIMES = 260, - exp_DIVIDE = 261, - exp_MOD = 262, - exp_SHIFTLEFT = 263, - exp_SHIFTRIGHT = 264, - exp_OPENPARENT = 265, - exp_CLOSEPARENT = 266, - exp_OR = 267, - exp_AND = 268, - exp_XOR = 269, - exp_NOT = 270, - exp_NUMBER = 271 - }; + enum yytokentype + { + exp_PLUS = 258, + exp_MINUS = 259, + exp_TIMES = 260, + exp_DIVIDE = 261, + exp_MOD = 262, + exp_SHIFTLEFT = 263, + exp_SHIFTRIGHT = 264, + exp_OPENPARENT = 265, + exp_CLOSEPARENT = 266, + exp_OR = 267, + exp_AND = 268, + exp_XOR = 269, + exp_NOT = 270, + exp_NUMBER = 271 + }; #endif +/* Tokens. */ #define exp_PLUS 258 #define exp_MINUS 259 #define exp_TIMES 260 @@ -60,17 +77,10 @@ #define exp_NOT 270 #define exp_NUMBER 271 +/* Value type. */ -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -typedef int YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - - +int cmExpr_yyparse (yyscan_t yyscanner); +#endif /* !YY_CMEXPR_YY_CMEXPRPARSERTOKENS_H_INCLUDED */ ----------------------------------------------------------------------- Summary of changes: Help/release/dev/math-EXPR-unary.rst | 5 + Source/cmExprParser.cxx | 1768 ++++++++++++++++++++-------------- Source/cmExprParser.y | 157 +-- Source/cmExprParserTokens.h | 94 +- Tests/MathTest/CMakeLists.txt | 3 + 5 files changed, 1165 insertions(+), 862 deletions(-) create mode 100644 Help/release/dev/math-EXPR-unary.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 11:07:49 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 11:07:49 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-570-g6b400f5 Message-ID: <20161017150749.A33ABF6470@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 6b400f503118e894685bb88f7b18ade37bca5dfe (commit) via 52e8fa2312c73338c7fac38e7c2b30f136f4d247 (commit) from a9540002c5101e533e1896a4150462f20ceac68f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b400f503118e894685bb88f7b18ade37bca5dfe commit 6b400f503118e894685bb88f7b18ade37bca5dfe Merge: a954000 52e8fa2 Author: Brad King AuthorDate: Mon Oct 17 11:07:48 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 11:07:48 2016 -0400 Merge topic 'FindwxWidgets-unversioned-library-path' into next 52e8fa23 FindwxWidgets: Fix finding unversioned VS-built directory prefixes https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52e8fa2312c73338c7fac38e7c2b30f136f4d247 commit 52e8fa2312c73338c7fac38e7c2b30f136f4d247 Author: Brad King AuthorDate: Mon Oct 17 10:39:36 2016 -0400 Commit: Brad King CommitDate: Mon Oct 17 11:06:00 2016 -0400 FindwxWidgets: Fix finding unversioned VS-built directory prefixes The change in commit v3.7.0-rc1~217^2 (FindwxWidgets: Add VS-versioned library directory prefixes, 2016-08-24) works only for official wxWidgets builds that add the VS-versioned directory prefixes. Local wxWidgets builds still have an unversioned prefix. Search them. Closes: #16366 diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index eee47db..77091f4 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -491,23 +491,26 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") # Select one default tree inside the already determined wx tree. # Prefer static/shared order usually consistent with build # settings. + set(_WX_TOOL "") + set(_WX_TOOLVER "") + set(_WX_ARCH "") if(MINGW) - set(WX_LIB_DIR_PREFIX gcc) + set(_WX_TOOL gcc) elseif(MSVC) - set(WX_LIB_DIR_PREFIX vc) + set(_WX_TOOL vc) if(MSVC14) - set(WX_LIB_DIR_PREFIX ${WX_LIB_DIR_PREFIX}140) + set(_WX_TOOLVER 140) elseif(MSVC12) - set(WX_LIB_DIR_PREFIX ${WX_LIB_DIR_PREFIX}120) + set(_WX_TOOLVER 120) elseif(MSVC11) - set(WX_LIB_DIR_PREFIX ${WX_LIB_DIR_PREFIX}110) + set(_WX_TOOLVER 110) elseif(MSVC10) - set(WX_LIB_DIR_PREFIX ${WX_LIB_DIR_PREFIX}100) + set(_WX_TOOLVER 100) elseif(MSVC90) - set(WX_LIB_DIR_PREFIX ${WX_LIB_DIR_PREFIX}90) + set(_WX_TOOLVER 90) endif() if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(WX_LIB_DIR_PREFIX ${WX_LIB_DIR_PREFIX}_x64) + set(_WX_ARCH _x64) endif() endif() if(BUILD_SHARED_LIBS) @@ -522,8 +525,10 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") mswunivu/wx/setup.h mswunivud/wx/setup.h PATHS - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib + ${WX_ROOT_DIR}/lib/${_WX_TOOL}${_WX_TOOLVER}${_WX_ARCH}_dll # prefer shared + ${WX_ROOT_DIR}/lib/${_WX_TOOL}${_WX_ARCH}_dll # prefer shared + ${WX_ROOT_DIR}/lib/${_WX_TOOL}${_WX_TOOLVER}${_WX_ARCH}_lib + ${WX_ROOT_DIR}/lib/${_WX_TOOL}${_WX_ARCH}_lib DOC "Path to wxWidgets libraries" NO_DEFAULT_PATH ) @@ -539,12 +544,17 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") mswunivu/wx/setup.h mswunivud/wx/setup.h PATHS - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib # prefer static - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll + ${WX_ROOT_DIR}/lib/${_WX_TOOL}${_WX_TOOLVER}${_WX_ARCH}_lib # prefer static + ${WX_ROOT_DIR}/lib/${_WX_TOOL}${_WX_ARCH}_lib # prefer static + ${WX_ROOT_DIR}/lib/${_WX_TOOL}${_WX_TOOLVER}${_WX_ARCH}_dll + ${WX_ROOT_DIR}/lib/${_WX_TOOL}${_WX_ARCH}_dll DOC "Path to wxWidgets libraries" NO_DEFAULT_PATH ) endif() + unset(_WX_TOOL) + unset(_WX_TOOLVER) + unset(_WX_ARCH) # If wxWidgets_LIB_DIR changed, clear all libraries. if(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR) ----------------------------------------------------------------------- Summary of changes: Modules/FindwxWidgets.cmake | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 11:20:25 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 11:20:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-572-g2f779b2 Message-ID: <20161017152025.73710F6046@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 2f779b24d65321dc05974c46a69cc3150f3d09cd (commit) via 19beee46cc6e9b7a05694b29420ad49487648501 (commit) from 6b400f503118e894685bb88f7b18ade37bca5dfe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2f779b24d65321dc05974c46a69cc3150f3d09cd commit 2f779b24d65321dc05974c46a69cc3150f3d09cd Merge: 6b400f5 19beee4 Author: Brad King AuthorDate: Mon Oct 17 11:20:24 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 11:20:24 2016 -0400 Merge topic 'propagate_ctest_use_launchers' into next 19beee46 ctest_configure: Propagate CTEST_USE_LAUNCHERS from caller to project https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19beee46cc6e9b7a05694b29420ad49487648501 commit 19beee46cc6e9b7a05694b29420ad49487648501 Author: Bill Hoffman AuthorDate: Fri Oct 14 14:01:50 2016 -0400 Commit: Brad King CommitDate: Mon Oct 17 11:15:36 2016 -0400 ctest_configure: Propagate CTEST_USE_LAUNCHERS from caller to project If `CTEST_USE_LAUNCHERS` is `TRUE` in a CTest script then the `ctest_configure` command will add `-DCTEST_USE_LAUNCHERS:BOOL=TRUE` to the cmake command used to configure the project. This allows a project to only set `CTEST_USE_LAUNCHERS` in a ctest script and have launchers work. diff --git a/Modules/CTestUseLaunchers.cmake b/Modules/CTestUseLaunchers.cmake index 1cf20eb..dc90513 100644 --- a/Modules/CTestUseLaunchers.cmake +++ b/Modules/CTestUseLaunchers.cmake @@ -24,7 +24,9 @@ # include(CTestUseLaunchers), it will use the value of the ENV variable # to initialize a CTEST_USE_LAUNCHERS cache variable. This cache # variable initialization only occurs if CTEST_USE_LAUNCHERS is not -# already defined. +# already defined. If CTEST_USE_LAUNCHERS is on in a ctest -S script +# the ctest_configure command will add -DCTEST_USE_LAUNCHERS:BOOL=TRUE +# to the cmake command used to configure the project. if(NOT DEFINED CTEST_USE_LAUNCHERS AND DEFINED ENV{CTEST_USE_LAUNCHERS_DEFAULT}) set(CTEST_USE_LAUNCHERS "$ENV{CTEST_USE_LAUNCHERS_DEFAULT}" diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx index 62802ef..73e893d 100644 --- a/Source/CTest/cmCTestConfigureCommand.cxx +++ b/Source/CTest/cmCTestConfigureCommand.cxx @@ -102,6 +102,10 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler() cmakeConfigureCommand += "\""; } + if (this->Makefile->IsOn("CTEST_USE_LAUNCHERS")) { + cmakeConfigureCommand += " \"-DCTEST_USE_LAUNCHERS:BOOL=TRUE\""; + } + cmakeConfigureCommand += " \"-G"; cmakeConfigureCommand += cmakeGeneratorName; cmakeConfigureCommand += "\""; diff --git a/Tests/RunCMake/ctest_build/CMakeLists.txt.in b/Tests/RunCMake/ctest_build/CMakeLists.txt.in index 82cb7c4..133ae36 100644 --- a/Tests/RunCMake/ctest_build/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_build/CMakeLists.txt.in @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.1) + at CASE_CMAKELISTS_PREFIX_CODE@ project(CTestBuild at CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake index 324f25c..1092d2a 100644 --- a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake @@ -13,6 +13,11 @@ function(run_BuildFailure) set(CASE_CMAKELISTS_SUFFIX_CODE [[ add_custom_target(BuildFailure ALL COMMAND command-does-not-exist) ]]) + set(CASE_CMAKELISTS_PREFIX_CODE [[ +if(NOT CTEST_USE_LAUNCHERS) + message(FATAL_ERROR "CTEST_USE_LAUNCHERS not set") +endif() +]]) set(CASE_TEST_PREFIX_CODE [[ cmake_policy(SET CMP0061 NEW) ]]) diff --git a/Tests/RunCMake/ctest_build/test.cmake.in b/Tests/RunCMake/ctest_build/test.cmake.in index 768f1c6..6f15ec9 100644 --- a/Tests/RunCMake/ctest_build/test.cmake.in +++ b/Tests/RunCMake/ctest_build/test.cmake.in @@ -9,6 +9,7 @@ set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@") set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") +set(CTEST_USE_LAUNCHERS TRUE) set(ctest_build_args "@CASE_CTEST_BUILD_ARGS@") ctest_start(Experimental) ----------------------------------------------------------------------- Summary of changes: Modules/CTestUseLaunchers.cmake | 4 +++- Source/CTest/cmCTestConfigureCommand.cxx | 4 ++++ Tests/RunCMake/ctest_build/CMakeLists.txt.in | 1 + Tests/RunCMake/ctest_build/RunCMakeTest.cmake | 5 +++++ Tests/RunCMake/ctest_build/test.cmake.in | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 14:47:29 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 14:47:29 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-574-gf923940 Message-ID: <20161017184729.426C1F59E1@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 f923940b7c9c93179b7ea6356c32c8a7beedebe2 (commit) via 909842fff98983bff8b61c37b11a99d89dcc4d36 (commit) from 2f779b24d65321dc05974c46a69cc3150f3d09cd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f923940b7c9c93179b7ea6356c32c8a7beedebe2 commit f923940b7c9c93179b7ea6356c32c8a7beedebe2 Merge: 2f779b2 909842f Author: Brad King AuthorDate: Mon Oct 17 14:47:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 14:47:27 2016 -0400 Merge topic 'timeout_after_match_testtime' into next 909842ff CTest: report time spent after matching output https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=909842fff98983bff8b61c37b11a99d89dcc4d36 commit 909842fff98983bff8b61c37b11a99d89dcc4d36 Author: Zack Galbreath AuthorDate: Mon Oct 17 11:24:01 2016 -0400 Commit: Zack Galbreath CommitDate: Mon Oct 17 11:24:32 2016 -0400 CTest: report time spent after matching output When using the TIMEOUT_AFTER_MATCH test property, only report the time spent by the test after the matching output was found. diff --git a/Help/prop_test/TIMEOUT_AFTER_MATCH.rst b/Help/prop_test/TIMEOUT_AFTER_MATCH.rst index a191a9c..d607992 100644 --- a/Help/prop_test/TIMEOUT_AFTER_MATCH.rst +++ b/Help/prop_test/TIMEOUT_AFTER_MATCH.rst @@ -22,7 +22,9 @@ When the test outputs a line that matches ``regex`` its start time is reset to the current time and its timeout duration is changed to ``seconds``. Prior to this, the timeout duration is determined by the :prop_test:`TIMEOUT` property or the :variable:`CTEST_TEST_TIMEOUT` -variable if either of these are set. +variable if either of these are set. Because the test's start time is +reset, its execution time will not include any time that was spent +waiting for the matching output. :prop_test:`TIMEOUT_AFTER_MATCH` is useful for avoiding spurious timeouts when your test must wait for some system resource to become diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index cf3c7ac..a24fe21 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -225,6 +225,7 @@ void cmProcess::ChangeTimeout(double t) void cmProcess::ResetStartTime() { cmsysProcess_ResetStartTime(this->Process); + this->StartTime = cmSystemTools::GetTime(); } int cmProcess::GetExitException() ----------------------------------------------------------------------- Summary of changes: Help/prop_test/TIMEOUT_AFTER_MATCH.rst | 4 +++- Source/CTest/cmProcess.cxx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 17 14:56:31 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 17 Oct 2016 14:56:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-576-g237866b Message-ID: <20161017185631.C642CF6097@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 237866b8bdb6d39992e3f77cd56e82e4181d5947 (commit) via 4bc17345c01ea467099e28c7df30c23ace9e7811 (commit) from f923940b7c9c93179b7ea6356c32c8a7beedebe2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=237866b8bdb6d39992e3f77cd56e82e4181d5947 commit 237866b8bdb6d39992e3f77cd56e82e4181d5947 Merge: f923940 4bc1734 Author: Brad King AuthorDate: Mon Oct 17 14:56:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 17 14:56:31 2016 -0400 Merge topic 'CheckFunctionExists-prototype' into next 4bc17345 CheckFunctionExists.c: avoid gcc warnings with -Wstrict-prototypes https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bc17345c01ea467099e28c7df30c23ace9e7811 commit 4bc17345c01ea467099e28c7df30c23ace9e7811 Author: Andre McCurdy AuthorDate: Fri Oct 14 16:26:58 2016 -0700 Commit: Andre McCurdy CommitDate: Fri Oct 14 16:26:58 2016 -0700 CheckFunctionExists.c: avoid gcc warnings with -Wstrict-prototypes Avoid warnings (and therefore build failures etc) if a user happens to add -Wstrict-prototypes to CFLAGS. | $ gcc --version | gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 | | $ gcc -Wstrict-prototypes -Werror -DCHECK_FUNCTION_EXISTS=pthread_create -o foo.o -c Modules/CheckFunctionExists.c | Modules/CheckFunctionExists.c:7:3: error: function declaration isn't a prototype [-Werror=strict-prototypes] | CHECK_FUNCTION_EXISTS(); | ^ | cc1: all warnings being treated as errors | Signed-off-by: Andre McCurdy diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c index 2304000..224e340 100644 --- a/Modules/CheckFunctionExists.c +++ b/Modules/CheckFunctionExists.c @@ -4,7 +4,7 @@ extern "C" #endif char - CHECK_FUNCTION_EXISTS(); + CHECK_FUNCTION_EXISTS(void); #ifdef __CLASSIC_C__ int main() { ----------------------------------------------------------------------- Summary of changes: Modules/CheckFunctionExists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Oct 18 00:01:05 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 18 Oct 2016 00:01:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-276-ge46350f Message-ID: <20161018040105.894A8F63B0@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 e46350ffd98c39cb788aa2fdfbef9753d6089af6 (commit) from 188c762f8a5f690708109a3cb8d44693e599adb1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e46350ffd98c39cb788aa2fdfbef9753d6089af6 commit e46350ffd98c39cb788aa2fdfbef9753d6089af6 Author: Kitware Robot AuthorDate: Tue Oct 18 00:01:03 2016 -0400 Commit: Kitware Robot CommitDate: Tue Oct 18 00:01:03 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 3640ea8..e311274 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 7) -set(CMake_VERSION_PATCH 20161017) +set(CMake_VERSION_PATCH 20161018) #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 Oct 18 08:42:50 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 08:42:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-278-g086f356 Message-ID: <20161018124250.7D24AF60E0@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 086f356f6c83537aeee3ca06ff8db335eee03560 (commit) via 52e8fa2312c73338c7fac38e7c2b30f136f4d247 (commit) from e46350ffd98c39cb788aa2fdfbef9753d6089af6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=086f356f6c83537aeee3ca06ff8db335eee03560 commit 086f356f6c83537aeee3ca06ff8db335eee03560 Merge: e46350f 52e8fa2 Author: Brad King AuthorDate: Tue Oct 18 08:42:47 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 18 08:42:47 2016 -0400 Merge topic 'FindwxWidgets-unversioned-library-path' 52e8fa23 FindwxWidgets: Fix finding unversioned VS-built directory prefixes ----------------------------------------------------------------------- Summary of changes: Modules/FindwxWidgets.cmake | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 18 08:42:56 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 08:42:56 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-282-g9519d79 Message-ID: <20161018124256.972FCF6139@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 9519d79b63af5912ecb620ea28079a2341ee0253 (commit) via 2810e561829b0db36961442f0332939e1b74ccdf (commit) via 834f52a6f41ec5ae8429afa2d374f96458963cf3 (commit) via 7aaed265ade4c3b38967e83095497280a7a55153 (commit) from 086f356f6c83537aeee3ca06ff8db335eee03560 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9519d79b63af5912ecb620ea28079a2341ee0253 commit 9519d79b63af5912ecb620ea28079a2341ee0253 Merge: 086f356 2810e56 Author: Brad King AuthorDate: Tue Oct 18 08:42:54 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 18 08:42:54 2016 -0400 Merge topic 'math-EXPR-unary' 2810e561 math(EXPR): Add support for unary `+` and `-` expressions 834f52a6 cmExprParser: Revise indentation style to match rest of CMake 7aaed265 cmExprParser: Port to bison 3 ----------------------------------------------------------------------- Summary of changes: Help/release/dev/math-EXPR-unary.rst | 5 + Source/cmExprParser.cxx | 1768 ++++++++++++++++++++-------------- Source/cmExprParser.y | 157 +-- Source/cmExprParserTokens.h | 94 +- Tests/MathTest/CMakeLists.txt | 3 + 5 files changed, 1165 insertions(+), 862 deletions(-) create mode 100644 Help/release/dev/math-EXPR-unary.rst hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 18 08:42:59 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 08:42:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-284-gcff5112 Message-ID: <20161018124259.560E7F6170@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 cff5112385342fde6dd4fc643265789c3616e414 (commit) via 4bc17345c01ea467099e28c7df30c23ace9e7811 (commit) from 9519d79b63af5912ecb620ea28079a2341ee0253 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cff5112385342fde6dd4fc643265789c3616e414 commit cff5112385342fde6dd4fc643265789c3616e414 Merge: 9519d79 4bc1734 Author: Brad King AuthorDate: Tue Oct 18 08:42:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 18 08:42:57 2016 -0400 Merge topic 'CheckFunctionExists-prototype' 4bc17345 CheckFunctionExists.c: avoid gcc warnings with -Wstrict-prototypes ----------------------------------------------------------------------- Summary of changes: Modules/CheckFunctionExists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 18 08:43:02 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 08:43:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-286-g99177a2 Message-ID: <20161018124302.7E578F613B@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 99177a2029fd30d37d49ad2026fb5438f1d07c8f (commit) via 19beee46cc6e9b7a05694b29420ad49487648501 (commit) from cff5112385342fde6dd4fc643265789c3616e414 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99177a2029fd30d37d49ad2026fb5438f1d07c8f commit 99177a2029fd30d37d49ad2026fb5438f1d07c8f Merge: cff5112 19beee4 Author: Brad King AuthorDate: Tue Oct 18 08:43:00 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 18 08:43:00 2016 -0400 Merge topic 'propagate_ctest_use_launchers' 19beee46 ctest_configure: Propagate CTEST_USE_LAUNCHERS from caller to project ----------------------------------------------------------------------- Summary of changes: Modules/CTestUseLaunchers.cmake | 4 +++- Source/CTest/cmCTestConfigureCommand.cxx | 4 ++++ Tests/RunCMake/ctest_build/CMakeLists.txt.in | 1 + Tests/RunCMake/ctest_build/RunCMakeTest.cmake | 5 +++++ Tests/RunCMake/ctest_build/test.cmake.in | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 18 08:43:05 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 08:43:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-288-ga5f0e62 Message-ID: <20161018124305.61745F6130@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 a5f0e629887055085eec40da4ad4d147c6887a33 (commit) via 909842fff98983bff8b61c37b11a99d89dcc4d36 (commit) from 99177a2029fd30d37d49ad2026fb5438f1d07c8f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5f0e629887055085eec40da4ad4d147c6887a33 commit a5f0e629887055085eec40da4ad4d147c6887a33 Merge: 99177a2 909842f Author: Brad King AuthorDate: Tue Oct 18 08:43:03 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 18 08:43:03 2016 -0400 Merge topic 'timeout_after_match_testtime' 909842ff CTest: report time spent after matching output ----------------------------------------------------------------------- Summary of changes: Help/prop_test/TIMEOUT_AFTER_MATCH.rst | 4 +++- Source/CTest/cmProcess.cxx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 18 08:43:32 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 08:43:32 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-583-g6dfa79d Message-ID: <20161018124332.97858F609C@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 6dfa79dbb5e08614f0d64dc0be8be3c5fcd7a7a6 (commit) via a5f0e629887055085eec40da4ad4d147c6887a33 (commit) via 99177a2029fd30d37d49ad2026fb5438f1d07c8f (commit) via cff5112385342fde6dd4fc643265789c3616e414 (commit) via 9519d79b63af5912ecb620ea28079a2341ee0253 (commit) via 086f356f6c83537aeee3ca06ff8db335eee03560 (commit) via e46350ffd98c39cb788aa2fdfbef9753d6089af6 (commit) from 237866b8bdb6d39992e3f77cd56e82e4181d5947 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6dfa79dbb5e08614f0d64dc0be8be3c5fcd7a7a6 commit 6dfa79dbb5e08614f0d64dc0be8be3c5fcd7a7a6 Merge: 237866b a5f0e62 Author: Brad King AuthorDate: Tue Oct 18 08:43:20 2016 -0400 Commit: Brad King CommitDate: Tue Oct 18 08:43:20 2016 -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 Oct 18 08:44:26 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 08:44:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-293-g96f6fe6 Message-ID: <20161018124426.2113AF6251@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 96f6fe6b5737494fc560e126b7c797d232d9307e (commit) via df68d8a17ed14b6c5a38dca9c95d88bcc6da243c (commit) via b6e5b6485f17904597ffd94b05c4d493dd94947d (commit) via d657fd7b354710e26bf5aa9a72896897cb292c64 (commit) via ef4e349ea3ab6e523d86b16e3709e20cd4f260ea (commit) from a5f0e629887055085eec40da4ad4d147c6887a33 (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 Oct 18 08:44:26 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 08:44:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-589-g2eed879 Message-ID: <20161018124426.3F4A7F6252@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 2eed8794522852d9f1f4aa55b0829ad567c3779a (commit) via 96f6fe6b5737494fc560e126b7c797d232d9307e (commit) via df68d8a17ed14b6c5a38dca9c95d88bcc6da243c (commit) via b6e5b6485f17904597ffd94b05c4d493dd94947d (commit) via d657fd7b354710e26bf5aa9a72896897cb292c64 (commit) via ef4e349ea3ab6e523d86b16e3709e20cd4f260ea (commit) from 6dfa79dbb5e08614f0d64dc0be8be3c5fcd7a7a6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2eed8794522852d9f1f4aa55b0829ad567c3779a commit 2eed8794522852d9f1f4aa55b0829ad567c3779a Merge: 6dfa79d 96f6fe6 Author: Brad King AuthorDate: Tue Oct 18 08:44:12 2016 -0400 Commit: Brad King CommitDate: Tue Oct 18 08:44:12 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 18 08:44:26 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 08:44:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.7.0-rc1-54-gdf68d8a Message-ID: <20161018124426.5AAEAF6253@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 df68d8a17ed14b6c5a38dca9c95d88bcc6da243c (commit) via 52e8fa2312c73338c7fac38e7c2b30f136f4d247 (commit) via b6e5b6485f17904597ffd94b05c4d493dd94947d (commit) via e8bafb6fcbb46bad4dfcb8dab1347c8e5f9a8090 (commit) via d657fd7b354710e26bf5aa9a72896897cb292c64 (commit) via c05d9b0569a2a2c43db6f09a53fed7b54ae97d32 (commit) via ef4e349ea3ab6e523d86b16e3709e20cd4f260ea (commit) via 78b00f1d10f5bb0a152d7825ef554836b52f7977 (commit) from a975b21cecc1ce45eeca9dc1b2103268f508317a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/command/ctest_build.rst | 4 +++- Help/command/ctest_configure.rst | 4 +++- Help/command/ctest_coverage.rst | 4 +++- Help/command/ctest_test.rst | 4 +++- Help/command/math.rst | 9 ++++---- Modules/FindwxWidgets.cmake | 34 +++++++++++++++++++----------- Modules/Platform/Darwin-Initialize.cmake | 2 +- 7 files changed, 40 insertions(+), 21 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 18 09:02:01 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 09:02:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-592-g212e620 Message-ID: <20161018130201.BDDBFF676D@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 212e620fcb657ec83b8ba3f469dccf6a0b693102 (commit) via d3b3fa3a26b0295e4a0d767c3e1be1a5807de6a5 (commit) via be056652c6100f7dc6833396a6b5b2345948750c (commit) from 2eed8794522852d9f1f4aa55b0829ad567c3779a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=212e620fcb657ec83b8ba3f469dccf6a0b693102 commit 212e620fcb657ec83b8ba3f469dccf6a0b693102 Merge: 2eed879 d3b3fa3 Author: Brad King AuthorDate: Tue Oct 18 09:02:01 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 18 09:02:01 2016 -0400 Merge topic 'test-release' into next d3b3fa3a Merge branch 'release' into test-release be056652 CMake 3.7.0-rc2 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3b3fa3a26b0295e4a0d767c3e1be1a5807de6a5 commit d3b3fa3a26b0295e4a0d767c3e1be1a5807de6a5 Merge: 96f6fe6 be05665 Author: Brad King AuthorDate: Tue Oct 18 09:01:31 2016 -0400 Commit: Brad King CommitDate: Tue Oct 18 09:01:31 2016 -0400 Merge branch 'release' into test-release https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be056652c6100f7dc6833396a6b5b2345948750c commit be056652c6100f7dc6833396a6b5b2345948750c Author: Brad King AuthorDate: Tue Oct 18 08:59:26 2016 -0400 Commit: Brad King CommitDate: Tue Oct 18 08:59:26 2016 -0400 CMake 3.7.0-rc2 diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6cb0fea..d8c77fc 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,4 +2,4 @@ set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 7) set(CMake_VERSION_PATCH 0) -set(CMake_VERSION_RC 1) +set(CMake_VERSION_RC 2) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 18 11:20:06 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 11:20:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-594-g387e436 Message-ID: <20161018152006.6C687F65D3@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 387e43639e56691356a9c5617b24ff7ff7e25e92 (commit) via 33a9aaa89b437da29a70f27d25b267242b6f982c (commit) from 212e620fcb657ec83b8ba3f469dccf6a0b693102 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=387e43639e56691356a9c5617b24ff7ff7e25e92 commit 387e43639e56691356a9c5617b24ff7ff7e25e92 Merge: 212e620 33a9aaa Author: Brad King AuthorDate: Tue Oct 18 11:20:03 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 18 11:20:03 2016 -0400 Merge topic 'ExternalData-multiple-hashes' into next 33a9aaa8 ExternalData: Add support for multiple hash algorithms https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33a9aaa89b437da29a70f27d25b267242b6f982c commit 33a9aaa89b437da29a70f27d25b267242b6f982c Author: Matt McCormick AuthorDate: Wed Oct 12 14:57:32 2016 -0400 Commit: Brad King CommitDate: Tue Oct 18 11:16:45 2016 -0400 ExternalData: Add support for multiple hash algorithms Add support for projects to have `Data.txt.md5` *and* `Data.txt.sha512` where the content links hold hashes for the same file. Check all `ExternalData_URL_TEMPLATES` entries in order for all available hashes. The data acquisition is considered a failure if none of the available URL resources has any of the given hashes. This makes it possible to have multiple data server resources where all servers do not support all hashing algorithms. diff --git a/Help/release/dev/ExternalData-multiple-hashes.rst b/Help/release/dev/ExternalData-multiple-hashes.rst new file mode 100644 index 0000000..608a277 --- /dev/null +++ b/Help/release/dev/ExternalData-multiple-hashes.rst @@ -0,0 +1,7 @@ +ExternalData-multiple-hashes +---------------------------- + +* The :module:`ExternalData` module learned to support multiple + content links for one data file using different hashes, e.g. + ``img.png.sha256`` and ``img.png.sha1``. This allows objects + to be fetched from sources indexed by different hash algorithms. diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake index b00de14..07cd114 100644 --- a/Modules/ExternalData.cmake +++ b/Modules/ExternalData.cmake @@ -201,6 +201,11 @@ For example, the argument ``DATA{img.png}`` may be satisfied by either a real ``img.png`` file in the current source directory or a ``img.png.md5`` file containing its MD5 sum. +Multiple content links of the same name with different hash algorithms +are supported (e.g. ``img.png.sha256`` and ``img.png.sha1``) so long as +they all correspond to the same real file. This allows objects to be +fetched from sources indexed by different hash algorithms. + Referencing File Series """"""""""""""""""""""" @@ -429,8 +434,10 @@ function(ExternalData_add_target target) string(REPLACE "|" ";" tuple "${entry}") list(GET tuple 0 file) list(GET tuple 1 name) - list(GET tuple 2 ext) - set(stamp "${ext}-stamp") + list(GET tuple 2 exts) + string(REPLACE "+" ";" exts_list "${exts}") + list(GET exts_list 0 first_ext) + set(stamp "-hash-stamp") if(NOT DEFINED "_ExternalData_FILE_${file}") set("_ExternalData_FILE_${file}" 1) get_property(added DIRECTORY PROPERTY "_ExternalData_FILE_${file}") @@ -446,12 +453,12 @@ function(ExternalData_add_target target) OUTPUT "${file}${stamp}" "${file}" # Run the data fetch/update script. COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR} - -Dfile=${file} -Dname=${name} -Dext=${ext} + -Dfile=${file} -Dname=${name} -Dexts=${exts} -DExternalData_ACTION=fetch -DExternalData_CONFIG=${config} -P ${_ExternalData_SELF} # Update whenever the object hash changes. - MAIN_DEPENDENCY "${name}${ext}" + MAIN_DEPENDENCY "${name}${first_ext}" ) endif() list(APPEND files "${file}${stamp}") @@ -798,6 +805,7 @@ function(_ExternalData_arg_find_files glob pattern regex) cmake_policy(SET CMP0009 NEW) file(${glob} globbed RELATIVE "${top_src}" "${top_src}/${pattern}*") cmake_policy(POP) + set(externals_count -1) foreach(entry IN LISTS globbed) if("x${entry}" MATCHES "^x(.*)(\\.(${_ExternalData_REGEX_EXT}))$") set(relname "${CMAKE_MATCH_1}") @@ -817,7 +825,11 @@ function(_ExternalData_arg_find_files glob pattern regex) set(name "${top_src}/${relname}") set(file "${top_bin}/${relname}") if(alg) - list(APPEND external "${file}|${name}|${alg}") + if(NOT "${external_${externals_count}_file_name}" STREQUAL "${file}|${name}") + math(EXPR externals_count "${externals_count} + 1") + set(external_${externals_count}_file_name "${file}|${name}") + endif() + list(APPEND external_${externals_count}_algs "${alg}") elseif(ExternalData_LINK_CONTENT) _ExternalData_link_content("${name}" alg) list(APPEND external "${file}|${name}|${alg}") @@ -830,6 +842,14 @@ function(_ExternalData_arg_find_files glob pattern regex) endif() endif() endforeach() + if(${externals_count} GREATER -1) + foreach(ii RANGE ${externals_count}) + string(REPLACE ";" "+" algs_delim "${external_${ii}_algs}") + list(APPEND external "${external_${ii}_file_name}|${algs_delim}") + unset(external_${ii}_algs) + unset(external_${ii}_file_name) + endforeach() + endif() set(external "${external}" PARENT_SCOPE) set(internal "${internal}" PARENT_SCOPE) set(have_original "${have_original}" PARENT_SCOPE) @@ -947,13 +967,28 @@ function(_ExternalData_custom_fetch key loc file err_var msg_var) set("${msg_var}" "${msg}" PARENT_SCOPE) endfunction() -function(_ExternalData_download_object name hash algo var_obj) +function(_ExternalData_get_from_object_store hash algo var_obj var_success) + # Search all object stores for an existing object. + foreach(dir ${ExternalData_OBJECT_STORES}) + set(obj "${dir}/${algo}/${hash}") + if(EXISTS "${obj}") + message(STATUS "Found object: \"${obj}\"") + set("${var_obj}" "${obj}" PARENT_SCOPE) + set("${var_success}" 1 PARENT_SCOPE) + return() + endif() + endforeach() +endfunction() + +function(_ExternalData_download_object name hash algo var_obj var_success var_errorMsg) # Search all object stores for an existing object. + set(success 1) foreach(dir ${ExternalData_OBJECT_STORES}) set(obj "${dir}/${algo}/${hash}") if(EXISTS "${obj}") message(STATUS "Found object: \"${obj}\"") set("${var_obj}" "${obj}" PARENT_SCOPE) + set("${var_success}" "${success}" PARENT_SCOPE) return() endif() endforeach() @@ -1008,6 +1043,7 @@ function(_ExternalData_download_object name hash algo var_obj) get_filename_component(dir "${name}" PATH) set(staged "${dir}/.ExternalData_${algo}_${hash}") + set(success 1) if(found) file(RENAME "${tmp}" "${obj}") message(STATUS "Downloaded object: \"${obj}\"") @@ -1018,38 +1054,74 @@ function(_ExternalData_download_object name hash algo var_obj) if(NOT tried) set(tried "\n (No ExternalData_URL_TEMPLATES given)") endif() - message(FATAL_ERROR "Object ${algo}=${hash} not found at:${tried}") + set(success 0) + set("${var_errorMsg}" "Object ${algo}=${hash} not found at:${tried}" PARENT_SCOPE) endif() set("${var_obj}" "${obj}" PARENT_SCOPE) + set("${var_success}" "${success}" PARENT_SCOPE) endfunction() if("${ExternalData_ACTION}" STREQUAL "fetch") - foreach(v ExternalData_OBJECT_STORES file name ext) + foreach(v ExternalData_OBJECT_STORES file name exts) if(NOT DEFINED "${v}") message(FATAL_ERROR "No \"-D${v}=\" value provided!") endif() endforeach() - file(READ "${name}${ext}" hash) - string(STRIP "${hash}" hash) - - if("${ext}" MATCHES "^\\.(${_ExternalData_REGEX_EXT})$") - string(TOUPPER "${CMAKE_MATCH_1}" algo) - else() - message(FATAL_ERROR "Unknown hash algorithm extension \"${ext}\"") - endif() + string(REPLACE "+" ";" exts_list "${exts}") + set(succeeded 0) + set(errorMsg "") + set(hash_list ) + set(algo_list ) + set(hash ) + set(algo ) + foreach(ext ${exts_list}) + file(READ "${name}${ext}" hash) + string(STRIP "${hash}" hash) + + if("${ext}" MATCHES "^\\.(${_ExternalData_REGEX_EXT})$") + string(TOUPPER "${CMAKE_MATCH_1}" algo) + else() + message(FATAL_ERROR "Unknown hash algorithm extension \"${ext}\"") + endif() - _ExternalData_download_object("${name}" "${hash}" "${algo}" obj) + list(APPEND hash_list ${hash}) + list(APPEND algo_list ${algo}) + endforeach() + list(LENGTH exts_list num_extensions) + math(EXPR exts_range "${num_extensions} - 1") + foreach(ii RANGE 0 ${exts_range}) + list(GET hash_list ${ii} hash) + list(GET algo_list ${ii} algo) + _ExternalData_get_from_object_store("${hash}" "${algo}" obj succeeded) + if(succeeded) + break() + endif() + endforeach() + if(NOT succeeded) + foreach(ii RANGE 0 ${exts_range}) + list(GET hash_list ${ii} hash) + list(GET algo_list ${ii} algo) + _ExternalData_download_object("${name}" "${hash}" "${algo}" + obj succeeded algoErrorMsg) + set(errorMsg "${errorMsg}\n${algoErrorMsg}") + if(succeeded) + break() + endif() + endforeach() + endif() + if(NOT succeeded) + message(FATAL_ERROR "${errorMsg}") + endif() # Check if file already corresponds to the object. - set(stamp "${ext}-stamp") + set(stamp "-hash-stamp") set(file_up_to_date 0) if(EXISTS "${file}" AND EXISTS "${file}${stamp}") file(READ "${file}${stamp}" f_hash) string(STRIP "${f_hash}" f_hash) if("${f_hash}" STREQUAL "${hash}") - #message(STATUS "File already corresponds to object") set(file_up_to_date 1) endif() endif() diff --git a/Tests/Module/ExternalData/CMakeLists.txt b/Tests/Module/ExternalData/CMakeLists.txt index 1018dd8..737e17a 100644 --- a/Tests/Module/ExternalData/CMakeLists.txt +++ b/Tests/Module/ExternalData/CMakeLists.txt @@ -45,6 +45,8 @@ ExternalData_Add_Test(Data1 -D Meta=DATA{MetaTop.dat,REGEX:Meta[ABC].dat} -D Directory=DATA{Directory/,A.dat,REGEX:[BC].dat} -D DirRecurse=DATA{DirRecurse/,RECURSE:,A.dat,REGEX:[BC].dat} + -D MultipleAlgorithmNoSHA1=DATA{MultipleAlgorithmNoSHA1.dat} + -D MultipleAlgorithmNoMD5=DATA{MultipleAlgorithmNoMD5.dat} -D "Semicolons=DATA{Data.dat}\\;DATA{Data.dat}" -P ${CMAKE_CURRENT_SOURCE_DIR}/Data1Check.cmake ) diff --git a/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.md5 b/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.md5 new file mode 100644 index 0000000..a956f36 --- /dev/null +++ b/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.md5 @@ -0,0 +1 @@ +29848e54a4d0343f138ab14419b863de diff --git a/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.sha1 b/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.sha1 new file mode 100644 index 0000000..43a3540 --- /dev/null +++ b/Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.sha1 @@ -0,0 +1 @@ +2af59a7022024974f3b8521b7ed8137c996a79f1 diff --git a/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.md5 b/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.md5 new file mode 100644 index 0000000..1906cbf --- /dev/null +++ b/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.md5 @@ -0,0 +1 @@ +08cfcf221f76ace7b906b312284e73d7 diff --git a/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.sha1 b/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.sha1 new file mode 100644 index 0000000..65781b2 --- /dev/null +++ b/Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.sha1 @@ -0,0 +1 @@ +223b134e6e3a9bf34aa7531c009d97cff6b0d8a3 ----------------------------------------------------------------------- Summary of changes: Help/release/dev/ExternalData-multiple-hashes.rst | 7 ++ Modules/ExternalData.cmake | 110 ++++++++++++++++---- Tests/Module/ExternalData/CMakeLists.txt | 2 + .../ExternalData/MultipleAlgorithmNoMD5.dat.md5 | 1 + ....2.dat.sha1 => MultipleAlgorithmNoMD5.dat.sha1} | 0 ...Top.dat.md5 => MultipleAlgorithmNoSHA1.dat.md5} | 0 .../ExternalData/MultipleAlgorithmNoSHA1.dat.sha1 | 1 + 7 files changed, 102 insertions(+), 19 deletions(-) create mode 100644 Help/release/dev/ExternalData-multiple-hashes.rst create mode 100644 Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.md5 copy Tests/Module/ExternalData/{SeriesMixed.2.dat.sha1 => MultipleAlgorithmNoMD5.dat.sha1} (100%) copy Tests/Module/ExternalData/{MetaTop.dat.md5 => MultipleAlgorithmNoSHA1.dat.md5} (100%) create mode 100644 Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.sha1 hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 18 13:08:54 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 13:08:54 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-597-g3881d58 Message-ID: <20161018170854.2B876F6963@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 3881d58885ad322596ceb98a66631b0f9a65bc3c (commit) via 615f3ed2b43129bd7d2466d369beef3003e1e0de (commit) via fdce782b61c6a1501b6ea2459c659d9a42bae59b (commit) from 387e43639e56691356a9c5617b24ff7ff7e25e92 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3881d58885ad322596ceb98a66631b0f9a65bc3c commit 3881d58885ad322596ceb98a66631b0f9a65bc3c Merge: 387e436 615f3ed Author: Brad King AuthorDate: Tue Oct 18 13:08:52 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 18 13:08:52 2016 -0400 Merge topic 'external-project-source-subdir-usage' into next 615f3ed2 ExternalProject: make SOURCE_SUBDIR directly appendable fdce782b ExternalProject: error out only if the property is unset https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=615f3ed2b43129bd7d2466d369beef3003e1e0de commit 615f3ed2b43129bd7d2466d369beef3003e1e0de Author: Ben Boeckel AuthorDate: Tue Oct 18 10:55:24 2016 -0400 Commit: Ben Boeckel CommitDate: Tue Oct 18 12:51:38 2016 -0400 ExternalProject: make SOURCE_SUBDIR directly appendable This allows it to be used in expansions without being conditional based on its value. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index e3bdc6d..1f64701 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1087,10 +1087,14 @@ function(_ep_set_directories name) endforeach() get_property(source_subdir TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR) if(NOT source_subdir) - set_property(TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR ".") + set_property(TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR "") elseif(IS_ABSOLUTE "${source_subdir}") message(FATAL_ERROR "External project ${name} has non-relative SOURCE_SUBDIR!") + else() + # Prefix with a slash so that when appended to the source directory, it + # behaves as expected. + set_property(TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR "/${source_subdir}") endif() if(build_in_source) get_property(source_dir TARGET ${name} PROPERTY _EP_SOURCE_DIR) @@ -2257,11 +2261,7 @@ function(_ep_add_configure_command name) endif() endif() - if(source_subdir STREQUAL ".") - list(APPEND cmd "${source_dir}") - else() - list(APPEND cmd "${source_dir}/${source_subdir}") - endif() + list(APPEND cmd "${source_dir}${source_subdir}") endif() # If anything about the configure command changes, (command itself, cmake https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fdce782b61c6a1501b6ea2459c659d9a42bae59b commit fdce782b61c6a1501b6ea2459c659d9a42bae59b Author: Ben Boeckel AuthorDate: Tue Oct 18 12:50:46 2016 -0400 Commit: Ben Boeckel CommitDate: Tue Oct 18 12:51:06 2016 -0400 ExternalProject: error out only if the property is unset Property values may be empty; instead make sure they exist and allow for empty values. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index bbeeeed..e3bdc6d 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1184,10 +1184,11 @@ endfunction() function(ExternalProject_Get_Property name) foreach(var ${ARGN}) string(TOUPPER "${var}" VAR) - get_property(${var} TARGET ${name} PROPERTY _EP_${VAR}) - if(NOT ${var}) + get_property(is_set TARGET ${name} PROPERTY _EP_${VAR} SET) + if(NOT is_set) message(FATAL_ERROR "External project \"${name}\" has no ${var}") endif() + get_property(${var} TARGET ${name} PROPERTY _EP_${VAR}) set(${var} "${${var}}" PARENT_SCOPE) endforeach() endfunction() ----------------------------------------------------------------------- Summary of changes: Modules/ExternalProject.cmake | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 18 13:11:47 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 13:11:47 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-599-g8c0bc67 Message-ID: <20161018171147.46D2AF5D2A@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 8c0bc67bed33fb53816b478fbbfae809720cbdfa (commit) via 9112c43ebc96c8ea25042520f769cb1575439c22 (commit) from 3881d58885ad322596ceb98a66631b0f9a65bc3c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c0bc67bed33fb53816b478fbbfae809720cbdfa commit 8c0bc67bed33fb53816b478fbbfae809720cbdfa Merge: 3881d58 9112c43 Author: Brad King AuthorDate: Tue Oct 18 13:11:46 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 18 13:11:46 2016 -0400 Merge topic 'cmake-server-pipe-mode-fix' into next 9112c43e server-mode: Fix named pipe mode https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9112c43ebc96c8ea25042520f769cb1575439c22 commit 9112c43ebc96c8ea25042520f769cb1575439c22 Author: Tobias Hunger AuthorDate: Tue Oct 18 15:20:40 2016 +0200 Commit: Brad King CommitDate: Tue Oct 18 10:55:01 2016 -0400 server-mode: Fix named pipe mode Do not treat a pointer itself as a `uv_stream_t`, but instead the pointed-to `uv_pipe_t`. It is unclear how this ever worked before in local testing. While at it, remove duplicate setup code and improve an error message. diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx index a814d16..b4af52b 100644 --- a/Source/cmServerConnection.cxx +++ b/Source/cmServerConnection.cxx @@ -323,11 +323,10 @@ bool cmServerPipeConnection::DoSetup(std::string* errorMessage) ": " + uv_err_name(r); return false; } - auto serverStream = reinterpret_cast(&this->ServerPipe); - serverStream->data = this; + auto serverStream = reinterpret_cast(this->ServerPipe); if ((r = uv_listen(serverStream, 1, on_new_connection)) != 0) { - *errorMessage = std::string("Internal Error with ") + this->PipeName + - ": " + uv_err_name(r); + *errorMessage = std::string("Internal Error listening on ") + + this->PipeName + ": " + uv_err_name(r); return false; } @@ -340,7 +339,7 @@ void cmServerPipeConnection::TearDown() uv_close(reinterpret_cast(this->ClientPipe), &on_pipe_close); this->WriteStream->data = nullptr; } - uv_close(reinterpret_cast(&this->ServerPipe), &on_pipe_close); + uv_close(reinterpret_cast(this->ServerPipe), &on_pipe_close); this->ClientPipe = nullptr; this->ServerPipe = nullptr; @@ -364,7 +363,7 @@ void cmServerPipeConnection::Connect(uv_stream_t* server) this->ClientPipe = new uv_pipe_t; uv_pipe_init(this->Loop(), this->ClientPipe, 0); this->ClientPipe->data = this; - auto client = reinterpret_cast(&this->ClientPipe); + auto client = reinterpret_cast(this->ClientPipe); if (uv_accept(server, client) != 0) { uv_close(reinterpret_cast(client), nullptr); return; ----------------------------------------------------------------------- Summary of changes: Source/cmServerConnection.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 18 14:24:47 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 18 Oct 2016 14:24:47 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-603-gb59659d Message-ID: <20161018182447.CDAB7F6612@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 b59659da1784db4997e7def4ea322a06672f15f7 (commit) via 9af881d810d464a357c8bac5eb4423aa970fffb6 (commit) via 6739d24030b7cb593be5557349ee6678b58bcc5a (commit) via 06c396126fb7734326075b56c859330a31ba5707 (commit) from 8c0bc67bed33fb53816b478fbbfae809720cbdfa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b59659da1784db4997e7def4ea322a06672f15f7 commit b59659da1784db4997e7def4ea322a06672f15f7 Merge: 8c0bc67 9af881d Author: Brad King AuthorDate: Tue Oct 18 14:24:44 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 18 14:24:44 2016 -0400 Merge topic 'fix-Android-NsightTegra' into next 9af881d8 Tests: Add VSNsightTegra test for VS 2015 6739d240 Tests: Fix VSNsightTegra test on Android NDK r12b 06c39612 VS: Fix NVIDIA Nsight Tegra Visual Studio Edition support https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9af881d810d464a357c8bac5eb4423aa970fffb6 commit 9af881d810d464a357c8bac5eb4423aa970fffb6 Author: Brad King AuthorDate: Tue Oct 18 13:31:16 2016 -0400 Commit: Brad King CommitDate: Tue Oct 18 13:32:50 2016 -0400 Tests: Add VSNsightTegra test for VS 2015 diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 31ed2eb..7df9403 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2166,6 +2166,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(vs12) add_test_VSNsightTegra(vs12 "Visual Studio 12 2013") endif() + if(vs14) + add_test_VSNsightTegra(vs14 "Visual Studio 14 2015") + endif() endif() if (APPLE) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6739d24030b7cb593be5557349ee6678b58bcc5a commit 6739d24030b7cb593be5557349ee6678b58bcc5a Author: Brad King AuthorDate: Tue Oct 18 13:25:35 2016 -0400 Commit: Brad King CommitDate: Tue Oct 18 13:32:50 2016 -0400 Tests: Fix VSNsightTegra test on Android NDK r12b Test with architecture `armv7-a` instead of `armv7-a-hard` because the latter is supporte supported only with NDK revisions r9c to r11c. diff --git a/Tests/VSNsightTegra/CMakeLists.txt b/Tests/VSNsightTegra/CMakeLists.txt index 61a04fd..6d74f2f 100644 --- a/Tests/VSNsightTegra/CMakeLists.txt +++ b/Tests/VSNsightTegra/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.3) project(VSNsightTegra C CXX) -set(CMAKE_ANDROID_ARCH armv7-a-hard) +set(CMAKE_ANDROID_ARCH armv7-a) set(CMAKE_ANDROID_STL_TYPE stlport_shared) set(CMAKE_ANDROID_API_MIN 9) set(CMAKE_ANDROID_API 15) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=06c396126fb7734326075b56c859330a31ba5707 commit 06c396126fb7734326075b56c859330a31ba5707 Author: Brad King AuthorDate: Tue Oct 18 13:03:34 2016 -0400 Commit: Brad King CommitDate: Tue Oct 18 13:32:50 2016 -0400 VS: Fix NVIDIA Nsight Tegra Visual Studio Edition support The guard added by commit v3.7.0-rc1~229^2~17 (Android: Suppress new functionality with Nsight Tegra in VS IDE builds, 2016-06-02) to `Modules/Platform/Android-Determine.cmake` does not work in that location because `CMAKE_VS_PLATFORM_NAME` is not set until after the module is loaded. Change this particular guard to test for the Visual Studio generator instead. If in the future we add support for using Visual Studio for Android without Nsight Tegra then something more will be needed, but this is good enough for now. Closes: #16371 diff --git a/Modules/Platform/Android-Determine.cmake b/Modules/Platform/Android-Determine.cmake index fd7c3bc..6d370ab 100644 --- a/Modules/Platform/Android-Determine.cmake +++ b/Modules/Platform/Android-Determine.cmake @@ -8,7 +8,7 @@ # Support for NVIDIA Nsight Tegra Visual Studio Edition was previously # implemented in the CMake VS IDE generators. Avoid interfering with # that functionality for now. Later we may try to integrate this. -if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") +if(CMAKE_GENERATOR MATCHES "Visual Studio") return() endif() ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android-Determine.cmake | 2 +- Tests/CMakeLists.txt | 3 +++ Tests/VSNsightTegra/CMakeLists.txt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Oct 19 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 19 Oct 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-294-g674d765 Message-ID: <20161019040107.11860F65B0@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 674d76538e4f51f89a7a1a3746b32e6d7519568a (commit) from 96f6fe6b5737494fc560e126b7c797d232d9307e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=674d76538e4f51f89a7a1a3746b32e6d7519568a commit 674d76538e4f51f89a7a1a3746b32e6d7519568a Author: Kitware Robot AuthorDate: Wed Oct 19 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Wed Oct 19 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e311274..f68167c 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 7) -set(CMake_VERSION_PATCH 20161018) +set(CMake_VERSION_PATCH 20161019) #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 Oct 19 08:48:30 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 08:48:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-296-g050ef26 Message-ID: <20161019124830.17C08F654B@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 050ef26061b6b73cc7c48dd8e7180ee0e7d5c073 (commit) via 9112c43ebc96c8ea25042520f769cb1575439c22 (commit) from 674d76538e4f51f89a7a1a3746b32e6d7519568a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=050ef26061b6b73cc7c48dd8e7180ee0e7d5c073 commit 050ef26061b6b73cc7c48dd8e7180ee0e7d5c073 Merge: 674d765 9112c43 Author: Brad King AuthorDate: Wed Oct 19 08:48:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 08:48:27 2016 -0400 Merge topic 'cmake-server-pipe-mode-fix' 9112c43e server-mode: Fix named pipe mode ----------------------------------------------------------------------- Summary of changes: Source/cmServerConnection.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 08:48:33 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 08:48:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-300-g1745733 Message-ID: <20161019124834.50775F6572@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 1745733809ebb31640b4f9205f2eee96e932e995 (commit) via 9af881d810d464a357c8bac5eb4423aa970fffb6 (commit) via 6739d24030b7cb593be5557349ee6678b58bcc5a (commit) via 06c396126fb7734326075b56c859330a31ba5707 (commit) from 050ef26061b6b73cc7c48dd8e7180ee0e7d5c073 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1745733809ebb31640b4f9205f2eee96e932e995 commit 1745733809ebb31640b4f9205f2eee96e932e995 Merge: 050ef26 9af881d Author: Brad King AuthorDate: Wed Oct 19 08:48:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 08:48:31 2016 -0400 Merge topic 'fix-Android-NsightTegra' 9af881d8 Tests: Add VSNsightTegra test for VS 2015 6739d240 Tests: Fix VSNsightTegra test on Android NDK r12b 06c39612 VS: Fix NVIDIA Nsight Tegra Visual Studio Edition support ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android-Determine.cmake | 2 +- Tests/CMakeLists.txt | 3 +++ Tests/VSNsightTegra/CMakeLists.txt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 08:48:39 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 08:48:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-302-gc61b6f7 Message-ID: <20161019124839.A63E9F6561@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 c61b6f7f37386eb06bb50d9fc25cb40efe44c9cc (commit) via 33a9aaa89b437da29a70f27d25b267242b6f982c (commit) from 1745733809ebb31640b4f9205f2eee96e932e995 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c61b6f7f37386eb06bb50d9fc25cb40efe44c9cc commit c61b6f7f37386eb06bb50d9fc25cb40efe44c9cc Merge: 1745733 33a9aaa Author: Brad King AuthorDate: Wed Oct 19 08:48:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 08:48:37 2016 -0400 Merge topic 'ExternalData-multiple-hashes' 33a9aaa8 ExternalData: Add support for multiple hash algorithms ----------------------------------------------------------------------- Summary of changes: Help/release/dev/ExternalData-multiple-hashes.rst | 7 ++ Modules/ExternalData.cmake | 110 ++++++++++++++++---- Tests/Module/ExternalData/CMakeLists.txt | 2 + .../ExternalData/MultipleAlgorithmNoMD5.dat.md5 | 1 + ....2.dat.sha1 => MultipleAlgorithmNoMD5.dat.sha1} | 0 ...Top.dat.md5 => MultipleAlgorithmNoSHA1.dat.md5} | 0 .../ExternalData/MultipleAlgorithmNoSHA1.dat.sha1 | 1 + 7 files changed, 102 insertions(+), 19 deletions(-) create mode 100644 Help/release/dev/ExternalData-multiple-hashes.rst create mode 100644 Tests/Module/ExternalData/MultipleAlgorithmNoMD5.dat.md5 copy Tests/Module/ExternalData/{SeriesMixed.2.dat.sha1 => MultipleAlgorithmNoMD5.dat.sha1} (100%) copy Tests/Module/ExternalData/{MetaTop.dat.md5 => MultipleAlgorithmNoSHA1.dat.md5} (100%) create mode 100644 Tests/Module/ExternalData/MultipleAlgorithmNoSHA1.dat.sha1 hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 08:48:42 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 08:48:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-305-ga08a48c Message-ID: <20161019124842.B0BF6F6576@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 a08a48c2da1ad0aa760c127511fb96c92d7890af (commit) via 615f3ed2b43129bd7d2466d369beef3003e1e0de (commit) via fdce782b61c6a1501b6ea2459c659d9a42bae59b (commit) from c61b6f7f37386eb06bb50d9fc25cb40efe44c9cc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a08a48c2da1ad0aa760c127511fb96c92d7890af commit a08a48c2da1ad0aa760c127511fb96c92d7890af Merge: c61b6f7 615f3ed Author: Brad King AuthorDate: Wed Oct 19 08:48:40 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 08:48:40 2016 -0400 Merge topic 'external-project-source-subdir-usage' 615f3ed2 ExternalProject: make SOURCE_SUBDIR directly appendable fdce782b ExternalProject: error out only if the property is unset ----------------------------------------------------------------------- Summary of changes: Modules/ExternalProject.cmake | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 08:49:22 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 08:49:22 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-609-g4616878 Message-ID: <20161019124922.1AAF2F6571@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 461687855df695039f4ba6714dea62fa7a51315e (commit) via a08a48c2da1ad0aa760c127511fb96c92d7890af (commit) via c61b6f7f37386eb06bb50d9fc25cb40efe44c9cc (commit) via 1745733809ebb31640b4f9205f2eee96e932e995 (commit) via 050ef26061b6b73cc7c48dd8e7180ee0e7d5c073 (commit) via 674d76538e4f51f89a7a1a3746b32e6d7519568a (commit) from b59659da1784db4997e7def4ea322a06672f15f7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=461687855df695039f4ba6714dea62fa7a51315e commit 461687855df695039f4ba6714dea62fa7a51315e Merge: b59659d a08a48c Author: Brad King AuthorDate: Wed Oct 19 08:48:56 2016 -0400 Commit: Brad King CommitDate: Wed Oct 19 08:48:56 2016 -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 Wed Oct 19 08:52:30 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 08:52:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-309-gaa10572 Message-ID: <20161019125230.036C1F6601@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 aa105725152defd75b11a96e27db8b28b9e884a5 (commit) via a0c539b5460da283433976053ea181f07fcea32e (commit) via 074999171cfcf21679a9417ef097df6a21fd3924 (commit) via e3cb3116bca6e0dd6cc5976fa927221a406ffe3d (commit) from a08a48c2da1ad0aa760c127511fb96c92d7890af (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 Wed Oct 19 08:52:30 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 08:52:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-614-g0bbc70a Message-ID: <20161019125230.20E3DF6608@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 0bbc70a7015b0ce837172f324fbe09f0f82efe57 (commit) via aa105725152defd75b11a96e27db8b28b9e884a5 (commit) via a0c539b5460da283433976053ea181f07fcea32e (commit) via 074999171cfcf21679a9417ef097df6a21fd3924 (commit) via e3cb3116bca6e0dd6cc5976fa927221a406ffe3d (commit) from 461687855df695039f4ba6714dea62fa7a51315e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0bbc70a7015b0ce837172f324fbe09f0f82efe57 commit 0bbc70a7015b0ce837172f324fbe09f0f82efe57 Merge: 4616878 aa10572 Author: Brad King AuthorDate: Wed Oct 19 08:51:41 2016 -0400 Commit: Brad King CommitDate: Wed Oct 19 08:51:41 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 08:52:30 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 08:52:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.7.0-rc1-63-ga0c539b Message-ID: <20161019125230.3F2DFF6608@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 a0c539b5460da283433976053ea181f07fcea32e (commit) via 9af881d810d464a357c8bac5eb4423aa970fffb6 (commit) via 6739d24030b7cb593be5557349ee6678b58bcc5a (commit) via 06c396126fb7734326075b56c859330a31ba5707 (commit) via 074999171cfcf21679a9417ef097df6a21fd3924 (commit) via e3cb3116bca6e0dd6cc5976fa927221a406ffe3d (commit) via 615f3ed2b43129bd7d2466d369beef3003e1e0de (commit) via fdce782b61c6a1501b6ea2459c659d9a42bae59b (commit) via 9112c43ebc96c8ea25042520f769cb1575439c22 (commit) from df68d8a17ed14b6c5a38dca9c95d88bcc6da243c (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/ExternalProject.cmake | 17 +++++++++-------- Modules/Platform/Android-Determine.cmake | 2 +- Source/cmServerConnection.cxx | 11 +++++------ Tests/CMakeLists.txt | 3 +++ Tests/VSNsightTegra/CMakeLists.txt | 2 +- 5 files changed, 19 insertions(+), 16 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 08:53:41 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 08:53:41 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-617-gfe5e4f0 Message-ID: <20161019125341.057A6F6668@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 fe5e4f05abf1b557c226395271a0e4eff61631ab (commit) via 3b67ffe4ab6e876ec8cda1b4e1298b73ea022e28 (commit) via 876da11858ab6649bb088c4bb7758fc84910ba20 (commit) from 0bbc70a7015b0ce837172f324fbe09f0f82efe57 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe5e4f05abf1b557c226395271a0e4eff61631ab commit fe5e4f05abf1b557c226395271a0e4eff61631ab Merge: 0bbc70a 3b67ffe Author: Brad King AuthorDate: Wed Oct 19 08:53:40 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 08:53:40 2016 -0400 Merge topic 'test-release' into next 3b67ffe4 Merge branch 'release' into test-release 876da118 CMake 3.7.0-rc2 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b67ffe4ab6e876ec8cda1b4e1298b73ea022e28 commit 3b67ffe4ab6e876ec8cda1b4e1298b73ea022e28 Merge: aa10572 876da11 Author: Brad King AuthorDate: Wed Oct 19 08:53:31 2016 -0400 Commit: Brad King CommitDate: Wed Oct 19 08:53:31 2016 -0400 Merge branch 'release' into test-release https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=876da11858ab6649bb088c4bb7758fc84910ba20 commit 876da11858ab6649bb088c4bb7758fc84910ba20 Author: Brad King AuthorDate: Wed Oct 19 08:53:08 2016 -0400 Commit: Brad King CommitDate: Wed Oct 19 08:53:08 2016 -0400 CMake 3.7.0-rc2 diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6cb0fea..d8c77fc 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,4 +2,4 @@ set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 7) set(CMake_VERSION_PATCH 0) -set(CMake_VERSION_RC 1) +set(CMake_VERSION_RC 2) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 09:01:08 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 09:01:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-619-gf05a7d0 Message-ID: <20161019130108.7FB13F6816@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 f05a7d0668b7d1f6e540e9478332eeff04090c23 (commit) via 3a9e92bce1c10e0082d431a61e100485fd6cf270 (commit) from fe5e4f05abf1b557c226395271a0e4eff61631ab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f05a7d0668b7d1f6e540e9478332eeff04090c23 commit f05a7d0668b7d1f6e540e9478332eeff04090c23 Merge: fe5e4f0 3a9e92b Author: Brad King AuthorDate: Wed Oct 19 09:01:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 09:01:07 2016 -0400 Merge topic 'ninja-only-object-rules' into next 3a9e92bc Ninja: Add compile rules only for languages that are actually compiled https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a9e92bce1c10e0082d431a61e100485fd6cf270 commit 3a9e92bce1c10e0082d431a61e100485fd6cf270 Author: Brad King AuthorDate: Tue Oct 18 15:35:10 2016 -0400 Commit: Brad King CommitDate: Tue Oct 18 15:35:10 2016 -0400 Ninja: Add compile rules only for languages that are actually compiled In `WriteLanguageRules` we collect all languages used for source files in a target. However, this only needs to include sources that are actually going to be compiled into object files. No object file build statements will be generated for other sources. This avoids generating language compile rules for source files that are not compiled due to being marked as `HEADER_FILE_ONLY`. Issue: #16373 diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index b28b19a..80d6d93 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -106,10 +106,11 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules() // Write rules for languages compiled in this target. std::set languages; - std::vector sourceFiles; - this->GetGeneratorTarget()->GetSourceFiles( + std::vector sourceFiles; + this->GetGeneratorTarget()->GetObjectSources( sourceFiles, this->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE")); - for (std::vector::const_iterator i = sourceFiles.begin(); + for (std::vector::const_iterator i = + sourceFiles.begin(); i != sourceFiles.end(); ++i) { const std::string& lang = (*i)->GetLanguage(); if (!lang.empty()) { ----------------------------------------------------------------------- Summary of changes: Source/cmNinjaNormalTargetGenerator.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 09:09:50 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 09:09:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-622-g8554cb7 Message-ID: <20161019130950.6F295F5D65@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 8554cb72c124ac87e63e3da1d23f9795c7b42f2e (commit) via e89fbfaf6626b0693cc597ce4e705d87b8faf996 (commit) via 64aa29b7d682c333653ee4720e07914396ec3da7 (commit) from f05a7d0668b7d1f6e540e9478332eeff04090c23 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8554cb72c124ac87e63e3da1d23f9795c7b42f2e commit 8554cb72c124ac87e63e3da1d23f9795c7b42f2e Merge: f05a7d0 e89fbfa Author: Brad King AuthorDate: Wed Oct 19 09:09:49 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 09:09:49 2016 -0400 Merge topic 'external-project-clone-progress' into next e89fbfaf ExternalProject: support GIT_PROGRESS argument 64aa29b7 ExternalProject: fix typo https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e89fbfaf6626b0693cc597ce4e705d87b8faf996 commit e89fbfaf6626b0693cc597ce4e705d87b8faf996 Author: Ben Boeckel AuthorDate: Tue Oct 18 11:31:04 2016 -0400 Commit: Ben Boeckel CommitDate: Tue Oct 18 17:41:02 2016 -0400 ExternalProject: support GIT_PROGRESS argument diff --git a/Help/release/dev/external-project-clone-progress.rst b/Help/release/dev/external-project-clone-progress.rst new file mode 100644 index 0000000..766a1a3 --- /dev/null +++ b/Help/release/dev/external-project-clone-progress.rst @@ -0,0 +1,5 @@ +external-project-clone-progress +------------------------------- + +* The :module:`ExternalProject` module gained the ``GIT_PROGRESS`` option to + force Git to show progress when cloning repositories. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index a56f64c..9694563 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -68,6 +68,11 @@ Create custom targets to build projects in external trees Tell Git to clone with ``--depth 1``. Use when ``GIT_TAG`` is not specified or when it names a branch in order to download only the tip of the branch without the rest of its history. + ``GIT_PROGRESS 1`` + Tell Git to clone with ``--progress``. For large projects, the clone step + does not output anything which can make the build appear to have stalled. + This option forces Git to output progress information during the clone step + so that forward progress is indicated. ``HG_REPOSITORY `` URL of mercurial repo ``HG_TAG `` @@ -509,7 +514,7 @@ define_property(DIRECTORY PROPERTY "EP_UPDATE_DISCONNECTED" INHERITED "ExternalProject module." ) -function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag git_remote_name git_submodules git_shallow src_name work_dir gitclone_infofile gitclone_stampfile tls_verify) +function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag git_remote_name git_submodules git_shallow git_progress src_name work_dir gitclone_infofile gitclone_stampfile tls_verify) if(NOT GIT_VERSION_STRING VERSION_LESS 1.7.10) set(git_clone_shallow_options "--depth 1 --no-single-branch") else() @@ -555,6 +560,11 @@ if(git_shallow) list(APPEND git_clone_options ${git_clone_shallow_options}) endif() +set(git_progress \"${git_progress}\") +if(git_progress) + list(APPEND git_clone_options --progress) +endif() + # try the clone 3 times incase there is an odd git clone issue set(error_code 1) set(number_of_tries 0) @@ -1795,6 +1805,7 @@ function(_ep_add_download_command name) set(tls_verify "${CMAKE_TLS_VERIFY}") endif() get_property(git_shallow TARGET ${name} PROPERTY _EP_GIT_SHALLOW) + get_property(git_progress TARGET ${name} PROPERTY _EP_GIT_PROGRESS) # For the download step, and the git clone operation, only the repository # should be recorded in a configured RepositoryInfo file. If the repo @@ -1819,7 +1830,7 @@ function(_ep_add_download_command name) # The script will delete the source directory and then call git clone. # _ep_write_gitclone_script(${tmp_dir}/${name}-gitclone.cmake ${source_dir} - ${GIT_EXECUTABLE} ${git_repository} ${git_tag} ${git_remote_name} "${git_submodules}" "${git_shallow}" ${src_name} ${work_dir} + ${GIT_EXECUTABLE} ${git_repository} ${git_tag} ${git_remote_name} "${git_submodules}" "${git_shallow}" "${git_progress}" ${src_name} ${work_dir} ${stamp_dir}/${name}-gitinfo.txt ${stamp_dir}/${name}-gitclone-lastrun.txt "${tls_verify}" ) set(comment "Performing download step (git clone) for '${name}'") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64aa29b7d682c333653ee4720e07914396ec3da7 commit 64aa29b7d682c333653ee4720e07914396ec3da7 Author: Ben Boeckel AuthorDate: Tue Oct 18 11:30:44 2016 -0400 Commit: Ben Boeckel CommitDate: Tue Oct 18 11:30:44 2016 -0400 ExternalProject: fix typo diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 4ba8537..a56f64c 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -65,7 +65,7 @@ Create custom targets to build projects in external trees ``GIT_SUBMODULES ...`` Git submodules that shall be updated, all if empty ``GIT_SHALLOW 1`` - Tell Git to clone with ``--depth 1``. Use when ``GIT_TAG`` is not + Tell Git to clone with ``--depth 1``. Use when ``GIT_TAG`` is not specified or when it names a branch in order to download only the tip of the branch without the rest of its history. ``HG_REPOSITORY `` ----------------------------------------------------------------------- Summary of changes: Help/release/dev/external-project-clone-progress.rst | 5 +++++ Modules/ExternalProject.cmake | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 Help/release/dev/external-project-clone-progress.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 09:14:46 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 09:14:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-642-gdb659b6 Message-ID: <20161019131446.A4C3FF65E0@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 db659b69cddd639e4c44bdb4e4d53a06e424fc8b (commit) via aecd35b5432da7c2b205ecec60140b2ce6e319d5 (commit) via 47d8092dbe61cf8e4ab98c5ffcb787370789b801 (commit) via 9bc24ade20c57abca95789940d4b1ddae1528be4 (commit) via d494d534858f0189f208f6e5d21cfd9c59412a30 (commit) via ebcca02a091192f881e106e4ec7c879b343a1ae3 (commit) via 799756410ceb775b28dbd28ea464a6dbd794c44e (commit) via da76011790b2cda7159d82db3ff5971699869239 (commit) via b23b251ae262ba2e8e1ce7851648942a16e74c73 (commit) via 14f71f8c9d06c0f51156dce1f13db2d26f6f6bc5 (commit) via 92040fa48189e503e587b383cd12ffe16443c257 (commit) via 6fb87e0913d808518125f3e6c4ad901e9817a570 (commit) via 0febfc1a32ee964f6e32d4d123d28b56b80709f4 (commit) via 0060391dffe824526b1f359db79c66c55e53d0c5 (commit) via 5bc964eddbee7936f05ab758c7ac417fffbe4a3e (commit) via 2dc409964858c96125948082a2c488bd573b8269 (commit) via cb40af5d6fa65dae9421280c05934eafc8a66165 (commit) via 1205f75e3bd9e5ff7051459cac4594ea7c3a9bf9 (commit) via 163991dd83cac6afa0f6dfeec41d885e8b880fc8 (commit) via 51f89932c0adccdc28bc3cb6ccf0248a16d897a2 (commit) from 8554cb72c124ac87e63e3da1d23f9795c7b42f2e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db659b69cddd639e4c44bdb4e4d53a06e424fc8b commit db659b69cddd639e4c44bdb4e4d53a06e424fc8b Merge: 8554cb7 aecd35b Author: Brad King AuthorDate: Wed Oct 19 09:14:38 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 09:14:38 2016 -0400 Merge topic 'split-cmState' into next aecd35b5 cmListFileCache: Remove cmState header include 47d8092d cmTargetPropertyComputer: Add missing include 9bc24ade cmState: Split auxiliary classes into separate files d494d534 cmState: Port dependents to new cmStateTypes header ebcca02a cmState: Move extracted declarations to a separate file 79975641 cmState: Remove compatibility typedefs da760117 cmState: Port dependent code to new cmStateSnapshot name b23b251a cmState: Move Snapshot type to separate namespace 14f71f8c cmState: Port dependent code to new cmStateDirectory name 92040fa4 cmState: Move Directory class to separate namespace 6fb87e09 cmState: Move CacheEntryType enum to separate namespace 0febfc1a cmState: Move TargetType enum to separate namespace 0060391d cmState: Move SnapshotType enum to separate namespace 5bc964ed cmState: Move PositionType to separate namespace 2dc40996 cmState: Move PolicyStackEntry to separate namespace cb40af5d cmState: Move SnapshotDataType to separate namespace ... https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aecd35b5432da7c2b205ecec60140b2ce6e319d5 commit aecd35b5432da7c2b205ecec60140b2ce6e319d5 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:49 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 23:45:02 2016 +0200 cmListFileCache: Remove cmState header include Include it in dependents which have previously relied on it transitively. diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index e3adf6b..c305cbf 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -9,6 +9,7 @@ #include "cmDocumentationEntry.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTypeMacro.h" diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index fa816a6..7ee0f75 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -21,6 +21,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index a114755..d21471d 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -7,6 +7,7 @@ #include "cmCTestScriptHandler.h" #include "cmCurl.h" #include "cmGeneratedFileStream.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLParser.h" diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 09efafb..4e6f1e9 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -9,6 +9,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 5d29942..5539fbe 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -9,6 +9,7 @@ #include "cmCursesPathWidget.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index e8e70df..ebd35f3 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -11,6 +11,7 @@ #include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 3cde147..0777ef0 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddLibraryCommand.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index 36ffd7c..67581b6 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakePolicyCommand.h" +#include "cmState.h" #include "cmVersion.h" // cmCMakePolicyCommand diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 502a709..024260c 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -20,6 +20,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 3df7689..2d66344 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -6,6 +6,7 @@ #include "cmCommandArgumentLexer.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 16bbadb..28aa533 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -11,6 +11,7 @@ #include "cmOrderDirectories.h" #include "cmOutputConverter.h" #include "cmPolicies.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 70ed31e..cfebda2 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -10,6 +10,7 @@ #include "cmMakefile.h" #include "cmPolicies.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 420a777..4c0b649 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -4,6 +4,7 @@ #include "cmAlgorithms.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmSystemTools.h" static std::string const keyAND = "AND"; diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index e4a97a1..c7b6d58 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -6,6 +6,7 @@ #include "cmExportTryCompileFileGenerator.h" #include "cmGlobalGenerator.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmake.h" #include diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx index 99db478..af4eff9 100644 --- a/Source/cmDefinePropertyCommand.cxx +++ b/Source/cmDefinePropertyCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDefinePropertyCommand.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index d20e386..c4e86a9 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -11,6 +11,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceGroup.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 66433f9..ff822b8 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -3,6 +3,7 @@ #include "cmFindBase.h" #include "cmAlgorithms.h" +#include "cmState.h" #include "cmStateTypes.h" cmFindBase::cmFindBase() diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 2909209..5d8aaa2 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindLibraryCommand.h" +#include "cmState.h" #include cmFindLibraryCommand::cmFindLibraryCommand() diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 5723999..029d422 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -3,6 +3,7 @@ #include "cmFindPackageCommand.h" #include "cmAlgorithms.h" +#include "cmState.h" #include #include #include diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8324c30..7dae226 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -15,6 +15,7 @@ #include "cmPropertyMap.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index c44445a..da648d9 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -5,6 +5,7 @@ #include "cmGlobalGenerator.h" #include "cmPropertyDefinition.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmTargetPropertyComputer.h" #include "cmTest.h" diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx index 5a2150d..a0a33ea 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.cxx +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmake.h" cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator(cmake* cm) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index fd3734b..b4ede1d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -28,6 +28,7 @@ #include "cmPolicies.h" #include "cmQtAutoGeneratorInitializer.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index a846773..6d85861 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -3,6 +3,7 @@ #include "cmGlobalJOMMakefileGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" +#include "cmState.h" #include "cmMakefile.h" cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator(cmake* cm) diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index 6d314d6..f17b915 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmake.h" #include diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index d5decfb..4a14df9 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -3,6 +3,7 @@ #include "cmGlobalMinGWMakefileGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" +#include "cmState.h" #include "cmMakefile.h" cmGlobalMinGWMakefileGenerator::cmGlobalMinGWMakefileGenerator(cmake* cm) diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index 48798fb..92af8a9 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalNMakeMakefileGenerator.h" +#include "cmState.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 635d07e..51cb315 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -8,6 +8,7 @@ #include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmUuid.h" #include "cmake.h" #include diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 45f7913..d6209db 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -9,6 +9,7 @@ #include "cmGeneratorTarget.h" #include "cmLocalVisualStudioGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmSourceFile.h" #include "cmTarget.h" #include diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index f97bb75..0900797 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -4,6 +4,7 @@ #include "cmDocumentationEntry.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index c8744d4..b1cd889 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -5,6 +5,7 @@ #include "cmListFileLexer.h" #include "cmMessenger.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 9af00b2..1a30f29 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -9,7 +9,6 @@ #include #include -#include "cmState.h" #include "cmStateSnapshot.h" /** \class cmListFileCache diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 8789530..cd9af54 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -12,6 +12,7 @@ #include "cmNinjaTargetGenerator.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 7eca0a8..cbbd2e6 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index cfe1e83..a249efd 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 4a8924f..68c166e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -20,6 +20,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index d5d3e90..3b71e34 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -17,6 +17,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 76fe047..514fbeb 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -16,6 +16,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 41bee8b..6339e11 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -2,6 +2,7 @@ #include "cmAlgorithms.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index b04c7ca..f0373a1 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -12,6 +12,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index ba24ff2..6f29b18 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -6,6 +6,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmProperty.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 2527366..e2ee3a5 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -13,6 +13,7 @@ #include "cmProperty.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmTargetPropertyComputer.h" #include "cmake.h" diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx index f55dc83..1c36dc6 100644 --- a/Source/cmTest.cxx +++ b/Source/cmTest.cxx @@ -4,6 +4,7 @@ #include "cmMakefile.h" #include "cmProperty.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 8f25cbb..c816114 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUtilitySourceCommand.h" +#include "cmState.h" + // cmUtilitySourceCommand bool cmUtilitySourceCommand::InitialPass(std::vector const& args, cmExecutionStatus&) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47d8092dbe61cf8e4ab98c5ffcb787370789b801 commit 47d8092dbe61cf8e4ab98c5ffcb787370789b801 Author: Stephen Kelly AuthorDate: Tue Oct 18 22:16:11 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 23:45:02 2016 +0200 cmTargetPropertyComputer: Add missing include diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index f8b683a..817e8c2 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -7,6 +7,7 @@ #include "cmListFileCache.h" #include "cmSystemTools.h" +#include "cmAlgorithms.h" #include #include https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9bc24ade20c57abca95789940d4b1ddae1528be4 commit 9bc24ade20c57abca95789940d4b1ddae1528be4 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:49 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 23:45:01 2016 +0200 cmState: Split auxiliary classes into separate files Port dependents to the new locations as needed. Leave behind a cmState.h include in cmListFileCache to reduce noise. It is removed in a following commit. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 3124f81..2b8c17c 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -360,6 +360,10 @@ set(SRCS cmSourceGroup.h cmState.cxx cmState.h + cmStateDirectory.cxx + cmStateDirectory.h + cmStateSnapshot.cxx + cmStateSnapshot.h cmStateTypes.h cmSystemTools.cxx cmSystemTools.h diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 4d900b6..95b95c1 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -17,6 +17,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt) diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index aaa9d3a..c8723d0 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -7,6 +7,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 959fe32..9cc6724 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -6,7 +6,8 @@ #include #include "cmExportSetMap.h" -#include "cmState.h" +#include "cmStateDirectory.h" +#include "cmStateSnapshot.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 3433d75..17d49e8 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -12,6 +12,8 @@ #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index f6d5e70..c271246 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -5,6 +5,7 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" #include "cmOutputConverter.h" +#include "cmStateDirectory.h" cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, cmStateDirectory stateDir) diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index 59e7357..6bbb69e 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -4,7 +4,7 @@ #ifndef cmLinkLineComputer_h #define cmLinkLineComputer_h -#include "cmState.h" +#include "cmStateDirectory.h" class cmComputeLinkInformation; class cmOutputConverter; diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 83aac51..9af00b2 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -10,6 +10,7 @@ #include #include "cmState.h" +#include "cmStateSnapshot.h" /** \class cmListFileCache * \brief A class to cache list file contents. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index d90094b..4aecb1d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -16,6 +16,8 @@ #include "cmMakefile.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTestGenerator.h" diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index eda604d..4f81ef1 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -16,6 +16,8 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 28912c3..00c0e82 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -17,6 +17,8 @@ #include "cmListFileCache.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTest.h" diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 8ac0e33..b61e81b 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -9,7 +9,7 @@ #include "cmListFileCache.h" #include "cmNewLineStyle.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateSnapshot.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" #include "cmake.h" diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index c219fdf..445ad0b 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -3,6 +3,8 @@ #include "cmOutputConverter.h" #include "cmAlgorithms.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 2a81dab..dabb091 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -5,7 +5,7 @@ #include // IWYU pragma: keep -#include "cmState.h" +#include "cmStateSnapshot.h" #include #include diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index dca0f69..f56f575 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -7,6 +7,8 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 32fe66c..0d1eb3e 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmState.h" +#include "cmStatePrivate.h" + #include "cmAlgorithms.h" #include "cmCacheManager.h" #include "cmCommand.h" @@ -9,7 +11,6 @@ #include "cmListFileCache.h" #include "cmSystemTools.h" #include "cmTypeMacro.h" -#include "cmVersion.h" #include "cmake.h" #include @@ -20,85 +21,6 @@ #include #include -static std::string const kBINARY_DIR = "BINARY_DIR"; -static std::string const kBUILDSYSTEM_TARGETS = "BUILDSYSTEM_TARGETS"; -static std::string const kSOURCE_DIR = "SOURCE_DIR"; -static std::string const kSUBDIRECTORIES = "SUBDIRECTORIES"; - -struct cmStateDetail::SnapshotDataType -{ - cmStateDetail::PositionType ScopeParent; - cmStateDetail::PositionType DirectoryParent; - cmLinkedTree::iterator Policies; - cmLinkedTree::iterator PolicyRoot; - cmLinkedTree::iterator PolicyScope; - cmStateEnums::SnapshotType SnapshotType; - bool Keep; - cmLinkedTree::iterator ExecutionListFile; - cmLinkedTree::iterator - BuildSystemDirectory; - cmLinkedTree::iterator Vars; - cmLinkedTree::iterator Root; - cmLinkedTree::iterator Parent; - std::vector::size_type IncludeDirectoryPosition; - std::vector::size_type CompileDefinitionsPosition; - std::vector::size_type CompileOptionsPosition; -}; - -struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap -{ - typedef cmPolicies::PolicyMap derived; - PolicyStackEntry(bool w = false) - : derived() - , Weak(w) - { - } - PolicyStackEntry(derived const& d, bool w) - : derived(d) - , Weak(w) - { - } - PolicyStackEntry(PolicyStackEntry const& r) - : derived(r) - , Weak(r.Weak) - { - } - bool Weak; -}; - -struct cmStateDetail::BuildsystemDirectoryStateType -{ - cmStateDetail::PositionType DirectoryEnd; - - std::string Location; - std::string OutputLocation; - - // The top-most directories for relative path conversion. Both the - // source and destination location of a relative path conversion - // must be underneath one of these directories (both under source or - // both under binary) in order for the relative path to be evaluated - // safely by the build tools. - std::string RelativePathTopSource; - std::string RelativePathTopBinary; - - std::vector IncludeDirectories; - std::vector IncludeDirectoryBacktraces; - - std::vector CompileDefinitions; - std::vector CompileDefinitionsBacktraces; - - std::vector CompileOptions; - std::vector CompileOptionsBacktraces; - - std::vector NormalTargetNames; - - std::string ProjectName; - - cmPropertyMap Properties; - - std::vector Children; -}; - cmState::cmState() : IsInTryCompile(false) , WindowsShell(false) @@ -676,70 +598,6 @@ const char* cmState::GetBinaryDirectory() const return this->BinaryDirectory.c_str(); } -void cmStateDirectory::ComputeRelativePathTopSource() -{ - // Relative path conversion inside the source tree is not used to - // construct relative paths passed to build tools so it is safe to use - // even when the source is a network path. - - cmStateSnapshot snapshot = this->Snapshot_; - std::vector snapshots; - snapshots.push_back(snapshot); - while (true) { - snapshot = snapshot.GetBuildsystemDirectoryParent(); - if (snapshot.IsValid()) { - snapshots.push_back(snapshot); - } else { - break; - } - } - - std::string result = snapshots.front().GetDirectory().GetCurrentSource(); - - for (std::vector::const_iterator it = snapshots.begin() + 1; - it != snapshots.end(); ++it) { - std::string currentSource = it->GetDirectory().GetCurrentSource(); - if (cmSystemTools::IsSubDirectory(result, currentSource)) { - result = currentSource; - } - } - this->DirectoryState->RelativePathTopSource = result; -} - -void cmStateDirectory::ComputeRelativePathTopBinary() -{ - cmStateSnapshot snapshot = this->Snapshot_; - std::vector snapshots; - snapshots.push_back(snapshot); - while (true) { - snapshot = snapshot.GetBuildsystemDirectoryParent(); - if (snapshot.IsValid()) { - snapshots.push_back(snapshot); - } else { - break; - } - } - - std::string result = snapshots.front().GetDirectory().GetCurrentBinary(); - - for (std::vector::const_iterator it = snapshots.begin() + 1; - it != snapshots.end(); ++it) { - std::string currentBinary = it->GetDirectory().GetCurrentBinary(); - if (cmSystemTools::IsSubDirectory(result, currentBinary)) { - result = currentBinary; - } - } - - // The current working directory on Windows cannot be a network - // path. Therefore relative paths cannot work when the binary tree - // is a network path. - if (result.size() < 2 || result.substr(0, 2) != "//") { - this->DirectoryState->RelativePathTopBinary = result; - } else { - this->DirectoryState->RelativePathTopBinary = ""; - } -} - cmStateSnapshot cmState::CreateBaseSnapshot() { cmStateDetail::PositionType pos = @@ -923,854 +781,6 @@ cmStateSnapshot cmState::Pop(cmStateSnapshot originSnapshot) return cmStateSnapshot(this, prevPos); } -cmStateSnapshot::cmStateSnapshot(cmState* state) - : State(state) - , Position() -{ -} - -std::vector cmStateSnapshot::GetChildren() -{ - return this->Position->BuildSystemDirectory->Children; -} - -cmStateSnapshot::cmStateSnapshot(cmState* state, - cmStateDetail::PositionType position) - : State(state) - , Position(position) -{ -} - -cmStateEnums::SnapshotType cmStateSnapshot::GetType() const -{ - return this->Position->SnapshotType; -} - -const char* cmStateDirectory::GetCurrentSource() const -{ - return this->DirectoryState->Location.c_str(); -} - -void cmStateDirectory::SetCurrentSource(std::string const& dir) -{ - std::string& loc = this->DirectoryState->Location; - loc = dir; - cmSystemTools::ConvertToUnixSlashes(loc); - loc = cmSystemTools::CollapseFullPath(loc); - - this->ComputeRelativePathTopSource(); - - this->Snapshot_.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", loc); -} - -const char* cmStateDirectory::GetCurrentBinary() const -{ - return this->DirectoryState->OutputLocation.c_str(); -} - -void cmStateDirectory::SetCurrentBinary(std::string const& dir) -{ - std::string& loc = this->DirectoryState->OutputLocation; - loc = dir; - cmSystemTools::ConvertToUnixSlashes(loc); - loc = cmSystemTools::CollapseFullPath(loc); - - this->ComputeRelativePathTopBinary(); - - this->Snapshot_.SetDefinition("CMAKE_CURRENT_BINARY_DIR", loc); -} - -void cmStateSnapshot::SetListFile(const std::string& listfile) -{ - *this->Position->ExecutionListFile = listfile; -} - -const char* cmStateDirectory::GetRelativePathTopSource() const -{ - return this->DirectoryState->RelativePathTopSource.c_str(); -} - -const char* cmStateDirectory::GetRelativePathTopBinary() const -{ - return this->DirectoryState->RelativePathTopBinary.c_str(); -} - -void cmStateDirectory::SetRelativePathTopSource(const char* dir) -{ - this->DirectoryState->RelativePathTopSource = dir; -} - -void cmStateDirectory::SetRelativePathTopBinary(const char* dir) -{ - this->DirectoryState->RelativePathTopBinary = dir; -} - -std::string cmStateSnapshot::GetExecutionListFile() const -{ - return *this->Position->ExecutionListFile; -} - -bool cmStateSnapshot::IsValid() const -{ - return this->State && this->Position.IsValid() - ? this->Position != this->State->SnapshotData.Root() - : false; -} - -cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const -{ - cmStateSnapshot snapshot; - if (!this->State || this->Position == this->State->SnapshotData.Root()) { - return snapshot; - } - cmStateDetail::PositionType parentPos = this->Position->DirectoryParent; - if (parentPos != this->State->SnapshotData.Root()) { - snapshot = cmStateSnapshot(this->State, - parentPos->BuildSystemDirectory->DirectoryEnd); - } - - return snapshot; -} - -cmStateSnapshot cmStateSnapshot::GetCallStackParent() const -{ - assert(this->State); - assert(this->Position != this->State->SnapshotData.Root()); - - cmStateSnapshot snapshot; - cmStateDetail::PositionType parentPos = this->Position; - while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || - parentPos->SnapshotType == cmStateEnums::VariableScopeType) { - ++parentPos; - } - if (parentPos->SnapshotType == cmStateEnums::BuildsystemDirectoryType || - parentPos->SnapshotType == cmStateEnums::BaseType) { - return snapshot; - } - - ++parentPos; - while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || - parentPos->SnapshotType == cmStateEnums::VariableScopeType) { - ++parentPos; - } - - if (parentPos == this->State->SnapshotData.Root()) { - return snapshot; - } - - snapshot = cmStateSnapshot(this->State, parentPos); - return snapshot; -} - -cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const -{ - assert(this->State); - assert(this->Position != this->State->SnapshotData.Root()); - - cmStateDetail::PositionType pos = this->Position; - while (pos->SnapshotType != cmStateEnums::BaseType && - pos->SnapshotType != cmStateEnums::BuildsystemDirectoryType && - pos != this->State->SnapshotData.Root()) { - ++pos; - } - return cmStateSnapshot(this->State, pos); -} - -void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) -{ - cmStateDetail::PositionType pos = this->Position; - pos->Policies = this->State->PolicyStack.Push( - pos->Policies, cmStateDetail::PolicyStackEntry(entry, weak)); -} - -bool cmStateSnapshot::PopPolicy() -{ - cmStateDetail::PositionType pos = this->Position; - if (pos->Policies == pos->PolicyScope) { - return false; - } - pos->Policies = this->State->PolicyStack.Pop(pos->Policies); - return true; -} - -bool cmStateSnapshot::CanPopPolicyScope() -{ - return this->Position->Policies == this->Position->PolicyScope; -} - -void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id, - cmPolicies::PolicyStatus status) -{ - // Update the policy stack from the top to the top-most strong entry. - bool previous_was_weak = true; - for (cmLinkedTree::iterator psi = - this->Position->Policies; - previous_was_weak && psi != this->Position->PolicyRoot; ++psi) { - psi->Set(id, status); - previous_was_weak = psi->Weak; - } -} - -cmPolicies::PolicyStatus cmStateSnapshot::GetPolicy( - cmPolicies::PolicyID id) const -{ - cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id); - - if (status == cmPolicies::REQUIRED_ALWAYS || - status == cmPolicies::REQUIRED_IF_USED) { - return status; - } - - cmLinkedTree::iterator dir = - this->Position->BuildSystemDirectory; - - while (true) { - assert(dir.IsValid()); - cmLinkedTree::iterator leaf = - dir->DirectoryEnd->Policies; - cmLinkedTree::iterator root = - dir->DirectoryEnd->PolicyRoot; - for (; leaf != root; ++leaf) { - if (leaf->IsDefined(id)) { - status = leaf->Get(id); - return status; - } - } - cmStateDetail::PositionType e = dir->DirectoryEnd; - cmStateDetail::PositionType p = e->DirectoryParent; - if (p == this->State->SnapshotData.Root()) { - break; - } - dir = p->BuildSystemDirectory; - } - return status; -} - -bool cmStateSnapshot::HasDefinedPolicyCMP0011() -{ - return !this->Position->Policies->IsEmpty(); -} - -const char* cmStateSnapshot::GetDefinition(std::string const& name) const -{ - assert(this->Position->Vars.IsValid()); - return cmDefinitions::Get(name, this->Position->Vars, this->Position->Root); -} - -bool cmStateSnapshot::IsInitialized(std::string const& name) const -{ - return cmDefinitions::HasKey(name, this->Position->Vars, - this->Position->Root); -} - -void cmStateSnapshot::SetDefinition(std::string const& name, - std::string const& value) -{ - this->Position->Vars->Set(name, value.c_str()); -} - -void cmStateSnapshot::RemoveDefinition(std::string const& name) -{ - this->Position->Vars->Set(name, CM_NULLPTR); -} - -std::vector cmStateSnapshot::UnusedKeys() const -{ - return this->Position->Vars->UnusedKeys(); -} - -std::vector cmStateSnapshot::ClosureKeys() const -{ - return cmDefinitions::ClosureKeys(this->Position->Vars, - this->Position->Root); -} - -bool cmStateSnapshot::RaiseScope(std::string const& var, const char* varDef) -{ - if (this->Position->ScopeParent == this->Position->DirectoryParent) { - cmStateSnapshot parentDir = this->GetBuildsystemDirectoryParent(); - if (!parentDir.IsValid()) { - return false; - } - // Update the definition in the parent directory top scope. This - // directory's scope was initialized by the closure of the parent - // scope, so we do not need to localize the definition first. - if (varDef) { - parentDir.SetDefinition(var, varDef); - } else { - parentDir.RemoveDefinition(var); - } - return true; - } - // First localize the definition in the current scope. - cmDefinitions::Raise(var, this->Position->Vars, this->Position->Root); - - // Now update the definition in the parent scope. - this->Position->Parent->Set(var, varDef); - return true; -} - -static const std::string cmPropertySentinal = std::string(); - -template -void InitializeContentFromParent(T& parentContent, T& thisContent, - U& parentBacktraces, U& thisBacktraces, - V& contentEndPosition) -{ - std::vector::const_iterator parentBegin = parentContent.begin(); - std::vector::const_iterator parentEnd = parentContent.end(); - - std::vector::const_reverse_iterator parentRbegin = - cmMakeReverseIterator(parentEnd); - std::vector::const_reverse_iterator parentRend = - parentContent.rend(); - parentRbegin = std::find(parentRbegin, parentRend, cmPropertySentinal); - std::vector::const_iterator parentIt = parentRbegin.base(); - - thisContent = std::vector(parentIt, parentEnd); - - std::vector::const_iterator btIt = - parentBacktraces.begin() + std::distance(parentBegin, parentIt); - std::vector::const_iterator btEnd = - parentBacktraces.end(); - - thisBacktraces = std::vector(btIt, btEnd); - - contentEndPosition = thisContent.size(); -} - -void cmStateSnapshot::SetDefaultDefinitions() -{ -/* Up to CMake 2.4 here only WIN32, UNIX and APPLE were set. - With CMake must separate between target and host platform. In most cases - the tests for WIN32, UNIX and APPLE will be for the target system, so an - additional set of variables for the host system is required -> - CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE. - WIN32, UNIX and APPLE are now set in the platform files in - Modules/Platforms/. - To keep cmake scripts (-P) and custom language and compiler modules - working, these variables are still also set here in this place, but they - will be reset in CMakeSystemSpecificInformation.cmake before the platform - files are executed. */ -#if defined(_WIN32) - this->SetDefinition("WIN32", "1"); - this->SetDefinition("CMAKE_HOST_WIN32", "1"); -#else - this->SetDefinition("UNIX", "1"); - this->SetDefinition("CMAKE_HOST_UNIX", "1"); -#endif -#if defined(__CYGWIN__) - std::string legacy; - if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) && - cmSystemTools::IsOn(legacy.c_str())) { - this->SetDefinition("WIN32", "1"); - this->SetDefinition("CMAKE_HOST_WIN32", "1"); - } -#endif -#if defined(__APPLE__) - this->SetDefinition("APPLE", "1"); - this->SetDefinition("CMAKE_HOST_APPLE", "1"); -#endif -#if defined(__sun__) - this->SetDefinition("CMAKE_HOST_SOLARIS", "1"); -#endif - - char temp[1024]; - sprintf(temp, "%d", cmVersion::GetMinorVersion()); - this->SetDefinition("CMAKE_MINOR_VERSION", temp); - sprintf(temp, "%d", cmVersion::GetMajorVersion()); - this->SetDefinition("CMAKE_MAJOR_VERSION", temp); - sprintf(temp, "%d", cmVersion::GetPatchVersion()); - this->SetDefinition("CMAKE_PATCH_VERSION", temp); - sprintf(temp, "%d", cmVersion::GetTweakVersion()); - this->SetDefinition("CMAKE_TWEAK_VERSION", temp); - this->SetDefinition("CMAKE_VERSION", cmVersion::GetCMakeVersion()); - - this->SetDefinition("CMAKE_FILES_DIRECTORY", - cmake::GetCMakeFilesDirectory()); - - // Setup the default include file regular expression (match everything). - this->Position->BuildSystemDirectory->Properties.SetProperty( - "INCLUDE_REGULAR_EXPRESSION", "^.*$"); -} - -void cmStateSnapshot::SetDirectoryDefinitions() -{ - this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); - this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", - this->State->GetSourceDirectory()); - this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); - this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", - this->State->GetBinaryDirectory()); -} - -void cmStateSnapshot::InitializeFromParent() -{ - cmStateDetail::PositionType parent = this->Position->DirectoryParent; - assert(this->Position->Vars.IsValid()); - assert(parent->Vars.IsValid()); - - *this->Position->Vars = - cmDefinitions::MakeClosure(parent->Vars, parent->Root); - - InitializeContentFromParent( - parent->BuildSystemDirectory->IncludeDirectories, - this->Position->BuildSystemDirectory->IncludeDirectories, - parent->BuildSystemDirectory->IncludeDirectoryBacktraces, - this->Position->BuildSystemDirectory->IncludeDirectoryBacktraces, - this->Position->IncludeDirectoryPosition); - - InitializeContentFromParent( - parent->BuildSystemDirectory->CompileDefinitions, - this->Position->BuildSystemDirectory->CompileDefinitions, - parent->BuildSystemDirectory->CompileDefinitionsBacktraces, - this->Position->BuildSystemDirectory->CompileDefinitionsBacktraces, - this->Position->CompileDefinitionsPosition); - - InitializeContentFromParent( - parent->BuildSystemDirectory->CompileOptions, - this->Position->BuildSystemDirectory->CompileOptions, - parent->BuildSystemDirectory->CompileOptionsBacktraces, - this->Position->BuildSystemDirectory->CompileOptionsBacktraces, - this->Position->CompileOptionsPosition); -} - -cmState* cmStateSnapshot::GetState() const -{ - return this->State; -} - -cmStateDirectory cmStateSnapshot::GetDirectory() const -{ - return cmStateDirectory(this->Position->BuildSystemDirectory, *this); -} - -void cmStateSnapshot::SetProjectName(const std::string& name) -{ - this->Position->BuildSystemDirectory->ProjectName = name; -} - -std::string cmStateSnapshot::GetProjectName() const -{ - return this->Position->BuildSystemDirectory->ProjectName; -} - -void cmStateSnapshot::InitializeFromParent_ForSubdirsCommand() -{ - std::string currentSrcDir = this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR"); - std::string currentBinDir = this->GetDefinition("CMAKE_CURRENT_BINARY_DIR"); - this->InitializeFromParent(); - this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); - this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); - - this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", currentSrcDir); - this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", currentBinDir); -} - -cmStateDirectory::cmStateDirectory( - cmLinkedTree::iterator iter, - const cmStateSnapshot& snapshot) - : DirectoryState(iter) - , Snapshot_(snapshot) -{ -} - -template -cmStringRange GetPropertyContent(T const& content, U contentEndPosition) -{ - std::vector::const_iterator end = - content.begin() + contentEndPosition; - - std::vector::const_reverse_iterator rbegin = - cmMakeReverseIterator(end); - rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); - - return cmMakeRange(rbegin.base(), end); -} - -template -cmBacktraceRange GetPropertyBacktraces(T const& content, U const& backtraces, - V contentEndPosition) -{ - std::vector::const_iterator entryEnd = - content.begin() + contentEndPosition; - - std::vector::const_reverse_iterator rbegin = - cmMakeReverseIterator(entryEnd); - rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); - - std::vector::const_iterator it = - backtraces.begin() + std::distance(content.begin(), rbegin.base()); - - std::vector::const_iterator end = backtraces.end(); - return cmMakeRange(it, end); -} - -template -void AppendEntry(T& content, U& backtraces, V& endContentPosition, - const std::string& value, const cmListFileBacktrace& lfbt) -{ - if (value.empty()) { - return; - } - - assert(endContentPosition == content.size()); - - content.push_back(value); - backtraces.push_back(lfbt); - - endContentPosition = content.size(); -} - -template -void SetContent(T& content, U& backtraces, V& endContentPosition, - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - assert(endContentPosition == content.size()); - - content.resize(content.size() + 2); - backtraces.resize(backtraces.size() + 2); - - content.back() = vec; - backtraces.back() = lfbt; - - endContentPosition = content.size(); -} - -template -void ClearContent(T& content, U& backtraces, V& endContentPosition) -{ - assert(endContentPosition == content.size()); - - content.resize(content.size() + 1); - backtraces.resize(backtraces.size() + 1); - - endContentPosition = content.size(); -} - -cmStringRange cmStateDirectory::GetIncludeDirectoriesEntries() const -{ - return GetPropertyContent( - this->DirectoryState->IncludeDirectories, - this->Snapshot_.Position->IncludeDirectoryPosition); -} - -cmBacktraceRange cmStateDirectory::GetIncludeDirectoriesEntryBacktraces() const -{ - return GetPropertyBacktraces( - this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition); -} - -void cmStateDirectory::AppendIncludeDirectoriesEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - AppendEntry(this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); -} - -void cmStateDirectory::PrependIncludeDirectoriesEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - std::vector::iterator entryEnd = - this->DirectoryState->IncludeDirectories.begin() + - this->Snapshot_.Position->IncludeDirectoryPosition; - - std::vector::reverse_iterator rend = - this->DirectoryState->IncludeDirectories.rend(); - std::vector::reverse_iterator rbegin = - cmMakeReverseIterator(entryEnd); - rbegin = std::find(rbegin, rend, cmPropertySentinal); - - std::vector::iterator entryIt = rbegin.base(); - std::vector::iterator entryBegin = - this->DirectoryState->IncludeDirectories.begin(); - - std::vector::iterator btIt = - this->DirectoryState->IncludeDirectoryBacktraces.begin() + - std::distance(entryBegin, entryIt); - - this->DirectoryState->IncludeDirectories.insert(entryIt, vec); - this->DirectoryState->IncludeDirectoryBacktraces.insert(btIt, lfbt); - - this->Snapshot_.Position->IncludeDirectoryPosition = - this->DirectoryState->IncludeDirectories.size(); -} - -void cmStateDirectory::SetIncludeDirectories(const std::string& vec, - const cmListFileBacktrace& lfbt) -{ - SetContent(this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); -} - -void cmStateDirectory::ClearIncludeDirectories() -{ - ClearContent(this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition); -} - -cmStringRange cmStateDirectory::GetCompileDefinitionsEntries() const -{ - return GetPropertyContent( - this->DirectoryState->CompileDefinitions, - this->Snapshot_.Position->CompileDefinitionsPosition); -} - -cmBacktraceRange cmStateDirectory::GetCompileDefinitionsEntryBacktraces() const -{ - return GetPropertyBacktraces( - this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition); -} - -void cmStateDirectory::AppendCompileDefinitionsEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - AppendEntry(this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); -} - -void cmStateDirectory::SetCompileDefinitions(const std::string& vec, - const cmListFileBacktrace& lfbt) -{ - SetContent(this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); -} - -void cmStateDirectory::ClearCompileDefinitions() -{ - ClearContent(this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition); -} - -cmStringRange cmStateDirectory::GetCompileOptionsEntries() const -{ - return GetPropertyContent(this->DirectoryState->CompileOptions, - this->Snapshot_.Position->CompileOptionsPosition); -} - -cmBacktraceRange cmStateDirectory::GetCompileOptionsEntryBacktraces() const -{ - return GetPropertyBacktraces( - this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition); -} - -void cmStateDirectory::AppendCompileOptionsEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - AppendEntry(this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); -} - -void cmStateDirectory::SetCompileOptions(const std::string& vec, - const cmListFileBacktrace& lfbt) -{ - SetContent(this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); -} - -void cmStateDirectory::ClearCompileOptions() -{ - ClearContent(this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition); -} - -bool cmStateSnapshot::StrictWeakOrder::operator()( - const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) const -{ - return lhs.Position.StrictWeakOrdered(rhs.Position); -} - -void cmStateDirectory::SetProperty(const std::string& prop, const char* value, - cmListFileBacktrace const& lfbt) -{ - if (prop == "INCLUDE_DIRECTORIES") { - if (!value) { - this->ClearIncludeDirectories(); - return; - } - this->SetIncludeDirectories(value, lfbt); - return; - } - if (prop == "COMPILE_OPTIONS") { - if (!value) { - this->ClearCompileOptions(); - return; - } - this->SetCompileOptions(value, lfbt); - return; - } - if (prop == "COMPILE_DEFINITIONS") { - if (!value) { - this->ClearCompileDefinitions(); - return; - } - this->SetCompileDefinitions(value, lfbt); - return; - } - - this->DirectoryState->Properties.SetProperty(prop, value); -} - -void cmStateDirectory::AppendProperty(const std::string& prop, - const char* value, bool asString, - cmListFileBacktrace const& lfbt) -{ - if (prop == "INCLUDE_DIRECTORIES") { - this->AppendIncludeDirectoriesEntry(value, lfbt); - return; - } - if (prop == "COMPILE_OPTIONS") { - this->AppendCompileOptionsEntry(value, lfbt); - return; - } - if (prop == "COMPILE_DEFINITIONS") { - this->AppendCompileDefinitionsEntry(value, lfbt); - return; - } - - this->DirectoryState->Properties.AppendProperty(prop, value, asString); -} - -const char* cmStateDirectory::GetProperty(const std::string& prop) const -{ - const bool chain = - this->Snapshot_.State->IsPropertyChained(prop, cmProperty::DIRECTORY); - return this->GetProperty(prop, chain); -} - -const char* cmStateDirectory::GetProperty(const std::string& prop, - bool chain) const -{ - static std::string output; - output = ""; - if (prop == "PARENT_DIRECTORY") { - cmStateSnapshot parent = this->Snapshot_.GetBuildsystemDirectoryParent(); - if (parent.IsValid()) { - return parent.GetDirectory().GetCurrentSource(); - } - return ""; - } - if (prop == kBINARY_DIR) { - output = this->GetCurrentBinary(); - return output.c_str(); - } - if (prop == kSOURCE_DIR) { - output = this->GetCurrentSource(); - return output.c_str(); - } - if (prop == kSUBDIRECTORIES) { - std::vector child_dirs; - std::vector const& children = - this->DirectoryState->Children; - for (std::vector::const_iterator ci = children.begin(); - ci != children.end(); ++ci) { - child_dirs.push_back(ci->GetDirectory().GetCurrentSource()); - } - output = cmJoin(child_dirs, ";"); - return output.c_str(); - } - if (prop == kBUILDSYSTEM_TARGETS) { - output = cmJoin(this->DirectoryState->NormalTargetNames, ";"); - return output.c_str(); - } - - if (prop == "LISTFILE_STACK") { - std::vector listFiles; - cmStateSnapshot snp = this->Snapshot_; - while (snp.IsValid()) { - listFiles.push_back(snp.GetExecutionListFile()); - snp = snp.GetCallStackParent(); - } - std::reverse(listFiles.begin(), listFiles.end()); - output = cmJoin(listFiles, ";"); - return output.c_str(); - } - if (prop == "CACHE_VARIABLES") { - output = cmJoin(this->Snapshot_.State->GetCacheEntryKeys(), ";"); - return output.c_str(); - } - if (prop == "VARIABLES") { - std::vector res = this->Snapshot_.ClosureKeys(); - std::vector cacheKeys = - this->Snapshot_.State->GetCacheEntryKeys(); - res.insert(res.end(), cacheKeys.begin(), cacheKeys.end()); - std::sort(res.begin(), res.end()); - output = cmJoin(res, ";"); - return output.c_str(); - } - if (prop == "INCLUDE_DIRECTORIES") { - output = cmJoin(this->GetIncludeDirectoriesEntries(), ";"); - return output.c_str(); - } - if (prop == "COMPILE_OPTIONS") { - output = cmJoin(this->GetCompileOptionsEntries(), ";"); - return output.c_str(); - } - if (prop == "COMPILE_DEFINITIONS") { - output = cmJoin(this->GetCompileDefinitionsEntries(), ";"); - return output.c_str(); - } - - const char* retVal = this->DirectoryState->Properties.GetPropertyValue(prop); - if (!retVal && chain) { - cmStateSnapshot parentSnapshot = - this->Snapshot_.GetBuildsystemDirectoryParent(); - if (parentSnapshot.IsValid()) { - return parentSnapshot.GetDirectory().GetProperty(prop, chain); - } - return this->Snapshot_.State->GetGlobalProperty(prop); - } - - return retVal; -} - -bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const -{ - return cmSystemTools::IsOn(this->GetProperty(prop)); -} - -std::vector cmStateDirectory::GetPropertyKeys() const -{ - std::vector keys; - keys.reserve(this->DirectoryState->Properties.size()); - for (cmPropertyMap::const_iterator it = - this->DirectoryState->Properties.begin(); - it != this->DirectoryState->Properties.end(); ++it) { - keys.push_back(it->first); - } - return keys; -} - -void cmStateDirectory::AddNormalTargetName(std::string const& name) -{ - this->DirectoryState->NormalTargetNames.push_back(name); -} - -bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) -{ - return lhs.Position == rhs.Position; -} - -bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) -{ - return lhs.Position != rhs.Position; -} - static bool ParseEntryWithoutType(const std::string& entry, std::string& var, std::string& value) { diff --git a/Source/cmState.h b/Source/cmState.h index 938c90b..6d74815 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -8,7 +8,6 @@ #include "cmAlgorithms.h" #include "cmDefinitions.h" #include "cmLinkedTree.h" -#include "cmPolicies.h" #include "cmProperty.h" #include "cmPropertyDefinitionMap.h" #include "cmPropertyMap.h" @@ -186,138 +185,4 @@ private: bool MSYSShell; }; -class cmStateSnapshot -{ -public: - cmStateSnapshot(cmState* state = CM_NULLPTR); - cmStateSnapshot(cmState* state, cmStateDetail::PositionType position); - - const char* GetDefinition(std::string const& name) const; - bool IsInitialized(std::string const& name) const; - void SetDefinition(std::string const& name, std::string const& value); - void RemoveDefinition(std::string const& name); - std::vector UnusedKeys() const; - std::vector ClosureKeys() const; - bool RaiseScope(std::string const& var, const char* varDef); - - void SetListFile(std::string const& listfile); - - std::string GetExecutionListFile() const; - - std::vector GetChildren(); - - bool IsValid() const; - cmStateSnapshot GetBuildsystemDirectoryParent() const; - cmStateSnapshot GetCallStackParent() const; - cmStateSnapshot GetCallStackBottom() const; - cmStateEnums::SnapshotType GetType() const; - - void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); - cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; - bool HasDefinedPolicyCMP0011(); - void PushPolicy(cmPolicies::PolicyMap entry, bool weak); - bool PopPolicy(); - bool CanPopPolicyScope(); - - cmState* GetState() const; - - cmStateDirectory GetDirectory() const; - - void SetProjectName(std::string const& name); - std::string GetProjectName() const; - - void InitializeFromParent_ForSubdirsCommand(); - - struct StrictWeakOrder - { - bool operator()(const cmStateSnapshot& lhs, - const cmStateSnapshot& rhs) const; - }; - - void SetDirectoryDefinitions(); - void SetDefaultDefinitions(); - -private: - friend bool operator==(const cmStateSnapshot& lhs, - const cmStateSnapshot& rhs); - friend bool operator!=(const cmStateSnapshot& lhs, - const cmStateSnapshot& rhs); - friend class cmState; - friend class cmStateDirectory; - friend struct StrictWeakOrder; - - void InitializeFromParent(); - - cmState* State; - cmStateDetail::PositionType Position; -}; - -class cmStateDirectory -{ - cmStateDirectory( - cmLinkedTree::iterator iter, - cmStateSnapshot const& snapshot); - -public: - const char* GetCurrentSource() const; - void SetCurrentSource(std::string const& dir); - const char* GetCurrentBinary() const; - void SetCurrentBinary(std::string const& dir); - - const char* GetRelativePathTopSource() const; - const char* GetRelativePathTopBinary() const; - void SetRelativePathTopSource(const char* dir); - void SetRelativePathTopBinary(const char* dir); - - cmStringRange GetIncludeDirectoriesEntries() const; - cmBacktraceRange GetIncludeDirectoriesEntryBacktraces() const; - void AppendIncludeDirectoriesEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void PrependIncludeDirectoriesEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetIncludeDirectories(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearIncludeDirectories(); - - cmStringRange GetCompileDefinitionsEntries() const; - cmBacktraceRange GetCompileDefinitionsEntryBacktraces() const; - void AppendCompileDefinitionsEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetCompileDefinitions(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearCompileDefinitions(); - - cmStringRange GetCompileOptionsEntries() const; - cmBacktraceRange GetCompileOptionsEntryBacktraces() const; - void AppendCompileOptionsEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetCompileOptions(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearCompileOptions(); - - void SetProperty(const std::string& prop, const char* value, - cmListFileBacktrace const& lfbt); - void AppendProperty(const std::string& prop, const char* value, - bool asString, cmListFileBacktrace const& lfbt); - const char* GetProperty(const std::string& prop) const; - const char* GetProperty(const std::string& prop, bool chain) const; - bool GetPropertyAsBool(const std::string& prop) const; - std::vector GetPropertyKeys() const; - - void AddNormalTargetName(std::string const& name); - -private: - void ComputeRelativePathTopSource(); - void ComputeRelativePathTopBinary(); - -private: - cmLinkedTree::iterator - DirectoryState; - cmStateSnapshot Snapshot_; - friend class cmStateSnapshot; -}; - -bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); -bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); - #endif diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx new file mode 100644 index 0000000..01e1e7e --- /dev/null +++ b/Source/cmStateDirectory.cxx @@ -0,0 +1,518 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmStateDirectory.h" +#include "cmState.h" +#include "cmStatePrivate.h" +#include "cmSystemTools.h" + +static std::string const kBINARY_DIR = "BINARY_DIR"; +static std::string const kBUILDSYSTEM_TARGETS = "BUILDSYSTEM_TARGETS"; +static std::string const kSOURCE_DIR = "SOURCE_DIR"; +static std::string const kSUBDIRECTORIES = "SUBDIRECTORIES"; + +void cmStateDirectory::ComputeRelativePathTopSource() +{ + // Relative path conversion inside the source tree is not used to + // construct relative paths passed to build tools so it is safe to use + // even when the source is a network path. + + cmStateSnapshot snapshot = this->Snapshot_; + std::vector snapshots; + snapshots.push_back(snapshot); + while (true) { + snapshot = snapshot.GetBuildsystemDirectoryParent(); + if (snapshot.IsValid()) { + snapshots.push_back(snapshot); + } else { + break; + } + } + + std::string result = snapshots.front().GetDirectory().GetCurrentSource(); + + for (std::vector::const_iterator it = snapshots.begin() + 1; + it != snapshots.end(); ++it) { + std::string currentSource = it->GetDirectory().GetCurrentSource(); + if (cmSystemTools::IsSubDirectory(result, currentSource)) { + result = currentSource; + } + } + this->DirectoryState->RelativePathTopSource = result; +} + +void cmStateDirectory::ComputeRelativePathTopBinary() +{ + cmStateSnapshot snapshot = this->Snapshot_; + std::vector snapshots; + snapshots.push_back(snapshot); + while (true) { + snapshot = snapshot.GetBuildsystemDirectoryParent(); + if (snapshot.IsValid()) { + snapshots.push_back(snapshot); + } else { + break; + } + } + + std::string result = snapshots.front().GetDirectory().GetCurrentBinary(); + + for (std::vector::const_iterator it = snapshots.begin() + 1; + it != snapshots.end(); ++it) { + std::string currentBinary = it->GetDirectory().GetCurrentBinary(); + if (cmSystemTools::IsSubDirectory(result, currentBinary)) { + result = currentBinary; + } + } + + // The current working directory on Windows cannot be a network + // path. Therefore relative paths cannot work when the binary tree + // is a network path. + if (result.size() < 2 || result.substr(0, 2) != "//") { + this->DirectoryState->RelativePathTopBinary = result; + } else { + this->DirectoryState->RelativePathTopBinary = ""; + } +} + +const char* cmStateDirectory::GetCurrentSource() const +{ + return this->DirectoryState->Location.c_str(); +} + +void cmStateDirectory::SetCurrentSource(std::string const& dir) +{ + std::string& loc = this->DirectoryState->Location; + loc = dir; + cmSystemTools::ConvertToUnixSlashes(loc); + loc = cmSystemTools::CollapseFullPath(loc); + + this->ComputeRelativePathTopSource(); + + this->Snapshot_.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", loc); +} + +const char* cmStateDirectory::GetCurrentBinary() const +{ + return this->DirectoryState->OutputLocation.c_str(); +} + +void cmStateDirectory::SetCurrentBinary(std::string const& dir) +{ + std::string& loc = this->DirectoryState->OutputLocation; + loc = dir; + cmSystemTools::ConvertToUnixSlashes(loc); + loc = cmSystemTools::CollapseFullPath(loc); + + this->ComputeRelativePathTopBinary(); + + this->Snapshot_.SetDefinition("CMAKE_CURRENT_BINARY_DIR", loc); +} + +const char* cmStateDirectory::GetRelativePathTopSource() const +{ + return this->DirectoryState->RelativePathTopSource.c_str(); +} + +const char* cmStateDirectory::GetRelativePathTopBinary() const +{ + return this->DirectoryState->RelativePathTopBinary.c_str(); +} + +void cmStateDirectory::SetRelativePathTopSource(const char* dir) +{ + this->DirectoryState->RelativePathTopSource = dir; +} + +void cmStateDirectory::SetRelativePathTopBinary(const char* dir) +{ + this->DirectoryState->RelativePathTopBinary = dir; +} + +cmStateDirectory::cmStateDirectory( + cmLinkedTree::iterator iter, + const cmStateSnapshot& snapshot) + : DirectoryState(iter) + , Snapshot_(snapshot) +{ +} + +template +cmStringRange GetPropertyContent(T const& content, U contentEndPosition) +{ + std::vector::const_iterator end = + content.begin() + contentEndPosition; + + std::vector::const_reverse_iterator rbegin = + cmMakeReverseIterator(end); + rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); + + return cmMakeRange(rbegin.base(), end); +} + +template +cmBacktraceRange GetPropertyBacktraces(T const& content, U const& backtraces, + V contentEndPosition) +{ + std::vector::const_iterator entryEnd = + content.begin() + contentEndPosition; + + std::vector::const_reverse_iterator rbegin = + cmMakeReverseIterator(entryEnd); + rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); + + std::vector::const_iterator it = + backtraces.begin() + std::distance(content.begin(), rbegin.base()); + + std::vector::const_iterator end = backtraces.end(); + return cmMakeRange(it, end); +} + +template +void AppendEntry(T& content, U& backtraces, V& endContentPosition, + const std::string& value, const cmListFileBacktrace& lfbt) +{ + if (value.empty()) { + return; + } + + assert(endContentPosition == content.size()); + + content.push_back(value); + backtraces.push_back(lfbt); + + endContentPosition = content.size(); +} + +template +void SetContent(T& content, U& backtraces, V& endContentPosition, + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + assert(endContentPosition == content.size()); + + content.resize(content.size() + 2); + backtraces.resize(backtraces.size() + 2); + + content.back() = vec; + backtraces.back() = lfbt; + + endContentPosition = content.size(); +} + +template +void ClearContent(T& content, U& backtraces, V& endContentPosition) +{ + assert(endContentPosition == content.size()); + + content.resize(content.size() + 1); + backtraces.resize(backtraces.size() + 1); + + endContentPosition = content.size(); +} + +cmStringRange cmStateDirectory::GetIncludeDirectoriesEntries() const +{ + return GetPropertyContent( + this->DirectoryState->IncludeDirectories, + this->Snapshot_.Position->IncludeDirectoryPosition); +} + +cmBacktraceRange cmStateDirectory::GetIncludeDirectoriesEntryBacktraces() const +{ + return GetPropertyBacktraces( + this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition); +} + +void cmStateDirectory::AppendIncludeDirectoriesEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + AppendEntry(this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); +} + +void cmStateDirectory::PrependIncludeDirectoriesEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + std::vector::iterator entryEnd = + this->DirectoryState->IncludeDirectories.begin() + + this->Snapshot_.Position->IncludeDirectoryPosition; + + std::vector::reverse_iterator rend = + this->DirectoryState->IncludeDirectories.rend(); + std::vector::reverse_iterator rbegin = + cmMakeReverseIterator(entryEnd); + rbegin = std::find(rbegin, rend, cmPropertySentinal); + + std::vector::iterator entryIt = rbegin.base(); + std::vector::iterator entryBegin = + this->DirectoryState->IncludeDirectories.begin(); + + std::vector::iterator btIt = + this->DirectoryState->IncludeDirectoryBacktraces.begin() + + std::distance(entryBegin, entryIt); + + this->DirectoryState->IncludeDirectories.insert(entryIt, vec); + this->DirectoryState->IncludeDirectoryBacktraces.insert(btIt, lfbt); + + this->Snapshot_.Position->IncludeDirectoryPosition = + this->DirectoryState->IncludeDirectories.size(); +} + +void cmStateDirectory::SetIncludeDirectories(const std::string& vec, + const cmListFileBacktrace& lfbt) +{ + SetContent(this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); +} + +void cmStateDirectory::ClearIncludeDirectories() +{ + ClearContent(this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition); +} + +cmStringRange cmStateDirectory::GetCompileDefinitionsEntries() const +{ + return GetPropertyContent( + this->DirectoryState->CompileDefinitions, + this->Snapshot_.Position->CompileDefinitionsPosition); +} + +cmBacktraceRange cmStateDirectory::GetCompileDefinitionsEntryBacktraces() const +{ + return GetPropertyBacktraces( + this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition); +} + +void cmStateDirectory::AppendCompileDefinitionsEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + AppendEntry(this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); +} + +void cmStateDirectory::SetCompileDefinitions(const std::string& vec, + const cmListFileBacktrace& lfbt) +{ + SetContent(this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); +} + +void cmStateDirectory::ClearCompileDefinitions() +{ + ClearContent(this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition); +} + +cmStringRange cmStateDirectory::GetCompileOptionsEntries() const +{ + return GetPropertyContent(this->DirectoryState->CompileOptions, + this->Snapshot_.Position->CompileOptionsPosition); +} + +cmBacktraceRange cmStateDirectory::GetCompileOptionsEntryBacktraces() const +{ + return GetPropertyBacktraces( + this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition); +} + +void cmStateDirectory::AppendCompileOptionsEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + AppendEntry(this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); +} + +void cmStateDirectory::SetCompileOptions(const std::string& vec, + const cmListFileBacktrace& lfbt) +{ + SetContent(this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); +} + +void cmStateDirectory::ClearCompileOptions() +{ + ClearContent(this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition); +} + +void cmStateDirectory::SetProperty(const std::string& prop, const char* value, + cmListFileBacktrace const& lfbt) +{ + if (prop == "INCLUDE_DIRECTORIES") { + if (!value) { + this->ClearIncludeDirectories(); + return; + } + this->SetIncludeDirectories(value, lfbt); + return; + } + if (prop == "COMPILE_OPTIONS") { + if (!value) { + this->ClearCompileOptions(); + return; + } + this->SetCompileOptions(value, lfbt); + return; + } + if (prop == "COMPILE_DEFINITIONS") { + if (!value) { + this->ClearCompileDefinitions(); + return; + } + this->SetCompileDefinitions(value, lfbt); + return; + } + + this->DirectoryState->Properties.SetProperty(prop, value); +} + +void cmStateDirectory::AppendProperty(const std::string& prop, + const char* value, bool asString, + cmListFileBacktrace const& lfbt) +{ + if (prop == "INCLUDE_DIRECTORIES") { + this->AppendIncludeDirectoriesEntry(value, lfbt); + return; + } + if (prop == "COMPILE_OPTIONS") { + this->AppendCompileOptionsEntry(value, lfbt); + return; + } + if (prop == "COMPILE_DEFINITIONS") { + this->AppendCompileDefinitionsEntry(value, lfbt); + return; + } + + this->DirectoryState->Properties.AppendProperty(prop, value, asString); +} + +const char* cmStateDirectory::GetProperty(const std::string& prop) const +{ + const bool chain = + this->Snapshot_.State->IsPropertyChained(prop, cmProperty::DIRECTORY); + return this->GetProperty(prop, chain); +} + +const char* cmStateDirectory::GetProperty(const std::string& prop, + bool chain) const +{ + static std::string output; + output = ""; + if (prop == "PARENT_DIRECTORY") { + cmStateSnapshot parent = this->Snapshot_.GetBuildsystemDirectoryParent(); + if (parent.IsValid()) { + return parent.GetDirectory().GetCurrentSource(); + } + return ""; + } + if (prop == kBINARY_DIR) { + output = this->GetCurrentBinary(); + return output.c_str(); + } + if (prop == kSOURCE_DIR) { + output = this->GetCurrentSource(); + return output.c_str(); + } + if (prop == kSUBDIRECTORIES) { + std::vector child_dirs; + std::vector const& children = + this->DirectoryState->Children; + for (std::vector::const_iterator ci = children.begin(); + ci != children.end(); ++ci) { + child_dirs.push_back(ci->GetDirectory().GetCurrentSource()); + } + output = cmJoin(child_dirs, ";"); + return output.c_str(); + } + if (prop == kBUILDSYSTEM_TARGETS) { + output = cmJoin(this->DirectoryState->NormalTargetNames, ";"); + return output.c_str(); + } + + if (prop == "LISTFILE_STACK") { + std::vector listFiles; + cmStateSnapshot snp = this->Snapshot_; + while (snp.IsValid()) { + listFiles.push_back(snp.GetExecutionListFile()); + snp = snp.GetCallStackParent(); + } + std::reverse(listFiles.begin(), listFiles.end()); + output = cmJoin(listFiles, ";"); + return output.c_str(); + } + if (prop == "CACHE_VARIABLES") { + output = cmJoin(this->Snapshot_.State->GetCacheEntryKeys(), ";"); + return output.c_str(); + } + if (prop == "VARIABLES") { + std::vector res = this->Snapshot_.ClosureKeys(); + std::vector cacheKeys = + this->Snapshot_.State->GetCacheEntryKeys(); + res.insert(res.end(), cacheKeys.begin(), cacheKeys.end()); + std::sort(res.begin(), res.end()); + output = cmJoin(res, ";"); + return output.c_str(); + } + if (prop == "INCLUDE_DIRECTORIES") { + output = cmJoin(this->GetIncludeDirectoriesEntries(), ";"); + return output.c_str(); + } + if (prop == "COMPILE_OPTIONS") { + output = cmJoin(this->GetCompileOptionsEntries(), ";"); + return output.c_str(); + } + if (prop == "COMPILE_DEFINITIONS") { + output = cmJoin(this->GetCompileDefinitionsEntries(), ";"); + return output.c_str(); + } + + const char* retVal = this->DirectoryState->Properties.GetPropertyValue(prop); + if (!retVal && chain) { + cmStateSnapshot parentSnapshot = + this->Snapshot_.GetBuildsystemDirectoryParent(); + if (parentSnapshot.IsValid()) { + return parentSnapshot.GetDirectory().GetProperty(prop, chain); + } + return this->Snapshot_.State->GetGlobalProperty(prop); + } + + return retVal; +} + +bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const +{ + return cmSystemTools::IsOn(this->GetProperty(prop)); +} + +std::vector cmStateDirectory::GetPropertyKeys() const +{ + std::vector keys; + keys.reserve(this->DirectoryState->Properties.size()); + for (cmPropertyMap::const_iterator it = + this->DirectoryState->Properties.begin(); + it != this->DirectoryState->Properties.end(); ++it) { + keys.push_back(it->first); + } + return keys; +} + +void cmStateDirectory::AddNormalTargetName(std::string const& name) +{ + this->DirectoryState->NormalTargetNames.push_back(name); +} diff --git a/Source/cmStateDirectory.h b/Source/cmStateDirectory.h new file mode 100644 index 0000000..12f5083 --- /dev/null +++ b/Source/cmStateDirectory.h @@ -0,0 +1,82 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmStateDirectory_h +#define cmStateDirectory_h + +#include // IWYU pragma: keep + +#include +#include + +#include "cmAlgorithms.h" +#include "cmListFileCache.h" +#include "cmStateSnapshot.h" +#include "cmStateTypes.h" + +class cmStateDirectory +{ + cmStateDirectory( + cmLinkedTree::iterator iter, + cmStateSnapshot const& snapshot); + +public: + const char* GetCurrentSource() const; + void SetCurrentSource(std::string const& dir); + const char* GetCurrentBinary() const; + void SetCurrentBinary(std::string const& dir); + + const char* GetRelativePathTopSource() const; + const char* GetRelativePathTopBinary() const; + void SetRelativePathTopSource(const char* dir); + void SetRelativePathTopBinary(const char* dir); + + cmStringRange GetIncludeDirectoriesEntries() const; + cmBacktraceRange GetIncludeDirectoriesEntryBacktraces() const; + void AppendIncludeDirectoriesEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void PrependIncludeDirectoriesEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetIncludeDirectories(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearIncludeDirectories(); + + cmStringRange GetCompileDefinitionsEntries() const; + cmBacktraceRange GetCompileDefinitionsEntryBacktraces() const; + void AppendCompileDefinitionsEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetCompileDefinitions(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearCompileDefinitions(); + + cmStringRange GetCompileOptionsEntries() const; + cmBacktraceRange GetCompileOptionsEntryBacktraces() const; + void AppendCompileOptionsEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetCompileOptions(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearCompileOptions(); + + void SetProperty(const std::string& prop, const char* value, + cmListFileBacktrace const& lfbt); + void AppendProperty(const std::string& prop, const char* value, + bool asString, cmListFileBacktrace const& lfbt); + const char* GetProperty(const std::string& prop) const; + const char* GetProperty(const std::string& prop, bool chain) const; + bool GetPropertyAsBool(const std::string& prop) const; + std::vector GetPropertyKeys() const; + + void AddNormalTargetName(std::string const& name); + +private: + void ComputeRelativePathTopSource(); + void ComputeRelativePathTopBinary(); + +private: + cmLinkedTree::iterator + DirectoryState; + cmStateSnapshot Snapshot_; + friend class cmStateSnapshot; +}; + +#endif \ No newline at end of file diff --git a/Source/cmStatePrivate.h b/Source/cmStatePrivate.h new file mode 100644 index 0000000..8daa3cf --- /dev/null +++ b/Source/cmStatePrivate.h @@ -0,0 +1,94 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmStatePrivate_h +#define cmStatePrivate_h + +#include // IWYU pragma: keep + +#include +#include + +#include "cmDefinitions.h" +#include "cmLinkedTree.h" +#include "cmListFileCache.h" +#include "cmPropertyMap.h" +#include "cmStateTypes.h" + +static const std::string cmPropertySentinal = std::string(); + +struct cmStateDetail::SnapshotDataType +{ + cmStateDetail::PositionType ScopeParent; + cmStateDetail::PositionType DirectoryParent; + cmLinkedTree::iterator Policies; + cmLinkedTree::iterator PolicyRoot; + cmLinkedTree::iterator PolicyScope; + cmStateEnums::SnapshotType SnapshotType; + bool Keep; + cmLinkedTree::iterator ExecutionListFile; + cmLinkedTree::iterator + BuildSystemDirectory; + cmLinkedTree::iterator Vars; + cmLinkedTree::iterator Root; + cmLinkedTree::iterator Parent; + std::vector::size_type IncludeDirectoryPosition; + std::vector::size_type CompileDefinitionsPosition; + std::vector::size_type CompileOptionsPosition; +}; + +struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap +{ + typedef cmPolicies::PolicyMap derived; + PolicyStackEntry(bool w = false) + : derived() + , Weak(w) + { + } + PolicyStackEntry(derived const& d, bool w) + : derived(d) + , Weak(w) + { + } + PolicyStackEntry(PolicyStackEntry const& r) + : derived(r) + , Weak(r.Weak) + { + } + bool Weak; +}; + +struct cmStateDetail::BuildsystemDirectoryStateType +{ + cmStateDetail::PositionType DirectoryEnd; + + std::string Location; + std::string OutputLocation; + + // The top-most directories for relative path conversion. Both the + // source and destination location of a relative path conversion + // must be underneath one of these directories (both under source or + // both under binary) in order for the relative path to be evaluated + // safely by the build tools. + std::string RelativePathTopSource; + std::string RelativePathTopBinary; + + std::vector IncludeDirectories; + std::vector IncludeDirectoryBacktraces; + + std::vector CompileDefinitions; + std::vector CompileDefinitionsBacktraces; + + std::vector CompileOptions; + std::vector CompileOptionsBacktraces; + + std::vector NormalTargetNames; + + std::string ProjectName; + + cmPropertyMap Properties; + + std::vector Children; +}; + +#endif diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx new file mode 100644 index 0000000..7f86221 --- /dev/null +++ b/Source/cmStateSnapshot.cxx @@ -0,0 +1,415 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmStateSnapshot.h" + +#include "cmState.h" +#include "cmStateDirectory.h" +#include "cmStatePrivate.h" +#include "cmSystemTools.h" +#include "cmVersion.h" +#include "cmake.h" + +cmStateSnapshot::cmStateSnapshot(cmState* state) + : State(state) + , Position() +{ +} + +std::vector cmStateSnapshot::GetChildren() +{ + return this->Position->BuildSystemDirectory->Children; +} + +cmStateSnapshot::cmStateSnapshot(cmState* state, + cmStateDetail::PositionType position) + : State(state) + , Position(position) +{ +} + +cmStateEnums::SnapshotType cmStateSnapshot::GetType() const +{ + return this->Position->SnapshotType; +} + +void cmStateSnapshot::SetListFile(const std::string& listfile) +{ + *this->Position->ExecutionListFile = listfile; +} + +std::string cmStateSnapshot::GetExecutionListFile() const +{ + return *this->Position->ExecutionListFile; +} + +bool cmStateSnapshot::IsValid() const +{ + return this->State && this->Position.IsValid() + ? this->Position != this->State->SnapshotData.Root() + : false; +} + +cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const +{ + cmStateSnapshot snapshot; + if (!this->State || this->Position == this->State->SnapshotData.Root()) { + return snapshot; + } + cmStateDetail::PositionType parentPos = this->Position->DirectoryParent; + if (parentPos != this->State->SnapshotData.Root()) { + snapshot = cmStateSnapshot(this->State, + parentPos->BuildSystemDirectory->DirectoryEnd); + } + + return snapshot; +} + +cmStateSnapshot cmStateSnapshot::GetCallStackParent() const +{ + assert(this->State); + assert(this->Position != this->State->SnapshotData.Root()); + + cmStateSnapshot snapshot; + cmStateDetail::PositionType parentPos = this->Position; + while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || + parentPos->SnapshotType == cmStateEnums::VariableScopeType) { + ++parentPos; + } + if (parentPos->SnapshotType == cmStateEnums::BuildsystemDirectoryType || + parentPos->SnapshotType == cmStateEnums::BaseType) { + return snapshot; + } + + ++parentPos; + while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || + parentPos->SnapshotType == cmStateEnums::VariableScopeType) { + ++parentPos; + } + + if (parentPos == this->State->SnapshotData.Root()) { + return snapshot; + } + + snapshot = cmStateSnapshot(this->State, parentPos); + return snapshot; +} + +cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const +{ + assert(this->State); + assert(this->Position != this->State->SnapshotData.Root()); + + cmStateDetail::PositionType pos = this->Position; + while (pos->SnapshotType != cmStateEnums::BaseType && + pos->SnapshotType != cmStateEnums::BuildsystemDirectoryType && + pos != this->State->SnapshotData.Root()) { + ++pos; + } + return cmStateSnapshot(this->State, pos); +} + +void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) +{ + cmStateDetail::PositionType pos = this->Position; + pos->Policies = this->State->PolicyStack.Push( + pos->Policies, cmStateDetail::PolicyStackEntry(entry, weak)); +} + +bool cmStateSnapshot::PopPolicy() +{ + cmStateDetail::PositionType pos = this->Position; + if (pos->Policies == pos->PolicyScope) { + return false; + } + pos->Policies = this->State->PolicyStack.Pop(pos->Policies); + return true; +} + +bool cmStateSnapshot::CanPopPolicyScope() +{ + return this->Position->Policies == this->Position->PolicyScope; +} + +void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id, + cmPolicies::PolicyStatus status) +{ + // Update the policy stack from the top to the top-most strong entry. + bool previous_was_weak = true; + for (cmLinkedTree::iterator psi = + this->Position->Policies; + previous_was_weak && psi != this->Position->PolicyRoot; ++psi) { + psi->Set(id, status); + previous_was_weak = psi->Weak; + } +} + +cmPolicies::PolicyStatus cmStateSnapshot::GetPolicy( + cmPolicies::PolicyID id) const +{ + cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id); + + if (status == cmPolicies::REQUIRED_ALWAYS || + status == cmPolicies::REQUIRED_IF_USED) { + return status; + } + + cmLinkedTree::iterator dir = + this->Position->BuildSystemDirectory; + + while (true) { + assert(dir.IsValid()); + cmLinkedTree::iterator leaf = + dir->DirectoryEnd->Policies; + cmLinkedTree::iterator root = + dir->DirectoryEnd->PolicyRoot; + for (; leaf != root; ++leaf) { + if (leaf->IsDefined(id)) { + status = leaf->Get(id); + return status; + } + } + cmStateDetail::PositionType e = dir->DirectoryEnd; + cmStateDetail::PositionType p = e->DirectoryParent; + if (p == this->State->SnapshotData.Root()) { + break; + } + dir = p->BuildSystemDirectory; + } + return status; +} + +bool cmStateSnapshot::HasDefinedPolicyCMP0011() +{ + return !this->Position->Policies->IsEmpty(); +} + +const char* cmStateSnapshot::GetDefinition(std::string const& name) const +{ + assert(this->Position->Vars.IsValid()); + return cmDefinitions::Get(name, this->Position->Vars, this->Position->Root); +} + +bool cmStateSnapshot::IsInitialized(std::string const& name) const +{ + return cmDefinitions::HasKey(name, this->Position->Vars, + this->Position->Root); +} + +void cmStateSnapshot::SetDefinition(std::string const& name, + std::string const& value) +{ + this->Position->Vars->Set(name, value.c_str()); +} + +void cmStateSnapshot::RemoveDefinition(std::string const& name) +{ + this->Position->Vars->Set(name, CM_NULLPTR); +} + +std::vector cmStateSnapshot::UnusedKeys() const +{ + return this->Position->Vars->UnusedKeys(); +} + +std::vector cmStateSnapshot::ClosureKeys() const +{ + return cmDefinitions::ClosureKeys(this->Position->Vars, + this->Position->Root); +} + +bool cmStateSnapshot::RaiseScope(std::string const& var, const char* varDef) +{ + if (this->Position->ScopeParent == this->Position->DirectoryParent) { + cmStateSnapshot parentDir = this->GetBuildsystemDirectoryParent(); + if (!parentDir.IsValid()) { + return false; + } + // Update the definition in the parent directory top scope. This + // directory's scope was initialized by the closure of the parent + // scope, so we do not need to localize the definition first. + if (varDef) { + parentDir.SetDefinition(var, varDef); + } else { + parentDir.RemoveDefinition(var); + } + return true; + } + // First localize the definition in the current scope. + cmDefinitions::Raise(var, this->Position->Vars, this->Position->Root); + + // Now update the definition in the parent scope. + this->Position->Parent->Set(var, varDef); + return true; +} + +template +void InitializeContentFromParent(T& parentContent, T& thisContent, + U& parentBacktraces, U& thisBacktraces, + V& contentEndPosition) +{ + std::vector::const_iterator parentBegin = parentContent.begin(); + std::vector::const_iterator parentEnd = parentContent.end(); + + std::vector::const_reverse_iterator parentRbegin = + cmMakeReverseIterator(parentEnd); + std::vector::const_reverse_iterator parentRend = + parentContent.rend(); + parentRbegin = std::find(parentRbegin, parentRend, cmPropertySentinal); + std::vector::const_iterator parentIt = parentRbegin.base(); + + thisContent = std::vector(parentIt, parentEnd); + + std::vector::const_iterator btIt = + parentBacktraces.begin() + std::distance(parentBegin, parentIt); + std::vector::const_iterator btEnd = + parentBacktraces.end(); + + thisBacktraces = std::vector(btIt, btEnd); + + contentEndPosition = thisContent.size(); +} + +void cmStateSnapshot::SetDefaultDefinitions() +{ +/* Up to CMake 2.4 here only WIN32, UNIX and APPLE were set. + With CMake must separate between target and host platform. In most cases + the tests for WIN32, UNIX and APPLE will be for the target system, so an + additional set of variables for the host system is required -> + CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE. + WIN32, UNIX and APPLE are now set in the platform files in + Modules/Platforms/. + To keep cmake scripts (-P) and custom language and compiler modules + working, these variables are still also set here in this place, but they + will be reset in CMakeSystemSpecificInformation.cmake before the platform + files are executed. */ +#if defined(_WIN32) + this->SetDefinition("WIN32", "1"); + this->SetDefinition("CMAKE_HOST_WIN32", "1"); +#else + this->SetDefinition("UNIX", "1"); + this->SetDefinition("CMAKE_HOST_UNIX", "1"); +#endif +#if defined(__CYGWIN__) + std::string legacy; + if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) && + cmSystemTools::IsOn(legacy.c_str())) { + this->SetDefinition("WIN32", "1"); + this->SetDefinition("CMAKE_HOST_WIN32", "1"); + } +#endif +#if defined(__APPLE__) + this->SetDefinition("APPLE", "1"); + this->SetDefinition("CMAKE_HOST_APPLE", "1"); +#endif +#if defined(__sun__) + this->SetDefinition("CMAKE_HOST_SOLARIS", "1"); +#endif + + char temp[1024]; + sprintf(temp, "%d", cmVersion::GetMinorVersion()); + this->SetDefinition("CMAKE_MINOR_VERSION", temp); + sprintf(temp, "%d", cmVersion::GetMajorVersion()); + this->SetDefinition("CMAKE_MAJOR_VERSION", temp); + sprintf(temp, "%d", cmVersion::GetPatchVersion()); + this->SetDefinition("CMAKE_PATCH_VERSION", temp); + sprintf(temp, "%d", cmVersion::GetTweakVersion()); + this->SetDefinition("CMAKE_TWEAK_VERSION", temp); + this->SetDefinition("CMAKE_VERSION", cmVersion::GetCMakeVersion()); + + this->SetDefinition("CMAKE_FILES_DIRECTORY", + cmake::GetCMakeFilesDirectory()); + + // Setup the default include file regular expression (match everything). + this->Position->BuildSystemDirectory->Properties.SetProperty( + "INCLUDE_REGULAR_EXPRESSION", "^.*$"); +} + +void cmStateSnapshot::SetDirectoryDefinitions() +{ + this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); + this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", + this->State->GetSourceDirectory()); + this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); + this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", + this->State->GetBinaryDirectory()); +} + +void cmStateSnapshot::InitializeFromParent() +{ + cmStateDetail::PositionType parent = this->Position->DirectoryParent; + assert(this->Position->Vars.IsValid()); + assert(parent->Vars.IsValid()); + + *this->Position->Vars = + cmDefinitions::MakeClosure(parent->Vars, parent->Root); + + InitializeContentFromParent( + parent->BuildSystemDirectory->IncludeDirectories, + this->Position->BuildSystemDirectory->IncludeDirectories, + parent->BuildSystemDirectory->IncludeDirectoryBacktraces, + this->Position->BuildSystemDirectory->IncludeDirectoryBacktraces, + this->Position->IncludeDirectoryPosition); + + InitializeContentFromParent( + parent->BuildSystemDirectory->CompileDefinitions, + this->Position->BuildSystemDirectory->CompileDefinitions, + parent->BuildSystemDirectory->CompileDefinitionsBacktraces, + this->Position->BuildSystemDirectory->CompileDefinitionsBacktraces, + this->Position->CompileDefinitionsPosition); + + InitializeContentFromParent( + parent->BuildSystemDirectory->CompileOptions, + this->Position->BuildSystemDirectory->CompileOptions, + parent->BuildSystemDirectory->CompileOptionsBacktraces, + this->Position->BuildSystemDirectory->CompileOptionsBacktraces, + this->Position->CompileOptionsPosition); +} + +cmState* cmStateSnapshot::GetState() const +{ + return this->State; +} + +cmStateDirectory cmStateSnapshot::GetDirectory() const +{ + return cmStateDirectory(this->Position->BuildSystemDirectory, *this); +} + +void cmStateSnapshot::SetProjectName(const std::string& name) +{ + this->Position->BuildSystemDirectory->ProjectName = name; +} + +std::string cmStateSnapshot::GetProjectName() const +{ + return this->Position->BuildSystemDirectory->ProjectName; +} + +void cmStateSnapshot::InitializeFromParent_ForSubdirsCommand() +{ + std::string currentSrcDir = this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR"); + std::string currentBinDir = this->GetDefinition("CMAKE_CURRENT_BINARY_DIR"); + this->InitializeFromParent(); + this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); + this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); + + this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", currentSrcDir); + this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", currentBinDir); +} + +bool cmStateSnapshot::StrictWeakOrder::operator()( + const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) const +{ + return lhs.Position.StrictWeakOrdered(rhs.Position); +} + +bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) +{ + return lhs.Position == rhs.Position; +} + +bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) +{ + return lhs.Position != rhs.Position; +} diff --git a/Source/cmStateSnapshot.h b/Source/cmStateSnapshot.h new file mode 100644 index 0000000..63b581d --- /dev/null +++ b/Source/cmStateSnapshot.h @@ -0,0 +1,88 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmStateSnapshot_h +#define cmStateSnapshot_h + +#include // IWYU pragma: keep + +#include +#include +#include + +#include "cmPolicies.h" +#include "cmStateTypes.h" + +class cmState; +class cmStateDirectory; + +class cmStateSnapshot +{ +public: + cmStateSnapshot(cmState* state = CM_NULLPTR); + cmStateSnapshot(cmState* state, cmStateDetail::PositionType position); + + const char* GetDefinition(std::string const& name) const; + bool IsInitialized(std::string const& name) const; + void SetDefinition(std::string const& name, std::string const& value); + void RemoveDefinition(std::string const& name); + std::vector UnusedKeys() const; + std::vector ClosureKeys() const; + bool RaiseScope(std::string const& var, const char* varDef); + + void SetListFile(std::string const& listfile); + + std::string GetExecutionListFile() const; + + std::vector GetChildren(); + + bool IsValid() const; + cmStateSnapshot GetBuildsystemDirectoryParent() const; + cmStateSnapshot GetCallStackParent() const; + cmStateSnapshot GetCallStackBottom() const; + cmStateEnums::SnapshotType GetType() const; + + void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); + cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; + bool HasDefinedPolicyCMP0011(); + void PushPolicy(cmPolicies::PolicyMap entry, bool weak); + bool PopPolicy(); + bool CanPopPolicyScope(); + + cmState* GetState() const; + + cmStateDirectory GetDirectory() const; + + void SetProjectName(std::string const& name); + std::string GetProjectName() const; + + void InitializeFromParent_ForSubdirsCommand(); + + struct StrictWeakOrder + { + bool operator()(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs) const; + }; + + void SetDirectoryDefinitions(); + void SetDefaultDefinitions(); + +private: + friend bool operator==(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs); + friend bool operator!=(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs); + friend class cmState; + friend class cmStateDirectory; + friend struct StrictWeakOrder; + + void InitializeFromParent(); + + cmState* State; + cmStateDetail::PositionType Position; +}; + +bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); +bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); + +#endif diff --git a/Source/cmake.h b/Source/cmake.h index 0a577ad..cd00c61 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -7,7 +7,7 @@ #include "cmInstalledFile.h" #include "cmListFileCache.h" -#include "cmState.h" +#include "cmStateSnapshot.h" #include #include diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 912acdb..6e9ad6c 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -7,7 +7,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmQtAutoGenerators.h" -#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include "cmUtils.hxx" #include "cmVersion.h" diff --git a/bootstrap b/bootstrap index d537211..44afbb2 100755 --- a/bootstrap +++ b/bootstrap @@ -292,6 +292,8 @@ CMAKE_CXX_SOURCES="\ cmSourceFile \ cmSourceFileLocation \ cmState \ + cmStateDirectory \ + cmStateSnapshot \ cmSystemTools \ cmTestGenerator \ cmVersion \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d494d534858f0189f208f6e5d21cfd9c59412a30 commit d494d534858f0189f208f6e5d21cfd9c59412a30 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:48 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 23:45:01 2016 +0200 cmState: Port dependents to new cmStateTypes header diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 71892ba..3124f81 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -360,6 +360,7 @@ set(SRCS cmSourceGroup.h cmState.cxx cmState.h + cmStateTypes.h cmSystemTools.cxx cmSystemTools.h cmTarget.cxx diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index d4135ce..09b9c0d 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -8,7 +8,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmXMLSafe.h" #include "cm_auto_ptr.hxx" #include "cmake.h" diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index a3281ab..e3adf6b 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -9,7 +9,7 @@ #include "cmDocumentationEntry.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTypeMacro.h" #include "cm_auto_ptr.hxx" diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index e5c50b2..224681a 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -7,7 +7,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index e9980d0..fa816a6 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -21,7 +21,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 06cd77f..a114755 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -7,7 +7,7 @@ #include "cmCTestScriptHandler.h" #include "cmCurl.h" #include "cmGeneratedFileStream.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLParser.h" #include "cmake.h" diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 0d0237f..09efafb 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -9,7 +9,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cm_auto_ptr.hxx" diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx index 3b81c65..80a5b5b 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.cxx +++ b/Source/CursesDialog/cmCursesBoolWidget.cxx @@ -3,7 +3,7 @@ #include "cmCursesBoolWidget.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #include diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 46c0d0c..5d29942 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -9,7 +9,7 @@ #include "cmCursesPathWidget.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx index b5a1daa..da0478a 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.cxx +++ b/Source/CursesDialog/cmCursesDummyWidget.cxx @@ -3,7 +3,7 @@ #include "cmCursesDummyWidget.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left, int top) diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx index ee5f2d7..518da4f 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.cxx +++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx @@ -3,7 +3,7 @@ #include "cmCursesFilePathWidget.h" #include "cmCursesPathWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left, int top) diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 0db0200..e8e70df 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -11,7 +11,7 @@ #include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index 10ae960..d891ea0 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -7,7 +7,7 @@ #include "cmCursesForm.h" #include "cmCursesStandardIncludes.h" -#include "cmState.h" +#include "cmStateTypes.h" #include #include diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx index 1b752a6..d26a98f 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.cxx +++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx @@ -3,7 +3,7 @@ #include "cmCursesOptionsWidget.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #define ctrl(z) ((z)&037) diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx index 3f96436..05c3279 100644 --- a/Source/CursesDialog/cmCursesPathWidget.cxx +++ b/Source/CursesDialog/cmCursesPathWidget.cxx @@ -4,7 +4,7 @@ #include "cmCursesMainForm.h" #include "cmCursesStringWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index 0f67d23..eabc642 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -6,7 +6,7 @@ #include "cmCursesMainForm.h" #include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #include #include diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index 1ef4ab2..d226dd7 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -6,7 +6,7 @@ #include // IWYU pragma: keep #include "cmCursesStandardIncludes.h" -#include "cmState.h" +#include "cmStateTypes.h" #include diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index d1281d4..3cde147 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddLibraryCommand.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmake.h" // cmLibraryCommand diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 3a37eeb..502a709 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -20,7 +20,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" #include "cmVersionConfig.h" diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 72556b8..4d900b6 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -17,7 +17,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt) : GeneratorTarget(gt) diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 804d900..3e2cf18 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -8,7 +8,7 @@ #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmake.h" diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 565eb15..16bbadb 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -11,7 +11,7 @@ #include "cmOrderDirectories.h" #include "cmOutputConverter.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmake.h" diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 4cc4edf..70ed31e 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -10,7 +10,7 @@ #include "cmMakefile.h" #include "cmPolicies.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 5cb1104..2125f1b 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -9,7 +9,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx index 8800363..99db478 100644 --- a/Source/cmDefinePropertyCommand.cxx +++ b/Source/cmDefinePropertyCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDefinePropertyCommand.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmake.h" bool cmDefinePropertyCommand::InitialPass(std::vector const& args, diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index e5f7a55..0c25268 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -9,7 +9,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetExport.h" diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 3cd72a8..6c21eaf 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -11,7 +11,7 @@ #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetExport.h" diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 92c3bf1..64ea3c8 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -14,7 +14,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetExport.h" diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index a262e14..cd0a7e6 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -8,7 +8,7 @@ #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index b91cae9..41fc428 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -9,7 +9,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 90d41fe..6f48935 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -8,7 +8,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index b50db25..d20e386 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -11,7 +11,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceGroup.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index 3f09469..3730433 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -8,7 +8,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 9a83c49..5d35f13 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -8,7 +8,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index b8b3463..66433f9 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -3,7 +3,7 @@ #include "cmFindBase.h" #include "cmAlgorithms.h" -#include "cmState.h" +#include "cmStateTypes.h" cmFindBase::cmFindBase() { diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index f34b2d6..86d7dcf 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -15,7 +15,7 @@ #include "cmOutputConverter.h" #include "cmPolicies.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 625c28e..3805bfc 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -8,7 +8,7 @@ #include "cmLinkItem.h" #include "cmListFileCache.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include #include diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index 11373b7..e5949f0 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -4,7 +4,7 @@ #include "cmAlgorithms.h" #include "cmGlobalGenerator.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmake.h" // cmGetCMakePropertyCommand diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 39445dd..c44445a 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -5,7 +5,7 @@ #include "cmGlobalGenerator.h" #include "cmPropertyDefinition.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmTargetPropertyComputer.h" #include "cmTest.h" #include "cmake.h" diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 313b65a..fd3734b 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -28,7 +28,7 @@ #include "cmPolicies.h" #include "cmQtAutoGeneratorInitializer.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 1881b7a..75209c3 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -8,7 +8,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmXMLWriter.h" diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 7015669..b90428d 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -13,7 +13,7 @@ #include "cmMakefile.h" #include "cmNinjaLinkLineComputer.h" #include "cmOutputConverter.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index a1127f9..843e5dc 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -8,7 +8,7 @@ #include "cmGeneratorTarget.h" #include "cmGlobalCommonGenerator.h" #include "cmGlobalGeneratorFactory.h" -#include "cmState.h" +#include "cmStateTypes.h" #include #include diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 94cdb38..f97bb75 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -4,7 +4,7 @@ #include "cmDocumentationEntry.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmake.h" cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator(cmake* cm) diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index 8d5515b..1ff07ab 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -5,7 +5,7 @@ #include // IWYU pragma: keep -#include "cmState.h" +#include "cmStateTypes.h" #include #include diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index ed3be3f..f1df073 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -9,7 +9,7 @@ #include "cmInstallType.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 1cea655..6314aff 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -9,7 +9,7 @@ #include "cmOutputConverter.h" #include "cmPolicies.h" #include "cmRulePlaceholderExpander.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmake.h" #include diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 232e1dc..8789530 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -12,7 +12,7 @@ #include "cmNinjaTargetGenerator.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 5b90f99..eda604d 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -16,7 +16,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 47cb246..28912c3 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -17,7 +17,7 @@ #include "cmListFileCache.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTest.h" #include "cmVersion.h" diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 5bf2f51..cfe1e83 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -12,7 +12,7 @@ #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 97c430f..4a8924f 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -20,7 +20,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" #include "cmake.h" diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index dd903d6..d5d3e90 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -17,7 +17,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 6552832..76fe047 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -16,7 +16,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx index 7de185a..500ff4a 100644 --- a/Source/cmNinjaUtilityTargetGenerator.cxx +++ b/Source/cmNinjaUtilityTargetGenerator.cxx @@ -12,7 +12,7 @@ #include "cmNinjaTypes.h" #include "cmOutputConverter.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 25acb52..41bee8b 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -2,7 +2,7 @@ #include "cmAlgorithms.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 5246a67..b04c7ca 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -12,7 +12,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmake.h" diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 3c2b148..dca0f69 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -7,7 +7,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" #include "cmake.h" diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 5d37578..ba24ff2 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -6,7 +6,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmProperty.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 6a7c8f0..929e204 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -10,7 +10,7 @@ #include "cmListFileCache.h" #include "cmPolicies.h" #include "cmPropertyMap.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmTargetLinkLibraryType.h" #include diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx index 4d0cbaa..f55dc83 100644 --- a/Source/cmTest.cxx +++ b/Source/cmTest.cxx @@ -4,7 +4,7 @@ #include "cmMakefile.h" #include "cmProperty.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" cmTest::cmTest(cmMakefile* mf) diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index 301660e..843f7b1 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -8,7 +8,7 @@ #include "cmOutputConverter.h" #include "cmProperty.h" #include "cmPropertyMap.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTest.h" #include "cm_auto_ptr.hxx" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ebcca02a091192f881e106e4ec7c879b343a1ae3 commit ebcca02a091192f881e106e4ec7c879b343a1ae3 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:48 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 23:45:01 2016 +0200 cmState: Move extracted declarations to a separate file diff --git a/Source/cmState.h b/Source/cmState.h index c7cf756..938c90b 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -12,6 +12,7 @@ #include "cmProperty.h" #include "cmPropertyDefinitionMap.h" #include "cmPropertyMap.h" +#include "cmStateTypes.h" #include #include @@ -23,51 +24,6 @@ class cmCommand; class cmListFileBacktrace; class cmPropertyDefinition; -namespace cmStateDetail { -struct BuildsystemDirectoryStateType; -struct SnapshotDataType; -struct PolicyStackEntry; -typedef cmLinkedTree::iterator PositionType; -} - -namespace cmStateEnums { - -enum SnapshotType -{ - BaseType, - BuildsystemDirectoryType, - FunctionCallType, - MacroCallType, - IncludeFileType, - InlineListFileType, - PolicyScopeType, - VariableScopeType -}; - -enum TargetType -{ - EXECUTABLE, - STATIC_LIBRARY, - SHARED_LIBRARY, - MODULE_LIBRARY, - OBJECT_LIBRARY, - UTILITY, - GLOBAL_TARGET, - INTERFACE_LIBRARY, - UNKNOWN_LIBRARY -}; -enum CacheEntryType -{ - BOOL = 0, - PATH, - FILEPATH, - STRING, - INTERNAL, - STATIC, - UNINITIALIZED -}; -} - class cmStateDirectory; class cmStateSnapshot; diff --git a/Source/cmStateTypes.h b/Source/cmStateTypes.h new file mode 100644 index 0000000..75f9e60 --- /dev/null +++ b/Source/cmStateTypes.h @@ -0,0 +1,55 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmStateTypes_h +#define cmStateTypes_h + +#include "cmLinkedTree.h" + +namespace cmStateDetail { +struct BuildsystemDirectoryStateType; +struct SnapshotDataType; +struct PolicyStackEntry; +typedef cmLinkedTree::iterator PositionType; +} + +namespace cmStateEnums { + +enum SnapshotType +{ + BaseType, + BuildsystemDirectoryType, + FunctionCallType, + MacroCallType, + IncludeFileType, + InlineListFileType, + PolicyScopeType, + VariableScopeType +}; + +enum TargetType +{ + EXECUTABLE, + STATIC_LIBRARY, + SHARED_LIBRARY, + MODULE_LIBRARY, + OBJECT_LIBRARY, + UTILITY, + GLOBAL_TARGET, + INTERFACE_LIBRARY, + UNKNOWN_LIBRARY +}; + +enum CacheEntryType +{ + BOOL = 0, + PATH, + FILEPATH, + STRING, + INTERNAL, + STATIC, + UNINITIALIZED +}; +} + +#endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=799756410ceb775b28dbd28ea464a6dbd794c44e commit 799756410ceb775b28dbd28ea464a6dbd794c44e Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:48 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 23:45:01 2016 +0200 cmState: Remove compatibility typedefs diff --git a/Source/cmState.h b/Source/cmState.h index 82eec3f..c7cf756 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -79,9 +79,6 @@ public: cmState(); ~cmState(); - typedef cmStateSnapshot Snapshot; - typedef cmStateDirectory Directory; - static const char* GetTargetTypeName(cmStateEnums::TargetType targetType); cmStateSnapshot CreateBaseSnapshot(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da76011790b2cda7159d82db3ff5971699869239 commit da76011790b2cda7159d82db3ff5971699869239 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:48 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 23:45:00 2016 +0200 cmState: Port dependent code to new cmStateSnapshot name diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 8848a70..e9980d0 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -280,7 +280,7 @@ void cmCTestScriptHandler::CreateCMake() this->CMake->AddCMakePaths(); this->GlobalGenerator = new cmGlobalGenerator(this->CMake); - cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->CMake->GetCurrentSnapshot(); std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); snapshot.GetDirectory().SetCurrentSource(cwd); snapshot.GetDirectory().SetCurrentBinary(cwd); diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 24a3277..313b65a 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1062,7 +1062,7 @@ void cmGlobalGenerator::Configure() this->FirstTimeProgress = 0.0f; this->ClearGeneratorMembers(); - cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->CMakeInstance->GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentSource( this->CMakeInstance->GetHomeDirectory()); @@ -1909,10 +1909,10 @@ void cmGlobalGenerator::SetConfiguredFilesPath(cmGlobalGenerator* gen) } } -bool cmGlobalGenerator::IsExcluded(cmState::Snapshot const& rootSnp, - cmState::Snapshot const& snp_) const +bool cmGlobalGenerator::IsExcluded(cmStateSnapshot const& rootSnp, + cmStateSnapshot const& snp_) const { - cmState::Snapshot snp = snp_; + cmStateSnapshot snp = snp_; while (snp.IsValid()) { if (snp == rootSnp) { // No directory excludes itself. @@ -1933,8 +1933,8 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, { assert(gen); - cmState::Snapshot rootSnp = root->GetStateSnapshot(); - cmState::Snapshot snp = gen->GetStateSnapshot(); + cmStateSnapshot rootSnp = root->GetStateSnapshot(); + cmStateSnapshot snp = gen->GetStateSnapshot(); return this->IsExcluded(rootSnp, snp); } @@ -1974,7 +1974,7 @@ void cmGlobalGenerator::FillProjectMap() unsigned int i; for (i = 0; i < this->LocalGenerators.size(); ++i) { // for each local generator add all projects - cmState::Snapshot snp = this->LocalGenerators[i]->GetStateSnapshot(); + cmStateSnapshot snp = this->LocalGenerators[i]->GetStateSnapshot(); std::string name; do { std::string snpProjName = snp.GetProjectName(); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 0f483db..959fe32 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -410,8 +410,8 @@ protected: // has been populated. void FillProjectMap(); void CheckTargetProperties(); - bool IsExcluded(cmState::Snapshot const& root, - cmState::Snapshot const& snp) const; + bool IsExcluded(cmStateSnapshot const& root, + cmStateSnapshot const& snp) const; bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const; bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const; virtual void InitializeProgressMarks() {} diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index a84baca..7015669 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1116,9 +1116,9 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) // The directory-level rule should depend on the directory-level // rules of the subdirectories. - std::vector const& children = + std::vector const& children = lg->GetStateSnapshot().GetChildren(); - for (std::vector::const_iterator stateIt = + for (std::vector::const_iterator stateIt = children.begin(); stateIt != children.end(); ++stateIt) { targetsPerFolder[currentSourceFolder].push_back( @@ -1667,8 +1667,7 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile( { // Setup path conversions. { - cmState::Snapshot snapshot = - this->GetCMakeInstance()->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->GetCMakeInstance()->GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentSource(dir_cur_src); snapshot.GetDirectory().SetCurrentBinary(dir_cur_bld); snapshot.GetDirectory().SetRelativePathTopSource(dir_top_src.c_str()); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 45f8151..3433d75 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -436,9 +436,8 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRule2( // The directory-level rule should depend on the directory-level // rules of the subdirectories. - std::vector children = - lg->GetStateSnapshot().GetChildren(); - for (std::vector::const_iterator ci = children.begin(); + std::vector children = lg->GetStateSnapshot().GetChildren(); + for (std::vector::const_iterator ci = children.begin(); ci != children.end(); ++ci) { std::string subdir = ci->GetDirectory().GetCurrentBinary(); subdir += "/"; @@ -507,7 +506,7 @@ void cmGlobalUnixMakefileGenerator3::GenerateBuildCommand( if (!this->Makefiles.empty()) { mf = this->Makefiles[0]; } else { - cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->CMakeInstance->GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentSource( this->CMakeInstance->GetHomeDirectory()); snapshot.GetDirectory().SetCurrentBinary( @@ -817,8 +816,8 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks() continue; } - cmState::Snapshot csnp = lg->GetStateSnapshot(); - cmState::Snapshot tsnp = tlg->GetStateSnapshot(); + cmStateSnapshot csnp = lg->GetStateSnapshot(); + cmStateSnapshot tsnp = tlg->GetStateSnapshot(); // Consider the directory containing the target and all its // parents until something excludes the target. diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 1019d86..a1127f9 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -248,8 +248,8 @@ private: const char* GetBuildIgnoreErrorsFlag() const CM_OVERRIDE { return "-i"; } std::string GetEditCacheCommand() const CM_OVERRIDE; - std::map, - cmState::Snapshot::StrictWeakOrder> + std::map, + cmStateSnapshot::StrictWeakOrder> DirectoryTargetsMap; void InitializeProgressMarks() CM_OVERRIDE; }; diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 5e6273c..c8744d4 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -298,7 +298,7 @@ struct cmListFileBacktrace::Entry : public cmListFileContext unsigned int RefCount; }; -cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot bottom, Entry* up, +cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* up, cmListFileContext const& lfc) : Bottom(bottom) , Cur(new Entry(lfc, up)) @@ -307,7 +307,7 @@ cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot bottom, Entry* up, this->Cur->Ref(); } -cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot bottom, Entry* cur) +cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur) : Bottom(bottom) , Cur(cur) { @@ -323,7 +323,7 @@ cmListFileBacktrace::cmListFileBacktrace() { } -cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot snapshot) +cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot snapshot) : Bottom(snapshot.GetCallStackBottom()) , Cur(CM_NULLPTR) { diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index fd779c7..83aac51 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -113,14 +113,14 @@ public: // Construct an empty backtrace whose bottom sits in the directory // indicated by the given valid snapshot. - cmListFileBacktrace(cmState::Snapshot snapshot); + cmListFileBacktrace(cmStateSnapshot snapshot); // Backtraces may be copied and assigned as values. cmListFileBacktrace(cmListFileBacktrace const& r); cmListFileBacktrace& operator=(cmListFileBacktrace const& r); ~cmListFileBacktrace(); - cmState::Snapshot GetBottom() const { return this->Bottom; } + cmStateSnapshot GetBottom() const { return this->Bottom; } // Get a backtrace with the given file scope added to the top. // May not be called until after construction with a valid snapshot. @@ -147,11 +147,11 @@ public: private: struct Entry; - cmState::Snapshot Bottom; + cmStateSnapshot Bottom; Entry* Cur; - cmListFileBacktrace(cmState::Snapshot bottom, Entry* up, + cmListFileBacktrace(cmStateSnapshot bottom, Entry* up, cmListFileContext const& lfc); - cmListFileBacktrace(cmState::Snapshot bottom, Entry* cur); + cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur); }; struct cmListFile diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index b6fb3e6..d90094b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -249,7 +249,7 @@ void cmLocalGenerator::GenerateTestFiles() (*gi)->Compute(this); (*gi)->Generate(fout, config, configurationTypes); } - typedef std::vector vec_t; + typedef std::vector vec_t; vec_t const& children = this->Makefile->GetStateSnapshot().GetChildren(); std::string parentBinDir = this->GetCurrentBinaryDirectory(); for (vec_t::const_iterator i = children.begin(); i != children.end(); ++i) { @@ -446,12 +446,12 @@ void cmLocalGenerator::GenerateInstallRules() this->GenerateTargetInstallRules(fout, config, configurationTypes); // Include install scripts from subdirectories. - std::vector children = + std::vector children = this->Makefile->GetStateSnapshot().GetChildren(); if (!children.empty()) { fout << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n"; fout << " # Include the install script for each subdirectory.\n"; - for (std::vector::const_iterator ci = children.begin(); + for (std::vector::const_iterator ci = children.begin(); ci != children.end(); ++ci) { if (!ci->GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL")) { std::string odir = ci->GetDirectory().GetCurrentBinary(); @@ -563,7 +563,7 @@ cmState* cmLocalGenerator::GetState() const return this->GlobalGenerator->GetCMakeInstance()->GetState(); } -cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const +cmStateSnapshot cmLocalGenerator::GetStateSnapshot() const { return this->Makefile->GetStateSnapshot(); } @@ -1868,7 +1868,7 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature, featureName += "_"; featureName += cmSystemTools::UpperCase(config); } - cmState::Snapshot snp = this->StateSnapshot; + cmStateSnapshot snp = this->StateSnapshot; while (snp.IsValid()) { if (const char* value = snp.GetDirectory().GetProperty(featureName)) { return value; diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 055e1a9..1cea655 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -92,7 +92,7 @@ public: cmGeneratorTarget& tgt) const; cmState* GetState() const; - cmState::Snapshot GetStateSnapshot() const; + cmStateSnapshot GetStateSnapshot() const; void AddArchitectureFlags(std::string& flags, cmGeneratorTarget const* target, @@ -337,7 +337,7 @@ protected: virtual bool CheckDefinition(std::string const& define) const; cmMakefile* Makefile; - cmState::Snapshot StateSnapshot; + cmStateSnapshot StateSnapshot; cmListFileBacktrace DirectoryBacktrace; cmGlobalGenerator* GlobalGenerator; std::map UniqueObjectNamesMap; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 5036b0d..47cb246 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -45,7 +45,7 @@ class cmMessenger; // default is not to be building executables cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, - cmState::Snapshot const& snapshot) + cmStateSnapshot const& snapshot) : GlobalGenerator(globalGenerator) , StateSnapshot(snapshot) , Backtrace(snapshot) @@ -1356,7 +1356,7 @@ private: cmMakefile* Makefile; cmGlobalGenerator* GG; cmMakefile* CurrentMakefile; - cmState::Snapshot Snapshot; + cmStateSnapshot Snapshot; bool ReportError; }; @@ -1538,7 +1538,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath, return; } - cmState::Snapshot newSnapshot = + cmStateSnapshot newSnapshot = this->GetState()->CreateBuildsystemDirectorySnapshot(this->StateSnapshot); newSnapshot.GetDirectory().SetCurrentSource(srcPath); @@ -3621,7 +3621,7 @@ void cmMakefile::AddCMakeDependFilesFromUser() std::string cmMakefile::FormatListFileStack() const { std::vector listFiles; - cmState::Snapshot snp = this->StateSnapshot; + cmStateSnapshot snp = this->StateSnapshot; while (snp.IsValid()) { listFiles.push_back(snp.GetExecutionListFile()); snp = snp.GetCallStackParent(); @@ -3918,7 +3918,7 @@ void cmMakefile::StoreMatches(cmsys::RegularExpression& re) this->MarkVariableAsUsed(nMatchesVariable); } -cmState::Snapshot cmMakefile::GetStateSnapshot() const +cmStateSnapshot cmMakefile::GetStateSnapshot() const { return this->StateSnapshot; } @@ -3999,7 +3999,7 @@ void cmMakefile::PopPolicy() void cmMakefile::PopSnapshot(bool reportError) { - // cmState::Snapshot manages nested policy scopes within it. + // cmStateSnapshot manages nested policy scopes within it. // Since the scope corresponding to the snapshot is closing, // reject any still-open nested policy scopes with an error. while (!this->StateSnapshot.CanPopPolicyScope()) { diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index e7e8a0b..8ac0e33 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -70,7 +70,7 @@ public: * Construct an empty makefile. */ cmMakefile(cmGlobalGenerator* globalGenerator, - const cmState::Snapshot& snapshot); + const cmStateSnapshot& snapshot); /** * Destructor. @@ -753,7 +753,7 @@ public: void ClearMatches(); void StoreMatches(cmsys::RegularExpression& re); - cmState::Snapshot GetStateSnapshot() const; + cmStateSnapshot GetStateSnapshot() const; const char* GetDefineFlagsCMP0059() const; @@ -829,7 +829,7 @@ private: cmMakefile(const cmMakefile& mf); cmMakefile& operator=(const cmMakefile& mf); - cmState::Snapshot StateSnapshot; + cmStateSnapshot StateSnapshot; cmListFileBacktrace Backtrace; void ReadListFile(cmListFile const& listFile, diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index a1228e5..c219fdf 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -11,7 +11,7 @@ #include #include -cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot) +cmOutputConverter::cmOutputConverter(cmStateSnapshot snapshot) : StateSnapshot(snapshot) , LinkScriptShell(false) { diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 9e745ec..2a81dab 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -13,7 +13,7 @@ class cmOutputConverter { public: - cmOutputConverter(cmState::Snapshot snapshot); + cmOutputConverter(cmStateSnapshot snapshot); enum OutputFormat { @@ -125,7 +125,7 @@ private: static std::string Shell__GetArgument(const char* in, int flags); private: - cmState::Snapshot StateSnapshot; + cmStateSnapshot StateSnapshot; bool LinkScriptShell; }; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index b66257c..3c2b148 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -165,7 +165,7 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory, cm.GetCurrentSnapshot().SetDefaultDefinitions(); cmGlobalGenerator gg(&cm); - cmState::Snapshot snapshot = cm.GetCurrentSnapshot(); + cmStateSnapshot snapshot = cm.GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentBinary(targetDirectory); snapshot.GetDirectory().SetCurrentSource(targetDirectory); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index b50c8bd..388984f 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -481,7 +481,7 @@ void cmake::ReadListFile(const std::vector& args, std::string homeOutputDir = this->GetHomeOutputDirectory(); this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory()); this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory()); - cmState::Snapshot snapshot = this->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentBinary( cmSystemTools::GetCurrentWorkingDirectory()); snapshot.GetDirectory().SetCurrentSource( @@ -517,7 +517,7 @@ bool cmake::FindPackage(const std::vector& args) cmGlobalGenerator* gg = new cmGlobalGenerator(this); this->SetGlobalGenerator(gg); - cmState::Snapshot snapshot = this->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentBinary( cmSystemTools::GetCurrentWorkingDirectory()); snapshot.GetDirectory().SetCurrentSource( diff --git a/Source/cmake.h b/Source/cmake.h index cff753f..0a577ad 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -407,14 +407,11 @@ public: void WatchUnusedCli(const std::string& var); cmState* GetState() const { return this->State; } - void SetCurrentSnapshot(cmState::Snapshot snapshot) + void SetCurrentSnapshot(cmStateSnapshot snapshot) { this->CurrentSnapshot = snapshot; } - cmState::Snapshot GetCurrentSnapshot() const - { - return this->CurrentSnapshot; - } + cmStateSnapshot GetCurrentSnapshot() const { return this->CurrentSnapshot; } protected: void RunCheckForUnusedVariables(); @@ -490,7 +487,7 @@ private: InstalledFilesMap InstalledFiles; cmState* State; - cmState::Snapshot CurrentSnapshot; + cmStateSnapshot CurrentSnapshot; cmMessenger* Messenger; std::vector TraceOnlyThisSources; diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 4387bf6..912acdb 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -760,7 +760,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) cm.GetCurrentSnapshot().SetDefaultDefinitions(); if (cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen)) { cm.SetGlobalGenerator(ggd); - cmState::Snapshot snapshot = cm.GetCurrentSnapshot(); + cmStateSnapshot snapshot = cm.GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentBinary(startOutDir); snapshot.GetDirectory().SetCurrentSource(startDir); CM_AUTO_PTR mf(new cmMakefile(ggd, snapshot)); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b23b251ae262ba2e8e1ce7851648942a16e74c73 commit b23b251ae262ba2e8e1ce7851648942a16e74c73 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:47 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 23:45:00 2016 +0200 cmState: Move Snapshot type to separate namespace Leave behind a typedef to avoid porting dependent code in this commit. diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 31aac63..32fe66c 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -96,7 +96,7 @@ struct cmStateDetail::BuildsystemDirectoryStateType cmPropertyMap Properties; - std::vector Children; + std::vector Children; }; cmState::cmState() @@ -304,7 +304,7 @@ void cmState::RemoveCacheEntryProperty(std::string const& key, .SetProperty(propertyName, (void*)CM_NULLPTR); } -cmState::Snapshot cmState::Reset() +cmStateSnapshot cmState::Reset() { this->GlobalProperties.clear(); this->PropertyDefinitions.clear(); @@ -360,7 +360,7 @@ cmState::Snapshot cmState::Reset() this->DefineProperty("RULE_LAUNCH_LINK", cmProperty::TARGET, "", "", true); this->DefineProperty("RULE_LAUNCH_CUSTOM", cmProperty::TARGET, "", "", true); - return Snapshot(this, pos); + return cmStateSnapshot(this, pos); } void cmState::DefineProperty(const std::string& name, @@ -682,8 +682,8 @@ void cmStateDirectory::ComputeRelativePathTopSource() // construct relative paths passed to build tools so it is safe to use // even when the source is a network path. - cmState::Snapshot snapshot = this->Snapshot_; - std::vector snapshots; + cmStateSnapshot snapshot = this->Snapshot_; + std::vector snapshots; snapshots.push_back(snapshot); while (true) { snapshot = snapshot.GetBuildsystemDirectoryParent(); @@ -696,8 +696,7 @@ void cmStateDirectory::ComputeRelativePathTopSource() std::string result = snapshots.front().GetDirectory().GetCurrentSource(); - for (std::vector::const_iterator it = - snapshots.begin() + 1; + for (std::vector::const_iterator it = snapshots.begin() + 1; it != snapshots.end(); ++it) { std::string currentSource = it->GetDirectory().GetCurrentSource(); if (cmSystemTools::IsSubDirectory(result, currentSource)) { @@ -709,8 +708,8 @@ void cmStateDirectory::ComputeRelativePathTopSource() void cmStateDirectory::ComputeRelativePathTopBinary() { - cmState::Snapshot snapshot = this->Snapshot_; - std::vector snapshots; + cmStateSnapshot snapshot = this->Snapshot_; + std::vector snapshots; snapshots.push_back(snapshot); while (true) { snapshot = snapshot.GetBuildsystemDirectoryParent(); @@ -723,8 +722,7 @@ void cmStateDirectory::ComputeRelativePathTopBinary() std::string result = snapshots.front().GetDirectory().GetCurrentBinary(); - for (std::vector::const_iterator it = - snapshots.begin() + 1; + for (std::vector::const_iterator it = snapshots.begin() + 1; it != snapshots.end(); ++it) { std::string currentBinary = it->GetDirectory().GetCurrentBinary(); if (cmSystemTools::IsSubDirectory(result, currentBinary)) { @@ -742,7 +740,7 @@ void cmStateDirectory::ComputeRelativePathTopBinary() } } -cmState::Snapshot cmState::CreateBaseSnapshot() +cmStateSnapshot cmState::CreateBaseSnapshot() { cmStateDetail::PositionType pos = this->SnapshotData.Push(this->SnapshotData.Root()); @@ -767,11 +765,11 @@ cmState::Snapshot cmState::CreateBaseSnapshot() assert(pos->Vars.IsValid()); pos->Parent = this->VarTree.Root(); pos->Root = this->VarTree.Root(); - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreateBuildsystemDirectorySnapshot( - Snapshot originSnapshot) +cmStateSnapshot cmState::CreateBuildsystemDirectorySnapshot( + cmStateSnapshot originSnapshot) { assert(originSnapshot.IsValid()); cmStateDetail::PositionType pos = @@ -796,7 +794,7 @@ cmState::Snapshot cmState::CreateBuildsystemDirectorySnapshot( pos->Root = origin; pos->Vars = this->VarTree.Push(origin); - cmState::Snapshot snapshot = cmState::Snapshot(this, pos); + cmStateSnapshot snapshot = cmStateSnapshot(this, pos); originSnapshot.Position->BuildSystemDirectory->Children.push_back(snapshot); snapshot.SetDefaultDefinitions(); snapshot.InitializeFromParent(); @@ -804,8 +802,8 @@ cmState::Snapshot cmState::CreateBuildsystemDirectorySnapshot( return snapshot; } -cmState::Snapshot cmState::CreateFunctionCallSnapshot( - cmState::Snapshot originSnapshot, std::string const& fileName) +cmStateSnapshot cmState::CreateFunctionCallSnapshot( + cmStateSnapshot originSnapshot, std::string const& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -820,11 +818,11 @@ cmState::Snapshot cmState::CreateFunctionCallSnapshot( cmLinkedTree::iterator origin = originSnapshot.Position->Vars; pos->Parent = origin; pos->Vars = this->VarTree.Push(origin); - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreateMacroCallSnapshot( - cmState::Snapshot originSnapshot, std::string const& fileName) +cmStateSnapshot cmState::CreateMacroCallSnapshot( + cmStateSnapshot originSnapshot, std::string const& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -835,11 +833,11 @@ cmState::Snapshot cmState::CreateMacroCallSnapshot( assert(originSnapshot.Position->Vars.IsValid()); pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreateIncludeFileSnapshot( - cmState::Snapshot originSnapshot, const std::string& fileName) +cmStateSnapshot cmState::CreateIncludeFileSnapshot( + cmStateSnapshot originSnapshot, const std::string& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -850,11 +848,11 @@ cmState::Snapshot cmState::CreateIncludeFileSnapshot( assert(originSnapshot.Position->Vars.IsValid()); pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreateVariableScopeSnapshot( - cmState::Snapshot originSnapshot) +cmStateSnapshot cmState::CreateVariableScopeSnapshot( + cmStateSnapshot originSnapshot) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -868,11 +866,11 @@ cmState::Snapshot cmState::CreateVariableScopeSnapshot( pos->Parent = origin; pos->Vars = this->VarTree.Push(origin); assert(pos->Vars.IsValid()); - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreateInlineListFileSnapshot( - cmState::Snapshot originSnapshot, const std::string& fileName) +cmStateSnapshot cmState::CreateInlineListFileSnapshot( + cmStateSnapshot originSnapshot, const std::string& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -882,11 +880,11 @@ cmState::Snapshot cmState::CreateInlineListFileSnapshot( originSnapshot.Position->ExecutionListFile, fileName); pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreatePolicyScopeSnapshot( - cmState::Snapshot originSnapshot) +cmStateSnapshot cmState::CreatePolicyScopeSnapshot( + cmStateSnapshot originSnapshot) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -894,10 +892,10 @@ cmState::Snapshot cmState::CreatePolicyScopeSnapshot( pos->Keep = false; pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::Pop(cmState::Snapshot originSnapshot) +cmStateSnapshot cmState::Pop(cmStateSnapshot originSnapshot) { cmStateDetail::PositionType pos = originSnapshot.Position; cmStateDetail::PositionType prevPos = pos; @@ -922,28 +920,28 @@ cmState::Snapshot cmState::Pop(cmState::Snapshot originSnapshot) this->SnapshotData.Pop(pos); } - return Snapshot(this, prevPos); + return cmStateSnapshot(this, prevPos); } -cmState::Snapshot::Snapshot(cmState* state) +cmStateSnapshot::cmStateSnapshot(cmState* state) : State(state) , Position() { } -std::vector cmState::Snapshot::GetChildren() +std::vector cmStateSnapshot::GetChildren() { return this->Position->BuildSystemDirectory->Children; } -cmState::Snapshot::Snapshot(cmState* state, - cmStateDetail::PositionType position) +cmStateSnapshot::cmStateSnapshot(cmState* state, + cmStateDetail::PositionType position) : State(state) , Position(position) { } -cmStateEnums::SnapshotType cmState::Snapshot::GetType() const +cmStateEnums::SnapshotType cmStateSnapshot::GetType() const { return this->Position->SnapshotType; } @@ -982,7 +980,7 @@ void cmStateDirectory::SetCurrentBinary(std::string const& dir) this->Snapshot_.SetDefinition("CMAKE_CURRENT_BINARY_DIR", loc); } -void cmState::Snapshot::SetListFile(const std::string& listfile) +void cmStateSnapshot::SetListFile(const std::string& listfile) { *this->Position->ExecutionListFile = listfile; } @@ -1007,39 +1005,39 @@ void cmStateDirectory::SetRelativePathTopBinary(const char* dir) this->DirectoryState->RelativePathTopBinary = dir; } -std::string cmState::Snapshot::GetExecutionListFile() const +std::string cmStateSnapshot::GetExecutionListFile() const { return *this->Position->ExecutionListFile; } -bool cmState::Snapshot::IsValid() const +bool cmStateSnapshot::IsValid() const { return this->State && this->Position.IsValid() ? this->Position != this->State->SnapshotData.Root() : false; } -cmState::Snapshot cmState::Snapshot::GetBuildsystemDirectoryParent() const +cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const { - Snapshot snapshot; + cmStateSnapshot snapshot; if (!this->State || this->Position == this->State->SnapshotData.Root()) { return snapshot; } cmStateDetail::PositionType parentPos = this->Position->DirectoryParent; if (parentPos != this->State->SnapshotData.Root()) { - snapshot = - Snapshot(this->State, parentPos->BuildSystemDirectory->DirectoryEnd); + snapshot = cmStateSnapshot(this->State, + parentPos->BuildSystemDirectory->DirectoryEnd); } return snapshot; } -cmState::Snapshot cmState::Snapshot::GetCallStackParent() const +cmStateSnapshot cmStateSnapshot::GetCallStackParent() const { assert(this->State); assert(this->Position != this->State->SnapshotData.Root()); - Snapshot snapshot; + cmStateSnapshot snapshot; cmStateDetail::PositionType parentPos = this->Position; while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || parentPos->SnapshotType == cmStateEnums::VariableScopeType) { @@ -1060,11 +1058,11 @@ cmState::Snapshot cmState::Snapshot::GetCallStackParent() const return snapshot; } - snapshot = Snapshot(this->State, parentPos); + snapshot = cmStateSnapshot(this->State, parentPos); return snapshot; } -cmState::Snapshot cmState::Snapshot::GetCallStackBottom() const +cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const { assert(this->State); assert(this->Position != this->State->SnapshotData.Root()); @@ -1075,17 +1073,17 @@ cmState::Snapshot cmState::Snapshot::GetCallStackBottom() const pos != this->State->SnapshotData.Root()) { ++pos; } - return Snapshot(this->State, pos); + return cmStateSnapshot(this->State, pos); } -void cmState::Snapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) +void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) { cmStateDetail::PositionType pos = this->Position; pos->Policies = this->State->PolicyStack.Push( pos->Policies, cmStateDetail::PolicyStackEntry(entry, weak)); } -bool cmState::Snapshot::PopPolicy() +bool cmStateSnapshot::PopPolicy() { cmStateDetail::PositionType pos = this->Position; if (pos->Policies == pos->PolicyScope) { @@ -1095,13 +1093,13 @@ bool cmState::Snapshot::PopPolicy() return true; } -bool cmState::Snapshot::CanPopPolicyScope() +bool cmStateSnapshot::CanPopPolicyScope() { return this->Position->Policies == this->Position->PolicyScope; } -void cmState::Snapshot::SetPolicy(cmPolicies::PolicyID id, - cmPolicies::PolicyStatus status) +void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id, + cmPolicies::PolicyStatus status) { // Update the policy stack from the top to the top-most strong entry. bool previous_was_weak = true; @@ -1113,7 +1111,7 @@ void cmState::Snapshot::SetPolicy(cmPolicies::PolicyID id, } } -cmPolicies::PolicyStatus cmState::Snapshot::GetPolicy( +cmPolicies::PolicyStatus cmStateSnapshot::GetPolicy( cmPolicies::PolicyID id) const { cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id); @@ -1148,49 +1146,49 @@ cmPolicies::PolicyStatus cmState::Snapshot::GetPolicy( return status; } -bool cmState::Snapshot::HasDefinedPolicyCMP0011() +bool cmStateSnapshot::HasDefinedPolicyCMP0011() { return !this->Position->Policies->IsEmpty(); } -const char* cmState::Snapshot::GetDefinition(std::string const& name) const +const char* cmStateSnapshot::GetDefinition(std::string const& name) const { assert(this->Position->Vars.IsValid()); return cmDefinitions::Get(name, this->Position->Vars, this->Position->Root); } -bool cmState::Snapshot::IsInitialized(std::string const& name) const +bool cmStateSnapshot::IsInitialized(std::string const& name) const { return cmDefinitions::HasKey(name, this->Position->Vars, this->Position->Root); } -void cmState::Snapshot::SetDefinition(std::string const& name, - std::string const& value) +void cmStateSnapshot::SetDefinition(std::string const& name, + std::string const& value) { this->Position->Vars->Set(name, value.c_str()); } -void cmState::Snapshot::RemoveDefinition(std::string const& name) +void cmStateSnapshot::RemoveDefinition(std::string const& name) { this->Position->Vars->Set(name, CM_NULLPTR); } -std::vector cmState::Snapshot::UnusedKeys() const +std::vector cmStateSnapshot::UnusedKeys() const { return this->Position->Vars->UnusedKeys(); } -std::vector cmState::Snapshot::ClosureKeys() const +std::vector cmStateSnapshot::ClosureKeys() const { return cmDefinitions::ClosureKeys(this->Position->Vars, this->Position->Root); } -bool cmState::Snapshot::RaiseScope(std::string const& var, const char* varDef) +bool cmStateSnapshot::RaiseScope(std::string const& var, const char* varDef) { if (this->Position->ScopeParent == this->Position->DirectoryParent) { - Snapshot parentDir = this->GetBuildsystemDirectoryParent(); + cmStateSnapshot parentDir = this->GetBuildsystemDirectoryParent(); if (!parentDir.IsValid()) { return false; } @@ -1241,7 +1239,7 @@ void InitializeContentFromParent(T& parentContent, T& thisContent, contentEndPosition = thisContent.size(); } -void cmState::Snapshot::SetDefaultDefinitions() +void cmStateSnapshot::SetDefaultDefinitions() { /* Up to CMake 2.4 here only WIN32, UNIX and APPLE were set. With CMake must separate between target and host platform. In most cases @@ -1296,7 +1294,7 @@ void cmState::Snapshot::SetDefaultDefinitions() "INCLUDE_REGULAR_EXPRESSION", "^.*$"); } -void cmState::Snapshot::SetDirectoryDefinitions() +void cmStateSnapshot::SetDirectoryDefinitions() { this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", @@ -1306,7 +1304,7 @@ void cmState::Snapshot::SetDirectoryDefinitions() this->State->GetBinaryDirectory()); } -void cmState::Snapshot::InitializeFromParent() +void cmStateSnapshot::InitializeFromParent() { cmStateDetail::PositionType parent = this->Position->DirectoryParent; assert(this->Position->Vars.IsValid()); @@ -1337,27 +1335,27 @@ void cmState::Snapshot::InitializeFromParent() this->Position->CompileOptionsPosition); } -cmState* cmState::Snapshot::GetState() const +cmState* cmStateSnapshot::GetState() const { return this->State; } -cmStateDirectory cmState::Snapshot::GetDirectory() const +cmStateDirectory cmStateSnapshot::GetDirectory() const { return cmStateDirectory(this->Position->BuildSystemDirectory, *this); } -void cmState::Snapshot::SetProjectName(const std::string& name) +void cmStateSnapshot::SetProjectName(const std::string& name) { this->Position->BuildSystemDirectory->ProjectName = name; } -std::string cmState::Snapshot::GetProjectName() const +std::string cmStateSnapshot::GetProjectName() const { return this->Position->BuildSystemDirectory->ProjectName; } -void cmState::Snapshot::InitializeFromParent_ForSubdirsCommand() +void cmStateSnapshot::InitializeFromParent_ForSubdirsCommand() { std::string currentSrcDir = this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR"); std::string currentBinDir = this->GetDefinition("CMAKE_CURRENT_BINARY_DIR"); @@ -1371,7 +1369,7 @@ void cmState::Snapshot::InitializeFromParent_ForSubdirsCommand() cmStateDirectory::cmStateDirectory( cmLinkedTree::iterator iter, - const cmState::Snapshot& snapshot) + const cmStateSnapshot& snapshot) : DirectoryState(iter) , Snapshot_(snapshot) { @@ -1591,8 +1589,8 @@ void cmStateDirectory::ClearCompileOptions() this->Snapshot_.Position->CompileOptionsPosition); } -bool cmState::Snapshot::StrictWeakOrder::operator()( - const cmState::Snapshot& lhs, const cmState::Snapshot& rhs) const +bool cmStateSnapshot::StrictWeakOrder::operator()( + const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) const { return lhs.Position.StrictWeakOrdered(rhs.Position); } @@ -1661,7 +1659,7 @@ const char* cmStateDirectory::GetProperty(const std::string& prop, static std::string output; output = ""; if (prop == "PARENT_DIRECTORY") { - cmState::Snapshot parent = this->Snapshot_.GetBuildsystemDirectoryParent(); + cmStateSnapshot parent = this->Snapshot_.GetBuildsystemDirectoryParent(); if (parent.IsValid()) { return parent.GetDirectory().GetCurrentSource(); } @@ -1677,9 +1675,9 @@ const char* cmStateDirectory::GetProperty(const std::string& prop, } if (prop == kSUBDIRECTORIES) { std::vector child_dirs; - std::vector const& children = + std::vector const& children = this->DirectoryState->Children; - for (std::vector::const_iterator ci = children.begin(); + for (std::vector::const_iterator ci = children.begin(); ci != children.end(); ++ci) { child_dirs.push_back(ci->GetDirectory().GetCurrentSource()); } @@ -1693,7 +1691,7 @@ const char* cmStateDirectory::GetProperty(const std::string& prop, if (prop == "LISTFILE_STACK") { std::vector listFiles; - cmState::Snapshot snp = this->Snapshot_; + cmStateSnapshot snp = this->Snapshot_; while (snp.IsValid()) { listFiles.push_back(snp.GetExecutionListFile()); snp = snp.GetCallStackParent(); @@ -1730,7 +1728,7 @@ const char* cmStateDirectory::GetProperty(const std::string& prop, const char* retVal = this->DirectoryState->Properties.GetPropertyValue(prop); if (!retVal && chain) { - cmState::Snapshot parentSnapshot = + cmStateSnapshot parentSnapshot = this->Snapshot_.GetBuildsystemDirectoryParent(); if (parentSnapshot.IsValid()) { return parentSnapshot.GetDirectory().GetProperty(prop, chain); @@ -1763,12 +1761,12 @@ void cmStateDirectory::AddNormalTargetName(std::string const& name) this->DirectoryState->NormalTargetNames.push_back(name); } -bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs) +bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) { return lhs.Position == rhs.Position; } -bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs) +bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) { return lhs.Position != rhs.Position; } diff --git a/Source/cmState.h b/Source/cmState.h index 843a5cf..82eec3f 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -69,97 +69,35 @@ enum CacheEntryType } class cmStateDirectory; +class cmStateSnapshot; class cmState { + friend class cmStateSnapshot; public: cmState(); ~cmState(); + typedef cmStateSnapshot Snapshot; typedef cmStateDirectory Directory; - class Snapshot - { - public: - Snapshot(cmState* state = CM_NULLPTR); - Snapshot(cmState* state, cmStateDetail::PositionType position); - - const char* GetDefinition(std::string const& name) const; - bool IsInitialized(std::string const& name) const; - void SetDefinition(std::string const& name, std::string const& value); - void RemoveDefinition(std::string const& name); - std::vector UnusedKeys() const; - std::vector ClosureKeys() const; - bool RaiseScope(std::string const& var, const char* varDef); - - void SetListFile(std::string const& listfile); - - std::string GetExecutionListFile() const; - - std::vector GetChildren(); - - bool IsValid() const; - Snapshot GetBuildsystemDirectoryParent() const; - Snapshot GetCallStackParent() const; - Snapshot GetCallStackBottom() const; - cmStateEnums::SnapshotType GetType() const; - - void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); - cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; - bool HasDefinedPolicyCMP0011(); - void PushPolicy(cmPolicies::PolicyMap entry, bool weak); - bool PopPolicy(); - bool CanPopPolicyScope(); - - cmState* GetState() const; - - cmStateDirectory GetDirectory() const; - - void SetProjectName(std::string const& name); - std::string GetProjectName() const; - - void InitializeFromParent_ForSubdirsCommand(); - - struct StrictWeakOrder - { - bool operator()(const cmState::Snapshot& lhs, - const cmState::Snapshot& rhs) const; - }; - - void SetDirectoryDefinitions(); - void SetDefaultDefinitions(); - - private: - friend bool operator==(const cmState::Snapshot& lhs, - const cmState::Snapshot& rhs); - friend bool operator!=(const cmState::Snapshot& lhs, - const cmState::Snapshot& rhs); - friend class cmState; - friend class cmStateDirectory; - friend struct StrictWeakOrder; - - void InitializeFromParent(); - - cmState* State; - cmStateDetail::PositionType Position; - }; - static const char* GetTargetTypeName(cmStateEnums::TargetType targetType); - Snapshot CreateBaseSnapshot(); - Snapshot CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot); - Snapshot CreateFunctionCallSnapshot(Snapshot originSnapshot, - std::string const& fileName); - Snapshot CreateMacroCallSnapshot(Snapshot originSnapshot, - std::string const& fileName); - Snapshot CreateIncludeFileSnapshot(Snapshot originSnapshot, - std::string const& fileName); - Snapshot CreateVariableScopeSnapshot(Snapshot originSnapshot); - Snapshot CreateInlineListFileSnapshot(Snapshot originSnapshot, - std::string const& fileName); - Snapshot CreatePolicyScopeSnapshot(Snapshot originSnapshot); - Snapshot Pop(Snapshot originSnapshot); + cmStateSnapshot CreateBaseSnapshot(); + cmStateSnapshot CreateBuildsystemDirectorySnapshot( + cmStateSnapshot originSnapshot); + cmStateSnapshot CreateFunctionCallSnapshot(cmStateSnapshot originSnapshot, + std::string const& fileName); + cmStateSnapshot CreateMacroCallSnapshot(cmStateSnapshot originSnapshot, + std::string const& fileName); + cmStateSnapshot CreateIncludeFileSnapshot(cmStateSnapshot originSnapshot, + std::string const& fileName); + cmStateSnapshot CreateVariableScopeSnapshot(cmStateSnapshot originSnapshot); + cmStateSnapshot CreateInlineListFileSnapshot(cmStateSnapshot originSnapshot, + std::string const& fileName); + cmStateSnapshot CreatePolicyScopeSnapshot(cmStateSnapshot originSnapshot); + cmStateSnapshot Pop(cmStateSnapshot originSnapshot); static cmStateEnums::CacheEntryType StringToCacheEntryType(const char*); static const char* CacheEntryTypeToString(cmStateEnums::CacheEntryType); @@ -204,7 +142,7 @@ public: std::string& value, cmStateEnums::CacheEntryType& type); - Snapshot Reset(); + cmStateSnapshot Reset(); // Define a property void DefineProperty(const std::string& name, cmProperty::ScopeType scope, const char* ShortDescription, @@ -295,11 +233,77 @@ private: bool MSYSShell; }; +class cmStateSnapshot +{ +public: + cmStateSnapshot(cmState* state = CM_NULLPTR); + cmStateSnapshot(cmState* state, cmStateDetail::PositionType position); + + const char* GetDefinition(std::string const& name) const; + bool IsInitialized(std::string const& name) const; + void SetDefinition(std::string const& name, std::string const& value); + void RemoveDefinition(std::string const& name); + std::vector UnusedKeys() const; + std::vector ClosureKeys() const; + bool RaiseScope(std::string const& var, const char* varDef); + + void SetListFile(std::string const& listfile); + + std::string GetExecutionListFile() const; + + std::vector GetChildren(); + + bool IsValid() const; + cmStateSnapshot GetBuildsystemDirectoryParent() const; + cmStateSnapshot GetCallStackParent() const; + cmStateSnapshot GetCallStackBottom() const; + cmStateEnums::SnapshotType GetType() const; + + void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); + cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; + bool HasDefinedPolicyCMP0011(); + void PushPolicy(cmPolicies::PolicyMap entry, bool weak); + bool PopPolicy(); + bool CanPopPolicyScope(); + + cmState* GetState() const; + + cmStateDirectory GetDirectory() const; + + void SetProjectName(std::string const& name); + std::string GetProjectName() const; + + void InitializeFromParent_ForSubdirsCommand(); + + struct StrictWeakOrder + { + bool operator()(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs) const; + }; + + void SetDirectoryDefinitions(); + void SetDefaultDefinitions(); + +private: + friend bool operator==(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs); + friend bool operator!=(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs); + friend class cmState; + friend class cmStateDirectory; + friend struct StrictWeakOrder; + + void InitializeFromParent(); + + cmState* State; + cmStateDetail::PositionType Position; +}; + class cmStateDirectory { cmStateDirectory( cmLinkedTree::iterator iter, - cmState::Snapshot const& snapshot); + cmStateSnapshot const& snapshot); public: const char* GetCurrentSource() const; @@ -356,11 +360,11 @@ private: private: cmLinkedTree::iterator DirectoryState; - cmState::Snapshot Snapshot_; - friend class cmState::Snapshot; + cmStateSnapshot Snapshot_; + friend class cmStateSnapshot; }; -bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); -bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); +bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); +bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14f71f8c9d06c0f51156dce1f13db2d26f6f6bc5 commit 14f71f8c9d06c0f51156dce1f13db2d26f6f6bc5 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:47 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 23:45:00 2016 +0200 cmState: Port dependent code to new cmStateDirectory name diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index efa95a5..24a3277 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1415,13 +1415,13 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() } cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const + cmOutputConverter* outputConverter, cmStateDirectory stateDir) const { return new cmLinkLineComputer(outputConverter, stateDir); } cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const + cmOutputConverter* outputConverter, cmStateDirectory stateDir) const { return new cmMSVC60LinkLineComputer(outputConverter, stateDir); } diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index c3498e0..0f483db 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -108,10 +108,10 @@ public: virtual void Generate(); virtual cmLinkLineComputer* CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const; + cmOutputConverter* outputConverter, cmStateDirectory stateDir) const; cmLinkLineComputer* CreateMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const; + cmOutputConverter* outputConverter, cmStateDirectory stateDir) const; /** * Set/Get and Clear the enabled languages. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 98654c5..a84baca 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -66,7 +66,7 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os, } cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory /* stateDir */) const + cmOutputConverter* outputConverter, cmStateDirectory /* stateDir */) const { return new cmNinjaLinkLineComputer( outputConverter, diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 6b77a2b..d4a14e2 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -72,7 +72,7 @@ public: cmLinkLineComputer* CreateLinkLineComputer( cmOutputConverter* outputConverter, - cmState::Directory stateDir) const CM_OVERRIDE; + cmStateDirectory stateDir) const CM_OVERRIDE; /** * Write the given @a comment to the output stream @a os. It diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 5fc861b..f6d5e70 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -7,7 +7,7 @@ #include "cmOutputConverter.h" cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir) + cmStateDirectory stateDir) : StateDir(stateDir) , OutputConverter(outputConverter) , ForResponse(false) diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index 1fb9b24..59e7357 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -13,7 +13,7 @@ class cmLinkLineComputer { public: cmLinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir); + cmStateDirectory stateDir); virtual ~cmLinkLineComputer(); void SetUseWatcomQuote(bool useWatcomQuote); @@ -39,7 +39,7 @@ private: std::string ConvertToOutputFormat(std::string const& input); std::string ConvertToOutputForExisting(std::string const& input); - cmState::Directory StateDir; + cmStateDirectory StateDir; cmOutputConverter* OutputConverter; bool ForResponse; diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx index 2b6df2a..9308d91 100644 --- a/Source/cmMSVC60LinkLineComputer.cxx +++ b/Source/cmMSVC60LinkLineComputer.cxx @@ -6,7 +6,7 @@ #include "cmSystemTools.h" cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) + cmOutputConverter* outputConverter, cmStateDirectory stateDir) : cmLinkLineComputer(outputConverter, stateDir) { } diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h index ca9da31..381b8a2 100644 --- a/Source/cmMSVC60LinkLineComputer.h +++ b/Source/cmMSVC60LinkLineComputer.h @@ -10,7 +10,7 @@ class cmMSVC60LinkLineComputer : public cmLinkLineComputer { public: cmMSVC60LinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir); + cmStateDirectory stateDir); std::string ConvertToLinkReference(std::string const& input) const CM_OVERRIDE; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index f0502bf..97c430f 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1232,7 +1232,7 @@ class cmMakefileTargetGeneratorObjectStrings public: cmMakefileTargetGeneratorObjectStrings(std::vector& strings, cmOutputConverter* outputConverter, - cmState::Directory stateDir, + cmStateDirectory stateDir, std::string::size_type limit) : Strings(strings) , OutputConverter(outputConverter) @@ -1277,7 +1277,7 @@ private: std::vector& Strings; cmOutputConverter* OutputConverter; - cmState::Directory StateDir; + cmStateDirectory StateDir; std::string::size_type LengthLimit; std::string CurrentString; std::string NextObject; @@ -1553,7 +1553,7 @@ std::string cmMakefileTargetGenerator::CreateResponseFile( } cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) + cmOutputConverter* outputConverter, cmStateDirectory stateDir) { if (this->Makefile->IsOn("MSVC60")) { return this->GlobalGenerator->CreateMSVC60LinkLineComputer(outputConverter, diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 4c61011..e44f64a 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -141,7 +141,7 @@ protected: std::vector& makefile_depends); cmLinkLineComputer* CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir); + cmOutputConverter* outputConverter, cmStateDirectory stateDir); /** Create a response file with the given set of options. Returns the relative path from the target build working directory to the diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx index 3dcb20b..fa9df6d 100644 --- a/Source/cmNinjaLinkLineComputer.cxx +++ b/Source/cmNinjaLinkLineComputer.cxx @@ -5,7 +5,7 @@ #include "cmGlobalNinjaGenerator.h" cmNinjaLinkLineComputer::cmNinjaLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir, + cmOutputConverter* outputConverter, cmStateDirectory stateDir, cmGlobalNinjaGenerator const* gg) : cmLinkLineComputer(outputConverter, stateDir) , GG(gg) diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h index a108568..daecea4 100644 --- a/Source/cmNinjaLinkLineComputer.h +++ b/Source/cmNinjaLinkLineComputer.h @@ -13,7 +13,7 @@ class cmNinjaLinkLineComputer : public cmLinkLineComputer { public: cmNinjaLinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir, + cmStateDirectory stateDir, cmGlobalNinjaGenerator const* gg); std::string ConvertToLinkReference(std::string const& input) const diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 84a433c..a1228e5 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -78,7 +78,7 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) bool cmOutputConverter::ContainedInDirectory(std::string const& local_path, std::string const& remote_path, - cmState::Directory directory) + cmStateDirectory directory) { const std::string relativePathTopBinary = directory.GetRelativePathTopBinary(); diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 71cacab..9e745ec 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -92,7 +92,7 @@ public: static bool ContainedInDirectory(std::string const& local_path, std::string const& remote_path, - cmState::Directory directory); + cmStateDirectory directory); /** * Convert the given remote path to a relative path with respect to https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92040fa48189e503e587b383cd12ffe16443c257 commit 92040fa48189e503e587b383cd12ffe16443c257 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:47 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 23:45:00 2016 +0200 cmState: Move Directory class to separate namespace Leave behind a typedef to avoid porting dependent code in this commit. diff --git a/Source/cmState.cxx b/Source/cmState.cxx index a52374f..31aac63 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -676,7 +676,7 @@ const char* cmState::GetBinaryDirectory() const return this->BinaryDirectory.c_str(); } -void cmState::Directory::ComputeRelativePathTopSource() +void cmStateDirectory::ComputeRelativePathTopSource() { // Relative path conversion inside the source tree is not used to // construct relative paths passed to build tools so it is safe to use @@ -707,7 +707,7 @@ void cmState::Directory::ComputeRelativePathTopSource() this->DirectoryState->RelativePathTopSource = result; } -void cmState::Directory::ComputeRelativePathTopBinary() +void cmStateDirectory::ComputeRelativePathTopBinary() { cmState::Snapshot snapshot = this->Snapshot_; std::vector snapshots; @@ -948,12 +948,12 @@ cmStateEnums::SnapshotType cmState::Snapshot::GetType() const return this->Position->SnapshotType; } -const char* cmState::Directory::GetCurrentSource() const +const char* cmStateDirectory::GetCurrentSource() const { return this->DirectoryState->Location.c_str(); } -void cmState::Directory::SetCurrentSource(std::string const& dir) +void cmStateDirectory::SetCurrentSource(std::string const& dir) { std::string& loc = this->DirectoryState->Location; loc = dir; @@ -965,12 +965,12 @@ void cmState::Directory::SetCurrentSource(std::string const& dir) this->Snapshot_.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", loc); } -const char* cmState::Directory::GetCurrentBinary() const +const char* cmStateDirectory::GetCurrentBinary() const { return this->DirectoryState->OutputLocation.c_str(); } -void cmState::Directory::SetCurrentBinary(std::string const& dir) +void cmStateDirectory::SetCurrentBinary(std::string const& dir) { std::string& loc = this->DirectoryState->OutputLocation; loc = dir; @@ -987,22 +987,22 @@ void cmState::Snapshot::SetListFile(const std::string& listfile) *this->Position->ExecutionListFile = listfile; } -const char* cmState::Directory::GetRelativePathTopSource() const +const char* cmStateDirectory::GetRelativePathTopSource() const { return this->DirectoryState->RelativePathTopSource.c_str(); } -const char* cmState::Directory::GetRelativePathTopBinary() const +const char* cmStateDirectory::GetRelativePathTopBinary() const { return this->DirectoryState->RelativePathTopBinary.c_str(); } -void cmState::Directory::SetRelativePathTopSource(const char* dir) +void cmStateDirectory::SetRelativePathTopSource(const char* dir) { this->DirectoryState->RelativePathTopSource = dir; } -void cmState::Directory::SetRelativePathTopBinary(const char* dir) +void cmStateDirectory::SetRelativePathTopBinary(const char* dir) { this->DirectoryState->RelativePathTopBinary = dir; } @@ -1342,9 +1342,9 @@ cmState* cmState::Snapshot::GetState() const return this->State; } -cmState::Directory cmState::Snapshot::GetDirectory() const +cmStateDirectory cmState::Snapshot::GetDirectory() const { - return Directory(this->Position->BuildSystemDirectory, *this); + return cmStateDirectory(this->Position->BuildSystemDirectory, *this); } void cmState::Snapshot::SetProjectName(const std::string& name) @@ -1369,7 +1369,7 @@ void cmState::Snapshot::InitializeFromParent_ForSubdirsCommand() this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", currentBinDir); } -cmState::Directory::Directory( +cmStateDirectory::cmStateDirectory( cmLinkedTree::iterator iter, const cmState::Snapshot& snapshot) : DirectoryState(iter) @@ -1450,15 +1450,14 @@ void ClearContent(T& content, U& backtraces, V& endContentPosition) endContentPosition = content.size(); } -cmStringRange cmState::Directory::GetIncludeDirectoriesEntries() const +cmStringRange cmStateDirectory::GetIncludeDirectoriesEntries() const { return GetPropertyContent( this->DirectoryState->IncludeDirectories, this->Snapshot_.Position->IncludeDirectoryPosition); } -cmBacktraceRange cmState::Directory::GetIncludeDirectoriesEntryBacktraces() - const +cmBacktraceRange cmStateDirectory::GetIncludeDirectoriesEntryBacktraces() const { return GetPropertyBacktraces( this->DirectoryState->IncludeDirectories, @@ -1466,7 +1465,7 @@ cmBacktraceRange cmState::Directory::GetIncludeDirectoriesEntryBacktraces() this->Snapshot_.Position->IncludeDirectoryPosition); } -void cmState::Directory::AppendIncludeDirectoriesEntry( +void cmStateDirectory::AppendIncludeDirectoriesEntry( const std::string& vec, const cmListFileBacktrace& lfbt) { AppendEntry(this->DirectoryState->IncludeDirectories, @@ -1474,7 +1473,7 @@ void cmState::Directory::AppendIncludeDirectoriesEntry( this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); } -void cmState::Directory::PrependIncludeDirectoriesEntry( +void cmStateDirectory::PrependIncludeDirectoriesEntry( const std::string& vec, const cmListFileBacktrace& lfbt) { std::vector::iterator entryEnd = @@ -1502,30 +1501,29 @@ void cmState::Directory::PrependIncludeDirectoriesEntry( this->DirectoryState->IncludeDirectories.size(); } -void cmState::Directory::SetIncludeDirectories(const std::string& vec, - const cmListFileBacktrace& lfbt) +void cmStateDirectory::SetIncludeDirectories(const std::string& vec, + const cmListFileBacktrace& lfbt) { SetContent(this->DirectoryState->IncludeDirectories, this->DirectoryState->IncludeDirectoryBacktraces, this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); } -void cmState::Directory::ClearIncludeDirectories() +void cmStateDirectory::ClearIncludeDirectories() { ClearContent(this->DirectoryState->IncludeDirectories, this->DirectoryState->IncludeDirectoryBacktraces, this->Snapshot_.Position->IncludeDirectoryPosition); } -cmStringRange cmState::Directory::GetCompileDefinitionsEntries() const +cmStringRange cmStateDirectory::GetCompileDefinitionsEntries() const { return GetPropertyContent( this->DirectoryState->CompileDefinitions, this->Snapshot_.Position->CompileDefinitionsPosition); } -cmBacktraceRange cmState::Directory::GetCompileDefinitionsEntryBacktraces() - const +cmBacktraceRange cmStateDirectory::GetCompileDefinitionsEntryBacktraces() const { return GetPropertyBacktraces( this->DirectoryState->CompileDefinitions, @@ -1533,7 +1531,7 @@ cmBacktraceRange cmState::Directory::GetCompileDefinitionsEntryBacktraces() this->Snapshot_.Position->CompileDefinitionsPosition); } -void cmState::Directory::AppendCompileDefinitionsEntry( +void cmStateDirectory::AppendCompileDefinitionsEntry( const std::string& vec, const cmListFileBacktrace& lfbt) { AppendEntry(this->DirectoryState->CompileDefinitions, @@ -1541,28 +1539,28 @@ void cmState::Directory::AppendCompileDefinitionsEntry( this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); } -void cmState::Directory::SetCompileDefinitions(const std::string& vec, - const cmListFileBacktrace& lfbt) +void cmStateDirectory::SetCompileDefinitions(const std::string& vec, + const cmListFileBacktrace& lfbt) { SetContent(this->DirectoryState->CompileDefinitions, this->DirectoryState->CompileDefinitionsBacktraces, this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); } -void cmState::Directory::ClearCompileDefinitions() +void cmStateDirectory::ClearCompileDefinitions() { ClearContent(this->DirectoryState->CompileDefinitions, this->DirectoryState->CompileDefinitionsBacktraces, this->Snapshot_.Position->CompileDefinitionsPosition); } -cmStringRange cmState::Directory::GetCompileOptionsEntries() const +cmStringRange cmStateDirectory::GetCompileOptionsEntries() const { return GetPropertyContent(this->DirectoryState->CompileOptions, this->Snapshot_.Position->CompileOptionsPosition); } -cmBacktraceRange cmState::Directory::GetCompileOptionsEntryBacktraces() const +cmBacktraceRange cmStateDirectory::GetCompileOptionsEntryBacktraces() const { return GetPropertyBacktraces( this->DirectoryState->CompileOptions, @@ -1570,7 +1568,7 @@ cmBacktraceRange cmState::Directory::GetCompileOptionsEntryBacktraces() const this->Snapshot_.Position->CompileOptionsPosition); } -void cmState::Directory::AppendCompileOptionsEntry( +void cmStateDirectory::AppendCompileOptionsEntry( const std::string& vec, const cmListFileBacktrace& lfbt) { AppendEntry(this->DirectoryState->CompileOptions, @@ -1578,15 +1576,15 @@ void cmState::Directory::AppendCompileOptionsEntry( this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); } -void cmState::Directory::SetCompileOptions(const std::string& vec, - const cmListFileBacktrace& lfbt) +void cmStateDirectory::SetCompileOptions(const std::string& vec, + const cmListFileBacktrace& lfbt) { SetContent(this->DirectoryState->CompileOptions, this->DirectoryState->CompileOptionsBacktraces, this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); } -void cmState::Directory::ClearCompileOptions() +void cmStateDirectory::ClearCompileOptions() { ClearContent(this->DirectoryState->CompileOptions, this->DirectoryState->CompileOptionsBacktraces, @@ -1599,9 +1597,8 @@ bool cmState::Snapshot::StrictWeakOrder::operator()( return lhs.Position.StrictWeakOrdered(rhs.Position); } -void cmState::Directory::SetProperty(const std::string& prop, - const char* value, - cmListFileBacktrace const& lfbt) +void cmStateDirectory::SetProperty(const std::string& prop, const char* value, + cmListFileBacktrace const& lfbt) { if (prop == "INCLUDE_DIRECTORIES") { if (!value) { @@ -1631,9 +1628,9 @@ void cmState::Directory::SetProperty(const std::string& prop, this->DirectoryState->Properties.SetProperty(prop, value); } -void cmState::Directory::AppendProperty(const std::string& prop, - const char* value, bool asString, - cmListFileBacktrace const& lfbt) +void cmStateDirectory::AppendProperty(const std::string& prop, + const char* value, bool asString, + cmListFileBacktrace const& lfbt) { if (prop == "INCLUDE_DIRECTORIES") { this->AppendIncludeDirectoriesEntry(value, lfbt); @@ -1651,15 +1648,15 @@ void cmState::Directory::AppendProperty(const std::string& prop, this->DirectoryState->Properties.AppendProperty(prop, value, asString); } -const char* cmState::Directory::GetProperty(const std::string& prop) const +const char* cmStateDirectory::GetProperty(const std::string& prop) const { const bool chain = this->Snapshot_.State->IsPropertyChained(prop, cmProperty::DIRECTORY); return this->GetProperty(prop, chain); } -const char* cmState::Directory::GetProperty(const std::string& prop, - bool chain) const +const char* cmStateDirectory::GetProperty(const std::string& prop, + bool chain) const { static std::string output; output = ""; @@ -1733,7 +1730,8 @@ const char* cmState::Directory::GetProperty(const std::string& prop, const char* retVal = this->DirectoryState->Properties.GetPropertyValue(prop); if (!retVal && chain) { - Snapshot parentSnapshot = this->Snapshot_.GetBuildsystemDirectoryParent(); + cmState::Snapshot parentSnapshot = + this->Snapshot_.GetBuildsystemDirectoryParent(); if (parentSnapshot.IsValid()) { return parentSnapshot.GetDirectory().GetProperty(prop, chain); } @@ -1743,12 +1741,12 @@ const char* cmState::Directory::GetProperty(const std::string& prop, return retVal; } -bool cmState::Directory::GetPropertyAsBool(const std::string& prop) const +bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const { return cmSystemTools::IsOn(this->GetProperty(prop)); } -std::vector cmState::Directory::GetPropertyKeys() const +std::vector cmStateDirectory::GetPropertyKeys() const { std::vector keys; keys.reserve(this->DirectoryState->Properties.size()); @@ -1760,7 +1758,7 @@ std::vector cmState::Directory::GetPropertyKeys() const return keys; } -void cmState::Directory::AddNormalTargetName(std::string const& name) +void cmStateDirectory::AddNormalTargetName(std::string const& name) { this->DirectoryState->NormalTargetNames.push_back(name); } diff --git a/Source/cmState.h b/Source/cmState.h index fdbbc98..843a5cf 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -68,6 +68,8 @@ enum CacheEntryType }; } +class cmStateDirectory; + class cmState { @@ -75,7 +77,7 @@ public: cmState(); ~cmState(); - class Directory; + typedef cmStateDirectory Directory; class Snapshot { @@ -112,7 +114,7 @@ public: cmState* GetState() const; - Directory GetDirectory() const; + cmStateDirectory GetDirectory() const; void SetProjectName(std::string const& name); std::string GetProjectName() const; @@ -134,7 +136,7 @@ public: friend bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); friend class cmState; - friend class Directory; + friend class cmStateDirectory; friend struct StrictWeakOrder; void InitializeFromParent(); @@ -143,71 +145,6 @@ public: cmStateDetail::PositionType Position; }; - class Directory - { - Directory(cmLinkedTree< - cmStateDetail::BuildsystemDirectoryStateType>::iterator iter, - Snapshot const& snapshot); - - public: - const char* GetCurrentSource() const; - void SetCurrentSource(std::string const& dir); - const char* GetCurrentBinary() const; - void SetCurrentBinary(std::string const& dir); - - const char* GetRelativePathTopSource() const; - const char* GetRelativePathTopBinary() const; - void SetRelativePathTopSource(const char* dir); - void SetRelativePathTopBinary(const char* dir); - - cmStringRange GetIncludeDirectoriesEntries() const; - cmBacktraceRange GetIncludeDirectoriesEntryBacktraces() const; - void AppendIncludeDirectoriesEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void PrependIncludeDirectoriesEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetIncludeDirectories(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearIncludeDirectories(); - - cmStringRange GetCompileDefinitionsEntries() const; - cmBacktraceRange GetCompileDefinitionsEntryBacktraces() const; - void AppendCompileDefinitionsEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetCompileDefinitions(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearCompileDefinitions(); - - cmStringRange GetCompileOptionsEntries() const; - cmBacktraceRange GetCompileOptionsEntryBacktraces() const; - void AppendCompileOptionsEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetCompileOptions(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearCompileOptions(); - - void SetProperty(const std::string& prop, const char* value, - cmListFileBacktrace const& lfbt); - void AppendProperty(const std::string& prop, const char* value, - bool asString, cmListFileBacktrace const& lfbt); - const char* GetProperty(const std::string& prop) const; - const char* GetProperty(const std::string& prop, bool chain) const; - bool GetPropertyAsBool(const std::string& prop) const; - std::vector GetPropertyKeys() const; - - void AddNormalTargetName(std::string const& name); - - private: - void ComputeRelativePathTopSource(); - void ComputeRelativePathTopBinary(); - - private: - cmLinkedTree::iterator - DirectoryState; - Snapshot Snapshot_; - friend class Snapshot; - }; - static const char* GetTargetTypeName(cmStateEnums::TargetType targetType); Snapshot CreateBaseSnapshot(); @@ -358,6 +295,71 @@ private: bool MSYSShell; }; +class cmStateDirectory +{ + cmStateDirectory( + cmLinkedTree::iterator iter, + cmState::Snapshot const& snapshot); + +public: + const char* GetCurrentSource() const; + void SetCurrentSource(std::string const& dir); + const char* GetCurrentBinary() const; + void SetCurrentBinary(std::string const& dir); + + const char* GetRelativePathTopSource() const; + const char* GetRelativePathTopBinary() const; + void SetRelativePathTopSource(const char* dir); + void SetRelativePathTopBinary(const char* dir); + + cmStringRange GetIncludeDirectoriesEntries() const; + cmBacktraceRange GetIncludeDirectoriesEntryBacktraces() const; + void AppendIncludeDirectoriesEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void PrependIncludeDirectoriesEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetIncludeDirectories(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearIncludeDirectories(); + + cmStringRange GetCompileDefinitionsEntries() const; + cmBacktraceRange GetCompileDefinitionsEntryBacktraces() const; + void AppendCompileDefinitionsEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetCompileDefinitions(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearCompileDefinitions(); + + cmStringRange GetCompileOptionsEntries() const; + cmBacktraceRange GetCompileOptionsEntryBacktraces() const; + void AppendCompileOptionsEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetCompileOptions(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearCompileOptions(); + + void SetProperty(const std::string& prop, const char* value, + cmListFileBacktrace const& lfbt); + void AppendProperty(const std::string& prop, const char* value, + bool asString, cmListFileBacktrace const& lfbt); + const char* GetProperty(const std::string& prop) const; + const char* GetProperty(const std::string& prop, bool chain) const; + bool GetPropertyAsBool(const std::string& prop) const; + std::vector GetPropertyKeys() const; + + void AddNormalTargetName(std::string const& name); + +private: + void ComputeRelativePathTopSource(); + void ComputeRelativePathTopBinary(); + +private: + cmLinkedTree::iterator + DirectoryState; + cmState::Snapshot Snapshot_; + friend class cmState::Snapshot; +}; + bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fb87e0913d808518125f3e6c4ad901e9817a570 commit 6fb87e0913d808518125f3e6c4ad901e9817a570 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:47 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 23:44:59 2016 +0200 cmState: Move CacheEntryType enum to separate namespace Port dependent code to the change. diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx index 5268a5d..3b81c65 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.cxx +++ b/Source/CursesDialog/cmCursesBoolWidget.cxx @@ -11,7 +11,7 @@ cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { - this->Type = cmState::BOOL; + this->Type = cmStateEnums::BOOL; set_field_fore(this->Field, A_NORMAL); set_field_back(this->Field, A_STANDOUT); field_opts_off(this->Field, O_STATIC); diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 93785e0..46c0d0c 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -47,7 +47,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( const char* value = cm->GetState()->GetCacheEntryValue(key); assert(value); switch (cm->GetState()->GetCacheEntryType(key)) { - case cmState::BOOL: + case cmStateEnums::BOOL: this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1); if (cmSystemTools::IsOn(value)) { static_cast(this->Entry)->SetValueAsBool(true); @@ -55,15 +55,15 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( static_cast(this->Entry)->SetValueAsBool(false); } break; - case cmState::PATH: + case cmStateEnums::PATH: this->Entry = new cmCursesPathWidget(this->EntryWidth, 1, 1, 1); static_cast(this->Entry)->SetString(value); break; - case cmState::FILEPATH: + case cmStateEnums::FILEPATH: this->Entry = new cmCursesFilePathWidget(this->EntryWidth, 1, 1, 1); static_cast(this->Entry)->SetString(value); break; - case cmState::STRING: { + case cmStateEnums::STRING: { const char* stringsProp = cm->GetState()->GetCacheEntryProperty(key, "STRINGS"); if (stringsProp) { @@ -83,7 +83,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( } break; } - case cmState::UNINITIALIZED: + case cmStateEnums::UNINITIALIZED: cmSystemTools::Error("Found an undefined variable: ", key.c_str()); break; default: diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx index 61d07e2..b5a1daa 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.cxx +++ b/Source/CursesDialog/cmCursesDummyWidget.cxx @@ -9,7 +9,7 @@ cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { - this->Type = cmState::INTERNAL; + this->Type = cmStateEnums::INTERNAL; } bool cmCursesDummyWidget::HandleInput(int& /*key*/, cmCursesMainForm* /*fm*/, diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx index 670c50f..ee5f2d7 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.cxx +++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx @@ -9,5 +9,5 @@ cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left, int top) : cmCursesPathWidget(width, height, left, top) { - this->Type = cmState::FILEPATH; + this->Type = cmStateEnums::FILEPATH; } diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 0c3d29d..0db0200 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -106,10 +106,10 @@ void cmCursesMainForm::InitializeUI() for (std::vector::const_iterator it = cacheKeys.begin(); it != cacheKeys.end(); ++it) { - cmState::CacheEntryType t = + cmStateEnums::CacheEntryType t = this->CMakeInstance->GetState()->GetCacheEntryType(*it); - if (t != cmState::INTERNAL && t != cmState::STATIC && - t != cmState::UNINITIALIZED) { + if (t != cmStateEnums::INTERNAL && t != cmStateEnums::STATIC && + t != cmStateEnums::UNINITIALIZED) { ++count; } } @@ -130,10 +130,10 @@ void cmCursesMainForm::InitializeUI() for (std::vector::const_iterator it = cacheKeys.begin(); it != cacheKeys.end(); ++it) { std::string key = *it; - cmState::CacheEntryType t = + cmStateEnums::CacheEntryType t = this->CMakeInstance->GetState()->GetCacheEntryType(*it); - if (t == cmState::INTERNAL || t == cmState::STATIC || - t == cmState::UNINITIALIZED) { + if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC || + t == cmStateEnums::UNINITIALIZED) { continue; } @@ -148,10 +148,10 @@ void cmCursesMainForm::InitializeUI() for (std::vector::const_iterator it = cacheKeys.begin(); it != cacheKeys.end(); ++it) { std::string key = *it; - cmState::CacheEntryType t = + cmStateEnums::CacheEntryType t = this->CMakeInstance->GetState()->GetCacheEntryType(*it); - if (t == cmState::INTERNAL || t == cmState::STATIC || - t == cmState::UNINITIALIZED) { + if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC || + t == cmStateEnums::UNINITIALIZED) { continue; } @@ -249,8 +249,9 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) cmCursesWidget* cw = reinterpret_cast(field_userptr(currentField)); // If in edit mode, get out of it - if (cw->GetType() == cmState::STRING || cw->GetType() == cmState::PATH || - cw->GetType() == cmState::FILEPATH) { + if (cw->GetType() == cmStateEnums::STRING || + cw->GetType() == cmStateEnums::PATH || + cw->GetType() == cmStateEnums::FILEPATH) { cmCursesStringWidget* sw = static_cast(cw); sw->SetInEdit(false); } @@ -704,7 +705,7 @@ void cmCursesMainForm::FillCacheManagerFromUI() std::string newValue = (*this->Entries)[i]->Entry->GetValue(); std::string fixedOldValue; std::string fixedNewValue; - cmState::CacheEntryType t = + cmStateEnums::CacheEntryType t = this->CMakeInstance->GetState()->GetCacheEntryType(cacheKey); this->FixValue(t, oldValue, fixedOldValue); this->FixValue(t, newValue, fixedNewValue); @@ -720,14 +721,14 @@ void cmCursesMainForm::FillCacheManagerFromUI() } } -void cmCursesMainForm::FixValue(cmState::CacheEntryType type, +void cmCursesMainForm::FixValue(cmStateEnums::CacheEntryType type, const std::string& in, std::string& out) const { out = in.substr(0, in.find_last_not_of(' ') + 1); - if (type == cmState::PATH || type == cmState::FILEPATH) { + if (type == cmStateEnums::PATH || type == cmStateEnums::FILEPATH) { cmSystemTools::ConvertToUnixSlashes(out); } - if (type == cmState::BOOL) { + if (type == cmStateEnums::BOOL) { if (cmSystemTools::IsOff(out.c_str())) { out = "OFF"; } else { diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index 4bf452d..10ae960 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -110,7 +110,7 @@ protected: // cache. void FillCacheManagerFromUI(); // Fix formatting of values to a consistent form. - void FixValue(cmState::CacheEntryType type, const std::string& in, + void FixValue(cmStateEnums::CacheEntryType type, const std::string& in, std::string& out) const; // Re-post the existing fields. Used to toggle between // normal and advanced modes. Render() should be called diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx index e23a82d..1b752a6 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.cxx +++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx @@ -11,7 +11,7 @@ cmCursesOptionsWidget::cmCursesOptionsWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { - this->Type = cmState::BOOL; // this is a bit of a hack + this->Type = cmStateEnums::BOOL; // this is a bit of a hack // there is no option type, and string type causes ccmake to cast // the widget into a string widget at some point. BOOL is safe for // now. diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx index d208598..3f96436 100644 --- a/Source/CursesDialog/cmCursesPathWidget.cxx +++ b/Source/CursesDialog/cmCursesPathWidget.cxx @@ -13,7 +13,7 @@ cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left, int top) : cmCursesStringWidget(width, height, left, top) { - this->Type = cmState::PATH; + this->Type = cmStateEnums::PATH; this->Cycle = false; this->CurrentIndex = 0; } @@ -50,7 +50,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w) std::vector dirs; cmSystemTools::SimpleGlob(glob, dirs, - (this->Type == cmState::PATH ? -1 : 0)); + (this->Type == cmStateEnums::PATH ? -1 : 0)); if (this->CurrentIndex < dirs.size()) { cstr = dirs[this->CurrentIndex]; } diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index f068f67..0f67d23 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -21,7 +21,7 @@ cmCursesStringWidget::cmCursesStringWidget(int width, int height, int left, : cmCursesWidget(width, height, left, top) { this->InEdit = false; - this->Type = cmState::STRING; + this->Type = cmStateEnums::STRING; set_field_fore(this->Field, A_NORMAL); set_field_back(this->Field, A_STANDOUT); field_opts_off(this->Field, O_STATIC); diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index bb26cf6..1ef4ab2 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -41,7 +41,7 @@ public: /** * Get the type of the widget (STRING, PATH etc...) */ - cmState::CacheEntryType GetType() { return this->Type; } + cmStateEnums::CacheEntryType GetType() { return this->Type; } /** * If there are any, print the widget specific commands @@ -62,7 +62,7 @@ protected: cmCursesWidget(const cmCursesWidget& from); void operator=(const cmCursesWidget&); - cmState::CacheEntryType Type; + cmStateEnums::CacheEntryType Type; std::string Value; FIELD* Field; // The page in the main form this widget is in diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index cfb10f3..abeff97 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -196,8 +196,8 @@ void QCMake::setProperties(const QCMakePropertyList& newProps) std::vector cacheKeys = state->GetCacheEntryKeys(); for (std::vector::const_iterator it = cacheKeys.begin(); it != cacheKeys.end(); ++it) { - cmState::CacheEntryType t = state->GetCacheEntryType(*it); - if (t == cmState::INTERNAL || t == cmState::STATIC) { + cmStateEnums::CacheEntryType t = state->GetCacheEntryType(*it); + if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC) { continue; } @@ -232,19 +232,19 @@ void QCMake::setProperties(const QCMakePropertyList& newProps) if (s.Type == QCMakeProperty::BOOL) { this->CMakeInstance->AddCacheEntry( s.Key.toLocal8Bit().data(), s.Value.toBool() ? "ON" : "OFF", - s.Help.toLocal8Bit().data(), cmState::BOOL); + s.Help.toLocal8Bit().data(), cmStateEnums::BOOL); } else if (s.Type == QCMakeProperty::STRING) { this->CMakeInstance->AddCacheEntry( s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(), - s.Help.toLocal8Bit().data(), cmState::STRING); + s.Help.toLocal8Bit().data(), cmStateEnums::STRING); } else if (s.Type == QCMakeProperty::PATH) { this->CMakeInstance->AddCacheEntry( s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(), - s.Help.toLocal8Bit().data(), cmState::PATH); + s.Help.toLocal8Bit().data(), cmStateEnums::PATH); } else if (s.Type == QCMakeProperty::FILEPATH) { this->CMakeInstance->AddCacheEntry( s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(), - s.Help.toLocal8Bit().data(), cmState::FILEPATH); + s.Help.toLocal8Bit().data(), cmStateEnums::FILEPATH); } } @@ -259,9 +259,9 @@ QCMakePropertyList QCMake::properties() const std::vector cacheKeys = state->GetCacheEntryKeys(); for (std::vector::const_iterator i = cacheKeys.begin(); i != cacheKeys.end(); ++i) { - cmState::CacheEntryType t = state->GetCacheEntryType(*i); - if (t == cmState::INTERNAL || t == cmState::STATIC || - t == cmState::UNINITIALIZED) { + cmStateEnums::CacheEntryType t = state->GetCacheEntryType(*i); + if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC || + t == cmStateEnums::UNINITIALIZED) { continue; } @@ -273,14 +273,14 @@ QCMakePropertyList QCMake::properties() const QString::fromLocal8Bit(state->GetCacheEntryProperty(*i, "HELPSTRING")); prop.Value = QString::fromLocal8Bit(cachedValue); prop.Advanced = state->GetCacheEntryPropertyAsBool(*i, "ADVANCED"); - if (t == cmState::BOOL) { + if (t == cmStateEnums::BOOL) { prop.Type = QCMakeProperty::BOOL; prop.Value = cmSystemTools::IsOn(cachedValue); - } else if (t == cmState::PATH) { + } else if (t == cmStateEnums::PATH) { prop.Type = QCMakeProperty::PATH; - } else if (t == cmState::FILEPATH) { + } else if (t == cmStateEnums::FILEPATH) { prop.Type = QCMakeProperty::FILEPATH; - } else if (t == cmState::STRING) { + } else if (t == cmStateEnums::STRING) { prop.Type = QCMakeProperty::STRING; const char* stringsProperty = state->GetCacheEntryProperty(*i, "STRINGS"); diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx index 365a426..8aa4102 100644 --- a/Source/cmBuildCommand.cxx +++ b/Source/cmBuildCommand.cxx @@ -116,6 +116,6 @@ bool cmBuildCommand::TwoArgsSignature(std::vector const& args) this->Makefile->AddCacheDefinition(define, makecommand.c_str(), "Command used to build entire project " "from the command line.", - cmState::STRING); + cmStateEnums::STRING); return true; } diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx index 9134b9a..816147b 100644 --- a/Source/cmBuildNameCommand.cxx +++ b/Source/cmBuildNameCommand.cxx @@ -27,7 +27,7 @@ bool cmBuildNameCommand::InitialPass(std::vector const& args, std::replace(cv.begin(), cv.end(), '(', '_'); std::replace(cv.begin(), cv.end(), ')', '_'); this->Makefile->AddCacheDefinition(args[0], cv.c_str(), "Name of build.", - cmState::STRING); + cmStateEnums::STRING); } return true; } @@ -53,6 +53,6 @@ bool cmBuildNameCommand::InitialPass(std::vector const& args, std::replace(buildname.begin(), buildname.end(), ')', '_'); this->Makefile->AddCacheDefinition(args[0], buildname.c_str(), - "Name of build.", cmState::STRING); + "Name of build.", cmStateEnums::STRING); return true; } diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index eea76f2..36ffd7c 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -79,7 +79,7 @@ bool cmCMakePolicyCommand::HandleSetMode(std::vector const& args) "For backwards compatibility, what version of CMake " "commands and " "syntax should this version of CMake try to support.", - cmState::STRING); + cmStateEnums::STRING); } } return true; diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 98e18ed..155456a 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -75,22 +75,22 @@ void CCONV cmAddCacheDefinition(void* arg, const char* name, const char* value, switch (type) { case CM_CACHE_BOOL: - mf->AddCacheDefinition(name, value, doc, cmState::BOOL); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::BOOL); break; case CM_CACHE_PATH: - mf->AddCacheDefinition(name, value, doc, cmState::PATH); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::PATH); break; case CM_CACHE_FILEPATH: - mf->AddCacheDefinition(name, value, doc, cmState::FILEPATH); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::FILEPATH); break; case CM_CACHE_STRING: - mf->AddCacheDefinition(name, value, doc, cmState::STRING); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::STRING); break; case CM_CACHE_INTERNAL: - mf->AddCacheDefinition(name, value, doc, cmState::INTERNAL); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::INTERNAL); break; case CM_CACHE_STATIC: - mf->AddCacheDefinition(name, value, doc, cmState::STATIC); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::STATIC); break; } } diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 7dc9e33..3a37eeb 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1969,7 +1969,7 @@ bool cmCTest::AddVariableDefinition(const std::string& arg) { std::string name; std::string value; - cmState::CacheEntryType type = cmState::UNINITIALIZED; + cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED; if (cmake::ParseCacheEntry(arg, name, value, type)) { this->Definitions[name] = value; diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 4b03499..e84012c 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -94,13 +94,13 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal, // If the entry is not internal to the cache being loaded // or if it is in the list of internal entries to be // imported, load it. - if (internal || (e.Type != cmState::INTERNAL) || + if (internal || (e.Type != cmStateEnums::INTERNAL) || (includes.find(entryKey) != includes.end())) { // If we are loading the cache from another project, // make all loaded entries internal so that it is // not visible in the gui if (!internal) { - e.Type = cmState::INTERNAL; + e.Type = cmStateEnums::INTERNAL; helpString = "DO NOT EDIT, "; helpString += entryKey; helpString += " loaded from external file. " @@ -142,11 +142,11 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal, this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", "0", "Minor version of cmake used to create the " "current loaded cache", - cmState::INTERNAL); + cmStateEnums::INTERNAL); this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", "0", "Major version of cmake used to create the " "current loaded cache", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } // check to make sure the cache directory has not // been moved @@ -178,7 +178,7 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey, CacheEntry& e) { // All property entries are internal. - if (e.Type != cmState::INTERNAL) { + if (e.Type != cmStateEnums::INTERNAL) { return false; } @@ -192,7 +192,7 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey, if (it.IsAtEnd()) { // Create an entry and store the property. CacheEntry& ne = this->Cache[key]; - ne.Type = cmState::UNINITIALIZED; + ne.Type = cmStateEnums::UNINITIALIZED; ne.SetProperty(*p, e.Value.c_str()); } else { // Store this property on its entry. @@ -244,17 +244,17 @@ bool cmCacheManager::SaveCache(const std::string& path) this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", temp, "Minor version of cmake used to create the " "current loaded cache", - cmState::INTERNAL); + cmStateEnums::INTERNAL); sprintf(temp, "%d", cmVersion::GetMajorVersion()); this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", temp, "Major version of cmake used to create the " "current loaded cache", - cmState::INTERNAL); + cmStateEnums::INTERNAL); sprintf(temp, "%d", cmVersion::GetPatchVersion()); this->AddCacheEntry("CMAKE_CACHE_PATCH_VERSION", temp, "Patch version of cmake used to create the " "current loaded cache", - cmState::INTERNAL); + cmStateEnums::INTERNAL); // Let us store the current working directory so that if somebody // Copies it, he will not be surprised @@ -268,7 +268,7 @@ bool cmCacheManager::SaveCache(const std::string& path) this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(), "This is the directory where this CMakeCache.txt" " was created", - cmState::INTERNAL); + cmStateEnums::INTERNAL); /* clang-format off */ fout << "# This is the CMakeCache file.\n" @@ -301,14 +301,14 @@ bool cmCacheManager::SaveCache(const std::string& path) this->Cache.begin(); i != this->Cache.end(); ++i) { const CacheEntry& ce = (*i).second; - cmState::CacheEntryType t = ce.Type; + cmStateEnums::CacheEntryType t = ce.Type; if (!ce.Initialized) { /* // This should be added in, but is not for now. cmSystemTools::Error("Cache entry \"", (*i).first.c_str(), "\" is uninitialized"); */ - } else if (t != cmState::INTERNAL) { + } else if (t != cmStateEnums::INTERNAL) { // Format is key:type=value if (const char* help = ce.GetProperty("HELPSTRING")) { cmCacheManager::OutputHelpString(fout, help); @@ -334,9 +334,9 @@ bool cmCacheManager::SaveCache(const std::string& path) continue; } - cmState::CacheEntryType t = i.GetType(); + cmStateEnums::CacheEntryType t = i.GetType(); this->WritePropertyEntries(fout, i); - if (t == cmState::INTERNAL) { + if (t == cmStateEnums::INTERNAL) { // Format is key:type=value if (const char* help = i.GetProperty("HELPSTRING")) { this->OutputHelpString(fout, help); @@ -465,7 +465,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const for (std::map::const_iterator i = this->Cache.begin(); i != this->Cache.end(); ++i) { - if ((*i).second.Type != cmState::INTERNAL) { + if ((*i).second.Type != cmStateEnums::INTERNAL) { out << (*i).first << " = " << (*i).second.Value << std::endl; } } @@ -477,7 +477,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const void cmCacheManager::AddCacheEntry(const std::string& key, const char* value, const char* helpString, - cmState::CacheEntryType type) + cmStateEnums::CacheEntryType type) { CacheEntry& e = this->Cache[key]; if (value) { @@ -488,7 +488,7 @@ void cmCacheManager::AddCacheEntry(const std::string& key, const char* value, } e.Type = type; // make sure we only use unix style paths - if (type == cmState::FILEPATH || type == cmState::PATH) { + if (type == cmStateEnums::FILEPATH || type == cmStateEnums::PATH) { if (e.Value.find(';') != e.Value.npos) { std::vector paths; cmSystemTools::ExpandListArgument(e.Value, paths); diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index 16a2e78..90731f5 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -34,7 +34,7 @@ private: struct CacheEntry { std::string Value; - cmState::CacheEntryType Type; + cmStateEnums::CacheEntryType Type; cmPropertyMap Properties; std::vector GetPropertyList() const; const char* GetProperty(const std::string&) const; @@ -44,7 +44,7 @@ private: bool Initialized; CacheEntry() : Value("") - , Type(cmState::UNINITIALIZED) + , Type(cmStateEnums::UNINITIALIZED) , Initialized(false) { } @@ -70,8 +70,14 @@ public: const char* GetValue() const { return this->GetEntry().Value.c_str(); } bool GetValueAsBool() const; void SetValue(const char*); - cmState::CacheEntryType GetType() const { return this->GetEntry().Type; } - void SetType(cmState::CacheEntryType ty) { this->GetEntry().Type = ty; } + cmStateEnums::CacheEntryType GetType() const + { + return this->GetEntry().Type; + } + void SetType(cmStateEnums::CacheEntryType ty) + { + this->GetEntry().Type = ty; + } bool Initialized() { return this->GetEntry().Initialized; } cmCacheManager& Container; std::map::iterator Position; @@ -137,7 +143,7 @@ public: return this->GetCacheIterator(key.c_str()).GetProperty(propName); } - cmState::CacheEntryType GetCacheEntryType(std::string const& key) + cmStateEnums::CacheEntryType GetCacheEntryType(std::string const& key) { return this->GetCacheIterator(key.c_str()).GetType(); } @@ -200,7 +206,8 @@ public: protected: ///! Add an entry into the cache void AddCacheEntry(const std::string& key, const char* value, - const char* helpString, cmState::CacheEntryType type); + const char* helpString, + cmStateEnums::CacheEntryType type); ///! Get a cache entry object for a key CacheEntry* GetCacheEntry(const std::string& key); diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index cafba86..e4a97a1 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -531,7 +531,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, // set the result var to the return value to indicate success or failure this->Makefile->AddCacheDefinition(argv[0], (res == 0 ? "TRUE" : "FALSE"), "Result of TRY_COMPILE", - cmState::INTERNAL); + cmStateEnums::INTERNAL); if (!outputVariable.empty()) { this->Makefile->AddDefinition(outputVariable, output.c_str()); diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 7535e8c..b50db25 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -230,7 +230,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out, // in the cache valueToUse = envVarValue; mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(), - cacheEntryName.c_str(), cmState::STRING, true); + cacheEntryName.c_str(), cmStateEnums::STRING, true); mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory()); } else if (!envVarSet && cacheValue != CM_NULLPTR) { // It is already in the cache, but not in the env, so use it from the cache @@ -245,7 +245,8 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out, if (valueToUse.find(envVarValue) == std::string::npos) { valueToUse = envVarValue; mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(), - cacheEntryName.c_str(), cmState::STRING, true); + cacheEntryName.c_str(), cmStateEnums::STRING, + true); mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory()); } } diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 982d740..b8b3463 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -308,7 +308,7 @@ bool cmFindBase::CheckForVariableInCache() // this. if (cached && state->GetCacheEntryType(this->VariableName) == - cmState::UNINITIALIZED) { + cmStateEnums::UNINITIALIZED) { this->AlreadyInCacheWithoutMetaInfo = true; } return true; diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 082350f..2909209 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -26,7 +26,7 @@ bool cmFindLibraryCommand::InitialPass(std::vector const& argsIn, if (this->AlreadyInCacheWithoutMetaInfo) { this->Makefile->AddCacheDefinition(this->VariableName, "", this->VariableDocumentation.c_str(), - cmState::FILEPATH); + cmStateEnums::FILEPATH); } return true; } @@ -52,13 +52,13 @@ bool cmFindLibraryCommand::InitialPass(std::vector const& argsIn, // Save the value in the cache this->Makefile->AddCacheDefinition(this->VariableName, library.c_str(), this->VariableDocumentation.c_str(), - cmState::FILEPATH); + cmStateEnums::FILEPATH); return true; } std::string notfound = this->VariableName + "-NOTFOUND"; this->Makefile->AddCacheDefinition(this->VariableName, notfound.c_str(), this->VariableDocumentation.c_str(), - cmState::FILEPATH); + cmStateEnums::FILEPATH); return true; } diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 554618e..5723999 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -890,7 +890,7 @@ bool cmFindPackageCommand::FindConfig() help += "."; // We force the value since we do not get here if it was already set. this->Makefile->AddCacheDefinition(this->Variable, init.c_str(), - help.c_str(), cmState::PATH, true); + help.c_str(), cmStateEnums::PATH, true); return found; } diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 35929fe..7d37185 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -26,7 +26,8 @@ bool cmFindPathCommand::InitialPass(std::vector const& argsIn, if (this->AlreadyInCacheWithoutMetaInfo) { this->Makefile->AddCacheDefinition( this->VariableName, "", this->VariableDocumentation.c_str(), - (this->IncludeFileInPath ? cmState::FILEPATH : cmState::PATH)); + (this->IncludeFileInPath ? cmStateEnums::FILEPATH + : cmStateEnums::PATH)); } return true; } @@ -35,13 +36,13 @@ bool cmFindPathCommand::InitialPass(std::vector const& argsIn, if (!result.empty()) { this->Makefile->AddCacheDefinition( this->VariableName, result.c_str(), this->VariableDocumentation.c_str(), - (this->IncludeFileInPath) ? cmState::FILEPATH : cmState::PATH); + (this->IncludeFileInPath) ? cmStateEnums::FILEPATH : cmStateEnums::PATH); return true; } this->Makefile->AddCacheDefinition( this->VariableName, (this->VariableName + "-NOTFOUND").c_str(), this->VariableDocumentation.c_str(), - (this->IncludeFileInPath) ? cmState::FILEPATH : cmState::PATH); + (this->IncludeFileInPath) ? cmStateEnums::FILEPATH : cmStateEnums::PATH); return true; } diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index a6f2518..9886860 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -90,7 +90,7 @@ bool cmFindProgramCommand::InitialPass(std::vector const& argsIn, if (this->AlreadyInCacheWithoutMetaInfo) { this->Makefile->AddCacheDefinition(this->VariableName, "", this->VariableDocumentation.c_str(), - cmState::FILEPATH); + cmStateEnums::FILEPATH); } return true; } @@ -100,13 +100,13 @@ bool cmFindProgramCommand::InitialPass(std::vector const& argsIn, // Save the value in the cache this->Makefile->AddCacheDefinition(this->VariableName, result.c_str(), this->VariableDocumentation.c_str(), - cmState::FILEPATH); + cmStateEnums::FILEPATH); return true; } this->Makefile->AddCacheDefinition( this->VariableName, (this->VariableName + "-NOTFOUND").c_str(), - this->VariableDocumentation.c_str(), cmState::FILEPATH); + this->VariableDocumentation.c_str(), cmStateEnums::FILEPATH); return true; } diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index 05dbfb4..c183947 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -88,13 +88,13 @@ bool cmGetFilenameComponentCommand::InitialPass( if (args.size() >= 4 && args[args.size() - 1] == "CACHE") { if (!programArgs.empty() && !storeArgs.empty()) { - this->Makefile->AddCacheDefinition(storeArgs, programArgs.c_str(), "", - args[2] == "PATH" ? cmState::FILEPATH - : cmState::STRING); + this->Makefile->AddCacheDefinition( + storeArgs, programArgs.c_str(), "", + args[2] == "PATH" ? cmStateEnums::FILEPATH : cmStateEnums::STRING); } - this->Makefile->AddCacheDefinition(args[0], result.c_str(), "", - args[2] == "PATH" ? cmState::FILEPATH - : cmState::STRING); + this->Makefile->AddCacheDefinition( + args[0], result.c_str(), "", + args[2] == "PATH" ? cmStateEnums::FILEPATH : cmStateEnums::STRING); } else { if (!programArgs.empty() && !storeArgs.empty()) { this->Makefile->AddDefinition(storeArgs, programArgs.c_str()); diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 58c6a00..efa95a5 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -308,7 +308,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) makeProgram += "/"; makeProgram += saveFile; mf->AddCacheDefinition("CMAKE_MAKE_PROGRAM", makeProgram.c_str(), - "make program", cmState::FILEPATH); + "make program", cmStateEnums::FILEPATH); } } @@ -1103,7 +1103,7 @@ void cmGlobalGenerator::Configure() sprintf(num, "%d", static_cast(this->Makefiles.size())); this->GetCMakeInstance()->AddCacheEntry("CMAKE_NUMBER_OF_MAKEFILES", num, "number of local generators", - cmState::INTERNAL); + cmStateEnums::INTERNAL); // check for link libraries and include directories containing "NOTFOUND" // and for infinite loops @@ -1886,8 +1886,8 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator* gen, this->TryCompileOuterMakefile = mf; const char* make = gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM"); - this->GetCMakeInstance()->AddCacheEntry("CMAKE_MAKE_PROGRAM", make, - "make program", cmState::FILEPATH); + this->GetCMakeInstance()->AddCacheEntry( + "CMAKE_MAKE_PROGRAM", make, "make program", cmStateEnums::FILEPATH); // copy the enabled languages this->GetCMakeInstance()->GetState()->SetEnabledLanguages( gen->GetCMakeInstance()->GetState()->GetEnabledLanguages()); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 615670c..45f8151 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -93,7 +93,7 @@ std::string cmGlobalUnixMakefileGenerator3::GetEditCacheCommand() const if (!editCacheCommand.empty()) { cm->AddCacheEntry("CMAKE_EDIT_COMMAND", editCacheCommand.c_str(), "Path to cache edit program executable.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } } const char* edit_cmd = cm->GetCacheDefinition("CMAKE_EDIT_COMMAND"); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 1ffcf07..635d07e 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -101,7 +101,7 @@ void cmGlobalVisualStudio7Generator::EnableLanguage( "Semicolon separated list of supported configuration types, " "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, " "anything else will be ignored.", - cmState::STRING); + cmStateEnums::STRING); } // Create list of configurations requested by user's cache, if any. @@ -118,7 +118,7 @@ void cmGlobalVisualStudio7Generator::EnableLanguage( if (cmSystemTools::GetEnv("CMAKE_MSVCIDE_RUN_PATH", extraPath)) { mf->AddCacheDefinition("CMAKE_MSVCIDE_RUN_PATH", extraPath.c_str(), "Saved environment variable CMAKE_MSVCIDE_RUN_PATH", - cmState::STATIC); + cmStateEnums::STATIC); } } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 34a01d6..6de4caa 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -257,7 +257,7 @@ void cmGlobalXCodeGenerator::EnableLanguage( "Semicolon separated list of supported configuration types, " "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, " "anything else will be ignored.", - cmState::STRING); + cmStateEnums::STRING); } } mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); @@ -2432,8 +2432,9 @@ std::string cmGlobalXCodeGenerator::GetOrCreateId(const std::string& name, return storedGUID; } - this->CMakeInstance->AddCacheEntry( - guidStoreName, id.c_str(), "Stored Xcode object GUID", cmState::INTERNAL); + this->CMakeInstance->AddCacheEntry(guidStoreName, id.c_str(), + "Stored Xcode object GUID", + cmStateEnums::INTERNAL); return id; } diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index 57bf33e..d598722 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -66,7 +66,7 @@ bool cmIncludeExternalMSProjectCommand::InitialPass( std::string guidVariable = utility_name + "_GUID_CMAKE"; this->Makefile->GetCMakeInstance()->AddCacheEntry( guidVariable.c_str(), customGuid.c_str(), "Stored GUID", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } // Create a target instance for this utility. diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index 3428a6c..49db5b0 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -140,7 +140,7 @@ void cmLoadCacheCommand::CheckLine(const char* line) // Check one line of the cache file. std::string var; std::string value; - cmState::CacheEntryType type = cmState::UNINITIALIZED; + cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED; if (cmake::ParseCacheEntry(line, var, value, type)) { // Found a real entry. See if this one was requested. if (this->VariablesToRead.find(var) != this->VariablesToRead.end()) { diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 006cdf8..0516bdf 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -95,7 +95,7 @@ void cmLocalVisualStudio10Generator::ReadAndStoreExternalGUID( // save the GUID in the cache this->GlobalGenerator->GetCMakeInstance()->AddCacheEntry( guidStoreName.c_str(), parser.GUID.c_str(), "Stored GUID", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } const char* cmLocalVisualStudio10Generator::ReportErrorLabel() const diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 1ea56b4..7c32e6c 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -2118,7 +2118,7 @@ void cmLocalVisualStudio7Generator::ReadAndStoreExternalGUID( // save the GUID in the cache this->GlobalGenerator->GetCMakeInstance()->AddCacheEntry( guidStoreName.c_str(), parser.GUID.c_str(), "Stored GUID", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } std::string cmLocalVisualStudio7Generator::GetTargetDirectory( diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 65116d5..5036b0d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1643,20 +1643,21 @@ void cmMakefile::AddDefinition(const std::string& name, const char* value) void cmMakefile::AddCacheDefinition(const std::string& name, const char* value, const char* doc, - cmState::CacheEntryType type, bool force) + cmStateEnums::CacheEntryType type, + bool force) { const char* existingValue = this->GetState()->GetInitializedCacheValue(name); // must be outside the following if() to keep it alive long enough std::string nvalue; - if (existingValue && - (this->GetState()->GetCacheEntryType(name) == cmState::UNINITIALIZED)) { + if (existingValue && (this->GetState()->GetCacheEntryType(name) == + cmStateEnums::UNINITIALIZED)) { // if this is not a force, then use the value from the cache // if it is a force, then use the value being passed in if (!force) { value = existingValue; } - if (type == cmState::PATH || type == cmState::FILEPATH) { + if (type == cmStateEnums::PATH || type == cmStateEnums::FILEPATH) { std::vector::size_type cc; std::vector files; nvalue = value ? value : ""; @@ -3177,7 +3178,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, // Add this before the user-provided CMake arguments in case // one of the arguments is -DCMAKE_BUILD_TYPE=... cm.AddCacheEntry("CMAKE_BUILD_TYPE", config, "Build configuration", - cmState::STRING); + cmStateEnums::STRING); } } // if cmake args were provided then pass them in @@ -3213,10 +3214,10 @@ int cmMakefile::TryCompile(const std::string& srcdir, gg->EnableLanguagesFromGenerator(this->GetGlobalGenerator(), this); if (this->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS")) { cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE", "", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } else { cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE", "", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } if (cm.Configure() != 0) { cmSystemTools::Error( diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 71078ab..e7e8a0b 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -224,7 +224,7 @@ public: void AddDefinition(const std::string& name, const char* value); ///! Add a definition to this makefile and the global cmake cache. void AddCacheDefinition(const std::string& name, const char* value, - const char* doc, cmState::CacheEntryType type, + const char* doc, cmStateEnums::CacheEntryType type, bool force = false); /** diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx index 5ec1620..8f9e288 100644 --- a/Source/cmMarkAsAdvancedCommand.cxx +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -26,7 +26,7 @@ bool cmMarkAsAdvancedCommand::InitialPass(std::vector const& args, cmState* state = this->Makefile->GetState(); if (!state->GetCacheEntryValue(variable)) { this->Makefile->GetCMakeInstance()->AddCacheEntry( - variable, CM_NULLPTR, CM_NULLPTR, cmState::UNINITIALIZED); + variable, CM_NULLPTR, CM_NULLPTR, cmStateEnums::UNINITIALIZED); overwrite = true; } if (!state->GetCacheEntryValue(variable)) { diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 946a543..0186ef2 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -32,7 +32,7 @@ bool cmOptionCommand::InitialPass(std::vector const& args, cmState* state = this->Makefile->GetState(); const char* existingValue = state->GetCacheEntryValue(args[0]); if (existingValue) { - if (state->GetCacheEntryType(args[0]) != cmState::UNINITIALIZED) { + if (state->GetCacheEntryType(args[0]) != cmStateEnums::UNINITIALIZED) { state->SetCacheEntryProperty(args[0], "HELPSTRING", args[1]); return true; } @@ -43,6 +43,6 @@ bool cmOptionCommand::InitialPass(std::vector const& args, } bool init = cmSystemTools::IsOn(initialValue.c_str()); this->Makefile->AddCacheDefinition(args[0], init ? "ON" : "OFF", - args[1].c_str(), cmState::BOOL); + args[1].c_str(), cmStateEnums::BOOL); return true; } diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 3402191..25acb52 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -233,7 +233,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, const char* version) "For backwards compatibility, what version of CMake " "commands and " "syntax should this version of CMake try to support.", - cmState::STRING); + cmStateEnums::STRING); } } } diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index c34a94b..c27da8e 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -19,10 +19,10 @@ bool cmProjectCommand::InitialPass(std::vector const& args, this->Makefile->AddCacheDefinition( bindir, this->Makefile->GetCurrentBinaryDirectory(), - "Value Computed by CMake", cmState::STATIC); + "Value Computed by CMake", cmStateEnums::STATIC); this->Makefile->AddCacheDefinition( srcdir, this->Makefile->GetCurrentSourceDirectory(), - "Value Computed by CMake", cmState::STATIC); + "Value Computed by CMake", cmStateEnums::STATIC); bindir = "PROJECT_BINARY_DIR"; srcdir = "PROJECT_SOURCE_DIR"; @@ -45,7 +45,7 @@ bool cmProjectCommand::InitialPass(std::vector const& args, this->Makefile->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str()); this->Makefile->AddCacheDefinition("CMAKE_PROJECT_NAME", args[0].c_str(), "Value Computed by CMake", - cmState::STATIC); + cmStateEnums::STATIC); } bool haveVersion = false; diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 8ce0b18..65b0e9c 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -64,8 +64,9 @@ bool cmSetCommand::InitialPass(std::vector const& args, bool cache = false; // optional bool force = false; // optional bool parentScope = false; - cmState::CacheEntryType type = cmState::STRING; // required if cache - const char* docstring = CM_NULLPTR; // required if cache + cmStateEnums::CacheEntryType type = + cmStateEnums::STRING; // required if cache + const char* docstring = CM_NULLPTR; // required if cache unsigned int ignoreLastArgs = 0; // look for PARENT_SCOPE argument @@ -115,12 +116,12 @@ bool cmSetCommand::InitialPass(std::vector const& args, cmState* state = this->Makefile->GetState(); const char* existingValue = state->GetCacheEntryValue(variable); if (existingValue && - (state->GetCacheEntryType(variable) != cmState::UNINITIALIZED)) { + (state->GetCacheEntryType(variable) != cmStateEnums::UNINITIALIZED)) { // if the set is trying to CACHE the value but the value // is already in the cache and the type is not internal // then leave now without setting any definitions in the cache // or the makefile - if (cache && type != cmState::INTERNAL && !force) { + if (cache && type != cmStateEnums::INTERNAL && !force) { return true; } } diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx index dbd3ed9..7664eca 100644 --- a/Source/cmSiteNameCommand.cxx +++ b/Source/cmSiteNameCommand.cxx @@ -68,7 +68,8 @@ bool cmSiteNameCommand::InitialPass(std::vector const& args, #endif this->Makefile->AddCacheDefinition( args[0], siteName.c_str(), - "Name of the computer/site where compile is being run", cmState::STRING); + "Name of the computer/site where compile is being run", + cmStateEnums::STRING); return true; } diff --git a/Source/cmState.cxx b/Source/cmState.cxx index cdadbda..a52374f 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -147,7 +147,7 @@ const char* cmCacheEntryTypes[] = { "BOOL", "PATH", "FILEPATH", "STRING", "INTERNAL", "STATIC", "UNINITIALIZED", CM_NULLPTR }; -const char* cmState::CacheEntryTypeToString(cmState::CacheEntryType type) +const char* cmState::CacheEntryTypeToString(cmStateEnums::CacheEntryType type) { if (type > 6) { return cmCacheEntryTypes[6]; @@ -155,16 +155,16 @@ const char* cmState::CacheEntryTypeToString(cmState::CacheEntryType type) return cmCacheEntryTypes[type]; } -cmState::CacheEntryType cmState::StringToCacheEntryType(const char* s) +cmStateEnums::CacheEntryType cmState::StringToCacheEntryType(const char* s) { int i = 0; while (cmCacheEntryTypes[i]) { if (strcmp(s, cmCacheEntryTypes[i]) == 0) { - return static_cast(i); + return static_cast(i); } ++i; } - return STRING; + return cmStateEnums::STRING; } bool cmState::IsCacheEntryType(std::string const& key) @@ -219,7 +219,7 @@ const char* cmState::GetInitializedCacheValue(std::string const& key) const return this->CacheManager->GetInitializedCacheValue(key); } -cmState::CacheEntryType cmState::GetCacheEntryType( +cmStateEnums::CacheEntryType cmState::GetCacheEntryType( std::string const& key) const { cmCacheManager::CacheIterator it = @@ -279,7 +279,7 @@ bool cmState::GetCacheEntryPropertyAsBool(std::string const& key, void cmState::AddCacheEntry(const std::string& key, const char* value, const char* helpString, - cmState::CacheEntryType type) + cmStateEnums::CacheEntryType type) { this->CacheManager->AddCacheEntry(key, value, helpString, type); } @@ -1806,7 +1806,8 @@ static bool ParseEntryWithoutType(const std::string& entry, std::string& var, } bool cmState::ParseCacheEntry(const std::string& entry, std::string& var, - std::string& value, CacheEntryType& type) + std::string& value, + cmStateEnums::CacheEntryType& type) { // input line is: key:type=value static cmsys::RegularExpression reg( diff --git a/Source/cmState.h b/Source/cmState.h index 521870d..fdbbc98 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -56,6 +56,16 @@ enum TargetType INTERFACE_LIBRARY, UNKNOWN_LIBRARY }; +enum CacheEntryType +{ + BOOL = 0, + PATH, + FILEPATH, + STRING, + INTERNAL, + STATIC, + UNINITIALIZED +}; } class cmState @@ -214,18 +224,8 @@ public: Snapshot CreatePolicyScopeSnapshot(Snapshot originSnapshot); Snapshot Pop(Snapshot originSnapshot); - enum CacheEntryType - { - BOOL = 0, - PATH, - FILEPATH, - STRING, - INTERNAL, - STATIC, - UNINITIALIZED - }; - static CacheEntryType StringToCacheEntryType(const char*); - static const char* CacheEntryTypeToString(CacheEntryType); + static cmStateEnums::CacheEntryType StringToCacheEntryType(const char*); + static const char* CacheEntryTypeToString(cmStateEnums::CacheEntryType); static bool IsCacheEntryType(std::string const& key); bool LoadCache(const std::string& path, bool internal, @@ -239,7 +239,7 @@ public: std::vector GetCacheEntryKeys() const; const char* GetCacheEntryValue(std::string const& key) const; const char* GetInitializedCacheValue(std::string const& key) const; - CacheEntryType GetCacheEntryType(std::string const& key) const; + cmStateEnums::CacheEntryType GetCacheEntryType(std::string const& key) const; void SetCacheEntryValue(std::string const& key, std::string const& value); void SetCacheValue(std::string const& key, std::string const& value); @@ -264,7 +264,8 @@ public: ///! Break up a line like VAR:type="value" into var, type and value static bool ParseCacheEntry(const std::string& entry, std::string& var, - std::string& value, CacheEntryType& type); + std::string& value, + cmStateEnums::CacheEntryType& type); Snapshot Reset(); // Define a property @@ -328,7 +329,8 @@ public: private: friend class cmake; void AddCacheEntry(const std::string& key, const char* value, - const char* helpString, CacheEntryType type); + const char* helpString, + cmStateEnums::CacheEntryType type); std::map PropertyDefinitions; std::vector EnabledLanguages; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 5753dd8..2527366 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -635,7 +635,7 @@ void cmTarget::ClearDependencyInformation(cmMakefile& mf, depname += "_LIB_DEPENDS"; if (this->RecordDependencies) { mf.AddCacheDefinition(depname, "", "Dependencies for target", - cmState::STATIC); + cmStateEnums::STATIC); } else { if (mf.GetDefinition(depname)) { std::string message = "Target "; @@ -773,7 +773,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib, dependencies += lib; dependencies += ";"; mf.AddCacheDefinition(targetEntry, dependencies.c_str(), - "Dependencies for the target", cmState::STATIC); + "Dependencies for the target", cmStateEnums::STATIC); } } diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index 5c9e41a..b248489 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -189,7 +189,8 @@ void cmTryRunCommand::RunExecutable(const std::string& runArgs, strcpy(retChar, "FAILED_TO_RUN"); } this->Makefile->AddCacheDefinition(this->RunResultVariable, retChar, - "Result of TRY_RUN", cmState::INTERNAL); + "Result of TRY_RUN", + cmStateEnums::INTERNAL); } /* This is only used when cross compiling. Instead of running the @@ -231,7 +232,7 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs, comment += detailsString; this->Makefile->AddCacheDefinition(this->RunResultVariable, "PLEASE_FILL_OUT-FAILED_TO_RUN", - comment.c_str(), cmState::STRING); + comment.c_str(), cmStateEnums::STRING); cmState* state = this->Makefile->GetState(); const char* existingValue = @@ -254,9 +255,9 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs, "would have printed on stdout and stderr on its target platform.\n"; comment += detailsString; - this->Makefile->AddCacheDefinition(internalRunOutputName, - "PLEASE_FILL_OUT-NOTFOUND", - comment.c_str(), cmState::STRING); + this->Makefile->AddCacheDefinition( + internalRunOutputName, "PLEASE_FILL_OUT-NOTFOUND", comment.c_str(), + cmStateEnums::STRING); cmState* state = this->Makefile->GetState(); const char* existing = state->GetCacheEntryValue(internalRunOutputName); if (existing) { diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 08ea21e..8f25cbb 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -98,13 +98,13 @@ bool cmUtilitySourceCommand::InitialPass(std::vector const& args, // Enter the value into the cache. this->Makefile->AddCacheDefinition(cacheEntry, utilityExecutable.c_str(), "Path to an internal program.", - cmState::FILEPATH); + cmStateEnums::FILEPATH); // add a value into the cache that maps from the // full path to the name of the project cmSystemTools::ConvertToUnixSlashes(utilityExecutable); this->Makefile->AddCacheDefinition(utilityExecutable, utilityName.c_str(), "Executable to project name.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); return true; } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 5936d77..b50c8bd 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -315,7 +315,7 @@ bool cmake::SetCacheArgs(const std::vector& args) } } std::string var, value; - cmState::CacheEntryType type = cmState::UNINITIALIZED; + cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED; if (cmState::ParseCacheEntry(entry, var, value, type)) { // The value is transformed if it is a filepath for example, so // we can't compare whether the value is already in the cache until @@ -410,8 +410,8 @@ bool cmake::SetCacheArgs(const std::vector& args) std::vector cacheKeys = this->State->GetCacheEntryKeys(); for (std::vector::const_iterator it = cacheKeys.begin(); it != cacheKeys.end(); ++it) { - cmState::CacheEntryType t = this->State->GetCacheEntryType(*it); - if (t != cmState::STATIC) { + cmStateEnums::CacheEntryType t = this->State->GetCacheEntryType(*it); + if (t != cmStateEnums::STATIC) { if (regex.find(it->c_str())) { entriesToDelete.push_back(*it); } @@ -859,14 +859,14 @@ int cmake::AddCMakePaths() // Save the value in the cache this->AddCacheEntry("CMAKE_COMMAND", cmSystemTools::GetCMakeCommand().c_str(), - "Path to CMake executable.", cmState::INTERNAL); + "Path to CMake executable.", cmStateEnums::INTERNAL); #ifdef CMAKE_BUILD_WITH_CMAKE - this->AddCacheEntry("CMAKE_CTEST_COMMAND", - cmSystemTools::GetCTestCommand().c_str(), - "Path to ctest program executable.", cmState::INTERNAL); - this->AddCacheEntry("CMAKE_CPACK_COMMAND", - cmSystemTools::GetCPackCommand().c_str(), - "Path to cpack program executable.", cmState::INTERNAL); + this->AddCacheEntry( + "CMAKE_CTEST_COMMAND", cmSystemTools::GetCTestCommand().c_str(), + "Path to ctest program executable.", cmStateEnums::INTERNAL); + this->AddCacheEntry( + "CMAKE_CPACK_COMMAND", cmSystemTools::GetCPackCommand().c_str(), + "Path to cpack program executable.", cmStateEnums::INTERNAL); #endif if (!cmSystemTools::FileExists( (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake").c_str())) { @@ -879,7 +879,7 @@ int cmake::AddCMakePaths() return 0; } this->AddCacheEntry("CMAKE_ROOT", cmSystemTools::GetCMakeRoot().c_str(), - "Path to CMake installation.", cmState::INTERNAL); + "Path to CMake installation.", cmStateEnums::INTERNAL); return 1; } @@ -1147,7 +1147,7 @@ struct SaveCacheEntry std::string key; std::string value; std::string help; - cmState::CacheEntryType type; + cmStateEnums::CacheEntryType type; }; int cmake::HandleDeleteCacheVariables(const std::string& var) @@ -1291,7 +1291,7 @@ int cmake::ActualConfigure() "CMAKE_HOME_DIRECTORY", this->GetHomeDirectory(), "Source directory with the top level CMakeLists.txt file for this " "project", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } // no generator specified on the command line @@ -1338,11 +1338,11 @@ int cmake::ActualConfigure() if (!this->State->GetInitializedCacheValue("CMAKE_GENERATOR")) { this->AddCacheEntry("CMAKE_GENERATOR", this->GlobalGenerator->GetName().c_str(), - "Name of generator.", cmState::INTERNAL); + "Name of generator.", cmStateEnums::INTERNAL); this->AddCacheEntry("CMAKE_EXTRA_GENERATOR", this->GlobalGenerator->GetExtraGeneratorName().c_str(), "Name of external makefile project generator.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } if (const char* platformName = @@ -1362,7 +1362,7 @@ int cmake::ActualConfigure() } else { this->AddCacheEntry("CMAKE_GENERATOR_PLATFORM", this->GeneratorPlatform.c_str(), - "Name of generator platform.", cmState::INTERNAL); + "Name of generator platform.", cmStateEnums::INTERNAL); } if (const char* tsName = @@ -1382,7 +1382,7 @@ int cmake::ActualConfigure() } else { this->AddCacheEntry("CMAKE_GENERATOR_TOOLSET", this->GeneratorToolset.c_str(), - "Name of generator toolset.", cmState::INTERNAL); + "Name of generator toolset.", cmStateEnums::INTERNAL); } // reset any system configuration information, except for when we are @@ -1411,13 +1411,14 @@ int cmake::ActualConfigure() if (!this->State->GetInitializedCacheValue("LIBRARY_OUTPUT_PATH")) { this->AddCacheEntry( "LIBRARY_OUTPUT_PATH", "", - "Single output directory for building all libraries.", cmState::PATH); + "Single output directory for building all libraries.", + cmStateEnums::PATH); } if (!this->State->GetInitializedCacheValue("EXECUTABLE_OUTPUT_PATH")) { this->AddCacheEntry( "EXECUTABLE_OUTPUT_PATH", "", "Single output directory for building all executables.", - cmState::PATH); + cmStateEnums::PATH); } } @@ -1640,7 +1641,7 @@ void cmake::AddCacheEntry(const std::string& key, const char* value, const char* helpString, int type) { this->State->AddCacheEntry(key, value, helpString, - cmState::CacheEntryType(type)); + cmStateEnums::CacheEntryType(type)); this->UnwatchUnusedCli(key); } @@ -1694,7 +1695,8 @@ void cmake::AddDefaultGenerators() } bool cmake::ParseCacheEntry(const std::string& entry, std::string& var, - std::string& value, cmState::CacheEntryType& type) + std::string& value, + cmStateEnums::CacheEntryType& type) { return cmState::ParseCacheEntry(entry, var, value, type); } @@ -2464,7 +2466,7 @@ void cmake::SetSuppressDevWarnings(bool b) this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", value.c_str(), "Suppress Warnings that are meant for" " the author of the CMakeLists.txt files.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } bool cmake::GetSuppressDeprecatedWarnings() const @@ -2488,7 +2490,7 @@ void cmake::SetSuppressDeprecatedWarnings(bool b) this->AddCacheEntry("CMAKE_WARN_DEPRECATED", value.c_str(), "Whether to issue warnings for deprecated " "functionality.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } bool cmake::GetDevWarningsAsErrors() const @@ -2512,7 +2514,7 @@ void cmake::SetDevWarningsAsErrors(bool b) this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_ERRORS", value.c_str(), "Suppress errors that are meant for" " the author of the CMakeLists.txt files.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } bool cmake::GetDeprecatedWarningsAsErrors() const @@ -2536,5 +2538,5 @@ void cmake::SetDeprecatedWarningsAsErrors(bool b) this->AddCacheEntry("CMAKE_ERROR_DEPRECATED", value.c_str(), "Whether to issue deprecation errors for macros" " and functions.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } diff --git a/Source/cmake.h b/Source/cmake.h index 865748b..cff753f 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -161,7 +161,7 @@ public: ///! Break up a line like VAR:type="value" into var, type and value static bool ParseCacheEntry(const std::string& entry, std::string& var, std::string& value, - cmState::CacheEntryType& type); + cmStateEnums::CacheEntryType& type); int LoadCache(); bool LoadCache(const std::string& path); diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 0d1f1ce..d1159c3 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -292,9 +292,9 @@ int do_cmake(int ac, char const* const* av) std::vector keys = cm.GetState()->GetCacheEntryKeys(); for (std::vector::const_iterator it = keys.begin(); it != keys.end(); ++it) { - cmState::CacheEntryType t = cm.GetState()->GetCacheEntryType(*it); - if (t != cmState::INTERNAL && t != cmState::STATIC && - t != cmState::UNINITIALIZED) { + cmStateEnums::CacheEntryType t = cm.GetState()->GetCacheEntryType(*it); + if (t != cmStateEnums::INTERNAL && t != cmStateEnums::STATIC && + t != cmStateEnums::UNINITIALIZED) { const char* advancedProp = cm.GetState()->GetCacheEntryProperty(*it, "ADVANCED"); if (list_all_cached || !advancedProp) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0febfc1a32ee964f6e32d4d123d28b56b80709f4 commit 0febfc1a32ee964f6e32d4d123d28b56b80709f4 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:46 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 21:28:46 2016 +0200 cmState: Move TargetType enum to separate namespace diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index 96ad82a..a03d77d 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -133,8 +133,8 @@ bool cmAddExecutableCommand::InitialPass(std::vector const& args, this->SetError(e.str()); return false; } - cmState::TargetType type = aliasedTarget->GetType(); - if (type != cmState::EXECUTABLE) { + cmStateEnums::TargetType type = aliasedTarget->GetType(); + if (type != cmStateEnums::EXECUTABLE) { std::ostringstream e; e << "cannot create ALIAS target \"" << exename << "\" because target \"" << aliasedName << "\" is not an " @@ -165,7 +165,7 @@ bool cmAddExecutableCommand::InitialPass(std::vector const& args, } // Create the imported target. - this->Makefile->AddImportedTarget(exename, cmState::EXECUTABLE, + this->Makefile->AddImportedTarget(exename, cmStateEnums::EXECUTABLE, importGlobal); return true; } diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 26e38b8..d1281d4 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -15,10 +15,10 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, } // Library type defaults to value of BUILD_SHARED_LIBS, if it exists, // otherwise it defaults to static library. - cmState::TargetType type = cmState::SHARED_LIBRARY; + cmStateEnums::TargetType type = cmStateEnums::SHARED_LIBRARY; if (cmSystemTools::IsOff( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { - type = cmState::STATIC_LIBRARY; + type = cmStateEnums::STATIC_LIBRARY; } bool excludeFromAll = false; bool importTarget = false; @@ -38,57 +38,57 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, while (s != args.end()) { std::string libType = *s; if (libType == "STATIC") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting STATIC type."; this->SetError(e.str()); return false; } ++s; - type = cmState::STATIC_LIBRARY; + type = cmStateEnums::STATIC_LIBRARY; haveSpecifiedType = true; } else if (libType == "SHARED") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting SHARED type."; this->SetError(e.str()); return false; } ++s; - type = cmState::SHARED_LIBRARY; + type = cmStateEnums::SHARED_LIBRARY; haveSpecifiedType = true; } else if (libType == "MODULE") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting MODULE type."; this->SetError(e.str()); return false; } ++s; - type = cmState::MODULE_LIBRARY; + type = cmStateEnums::MODULE_LIBRARY; haveSpecifiedType = true; } else if (libType == "OBJECT") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting OBJECT type."; this->SetError(e.str()); return false; } ++s; - type = cmState::OBJECT_LIBRARY; + type = cmStateEnums::OBJECT_LIBRARY; haveSpecifiedType = true; } else if (libType == "UNKNOWN") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting UNKNOWN type."; this->SetError(e.str()); return false; } ++s; - type = cmState::UNKNOWN_LIBRARY; + type = cmStateEnums::UNKNOWN_LIBRARY; haveSpecifiedType = true; } else if (libType == "ALIAS") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting ALIAS type."; this->SetError(e.str()); @@ -116,10 +116,10 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, return false; } ++s; - type = cmState::INTERFACE_LIBRARY; + type = cmStateEnums::INTERFACE_LIBRARY; haveSpecifiedType = true; } else if (*s == "EXCLUDE_FROM_ALL") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL."; this->SetError(e.str()); @@ -133,7 +133,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, } else if (importTarget && *s == "GLOBAL") { ++s; importGlobal = true; - } else if (type == cmState::INTERFACE_LIBRARY && *s == "GLOBAL") { + } else if (type == cmStateEnums::INTERFACE_LIBRARY && *s == "GLOBAL") { std::ostringstream e; e << "GLOBAL option may only be used with IMPORTED libraries."; this->SetError(e.str()); @@ -143,7 +143,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, } } - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { if (s != args.end()) { std::ostringstream e; e << "INTERFACE library requires no source arguments."; @@ -170,7 +170,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, bool issueMessage = false; switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0037)) { case cmPolicies::WARN: - if (type != cmState::INTERFACE_LIBRARY) { + if (type != cmStateEnums::INTERFACE_LIBRARY) { e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0037) << "\n"; issueMessage = true; } @@ -233,12 +233,12 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, this->SetError(e.str()); return false; } - cmState::TargetType aliasedType = aliasedTarget->GetType(); - if (aliasedType != cmState::SHARED_LIBRARY && - aliasedType != cmState::STATIC_LIBRARY && - aliasedType != cmState::MODULE_LIBRARY && - aliasedType != cmState::OBJECT_LIBRARY && - aliasedType != cmState::INTERFACE_LIBRARY) { + cmStateEnums::TargetType aliasedType = aliasedTarget->GetType(); + if (aliasedType != cmStateEnums::SHARED_LIBRARY && + aliasedType != cmStateEnums::STATIC_LIBRARY && + aliasedType != cmStateEnums::MODULE_LIBRARY && + aliasedType != cmStateEnums::OBJECT_LIBRARY && + aliasedType != cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "cannot create ALIAS target \"" << libName << "\" because target \"" << aliasedName << "\" is not a library."; @@ -265,16 +265,17 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, CMAKE_${LANG}_CREATE_SHARED_LIBRARY is defined and if not default to STATIC. But at this point we know only the name of the target, but not yet its linker language. */ - if ((type == cmState::SHARED_LIBRARY || type == cmState::MODULE_LIBRARY) && + if ((type == cmStateEnums::SHARED_LIBRARY || + type == cmStateEnums::MODULE_LIBRARY) && (this->Makefile->GetState()->GetGlobalPropertyAsBool( "TARGET_SUPPORTS_SHARED_LIBS") == false)) { std::ostringstream w; w << "ADD_LIBRARY called with " - << (type == cmState::SHARED_LIBRARY ? "SHARED" : "MODULE") + << (type == cmStateEnums::SHARED_LIBRARY ? "SHARED" : "MODULE") << " option but the target platform does not support dynamic linking. " "Building a STATIC library instead. This may lead to problems."; this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); - type = cmState::STATIC_LIBRARY; + type = cmStateEnums::STATIC_LIBRARY; } // Handle imported target creation. @@ -284,13 +285,13 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, this->SetError("called with IMPORTED argument but no library type."); return false; } - if (type == cmState::OBJECT_LIBRARY) { + if (type == cmStateEnums::OBJECT_LIBRARY) { this->Makefile->IssueMessage( cmake::FATAL_ERROR, "The OBJECT library type may not be used for IMPORTED libraries."); return true; } - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { if (!cmGeneratorExpression::IsValidTargetName(libName)) { std::ostringstream e; e << "Invalid name for IMPORTED INTERFACE library target: " << libName; @@ -314,7 +315,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, } // A non-imported target may not have UNKNOWN type. - if (type == cmState::UNKNOWN_LIBRARY) { + if (type == cmStateEnums::UNKNOWN_LIBRARY) { this->Makefile->IssueMessage( cmake::FATAL_ERROR, "The UNKNOWN library type may be used only for IMPORTED libraries."); @@ -332,7 +333,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, std::vector srclists; - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { if (!cmGeneratorExpression::IsValidTargetName(libName) || libName.find("::") != std::string::npos) { std::ostringstream e; diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 56a469d..98e18ed 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -350,9 +350,9 @@ static void addLinkLibrary(cmMakefile* mf, std::string const& target, } cmTarget* tgt = mf->GetGlobalGenerator()->FindTarget(lib); - if (tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && - (tgt->GetType() != cmState::SHARED_LIBRARY) && - (tgt->GetType() != cmState::INTERFACE_LIBRARY) && + if (tgt && (tgt->GetType() != cmStateEnums::STATIC_LIBRARY) && + (tgt->GetType() != cmStateEnums::SHARED_LIBRARY) && + (tgt->GetType() != cmStateEnums::INTERFACE_LIBRARY) && !tgt->IsExecutableWithExports()) { std::ostringstream e; e << "Target \"" << lib << "\" of type " @@ -393,8 +393,8 @@ void CCONV cmAddLibrary(void* arg, const char* libname, int shared, for (i = 0; i < numSrcs; ++i) { srcs2.push_back(srcs[i]); } - mf->AddLibrary(libname, - (shared ? cmState::SHARED_LIBRARY : cmState::STATIC_LIBRARY), + mf->AddLibrary(libname, (shared ? cmStateEnums::SHARED_LIBRARY + : cmStateEnums::STATIC_LIBRARY), srcs2); } diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index b995fa1..72556b8 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -171,7 +171,7 @@ std::vector cmCommonTargetGenerator::GetLinkedTargetDirectories() // We can ignore the INTERFACE_LIBRARY items because // Target->GetLinkInformation already processed their // link interface and they don't have any output themselves. - && linkee->GetType() != cmState::INTERFACE_LIBRARY && + && linkee->GetType() != cmStateEnums::INTERFACE_LIBRARY && emitted.insert(linkee).second) { cmLocalGenerator* lg = linkee->GetLocalGenerator(); std::string di = lg->GetCurrentBinaryDirectory(); diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 93f3289..804d900 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -262,7 +262,7 @@ cmComputeLinkDepends::Compute() LinkEntry const& e = this->EntryList[i]; cmGeneratorTarget const* t = e.Target; // Entries that we know the linker will re-use do not need to be repeated. - bool uniquify = t && t->GetType() == cmState::SHARED_LIBRARY; + bool uniquify = t && t->GetType() == cmStateEnums::SHARED_LIBRARY; if (!uniquify || emmitted.insert(i).second) { this->FinalLinkEntries.push_back(e); } @@ -345,7 +345,7 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe) if (cmLinkInterface const* iface = entry.Target->GetLinkInterface(this->Config, this->Target)) { const bool isIface = - entry.Target->GetType() == cmState::INTERFACE_LIBRARY; + entry.Target->GetType() == cmStateEnums::INTERFACE_LIBRARY; // This target provides its own link interface information. this->AddLinkEntries(depender_index, iface->Libraries); diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 0807ef8..565eb15 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -282,7 +282,7 @@ cmComputeLinkInformation::cmComputeLinkInformation( // the program that will load it. this->LoaderFlag = CM_NULLPTR; if (!this->UseImportLibrary && - this->Target->GetType() == cmState::MODULE_LIBRARY) { + this->Target->GetType() == cmStateEnums::MODULE_LIBRARY) { std::string loader_flag_var = "CMAKE_SHARED_MODULE_LOADER_"; loader_flag_var += this->LinkLanguage; loader_flag_var += "_FLAG"; @@ -299,10 +299,10 @@ cmComputeLinkInformation::cmComputeLinkInformation( // Get options needed to specify RPATHs. this->RuntimeUseChrpath = false; - if (this->Target->GetType() != cmState::STATIC_LIBRARY) { - const char* tType = - ((this->Target->GetType() == cmState::EXECUTABLE) ? "EXECUTABLE" - : "SHARED_LIBRARY"); + if (this->Target->GetType() != cmStateEnums::STATIC_LIBRARY) { + const char* tType = ((this->Target->GetType() == cmStateEnums::EXECUTABLE) + ? "EXECUTABLE" + : "SHARED_LIBRARY"); std::string rtVar = "CMAKE_"; rtVar += tType; rtVar += "_RUNTIME_"; @@ -446,10 +446,10 @@ cmComputeLinkInformation::GetSharedLibrariesLinked() bool cmComputeLinkInformation::Compute() { // Skip targets that do not link. - if (!(this->Target->GetType() == cmState::EXECUTABLE || - this->Target->GetType() == cmState::SHARED_LIBRARY || - this->Target->GetType() == cmState::MODULE_LIBRARY || - this->Target->GetType() == cmState::STATIC_LIBRARY)) { + if (!(this->Target->GetType() == cmStateEnums::EXECUTABLE || + this->Target->GetType() == cmStateEnums::SHARED_LIBRARY || + this->Target->GetType() == cmStateEnums::MODULE_LIBRARY || + this->Target->GetType() == cmStateEnums::STATIC_LIBRARY)) { return false; } @@ -498,7 +498,7 @@ bool cmComputeLinkInformation::Compute() i != wrongItems.end(); ++i) { cmGeneratorTarget const* tgt = *i; bool implib = (this->UseImportLibrary && - (tgt->GetType() == cmState::SHARED_LIBRARY)); + (tgt->GetType() == cmStateEnums::SHARED_LIBRARY)); std::string lib = tgt->GetFullPath(this->Config, implib, true); this->OldLinkDirItems.push_back(lib); } @@ -600,20 +600,21 @@ void cmComputeLinkInformation::AddItem(std::string const& item, linkItem += exe; this->Items.push_back(Item(linkItem, true, tgt)); this->Depends.push_back(exe); - } else if (tgt->GetType() == cmState::INTERFACE_LIBRARY) { + } else if (tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { // Add the interface library as an item so it can be considered as part // of COMPATIBLE_INTERFACE_ enforcement. The generators will ignore // this for the actual link line. this->Items.push_back(Item(std::string(), false, tgt)); } else { // Decide whether to use an import library. - bool implib = (this->UseImportLibrary && - (impexe || tgt->GetType() == cmState::SHARED_LIBRARY)); + bool implib = + (this->UseImportLibrary && + (impexe || tgt->GetType() == cmStateEnums::SHARED_LIBRARY)); // Pass the full path to the target file. std::string lib = tgt->GetFullPath(config, implib, true); if (!this->LinkDependsNoShared || - tgt->GetType() != cmState::SHARED_LIBRARY) { + tgt->GetType() != cmStateEnums::SHARED_LIBRARY) { this->Depends.push_back(lib); } @@ -652,7 +653,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item, if (tgt) { // The target will provide a full path. Make sure it is a shared // library. - if (tgt->GetType() != cmState::SHARED_LIBRARY) { + if (tgt->GetType() != cmStateEnums::SHARED_LIBRARY) { return; } } else { @@ -725,13 +726,13 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo() const char* shared_link_type_flag = CM_NULLPTR; const char* target_type_str = CM_NULLPTR; switch (this->Target->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: target_type_str = "EXE"; break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: target_type_str = "SHARED_LIBRARY"; break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: target_type_str = "SHARED_MODULE"; break; default: @@ -964,12 +965,12 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item, // shared and static libraries but static-mode can handle only // static libraries. If a previous user item changed the link type // to static we need to make sure it is back to shared. - if (target->GetType() != cmState::STATIC_LIBRARY) { + if (target->GetType() != cmStateEnums::STATIC_LIBRARY) { this->SetCurrentLinkType(LinkShared); } // Keep track of shared library targets linked. - if (target->GetType() == cmState::SHARED_LIBRARY) { + if (target->GetType() == cmStateEnums::SHARED_LIBRARY) { this->SharedLibrariesLinked.insert(target); } @@ -1590,13 +1591,13 @@ void cmComputeLinkInformation::AddLibraryRuntimeInfo( // Libraries with unknown type must be handled using just the file // on disk. - if (target->GetType() == cmState::UNKNOWN_LIBRARY) { + if (target->GetType() == cmStateEnums::UNKNOWN_LIBRARY) { this->AddLibraryRuntimeInfo(fullPath); return; } // Skip targets that are not shared libraries (modules cannot be linked). - if (target->GetType() != cmState::SHARED_LIBRARY) { + if (target->GetType() != cmStateEnums::SHARED_LIBRARY) { return; } diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 735bc32..4cc4edf 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -187,7 +187,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index) { // Get the depender. cmGeneratorTarget const* depender = this->Targets[depender_index]; - if (depender->GetType() == cmState::INTERFACE_LIBRARY) { + if (depender->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return; } @@ -212,10 +212,10 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index) oi != objectFiles.end(); ++oi) { std::string objLib = (*oi)->GetObjectLibrary(); if (!objLib.empty() && emitted.insert(objLib).second) { - if (depender->GetType() != cmState::EXECUTABLE && - depender->GetType() != cmState::STATIC_LIBRARY && - depender->GetType() != cmState::SHARED_LIBRARY && - depender->GetType() != cmState::MODULE_LIBRARY) { + if (depender->GetType() != cmStateEnums::EXECUTABLE && + depender->GetType() != cmStateEnums::STATIC_LIBRARY && + depender->GetType() != cmStateEnums::SHARED_LIBRARY && + depender->GetType() != cmStateEnums::MODULE_LIBRARY) { this->GlobalGenerator->GetCMakeInstance()->IssueMessage( cmake::FATAL_ERROR, "Only executables and non-OBJECT libraries may " @@ -287,7 +287,7 @@ void cmComputeTargetDepends::AddInterfaceDepends( // Skip targets that will not really be linked. This is probably a // name conflict between an external library and an executable // within the project. - if (dependee && dependee->GetType() == cmState::EXECUTABLE && + if (dependee && dependee->GetType() == cmStateEnums::EXECUTABLE && !dependee->IsExecutableWithExports()) { dependee = CM_NULLPTR; } @@ -316,7 +316,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index, cmGeneratorTarget const* dependee = dependee_name.Target; if (!dependee && !linking && - (depender->GetType() != cmState::GLOBAL_TARGET)) { + (depender->GetType() != cmStateEnums::GLOBAL_TARGET)) { cmake::MessageType messageType = cmake::AUTHOR_WARNING; bool issueMessage = false; std::ostringstream e; @@ -351,7 +351,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index, // Skip targets that will not really be linked. This is probably a // name conflict between an external library and an executable // within the project. - if (linking && dependee && dependee->GetType() == cmState::EXECUTABLE && + if (linking && dependee && dependee->GetType() == cmStateEnums::EXECUTABLE && !dependee->IsExecutableWithExports()) { dependee = CM_NULLPTR; } @@ -366,7 +366,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index, bool linking) { if (dependee->IsImported() || - dependee->GetType() == cmState::INTERFACE_LIBRARY) { + dependee->GetType() == cmStateEnums::INTERFACE_LIBRARY) { // Skip IMPORTED and INTERFACE targets but follow their utility // dependencies. std::set const& utils = dependee->GetUtilityItems(); @@ -452,7 +452,7 @@ bool cmComputeTargetDepends::CheckComponents( // Make sure the component is all STATIC_LIBRARY targets. for (NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) { - if (this->Targets[*ni]->GetType() != cmState::STATIC_LIBRARY) { + if (this->Targets[*ni]->GetType() != cmStateEnums::STATIC_LIBRARY) { this->ComplainAboutBadComponent(ccg, c); return false; } diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index a409d40..cafba86 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -43,24 +43,25 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, // which signature were we called with ? this->SrcFileSignature = true; - cmState::TargetType targetType = cmState::EXECUTABLE; + cmStateEnums::TargetType targetType = cmStateEnums::EXECUTABLE; const char* tt = this->Makefile->GetDefinition("CMAKE_TRY_COMPILE_TARGET_TYPE"); if (!isTryRun && tt && *tt) { - if (strcmp(tt, cmState::GetTargetTypeName(cmState::EXECUTABLE)) == 0) { - targetType = cmState::EXECUTABLE; + if (strcmp(tt, cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE)) == + 0) { + targetType = cmStateEnums::EXECUTABLE; } else if (strcmp(tt, cmState::GetTargetTypeName( - cmState::STATIC_LIBRARY)) == 0) { - targetType = cmState::STATIC_LIBRARY; + cmStateEnums::STATIC_LIBRARY)) == 0) { + targetType = cmStateEnums::STATIC_LIBRARY; } else { this->Makefile->IssueMessage( cmake::FATAL_ERROR, std::string("Invalid value '") + tt + "' for " "CMAKE_TRY_COMPILE_TARGET_TYPE. Only " "'" + - cmState::GetTargetTypeName(cmState::EXECUTABLE) + "' and " - "'" + - cmState::GetTargetTypeName(cmState::STATIC_LIBRARY) + + cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE) + "' and " + "'" + + cmState::GetTargetTypeName(cmStateEnums::STATIC_LIBRARY) + "' " "are allowed."); return -1; @@ -122,12 +123,12 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, libsToLink += "\"" + cmSystemTools::TrimWhitespace(argv[i]) + "\" "; if (cmTarget* tgt = this->Makefile->FindTargetToUse(argv[i])) { switch (tgt->GetType()) { - case cmState::SHARED_LIBRARY: - case cmState::STATIC_LIBRARY: - case cmState::INTERFACE_LIBRARY: - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: break; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: if (tgt->IsExecutableWithExports()) { break; } @@ -481,13 +482,13 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, ? "NEW" : "OLD"); - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { /* Put the executable at a known location (for COPY_FILE). */ fprintf(fout, "set(CMAKE_RUNTIME_OUTPUT_DIRECTORY \"%s\")\n", this->BinaryDirectory.c_str()); /* Create the actual executable. */ fprintf(fout, "add_executable(%s", targetName.c_str()); - } else // if (targetType == cmState::STATIC_LIBRARY) + } else // if (targetType == cmStateEnums::STATIC_LIBRARY) { /* Put the static library at a known location (for COPY_FILE). */ fprintf(fout, "set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY \"%s\")\n", @@ -627,16 +628,16 @@ void cmCoreTryCompile::CleanupFiles(const char* binDir) } void cmCoreTryCompile::FindOutputFile(const std::string& targetName, - cmState::TargetType targetType) + cmStateEnums::TargetType targetType) { this->FindErrorMessage = ""; this->OutputFile = ""; std::string tmpOutputFile = "/"; - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { tmpOutputFile += targetName; tmpOutputFile += this->Makefile->GetSafeDefinition("CMAKE_EXECUTABLE_SUFFIX"); - } else // if (targetType == cmState::STATIC_LIBRARY) + } else // if (targetType == cmStateEnums::STATIC_LIBRARY) { tmpOutputFile += this->Makefile->GetSafeDefinition("CMAKE_STATIC_LIBRARY_PREFIX"); diff --git a/Source/cmCoreTryCompile.h b/Source/cmCoreTryCompile.h index e173a16..43b971f 100644 --- a/Source/cmCoreTryCompile.h +++ b/Source/cmCoreTryCompile.h @@ -35,7 +35,7 @@ protected: the error message is stored in FindErrorMessage. */ void FindOutputFile(const std::string& targetName, - cmState::TargetType targetType); + cmStateEnums::TargetType targetType); cmTypeMacro(cmCoreTryCompile, cmCommand); diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 0fd4ffb..5cb1104 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -42,7 +42,7 @@ bool cmCustomCommandGenerator::UseCrossCompilingEmulator(unsigned int c) const { std::string const& argv0 = this->CC.GetCommandLines()[c][0]; cmGeneratorTarget* target = this->LG->FindGeneratorTargetToUse(argv0); - if (target && target->GetType() == cmState::EXECUTABLE) { + if (target && target->GetType() == cmStateEnums::EXECUTABLE) { return target->GetProperty("CROSSCOMPILING_EMULATOR") != CM_NULLPTR; } return false; @@ -52,12 +52,12 @@ std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const { std::string const& argv0 = this->CC.GetCommandLines()[c][0]; cmGeneratorTarget* target = this->LG->FindGeneratorTargetToUse(argv0); - if (target && target->GetType() == cmState::EXECUTABLE && + if (target && target->GetType() == cmStateEnums::EXECUTABLE && (target->IsImported() || !this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING"))) { return target->GetLocation(this->Config); } - if (target && target->GetType() == cmState::EXECUTABLE) { + if (target && target->GetType() == cmStateEnums::EXECUTABLE) { const char* emulator = target->GetProperty("CROSSCOMPILING_EMULATOR"); if (emulator) { return std::string(emulator); diff --git a/Source/cmExportBuildAndroidMKGenerator.cxx b/Source/cmExportBuildAndroidMKGenerator.cxx index f5e6628..38f95d2 100644 --- a/Source/cmExportBuildAndroidMKGenerator.cxx +++ b/Source/cmExportBuildAndroidMKGenerator.cxx @@ -111,8 +111,8 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( target->GetLocalGenerator()->FindGeneratorTargetToUse(*i); if (gt) { - if (gt->GetType() == cmState::SHARED_LIBRARY || - gt->GetType() == cmState::MODULE_LIBRARY) { + if (gt->GetType() == cmStateEnums::SHARED_LIBRARY || + gt->GetType() == cmStateEnums::MODULE_LIBRARY) { sharedLibs += " " + *i; } else { staticLibs += " " + *i; @@ -168,7 +168,7 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( } // Tell the NDK build system if prebuilt static libraries use C++. - if (target->GetType() == cmState::STATIC_LIBRARY) { + if (target->GetType() == cmStateEnums::STATIC_LIBRARY) { cmLinkImplementation const* li = target->GetLinkImplementation(config); if (std::find(li->Languages.begin(), li->Languages.end(), "CXX") != li->Languages.end()) { @@ -177,19 +177,19 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( } switch (target->GetType()) { - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: os << "include $(PREBUILT_SHARED_LIBRARY)\n"; break; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: os << "include $(PREBUILT_STATIC_LIBRARY)\n"; break; - case cmState::EXECUTABLE: - case cmState::UTILITY: - case cmState::OBJECT_LIBRARY: - case cmState::GLOBAL_TARGET: - case cmState::INTERFACE_LIBRARY: - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::EXECUTABLE: + case cmStateEnums::UTILITY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::GLOBAL_TARGET: + case cmStateEnums::INTERFACE_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: break; } os << "\n"; diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 68831c7..e5f7a55 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -57,7 +57,7 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os) this->LG->GetMakefile()->GetBacktrace()); return false; } - if (te->GetType() == cmState::INTERFACE_LIBRARY) { + if (te->GetType() == cmStateEnums::INTERFACE_LIBRARY) { this->GenerateRequiredCMakeVersion(os, "3.0.0"); } } @@ -134,12 +134,12 @@ void cmExportBuildFileGenerator::GenerateImportTargetsConfig( cmGeneratorTarget* target = *tei; ImportPropertyMap properties; - if (target->GetType() != cmState::INTERFACE_LIBRARY) { + if (target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { this->SetImportLocationProperty(config, suffix, target, properties); } if (!properties.empty()) { // Get the rest of the target details. - if (target->GetType() != cmState::INTERFACE_LIBRARY) { + if (target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { this->SetImportDetailProperties(config, suffix, target, properties, missingTargets); this->SetImportLinkInterface(config, suffix, @@ -186,7 +186,7 @@ void cmExportBuildFileGenerator::SetImportLocationProperty( // Add the import library for windows DLLs. if (target->IsDLLPlatform() && - (target->GetType() == cmState::SHARED_LIBRARY || + (target->GetType() == cmStateEnums::SHARED_LIBRARY || target->IsExecutableWithExports()) && mf->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX")) { std::string prop = "IMPORTED_IMPLIB"; diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index d438363..4fb5998 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -141,14 +141,14 @@ bool cmExportCommand::InitialPass(std::vector const& args, } if (cmTarget* target = gg->FindTarget(*currentTarget)) { - if (target->GetType() == cmState::OBJECT_LIBRARY) { + if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "given OBJECT library \"" << *currentTarget << "\" which may not be exported."; this->SetError(e.str()); return false; } - if (target->GetType() == cmState::UTILITY) { + if (target->GetType() == cmStateEnums::UTILITY) { this->SetError("given custom target \"" + *currentTarget + "\" which may not be exported."); return false; diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index d3a99fa..3cd72a8 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -492,7 +492,7 @@ void cmExportFileGenerator::PopulateCompatibleInterfaceProperties( getPropertyContents(gtarget, "COMPATIBLE_INTERFACE_NUMBER_MAX", ifaceProperties); - if (gtarget->GetType() != cmState::INTERFACE_LIBRARY) { + if (gtarget->GetType() != cmStateEnums::INTERFACE_LIBRARY) { getCompatibleInterfaceProperties(gtarget, ifaceProperties, ""); std::vector configNames; @@ -735,8 +735,8 @@ void cmExportFileGenerator::SetImportDetailProperties( cmMakefile* mf = target->Makefile; // Add the soname for unix shared libraries. - if (target->GetType() == cmState::SHARED_LIBRARY || - target->GetType() == cmState::MODULE_LIBRARY) { + if (target->GetType() == cmStateEnums::SHARED_LIBRARY || + target->GetType() == cmStateEnums::MODULE_LIBRARY) { if (!target->IsDLLPlatform()) { std::string prop; std::string value; @@ -912,22 +912,22 @@ void cmExportFileGenerator::GenerateImportTargetCode( // Create the imported target. os << "# Create imported target " << targetName << "\n"; switch (target->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: os << "add_executable(" << targetName << " IMPORTED)\n"; break; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: os << "add_library(" << targetName << " STATIC IMPORTED)\n"; break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: os << "add_library(" << targetName << " SHARED IMPORTED)\n"; break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: os << "add_library(" << targetName << " MODULE IMPORTED)\n"; break; - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: os << "add_library(" << targetName << " UNKNOWN IMPORTED)\n"; break; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: os << "add_library(" << targetName << " INTERFACE IMPORTED)\n"; break; default: // should never happen diff --git a/Source/cmExportInstallAndroidMKGenerator.cxx b/Source/cmExportInstallAndroidMKGenerator.cxx index 58b7510..f9f5f3a 100644 --- a/Source/cmExportInstallAndroidMKGenerator.cxx +++ b/Source/cmExportInstallAndroidMKGenerator.cxx @@ -38,7 +38,7 @@ void cmExportInstallAndroidMKGenerator::GenerateImportHeaderCode( tei != this->IEGen->GetExportSet()->GetTargetExports()->end(); ++tei) { // Collect import properties for this target. cmTargetExport const* te = *tei; - if (te->Target->GetType() == cmState::INTERFACE_LIBRARY) { + if (te->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } std::string dest; diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 0e043de..92c3bf1 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -81,7 +81,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) cmGeneratorTarget* gt = (*tei)->Target; requiresConfigFiles = - requiresConfigFiles || gt->GetType() != cmState::INTERFACE_LIBRARY; + requiresConfigFiles || gt->GetType() != cmStateEnums::INTERFACE_LIBRARY; this->GenerateImportTargetCode(os, gt); @@ -120,7 +120,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) require2_8_12 = true; } } - if (gt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { require3_0_0 = true; } if (gt->GetProperty("INTERFACE_SOURCES")) { @@ -316,7 +316,7 @@ void cmExportInstallFileGenerator::GenerateImportTargetsConfig( tei != this->IEGen->GetExportSet()->GetTargetExports()->end(); ++tei) { // Collect import properties for this target. cmTargetExport const* te = *tei; - if (te->Target->GetType() == cmState::INTERFACE_LIBRARY) { + if (te->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index f80980a..66b77a6 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -79,8 +79,8 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const cmTarget const& target = l->second; // Skip non-library targets. - if (target.GetType() < cmState::STATIC_LIBRARY || - target.GetType() > cmState::MODULE_LIBRARY) { + if (target.GetType() < cmStateEnums::STATIC_LIBRARY || + target.GetType() > cmStateEnums::MODULE_LIBRARY) { continue; } diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index 9fc71f6..a262e14 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -67,7 +67,7 @@ std::string cmExportTryCompileFileGenerator::FindTargets( CM_AUTO_PTR cge = ge.Parse(prop); - cmTarget dummyHead("try_compile_dummy_exe", cmState::EXECUTABLE, + cmTarget dummyHead("try_compile_dummy_exe", cmStateEnums::EXECUTABLE, cmTarget::VisibilityNormal, tgt->Target->GetMakefile()); cmGeneratorTarget gDummyHead(&dummyHead, tgt->GetLocalGenerator()); diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 18c732d..b91cae9 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -302,7 +302,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( ti != targets.end(); ti++) { std::string targetName = (*ti)->GetName(); switch ((*ti)->GetType()) { - case cmState::GLOBAL_TARGET: { + case cmStateEnums::GLOBAL_TARGET: { // Only add the global targets from CMAKE_BINARY_DIR, // not from the subdirs if (strcmp((*lg)->GetCurrentBinaryDirectory(), @@ -311,7 +311,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( compiler.c_str(), makeArgs); } } break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: // Add all utility targets, except the Nightly/Continuous/ // Experimental-"sub"targets as e.g. NightlyStart if (((targetName.find("Nightly") == 0) && @@ -326,11 +326,11 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( this->AppendTarget(xml, targetName, CM_NULLPTR, make.c_str(), *lg, compiler.c_str(), makeArgs); break; - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: { cmGeneratorTarget* gt = *ti; this->AppendTarget(xml, targetName, gt, make.c_str(), *lg, compiler.c_str(), makeArgs); @@ -364,12 +364,12 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( for (std::vector::iterator ti = targets.begin(); ti != targets.end(); ti++) { switch ((*ti)->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: - case cmState::UTILITY: // can have sources since 2.6.3 + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::UTILITY: // can have sources since 2.6.3 { std::vector sources; cmGeneratorTarget* gt = *ti; @@ -379,7 +379,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( si != sources.end(); si++) { // don't add source files from UTILITY target which have the // GENERATED property set: - if (gt->GetType() == cmState::UTILITY && + if (gt->GetType() == cmStateEnums::UTILITY && (*si)->GetPropertyAsBool("GENERATED")) { continue; } @@ -519,7 +519,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget( if (target != CM_NULLPTR) { int cbTargetType = this->GetCBTargetType(target); std::string workingDir = lg->GetCurrentBinaryDirectory(); - if (target->GetType() == cmState::EXECUTABLE) { + if (target->GetType() == cmStateEnums::EXECUTABLE) { // Determine the directory where the executable target is created, and // set the working directory to this dir. const char* runtimeOutputDir = @@ -537,7 +537,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget( std::string buildType = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); std::string location; - if (target->GetType() == cmState::OBJECT_LIBRARY) { + if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) { location = this->CreateDummyTargetFile(const_cast(lg), target); } else { @@ -713,17 +713,17 @@ std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf) int cmExtraCodeBlocksGenerator::GetCBTargetType(cmGeneratorTarget* target) { switch (target->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: if ((target->GetPropertyAsBool("WIN32_EXECUTABLE")) || (target->GetPropertyAsBool("MACOSX_BUNDLE"))) { return 0; } return 1; - case cmState::STATIC_LIBRARY: - case cmState::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: return 2; - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return 3; default: return 4; diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 360c852..90d41fe 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -127,7 +127,7 @@ std::vector cmExtraCodeLiteGenerator::CreateProjectsByTarget( for (std::vector::const_iterator lt = (*lg)->GetGeneratorTargets().begin(); lt != (*lg)->GetGeneratorTargets().end(); lt++) { - cmState::TargetType type = (*lt)->GetType(); + cmStateEnums::TargetType type = (*lt)->GetType(); std::string outputDir = (*lg)->GetCurrentBinaryDirectory(); std::string filename = outputDir + "/" + (*lt)->GetName() + ".project"; retval.push_back((*lt)->GetName()); @@ -136,11 +136,11 @@ std::vector cmExtraCodeLiteGenerator::CreateProjectsByTarget( this->WorkspacePath.c_str(), filename.c_str()); std::string visualname = (*lt)->GetName(); switch (type) { - case cmState::SHARED_LIBRARY: - case cmState::STATIC_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: visualname = "lib" + visualname; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: xml->StartElement("Project"); xml->Attribute("Name", visualname); xml->Attribute("Path", relafilename); @@ -209,16 +209,16 @@ std::string cmExtraCodeLiteGenerator::CollectSourceFiles( std::string projectType; switch (gt->GetType()) { - case cmState::EXECUTABLE: { + case cmStateEnums::EXECUTABLE: { projectType = "Executable"; } break; - case cmState::STATIC_LIBRARY: { + case cmStateEnums::STATIC_LIBRARY: { projectType = "Static Library"; } break; - case cmState::SHARED_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: { projectType = "Dynamic Library"; } break; - case cmState::MODULE_LIBRARY: { + case cmStateEnums::MODULE_LIBRARY: { projectType = "Dynamic Library"; } break; default: // intended fallthrough @@ -226,10 +226,10 @@ std::string cmExtraCodeLiteGenerator::CollectSourceFiles( } switch (gt->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: { std::vector sources; gt->GetSourceFiles(sources, makefile->GetSafeDefinition("CMAKE_BUILD_TYPE")); @@ -511,9 +511,9 @@ void cmExtraCodeLiteGenerator::CreateNewProjectFile( xml.StartElement("CodeLite_Project"); std::string visualname = gt->GetName(); switch (gt->GetType()) { - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: visualname = "lib" + visualname; default: // intended fallthrough break; diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index e342f4c..7535e8c 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -482,13 +482,14 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(cmXMLWriter& xml) std::string linkName2 = linkName; linkName2 += "/"; switch ((*ti)->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: { const char* prefix = - ((*ti)->GetType() == cmState::EXECUTABLE ? "[exe] " : "[lib] "); + ((*ti)->GetType() == cmStateEnums::EXECUTABLE ? "[exe] " + : "[lib] "); linkName2 += prefix; linkName2 += (*ti)->GetName(); this->AppendLinkedResource(xml, linkName2, "virtual:/virtual", @@ -912,14 +913,14 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const ti != targets.end(); ++ti) { std::string targetName = (*ti)->GetName(); switch ((*ti)->GetType()) { - case cmState::GLOBAL_TARGET: { + case cmStateEnums::GLOBAL_TARGET: { // Only add the global targets from CMAKE_BINARY_DIR, // not from the subdirs if (subdir.empty()) { this->AppendTarget(xml, targetName, make, makeArgs, subdir, ": "); } } break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: // Add all utility targets, except the Nightly/Continuous/ // Experimental-"sub"targets as e.g. NightlyStart if (((targetName.find("Nightly") == 0) && @@ -933,13 +934,14 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const this->AppendTarget(xml, targetName, make, makeArgs, subdir, ": "); break; - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: { const char* prefix = - ((*ti)->GetType() == cmState::EXECUTABLE ? "[exe] " : "[lib] "); + ((*ti)->GetType() == cmStateEnums::EXECUTABLE ? "[exe] " + : "[lib] "); this->AppendTarget(xml, targetName, make, makeArgs, subdir, prefix); std::string fastTarget = targetName; fastTarget += "/fast"; diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index b78d09a..3f09469 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -124,7 +124,7 @@ void cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg, ti != targets.end(); ++ti) { std::string targetName = (*ti)->GetName(); switch ((*ti)->GetType()) { - case cmState::GLOBAL_TARGET: { + case cmStateEnums::GLOBAL_TARGET: { bool insertTarget = false; // Only add the global targets from CMAKE_BINARY_DIR, // not from the subdirs @@ -147,7 +147,7 @@ void cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg, homeOutputDir); } } break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: // Add all utility targets, except the Nightly/Continuous/ // Experimental-"sub"targets as e.g. NightlyStart if (((targetName.find("Nightly") == 0) && @@ -162,11 +162,11 @@ void cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg, this->AppendTarget(fout, targetName, make, makeArgs, currentDir, homeOutputDir); break; - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: { this->AppendTarget(fout, targetName, make, makeArgs, currentDir, homeOutputDir); std::string fastTarget = targetName; diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 41f82a2..9a83c49 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -156,7 +156,7 @@ void cmExtraSublimeTextGenerator::AppendAllTargets( ti != targets.end(); ti++) { std::string targetName = (*ti)->GetName(); switch ((*ti)->GetType()) { - case cmState::GLOBAL_TARGET: { + case cmStateEnums::GLOBAL_TARGET: { // Only add the global targets from CMAKE_BINARY_DIR, // not from the subdirs if (strcmp((*lg)->GetCurrentBinaryDirectory(), @@ -166,7 +166,7 @@ void cmExtraSublimeTextGenerator::AppendAllTargets( false); } } break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: // Add all utility targets, except the Nightly/Continuous/ // Experimental-"sub"targets as e.g. NightlyStart if (((targetName.find("Nightly") == 0) && @@ -182,11 +182,11 @@ void cmExtraSublimeTextGenerator::AppendAllTargets( makefile, compiler.c_str(), sourceFileFlags, false); break; - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: { this->AppendTarget(fout, targetName, *lg, *ti, make.c_str(), makefile, compiler.c_str(), sourceFileFlags, false); diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index f866605..f34b2d6 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1104,7 +1104,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode if (!prop) { if (target->IsImported() || - target->GetType() == cmState::INTERFACE_LIBRARY) { + target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return linkedTargetsContent; } if (target->IsLinkInterfaceDependentBoolProperty(propertyName, @@ -1224,7 +1224,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode reportError(context, content->GetOriginalExpression(), e.str()); return std::string(); } - if (gt->GetType() != cmState::OBJECT_LIBRARY) { + if (gt->GetType() != cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "Objects of target \"" << tgtName << "\" referenced but is not an OBJECT library."; @@ -1506,7 +1506,7 @@ struct TargetFilesystemArtifactResultCreator "for DLL target platforms."); return std::string(); } - if (target->GetType() != cmState::SHARED_LIBRARY) { + if (target->GetType() != cmStateEnums::SHARED_LIBRARY) { ::reportError(context, content->GetOriginalExpression(), "TARGET_SONAME_FILE is allowed only for " "SHARED libraries."); @@ -1542,11 +1542,11 @@ struct TargetFilesystemArtifactResultCreator return std::string(); } - cmState::TargetType targetType = target->GetType(); + cmStateEnums::TargetType targetType = target->GetType(); - if (targetType != cmState::SHARED_LIBRARY && - targetType != cmState::MODULE_LIBRARY && - targetType != cmState::EXECUTABLE) { + if (targetType != cmStateEnums::SHARED_LIBRARY && + targetType != cmStateEnums::MODULE_LIBRARY && + targetType != cmStateEnums::EXECUTABLE) { ::reportError(context, content->GetOriginalExpression(), "TARGET_PDB_FILE is allowed only for " "targets with linker created artifacts."); @@ -1646,8 +1646,8 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode "No target \"" + name + "\""); return std::string(); } - if (target->GetType() >= cmState::OBJECT_LIBRARY && - target->GetType() != cmState::UNKNOWN_LIBRARY) { + if (target->GetType() >= cmStateEnums::OBJECT_LIBRARY && + target->GetType() != cmStateEnums::UNKNOWN_LIBRARY) { ::reportError(context, content->GetOriginalExpression(), "Target \"" + name + "\" is not an executable or library."); return std::string(); diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index b16cfc6..8324c30 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -215,7 +215,7 @@ struct TagVisitor , Target(target) , GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator()) , Header(CM_HEADER_REGEX) - , IsObjLib(target->GetType() == cmState::OBJECT_LIBRARY) + , IsObjLib(target->GetType() == cmStateEnums::OBJECT_LIBRARY) { } @@ -230,7 +230,7 @@ struct TagVisitor std::string ext = cmSystemTools::LowerCase(sf->GetExtension()); if (sf->GetCustomCommand()) { DoAccept::Result>::Do(this->Data, sf); - } else if (this->Target->GetType() == cmState::UTILITY) { + } else if (this->Target->GetType() == cmStateEnums::UTILITY) { DoAccept::Result>::Do(this->Data, sf); } else if (sf->GetPropertyAsBool("HEADER_FILE_ONLY")) { DoAccept::Result>::Do(this->Data, sf); @@ -368,7 +368,7 @@ cmLocalGenerator* cmGeneratorTarget::GetLocalGenerator() const return this->LocalGenerator; } -cmState::TargetType cmGeneratorTarget::GetType() const +cmStateEnums::TargetType cmGeneratorTarget::GetType() const { return this->Target->GetType(); } @@ -415,7 +415,7 @@ const char* cmGeneratorTarget::GetProperty(const std::string& prop) const const char* cmGeneratorTarget::GetOutputTargetType(bool implib) const { switch (this->GetType()) { - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: if (this->IsDLLPlatform()) { if (implib) { // A DLL import library is treated as an archive target. @@ -428,10 +428,10 @@ const char* cmGeneratorTarget::GetOutputTargetType(bool implib) const // library targets. return "LIBRARY"; } - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: // Static libraries are always treated as archive targets. return "ARCHIVE"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: if (implib) { // Module libraries are always treated as library targets. return "ARCHIVE"; @@ -439,7 +439,7 @@ const char* cmGeneratorTarget::GetOutputTargetType(bool implib) const // Module import libraries are treated as archive targets. return "LIBRARY"; } - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: if (implib) { // Executable import libraries are treated as archive targets. return "ARCHIVE"; @@ -845,7 +845,7 @@ const char* cmGeneratorTarget::GetLocationForBuild() const bool cmGeneratorTarget::IsSystemIncludeDirectory( const std::string& dir, const std::string& config) const { - assert(this->GetType() != cmState::INTERFACE_LIBRARY); + assert(this->GetType() != cmStateEnums::INTERFACE_LIBRARY); std::string config_upper; if (!config.empty()) { config_upper = cmSystemTools::UpperCase(config); @@ -1006,7 +1006,7 @@ static bool processSources( void cmGeneratorTarget::GetSourceFiles(std::vector& files, const std::string& config) const { - assert(this->GetType() != cmState::INTERFACE_LIBRARY); + assert(this->GetType() != cmStateEnums::INTERFACE_LIBRARY); if (!this->LocalGenerator->GetGlobalGenerator()->GetConfigureDoneCMP0026()) { // At configure-time, this method can be called as part of getting the @@ -1151,7 +1151,7 @@ bool cmGeneratorTarget::HasSOName(const std::string& config) const { // soname is supported only for shared libraries and modules, // and then only when the platform supports an soname flag. - return ((this->GetType() == cmState::SHARED_LIBRARY) && + return ((this->GetType() == cmStateEnums::SHARED_LIBRARY) && !this->GetPropertyAsBool("NO_SONAME") && this->Makefile->GetSONameFlag(this->GetLinkerLanguage(config))); } @@ -1161,9 +1161,9 @@ bool cmGeneratorTarget::NeedRelinkBeforeInstall( { // Only executables and shared libraries can have an rpath and may // need relinking. - if (this->GetType() != cmState::EXECUTABLE && - this->GetType() != cmState::SHARED_LIBRARY && - this->GetType() != cmState::MODULE_LIBRARY) { + if (this->GetType() != cmStateEnums::EXECUTABLE && + this->GetType() != cmStateEnums::SHARED_LIBRARY && + this->GetType() != cmStateEnums::MODULE_LIBRARY) { return false; } @@ -1235,9 +1235,9 @@ bool cmGeneratorTarget::NeedRelinkBeforeInstall( bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const { // Only certain target types have an rpath. - if (!(this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY || - this->GetType() == cmState::EXECUTABLE)) { + if (!(this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY || + this->GetType() == cmStateEnums::EXECUTABLE)) { return false; } @@ -1292,7 +1292,7 @@ bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const bool cmGeneratorTarget::IsImportedSharedLibWithoutSOName( const std::string& config) const { - if (this->IsImported() && this->GetType() == cmState::SHARED_LIBRARY) { + if (this->IsImported() && this->GetType() == cmStateEnums::SHARED_LIBRARY) { if (cmGeneratorTarget::ImportInfo const* info = this->GetImportInfo(config)) { return info->NoSOName; @@ -1308,7 +1308,7 @@ bool cmGeneratorTarget::HasMacOSXRpathInstallNameDir( bool macosx_rpath = false; if (!this->IsImported()) { - if (this->GetType() != cmState::SHARED_LIBRARY) { + if (this->GetType() != cmStateEnums::SHARED_LIBRARY) { return false; } const char* install_name = this->GetProperty("INSTALL_NAME_DIR"); @@ -1562,17 +1562,17 @@ const cmListFileBacktrace* cmGeneratorTarget::GetUtilityBacktrace( bool cmGeneratorTarget::HaveWellDefinedOutputFiles() const { - return this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY || - this->GetType() == cmState::EXECUTABLE; + return this->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY || + this->GetType() == cmStateEnums::EXECUTABLE; } const char* cmGeneratorTarget::GetExportMacro() const { // Define the symbol for targets that export symbols. - if (this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY || + if (this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY || this->IsExecutableWithExports()) { if (const char* custom_export_name = this->GetProperty("DEFINE_SYMBOL")) { this->ExportMacro = custom_export_name; @@ -1846,7 +1846,7 @@ cmGeneratorTarget::CompileInfo const* cmGeneratorTarget::GetCompileInfo( return CM_NULLPTR; } - if (this->GetType() > cmState::OBJECT_LIBRARY) { + if (this->GetType() > cmStateEnums::OBJECT_LIBRARY) { std::string msg = "cmTarget::GetCompileInfo called for "; msg += this->GetName(); msg += " which has type "; @@ -2023,7 +2023,7 @@ cmTargetTraceDependencies::cmTargetTraceDependencies(cmGeneratorTarget* target) this->CurrentEntry = CM_NULLPTR; // Queue all the source files already specified for the target. - if (target->GetType() != cmState::INTERFACE_LIBRARY) { + if (target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { std::vector configs; this->Makefile->GetConfigurations(configs); if (configs.empty()) { @@ -2158,8 +2158,8 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep) // then make sure it was not a full path to something else, and // the fact that the name matched a target was just a coincidence. if (cmSystemTools::FileIsFullPath(dep.c_str())) { - if (t->GetType() >= cmState::EXECUTABLE && - t->GetType() <= cmState::MODULE_LIBRARY) { + if (t->GetType() >= cmStateEnums::EXECUTABLE && + t->GetType() <= cmStateEnums::MODULE_LIBRARY) { // This is really only for compatibility so we do not need to // worry about configuration names and output names. std::string tLocation = t->GetLocationForBuild(); @@ -2199,7 +2199,7 @@ void cmTargetTraceDependencies::CheckCustomCommand(cmCustomCommand const& cc) // Check for a target with this name. if (cmGeneratorTarget* t = this->LocalGenerator->FindGeneratorTargetToUse(command)) { - if (t->GetType() == cmState::EXECUTABLE) { + if (t->GetType() == cmStateEnums::EXECUTABLE) { // The command refers to an executable target built in // this project. Add the target-level dependency to make // sure the executable is up to date before this custom @@ -2273,7 +2273,7 @@ void cmGeneratorTarget::TraceDependencies() // would find nothing anyway, but when building CMake itself the "install" // target command ends up referencing the "cmake" target but we do not // really want the dependency because "install" depend on "all" anyway. - if (this->GetType() == cmState::GLOBAL_TARGET) { + if (this->GetType() == cmStateEnums::GLOBAL_TARGET) { return; } @@ -2312,7 +2312,7 @@ std::string cmGeneratorTarget::GetCreateRuleVariable( std::string const& lang, std::string const& config) const { switch (this->GetType()) { - case cmState::STATIC_LIBRARY: { + case cmStateEnums::STATIC_LIBRARY: { std::string var = "CMAKE_" + lang + "_CREATE_STATIC_LIBRARY"; if (this->GetFeatureAsBool("INTERPROCEDURAL_OPTIMIZATION", config)) { std::string varIPO = var + "_IPO"; @@ -2322,11 +2322,11 @@ std::string cmGeneratorTarget::GetCreateRuleVariable( } return var; } - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return "CMAKE_" + lang + "_CREATE_SHARED_LIBRARY"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return "CMAKE_" + lang + "_CREATE_SHARED_MODULE"; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return "CMAKE_" + lang + "_LINK_EXECUTABLE"; default: break; @@ -2753,11 +2753,11 @@ void cmGeneratorTarget::ComputeTargetManifest(const std::string& config) const std::string realName; std::string impName; std::string pdbName; - if (this->GetType() == cmState::EXECUTABLE) { + if (this->GetType() == cmStateEnums::EXECUTABLE) { this->GetExecutableNames(name, realName, impName, pdbName, config); - } else if (this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY) { + } else if (this->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY) { this->GetLibraryNames(name, soName, realName, impName, pdbName, config); } else { return; @@ -2843,7 +2843,7 @@ std::string cmGeneratorTarget::NormalGetRealName( this->LocalGenerator->IssueMessage(cmake::INTERNAL_ERROR, msg); } - if (this->GetType() == cmState::EXECUTABLE) { + if (this->GetType() == cmStateEnums::EXECUTABLE) { // Compute the real name that will be built. std::string name; std::string realName; @@ -2926,8 +2926,8 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name, std::string& soName, } // The import library name. - if (this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY) { + if (this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY) { impName = this->GetFullNameInternal(config, true); } else { impName = ""; @@ -2959,7 +2959,7 @@ void cmGeneratorTarget::GetExecutableNames(std::string& name, #else // Check for executable version properties. const char* version = this->GetProperty("VERSION"); - if (this->GetType() != cmState::EXECUTABLE || + if (this->GetType() != cmStateEnums::EXECUTABLE || this->Makefile->IsOn("XCODE")) { version = CM_NULLPTR; } @@ -3028,10 +3028,10 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, std::string& outSuffix) const { // Use just the target name for non-main target types. - if (this->GetType() != cmState::STATIC_LIBRARY && - this->GetType() != cmState::SHARED_LIBRARY && - this->GetType() != cmState::MODULE_LIBRARY && - this->GetType() != cmState::EXECUTABLE) { + if (this->GetType() != cmStateEnums::STATIC_LIBRARY && + this->GetType() != cmStateEnums::SHARED_LIBRARY && + this->GetType() != cmStateEnums::MODULE_LIBRARY && + this->GetType() != cmStateEnums::EXECUTABLE) { outPrefix = ""; outBase = this->GetName(); outSuffix = ""; @@ -3050,9 +3050,9 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, // The implib option is only allowed for shared libraries, module // libraries, and executables. - if (this->GetType() != cmState::SHARED_LIBRARY && - this->GetType() != cmState::MODULE_LIBRARY && - this->GetType() != cmState::EXECUTABLE) { + if (this->GetType() != cmStateEnums::SHARED_LIBRARY && + this->GetType() != cmStateEnums::MODULE_LIBRARY && + this->GetType() != cmStateEnums::EXECUTABLE) { implib = false; } @@ -3130,7 +3130,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, // Name shared libraries with their version number on some platforms. if (const char* soversion = this->GetProperty("SOVERSION")) { - if (this->GetType() == cmState::SHARED_LIBRARY && !implib && + if (this->GetType() == cmStateEnums::SHARED_LIBRARY && !implib && this->Makefile->IsOn("CMAKE_SHARED_LIBRARY_NAME_WITH_VERSION")) { outBase += "-"; outBase += soversion; @@ -3296,8 +3296,8 @@ cmGeneratorTarget::GetCompatibleInterfaces(std::string const& config) const bool cmGeneratorTarget::IsLinkInterfaceDependentBoolProperty( const std::string& p, const std::string& config) const { - if (this->GetType() == cmState::OBJECT_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::OBJECT_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return false; } return this->GetCompatibleInterfaces(config).PropsBool.count(p) > 0; @@ -3306,8 +3306,8 @@ bool cmGeneratorTarget::IsLinkInterfaceDependentBoolProperty( bool cmGeneratorTarget::IsLinkInterfaceDependentStringProperty( const std::string& p, const std::string& config) const { - if (this->GetType() == cmState::OBJECT_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::OBJECT_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return false; } return this->GetCompatibleInterfaces(config).PropsString.count(p) > 0; @@ -3316,8 +3316,8 @@ bool cmGeneratorTarget::IsLinkInterfaceDependentStringProperty( bool cmGeneratorTarget::IsLinkInterfaceDependentNumberMinProperty( const std::string& p, const std::string& config) const { - if (this->GetType() == cmState::OBJECT_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::OBJECT_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return false; } return this->GetCompatibleInterfaces(config).PropsNumberMin.count(p) > 0; @@ -3326,8 +3326,8 @@ bool cmGeneratorTarget::IsLinkInterfaceDependentNumberMinProperty( bool cmGeneratorTarget::IsLinkInterfaceDependentNumberMaxProperty( const std::string& p, const std::string& config) const { - if (this->GetType() == cmState::OBJECT_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::OBJECT_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return false; } return this->GetCompatibleInterfaces(config).PropsNumberMax.count(p) > 0; @@ -3921,7 +3921,7 @@ void cmGeneratorTarget::GetTargetVersion(bool soversion, int& major, minor = 0; patch = 0; - assert(this->GetType() != cmState::INTERFACE_LIBRARY); + assert(this->GetType() != cmStateEnums::INTERFACE_LIBRARY); // Look for a VERSION or SOVERSION property. const char* prop = soversion ? "SOVERSION" : "VERSION"; @@ -3993,7 +3993,7 @@ std::string cmGeneratorTarget::CreateFortranModuleDirectory( std::string cmGeneratorTarget::GetFrameworkVersion() const { - assert(this->GetType() != cmState::INTERFACE_LIBRARY); + assert(this->GetType() != cmStateEnums::INTERFACE_LIBRARY); if (const char* fversion = this->GetProperty("FRAMEWORK_VERSION")) { return fversion; @@ -4109,7 +4109,7 @@ cmLinkInterface const* cmGeneratorTarget::GetLinkInterface( // Link interfaces are not supported for executables that do not // export symbols. - if (this->GetType() == cmState::EXECUTABLE && + if (this->GetType() == cmStateEnums::EXECUTABLE && !this->IsExecutableWithExports()) { return CM_NULLPTR; } @@ -4143,9 +4143,9 @@ void cmGeneratorTarget::ComputeLinkInterface( cmGeneratorTarget const* headTarget) const { if (iface.ExplicitLibraries) { - if (this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { // Shared libraries may have runtime implementation dependencies // on other shared libraries that are not in the interface. UNORDERED_SET emitted; @@ -4154,7 +4154,7 @@ void cmGeneratorTarget::ComputeLinkInterface( li != iface.Libraries.end(); ++li) { emitted.insert(*li); } - if (this->GetType() != cmState::INTERFACE_LIBRARY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY) { cmLinkImplementation const* impl = this->GetLinkImplementation(config); for (std::vector::const_iterator li = impl->Libraries.begin(); @@ -4162,7 +4162,7 @@ void cmGeneratorTarget::ComputeLinkInterface( if (emitted.insert(*li).second) { if (li->Target) { // This is a runtime dependency on another shared library. - if (li->Target->GetType() == cmState::SHARED_LIBRARY) { + if (li->Target->GetType() == cmStateEnums::SHARED_LIBRARY) { iface.SharedDeps.push_back(*li); } } else { @@ -4192,7 +4192,7 @@ void cmGeneratorTarget::ComputeLinkInterface( } } - if (this->GetType() == cmState::STATIC_LIBRARY) { + if (this->GetType() == cmStateEnums::STATIC_LIBRARY) { // Construct the property name suffix for this configuration. std::string suffix = "_"; if (!config.empty()) { @@ -4225,7 +4225,7 @@ const cmLinkInterfaceLibraries* cmGeneratorTarget::GetLinkInterfaceLibraries( // Link interfaces are not supported for executables that do not // export symbols. - if (this->GetType() == cmState::EXECUTABLE && + if (this->GetType() == cmStateEnums::EXECUTABLE && !this->IsExecutableWithExports()) { return CM_NULLPTR; } @@ -4372,12 +4372,12 @@ bool cmGeneratorTarget::ComputeOutputDir(const std::string& config, if (out != outdir) { conf = ""; } - } else if (this->GetType() == cmState::EXECUTABLE) { + } else if (this->GetType() == cmStateEnums::EXECUTABLE) { // Lookup the output path for executables. out = this->Makefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH"); - } else if (this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY) { + } else if (this->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY) { // Lookup the output path for libraries. out = this->Makefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH"); } @@ -4486,7 +4486,7 @@ void cmGeneratorTarget::ComputeLinkInterfaceLibraries( // CMP0022 NEW behavior is to use INTERFACE_LINK_LIBRARIES. linkIfaceProp = "INTERFACE_LINK_LIBRARIES"; explicitLibraries = this->GetProperty(linkIfaceProp); - } else if (this->GetType() == cmState::SHARED_LIBRARY || + } else if (this->GetType() == cmStateEnums::SHARED_LIBRARY || this->IsExecutableWithExports()) { // CMP0022 OLD behavior is to use LINK_INTERFACE_LIBRARIES if set on a // shared lib or executable. @@ -4531,8 +4531,9 @@ void cmGeneratorTarget::ComputeLinkInterfaceLibraries( // There is no implicit link interface for executables or modules // so if none was explicitly set then there is no link interface. - if (!explicitLibraries && (this->GetType() == cmState::EXECUTABLE || - (this->GetType() == cmState::MODULE_LIBRARY))) { + if (!explicitLibraries && + (this->GetType() == cmStateEnums::EXECUTABLE || + (this->GetType() == cmStateEnums::MODULE_LIBRARY))) { return; } iface.Exists = true; @@ -4661,7 +4662,7 @@ cmGeneratorTarget::ImportInfo const* cmGeneratorTarget::GetImportInfo( i = this->ImportInfoMap.insert(entry).first; } - if (this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return &i->second; } // If the location is empty then the target is not available for @@ -4696,7 +4697,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, std::string linkProp = "INTERFACE_LINK_LIBRARIES"; const char* propertyLibs = this->GetProperty(linkProp); - if (this->GetType() != cmState::INTERFACE_LIBRARY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY) { if (!propertyLibs) { linkProp = "IMPORTED_LINK_INTERFACE_LIBRARIES"; linkProp += suffix; @@ -4713,7 +4714,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, info.Libraries = propertyLibs; } } - if (this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return; } @@ -4734,7 +4735,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, } // Get the soname. - if (this->GetType() == cmState::SHARED_LIBRARY) { + if (this->GetType() == cmStateEnums::SHARED_LIBRARY) { std::string soProp = "IMPORTED_SONAME"; soProp += suffix; if (const char* config_soname = this->GetProperty(soProp)) { @@ -4745,7 +4746,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, } // Get the "no-soname" mark. - if (this->GetType() == cmState::SHARED_LIBRARY) { + if (this->GetType() == cmStateEnums::SHARED_LIBRARY) { std::string soProp = "IMPORTED_NO_SONAME"; soProp += suffix; if (const char* config_no_soname = this->GetProperty(soProp)) { @@ -4759,7 +4760,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, // Get the import library. if (imp) { info.ImportLibrary = imp; - } else if (this->GetType() == cmState::SHARED_LIBRARY || + } else if (this->GetType() == cmStateEnums::SHARED_LIBRARY || this->IsExecutableWithExports()) { std::string impProp = "IMPORTED_IMPLIB"; impProp += suffix; @@ -4795,7 +4796,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, } // Get the cyclic repetition count. - if (this->GetType() == cmState::STATIC_LIBRARY) { + if (this->GetType() == cmStateEnums::STATIC_LIBRARY) { std::string linkProp = "IMPORTED_LINK_INTERFACE_MULTIPLICITY"; linkProp += suffix; if (const char* config_reps = this->GetProperty(linkProp)) { @@ -5191,12 +5192,12 @@ cmGeneratorTarget* cmGeneratorTarget::FindTargetToLink( // Skip targets that will not really be linked. This is probably a // name conflict between an external library and an executable // within the project. - if (tgt && tgt->GetType() == cmState::EXECUTABLE && + if (tgt && tgt->GetType() == cmStateEnums::EXECUTABLE && !tgt->IsExecutableWithExports()) { tgt = CM_NULLPTR; } - if (tgt && tgt->GetType() == cmState::OBJECT_LIBRARY) { + if (tgt && tgt->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "Target \"" << this->GetName() << "\" links to " "OBJECT library \"" @@ -5242,14 +5243,14 @@ bool cmGeneratorTarget::GetImplibGNUtoMS(std::string const& gnuName, bool cmGeneratorTarget::IsExecutableWithExports() const { - return (this->GetType() == cmState::EXECUTABLE && + return (this->GetType() == cmStateEnums::EXECUTABLE && this->GetPropertyAsBool("ENABLE_EXPORTS")); } bool cmGeneratorTarget::HasImportLibrary() const { return (this->IsDLLPlatform() && - (this->GetType() == cmState::SHARED_LIBRARY || + (this->GetType() == cmStateEnums::SHARED_LIBRARY || this->IsExecutableWithExports())); } @@ -5269,24 +5270,24 @@ std::string cmGeneratorTarget::GetSupportDirectory() const bool cmGeneratorTarget::IsLinkable() const { - return (this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY || - this->GetType() == cmState::UNKNOWN_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY || + return (this->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY || + this->GetType() == cmStateEnums::UNKNOWN_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY || this->IsExecutableWithExports()); } bool cmGeneratorTarget::IsFrameworkOnApple() const { - return (this->GetType() == cmState::SHARED_LIBRARY && + return (this->GetType() == cmStateEnums::SHARED_LIBRARY && this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("FRAMEWORK")); } bool cmGeneratorTarget::IsAppBundleOnApple() const { - return (this->GetType() == cmState::EXECUTABLE && + return (this->GetType() == cmStateEnums::EXECUTABLE && this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("MACOSX_BUNDLE")); } @@ -5298,6 +5299,6 @@ bool cmGeneratorTarget::IsXCTestOnApple() const bool cmGeneratorTarget::IsCFBundleOnApple() const { - return (this->GetType() == cmState::MODULE_LIBRARY && + return (this->GetType() == cmStateEnums::MODULE_LIBRARY && this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("BUNDLE")); } diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 8e5a02d..625c28e 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -60,7 +60,7 @@ public: cmComputeLinkInformation* GetLinkInformation( const std::string& config) const; - cmState::TargetType GetType() const; + cmStateEnums::TargetType GetType() const; const std::string& GetName() const; std::string GetExportName() const; @@ -198,7 +198,7 @@ public: bool LinkLanguagePropagatesToDependents() const { - return this->GetType() == cmState::STATIC_LIBRARY; + return this->GetType() == cmStateEnums::STATIC_LIBRARY; } /** Get the macro to define when building sources in this target. diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 3154f8d..ba623d5 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -130,7 +130,7 @@ void cmGhsMultiTargetGenerator::Generate() this->WriteCompilerFlags(config, language); this->WriteCompilerDefinitions(config, language); this->WriteIncludes(config, language); - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { this->WriteTargetLinkLibraries(config, language); } this->WriteCustomCommands(); @@ -174,7 +174,7 @@ GhsMultiGpj::Types cmGhsMultiTargetGenerator::GetGpjTag( GhsMultiGpj::Types output; if (cmGhsMultiTargetGenerator::DetermineIfTargetGroup(target)) { output = GhsMultiGpj::INTERGRITY_APPLICATION; - } else if (target->GetType() == cmState::STATIC_LIBRARY) { + } else if (target->GetType() == cmStateEnums::STATIC_LIBRARY) { output = GhsMultiGpj::LIBRARY; } else { output = GhsMultiGpj::PROGRAM; @@ -195,13 +195,13 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string& config, std::string outputDir(this->GetOutputDirectory(config)); std::string outputFilename(this->GetOutputFilename(config)); - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) { std::string const static_library_suffix = this->Makefile->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX"); *this->GetFolderBuildStreams() << " -o \"" << outputDir << outputFilename << static_library_suffix << "\"" << std::endl; - } else if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + } else if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { if (notKernel && !this->IsTargetGroup()) { *this->GetFolderBuildStreams() << " -relprog" << std::endl; } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 7d0c2da..58c6a00 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1371,14 +1371,14 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() filteredTargets.reserve(targets.size()); for (std::vector::iterator ti = targets.begin(); ti != targets.end(); ++ti) { - if ((*ti)->GetType() == cmState::GLOBAL_TARGET) { + if ((*ti)->GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } - if ((*ti)->GetType() != cmState::EXECUTABLE && - (*ti)->GetType() != cmState::STATIC_LIBRARY && - (*ti)->GetType() != cmState::SHARED_LIBRARY && - (*ti)->GetType() != cmState::MODULE_LIBRARY && - (*ti)->GetType() != cmState::OBJECT_LIBRARY) { + if ((*ti)->GetType() != cmStateEnums::EXECUTABLE && + (*ti)->GetType() != cmStateEnums::STATIC_LIBRARY && + (*ti)->GetType() != cmStateEnums::SHARED_LIBRARY && + (*ti)->GetType() != cmStateEnums::MODULE_LIBRARY && + (*ti)->GetType() != cmStateEnums::OBJECT_LIBRARY) { continue; } if ((!(*ti)->GetPropertyAsBool("AUTOMOC") && @@ -1443,13 +1443,13 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo() cmTargets& targets = mf->GetTargets(); for (cmTargets::iterator ti = targets.begin(); ti != targets.end(); ++ti) { cmTarget* t = &ti->second; - if (t->GetType() == cmState::GLOBAL_TARGET) { + if (t->GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } t->AppendBuildInterfaceIncludes(); - if (t->GetType() == cmState::INTERFACE_LIBRARY) { + if (t->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } @@ -1575,7 +1575,7 @@ void cmGlobalGenerator::CheckTargetProperties() this->Makefiles[i]->ConfigureFinalPass(); cmTargets& targets = this->Makefiles[i]->GetTargets(); for (cmTargets::iterator l = targets.begin(); l != targets.end(); l++) { - if (l->second.GetType() == cmState::INTERFACE_LIBRARY) { + if (l->second.GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } const cmTarget::LinkLibraryVectorType& libs = @@ -1942,7 +1942,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const { - if (target->GetType() == cmState::INTERFACE_LIBRARY || + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY || target->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { // This target is excluded from its directory. return true; @@ -2398,8 +2398,8 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(GlobalTargetInfo const& gti, cmMakefile* mf) { // Package - cmTarget target(gti.Name, cmState::GLOBAL_TARGET, cmTarget::VisibilityNormal, - mf); + cmTarget target(gti.Name, cmStateEnums::GLOBAL_TARGET, + cmTarget::VisibilityNormal, mf); target.SetProperty("EXCLUDE_FROM_ALL", "TRUE"); std::vector no_outputs; @@ -2544,7 +2544,7 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets, bool cmGlobalGenerator::IsRootOnlyTarget(cmGeneratorTarget* target) const { - return (target->GetType() == cmState::GLOBAL_TARGET || + return (target->GetType() == cmStateEnums::GLOBAL_TARGET || target->GetName() == this->GetAllTargetName()); } @@ -2729,7 +2729,7 @@ void cmGlobalGenerator::WriteSummary() this->LocalGenerators[i]->GetGeneratorTargets(); for (std::vector::iterator it = tgts.begin(); it != tgts.end(); ++it) { - if ((*it)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*it)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } this->WriteSummary(*it); diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 57d9aca..1881b7a 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -74,7 +74,7 @@ void cmGlobalKdevelopGenerator::Generate() for (std::vector::const_iterator ti = targets.begin(); ti != targets.end(); ti++) { - if ((*ti)->GetType() == cmState::EXECUTABLE) { + if ((*ti)->GetType() == cmStateEnums::EXECUTABLE) { executable = (*ti)->GetLocation(""); break; } diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 67df038..98654c5 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -956,17 +956,17 @@ void cmGlobalNinjaGenerator::AppendTargetOutputs( bool realname = target->IsFrameworkOnApple(); switch (target->GetType()) { - case cmState::EXECUTABLE: - case cmState::SHARED_LIBRARY: - case cmState::STATIC_LIBRARY: - case cmState::MODULE_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: { outputs.push_back(this->ConvertToNinjaPath( target->GetFullPath(configName, false, realname))); break; } - case cmState::OBJECT_LIBRARY: - case cmState::GLOBAL_TARGET: - case cmState::UTILITY: { + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::GLOBAL_TARGET: + case cmStateEnums::UTILITY: { std::string path = target->GetLocalGenerator()->GetCurrentBinaryDirectory() + std::string("/") + target->GetName(); @@ -982,7 +982,7 @@ void cmGlobalNinjaGenerator::AppendTargetOutputs( void cmGlobalNinjaGenerator::AppendTargetDepends( cmGeneratorTarget const* target, cmNinjaDeps& outputs) { - if (target->GetType() == cmState::GLOBAL_TARGET) { + if (target->GetType() == cmStateEnums::GLOBAL_TARGET) { // These depend only on other CMake-provided targets, e.g. "all". std::set const& utils = target->GetUtilities(); for (std::set::const_iterator i = utils.begin(); @@ -997,7 +997,7 @@ void cmGlobalNinjaGenerator::AppendTargetDepends( cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target); for (cmTargetDependSet::const_iterator i = targetDeps.begin(); i != targetDeps.end(); ++i) { - if ((*i)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*i)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } this->AppendTargetOutputs(*i, outs); @@ -1034,7 +1034,7 @@ void cmGlobalNinjaGenerator::ComputeTargetDependsClosure( cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target); for (cmTargetDependSet::const_iterator i = targetDeps.begin(); i != targetDeps.end(); ++i) { - if ((*i)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*i)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } if (depends.insert(*i).second) { @@ -1102,11 +1102,13 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) lg->GetGeneratorTargets().begin(); ti != lg->GetGeneratorTargets().end(); ++ti) { cmGeneratorTarget const* gt = *ti; - cmState::TargetType const type = gt->GetType(); - if ((type == cmState::EXECUTABLE || type == cmState::STATIC_LIBRARY || - type == cmState::SHARED_LIBRARY || - type == cmState::MODULE_LIBRARY || - type == cmState::OBJECT_LIBRARY || type == cmState::UTILITY) && + cmStateEnums::TargetType const type = gt->GetType(); + if ((type == cmStateEnums::EXECUTABLE || + type == cmStateEnums::STATIC_LIBRARY || + type == cmStateEnums::SHARED_LIBRARY || + type == cmStateEnums::MODULE_LIBRARY || + type == cmStateEnums::OBJECT_LIBRARY || + type == cmStateEnums::UTILITY) && !gt->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { targetsPerFolder[currentSourceFolder].push_back(gt->GetName()); } diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index daacef0..615670c 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -382,12 +382,12 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefileLanguageRules( std::vector tgts = lg->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); l++) { - if (((*l)->GetType() == cmState::EXECUTABLE) || - ((*l)->GetType() == cmState::STATIC_LIBRARY) || - ((*l)->GetType() == cmState::SHARED_LIBRARY) || - ((*l)->GetType() == cmState::MODULE_LIBRARY) || - ((*l)->GetType() == cmState::OBJECT_LIBRARY) || - ((*l)->GetType() == cmState::UTILITY)) { + if (((*l)->GetType() == cmStateEnums::EXECUTABLE) || + ((*l)->GetType() == cmStateEnums::STATIC_LIBRARY) || + ((*l)->GetType() == cmStateEnums::SHARED_LIBRARY) || + ((*l)->GetType() == cmStateEnums::MODULE_LIBRARY) || + ((*l)->GetType() == cmStateEnums::OBJECT_LIBRARY) || + ((*l)->GetType() == cmStateEnums::UTILITY)) { cmGeneratorTarget* gt = *l; std::string tname = lg->GetRelativeTargetDirectory(gt); tname += "/DependInfo.cmake"; @@ -416,10 +416,12 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRule2( l != targets.end(); ++l) { cmGeneratorTarget* gtarget = *l; int type = gtarget->GetType(); - if ((type == cmState::EXECUTABLE) || (type == cmState::STATIC_LIBRARY) || - (type == cmState::SHARED_LIBRARY) || - (type == cmState::MODULE_LIBRARY) || - (type == cmState::OBJECT_LIBRARY) || (type == cmState::UTILITY)) { + if ((type == cmStateEnums::EXECUTABLE) || + (type == cmStateEnums::STATIC_LIBRARY) || + (type == cmStateEnums::SHARED_LIBRARY) || + (type == cmStateEnums::MODULE_LIBRARY) || + (type == cmStateEnums::OBJECT_LIBRARY) || + (type == cmStateEnums::UTILITY)) { // Add this to the list of depends rules in this directory. if ((!check_all || !gtarget->GetPropertyAsBool("EXCLUDE_FROM_ALL")) && (!check_relink || @@ -554,11 +556,12 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules( if (!name.empty() && emitted.insert(name).second && // Handle user targets here. Global targets are handled in // the local generator on a per-directory basis. - ((type == cmState::EXECUTABLE) || - (type == cmState::STATIC_LIBRARY) || - (type == cmState::SHARED_LIBRARY) || - (type == cmState::MODULE_LIBRARY) || - (type == cmState::OBJECT_LIBRARY) || (type == cmState::UTILITY))) { + ((type == cmStateEnums::EXECUTABLE) || + (type == cmStateEnums::STATIC_LIBRARY) || + (type == cmStateEnums::SHARED_LIBRARY) || + (type == cmStateEnums::MODULE_LIBRARY) || + (type == cmStateEnums::OBJECT_LIBRARY) || + (type == cmStateEnums::UTILITY))) { // Add a rule to build the target by name. lg->WriteDivider(ruleFileStream); ruleFileStream << "# Target rules for targets named " << name @@ -630,11 +633,12 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2( cmGeneratorTarget* gtarget = *t; int type = gtarget->GetType(); std::string name = gtarget->GetName(); - if (!name.empty() && - ((type == cmState::EXECUTABLE) || (type == cmState::STATIC_LIBRARY) || - (type == cmState::SHARED_LIBRARY) || - (type == cmState::MODULE_LIBRARY) || - (type == cmState::OBJECT_LIBRARY) || (type == cmState::UTILITY))) { + if (!name.empty() && ((type == cmStateEnums::EXECUTABLE) || + (type == cmStateEnums::STATIC_LIBRARY) || + (type == cmStateEnums::SHARED_LIBRARY) || + (type == cmStateEnums::MODULE_LIBRARY) || + (type == cmStateEnums::OBJECT_LIBRARY) || + (type == cmStateEnums::UTILITY))) { std::string makefileName; // Add a rule to build the target by name. localName = lg->GetRelativeTargetDirectory(gtarget); @@ -808,7 +812,7 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks() cmLocalGenerator* tlg = gt->GetLocalGenerator(); - if (gt->GetType() == cmState::INTERFACE_LIBRARY || + if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY || gt->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { continue; } @@ -847,7 +851,7 @@ size_t cmGlobalUnixMakefileGenerator3::CountProgressMarksInTarget( TargetDependSet const& depends = this->GetTargetDirectDepends(target); for (TargetDependSet::const_iterator di = depends.begin(); di != depends.end(); ++di) { - if ((*di)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*di)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } count += this->CountProgressMarksInTarget(*di, emitted); @@ -908,7 +912,7 @@ void cmGlobalUnixMakefileGenerator3::AppendGlobalTargetDepends( i != depends_set.end(); ++i) { // Create the target-level dependency. cmGeneratorTarget const* dep = *i; - if (dep->GetType() == cmState::INTERFACE_LIBRARY) { + if (dep->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } cmLocalUnixMakefileGenerator3* lg3 = @@ -950,13 +954,14 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule( for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { cmGeneratorTarget* target = *t; - cmState::TargetType type = target->GetType(); - if ((type == cmState::EXECUTABLE) || - (type == cmState::STATIC_LIBRARY) || - (type == cmState::SHARED_LIBRARY) || - (type == cmState::MODULE_LIBRARY) || - (type == cmState::OBJECT_LIBRARY) || - (type == cmState::GLOBAL_TARGET) || (type == cmState::UTILITY)) { + cmStateEnums::TargetType type = target->GetType(); + if ((type == cmStateEnums::EXECUTABLE) || + (type == cmStateEnums::STATIC_LIBRARY) || + (type == cmStateEnums::SHARED_LIBRARY) || + (type == cmStateEnums::MODULE_LIBRARY) || + (type == cmStateEnums::OBJECT_LIBRARY) || + (type == cmStateEnums::GLOBAL_TARGET) || + (type == cmStateEnums::UTILITY)) { std::string name = target->GetName(); if (emittedTargets.insert(name).second) { path = "... "; diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 5d9a02b..f120762 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -230,9 +230,10 @@ cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs() } bool cmGlobalVisualStudio11Generator::NeedsDeploy( - cmState::TargetType type) const + cmStateEnums::TargetType type) const { - if ((type == cmState::EXECUTABLE || type == cmState::SHARED_LIBRARY) && + if ((type == cmStateEnums::EXECUTABLE || + type == cmStateEnums::SHARED_LIBRARY) && (this->SystemIsWindowsPhone || this->SystemIsWindowsStore)) { return true; } diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index 0c03b0a..be78544 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -37,7 +37,7 @@ protected: static std::set GetInstalledWindowsCESDKs(); /** Return true if the configuration needs to be deployed */ - virtual bool NeedsDeploy(cmState::TargetType type) const; + virtual bool NeedsDeploy(cmStateEnums::TargetType type) const; private: class Factory; diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index ffd87e2..6941e15 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -246,7 +246,7 @@ void cmGlobalVisualStudio71Generator::WriteExternalProject( // Write a dsp file into the SLN file, Note, that dependencies from // executables to the libraries it uses are also done here void cmGlobalVisualStudio71Generator::WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType, + std::ostream& fout, const std::string& name, cmStateEnums::TargetType, std::vector const& configs, const std::set& configsPartOfDefaultBuild, std::string const& platformMapping) diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h index eb65bcb..9953047 100644 --- a/Source/cmGlobalVisualStudio71Generator.h +++ b/Source/cmGlobalVisualStudio71Generator.h @@ -56,7 +56,7 @@ protected: const char* path, cmGeneratorTarget const* t); virtual void WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType type, + std::ostream& fout, const std::string& name, cmStateEnums::TargetType type, std::vector const& configs, const std::set& configsPartOfDefaultBuild, const std::string& platformMapping = ""); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 0287def..1ffcf07 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -345,7 +345,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations( for (OrderedTargetDependSet::const_iterator tt = projectTargets.begin(); tt != projectTargets.end(); ++tt) { cmGeneratorTarget const* target = *tt; - if (target->GetType() == cmState::INTERFACE_LIBRARY) { + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } const char* expath = target->GetProperty("EXTERNAL_MSPROJECT"); @@ -377,7 +377,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( for (OrderedTargetDependSet::const_iterator tt = projectTargets.begin(); tt != projectTargets.end(); ++tt) { cmGeneratorTarget const* target = *tt; - if (target->GetType() == cmState::INTERFACE_LIBRARY) { + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } bool written = false; @@ -446,7 +446,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetDepends( for (OrderedTargetDependSet::const_iterator tt = projectTargets.begin(); tt != projectTargets.end(); ++tt) { cmGeneratorTarget const* target = *tt; - if (target->GetType() == cmState::INTERFACE_LIBRARY) { + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } const char* vcprojName = target->GetProperty("GENERATOR_FILE_NAME"); @@ -676,7 +676,7 @@ std::set cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild( // if it is a utilitiy target then only make it part of the // default build if another target depends on it int type = target->GetType(); - if (type == cmState::GLOBAL_TARGET) { + if (type == cmStateEnums::GLOBAL_TARGET) { // check if INSTALL target is part of default build if (target->GetName() == "INSTALL") { // inspect CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD properties @@ -696,7 +696,7 @@ std::set cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild( } return activeConfigs; } - if (type == cmState::UTILITY && + if (type == cmStateEnums::UTILITY && !this->IsDependedOn(projectTargets, target)) { return activeConfigs; } diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 3c6ce11..4d588e6 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -120,7 +120,7 @@ protected: const char* path, cmGeneratorTarget const* t) = 0; virtual void WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType type, + std::ostream& fout, const std::string& name, cmStateEnums::TargetType type, std::vector const& configs, const std::set& configsPartOfDefaultBuild, const std::string& platformMapping = "") = 0; diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 2ce0098..64808c9 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -347,7 +347,7 @@ void cmGlobalVisualStudio8Generator::WriteSolutionConfigurations( } void cmGlobalVisualStudio8Generator::WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType type, + std::ostream& fout, const std::string& name, cmStateEnums::TargetType type, std::vector const& configs, const std::set& configsPartOfDefaultBuild, std::string const& platformMapping) @@ -380,10 +380,10 @@ void cmGlobalVisualStudio8Generator::WriteProjectConfigurations( } bool cmGlobalVisualStudio8Generator::NeedsDeploy( - cmState::TargetType type) const + cmStateEnums::TargetType type) const { bool needsDeploy = - (type == cmState::EXECUTABLE || type == cmState::SHARED_LIBRARY); + (type == cmStateEnums::EXECUTABLE || type == cmStateEnums::SHARED_LIBRARY); return this->TargetsWindowsCE() && needsDeploy; } @@ -402,7 +402,7 @@ void cmGlobalVisualStudio8Generator::WriteProjectDepends( OrderedTargetDependSet depends(unordered, std::string()); for (OrderedTargetDependSet::const_iterator i = depends.begin(); i != depends.end(); ++i) { - if ((*i)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*i)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } std::string guid = this->GetGUID((*i)->GetName().c_str()); @@ -419,7 +419,7 @@ bool cmGlobalVisualStudio8Generator::NeedLinkLibraryDependencies( ui != target->GetUtilities().end(); ++ui) { if (cmGeneratorTarget* depTarget = target->GetLocalGenerator()->FindGeneratorTargetToUse(ui->c_str())) { - if (depTarget->GetType() != cmState::INTERFACE_LIBRARY && + if (depTarget->GetType() != cmStateEnums::INTERFACE_LIBRARY && depTarget->GetProperty("EXTERNAL_MSPROJECT")) { // This utility dependency names an external .vcproj target. // We use LinkLibraryDependencies="true" to link to it without diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index 2543ec1..b149c9d 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -72,14 +72,14 @@ protected: bool AddCheckTarget(); /** Return true if the configuration needs to be deployed */ - virtual bool NeedsDeploy(cmState::TargetType type) const; + virtual bool NeedsDeploy(cmStateEnums::TargetType type) const; static cmIDEFlagTable const* GetExtraFlagTableVS8(); virtual void WriteSLNHeader(std::ostream& fout); virtual void WriteSolutionConfigurations( std::ostream& fout, std::vector const& configs); virtual void WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType type, + std::ostream& fout, const std::string& name, cmStateEnums::TargetType type, std::vector const& configs, const std::set& configsPartOfDefaultBuild, const std::string& platformMapping = ""); diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 6296dd2..45f7913 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -81,7 +81,8 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets() for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { cmGeneratorTarget* tgt = *t; - if (tgt->GetType() == cmState::GLOBAL_TARGET || tgt->IsImported()) { + if (tgt->GetType() == cmStateEnums::GLOBAL_TARGET || + tgt->IsImported()) { continue; } if (!this->IsExcluded(gen[0], tgt)) { @@ -265,11 +266,11 @@ cmGlobalVisualStudioGenerator::GetTargetLinkClosure(cmGeneratorTarget* target) void cmGlobalVisualStudioGenerator::FollowLinkDepends( const cmGeneratorTarget* target, std::set& linked) { - if (target->GetType() == cmState::INTERFACE_LIBRARY) { + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return; } if (linked.insert(target).second && - target->GetType() == cmState::STATIC_LIBRARY) { + target->GetType() == cmStateEnums::STATIC_LIBRARY) { // Static library targets do not list their link dependencies so // we must follow them transitively now. TargetDependSet const& depends = this->GetTargetDirectDepends(target); @@ -304,7 +305,7 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends() static bool VSLinkable(cmGeneratorTarget const* t) { - return t->IsLinkable() || t->GetType() == cmState::OBJECT_LIBRARY; + return t->IsLinkable() || t->GetType() == cmStateEnums::OBJECT_LIBRARY; } void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( @@ -333,10 +334,10 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( // leaving them out for the static library itself but following them // transitively for other targets. - bool allowLinkable = (target->GetType() != cmState::STATIC_LIBRARY && - target->GetType() != cmState::SHARED_LIBRARY && - target->GetType() != cmState::MODULE_LIBRARY && - target->GetType() != cmState::EXECUTABLE); + bool allowLinkable = (target->GetType() != cmStateEnums::STATIC_LIBRARY && + target->GetType() != cmStateEnums::SHARED_LIBRARY && + target->GetType() != cmStateEnums::MODULE_LIBRARY && + target->GetType() != cmStateEnums::EXECUTABLE); TargetDependSet const& depends = this->GetTargetDirectDepends(target); @@ -344,7 +345,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( // Static libraries cannot depend on their link implementation // due to behavior (2), but they do not really need to. std::set linkDepends; - if (target->GetType() != cmState::STATIC_LIBRARY) { + if (target->GetType() != cmStateEnums::STATIC_LIBRARY) { for (TargetDependSet::const_iterator di = depends.begin(); di != depends.end(); ++di) { cmTargetDepend dep = *di; @@ -367,7 +368,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( // Collect all targets linked by this target so we can avoid // intermediate targets below. TargetSet linked; - if (target->GetType() != cmState::STATIC_LIBRARY) { + if (target->GetType() != cmStateEnums::STATIC_LIBRARY) { linked = this->GetTargetLinkClosure(target); } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 7b1afa5..34a01d6 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -444,7 +444,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets( l != tgts.end(); l++) { cmGeneratorTarget* target = *l; - if (target->GetType() == cmState::GLOBAL_TARGET) { + if (target->GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } @@ -459,12 +459,12 @@ void cmGlobalXCodeGenerator::AddExtraTargets( // this will make sure that when the next target is built // things are up-to-date if (!makeHelper.empty() && - (target->GetType() == cmState::EXECUTABLE || + (target->GetType() == cmStateEnums::EXECUTABLE || // Nope - no post-build for OBJECT_LIRBRARY - // target->GetType() == cmState::OBJECT_LIBRARY || - target->GetType() == cmState::STATIC_LIBRARY || - target->GetType() == cmState::SHARED_LIBRARY || - target->GetType() == cmState::MODULE_LIBRARY)) { + // target->GetType() == cmStateEnums::OBJECT_LIBRARY || + target->GetType() == cmStateEnums::STATIC_LIBRARY || + target->GetType() == cmStateEnums::SHARED_LIBRARY || + target->GetType() == cmStateEnums::MODULE_LIBRARY)) { makeHelper[makeHelper.size() - 1] = // fill placeholder this->PostBuildMakeTarget(target->GetName(), "$(CONFIGURATION)"); cmCustomCommandLines commandLines; @@ -475,7 +475,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets( cmTarget::POST_BUILD, "Depend check for xcode", dir.c_str()); } - if (target->GetType() != cmState::INTERFACE_LIBRARY && + if (target->GetType() != cmStateEnums::INTERFACE_LIBRARY && !target->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { allbuild->AddUtility(target->GetName()); } @@ -955,12 +955,12 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( continue; } - if (gtgt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } - if (gtgt->GetType() == cmState::UTILITY || - gtgt->GetType() == cmState::GLOBAL_TARGET) { + if (gtgt->GetType() == cmStateEnums::UTILITY || + gtgt->GetType() == cmStateEnums::GLOBAL_TARGET) { cmXCodeObject* t = this->CreateUtilityTarget(gtgt); if (!t) { return false; @@ -1188,9 +1188,9 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguages() void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmGeneratorTarget* gtgt) { // This matters only for targets that link. - if (gtgt->GetType() != cmState::EXECUTABLE && - gtgt->GetType() != cmState::SHARED_LIBRARY && - gtgt->GetType() != cmState::MODULE_LIBRARY) { + if (gtgt->GetType() != cmStateEnums::EXECUTABLE && + gtgt->GetType() != cmStateEnums::SHARED_LIBRARY && + gtgt->GetType() != cmStateEnums::MODULE_LIBRARY) { return; } @@ -1268,7 +1268,7 @@ void cmGlobalXCodeGenerator::CreateCustomCommands( std::vector const& prelink = gtgt->GetPreLinkCommands(); std::vector postbuild = gtgt->GetPostBuildCommands(); - if (gtgt->GetType() == cmState::SHARED_LIBRARY && + if (gtgt->GetType() == cmStateEnums::SHARED_LIBRARY && !gtgt->IsFrameworkOnApple()) { cmCustomCommandLines cmd; cmd.resize(1); @@ -1590,16 +1590,16 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, cmXCodeObject* buildSettings, const std::string& configName) { - if (gtgt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return; } std::string defFlags; - bool shared = ((gtgt->GetType() == cmState::SHARED_LIBRARY) || - (gtgt->GetType() == cmState::MODULE_LIBRARY)); - bool binary = ((gtgt->GetType() == cmState::OBJECT_LIBRARY) || - (gtgt->GetType() == cmState::STATIC_LIBRARY) || - (gtgt->GetType() == cmState::EXECUTABLE) || shared); + bool shared = ((gtgt->GetType() == cmStateEnums::SHARED_LIBRARY) || + (gtgt->GetType() == cmStateEnums::MODULE_LIBRARY)); + bool binary = ((gtgt->GetType() == cmStateEnums::OBJECT_LIBRARY) || + (gtgt->GetType() == cmStateEnums::STATIC_LIBRARY) || + (gtgt->GetType() == cmStateEnums::EXECUTABLE) || shared); // Compute the compilation flags for each language. std::set languages; @@ -1653,11 +1653,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, std::string extraLinkOptionsVar; std::string extraLinkOptions; - if (gtgt->GetType() == cmState::EXECUTABLE) { + if (gtgt->GetType() == cmStateEnums::EXECUTABLE) { extraLinkOptionsVar = "CMAKE_EXE_LINKER_FLAGS"; - } else if (gtgt->GetType() == cmState::SHARED_LIBRARY) { + } else if (gtgt->GetType() == cmStateEnums::SHARED_LIBRARY) { extraLinkOptionsVar = "CMAKE_SHARED_LINKER_FLAGS"; - } else if (gtgt->GetType() == cmState::MODULE_LIBRARY) { + } else if (gtgt->GetType() == cmStateEnums::MODULE_LIBRARY) { extraLinkOptionsVar = "CMAKE_MODULE_LINKER_FLAGS"; } if (!extraLinkOptionsVar.empty()) { @@ -1665,8 +1665,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, extraLinkOptions, extraLinkOptionsVar, configName); } - if (gtgt->GetType() == cmState::OBJECT_LIBRARY || - gtgt->GetType() == cmState::STATIC_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::OBJECT_LIBRARY || + gtgt->GetType() == cmStateEnums::STATIC_LIBRARY) { this->CurrentLocalGenerator->GetStaticLibraryFlags( extraLinkOptions, cmSystemTools::UpperCase(configName), gtgt); } else { @@ -1736,10 +1736,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, // Set attributes to specify the proper name for the target. std::string pndir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory(); - if (gtgt->GetType() == cmState::STATIC_LIBRARY || - gtgt->GetType() == cmState::SHARED_LIBRARY || - gtgt->GetType() == cmState::MODULE_LIBRARY || - gtgt->GetType() == cmState::EXECUTABLE) { + if (gtgt->GetType() == cmStateEnums::STATIC_LIBRARY || + gtgt->GetType() == cmStateEnums::SHARED_LIBRARY || + gtgt->GetType() == cmStateEnums::MODULE_LIBRARY || + gtgt->GetType() == cmStateEnums::EXECUTABLE) { if (this->XcodeVersion >= 21) { if (!gtgt->UsesDefaultOutputDir(configName, false)) { std::string pncdir = gtgt->GetDirectory(configName); @@ -1759,7 +1759,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, this->CreateString(pnprefix)); buildSettings->AddAttribute("EXECUTABLE_SUFFIX", this->CreateString(pnsuffix)); - } else if (gtgt->GetType() == cmState::OBJECT_LIBRARY) { + } else if (gtgt->GetType() == cmStateEnums::OBJECT_LIBRARY) { pnprefix = "lib"; pnbase = gtgt->GetName(); pnsuffix = ".a"; @@ -1782,14 +1782,14 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, // Handle settings for each target type. switch (gtgt->GetType()) { - case cmState::OBJECT_LIBRARY: - case cmState::STATIC_LIBRARY: { + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: { buildSettings->AddAttribute("LIBRARY_STYLE", this->CreateString("STATIC")); break; } - case cmState::MODULE_LIBRARY: { + case cmStateEnums::MODULE_LIBRARY: { buildSettings->AddAttribute("LIBRARY_STYLE", this->CreateString("BUNDLE")); if (gtgt->IsCFBundleOnApple()) { @@ -1839,7 +1839,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, } break; } - case cmState::SHARED_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: { if (gtgt->GetPropertyAsBool("FRAMEWORK")) { std::string fw_version = gtgt->GetFrameworkVersion(); buildSettings->AddAttribute("FRAMEWORK_VERSION", @@ -1872,7 +1872,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, this->CreateString("DYNAMIC")); break; } - case cmState::EXECUTABLE: { + case cmStateEnums::EXECUTABLE: { // Add the flags to create an executable. std::string createFlags = this->LookupFlags("CMAKE_", llang, "_LINK_FLAGS", ""); @@ -2051,7 +2051,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, // Create the INSTALL_PATH attribute. std::string install_name_dir; - if (gtgt->GetType() == cmState::SHARED_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::SHARED_LIBRARY) { // Get the install_name directory for the build tree. install_name_dir = gtgt->GetInstallNameDirForBuildTree(configName); // Xcode doesn't create the correct install_name in some cases. @@ -2124,7 +2124,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, } // Runtime version information. - if (gtgt->GetType() == cmState::SHARED_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::SHARED_LIBRARY) { int major; int minor; int patch; @@ -2219,7 +2219,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget( this->XCodeObjectMap[gtgt] = target; // Add source files without build rules for editing convenience. - if (gtgt->GetType() == cmState::UTILITY) { + if (gtgt->GetType() == cmStateEnums::UTILITY) { std::vector sources; if (!gtgt->GetConfigCommonSourceFiles(sources)) { return 0; @@ -2285,8 +2285,8 @@ const char* cmGlobalXCodeGenerator::GetTargetLinkFlagsVar( cmGeneratorTarget const* target) const { if (this->XcodeVersion >= 60 && - (target->GetType() == cmState::STATIC_LIBRARY || - target->GetType() == cmState::OBJECT_LIBRARY)) { + (target->GetType() == cmStateEnums::STATIC_LIBRARY || + target->GetType() == cmStateEnums::OBJECT_LIBRARY)) { return "OTHER_LIBTOOLFLAGS"; } else { return "OTHER_LDFLAGS"; @@ -2297,10 +2297,10 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType( cmGeneratorTarget* target) { switch (target->GetType()) { - case cmState::OBJECT_LIBRARY: - case cmState::STATIC_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "archive.ar"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: if (target->IsXCTestOnApple()) return "wrapper.cfbundle"; else if (target->IsCFBundleOnApple()) @@ -2308,11 +2308,11 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType( else return ((this->XcodeVersion >= 22) ? "compiled.mach-o.executable" : "compiled.mach-o.dylib"); - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return (target->GetPropertyAsBool("FRAMEWORK") ? "wrapper.framework" : "compiled.mach-o.dylib"); - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return "compiled.mach-o.executable"; default: break; @@ -2324,10 +2324,10 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType( cmGeneratorTarget* target) { switch (target->GetType()) { - case cmState::OBJECT_LIBRARY: - case cmState::STATIC_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "com.apple.product-type.library.static"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: if (target->IsXCTestOnApple()) return "com.apple.product-type.bundle.unit-test"; else if (target->IsCFBundleOnApple()) @@ -2336,11 +2336,11 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType( return ((this->XcodeVersion >= 22) ? "com.apple.product-type.tool" : "com.apple.product-type.library.dynamic"); - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return (target->GetPropertyAsBool("FRAMEWORK") ? "com.apple.product-type.framework" : "com.apple.product-type.library.dynamic"); - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return (target->GetPropertyAsBool("MACOSX_BUNDLE") ? "com.apple.product-type.application" : "com.apple.product-type.tool"); @@ -2353,7 +2353,7 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType( cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( cmGeneratorTarget* gtgt, cmXCodeObject* buildPhases) { - if (gtgt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return 0; } cmXCodeObject* target = this->CreateObject(cmXCodeObject::PBXNativeTarget); @@ -2380,7 +2380,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( fileRef->AddAttribute("explicitFileType", this->CreateString(fileType)); } std::string fullName; - if (gtgt->GetType() == cmState::OBJECT_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::OBJECT_LIBRARY) { fullName = "lib"; fullName += gtgt->GetName(); fullName += ".a"; @@ -2527,7 +2527,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) cmSystemTools::Error("Error no target on xobject\n"); return; } - if (gt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return; } @@ -2564,8 +2564,8 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) } // Skip link information for object libraries. - if (gt->GetType() == cmState::OBJECT_LIBRARY || - gt->GetType() == cmState::STATIC_LIBRARY) { + if (gt->GetType() == cmStateEnums::OBJECT_LIBRARY || + gt->GetType() == cmStateEnums::STATIC_LIBRARY) { continue; } @@ -2620,7 +2620,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) if (li->IsPath) { linkLibs += this->XCodeEscapePath(li->Value); } else if (!li->Target || - li->Target->GetType() != cmState::INTERFACE_LIBRARY) { + li->Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { linkLibs += li->Value; } if (li->Target && !li->Target->IsImported()) { @@ -2649,10 +2649,10 @@ bool cmGlobalXCodeGenerator::CreateGroups( // end up with (empty anyhow) ALL_BUILD and XCODE_DEPEND_HELPER source // groups: // - if (gtgt->GetType() == cmState::GLOBAL_TARGET) { + if (gtgt->GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } - if (gtgt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } @@ -3149,20 +3149,20 @@ void cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( cmXCodeObject* target = *i; cmGeneratorTarget* gt = target->GetTarget(); - if (gt->GetType() == cmState::EXECUTABLE || + if (gt->GetType() == cmStateEnums::EXECUTABLE || // Nope - no post-build for OBJECT_LIRBRARY - // gt->GetType() == cmState::OBJECT_LIBRARY || - gt->GetType() == cmState::STATIC_LIBRARY || - gt->GetType() == cmState::SHARED_LIBRARY || - gt->GetType() == cmState::MODULE_LIBRARY) { + // gt->GetType() == cmStateEnums::OBJECT_LIBRARY || + gt->GetType() == cmStateEnums::STATIC_LIBRARY || + gt->GetType() == cmStateEnums::SHARED_LIBRARY || + gt->GetType() == cmStateEnums::MODULE_LIBRARY) { // Declare an entry point for the target post-build phase. makefileStream << this->PostBuildMakeTarget(gt->GetName(), *ct) << ":\n"; } - if (gt->GetType() == cmState::EXECUTABLE || - gt->GetType() == cmState::SHARED_LIBRARY || - gt->GetType() == cmState::MODULE_LIBRARY) { + if (gt->GetType() == cmStateEnums::EXECUTABLE || + gt->GetType() == cmStateEnums::SHARED_LIBRARY || + gt->GetType() == cmStateEnums::MODULE_LIBRARY) { std::string tfull = gt->GetFullPath(configName); std::string trel = this->ConvertToRelativeForMake(tfull.c_str()); diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index db11bd3..6b32f73 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -24,13 +24,13 @@ static const char* getShapeForTarget(const cmGeneratorTarget* target) } switch (target->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return "house"; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "diamond"; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return "polygon"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return "octagon"; default: break; @@ -495,16 +495,16 @@ bool cmGraphVizWriter::IgnoreThisTarget(const std::string& name) } bool cmGraphVizWriter::GenerateForTargetType( - cmState::TargetType targetType) const + cmStateEnums::TargetType targetType) const { switch (targetType) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return this->GenerateForExecutables; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return this->GenerateForStaticLibs; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return this->GenerateForSharedLibs; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return this->GenerateForModuleLibs; default: break; diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index 0efe2b7..8d5515b 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -60,7 +60,7 @@ protected: bool IgnoreThisTarget(const std::string& name); - bool GenerateForTargetType(cmState::TargetType targetType) const; + bool GenerateForTargetType(cmStateEnums::TargetType targetType) const; std::string GraphType; std::string GraphName; diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index 166bc7c..57bf33e 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -70,8 +70,8 @@ bool cmIncludeExternalMSProjectCommand::InitialPass( } // Create a target instance for this utility. - cmTarget* target = - this->Makefile->AddNewTarget(cmState::UTILITY, utility_name.c_str()); + cmTarget* target = this->Makefile->AddNewTarget(cmStateEnums::UTILITY, + utility_name.c_str()); target->SetProperty("GENERATOR_FILE_NAME", utility_name.c_str()); target->SetProperty("EXTERNAL_MSPROJECT", path.c_str()); diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index f040a4e..d85748e 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -327,19 +327,19 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) if (cmTarget* target = this->Makefile->FindLocalNonAliasTarget(*targetIt)) { // Found the target. Check its type. - if (target->GetType() != cmState::EXECUTABLE && - target->GetType() != cmState::STATIC_LIBRARY && - target->GetType() != cmState::SHARED_LIBRARY && - target->GetType() != cmState::MODULE_LIBRARY && - target->GetType() != cmState::OBJECT_LIBRARY && - target->GetType() != cmState::INTERFACE_LIBRARY) { + if (target->GetType() != cmStateEnums::EXECUTABLE && + target->GetType() != cmStateEnums::STATIC_LIBRARY && + target->GetType() != cmStateEnums::SHARED_LIBRARY && + target->GetType() != cmStateEnums::MODULE_LIBRARY && + target->GetType() != cmStateEnums::OBJECT_LIBRARY && + target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "TARGETS given target \"" << (*targetIt) << "\" which is not an executable, library, or module."; this->SetError(e.str()); return false; } - if (target->GetType() == cmState::OBJECT_LIBRARY) { + if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "TARGETS given OBJECT library \"" << (*targetIt) << "\" which may not be installed."; @@ -387,7 +387,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) bool namelinkOnly = false; switch (target.GetType()) { - case cmState::SHARED_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: { // Shared libraries are handled differently on DLL and non-DLL // platforms. All windows platforms are DLL platforms including // cygwin. Currently no other platform is a DLL platform. @@ -454,7 +454,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) } } } break; - case cmState::STATIC_LIBRARY: { + case cmStateEnums::STATIC_LIBRARY: { // Static libraries use ARCHIVE properties. if (!archiveArgs.GetDestination().empty()) { archiveGenerator = @@ -468,7 +468,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) return false; } } break; - case cmState::MODULE_LIBRARY: { + case cmStateEnums::MODULE_LIBRARY: { // Modules use LIBRARY properties. if (!libraryArgs.GetDestination().empty()) { libraryGenerator = @@ -484,7 +484,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) return false; } } break; - case cmState::EXECUTABLE: { + case cmStateEnums::EXECUTABLE: { if (target.IsAppBundleOnApple()) { // Application bundles use the BUNDLE properties. if (!bundleArgs.GetDestination().empty()) { @@ -534,7 +534,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) CreateInstallTargetGenerator(target, archiveArgs, true, true); } } break; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: // Nothing to do. An INTERFACE_LIBRARY can be installed, but the // only effect of that is to make it exportable. It installs no // other files itself. @@ -553,7 +553,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) bool createInstallGeneratorsForTargetFileSets = true; if (target.IsFrameworkOnApple() || - target.GetType() == cmState::INTERFACE_LIBRARY) { + target.GetType() == cmStateEnums::INTERFACE_LIBRARY) { createInstallGeneratorsForTargetFileSets = false; } diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 70ae204..ed3be3f 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -80,36 +80,36 @@ void cmInstallTargetGenerator::GenerateScriptForConfig( std::vector filesFrom; std::vector filesTo; std::string literal_args; - cmState::TargetType targetType = this->Target->GetType(); + cmStateEnums::TargetType targetType = this->Target->GetType(); cmInstallType type = cmInstallType(); switch (targetType) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: type = cmInstallType_EXECUTABLE; break; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: type = cmInstallType_STATIC_LIBRARY; break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: type = cmInstallType_SHARED_LIBRARY; break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: type = cmInstallType_MODULE_LIBRARY; break; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: // Not reachable. We never create a cmInstallTargetGenerator for // an INTERFACE_LIBRARY. assert(0 && "INTERFACE_LIBRARY targets have no installable outputs."); break; - case cmState::OBJECT_LIBRARY: - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: + case cmStateEnums::UNKNOWN_LIBRARY: this->Target->GetLocalGenerator()->IssueMessage( cmake::INTERNAL_ERROR, "cmInstallTargetGenerator created with non-installable target."); return; } - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { // There is a bug in cmInstallCommand if this fails. assert(this->NamelinkMode == NamelinkModeNone); @@ -337,7 +337,7 @@ std::string cmInstallTargetGenerator::GetInstallFilename( { std::string fname; // Compute the name of the library. - if (target->GetType() == cmState::EXECUTABLE) { + if (target->GetType() == cmStateEnums::EXECUTABLE) { std::string targetName; std::string targetNameReal; std::string targetNameImport; @@ -471,9 +471,9 @@ void cmInstallTargetGenerator::AddInstallNamePatchRule( std::string const& toDestDirPath) { if (this->ImportLibrary || - !(this->Target->GetType() == cmState::SHARED_LIBRARY || - this->Target->GetType() == cmState::MODULE_LIBRARY || - this->Target->GetType() == cmState::EXECUTABLE)) { + !(this->Target->GetType() == cmStateEnums::SHARED_LIBRARY || + this->Target->GetType() == cmStateEnums::MODULE_LIBRARY || + this->Target->GetType() == cmStateEnums::EXECUTABLE)) { return; } @@ -527,7 +527,7 @@ void cmInstallTargetGenerator::AddInstallNamePatchRule( // Edit the install_name of the target itself if necessary. std::string new_id; - if (this->Target->GetType() == cmState::SHARED_LIBRARY) { + if (this->Target->GetType() == cmStateEnums::SHARED_LIBRARY) { std::string for_build = this->Target->GetInstallNameDirForBuildTree(config); std::string for_install = this->Target->GetInstallNameDirForInstallTree(); @@ -704,7 +704,7 @@ void cmInstallTargetGenerator::AddStripRule(std::ostream& os, // don't strip static and import libraries, because it removes the only // symbol table they have so you can't link to them anymore - if (this->Target->GetType() == cmState::STATIC_LIBRARY || + if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY || this->ImportLibrary) { return; } @@ -731,7 +731,7 @@ void cmInstallTargetGenerator::AddRanlibRule(std::ostream& os, const std::string& toDestDirPath) { // Static libraries need ranlib on this platform. - if (this->Target->GetType() != cmState::STATIC_LIBRARY) { + if (this->Target->GetType() != cmStateEnums::STATIC_LIBRARY) { return; } @@ -767,10 +767,10 @@ void cmInstallTargetGenerator::AddUniversalInstallRule( } switch (this->Target->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: break; default: diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 24f3578..5fc861b 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -55,7 +55,8 @@ std::string cmLinkLineComputer::ComputeLinkLibs(cmComputeLinkInformation& cli) ItemVector const& items = cli.GetItems(); for (ItemVector::const_iterator li = items.begin(); li != items.end(); ++li) { - if (li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY) { + if (li->Target && + li->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } if (li->IsPath) { diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 1c3a97d..b6fb3e6 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -199,7 +199,7 @@ void cmLocalGenerator::TraceDependencies() std::vector targets = this->GetGeneratorTargets(); for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { - if ((*t)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*t)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } (*t)->TraceDependencies(); @@ -542,7 +542,7 @@ void cmLocalGenerator::ComputeTargetManifest() for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { cmGeneratorTarget* target = *t; - if (target->GetType() == cmState::INTERFACE_LIBRARY) { + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } for (std::vector::iterator ci = configNames.begin(); @@ -911,12 +911,12 @@ void cmLocalGenerator::GetTargetFlags( "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library switch (target->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: this->GetStaticLibraryFlags(linkFlags, buildType, target); break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: libraryLinkVariable = "CMAKE_MODULE_LINKER_FLAGS"; - case cmState::SHARED_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: { linkFlags = this->Makefile->GetSafeDefinition(libraryLinkVariable); linkFlags += " "; if (!buildType.empty()) { @@ -962,7 +962,7 @@ void cmLocalGenerator::GetTargetFlags( frameworkPath, linkPath); } } break; - case cmState::EXECUTABLE: { + case cmStateEnums::EXECUTABLE: { linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); linkFlags += " "; if (!buildType.empty()) { @@ -1189,7 +1189,7 @@ std::string cmLocalGenerator::GetLinkLibsCMP0065( std::string linkFlags; // Flags to link an executable to shared libraries. - if (tgt.GetType() == cmState::EXECUTABLE && + if (tgt.GetType() == cmStateEnums::EXECUTABLE && this->StateSnapshot.GetState()->GetGlobalPropertyAsBool( "TARGET_SUPPORTS_SHARED_LIBS")) { bool add_shlib_flags = false; @@ -1334,8 +1334,8 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName, // found is part of the inName if (cmSystemTools::FileIsFullPath(inName.c_str())) { std::string tLocation; - if (target->GetType() >= cmState::EXECUTABLE && - target->GetType() <= cmState::MODULE_LIBRARY) { + if (target->GetType() >= cmStateEnums::EXECUTABLE && + target->GetType() <= cmStateEnums::MODULE_LIBRARY) { tLocation = target->GetLocation(config); tLocation = cmSystemTools::GetFilenamePath(tLocation); tLocation = cmSystemTools::CollapseFullPath(tLocation); @@ -1352,23 +1352,23 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName, } } switch (target->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: dep = target->GetLocation(config); return true; - case cmState::OBJECT_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: // An object library has no single file on which to depend. // This was listed to get the target-level dependency. return false; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: // An interface library has no file on which to depend. // This was listed to get the target-level dependency. return false; - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: // A utility target has no file on which to depend. This was listed // only to get the target-level dependency. return false; @@ -1584,8 +1584,8 @@ void cmLocalGenerator::AddVisibilityPresetFlags( std::string warnCMP0063; std::string* pWarnCMP0063 = CM_NULLPTR; - if (target->GetType() != cmState::SHARED_LIBRARY && - target->GetType() != cmState::MODULE_LIBRARY && + if (target->GetType() != cmStateEnums::SHARED_LIBRARY && + target->GetType() != cmStateEnums::MODULE_LIBRARY && !target->IsExecutableWithExports()) { switch (target->GetPolicyStatusCMP0063()) { case cmPolicies::OLD: @@ -1627,13 +1627,13 @@ void cmLocalGenerator::AddCMP0018Flags(std::string& flags, { int targetType = target->GetType(); - bool shared = ((targetType == cmState::SHARED_LIBRARY) || - (targetType == cmState::MODULE_LIBRARY)); + bool shared = ((targetType == cmStateEnums::SHARED_LIBRARY) || + (targetType == cmStateEnums::MODULE_LIBRARY)); if (this->GetShouldUseOldFlags(shared, lang)) { this->AddSharedFlags(flags, lang, shared); } else { - if (target->GetType() == cmState::OBJECT_LIBRARY) { + if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) { if (target->GetPropertyAsBool("POSITION_INDEPENDENT_CODE")) { this->AddPositionIndependentFlags(flags, lang, targetType); } @@ -1696,7 +1696,7 @@ void cmLocalGenerator::AddPositionIndependentFlags(std::string& flags, { const char* picFlags = CM_NULLPTR; - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { std::string flagsVar = "CMAKE_"; flagsVar += lang; flagsVar += "_COMPILE_OPTIONS_PIE"; @@ -1933,7 +1933,7 @@ void cmLocalGenerator::GenerateTargetInstallRules( std::vector tgts = this->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); ++l) { - if ((*l)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } @@ -1956,15 +1956,15 @@ void cmLocalGenerator::GenerateTargetInstallRules( // Generate the proper install generator for this target type. switch ((*l)->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::MODULE_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: { // Use a target install generator. cmInstallTargetGeneratorLocal g(this, (*l)->GetName(), destination.c_str(), false); g.Generate(os, config, configurationTypes); } break; - case cmState::SHARED_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: { #if defined(_WIN32) || defined(__CYGWIN__) // Special code to handle DLL. Install the import library // to the normal destination and the DLL to the runtime diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx index 157b32e..5f37af5 100644 --- a/Source/cmLocalGhsMultiGenerator.cxx +++ b/Source/cmLocalGhsMultiGenerator.cxx @@ -24,7 +24,7 @@ void cmLocalGhsMultiGenerator::Generate() for (std::vector::iterator l = tgts.begin(); l != tgts.end(); ++l) { - if ((*l)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } cmGhsMultiTargetGenerator tg(*l); diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 1863376..232e1dc 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -81,7 +81,7 @@ void cmLocalNinjaGenerator::Generate() std::vector targets = this->GetGeneratorTargets(); for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { - if ((*t)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*t)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } cmNinjaTargetGenerator* tg = cmNinjaTargetGenerator::New(*t); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index f30414c..5b90f99 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -120,7 +120,7 @@ void cmLocalUnixMakefileGenerator3::Generate() static_cast(this->GlobalGenerator); for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { - if ((*t)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*t)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } CM_AUTO_PTR tg( @@ -172,7 +172,7 @@ void cmLocalUnixMakefileGenerator3::GetLocalObjectFiles( for (std::vector::iterator ti = targets.begin(); ti != targets.end(); ++ti) { cmGeneratorTarget* gt = *ti; - if (gt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } std::vector objectSources; @@ -382,12 +382,12 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets( std::string localName; for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { - if (((*t)->GetType() == cmState::EXECUTABLE) || - ((*t)->GetType() == cmState::STATIC_LIBRARY) || - ((*t)->GetType() == cmState::SHARED_LIBRARY) || - ((*t)->GetType() == cmState::MODULE_LIBRARY) || - ((*t)->GetType() == cmState::OBJECT_LIBRARY) || - ((*t)->GetType() == cmState::UTILITY)) { + if (((*t)->GetType() == cmStateEnums::EXECUTABLE) || + ((*t)->GetType() == cmStateEnums::STATIC_LIBRARY) || + ((*t)->GetType() == cmStateEnums::SHARED_LIBRARY) || + ((*t)->GetType() == cmStateEnums::MODULE_LIBRARY) || + ((*t)->GetType() == cmStateEnums::OBJECT_LIBRARY) || + ((*t)->GetType() == cmStateEnums::UTILITY)) { emitted.insert((*t)->GetName()); // for subdirs add a rule to build this specific target by name. @@ -1558,7 +1558,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( std::vector targets = this->GetGeneratorTargets(); std::vector::iterator glIt; for (glIt = targets.begin(); glIt != targets.end(); ++glIt) { - if ((*glIt)->GetType() == cmState::GLOBAL_TARGET) { + if ((*glIt)->GetType() == cmStateEnums::GLOBAL_TARGET) { std::string targetString = "Special rule for the target " + (*glIt)->GetName(); std::vector commands; diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 6f9f009..006cdf8 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -63,7 +63,7 @@ void cmLocalVisualStudio10Generator::Generate() std::vector tgts = this->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); ++l) { - if ((*l)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } if (static_cast(this->GlobalGenerator) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index a4b28b5..1ea56b4 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -64,7 +64,7 @@ void cmLocalVisualStudio7Generator::AddHelperCommands() std::vector tgts = this->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); ++l) { - if ((*l)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } const char* path = (*l)->GetProperty("EXTERNAL_MSPROJECT"); @@ -93,7 +93,7 @@ void cmLocalVisualStudio7Generator::AddCMakeListsRules() std::vector tgts = this->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); ++l) { - if ((*l)->GetType() == cmState::GLOBAL_TARGET) { + if ((*l)->GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } if ((*l)->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET) { @@ -112,7 +112,7 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets() std::vector tgts = this->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); l++) { - if ((*l)->GetType() == cmState::GLOBAL_TARGET) { + if ((*l)->GetType() == cmStateEnums::GLOBAL_TARGET) { std::vector no_depends; cmCustomCommandLine force_command; force_command.push_back("cd"); @@ -154,7 +154,7 @@ void cmLocalVisualStudio7Generator::WriteProjectFiles() // Create the project file for each target. for (std::vector::iterator l = tgts.begin(); l != tgts.end(); l++) { - if ((*l)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } // INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace @@ -615,22 +615,22 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( bool targetBuilds = true; switch (target->GetType()) { - case cmState::OBJECT_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: targetBuilds = false; // no manifest tool for object library - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: projectType = "typeStaticLibrary"; configType = "4"; break; - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: projectType = "typeDynamicLibrary"; configType = "2"; break; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: configType = "1"; break; - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: configType = "10"; default: targetBuilds = false; @@ -725,8 +725,9 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( intermediateDir += "/"; intermediateDir += configName; - if (target->GetType() < cmState::UTILITY) { - std::string const& outDir = target->GetType() == cmState::OBJECT_LIBRARY + if (target->GetType() < cmStateEnums::UTILITY) { + std::string const& outDir = + target->GetType() == cmStateEnums::OBJECT_LIBRARY ? intermediateDir : target->GetDirectory(configName); /* clang-format off */ @@ -810,7 +811,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( targetOptions.OutputFlagMap(fout, "\t\t\t\t"); targetOptions.OutputPreprocessorDefinitions(fout, "\t\t\t\t", "\n", "CXX"); fout << "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n"; - if (target->GetType() <= cmState::OBJECT_LIBRARY) { + if (target->GetType() <= cmStateEnums::OBJECT_LIBRARY) { // Specify the compiler program database file if configured. std::string pdb = target->GetCompilePDBPath(configName); if (!pdb.empty()) { @@ -959,19 +960,19 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( static_cast(this->GlobalGenerator); std::string temp; std::string extraLinkOptions; - if (target->GetType() == cmState::EXECUTABLE) { + if (target->GetType() == cmStateEnums::EXECUTABLE) { extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS") + std::string(" ") + GetBuildTypeLinkerFlags("CMAKE_EXE_LINKER_FLAGS", configName); } - if (target->GetType() == cmState::SHARED_LIBRARY) { + if (target->GetType() == cmStateEnums::SHARED_LIBRARY) { extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS") + std::string(" ") + GetBuildTypeLinkerFlags("CMAKE_SHARED_LINKER_FLAGS", configName); } - if (target->GetType() == cmState::MODULE_LIBRARY) { + if (target->GetType() == cmStateEnums::MODULE_LIBRARY) { extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS") + std::string(" ") + @@ -1004,7 +1005,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str()); } - if ((target->GetType() == cmState::SHARED_LIBRARY || + if ((target->GetType() == cmStateEnums::SHARED_LIBRARY || target->IsExecutableWithExports()) && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { @@ -1012,9 +1013,9 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( } } switch (target->GetType()) { - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: break; - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::OBJECT_LIBRARY: { std::string libpath = this->GetTargetDirectory(target); libpath += "/"; libpath += configName; @@ -1029,7 +1030,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( << this->ConvertToXMLOutputPathSingle(libpath.c_str()) << "\"/>\n"; break; } - case cmState::STATIC_LIBRARY: { + case cmStateEnums::STATIC_LIBRARY: { std::string targetNameFull = target->GetFullName(configName); std::string libpath = target->GetDirectory(configName); libpath += "/"; @@ -1059,8 +1060,8 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( << this->ConvertToXMLOutputPathSingle(libpath.c_str()) << "\"/>\n"; break; } - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: { std::string targetName; std::string targetNameSO; std::string targetNameFull; @@ -1145,7 +1146,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( } fout << "/>\n"; } break; - case cmState::EXECUTABLE: { + case cmStateEnums::EXECUTABLE: { std::string targetName; std::string targetNameFull; std::string targetNameImport; @@ -1241,9 +1242,9 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"/>\n"; break; } - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: + case cmStateEnums::INTERFACE_LIBRARY: break; } } @@ -1296,7 +1297,7 @@ void cmLocalVisualStudio7GeneratorInternals::OutputLibraries( lg->ConvertToRelativePath(currentBinDir, l->Value.c_str()); fout << lg->ConvertToXMLOutputPath(rel.c_str()) << " "; } else if (!l->Target || - l->Target->GetType() != cmState::INTERFACE_LIBRARY) { + l->Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { fout << l->Value << " "; } } @@ -1607,8 +1608,8 @@ bool cmLocalVisualStudio7Generator::WriteGroup( std::string source = (*sf)->GetFullPath(); FCInfo fcinfo(this, target, *(*sf), configs); - if (source != libName || target->GetType() == cmState::UTILITY || - target->GetType() == cmState::GLOBAL_TARGET) { + if (source != libName || target->GetType() == cmStateEnums::UTILITY || + target->GetType() == cmStateEnums::GLOBAL_TARGET) { fout << "\t\t\tConvertToXMLOutputPathSingle(source.c_str()); // Tell MS-Dev what the source is. If the compiler knows how to @@ -1812,7 +1813,7 @@ void cmLocalVisualStudio7Generator::OutputTargetRules( std::ostream& fout, const std::string& configName, cmGeneratorTarget* target, const std::string& /*libName*/) { - if (target->GetType() > cmState::GLOBAL_TARGET) { + if (target->GetType() > cmStateEnums::GLOBAL_TARGET) { return; } EventWriter event(this, configName, fout); @@ -1828,7 +1829,7 @@ void cmLocalVisualStudio7Generator::OutputTargetRules( tool = this->FortranProject ? "VFPreLinkEventTool" : "VCPreLinkEventTool"; event.Start(tool); bool addedPrelink = false; - if ((target->GetType() == cmState::SHARED_LIBRARY || + if ((target->GetType() == cmStateEnums::SHARED_LIBRARY || target->IsExecutableWithExports()) && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { @@ -1900,27 +1901,27 @@ void cmLocalVisualStudio7Generator::WriteProjectStartFortran( } const char* projectType = 0; switch (target->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: projectType = "typeStaticLibrary"; if (keyword) { keyword = "Static Library"; } break; - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: projectType = "typeDynamicLibrary"; if (!keyword) { keyword = "Dll"; } break; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: if (!keyword) { keyword = "Console Application"; } projectType = 0; break; - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: default: break; } diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index e2b3cd2..e20fe50 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -76,8 +76,8 @@ cmLocalVisualStudioGenerator::MaybeCreateImplibDir(cmGeneratorTarget* target, // If an executable exports symbols then VS wants to create an // import library but forgets to create the output directory. // The Intel Fortran plugin always forgets to the directory. - if (target->GetType() != cmState::EXECUTABLE && - !(isFortran && target->GetType() == cmState::SHARED_LIBRARY)) { + if (target->GetType() != cmStateEnums::EXECUTABLE && + !(isFortran && target->GetType() == cmStateEnums::SHARED_LIBRARY)) { return pcc; } std::string outDir = target->GetDirectory(config, false); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c3111c0..65116d5 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -730,7 +730,7 @@ void cmMakefile::AddCustomCommandToTarget( return; } - if (ti->second.GetType() == cmState::OBJECT_LIBRARY) { + if (ti->second.GetType() == cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "Target \"" << target << "\" is an OBJECT library " @@ -738,7 +738,7 @@ void cmMakefile::AddCustomCommandToTarget( this->IssueMessage(cmake::FATAL_ERROR, e.str()); return; } - if (ti->second.GetType() == cmState::INTERFACE_LIBRARY) { + if (ti->second.GetType() == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "Target \"" << target << "\" is an INTERFACE library " @@ -1032,7 +1032,7 @@ cmTarget* cmMakefile::AddUtilityCommand( const char* comment, bool uses_terminal) { // Create a target instance for this utility. - cmTarget* target = this->AddNewTarget(cmState::UTILITY, utilityName); + cmTarget* target = this->AddNewTarget(cmStateEnums::UTILITY, utilityName); if (excludeFromAll) { target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } @@ -1774,9 +1774,9 @@ void cmMakefile::AddGlobalLinkInformation(cmTarget& target) { // for these targets do not add anything switch (target.GetType()) { - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: + case cmStateEnums::INTERFACE_LIBRARY: return; default:; } @@ -1828,13 +1828,15 @@ void cmMakefile::AddAlias(const std::string& lname, std::string const& tgtName) } cmTarget* cmMakefile::AddLibrary(const std::string& lname, - cmState::TargetType type, + cmStateEnums::TargetType type, const std::vector& srcs, bool excludeFromAll) { - assert(type == cmState::STATIC_LIBRARY || type == cmState::SHARED_LIBRARY || - type == cmState::MODULE_LIBRARY || type == cmState::OBJECT_LIBRARY || - type == cmState::INTERFACE_LIBRARY); + assert(type == cmStateEnums::STATIC_LIBRARY || + type == cmStateEnums::SHARED_LIBRARY || + type == cmStateEnums::MODULE_LIBRARY || + type == cmStateEnums::OBJECT_LIBRARY || + type == cmStateEnums::INTERFACE_LIBRARY); cmTarget* target = this->AddNewTarget(type, lname); // Clear its dependencies. Otherwise, dependencies might persist @@ -1853,7 +1855,7 @@ cmTarget* cmMakefile::AddExecutable(const char* exeName, const std::vector& srcs, bool excludeFromAll) { - cmTarget* target = this->AddNewTarget(cmState::EXECUTABLE, exeName); + cmTarget* target = this->AddNewTarget(cmStateEnums::EXECUTABLE, exeName); if (excludeFromAll) { target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } @@ -1862,7 +1864,7 @@ cmTarget* cmMakefile::AddExecutable(const char* exeName, return target; } -cmTarget* cmMakefile::AddNewTarget(cmState::TargetType type, +cmTarget* cmMakefile::AddNewTarget(cmStateEnums::TargetType type, const std::string& name) { cmTargets::iterator it = @@ -2040,8 +2042,8 @@ void cmMakefile::ExpandVariablesCMP0019() for (cmTargets::iterator l = this->Targets.begin(); l != this->Targets.end(); ++l) { cmTarget& t = l->second; - if (t.GetType() == cmState::INTERFACE_LIBRARY || - t.GetType() == cmState::GLOBAL_TARGET) { + if (t.GetType() == cmStateEnums::INTERFACE_LIBRARY || + t.GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } includeDirs = t.GetProperty("INCLUDE_DIRECTORIES"); @@ -3681,7 +3683,8 @@ void cmMakefile::RaiseScope(const std::string& var, const char* varDef) } cmTarget* cmMakefile::AddImportedTarget(const std::string& name, - cmState::TargetType type, bool global) + cmStateEnums::TargetType type, + bool global) { // Create the target. CM_AUTO_PTR target( @@ -3767,7 +3770,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg, // The conflict is with a non-imported target. // Allow this if the user has requested support. cmake* cm = this->GetCMakeInstance(); - if (isCustom && existing->GetType() == cmState::UTILITY && + if (isCustom && existing->GetType() == cmStateEnums::UTILITY && this != existing->GetMakefile() && cm->GetState()->GetGlobalPropertyAsBool( "ALLOW_DUPLICATE_CUSTOM_TARGETS")) { @@ -3781,22 +3784,22 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg, << "\" because another target with the same name already exists. " << "The existing target is "; switch (existing->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: e << "an executable "; break; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: e << "a static library "; break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: e << "a shared library "; break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: e << "a module library "; break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: e << "a custom target "; break; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: e << "an interface library "; break; default: diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 0116ce1..71078ab 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -163,9 +163,10 @@ public: /** Create a new imported target with the name and type given. */ cmTarget* AddImportedTarget(const std::string& name, - cmState::TargetType type, bool global); + cmStateEnums::TargetType type, bool global); - cmTarget* AddNewTarget(cmState::TargetType type, const std::string& name); + cmTarget* AddNewTarget(cmStateEnums::TargetType type, + const std::string& name); /** * Add an executable to the build. @@ -251,7 +252,8 @@ public: /** * Set the name of the library. */ - cmTarget* AddLibrary(const std::string& libname, cmState::TargetType type, + cmTarget* AddLibrary(const std::string& libname, + cmStateEnums::TargetType type, const std::vector& srcs, bool excludeFromAll = false); void AddAlias(const std::string& libname, const std::string& tgt); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 00a9100..5bf2f51 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -24,7 +24,7 @@ cmMakefileLibraryTargetGenerator::cmMakefileLibraryTargetGenerator( : cmMakefileTargetGenerator(target) { this->CustomCommandDriver = OnDepends; - if (this->GeneratorTarget->GetType() != cmState::INTERFACE_LIBRARY) { + if (this->GeneratorTarget->GetType() != cmStateEnums::INTERFACE_LIBRARY) { this->GeneratorTarget->GetLibraryNames( this->TargetNameOut, this->TargetNameSO, this->TargetNameReal, this->TargetNameImport, this->TargetNamePDB, this->ConfigName); @@ -57,24 +57,24 @@ void cmMakefileLibraryTargetGenerator::WriteRuleFiles() // write the link rules // Write the rule for this target type. switch (this->GeneratorTarget->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: this->WriteStaticLibraryRules(); break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: this->WriteSharedLibraryRules(false); if (this->GeneratorTarget->NeedRelinkBeforeInstall(this->ConfigName)) { // Write rules to link an installable version of the target. this->WriteSharedLibraryRules(true); } break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: this->WriteModuleLibraryRules(false); if (this->GeneratorTarget->NeedRelinkBeforeInstall(this->ConfigName)) { // Write rules to link an installable version of the target. this->WriteModuleLibraryRules(true); } break; - case cmState::OBJECT_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: this->WriteObjectLibraryRules(); break; default: @@ -251,8 +251,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( this->LocalGenerator->AppendFlags(linkFlags, extraFlags); // Add OSX version flags, if any. - if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { this->AppendOSXVerFlag(linkFlags, linkLanguage, "COMPATIBILITY", true); this->AppendOSXVerFlag(linkFlags, linkLanguage, "CURRENT", false); } @@ -345,13 +345,13 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string buildEcho = "Linking "; buildEcho += linkLanguage; switch (this->GeneratorTarget->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: buildEcho += " static library "; break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: buildEcho += " shared library "; break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: if (this->GeneratorTarget->IsCFBundleOnApple()) { buildEcho += " CFBundle"; } @@ -399,7 +399,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. - if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() != cmStateEnums::STATIC_LIBRARY) { libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), (targetFullPath + ".manifest").c_str())); @@ -409,7 +409,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::vector commands1; // Add a command to remove any existing files for this library. // for static libs only - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) { this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles, this->GeneratorTarget, "target"); this->LocalGenerator->CreateCDCommand( @@ -443,7 +443,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::vector archiveAppendCommands; std::vector archiveFinishCommands; std::string::size_type archiveCommandLimit = std::string::npos; - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) { haveStaticLibraryRule = this->Makefile->IsDefinitionSet(linkRuleVar); std::string arCreateVar = "CMAKE_"; arCreateVar += linkLanguage; @@ -492,7 +492,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Collect up flags to link in needed libraries. std::string linkLibs; - if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() != cmStateEnums::STATIC_LIBRARY) { CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( @@ -514,7 +514,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( useWatcomQuote); // maybe create .def file from list of objects - if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY && + if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { this->GenDefFile(real_link_commands, linkFlags); } @@ -574,7 +574,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Compute the directory portion of the install_name setting. std::string install_name_dir; - if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY) { // Get the install_name directory for the build tree. install_name_dir = this->GeneratorTarget->GetInstallNameDirForBuildTree(this->ConfigName); @@ -659,7 +659,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string linkRule = this->GetLinkRule(linkRuleVar); cmSystemTools::ExpandListArgument(linkRule, real_link_commands); if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE") && - (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY)) { + (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY)) { std::string cmakeCommand = this->LocalGenerator->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); cmakeCommand += " -E __run_iwyu --lwyu="; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index cbfe850..f0502bf 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -68,16 +68,16 @@ cmMakefileTargetGenerator* cmMakefileTargetGenerator::New( cmMakefileTargetGenerator* result = CM_NULLPTR; switch (tgt->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: result = new cmMakefileExecutableTargetGenerator(tgt); break; - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: result = new cmMakefileLibraryTargetGenerator(tgt); break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: result = new cmMakefileUtilityTargetGenerator(tgt); break; default: @@ -504,10 +504,10 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( std::string targetFullPathReal; std::string targetFullPathPDB; std::string targetFullPathCompilePDB; - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE || - this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY || - this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE || + this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { targetFullPathReal = this->GeneratorTarget->GetFullPath(this->ConfigName, false, true); targetFullPathPDB = @@ -515,7 +515,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( targetFullPathPDB += "/"; targetFullPathPDB += this->GeneratorTarget->GetPDBName(this->ConfigName); } - if (this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { targetFullPathCompilePDB = this->GeneratorTarget->GetCompilePDBPath(this->ConfigName); if (targetFullPathCompilePDB.empty()) { @@ -1346,7 +1346,7 @@ void cmMakefileTargetGenerator::AppendTargetDepends( std::vector& depends) { // Static libraries never depend on anything for linking. - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) { return; } diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index b28b19a..dd903d6 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -45,7 +45,7 @@ cmNinjaNormalTargetGenerator::cmNinjaNormalTargetGenerator( , TargetLinkLanguage("") { this->TargetLinkLanguage = target->GetLinkerLanguage(this->GetConfigName()); - if (target->GetType() == cmState::EXECUTABLE) { + if (target->GetType() == cmStateEnums::EXECUTABLE) { this->GetGeneratorTarget()->GetExecutableNames( this->TargetNameOut, this->TargetNameReal, this->TargetNameImport, this->TargetNamePDB, GetLocalGenerator()->GetConfigName()); @@ -56,7 +56,7 @@ cmNinjaNormalTargetGenerator::cmNinjaNormalTargetGenerator( GetLocalGenerator()->GetConfigName()); } - if (target->GetType() != cmState::OBJECT_LIBRARY) { + if (target->GetType() != cmStateEnums::OBJECT_LIBRARY) { // on Windows the output dir is already needed at compile time // ensure the directory exists (OutDir test) EnsureDirectoryExists(target->GetDirectory(this->GetConfigName())); @@ -87,7 +87,7 @@ void cmNinjaNormalTargetGenerator::Generate() // Write the build statements this->WriteObjectBuildStatements(); - if (this->GetGeneratorTarget()->GetType() == cmState::OBJECT_LIBRARY) { + if (this->GetGeneratorTarget()->GetType() == cmStateEnums::OBJECT_LIBRARY) { this->WriteObjectLibStatement(); } else { this->WriteLinkStatement(); @@ -125,17 +125,17 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules() const char* cmNinjaNormalTargetGenerator::GetVisibleTypeName() const { switch (this->GetGeneratorTarget()->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "static library"; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return "shared library"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: if (this->GetGeneratorTarget()->IsCFBundleOnApple()) { return "CFBundle shared module"; } else { return "shared module"; } - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return "executable"; default: return CM_NULLPTR; @@ -160,7 +160,7 @@ struct cmNinjaRemoveNoOpCommands void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) { - cmState::TargetType targetType = this->GetGeneratorTarget()->GetType(); + cmStateEnums::TargetType targetType = this->GetGeneratorTarget()->GetType(); std::string ruleName = this->LanguageLinkerRule(); // Select whether to use a response file for objects. @@ -236,7 +236,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) vars.Manifests = "$MANIFESTS"; std::string langFlags; - if (targetType != cmState::EXECUTABLE) { + if (targetType != cmStateEnums::EXECUTABLE) { langFlags += "$LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS"; vars.LanguageCompileFlags = langFlags.c_str(); } @@ -292,7 +292,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) std::string cmakeCommand = this->GetLocalGenerator()->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL); - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { this->GetGlobalGenerator()->AddRule( "CMAKE_SYMLINK_EXECUTABLE", cmakeCommand + " -E cmake_symlink_executable" @@ -352,7 +352,7 @@ std::vector cmNinjaNormalTargetGenerator::ComputeLinkCmd() } } switch (this->GetGeneratorTarget()->GetType()) { - case cmState::STATIC_LIBRARY: { + case cmStateEnums::STATIC_LIBRARY: { // We have archive link commands set. First, delete the existing archive. { std::string cmakeCommand = @@ -377,9 +377,9 @@ std::vector cmNinjaNormalTargetGenerator::ComputeLinkCmd() } return linkCmds; } - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::EXECUTABLE: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::EXECUTABLE: break; default: assert(0 && "Unexpected target type"); @@ -452,7 +452,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() // Write comments. cmGlobalNinjaGenerator::WriteDivider(this->GetBuildFileStream()); - const cmState::TargetType targetType = gt.GetType(); + const cmStateEnums::TargetType targetType = gt.GetType(); this->GetBuildFileStream() << "# Link build statements for " << cmState::GetTargetTypeName(targetType) << " target " << this->GetTargetName() << "\n\n"; @@ -497,7 +497,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() linkLineComputer.get(), this->GetConfigName(), vars["LINK_LIBRARIES"], vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, linkPath, &genTarget); if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") && - (gt.GetType() == cmState::SHARED_LIBRARY || + (gt.GetType() == cmStateEnums::SHARED_LIBRARY || gt.IsExecutableWithExports())) { if (gt.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { std::string name_of_def_file = gt.GetSupportDirectory(); @@ -510,8 +510,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() } // Add OS X version flags, if any. - if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { this->AppendOSXVerFlag(vars["LINK_FLAGS"], this->TargetLinkLanguage, "COMPATIBILITY", true); this->AppendOSXVerFlag(vars["LINK_FLAGS"], this->TargetLinkLanguage, @@ -535,7 +535,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() // Compute architecture specific link flags. Yes, these go into a different // variable for executables, probably due to a mistake made when duplicating // code between the Makefile executable and library generators. - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { std::string t = vars["FLAGS"]; localGen.AddArchitectureFlags(t, &genTarget, TargetLinkLanguage, cfgName); t += lwyuFlags; @@ -552,7 +552,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() if (this->GetGeneratorTarget()->HasSOName(cfgName)) { vars["SONAME_FLAG"] = mf->GetSONameFlag(this->TargetLinkLanguage); vars["SONAME"] = this->TargetNameSO; - if (targetType == cmState::SHARED_LIBRARY) { + if (targetType == cmStateEnums::SHARED_LIBRARY) { std::string install_dir = this->GetGeneratorTarget()->GetInstallNameDirForBuildTree(cfgName); if (!install_dir.empty()) { @@ -625,7 +625,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() } // maybe create .def file from list of objects - if ((gt.GetType() == cmState::SHARED_LIBRARY || + if ((gt.GetType() == cmStateEnums::SHARED_LIBRARY || gt.IsExecutableWithExports()) && this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (gt.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { @@ -713,7 +713,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->WriteLinkRule(usedResponseFile); if (symlinkNeeded) { - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { globalGen.WriteBuild( this->GetBuildFileStream(), "Create executable symlink " + targetOutput, diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 1ac6cd4..6552832 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -31,15 +31,15 @@ cmNinjaTargetGenerator* cmNinjaTargetGenerator::New(cmGeneratorTarget* target) { switch (target->GetType()) { - case cmState::EXECUTABLE: - case cmState::SHARED_LIBRARY: - case cmState::STATIC_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: + case cmStateEnums::EXECUTABLE: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: return new cmNinjaNormalTargetGenerator(target); - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: return new cmNinjaUtilityTargetGenerator(target); default: @@ -186,8 +186,8 @@ std::string cmNinjaTargetGenerator::ComputeDefines(cmSourceFile const* source, cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const { // Static libraries never depend on other targets for linking. - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY || - this->GeneratorTarget->GetType() == cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::OBJECT_LIBRARY) { return cmNinjaDeps(); } @@ -335,15 +335,15 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID")) { std::string pdbPath; std::string compilePdbPath; - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE || - this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY || - this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE || + this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { pdbPath = this->GeneratorTarget->GetPDBDirectory(this->GetConfigName()); pdbPath += "/"; pdbPath += this->GeneratorTarget->GetPDBName(this->GetConfigName()); } - if (this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { compilePdbPath = this->GeneratorTarget->GetCompilePDBPath(this->GetConfigName()); if (compilePdbPath.empty()) { diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx index 17e35e5..7de185a 100644 --- a/Source/cmNinjaUtilityTargetGenerator.cxx +++ b/Source/cmNinjaUtilityTargetGenerator.cxx @@ -151,7 +151,7 @@ void cmNinjaUtilityTargetGenerator::Generate() // Add an alias for the logical target name regardless of what directory // contains it. Skip this for GLOBAL_TARGET because they are meant to // be per-directory and have one at the top-level anyway. - if (this->GetGeneratorTarget()->GetType() != cmState::GLOBAL_TARGET) { + if (this->GetGeneratorTarget()->GetType() != cmStateEnums::GLOBAL_TARGET) { this->GetGlobalGenerator()->AddTargetAlias(this->GetTargetName(), this->GetGeneratorTarget()); } diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a9a3ce2..d332ed7 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -684,7 +684,7 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, cmLocalGenerator* lg = target->GetLocalGenerator(); const cmState* state = lg->GetState(); - const cmState::TargetType type = target->GetType(); + const cmStateEnums::TargetType type = target->GetType(); const std::string typeName = state->GetTargetTypeName(type); Json::Value ttl = Json::arrayValue; diff --git a/Source/cmState.cxx b/Source/cmState.cxx index ca0295a..cdadbda 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -117,26 +117,26 @@ cmState::~cmState() cmDeleteAll(this->Commands); } -const char* cmState::GetTargetTypeName(cmState::TargetType targetType) +const char* cmState::GetTargetTypeName(cmStateEnums::TargetType targetType) { switch (targetType) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "STATIC_LIBRARY"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return "MODULE_LIBRARY"; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return "SHARED_LIBRARY"; - case cmState::OBJECT_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: return "OBJECT_LIBRARY"; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return "EXECUTABLE"; - case cmState::UTILITY: + case cmStateEnums::UTILITY: return "UTILITY"; - case cmState::GLOBAL_TARGET: + case cmStateEnums::GLOBAL_TARGET: return "GLOBAL_TARGET"; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: return "INTERFACE_LIBRARY"; - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: return "UNKNOWN_LIBRARY"; } assert(0 && "Unexpected target type"); diff --git a/Source/cmState.h b/Source/cmState.h index 8f0b5ee..521870d 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -43,6 +43,19 @@ enum SnapshotType PolicyScopeType, VariableScopeType }; + +enum TargetType +{ + EXECUTABLE, + STATIC_LIBRARY, + SHARED_LIBRARY, + MODULE_LIBRARY, + OBJECT_LIBRARY, + UTILITY, + GLOBAL_TARGET, + INTERFACE_LIBRARY, + UNKNOWN_LIBRARY +}; } class cmState @@ -185,20 +198,7 @@ public: friend class Snapshot; }; - enum TargetType - { - EXECUTABLE, - STATIC_LIBRARY, - SHARED_LIBRARY, - MODULE_LIBRARY, - OBJECT_LIBRARY, - UTILITY, - GLOBAL_TARGET, - INTERFACE_LIBRARY, - UNKNOWN_LIBRARY - }; - - static const char* GetTargetTypeName(cmState::TargetType targetType); + static const char* GetTargetTypeName(cmStateEnums::TargetType targetType); Snapshot CreateBaseSnapshot(); Snapshot CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 3a22309..5753dd8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -180,7 +180,7 @@ public: std::vector LinkImplementationPropertyBacktraces; }; -cmTarget::cmTarget(std::string const& name, cmState::TargetType type, +cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, Visibility vis, cmMakefile* mf) { assert(mf); @@ -196,8 +196,8 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, this->BuildInterfaceIncludesAppended = false; // only add dependency information for library targets - if (this->TargetTypeValue >= cmState::STATIC_LIBRARY && - this->TargetTypeValue <= cmState::MODULE_LIBRARY) { + if (this->TargetTypeValue >= cmStateEnums::STATIC_LIBRARY && + this->TargetTypeValue <= cmStateEnums::MODULE_LIBRARY) { this->RecordDependencies = true; } else { this->RecordDependencies = false; @@ -214,8 +214,8 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, "Android") == 0; // Setup default property values. - if (this->GetType() != cmState::INTERFACE_LIBRARY && - this->GetType() != cmState::UTILITY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && + this->GetType() != cmStateEnums::UTILITY) { this->SetPropertyDefault("ANDROID_API", CM_NULLPTR); this->SetPropertyDefault("ANDROID_API_MIN", CM_NULLPTR); this->SetPropertyDefault("ANDROID_ARCH", CM_NULLPTR); @@ -282,7 +282,7 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, mf->GetConfigurations(configNames); // Setup per-configuration property default values. - if (this->GetType() != cmState::UTILITY) { + if (this->GetType() != cmStateEnums::UTILITY) { const char* configProps[] = { /* clang-format needs this comment to break after the opening brace */ "ARCHIVE_OUTPUT_DIRECTORY_", @@ -297,7 +297,7 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, ci != configNames.end(); ++ci) { std::string configUpper = cmSystemTools::UpperCase(*ci); for (const char** p = configProps; *p; ++p) { - if (this->TargetTypeValue == cmState::INTERFACE_LIBRARY && + if (this->TargetTypeValue == cmStateEnums::INTERFACE_LIBRARY && strcmp(*p, "MAP_IMPORTED_CONFIG_") != 0) { continue; } @@ -311,8 +311,8 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, // compatibility with previous CMake versions in which executables // did not support this variable. Projects may still specify the // property directly. - if (this->TargetTypeValue != cmState::EXECUTABLE && - this->TargetTypeValue != cmState::INTERFACE_LIBRARY) { + if (this->TargetTypeValue != cmStateEnums::EXECUTABLE && + this->TargetTypeValue != cmStateEnums::INTERFACE_LIBRARY) { std::string property = cmSystemTools::UpperCase(*ci); property += "_POSTFIX"; this->SetPropertyDefault(property, CM_NULLPTR); @@ -357,44 +357,45 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, parentOptionsBts.end()); } - if (this->GetType() != cmState::INTERFACE_LIBRARY && - this->GetType() != cmState::UTILITY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && + this->GetType() != cmStateEnums::UTILITY) { this->SetPropertyDefault("C_VISIBILITY_PRESET", CM_NULLPTR); this->SetPropertyDefault("CXX_VISIBILITY_PRESET", CM_NULLPTR); this->SetPropertyDefault("VISIBILITY_INLINES_HIDDEN", CM_NULLPTR); } - if (this->TargetTypeValue == cmState::EXECUTABLE) { + if (this->TargetTypeValue == cmStateEnums::EXECUTABLE) { this->SetPropertyDefault("ANDROID_GUI", CM_NULLPTR); this->SetPropertyDefault("CROSSCOMPILING_EMULATOR", CM_NULLPTR); this->SetPropertyDefault("ENABLE_EXPORTS", CM_NULLPTR); } - if (this->TargetTypeValue == cmState::SHARED_LIBRARY || - this->TargetTypeValue == cmState::MODULE_LIBRARY) { + if (this->TargetTypeValue == cmStateEnums::SHARED_LIBRARY || + this->TargetTypeValue == cmStateEnums::MODULE_LIBRARY) { this->SetProperty("POSITION_INDEPENDENT_CODE", "True"); } - if (this->TargetTypeValue == cmState::SHARED_LIBRARY || - this->TargetTypeValue == cmState::EXECUTABLE) { + if (this->TargetTypeValue == cmStateEnums::SHARED_LIBRARY || + this->TargetTypeValue == cmStateEnums::EXECUTABLE) { this->SetPropertyDefault("WINDOWS_EXPORT_ALL_SYMBOLS", CM_NULLPTR); } - if (this->GetType() != cmState::INTERFACE_LIBRARY && - this->GetType() != cmState::UTILITY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && + this->GetType() != cmStateEnums::UTILITY) { this->SetPropertyDefault("POSITION_INDEPENDENT_CODE", CM_NULLPTR); } // Record current policies for later use. this->Makefile->RecordPolicies(this->PolicyMap); - if (this->TargetTypeValue == cmState::INTERFACE_LIBRARY) { + if (this->TargetTypeValue == cmStateEnums::INTERFACE_LIBRARY) { // This policy is checked in a few conditions. The properties relevant - // to the policy are always ignored for cmState::INTERFACE_LIBRARY targets, + // to the policy are always ignored for cmStateEnums::INTERFACE_LIBRARY + // targets, // so ensure that the conditions don't lead to nonsense. this->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW); } - if (this->GetType() != cmState::INTERFACE_LIBRARY && - this->GetType() != cmState::UTILITY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && + this->GetType() != cmStateEnums::UTILITY) { this->SetPropertyDefault("JOB_POOL_COMPILE", CM_NULLPTR); this->SetPropertyDefault("JOB_POOL_LINK", CM_NULLPTR); } @@ -432,26 +433,27 @@ cmListFileBacktrace const& cmTarget::GetBacktrace() const bool cmTarget::IsExecutableWithExports() const { - return (this->GetType() == cmState::EXECUTABLE && + return (this->GetType() == cmStateEnums::EXECUTABLE && this->GetPropertyAsBool("ENABLE_EXPORTS")); } bool cmTarget::HasImportLibrary() const { - return (this->DLLPlatform && (this->GetType() == cmState::SHARED_LIBRARY || - this->IsExecutableWithExports())); + return (this->DLLPlatform && + (this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->IsExecutableWithExports())); } bool cmTarget::IsFrameworkOnApple() const { - return (this->GetType() == cmState::SHARED_LIBRARY && + return (this->GetType() == cmStateEnums::SHARED_LIBRARY && this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("FRAMEWORK")); } bool cmTarget::IsAppBundleOnApple() const { - return (this->GetType() == cmState::EXECUTABLE && + return (this->GetType() == cmStateEnums::EXECUTABLE && this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("MACOSX_BUNDLE")); } @@ -730,7 +732,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib, } if (cmGeneratorExpression::Find(lib) != std::string::npos || - (tgt && tgt->GetType() == cmState::INTERFACE_LIBRARY) || + (tgt && tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) || (this->Name == lib)) { return; } @@ -986,10 +988,10 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, void cmTarget::AppendBuildInterfaceIncludes() { - if (this->GetType() != cmState::SHARED_LIBRARY && - this->GetType() != cmState::STATIC_LIBRARY && - this->GetType() != cmState::MODULE_LIBRARY && - this->GetType() != cmState::INTERFACE_LIBRARY && + if (this->GetType() != cmStateEnums::SHARED_LIBRARY && + this->GetType() != cmStateEnums::STATIC_LIBRARY && + this->GetType() != cmStateEnums::MODULE_LIBRARY && + this->GetType() != cmStateEnums::INTERFACE_LIBRARY && !this->IsExecutableWithExports()) { return; } @@ -1255,15 +1257,15 @@ bool cmTarget::GetPropertyAsBool(const std::string& prop) const const char* cmTarget::GetSuffixVariableInternal(bool implib) const { switch (this->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "CMAKE_STATIC_LIBRARY_SUFFIX"; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return (implib ? "CMAKE_IMPORT_LIBRARY_SUFFIX" : "CMAKE_SHARED_LIBRARY_SUFFIX"); - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return (implib ? "CMAKE_IMPORT_LIBRARY_SUFFIX" : "CMAKE_SHARED_MODULE_SUFFIX"); - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return (implib ? "CMAKE_IMPORT_LIBRARY_SUFFIX" // Android GUI application packages store the native @@ -1280,15 +1282,15 @@ const char* cmTarget::GetSuffixVariableInternal(bool implib) const const char* cmTarget::GetPrefixVariableInternal(bool implib) const { switch (this->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "CMAKE_STATIC_LIBRARY_PREFIX"; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return (implib ? "CMAKE_IMPORT_LIBRARY_PREFIX" : "CMAKE_SHARED_LIBRARY_PREFIX"); - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return (implib ? "CMAKE_IMPORT_LIBRARY_PREFIX" : "CMAKE_SHARED_MODULE_PREFIX"); - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return (implib ? "CMAKE_IMPORT_LIBRARY_PREFIX" // Android GUI application packages store the native @@ -1322,7 +1324,7 @@ std::string cmTarget::ImportedGetFullPath(const std::string& config, const char* imp = CM_NULLPTR; std::string suffix; - if (this->GetType() != cmState::INTERFACE_LIBRARY && + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && this->GetMappedConfig(config_upper, &loc, &imp, suffix)) { if (!pimplib) { if (loc) { @@ -1340,7 +1342,7 @@ std::string cmTarget::ImportedGetFullPath(const std::string& config, } else { if (imp) { result = imp; - } else if (this->GetType() == cmState::SHARED_LIBRARY || + } else if (this->GetType() == cmStateEnums::SHARED_LIBRARY || this->IsExecutableWithExports()) { std::string impProp = "IMPORTED_IMPLIB"; impProp += suffix; @@ -1378,9 +1380,10 @@ bool cmTarget::GetMappedConfig(std::string const& desired_config, const char** loc, const char** imp, std::string& suffix) const { - if (this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { // This method attempts to find a config-specific LOCATION for the - // IMPORTED library. In the case of cmState::INTERFACE_LIBRARY, there is no + // IMPORTED library. In the case of cmStateEnums::INTERFACE_LIBRARY, there + // is no // LOCATION at all, so leaving *loc and *imp unchanged is the appropriate // and valid response. return true; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index bd00b3d..6a7c8f0 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -62,8 +62,8 @@ public: VisibilityImportedGlobally }; - cmTarget(std::string const& name, cmState::TargetType type, Visibility vis, - cmMakefile* mf); + cmTarget(std::string const& name, cmStateEnums::TargetType type, + Visibility vis, cmMakefile* mf); enum CustomCommandType { @@ -75,7 +75,7 @@ public: /** * Return the type of target. */ - cmState::TargetType GetType() const { return this->TargetTypeValue; } + cmStateEnums::TargetType GetType() const { return this->TargetTypeValue; } cmGlobalGenerator* GetGlobalGenerator() const; @@ -302,7 +302,7 @@ private: LinkLibraryVectorType OriginalLinkLibraries; cmMakefile* Makefile; cmTargetInternalPointer Internal; - cmState::TargetType TargetTypeValue; + cmStateEnums::TargetType TargetTypeValue; bool HaveInstallRule; bool RecordDependencies; bool DLLPlatform; diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index d1de7ef..804dc5a 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -71,7 +71,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass( return true; } - if (this->Target->GetType() == cmState::OBJECT_LIBRARY) { + if (this->Target->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "Object library target \"" << args[0] << "\" " << "may not link to anything."; @@ -80,7 +80,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass( return true; } - if (this->Target->GetType() == cmState::UTILITY) { + if (this->Target->GetType() == cmStateEnums::UTILITY) { std::ostringstream e; const char* modal = CM_NULLPTR; cmake::MessageType messageType = cmake::AUTHOR_WARNING; @@ -278,7 +278,7 @@ void cmTargetLinkLibrariesCommand::LinkLibraryTypeSpecifierWarning(int left, bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, cmTargetLinkLibraryType llt) { - if (this->Target->GetType() == cmState::INTERFACE_LIBRARY && + if (this->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY && this->CurrentProcessingState != ProcessingKeywordLinkInterface) { this->Makefile->IssueMessage( cmake::FATAL_ERROR, @@ -351,9 +351,9 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, cmTarget* tgt = this->Makefile->GetGlobalGenerator()->FindTarget(lib); - if (tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && - (tgt->GetType() != cmState::SHARED_LIBRARY) && - (tgt->GetType() != cmState::INTERFACE_LIBRARY) && + if (tgt && (tgt->GetType() != cmStateEnums::STATIC_LIBRARY) && + (tgt->GetType() != cmStateEnums::SHARED_LIBRARY) && + (tgt->GetType() != cmStateEnums::INTERFACE_LIBRARY) && !tgt->IsExecutableWithExports()) { std::ostringstream e; e << "Target \"" << lib << "\" of type " @@ -375,7 +375,7 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, } if (this->CurrentProcessingState != ProcessingKeywordPublicInterface && this->CurrentProcessingState != ProcessingPlainPublicInterface) { - if (this->Target->GetType() == cmState::STATIC_LIBRARY) { + if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY) { std::string configLib = this->Target->GetDebugGeneratorExpressions(lib, llt); if (cmGeneratorExpression::IsValidTargetName(lib) || @@ -403,7 +403,7 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, return true; } - if (this->Target->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return true; } diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx index a00360b..e2e02ad 100644 --- a/Source/cmTargetPropCommandBase.cxx +++ b/Source/cmTargetPropCommandBase.cxx @@ -28,12 +28,12 @@ bool cmTargetPropCommandBase::HandleArguments( this->HandleMissingTarget(args[0]); return false; } - if ((this->Target->GetType() != cmState::SHARED_LIBRARY) && - (this->Target->GetType() != cmState::STATIC_LIBRARY) && - (this->Target->GetType() != cmState::OBJECT_LIBRARY) && - (this->Target->GetType() != cmState::MODULE_LIBRARY) && - (this->Target->GetType() != cmState::INTERFACE_LIBRARY) && - (this->Target->GetType() != cmState::EXECUTABLE)) { + if ((this->Target->GetType() != cmStateEnums::SHARED_LIBRARY) && + (this->Target->GetType() != cmStateEnums::STATIC_LIBRARY) && + (this->Target->GetType() != cmStateEnums::OBJECT_LIBRARY) && + (this->Target->GetType() != cmStateEnums::MODULE_LIBRARY) && + (this->Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) && + (this->Target->GetType() != cmStateEnums::EXECUTABLE)) { this->SetError("called with non-compilable target type"); return false; } @@ -86,7 +86,7 @@ bool cmTargetPropCommandBase::ProcessContentArgs( return false; } - if (this->Target->GetType() == cmState::INTERFACE_LIBRARY && + if (this->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY && scope != "INTERFACE") { this->SetError("may only be set INTERFACE properties on INTERFACE " "targets"); diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx index 21408d1..0839439 100644 --- a/Source/cmTargetPropertyComputer.cxx +++ b/Source/cmTargetPropertyComputer.cxx @@ -83,10 +83,10 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( } bool cmTargetPropertyComputer::PassesWhitelist( - cmState::TargetType tgtType, std::string const& prop, cmMessenger* messenger, + cmStateEnums::TargetType tgtType, std::string const& prop, cmMessenger* messenger, cmListFileBacktrace const& context) { - if (tgtType == cmState::INTERFACE_LIBRARY && + if (tgtType == cmStateEnums::INTERFACE_LIBRARY && !WhiteListedInterfaceProperty(prop)) { std::ostringstream e; e << "INTERFACE_LIBRARY targets may only have whitelisted properties. " diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index ed9a4e2..f8b683a 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -36,7 +36,7 @@ public: static bool WhiteListedInterfaceProperty(const std::string& prop); - static bool PassesWhitelist(cmState::TargetType tgtType, + static bool PassesWhitelist(cmStateEnums::TargetType tgtType, std::string const& prop, cmMessenger* messenger, cmListFileBacktrace const& context); @@ -59,11 +59,11 @@ private: { // Watch for special "computed" properties that are dependent on // other properties or variables. Always recompute them. - if (tgt->GetType() == cmState::EXECUTABLE || - tgt->GetType() == cmState::STATIC_LIBRARY || - tgt->GetType() == cmState::SHARED_LIBRARY || - tgt->GetType() == cmState::MODULE_LIBRARY || - tgt->GetType() == cmState::UNKNOWN_LIBRARY) { + if (tgt->GetType() == cmStateEnums::EXECUTABLE || + tgt->GetType() == cmStateEnums::STATIC_LIBRARY || + tgt->GetType() == cmStateEnums::SHARED_LIBRARY || + tgt->GetType() == cmStateEnums::MODULE_LIBRARY || + tgt->GetType() == cmStateEnums::UNKNOWN_LIBRARY) { static const std::string propLOCATION = "LOCATION"; if (prop == propLOCATION) { if (!tgt->IsImported() && diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index 3ea59cb..301660e 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -77,7 +77,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os, // be translated. std::string exe = command[0]; cmGeneratorTarget* target = this->LG->FindGeneratorTargetToUse(exe); - if (target && target->GetType() == cmState::EXECUTABLE) { + if (target && target->GetType() == cmStateEnums::EXECUTABLE) { // Use the target file on disk. exe = target->GetFullPath(config); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 8524ecc..9c857f2 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -255,7 +255,7 @@ void cmVisualStudio10TargetGenerator::WriteString(const char* line, void cmVisualStudio10TargetGenerator::Generate() { // do not generate external ms projects - if (this->GeneratorTarget->GetType() == cmState::INTERFACE_LIBRARY || + if (this->GeneratorTarget->GetType() == cmStateEnums::INTERFACE_LIBRARY || this->GeneratorTarget->GetProperty("EXTERNAL_MSPROJECT")) { return; } @@ -264,7 +264,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->Name.c_str()); this->GeneratorTarget->Target->SetProperty("GENERATOR_FILE_NAME_EXT", ".vcxproj"); - if (this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { if (!this->ComputeClOptions()) { return; } @@ -344,7 +344,7 @@ void cmVisualStudio10TargetGenerator::Generate() (*this->BuildFileStream) << "{" << this->GUID << "}\n"; if (this->MSTools && - this->GeneratorTarget->GetType() <= cmState::GLOBAL_TARGET) { + this->GeneratorTarget->GetType() <= cmStateEnums::GLOBAL_TARGET) { this->WriteApplicationTypeSettings(); this->VerifyNecessaryFiles(); } @@ -655,15 +655,15 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues() configType += cmVS10EscapeXML(vsConfigurationType); } else { switch (this->GeneratorTarget->GetType()) { - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: configType += "DynamicLibrary"; break; - case cmState::OBJECT_LIBRARY: - case cmState::STATIC_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: configType += "StaticLibrary"; break; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: if (this->NsightTegra && !this->GeneratorTarget->GetPropertyAsBool("ANDROID_GUI")) { // Android executables are .so too. @@ -672,8 +672,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues() configType += "Application"; } break; - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: if (this->NsightTegra) { // Tegra-Android platform does not understand "Utility". configType += "StaticLibrary"; @@ -681,8 +681,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues() configType += "Utility"; } break; - case cmState::UNKNOWN_LIBRARY: - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: break; } } @@ -710,7 +710,7 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues( std::string mfcFlagValue = mfcFlag ? mfcFlag : "0"; std::string useOfMfcValue = "false"; - if (this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { if (mfcFlagValue == "1") { useOfMfcValue = "Static"; } else if (mfcFlagValue == "2") { @@ -721,14 +721,15 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues( mfcLine += useOfMfcValue + "\n"; this->WriteString(mfcLine.c_str(), 2); - if ((this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY && + if ((this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY && this->ClOptions[config]->UsingUnicode()) || this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT") || this->GlobalGenerator->TargetsWindowsPhone() || this->GlobalGenerator->TargetsWindowsStore() || this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_EXTENSIONS")) { this->WriteString("Unicode\n", 2); - } else if (this->GeneratorTarget->GetType() <= cmState::MODULE_LIBRARY && + } else if (this->GeneratorTarget->GetType() <= + cmStateEnums::MODULE_LIBRARY && this->ClOptions[config]->UsingSBCS()) { this->WriteString("NotSet\n", 2); } else { @@ -1351,7 +1352,7 @@ void cmVisualStudio10TargetGenerator::WriteSources( void cmVisualStudio10TargetGenerator::WriteAllSources() { - if (this->GeneratorTarget->GetType() > cmState::UTILITY) { + if (this->GeneratorTarget->GetType() > cmStateEnums::UTILITY) { return; } this->WriteString("\n", 1); @@ -1573,8 +1574,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() { - cmState::TargetType ttype = this->GeneratorTarget->GetType(); - if (ttype > cmState::GLOBAL_TARGET) { + cmStateEnums::TargetType ttype = this->GeneratorTarget->GetType(); + if (ttype > cmStateEnums::GLOBAL_TARGET) { return; } @@ -1585,7 +1586,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() for (std::vector::const_iterator config = this->Configurations.begin(); config != this->Configurations.end(); ++config) { - if (ttype >= cmState::UTILITY) { + if (ttype >= cmStateEnums::UTILITY) { this->WritePlatformConfigTag("IntDir", config->c_str(), 3); *this->BuildFileStream << "$(Platform)\\$(Configuration)\\$(ProjectName)\\" @@ -1598,7 +1599,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() intermediateDir += "/"; std::string outDir; std::string targetNameFull; - if (ttype == cmState::OBJECT_LIBRARY) { + if (ttype == cmStateEnums::OBJECT_LIBRARY) { outDir = intermediateDir; targetNameFull = this->GeneratorTarget->GetName(); targetNameFull += ".lib"; @@ -1645,8 +1646,8 @@ void cmVisualStudio10TargetGenerator::OutputLinkIncremental( } // static libraries and things greater than modules do not need // to set this option - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY || - this->GeneratorTarget->GetType() > cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GeneratorTarget->GetType() > cmStateEnums::MODULE_LIBRARY) { return; } Options& linkOptions = *(this->LinkOptions[configName]); @@ -1767,8 +1768,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( if (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT")) { clOptions.AddFlag("CompileAsWinRT", "true"); // For WinRT components, add the _WINRT_DLL define to produce a lib - if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { clOptions.AddDefine("_WINRT_DLL"); } } else if (this->GlobalGenerator->TargetsWindowsStore() || @@ -1958,8 +1959,8 @@ void cmVisualStudio10TargetGenerator::WriteMasmOptions( void cmVisualStudio10TargetGenerator::WriteLibOptions( std::string const& config) { - if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY && - this->GeneratorTarget->GetType() != cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() != cmStateEnums::STATIC_LIBRARY && + this->GeneratorTarget->GetType() != cmStateEnums::OBJECT_LIBRARY) { return; } std::string libflags; @@ -1992,9 +1993,9 @@ void cmVisualStudio10TargetGenerator::WriteLibOptions( void cmVisualStudio10TargetGenerator::WriteManifestOptions( std::string const& config) { - if (this->GeneratorTarget->GetType() != cmState::EXECUTABLE && - this->GeneratorTarget->GetType() != cmState::SHARED_LIBRARY && - this->GeneratorTarget->GetType() != cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() != cmStateEnums::EXECUTABLE && + this->GeneratorTarget->GetType() != cmStateEnums::SHARED_LIBRARY && + this->GeneratorTarget->GetType() != cmStateEnums::MODULE_LIBRARY) { return; } @@ -2145,9 +2146,9 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions( bool cmVisualStudio10TargetGenerator::ComputeLinkOptions() { - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE || - this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE || + this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { for (std::vector::const_iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { @@ -2178,10 +2179,10 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( std::string CONFIG = cmSystemTools::UpperCase(config); const char* linkType = "SHARED"; - if (this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { linkType = "MODULE"; } - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { linkType = "EXE"; } std::string flags; @@ -2258,7 +2259,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( std::string targetNameFull; std::string targetNameImport; std::string targetNamePDB; - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { this->GeneratorTarget->GetExecutableNames(targetName, targetNameFull, targetNameImport, targetNamePDB, config.c_str()); @@ -2274,7 +2275,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( if (this->GeneratorTarget->GetPropertyAsBool("WIN32_EXECUTABLE")) { if (this->GlobalGenerator->TargetsWindowsCE()) { linkOptions.AddFlag("SubSystem", "WindowsCE"); - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { if (this->ClOptions[config]->UsingUnicode()) { linkOptions.AddFlag("EntryPointSymbol", "wWinMainCRTStartup"); } else { @@ -2287,7 +2288,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( } else { if (this->GlobalGenerator->TargetsWindowsCE()) { linkOptions.AddFlag("SubSystem", "WindowsCE"); - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { if (this->ClOptions[config]->UsingUnicode()) { linkOptions.AddFlag("EntryPointSymbol", "mainWCRTStartup"); } else { @@ -2325,7 +2326,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( // A Windows Runtime component uses internal .NET metadata, // so does not have an import library. if (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT") && - this->GeneratorTarget->GetType() != cmState::EXECUTABLE) { + this->GeneratorTarget->GetType() != cmStateEnums::EXECUTABLE) { linkOptions.AddFlag("GenerateWindowsMetadata", "true"); } else if (this->GlobalGenerator->TargetsWindowsPhone() || this->GlobalGenerator->TargetsWindowsStore()) { @@ -2356,7 +2357,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( "%(IgnoreSpecificDefaultLibraries)"); } - if ((this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || + if ((this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || this->GeneratorTarget->IsExecutableWithExports()) && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (this->GeneratorTarget->GetPropertyAsBool( @@ -2398,8 +2399,8 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( void cmVisualStudio10TargetGenerator::WriteLinkOptions( std::string const& config) { - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY || - this->GeneratorTarget->GetType() > cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GeneratorTarget->GetType() > cmStateEnums::MODULE_LIBRARY) { return; } Options& linkOptions = *(this->LinkOptions[config]); @@ -2432,7 +2433,7 @@ void cmVisualStudio10TargetGenerator::AddLibraries( this->ConvertToWindowsSlash(path); libVec.push_back(path); } else if (!l->Target || - l->Target->GetType() != cmState::INTERFACE_LIBRARY) { + l->Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { libVec.push_back(l->Value); } } @@ -2496,7 +2497,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups() this->WritePlatformConfigTag("ItemDefinitionGroup", i->c_str(), 1); *this->BuildFileStream << "\n"; // output cl compile flags - if (this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { this->WriteClOptions(*i, includes); // output rc compile flags this->WriteRCOptions(*i, includes); @@ -2513,7 +2514,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups() // output manifest flags this->WriteManifestOptions(*i); if (this->NsightTegra && - this->GeneratorTarget->GetType() == cmState::EXECUTABLE && + this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE && this->GeneratorTarget->GetPropertyAsBool("ANDROID_GUI")) { this->WriteAntBuildOptions(*i); } @@ -2525,7 +2526,7 @@ void cmVisualStudio10TargetGenerator::WriteEvents( std::string const& configName) { bool addedPrelink = false; - if ((this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || + if ((this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || this->GeneratorTarget->IsExecutableWithExports()) && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (this->GeneratorTarget->GetPropertyAsBool( @@ -2592,7 +2593,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences() for (OrderedTargetDependSet::const_iterator i = depends.begin(); i != depends.end(); ++i) { cmGeneratorTarget const* dt = *i; - if (dt->GetType() == cmState::INTERFACE_LIBRARY) { + if (dt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } // skip fortran targets as they can not be processed by MSBuild @@ -2728,7 +2729,7 @@ void cmVisualStudio10TargetGenerator::WriteWinRTPackageCertificateKeyFile() { if ((this->GlobalGenerator->TargetsWindowsStore() || this->GlobalGenerator->TargetsWindowsPhone()) && - (cmState::EXECUTABLE == this->GeneratorTarget->GetType())) { + (cmStateEnums::EXECUTABLE == this->GeneratorTarget->GetType())) { std::string pfxFile; std::vector certificates; this->GeneratorTarget->GetCertificates(certificates, ""); @@ -2853,7 +2854,7 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() "\n", 2); - if (this->GeneratorTarget->GetType() < cmState::UTILITY) { + if (this->GeneratorTarget->GetType() < cmStateEnums::UTILITY) { isAppContainer = true; } } else if (v == "8.1") { @@ -2865,7 +2866,7 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() "\n", 2); - if (this->GeneratorTarget->GetType() < cmState::UTILITY) { + if (this->GeneratorTarget->GetType() < cmStateEnums::UTILITY) { isAppContainer = true; } } else if (v == "8.0") { @@ -2878,10 +2879,11 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() 2); if (isWindowsStore && - this->GeneratorTarget->GetType() < cmState::UTILITY) { + this->GeneratorTarget->GetType() < cmStateEnums::UTILITY) { isAppContainer = true; } else if (isWindowsPhone && - this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + this->GeneratorTarget->GetType() == + cmStateEnums::EXECUTABLE) { this->WriteString("true\n", 2); this->WriteString("", 2); (*this->BuildFileStream) @@ -2931,7 +2933,7 @@ void cmVisualStudio10TargetGenerator::VerifyNecessaryFiles() { // For Windows and Windows Phone executables, we will assume that if a // manifest is not present that we need to add all the necessary files - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { std::vector manifestSources; this->GeneratorTarget->GetAppManifest(manifestSources, ""); { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0060391dffe824526b1f359db79c66c55e53d0c5 commit 0060391dffe824526b1f359db79c66c55e53d0c5 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:46 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 21:28:46 2016 +0200 cmState: Move SnapshotType enum to separate namespace diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 6ba6d26..ca0295a 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -32,7 +32,7 @@ struct cmStateDetail::SnapshotDataType cmLinkedTree::iterator Policies; cmLinkedTree::iterator PolicyRoot; cmLinkedTree::iterator PolicyScope; - cmState::SnapshotType SnapshotType; + cmStateEnums::SnapshotType SnapshotType; bool Keep; cmLinkedTree::iterator ExecutionListFile; cmLinkedTree::iterator @@ -748,7 +748,7 @@ cmState::Snapshot cmState::CreateBaseSnapshot() this->SnapshotData.Push(this->SnapshotData.Root()); pos->DirectoryParent = this->SnapshotData.Root(); pos->ScopeParent = this->SnapshotData.Root(); - pos->SnapshotType = BaseType; + pos->SnapshotType = cmStateEnums::BaseType; pos->Keep = true; pos->BuildSystemDirectory = this->BuildsystemDirectory.Push(this->BuildsystemDirectory.Root()); @@ -778,7 +778,7 @@ cmState::Snapshot cmState::CreateBuildsystemDirectorySnapshot( this->SnapshotData.Push(originSnapshot.Position); pos->DirectoryParent = originSnapshot.Position; pos->ScopeParent = originSnapshot.Position; - pos->SnapshotType = BuildsystemDirectoryType; + pos->SnapshotType = cmStateEnums::BuildsystemDirectoryType; pos->Keep = true; pos->BuildSystemDirectory = this->BuildsystemDirectory.Push( originSnapshot.Position->BuildSystemDirectory); @@ -810,7 +810,7 @@ cmState::Snapshot cmState::CreateFunctionCallSnapshot( cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); pos->ScopeParent = originSnapshot.Position; - pos->SnapshotType = FunctionCallType; + pos->SnapshotType = cmStateEnums::FunctionCallType; pos->Keep = false; pos->ExecutionListFile = this->ExecutionListFiles.Push( originSnapshot.Position->ExecutionListFile, fileName); @@ -828,7 +828,7 @@ cmState::Snapshot cmState::CreateMacroCallSnapshot( { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); - pos->SnapshotType = MacroCallType; + pos->SnapshotType = cmStateEnums::MacroCallType; pos->Keep = false; pos->ExecutionListFile = this->ExecutionListFiles.Push( originSnapshot.Position->ExecutionListFile, fileName); @@ -843,7 +843,7 @@ cmState::Snapshot cmState::CreateIncludeFileSnapshot( { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); - pos->SnapshotType = IncludeFileType; + pos->SnapshotType = cmStateEnums::IncludeFileType; pos->Keep = true; pos->ExecutionListFile = this->ExecutionListFiles.Push( originSnapshot.Position->ExecutionListFile, fileName); @@ -859,7 +859,7 @@ cmState::Snapshot cmState::CreateVariableScopeSnapshot( cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); pos->ScopeParent = originSnapshot.Position; - pos->SnapshotType = VariableScopeType; + pos->SnapshotType = cmStateEnums::VariableScopeType; pos->Keep = false; pos->PolicyScope = originSnapshot.Position->Policies; assert(originSnapshot.Position->Vars.IsValid()); @@ -876,7 +876,7 @@ cmState::Snapshot cmState::CreateInlineListFileSnapshot( { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); - pos->SnapshotType = InlineListFileType; + pos->SnapshotType = cmStateEnums::InlineListFileType; pos->Keep = true; pos->ExecutionListFile = this->ExecutionListFiles.Push( originSnapshot.Position->ExecutionListFile, fileName); @@ -890,7 +890,7 @@ cmState::Snapshot cmState::CreatePolicyScopeSnapshot( { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); - pos->SnapshotType = PolicyScopeType; + pos->SnapshotType = cmStateEnums::PolicyScopeType; pos->Keep = false; pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; @@ -943,7 +943,7 @@ cmState::Snapshot::Snapshot(cmState* state, { } -cmState::SnapshotType cmState::Snapshot::GetType() const +cmStateEnums::SnapshotType cmState::Snapshot::GetType() const { return this->Position->SnapshotType; } @@ -1041,18 +1041,18 @@ cmState::Snapshot cmState::Snapshot::GetCallStackParent() const Snapshot snapshot; cmStateDetail::PositionType parentPos = this->Position; - while (parentPos->SnapshotType == cmState::PolicyScopeType || - parentPos->SnapshotType == cmState::VariableScopeType) { + while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || + parentPos->SnapshotType == cmStateEnums::VariableScopeType) { ++parentPos; } - if (parentPos->SnapshotType == cmState::BuildsystemDirectoryType || - parentPos->SnapshotType == cmState::BaseType) { + if (parentPos->SnapshotType == cmStateEnums::BuildsystemDirectoryType || + parentPos->SnapshotType == cmStateEnums::BaseType) { return snapshot; } ++parentPos; - while (parentPos->SnapshotType == cmState::PolicyScopeType || - parentPos->SnapshotType == cmState::VariableScopeType) { + while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || + parentPos->SnapshotType == cmStateEnums::VariableScopeType) { ++parentPos; } @@ -1070,8 +1070,8 @@ cmState::Snapshot cmState::Snapshot::GetCallStackBottom() const assert(this->Position != this->State->SnapshotData.Root()); cmStateDetail::PositionType pos = this->Position; - while (pos->SnapshotType != cmState::BaseType && - pos->SnapshotType != cmState::BuildsystemDirectoryType && + while (pos->SnapshotType != cmStateEnums::BaseType && + pos->SnapshotType != cmStateEnums::BuildsystemDirectoryType && pos != this->State->SnapshotData.Root()) { ++pos; } diff --git a/Source/cmState.h b/Source/cmState.h index 4fcbb00..8f0b5ee 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -30,6 +30,21 @@ struct PolicyStackEntry; typedef cmLinkedTree::iterator PositionType; } +namespace cmStateEnums { + +enum SnapshotType +{ + BaseType, + BuildsystemDirectoryType, + FunctionCallType, + MacroCallType, + IncludeFileType, + InlineListFileType, + PolicyScopeType, + VariableScopeType +}; +} + class cmState { @@ -37,18 +52,6 @@ public: cmState(); ~cmState(); - enum SnapshotType - { - BaseType, - BuildsystemDirectoryType, - FunctionCallType, - MacroCallType, - IncludeFileType, - InlineListFileType, - PolicyScopeType, - VariableScopeType - }; - class Directory; class Snapshot @@ -75,7 +78,7 @@ public: Snapshot GetBuildsystemDirectoryParent() const; Snapshot GetCallStackParent() const; Snapshot GetCallStackBottom() const; - SnapshotType GetType() const; + cmStateEnums::SnapshotType GetType() const; void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5bc964eddbee7936f05ab758c7ac417fffbe4a3e commit 5bc964eddbee7936f05ab758c7ac417fffbe4a3e Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:46 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 21:28:46 2016 +0200 cmState: Move PositionType to separate namespace Remove friend declarations supporting it being a nested type. diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 080700e..6ba6d26 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -27,8 +27,8 @@ static std::string const kSUBDIRECTORIES = "SUBDIRECTORIES"; struct cmStateDetail::SnapshotDataType { - cmState::PositionType ScopeParent; - cmState::PositionType DirectoryParent; + cmStateDetail::PositionType ScopeParent; + cmStateDetail::PositionType DirectoryParent; cmLinkedTree::iterator Policies; cmLinkedTree::iterator PolicyRoot; cmLinkedTree::iterator PolicyScope; @@ -68,7 +68,7 @@ struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap struct cmStateDetail::BuildsystemDirectoryStateType { - cmState::PositionType DirectoryEnd; + cmStateDetail::PositionType DirectoryEnd; std::string Location; std::string OutputLocation; @@ -309,7 +309,7 @@ cmState::Snapshot cmState::Reset() this->GlobalProperties.clear(); this->PropertyDefinitions.clear(); - PositionType pos = this->SnapshotData.Truncate(); + cmStateDetail::PositionType pos = this->SnapshotData.Truncate(); this->ExecutionListFiles.Truncate(); { @@ -744,7 +744,8 @@ void cmState::Directory::ComputeRelativePathTopBinary() cmState::Snapshot cmState::CreateBaseSnapshot() { - PositionType pos = this->SnapshotData.Push(this->SnapshotData.Root()); + cmStateDetail::PositionType pos = + this->SnapshotData.Push(this->SnapshotData.Root()); pos->DirectoryParent = this->SnapshotData.Root(); pos->ScopeParent = this->SnapshotData.Root(); pos->SnapshotType = BaseType; @@ -773,7 +774,8 @@ cmState::Snapshot cmState::CreateBuildsystemDirectorySnapshot( Snapshot originSnapshot) { assert(originSnapshot.IsValid()); - PositionType pos = this->SnapshotData.Push(originSnapshot.Position); + cmStateDetail::PositionType pos = + this->SnapshotData.Push(originSnapshot.Position); pos->DirectoryParent = originSnapshot.Position; pos->ScopeParent = originSnapshot.Position; pos->SnapshotType = BuildsystemDirectoryType; @@ -805,7 +807,7 @@ cmState::Snapshot cmState::CreateBuildsystemDirectorySnapshot( cmState::Snapshot cmState::CreateFunctionCallSnapshot( cmState::Snapshot originSnapshot, std::string const& fileName) { - PositionType pos = + cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); pos->ScopeParent = originSnapshot.Position; pos->SnapshotType = FunctionCallType; @@ -824,7 +826,7 @@ cmState::Snapshot cmState::CreateFunctionCallSnapshot( cmState::Snapshot cmState::CreateMacroCallSnapshot( cmState::Snapshot originSnapshot, std::string const& fileName) { - PositionType pos = + cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); pos->SnapshotType = MacroCallType; pos->Keep = false; @@ -839,7 +841,7 @@ cmState::Snapshot cmState::CreateMacroCallSnapshot( cmState::Snapshot cmState::CreateIncludeFileSnapshot( cmState::Snapshot originSnapshot, const std::string& fileName) { - PositionType pos = + cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); pos->SnapshotType = IncludeFileType; pos->Keep = true; @@ -854,7 +856,7 @@ cmState::Snapshot cmState::CreateIncludeFileSnapshot( cmState::Snapshot cmState::CreateVariableScopeSnapshot( cmState::Snapshot originSnapshot) { - PositionType pos = + cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); pos->ScopeParent = originSnapshot.Position; pos->SnapshotType = VariableScopeType; @@ -872,7 +874,7 @@ cmState::Snapshot cmState::CreateVariableScopeSnapshot( cmState::Snapshot cmState::CreateInlineListFileSnapshot( cmState::Snapshot originSnapshot, const std::string& fileName) { - PositionType pos = + cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); pos->SnapshotType = InlineListFileType; pos->Keep = true; @@ -886,7 +888,7 @@ cmState::Snapshot cmState::CreateInlineListFileSnapshot( cmState::Snapshot cmState::CreatePolicyScopeSnapshot( cmState::Snapshot originSnapshot) { - PositionType pos = + cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); pos->SnapshotType = PolicyScopeType; pos->Keep = false; @@ -897,8 +899,8 @@ cmState::Snapshot cmState::CreatePolicyScopeSnapshot( cmState::Snapshot cmState::Pop(cmState::Snapshot originSnapshot) { - PositionType pos = originSnapshot.Position; - PositionType prevPos = pos; + cmStateDetail::PositionType pos = originSnapshot.Position; + cmStateDetail::PositionType prevPos = pos; ++prevPos; prevPos->IncludeDirectoryPosition = prevPos->BuildSystemDirectory->IncludeDirectories.size(); @@ -934,7 +936,8 @@ std::vector cmState::Snapshot::GetChildren() return this->Position->BuildSystemDirectory->Children; } -cmState::Snapshot::Snapshot(cmState* state, PositionType position) +cmState::Snapshot::Snapshot(cmState* state, + cmStateDetail::PositionType position) : State(state) , Position(position) { @@ -1022,7 +1025,7 @@ cmState::Snapshot cmState::Snapshot::GetBuildsystemDirectoryParent() const if (!this->State || this->Position == this->State->SnapshotData.Root()) { return snapshot; } - PositionType parentPos = this->Position->DirectoryParent; + cmStateDetail::PositionType parentPos = this->Position->DirectoryParent; if (parentPos != this->State->SnapshotData.Root()) { snapshot = Snapshot(this->State, parentPos->BuildSystemDirectory->DirectoryEnd); @@ -1037,7 +1040,7 @@ cmState::Snapshot cmState::Snapshot::GetCallStackParent() const assert(this->Position != this->State->SnapshotData.Root()); Snapshot snapshot; - PositionType parentPos = this->Position; + cmStateDetail::PositionType parentPos = this->Position; while (parentPos->SnapshotType == cmState::PolicyScopeType || parentPos->SnapshotType == cmState::VariableScopeType) { ++parentPos; @@ -1066,7 +1069,7 @@ cmState::Snapshot cmState::Snapshot::GetCallStackBottom() const assert(this->State); assert(this->Position != this->State->SnapshotData.Root()); - PositionType pos = this->Position; + cmStateDetail::PositionType pos = this->Position; while (pos->SnapshotType != cmState::BaseType && pos->SnapshotType != cmState::BuildsystemDirectoryType && pos != this->State->SnapshotData.Root()) { @@ -1077,14 +1080,14 @@ cmState::Snapshot cmState::Snapshot::GetCallStackBottom() const void cmState::Snapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) { - PositionType pos = this->Position; + cmStateDetail::PositionType pos = this->Position; pos->Policies = this->State->PolicyStack.Push( pos->Policies, cmStateDetail::PolicyStackEntry(entry, weak)); } bool cmState::Snapshot::PopPolicy() { - PositionType pos = this->Position; + cmStateDetail::PositionType pos = this->Position; if (pos->Policies == pos->PolicyScope) { return false; } @@ -1135,8 +1138,8 @@ cmPolicies::PolicyStatus cmState::Snapshot::GetPolicy( return status; } } - cmState::PositionType e = dir->DirectoryEnd; - cmState::PositionType p = e->DirectoryParent; + cmStateDetail::PositionType e = dir->DirectoryEnd; + cmStateDetail::PositionType p = e->DirectoryParent; if (p == this->State->SnapshotData.Root()) { break; } @@ -1305,7 +1308,7 @@ void cmState::Snapshot::SetDirectoryDefinitions() void cmState::Snapshot::InitializeFromParent() { - PositionType parent = this->Position->DirectoryParent; + cmStateDetail::PositionType parent = this->Position->DirectoryParent; assert(this->Position->Vars.IsValid()); assert(parent->Vars.IsValid()); diff --git a/Source/cmState.h b/Source/cmState.h index 34f9fd0..4fcbb00 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -27,14 +27,11 @@ namespace cmStateDetail { struct BuildsystemDirectoryStateType; struct SnapshotDataType; struct PolicyStackEntry; +typedef cmLinkedTree::iterator PositionType; } class cmState { - typedef cmLinkedTree::iterator PositionType; - friend class Snapshot; - friend struct cmStateDetail::BuildsystemDirectoryStateType; - friend struct cmStateDetail::SnapshotDataType; public: cmState(); @@ -58,7 +55,7 @@ public: { public: Snapshot(cmState* state = CM_NULLPTR); - Snapshot(cmState* state, PositionType position); + Snapshot(cmState* state, cmStateDetail::PositionType position); const char* GetDefinition(std::string const& name) const; bool IsInitialized(std::string const& name) const; @@ -117,7 +114,7 @@ public: void InitializeFromParent(); cmState* State; - cmState::PositionType Position; + cmStateDetail::PositionType Position; }; class Directory https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2dc409964858c96125948082a2c488bd573b8269 commit 2dc409964858c96125948082a2c488bd573b8269 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:45 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 21:28:45 2016 +0200 cmState: Move PolicyStackEntry to separate namespace diff --git a/Source/cmState.cxx b/Source/cmState.cxx index c3e061b..080700e 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -29,9 +29,9 @@ struct cmStateDetail::SnapshotDataType { cmState::PositionType ScopeParent; cmState::PositionType DirectoryParent; - cmLinkedTree::iterator Policies; - cmLinkedTree::iterator PolicyRoot; - cmLinkedTree::iterator PolicyScope; + cmLinkedTree::iterator Policies; + cmLinkedTree::iterator PolicyRoot; + cmLinkedTree::iterator PolicyScope; cmState::SnapshotType SnapshotType; bool Keep; cmLinkedTree::iterator ExecutionListFile; @@ -45,7 +45,7 @@ struct cmStateDetail::SnapshotDataType std::vector::size_type CompileOptionsPosition; }; -struct cmState::PolicyStackEntry : public cmPolicies::PolicyMap +struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap { typedef cmPolicies::PolicyMap derived; PolicyStackEntry(bool w = false) @@ -1078,8 +1078,8 @@ cmState::Snapshot cmState::Snapshot::GetCallStackBottom() const void cmState::Snapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) { PositionType pos = this->Position; - pos->Policies = this->State->PolicyStack.Push(pos->Policies, - PolicyStackEntry(entry, weak)); + pos->Policies = this->State->PolicyStack.Push( + pos->Policies, cmStateDetail::PolicyStackEntry(entry, weak)); } bool cmState::Snapshot::PopPolicy() @@ -1102,7 +1102,8 @@ void cmState::Snapshot::SetPolicy(cmPolicies::PolicyID id, { // Update the policy stack from the top to the top-most strong entry. bool previous_was_weak = true; - for (cmLinkedTree::iterator psi = this->Position->Policies; + for (cmLinkedTree::iterator psi = + this->Position->Policies; previous_was_weak && psi != this->Position->PolicyRoot; ++psi) { psi->Set(id, status); previous_was_weak = psi->Weak; @@ -1124,9 +1125,9 @@ cmPolicies::PolicyStatus cmState::Snapshot::GetPolicy( while (true) { assert(dir.IsValid()); - cmLinkedTree::iterator leaf = + cmLinkedTree::iterator leaf = dir->DirectoryEnd->Policies; - cmLinkedTree::iterator root = + cmLinkedTree::iterator root = dir->DirectoryEnd->PolicyRoot; for (; leaf != root; ++leaf) { if (leaf->IsDefined(id)) { diff --git a/Source/cmState.h b/Source/cmState.h index d733469..34f9fd0 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -26,11 +26,11 @@ class cmPropertyDefinition; namespace cmStateDetail { struct BuildsystemDirectoryStateType; struct SnapshotDataType; +struct PolicyStackEntry; } class cmState { - struct PolicyStackEntry; typedef cmLinkedTree::iterator PositionType; friend class Snapshot; friend struct cmStateDetail::BuildsystemDirectoryStateType; @@ -341,7 +341,7 @@ private: cmLinkedTree ExecutionListFiles; - cmLinkedTree PolicyStack; + cmLinkedTree PolicyStack; cmLinkedTree SnapshotData; cmLinkedTree VarTree; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb40af5d6fa65dae9421280c05934eafc8a66165 commit cb40af5d6fa65dae9421280c05934eafc8a66165 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:45 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 21:28:45 2016 +0200 cmState: Move SnapshotDataType to separate namespace diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 86d238a..c3e061b 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -25,7 +25,7 @@ static std::string const kBUILDSYSTEM_TARGETS = "BUILDSYSTEM_TARGETS"; static std::string const kSOURCE_DIR = "SOURCE_DIR"; static std::string const kSUBDIRECTORIES = "SUBDIRECTORIES"; -struct cmState::SnapshotDataType +struct cmStateDetail::SnapshotDataType { cmState::PositionType ScopeParent; cmState::PositionType DirectoryParent; diff --git a/Source/cmState.h b/Source/cmState.h index 24db08c..d733469 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -25,15 +25,16 @@ class cmPropertyDefinition; namespace cmStateDetail { struct BuildsystemDirectoryStateType; +struct SnapshotDataType; } class cmState { - struct SnapshotDataType; struct PolicyStackEntry; - typedef cmLinkedTree::iterator PositionType; + typedef cmLinkedTree::iterator PositionType; friend class Snapshot; friend struct cmStateDetail::BuildsystemDirectoryStateType; + friend struct cmStateDetail::SnapshotDataType; public: cmState(); @@ -341,7 +342,7 @@ private: cmLinkedTree ExecutionListFiles; cmLinkedTree PolicyStack; - cmLinkedTree SnapshotData; + cmLinkedTree SnapshotData; cmLinkedTree VarTree; std::string SourceDirectory; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1205f75e3bd9e5ff7051459cac4594ea7c3a9bf9 commit 1205f75e3bd9e5ff7051459cac4594ea7c3a9bf9 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:45 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 21:28:45 2016 +0200 cmState: Move nested struct into separate top-level namespace Add a friend declaration to give the struct access to cmState::PositionType. This will be removed when that type is also extracted. diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 0e73879..86d238a 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -35,7 +35,7 @@ struct cmState::SnapshotDataType cmState::SnapshotType SnapshotType; bool Keep; cmLinkedTree::iterator ExecutionListFile; - cmLinkedTree::iterator + cmLinkedTree::iterator BuildSystemDirectory; cmLinkedTree::iterator Vars; cmLinkedTree::iterator Root; @@ -66,7 +66,7 @@ struct cmState::PolicyStackEntry : public cmPolicies::PolicyMap bool Weak; }; -struct cmState::BuildsystemDirectoryStateType +struct cmStateDetail::BuildsystemDirectoryStateType { cmState::PositionType DirectoryEnd; @@ -313,7 +313,7 @@ cmState::Snapshot cmState::Reset() this->ExecutionListFiles.Truncate(); { - cmLinkedTree::iterator it = + cmLinkedTree::iterator it = this->BuildsystemDirectory.Truncate(); it->IncludeDirectories.clear(); it->IncludeDirectoryBacktraces.clear(); @@ -1119,7 +1119,7 @@ cmPolicies::PolicyStatus cmState::Snapshot::GetPolicy( return status; } - cmLinkedTree::iterator dir = + cmLinkedTree::iterator dir = this->Position->BuildSystemDirectory; while (true) { @@ -1366,7 +1366,7 @@ void cmState::Snapshot::InitializeFromParent_ForSubdirsCommand() } cmState::Directory::Directory( - cmLinkedTree::iterator iter, + cmLinkedTree::iterator iter, const cmState::Snapshot& snapshot) : DirectoryState(iter) , Snapshot_(snapshot) diff --git a/Source/cmState.h b/Source/cmState.h index feed1c7..24db08c 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -23,13 +23,17 @@ class cmCommand; class cmListFileBacktrace; class cmPropertyDefinition; +namespace cmStateDetail { +struct BuildsystemDirectoryStateType; +} + class cmState { struct SnapshotDataType; struct PolicyStackEntry; - struct BuildsystemDirectoryStateType; typedef cmLinkedTree::iterator PositionType; friend class Snapshot; + friend struct cmStateDetail::BuildsystemDirectoryStateType; public: cmState(); @@ -117,7 +121,8 @@ public: class Directory { - Directory(cmLinkedTree::iterator iter, + Directory(cmLinkedTree< + cmStateDetail::BuildsystemDirectoryStateType>::iterator iter, Snapshot const& snapshot); public: @@ -173,7 +178,8 @@ public: void ComputeRelativePathTopBinary(); private: - cmLinkedTree::iterator DirectoryState; + cmLinkedTree::iterator + DirectoryState; Snapshot Snapshot_; friend class Snapshot; }; @@ -329,7 +335,8 @@ private: cmPropertyMap GlobalProperties; cmCacheManager* CacheManager; - cmLinkedTree BuildsystemDirectory; + cmLinkedTree + BuildsystemDirectory; cmLinkedTree ExecutionListFiles; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=163991dd83cac6afa0f6dfeec41d885e8b880fc8 commit 163991dd83cac6afa0f6dfeec41d885e8b880fc8 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:45 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 21:28:45 2016 +0200 cmServerProtocol: Remove unused header diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index e0fcb75..a9a3ce2 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -2,7 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmServerProtocol.h" -#include "cmCacheManager.h" #include "cmExternalMakefileProjectGenerator.h" #include "cmFileMonitor.h" #include "cmGeneratorTarget.h" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51f89932c0adccdc28bc3cb6ccf0248a16d897a2 commit 51f89932c0adccdc28bc3cb6ccf0248a16d897a2 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:44 2016 +0200 Commit: Stephen Kelly CommitDate: Tue Oct 18 21:28:44 2016 +0200 cmCommandArgumentParserHelper: Remove unused header diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 2d66344..3df7689 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -6,7 +6,6 @@ #include "cmCommandArgumentLexer.h" #include "cmMakefile.h" -#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 5 + Source/CPack/cmCPackGenerator.cxx | 2 +- Source/CPack/cpack.cxx | 1 + Source/CTest/cmCTestLaunch.cxx | 2 +- Source/CTest/cmCTestScriptHandler.cxx | 3 +- Source/CTest/cmCTestSubmitHandler.cxx | 1 + Source/CTest/cmCTestTestHandler.cxx | 1 + Source/CursesDialog/cmCursesBoolWidget.cxx | 4 +- .../CursesDialog/cmCursesCacheEntryComposite.cxx | 11 +- Source/CursesDialog/cmCursesDummyWidget.cxx | 4 +- Source/CursesDialog/cmCursesFilePathWidget.cxx | 4 +- Source/CursesDialog/cmCursesMainForm.cxx | 32 +- Source/CursesDialog/cmCursesMainForm.h | 4 +- Source/CursesDialog/cmCursesOptionsWidget.cxx | 4 +- Source/CursesDialog/cmCursesPathWidget.cxx | 6 +- Source/CursesDialog/cmCursesStringWidget.cxx | 4 +- Source/CursesDialog/cmCursesWidget.h | 6 +- Source/QtDialog/QCMake.cxx | 26 +- Source/cmAddExecutableCommand.cxx | 6 +- Source/cmAddLibraryCommand.cxx | 64 +- Source/cmBuildCommand.cxx | 2 +- Source/cmBuildNameCommand.cxx | 4 +- Source/cmCMakePolicyCommand.cxx | 3 +- Source/cmCPluginAPI.cxx | 22 +- Source/cmCTest.cxx | 3 +- Source/cmCacheManager.cxx | 34 +- Source/cmCacheManager.h | 19 +- Source/cmCommonTargetGenerator.cxx | 5 +- Source/cmComputeLinkDepends.cxx | 6 +- Source/cmComputeLinkInformation.cxx | 46 +- Source/cmComputeTargetDepends.cxx | 21 +- Source/cmConditionEvaluator.cxx | 1 + Source/cmCoreTryCompile.cxx | 40 +- Source/cmCoreTryCompile.h | 2 +- Source/cmCustomCommandGenerator.cxx | 8 +- Source/cmDefinePropertyCommand.cxx | 1 + Source/cmDependsFortran.cxx | 1 + Source/cmExportBuildAndroidMKGenerator.cxx | 24 +- Source/cmExportBuildFileGenerator.cxx | 10 +- Source/cmExportCommand.cxx | 4 +- Source/cmExportFileGenerator.cxx | 20 +- Source/cmExportInstallAndroidMKGenerator.cxx | 2 +- Source/cmExportInstallFileGenerator.cxx | 8 +- Source/cmExportLibraryDependenciesCommand.cxx | 4 +- Source/cmExportTryCompileFileGenerator.cxx | 4 +- Source/cmExtraCodeBlocksGenerator.cxx | 44 +- Source/cmExtraCodeLiteGenerator.cxx | 34 +- Source/cmExtraEclipseCDT4Generator.cxx | 36 +- Source/cmExtraKateGenerator.cxx | 16 +- Source/cmExtraSublimeTextGenerator.cxx | 16 +- Source/cmFindBase.cxx | 3 +- Source/cmFindLibraryCommand.cxx | 7 +- Source/cmFindPackageCommand.cxx | 3 +- Source/cmFindPathCommand.cxx | 7 +- Source/cmFindProgramCommand.cxx | 6 +- Source/cmGeneratorExpressionNode.cxx | 20 +- Source/cmGeneratorTarget.cxx | 190 ++-- Source/cmGeneratorTarget.h | 6 +- Source/cmGetCMakePropertyCommand.cxx | 2 +- Source/cmGetFilenameComponentCommand.cxx | 12 +- Source/cmGetPropertyCommand.cxx | 1 + Source/cmGhsMultiTargetGenerator.cxx | 8 +- Source/cmGlobalBorlandMakefileGenerator.cxx | 1 + Source/cmGlobalGenerator.cxx | 55 +- Source/cmGlobalGenerator.h | 11 +- Source/cmGlobalJOMMakefileGenerator.cxx | 1 + Source/cmGlobalKdevelopGenerator.cxx | 4 +- Source/cmGlobalMSYSMakefileGenerator.cxx | 1 + Source/cmGlobalMinGWMakefileGenerator.cxx | 1 + Source/cmGlobalNMakeMakefileGenerator.cxx | 1 + Source/cmGlobalNinjaGenerator.cxx | 43 +- Source/cmGlobalNinjaGenerator.h | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 80 +- Source/cmGlobalUnixMakefileGenerator3.h | 6 +- Source/cmGlobalVisualStudio11Generator.cxx | 5 +- Source/cmGlobalVisualStudio11Generator.h | 2 +- Source/cmGlobalVisualStudio71Generator.cxx | 2 +- Source/cmGlobalVisualStudio71Generator.h | 2 +- Source/cmGlobalVisualStudio7Generator.cxx | 15 +- Source/cmGlobalVisualStudio7Generator.h | 2 +- Source/cmGlobalVisualStudio8Generator.cxx | 10 +- Source/cmGlobalVisualStudio8Generator.h | 4 +- Source/cmGlobalVisualStudioGenerator.cxx | 22 +- Source/cmGlobalWatcomWMakeGenerator.cxx | 1 + Source/cmGlobalXCodeGenerator.cxx | 139 +-- Source/cmGraphVizWriter.cxx | 18 +- Source/cmGraphVizWriter.h | 4 +- Source/cmIncludeExternalMSProjectCommand.cxx | 6 +- Source/cmInstallCommand.cxx | 26 +- Source/cmInstallTargetGenerator.cxx | 46 +- Source/cmLinkLineComputer.cxx | 6 +- Source/cmLinkLineComputer.h | 6 +- Source/cmListFileCache.cxx | 7 +- Source/cmListFileCache.h | 12 +- Source/cmLoadCacheCommand.cxx | 2 +- Source/cmLocalGenerator.cxx | 70 +- Source/cmLocalGenerator.h | 6 +- Source/cmLocalGhsMultiGenerator.cxx | 2 +- Source/cmLocalNinjaGenerator.cxx | 3 +- Source/cmLocalUnixMakefileGenerator3.cxx | 20 +- Source/cmLocalVisualStudio10Generator.cxx | 4 +- Source/cmLocalVisualStudio7Generator.cxx | 79 +- Source/cmLocalVisualStudioGenerator.cxx | 4 +- Source/cmMSVC60LinkLineComputer.cxx | 2 +- Source/cmMSVC60LinkLineComputer.h | 2 +- Source/cmMakefile.cxx | 76 +- Source/cmMakefile.h | 18 +- Source/cmMakefileExecutableTargetGenerator.cxx | 1 + Source/cmMakefileLibraryTargetGenerator.cxx | 35 +- Source/cmMakefileTargetGenerator.cxx | 31 +- Source/cmMakefileTargetGenerator.h | 2 +- Source/cmMarkAsAdvancedCommand.cxx | 2 +- Source/cmNinjaLinkLineComputer.cxx | 2 +- Source/cmNinjaLinkLineComputer.h | 2 +- Source/cmNinjaNormalTargetGenerator.cxx | 45 +- Source/cmNinjaTargetGenerator.cxx | 29 +- Source/cmNinjaUtilityTargetGenerator.cxx | 4 +- Source/cmOptionCommand.cxx | 4 +- Source/cmOutputConverter.cxx | 6 +- Source/cmOutputConverter.h | 8 +- Source/cmPolicies.cxx | 3 +- Source/cmProjectCommand.cxx | 6 +- Source/cmQtAutoGeneratorInitializer.cxx | 1 + Source/cmQtAutoGenerators.cxx | 4 +- Source/cmServerProtocol.cxx | 3 +- Source/cmSetCommand.cxx | 9 +- Source/cmSiteNameCommand.cxx | 3 +- Source/cmSourceFile.cxx | 1 + Source/cmState.cxx | 1127 ++------------------ Source/cmState.h | 234 +--- Source/cmStateDirectory.cxx | 518 +++++++++ Source/cmStateDirectory.h | 82 ++ Source/cmStatePrivate.h | 94 ++ Source/cmStateSnapshot.cxx | 415 +++++++ Source/cmStateSnapshot.h | 88 ++ Source/cmStateTypes.h | 55 + Source/cmTarget.cxx | 96 +- Source/cmTarget.h | 10 +- Source/cmTargetLinkLibrariesCommand.cxx | 16 +- Source/cmTargetPropCommandBase.cxx | 14 +- Source/cmTargetPropertyComputer.cxx | 4 +- Source/cmTargetPropertyComputer.h | 13 +- Source/cmTest.cxx | 1 + Source/cmTestGenerator.cxx | 4 +- Source/cmTryRunCommand.cxx | 11 +- Source/cmUtilitySourceCommand.cxx | 6 +- Source/cmVisualStudio10TargetGenerator.cxx | 106 +- Source/cmake.cxx | 56 +- Source/cmake.h | 13 +- Source/cmakemain.cxx | 6 +- Source/cmcmd.cxx | 4 +- bootstrap | 2 + 152 files changed, 2551 insertions(+), 2349 deletions(-) create mode 100644 Source/cmStateDirectory.cxx create mode 100644 Source/cmStateDirectory.h create mode 100644 Source/cmStatePrivate.h create mode 100644 Source/cmStateSnapshot.cxx create mode 100644 Source/cmStateSnapshot.h create mode 100644 Source/cmStateTypes.h hooks/post-receive -- CMake From steveire at gmail.com Wed Oct 19 09:40:45 2016 From: steveire at gmail.com (Stephen Kelly) Date: Wed, 19 Oct 2016 09:40:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-644-g50eb6cf Message-ID: <20161019134046.019F8F6229@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 50eb6cf42322dafb0b9f53ac02f956e69a4be188 (commit) via bd4f7bd88af4dd062f953b8f102e55aca098edc1 (commit) from db659b69cddd639e4c44bdb4e4d53a06e424fc8b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=50eb6cf42322dafb0b9f53ac02f956e69a4be188 commit 50eb6cf42322dafb0b9f53ac02f956e69a4be188 Merge: db659b6 bd4f7bd Author: Stephen Kelly AuthorDate: Wed Oct 19 09:40:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 09:40:45 2016 -0400 Merge topic 'split-cmState' into next bd4f7bd8 Fix style https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd4f7bd88af4dd062f953b8f102e55aca098edc1 commit bd4f7bd88af4dd062f953b8f102e55aca098edc1 Author: Stephen Kelly AuthorDate: Wed Oct 19 15:39:12 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:17 2016 +0200 Fix style diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx index 0839439..36d1940 100644 --- a/Source/cmTargetPropertyComputer.cxx +++ b/Source/cmTargetPropertyComputer.cxx @@ -83,8 +83,8 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( } bool cmTargetPropertyComputer::PassesWhitelist( - cmStateEnums::TargetType tgtType, std::string const& prop, cmMessenger* messenger, - cmListFileBacktrace const& context) + cmStateEnums::TargetType tgtType, std::string const& prop, + cmMessenger* messenger, cmListFileBacktrace const& context) { if (tgtType == cmStateEnums::INTERFACE_LIBRARY && !WhiteListedInterfaceProperty(prop)) { ----------------------------------------------------------------------- Summary of changes: Source/cmTargetPropertyComputer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Wed Oct 19 09:41:22 2016 From: steveire at gmail.com (Stephen Kelly) Date: Wed, 19 Oct 2016 09:41:22 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-657-geb5c141 Message-ID: <20161019134122.6ABA6F63F6@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 eb5c141897404324d13c7cf568f9c92e80cb4609 (commit) via c3dd900c57b891066529c66675e042c7dc611c13 (commit) via e48bbaf7bb46d7bfaaae9e645e0ef854d9016d6c (commit) via 4e8a9caf166117cffa1fe0d8b5715d3449125369 (commit) via a91eaf387287a201d421e90d78bcae8836cc6042 (commit) via 27be1d815298ebf343823ff99baa35484da92a85 (commit) via 34433c88e259493a22c59558e1ee052251f2c149 (commit) via cde6eb6249cd3211cb3391860221ec32f985e53b (commit) via a9bf981a4c0ee3aece0b162ba7ebc76ad99330eb (commit) via 17d27893e6fdc70a39a35cad468f332f968e44e7 (commit) via 34bcec39c68b82148635cec94a2f7d49d40edf75 (commit) via 2fe3e55d53989c909be595b00a4749b75886accf (commit) via a49751fb2eed0ca6415b243c35b23201b8060597 (commit) from 50eb6cf42322dafb0b9f53ac02f956e69a4be188 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb5c141897404324d13c7cf568f9c92e80cb4609 commit eb5c141897404324d13c7cf568f9c92e80cb4609 Merge: 50eb6cf c3dd900 Author: Stephen Kelly AuthorDate: Wed Oct 19 09:41:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 09:41:16 2016 -0400 Merge topic 'split-cmState' into next c3dd900c cmListFileCache: Remove cmState header include e48bbaf7 cmTargetPropertyComputer: Add missing include 4e8a9caf cmState: Split auxiliary classes into separate files a91eaf38 cmState: Port dependents to new cmStateTypes header 27be1d81 cmState: Move extracted declarations to a separate file 34433c88 cmState: Remove compatibility typedefs cde6eb62 cmState: Port dependent code to new cmStateSnapshot name a9bf981a cmState: Move Snapshot type to separate namespace 17d27893 cmState: Port dependent code to new cmStateDirectory name 34bcec39 cmState: Move Directory class to separate namespace 2fe3e55d cmState: Move CacheEntryType enum to separate namespace a49751fb cmState: Move TargetType enum to separate namespace https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3dd900c57b891066529c66675e042c7dc611c13 commit c3dd900c57b891066529c66675e042c7dc611c13 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:49 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:41:00 2016 +0200 cmListFileCache: Remove cmState header include Include it in dependents which have previously relied on it transitively. diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index e3adf6b..c305cbf 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -9,6 +9,7 @@ #include "cmDocumentationEntry.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTypeMacro.h" diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index fa816a6..7ee0f75 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -21,6 +21,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index a114755..d21471d 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -7,6 +7,7 @@ #include "cmCTestScriptHandler.h" #include "cmCurl.h" #include "cmGeneratedFileStream.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLParser.h" diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 09efafb..4e6f1e9 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -9,6 +9,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 5d29942..5539fbe 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -9,6 +9,7 @@ #include "cmCursesPathWidget.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index e8e70df..ebd35f3 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -11,6 +11,7 @@ #include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 3cde147..0777ef0 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddLibraryCommand.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index 36ffd7c..67581b6 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakePolicyCommand.h" +#include "cmState.h" #include "cmVersion.h" // cmCMakePolicyCommand diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 502a709..024260c 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -20,6 +20,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 3df7689..2d66344 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -6,6 +6,7 @@ #include "cmCommandArgumentLexer.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 16bbadb..28aa533 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -11,6 +11,7 @@ #include "cmOrderDirectories.h" #include "cmOutputConverter.h" #include "cmPolicies.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 70ed31e..cfebda2 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -10,6 +10,7 @@ #include "cmMakefile.h" #include "cmPolicies.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 420a777..4c0b649 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -4,6 +4,7 @@ #include "cmAlgorithms.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmSystemTools.h" static std::string const keyAND = "AND"; diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index e4a97a1..c7b6d58 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -6,6 +6,7 @@ #include "cmExportTryCompileFileGenerator.h" #include "cmGlobalGenerator.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmake.h" #include diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx index 99db478..af4eff9 100644 --- a/Source/cmDefinePropertyCommand.cxx +++ b/Source/cmDefinePropertyCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDefinePropertyCommand.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index d20e386..c4e86a9 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -11,6 +11,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceGroup.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 66433f9..ff822b8 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -3,6 +3,7 @@ #include "cmFindBase.h" #include "cmAlgorithms.h" +#include "cmState.h" #include "cmStateTypes.h" cmFindBase::cmFindBase() diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 2909209..5d8aaa2 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindLibraryCommand.h" +#include "cmState.h" #include cmFindLibraryCommand::cmFindLibraryCommand() diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 5723999..029d422 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -3,6 +3,7 @@ #include "cmFindPackageCommand.h" #include "cmAlgorithms.h" +#include "cmState.h" #include #include #include diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8324c30..7dae226 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -15,6 +15,7 @@ #include "cmPropertyMap.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index c44445a..da648d9 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -5,6 +5,7 @@ #include "cmGlobalGenerator.h" #include "cmPropertyDefinition.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmTargetPropertyComputer.h" #include "cmTest.h" diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx index 5a2150d..a0a33ea 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.cxx +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmake.h" cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator(cmake* cm) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index fd3734b..b4ede1d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -28,6 +28,7 @@ #include "cmPolicies.h" #include "cmQtAutoGeneratorInitializer.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index a846773..6d85861 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -3,6 +3,7 @@ #include "cmGlobalJOMMakefileGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" +#include "cmState.h" #include "cmMakefile.h" cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator(cmake* cm) diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index 6d314d6..f17b915 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmake.h" #include diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index d5decfb..4a14df9 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -3,6 +3,7 @@ #include "cmGlobalMinGWMakefileGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" +#include "cmState.h" #include "cmMakefile.h" cmGlobalMinGWMakefileGenerator::cmGlobalMinGWMakefileGenerator(cmake* cm) diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index 48798fb..92af8a9 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalNMakeMakefileGenerator.h" +#include "cmState.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 635d07e..51cb315 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -8,6 +8,7 @@ #include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmUuid.h" #include "cmake.h" #include diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 45f7913..d6209db 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -9,6 +9,7 @@ #include "cmGeneratorTarget.h" #include "cmLocalVisualStudioGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmSourceFile.h" #include "cmTarget.h" #include diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index f97bb75..0900797 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -4,6 +4,7 @@ #include "cmDocumentationEntry.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index c8744d4..b1cd889 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -5,6 +5,7 @@ #include "cmListFileLexer.h" #include "cmMessenger.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 9af00b2..1a30f29 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -9,7 +9,6 @@ #include #include -#include "cmState.h" #include "cmStateSnapshot.h" /** \class cmListFileCache diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 8789530..cd9af54 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -12,6 +12,7 @@ #include "cmNinjaTargetGenerator.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 7eca0a8..cbbd2e6 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index cfe1e83..a249efd 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 4a8924f..68c166e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -20,6 +20,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index d5d3e90..3b71e34 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -17,6 +17,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 76fe047..514fbeb 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -16,6 +16,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 41bee8b..6339e11 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -2,6 +2,7 @@ #include "cmAlgorithms.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index b04c7ca..f0373a1 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -12,6 +12,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index ba24ff2..6f29b18 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -6,6 +6,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmProperty.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 2527366..e2ee3a5 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -13,6 +13,7 @@ #include "cmProperty.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmTargetPropertyComputer.h" #include "cmake.h" diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx index f55dc83..1c36dc6 100644 --- a/Source/cmTest.cxx +++ b/Source/cmTest.cxx @@ -4,6 +4,7 @@ #include "cmMakefile.h" #include "cmProperty.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 8f25cbb..c816114 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUtilitySourceCommand.h" +#include "cmState.h" + // cmUtilitySourceCommand bool cmUtilitySourceCommand::InitialPass(std::vector const& args, cmExecutionStatus&) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e48bbaf7bb46d7bfaaae9e645e0ef854d9016d6c commit e48bbaf7bb46d7bfaaae9e645e0ef854d9016d6c Author: Stephen Kelly AuthorDate: Tue Oct 18 22:16:11 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:59 2016 +0200 cmTargetPropertyComputer: Add missing include diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index f8b683a..817e8c2 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -7,6 +7,7 @@ #include "cmListFileCache.h" #include "cmSystemTools.h" +#include "cmAlgorithms.h" #include #include https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e8a9caf166117cffa1fe0d8b5715d3449125369 commit 4e8a9caf166117cffa1fe0d8b5715d3449125369 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:49 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:59 2016 +0200 cmState: Split auxiliary classes into separate files Port dependents to the new locations as needed. Leave behind a cmState.h include in cmListFileCache to reduce noise. It is removed in a following commit. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 3124f81..2b8c17c 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -360,6 +360,10 @@ set(SRCS cmSourceGroup.h cmState.cxx cmState.h + cmStateDirectory.cxx + cmStateDirectory.h + cmStateSnapshot.cxx + cmStateSnapshot.h cmStateTypes.h cmSystemTools.cxx cmSystemTools.h diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 4d900b6..95b95c1 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -17,6 +17,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt) diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index aaa9d3a..c8723d0 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -7,6 +7,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 959fe32..9cc6724 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -6,7 +6,8 @@ #include #include "cmExportSetMap.h" -#include "cmState.h" +#include "cmStateDirectory.h" +#include "cmStateSnapshot.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 3433d75..17d49e8 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -12,6 +12,8 @@ #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index f6d5e70..c271246 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -5,6 +5,7 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" #include "cmOutputConverter.h" +#include "cmStateDirectory.h" cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, cmStateDirectory stateDir) diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index 59e7357..6bbb69e 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -4,7 +4,7 @@ #ifndef cmLinkLineComputer_h #define cmLinkLineComputer_h -#include "cmState.h" +#include "cmStateDirectory.h" class cmComputeLinkInformation; class cmOutputConverter; diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 83aac51..9af00b2 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -10,6 +10,7 @@ #include #include "cmState.h" +#include "cmStateSnapshot.h" /** \class cmListFileCache * \brief A class to cache list file contents. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index d90094b..4aecb1d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -16,6 +16,8 @@ #include "cmMakefile.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTestGenerator.h" diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index eda604d..4f81ef1 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -16,6 +16,8 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 28912c3..00c0e82 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -17,6 +17,8 @@ #include "cmListFileCache.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTest.h" diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 8ac0e33..b61e81b 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -9,7 +9,7 @@ #include "cmListFileCache.h" #include "cmNewLineStyle.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateSnapshot.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" #include "cmake.h" diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index c219fdf..445ad0b 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -3,6 +3,8 @@ #include "cmOutputConverter.h" #include "cmAlgorithms.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 2a81dab..dabb091 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -5,7 +5,7 @@ #include // IWYU pragma: keep -#include "cmState.h" +#include "cmStateSnapshot.h" #include #include diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index dca0f69..f56f575 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -7,6 +7,8 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 32fe66c..0d1eb3e 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmState.h" +#include "cmStatePrivate.h" + #include "cmAlgorithms.h" #include "cmCacheManager.h" #include "cmCommand.h" @@ -9,7 +11,6 @@ #include "cmListFileCache.h" #include "cmSystemTools.h" #include "cmTypeMacro.h" -#include "cmVersion.h" #include "cmake.h" #include @@ -20,85 +21,6 @@ #include #include -static std::string const kBINARY_DIR = "BINARY_DIR"; -static std::string const kBUILDSYSTEM_TARGETS = "BUILDSYSTEM_TARGETS"; -static std::string const kSOURCE_DIR = "SOURCE_DIR"; -static std::string const kSUBDIRECTORIES = "SUBDIRECTORIES"; - -struct cmStateDetail::SnapshotDataType -{ - cmStateDetail::PositionType ScopeParent; - cmStateDetail::PositionType DirectoryParent; - cmLinkedTree::iterator Policies; - cmLinkedTree::iterator PolicyRoot; - cmLinkedTree::iterator PolicyScope; - cmStateEnums::SnapshotType SnapshotType; - bool Keep; - cmLinkedTree::iterator ExecutionListFile; - cmLinkedTree::iterator - BuildSystemDirectory; - cmLinkedTree::iterator Vars; - cmLinkedTree::iterator Root; - cmLinkedTree::iterator Parent; - std::vector::size_type IncludeDirectoryPosition; - std::vector::size_type CompileDefinitionsPosition; - std::vector::size_type CompileOptionsPosition; -}; - -struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap -{ - typedef cmPolicies::PolicyMap derived; - PolicyStackEntry(bool w = false) - : derived() - , Weak(w) - { - } - PolicyStackEntry(derived const& d, bool w) - : derived(d) - , Weak(w) - { - } - PolicyStackEntry(PolicyStackEntry const& r) - : derived(r) - , Weak(r.Weak) - { - } - bool Weak; -}; - -struct cmStateDetail::BuildsystemDirectoryStateType -{ - cmStateDetail::PositionType DirectoryEnd; - - std::string Location; - std::string OutputLocation; - - // The top-most directories for relative path conversion. Both the - // source and destination location of a relative path conversion - // must be underneath one of these directories (both under source or - // both under binary) in order for the relative path to be evaluated - // safely by the build tools. - std::string RelativePathTopSource; - std::string RelativePathTopBinary; - - std::vector IncludeDirectories; - std::vector IncludeDirectoryBacktraces; - - std::vector CompileDefinitions; - std::vector CompileDefinitionsBacktraces; - - std::vector CompileOptions; - std::vector CompileOptionsBacktraces; - - std::vector NormalTargetNames; - - std::string ProjectName; - - cmPropertyMap Properties; - - std::vector Children; -}; - cmState::cmState() : IsInTryCompile(false) , WindowsShell(false) @@ -676,70 +598,6 @@ const char* cmState::GetBinaryDirectory() const return this->BinaryDirectory.c_str(); } -void cmStateDirectory::ComputeRelativePathTopSource() -{ - // Relative path conversion inside the source tree is not used to - // construct relative paths passed to build tools so it is safe to use - // even when the source is a network path. - - cmStateSnapshot snapshot = this->Snapshot_; - std::vector snapshots; - snapshots.push_back(snapshot); - while (true) { - snapshot = snapshot.GetBuildsystemDirectoryParent(); - if (snapshot.IsValid()) { - snapshots.push_back(snapshot); - } else { - break; - } - } - - std::string result = snapshots.front().GetDirectory().GetCurrentSource(); - - for (std::vector::const_iterator it = snapshots.begin() + 1; - it != snapshots.end(); ++it) { - std::string currentSource = it->GetDirectory().GetCurrentSource(); - if (cmSystemTools::IsSubDirectory(result, currentSource)) { - result = currentSource; - } - } - this->DirectoryState->RelativePathTopSource = result; -} - -void cmStateDirectory::ComputeRelativePathTopBinary() -{ - cmStateSnapshot snapshot = this->Snapshot_; - std::vector snapshots; - snapshots.push_back(snapshot); - while (true) { - snapshot = snapshot.GetBuildsystemDirectoryParent(); - if (snapshot.IsValid()) { - snapshots.push_back(snapshot); - } else { - break; - } - } - - std::string result = snapshots.front().GetDirectory().GetCurrentBinary(); - - for (std::vector::const_iterator it = snapshots.begin() + 1; - it != snapshots.end(); ++it) { - std::string currentBinary = it->GetDirectory().GetCurrentBinary(); - if (cmSystemTools::IsSubDirectory(result, currentBinary)) { - result = currentBinary; - } - } - - // The current working directory on Windows cannot be a network - // path. Therefore relative paths cannot work when the binary tree - // is a network path. - if (result.size() < 2 || result.substr(0, 2) != "//") { - this->DirectoryState->RelativePathTopBinary = result; - } else { - this->DirectoryState->RelativePathTopBinary = ""; - } -} - cmStateSnapshot cmState::CreateBaseSnapshot() { cmStateDetail::PositionType pos = @@ -923,854 +781,6 @@ cmStateSnapshot cmState::Pop(cmStateSnapshot originSnapshot) return cmStateSnapshot(this, prevPos); } -cmStateSnapshot::cmStateSnapshot(cmState* state) - : State(state) - , Position() -{ -} - -std::vector cmStateSnapshot::GetChildren() -{ - return this->Position->BuildSystemDirectory->Children; -} - -cmStateSnapshot::cmStateSnapshot(cmState* state, - cmStateDetail::PositionType position) - : State(state) - , Position(position) -{ -} - -cmStateEnums::SnapshotType cmStateSnapshot::GetType() const -{ - return this->Position->SnapshotType; -} - -const char* cmStateDirectory::GetCurrentSource() const -{ - return this->DirectoryState->Location.c_str(); -} - -void cmStateDirectory::SetCurrentSource(std::string const& dir) -{ - std::string& loc = this->DirectoryState->Location; - loc = dir; - cmSystemTools::ConvertToUnixSlashes(loc); - loc = cmSystemTools::CollapseFullPath(loc); - - this->ComputeRelativePathTopSource(); - - this->Snapshot_.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", loc); -} - -const char* cmStateDirectory::GetCurrentBinary() const -{ - return this->DirectoryState->OutputLocation.c_str(); -} - -void cmStateDirectory::SetCurrentBinary(std::string const& dir) -{ - std::string& loc = this->DirectoryState->OutputLocation; - loc = dir; - cmSystemTools::ConvertToUnixSlashes(loc); - loc = cmSystemTools::CollapseFullPath(loc); - - this->ComputeRelativePathTopBinary(); - - this->Snapshot_.SetDefinition("CMAKE_CURRENT_BINARY_DIR", loc); -} - -void cmStateSnapshot::SetListFile(const std::string& listfile) -{ - *this->Position->ExecutionListFile = listfile; -} - -const char* cmStateDirectory::GetRelativePathTopSource() const -{ - return this->DirectoryState->RelativePathTopSource.c_str(); -} - -const char* cmStateDirectory::GetRelativePathTopBinary() const -{ - return this->DirectoryState->RelativePathTopBinary.c_str(); -} - -void cmStateDirectory::SetRelativePathTopSource(const char* dir) -{ - this->DirectoryState->RelativePathTopSource = dir; -} - -void cmStateDirectory::SetRelativePathTopBinary(const char* dir) -{ - this->DirectoryState->RelativePathTopBinary = dir; -} - -std::string cmStateSnapshot::GetExecutionListFile() const -{ - return *this->Position->ExecutionListFile; -} - -bool cmStateSnapshot::IsValid() const -{ - return this->State && this->Position.IsValid() - ? this->Position != this->State->SnapshotData.Root() - : false; -} - -cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const -{ - cmStateSnapshot snapshot; - if (!this->State || this->Position == this->State->SnapshotData.Root()) { - return snapshot; - } - cmStateDetail::PositionType parentPos = this->Position->DirectoryParent; - if (parentPos != this->State->SnapshotData.Root()) { - snapshot = cmStateSnapshot(this->State, - parentPos->BuildSystemDirectory->DirectoryEnd); - } - - return snapshot; -} - -cmStateSnapshot cmStateSnapshot::GetCallStackParent() const -{ - assert(this->State); - assert(this->Position != this->State->SnapshotData.Root()); - - cmStateSnapshot snapshot; - cmStateDetail::PositionType parentPos = this->Position; - while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || - parentPos->SnapshotType == cmStateEnums::VariableScopeType) { - ++parentPos; - } - if (parentPos->SnapshotType == cmStateEnums::BuildsystemDirectoryType || - parentPos->SnapshotType == cmStateEnums::BaseType) { - return snapshot; - } - - ++parentPos; - while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || - parentPos->SnapshotType == cmStateEnums::VariableScopeType) { - ++parentPos; - } - - if (parentPos == this->State->SnapshotData.Root()) { - return snapshot; - } - - snapshot = cmStateSnapshot(this->State, parentPos); - return snapshot; -} - -cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const -{ - assert(this->State); - assert(this->Position != this->State->SnapshotData.Root()); - - cmStateDetail::PositionType pos = this->Position; - while (pos->SnapshotType != cmStateEnums::BaseType && - pos->SnapshotType != cmStateEnums::BuildsystemDirectoryType && - pos != this->State->SnapshotData.Root()) { - ++pos; - } - return cmStateSnapshot(this->State, pos); -} - -void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) -{ - cmStateDetail::PositionType pos = this->Position; - pos->Policies = this->State->PolicyStack.Push( - pos->Policies, cmStateDetail::PolicyStackEntry(entry, weak)); -} - -bool cmStateSnapshot::PopPolicy() -{ - cmStateDetail::PositionType pos = this->Position; - if (pos->Policies == pos->PolicyScope) { - return false; - } - pos->Policies = this->State->PolicyStack.Pop(pos->Policies); - return true; -} - -bool cmStateSnapshot::CanPopPolicyScope() -{ - return this->Position->Policies == this->Position->PolicyScope; -} - -void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id, - cmPolicies::PolicyStatus status) -{ - // Update the policy stack from the top to the top-most strong entry. - bool previous_was_weak = true; - for (cmLinkedTree::iterator psi = - this->Position->Policies; - previous_was_weak && psi != this->Position->PolicyRoot; ++psi) { - psi->Set(id, status); - previous_was_weak = psi->Weak; - } -} - -cmPolicies::PolicyStatus cmStateSnapshot::GetPolicy( - cmPolicies::PolicyID id) const -{ - cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id); - - if (status == cmPolicies::REQUIRED_ALWAYS || - status == cmPolicies::REQUIRED_IF_USED) { - return status; - } - - cmLinkedTree::iterator dir = - this->Position->BuildSystemDirectory; - - while (true) { - assert(dir.IsValid()); - cmLinkedTree::iterator leaf = - dir->DirectoryEnd->Policies; - cmLinkedTree::iterator root = - dir->DirectoryEnd->PolicyRoot; - for (; leaf != root; ++leaf) { - if (leaf->IsDefined(id)) { - status = leaf->Get(id); - return status; - } - } - cmStateDetail::PositionType e = dir->DirectoryEnd; - cmStateDetail::PositionType p = e->DirectoryParent; - if (p == this->State->SnapshotData.Root()) { - break; - } - dir = p->BuildSystemDirectory; - } - return status; -} - -bool cmStateSnapshot::HasDefinedPolicyCMP0011() -{ - return !this->Position->Policies->IsEmpty(); -} - -const char* cmStateSnapshot::GetDefinition(std::string const& name) const -{ - assert(this->Position->Vars.IsValid()); - return cmDefinitions::Get(name, this->Position->Vars, this->Position->Root); -} - -bool cmStateSnapshot::IsInitialized(std::string const& name) const -{ - return cmDefinitions::HasKey(name, this->Position->Vars, - this->Position->Root); -} - -void cmStateSnapshot::SetDefinition(std::string const& name, - std::string const& value) -{ - this->Position->Vars->Set(name, value.c_str()); -} - -void cmStateSnapshot::RemoveDefinition(std::string const& name) -{ - this->Position->Vars->Set(name, CM_NULLPTR); -} - -std::vector cmStateSnapshot::UnusedKeys() const -{ - return this->Position->Vars->UnusedKeys(); -} - -std::vector cmStateSnapshot::ClosureKeys() const -{ - return cmDefinitions::ClosureKeys(this->Position->Vars, - this->Position->Root); -} - -bool cmStateSnapshot::RaiseScope(std::string const& var, const char* varDef) -{ - if (this->Position->ScopeParent == this->Position->DirectoryParent) { - cmStateSnapshot parentDir = this->GetBuildsystemDirectoryParent(); - if (!parentDir.IsValid()) { - return false; - } - // Update the definition in the parent directory top scope. This - // directory's scope was initialized by the closure of the parent - // scope, so we do not need to localize the definition first. - if (varDef) { - parentDir.SetDefinition(var, varDef); - } else { - parentDir.RemoveDefinition(var); - } - return true; - } - // First localize the definition in the current scope. - cmDefinitions::Raise(var, this->Position->Vars, this->Position->Root); - - // Now update the definition in the parent scope. - this->Position->Parent->Set(var, varDef); - return true; -} - -static const std::string cmPropertySentinal = std::string(); - -template -void InitializeContentFromParent(T& parentContent, T& thisContent, - U& parentBacktraces, U& thisBacktraces, - V& contentEndPosition) -{ - std::vector::const_iterator parentBegin = parentContent.begin(); - std::vector::const_iterator parentEnd = parentContent.end(); - - std::vector::const_reverse_iterator parentRbegin = - cmMakeReverseIterator(parentEnd); - std::vector::const_reverse_iterator parentRend = - parentContent.rend(); - parentRbegin = std::find(parentRbegin, parentRend, cmPropertySentinal); - std::vector::const_iterator parentIt = parentRbegin.base(); - - thisContent = std::vector(parentIt, parentEnd); - - std::vector::const_iterator btIt = - parentBacktraces.begin() + std::distance(parentBegin, parentIt); - std::vector::const_iterator btEnd = - parentBacktraces.end(); - - thisBacktraces = std::vector(btIt, btEnd); - - contentEndPosition = thisContent.size(); -} - -void cmStateSnapshot::SetDefaultDefinitions() -{ -/* Up to CMake 2.4 here only WIN32, UNIX and APPLE were set. - With CMake must separate between target and host platform. In most cases - the tests for WIN32, UNIX and APPLE will be for the target system, so an - additional set of variables for the host system is required -> - CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE. - WIN32, UNIX and APPLE are now set in the platform files in - Modules/Platforms/. - To keep cmake scripts (-P) and custom language and compiler modules - working, these variables are still also set here in this place, but they - will be reset in CMakeSystemSpecificInformation.cmake before the platform - files are executed. */ -#if defined(_WIN32) - this->SetDefinition("WIN32", "1"); - this->SetDefinition("CMAKE_HOST_WIN32", "1"); -#else - this->SetDefinition("UNIX", "1"); - this->SetDefinition("CMAKE_HOST_UNIX", "1"); -#endif -#if defined(__CYGWIN__) - std::string legacy; - if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) && - cmSystemTools::IsOn(legacy.c_str())) { - this->SetDefinition("WIN32", "1"); - this->SetDefinition("CMAKE_HOST_WIN32", "1"); - } -#endif -#if defined(__APPLE__) - this->SetDefinition("APPLE", "1"); - this->SetDefinition("CMAKE_HOST_APPLE", "1"); -#endif -#if defined(__sun__) - this->SetDefinition("CMAKE_HOST_SOLARIS", "1"); -#endif - - char temp[1024]; - sprintf(temp, "%d", cmVersion::GetMinorVersion()); - this->SetDefinition("CMAKE_MINOR_VERSION", temp); - sprintf(temp, "%d", cmVersion::GetMajorVersion()); - this->SetDefinition("CMAKE_MAJOR_VERSION", temp); - sprintf(temp, "%d", cmVersion::GetPatchVersion()); - this->SetDefinition("CMAKE_PATCH_VERSION", temp); - sprintf(temp, "%d", cmVersion::GetTweakVersion()); - this->SetDefinition("CMAKE_TWEAK_VERSION", temp); - this->SetDefinition("CMAKE_VERSION", cmVersion::GetCMakeVersion()); - - this->SetDefinition("CMAKE_FILES_DIRECTORY", - cmake::GetCMakeFilesDirectory()); - - // Setup the default include file regular expression (match everything). - this->Position->BuildSystemDirectory->Properties.SetProperty( - "INCLUDE_REGULAR_EXPRESSION", "^.*$"); -} - -void cmStateSnapshot::SetDirectoryDefinitions() -{ - this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); - this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", - this->State->GetSourceDirectory()); - this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); - this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", - this->State->GetBinaryDirectory()); -} - -void cmStateSnapshot::InitializeFromParent() -{ - cmStateDetail::PositionType parent = this->Position->DirectoryParent; - assert(this->Position->Vars.IsValid()); - assert(parent->Vars.IsValid()); - - *this->Position->Vars = - cmDefinitions::MakeClosure(parent->Vars, parent->Root); - - InitializeContentFromParent( - parent->BuildSystemDirectory->IncludeDirectories, - this->Position->BuildSystemDirectory->IncludeDirectories, - parent->BuildSystemDirectory->IncludeDirectoryBacktraces, - this->Position->BuildSystemDirectory->IncludeDirectoryBacktraces, - this->Position->IncludeDirectoryPosition); - - InitializeContentFromParent( - parent->BuildSystemDirectory->CompileDefinitions, - this->Position->BuildSystemDirectory->CompileDefinitions, - parent->BuildSystemDirectory->CompileDefinitionsBacktraces, - this->Position->BuildSystemDirectory->CompileDefinitionsBacktraces, - this->Position->CompileDefinitionsPosition); - - InitializeContentFromParent( - parent->BuildSystemDirectory->CompileOptions, - this->Position->BuildSystemDirectory->CompileOptions, - parent->BuildSystemDirectory->CompileOptionsBacktraces, - this->Position->BuildSystemDirectory->CompileOptionsBacktraces, - this->Position->CompileOptionsPosition); -} - -cmState* cmStateSnapshot::GetState() const -{ - return this->State; -} - -cmStateDirectory cmStateSnapshot::GetDirectory() const -{ - return cmStateDirectory(this->Position->BuildSystemDirectory, *this); -} - -void cmStateSnapshot::SetProjectName(const std::string& name) -{ - this->Position->BuildSystemDirectory->ProjectName = name; -} - -std::string cmStateSnapshot::GetProjectName() const -{ - return this->Position->BuildSystemDirectory->ProjectName; -} - -void cmStateSnapshot::InitializeFromParent_ForSubdirsCommand() -{ - std::string currentSrcDir = this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR"); - std::string currentBinDir = this->GetDefinition("CMAKE_CURRENT_BINARY_DIR"); - this->InitializeFromParent(); - this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); - this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); - - this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", currentSrcDir); - this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", currentBinDir); -} - -cmStateDirectory::cmStateDirectory( - cmLinkedTree::iterator iter, - const cmStateSnapshot& snapshot) - : DirectoryState(iter) - , Snapshot_(snapshot) -{ -} - -template -cmStringRange GetPropertyContent(T const& content, U contentEndPosition) -{ - std::vector::const_iterator end = - content.begin() + contentEndPosition; - - std::vector::const_reverse_iterator rbegin = - cmMakeReverseIterator(end); - rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); - - return cmMakeRange(rbegin.base(), end); -} - -template -cmBacktraceRange GetPropertyBacktraces(T const& content, U const& backtraces, - V contentEndPosition) -{ - std::vector::const_iterator entryEnd = - content.begin() + contentEndPosition; - - std::vector::const_reverse_iterator rbegin = - cmMakeReverseIterator(entryEnd); - rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); - - std::vector::const_iterator it = - backtraces.begin() + std::distance(content.begin(), rbegin.base()); - - std::vector::const_iterator end = backtraces.end(); - return cmMakeRange(it, end); -} - -template -void AppendEntry(T& content, U& backtraces, V& endContentPosition, - const std::string& value, const cmListFileBacktrace& lfbt) -{ - if (value.empty()) { - return; - } - - assert(endContentPosition == content.size()); - - content.push_back(value); - backtraces.push_back(lfbt); - - endContentPosition = content.size(); -} - -template -void SetContent(T& content, U& backtraces, V& endContentPosition, - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - assert(endContentPosition == content.size()); - - content.resize(content.size() + 2); - backtraces.resize(backtraces.size() + 2); - - content.back() = vec; - backtraces.back() = lfbt; - - endContentPosition = content.size(); -} - -template -void ClearContent(T& content, U& backtraces, V& endContentPosition) -{ - assert(endContentPosition == content.size()); - - content.resize(content.size() + 1); - backtraces.resize(backtraces.size() + 1); - - endContentPosition = content.size(); -} - -cmStringRange cmStateDirectory::GetIncludeDirectoriesEntries() const -{ - return GetPropertyContent( - this->DirectoryState->IncludeDirectories, - this->Snapshot_.Position->IncludeDirectoryPosition); -} - -cmBacktraceRange cmStateDirectory::GetIncludeDirectoriesEntryBacktraces() const -{ - return GetPropertyBacktraces( - this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition); -} - -void cmStateDirectory::AppendIncludeDirectoriesEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - AppendEntry(this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); -} - -void cmStateDirectory::PrependIncludeDirectoriesEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - std::vector::iterator entryEnd = - this->DirectoryState->IncludeDirectories.begin() + - this->Snapshot_.Position->IncludeDirectoryPosition; - - std::vector::reverse_iterator rend = - this->DirectoryState->IncludeDirectories.rend(); - std::vector::reverse_iterator rbegin = - cmMakeReverseIterator(entryEnd); - rbegin = std::find(rbegin, rend, cmPropertySentinal); - - std::vector::iterator entryIt = rbegin.base(); - std::vector::iterator entryBegin = - this->DirectoryState->IncludeDirectories.begin(); - - std::vector::iterator btIt = - this->DirectoryState->IncludeDirectoryBacktraces.begin() + - std::distance(entryBegin, entryIt); - - this->DirectoryState->IncludeDirectories.insert(entryIt, vec); - this->DirectoryState->IncludeDirectoryBacktraces.insert(btIt, lfbt); - - this->Snapshot_.Position->IncludeDirectoryPosition = - this->DirectoryState->IncludeDirectories.size(); -} - -void cmStateDirectory::SetIncludeDirectories(const std::string& vec, - const cmListFileBacktrace& lfbt) -{ - SetContent(this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); -} - -void cmStateDirectory::ClearIncludeDirectories() -{ - ClearContent(this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition); -} - -cmStringRange cmStateDirectory::GetCompileDefinitionsEntries() const -{ - return GetPropertyContent( - this->DirectoryState->CompileDefinitions, - this->Snapshot_.Position->CompileDefinitionsPosition); -} - -cmBacktraceRange cmStateDirectory::GetCompileDefinitionsEntryBacktraces() const -{ - return GetPropertyBacktraces( - this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition); -} - -void cmStateDirectory::AppendCompileDefinitionsEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - AppendEntry(this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); -} - -void cmStateDirectory::SetCompileDefinitions(const std::string& vec, - const cmListFileBacktrace& lfbt) -{ - SetContent(this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); -} - -void cmStateDirectory::ClearCompileDefinitions() -{ - ClearContent(this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition); -} - -cmStringRange cmStateDirectory::GetCompileOptionsEntries() const -{ - return GetPropertyContent(this->DirectoryState->CompileOptions, - this->Snapshot_.Position->CompileOptionsPosition); -} - -cmBacktraceRange cmStateDirectory::GetCompileOptionsEntryBacktraces() const -{ - return GetPropertyBacktraces( - this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition); -} - -void cmStateDirectory::AppendCompileOptionsEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - AppendEntry(this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); -} - -void cmStateDirectory::SetCompileOptions(const std::string& vec, - const cmListFileBacktrace& lfbt) -{ - SetContent(this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); -} - -void cmStateDirectory::ClearCompileOptions() -{ - ClearContent(this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition); -} - -bool cmStateSnapshot::StrictWeakOrder::operator()( - const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) const -{ - return lhs.Position.StrictWeakOrdered(rhs.Position); -} - -void cmStateDirectory::SetProperty(const std::string& prop, const char* value, - cmListFileBacktrace const& lfbt) -{ - if (prop == "INCLUDE_DIRECTORIES") { - if (!value) { - this->ClearIncludeDirectories(); - return; - } - this->SetIncludeDirectories(value, lfbt); - return; - } - if (prop == "COMPILE_OPTIONS") { - if (!value) { - this->ClearCompileOptions(); - return; - } - this->SetCompileOptions(value, lfbt); - return; - } - if (prop == "COMPILE_DEFINITIONS") { - if (!value) { - this->ClearCompileDefinitions(); - return; - } - this->SetCompileDefinitions(value, lfbt); - return; - } - - this->DirectoryState->Properties.SetProperty(prop, value); -} - -void cmStateDirectory::AppendProperty(const std::string& prop, - const char* value, bool asString, - cmListFileBacktrace const& lfbt) -{ - if (prop == "INCLUDE_DIRECTORIES") { - this->AppendIncludeDirectoriesEntry(value, lfbt); - return; - } - if (prop == "COMPILE_OPTIONS") { - this->AppendCompileOptionsEntry(value, lfbt); - return; - } - if (prop == "COMPILE_DEFINITIONS") { - this->AppendCompileDefinitionsEntry(value, lfbt); - return; - } - - this->DirectoryState->Properties.AppendProperty(prop, value, asString); -} - -const char* cmStateDirectory::GetProperty(const std::string& prop) const -{ - const bool chain = - this->Snapshot_.State->IsPropertyChained(prop, cmProperty::DIRECTORY); - return this->GetProperty(prop, chain); -} - -const char* cmStateDirectory::GetProperty(const std::string& prop, - bool chain) const -{ - static std::string output; - output = ""; - if (prop == "PARENT_DIRECTORY") { - cmStateSnapshot parent = this->Snapshot_.GetBuildsystemDirectoryParent(); - if (parent.IsValid()) { - return parent.GetDirectory().GetCurrentSource(); - } - return ""; - } - if (prop == kBINARY_DIR) { - output = this->GetCurrentBinary(); - return output.c_str(); - } - if (prop == kSOURCE_DIR) { - output = this->GetCurrentSource(); - return output.c_str(); - } - if (prop == kSUBDIRECTORIES) { - std::vector child_dirs; - std::vector const& children = - this->DirectoryState->Children; - for (std::vector::const_iterator ci = children.begin(); - ci != children.end(); ++ci) { - child_dirs.push_back(ci->GetDirectory().GetCurrentSource()); - } - output = cmJoin(child_dirs, ";"); - return output.c_str(); - } - if (prop == kBUILDSYSTEM_TARGETS) { - output = cmJoin(this->DirectoryState->NormalTargetNames, ";"); - return output.c_str(); - } - - if (prop == "LISTFILE_STACK") { - std::vector listFiles; - cmStateSnapshot snp = this->Snapshot_; - while (snp.IsValid()) { - listFiles.push_back(snp.GetExecutionListFile()); - snp = snp.GetCallStackParent(); - } - std::reverse(listFiles.begin(), listFiles.end()); - output = cmJoin(listFiles, ";"); - return output.c_str(); - } - if (prop == "CACHE_VARIABLES") { - output = cmJoin(this->Snapshot_.State->GetCacheEntryKeys(), ";"); - return output.c_str(); - } - if (prop == "VARIABLES") { - std::vector res = this->Snapshot_.ClosureKeys(); - std::vector cacheKeys = - this->Snapshot_.State->GetCacheEntryKeys(); - res.insert(res.end(), cacheKeys.begin(), cacheKeys.end()); - std::sort(res.begin(), res.end()); - output = cmJoin(res, ";"); - return output.c_str(); - } - if (prop == "INCLUDE_DIRECTORIES") { - output = cmJoin(this->GetIncludeDirectoriesEntries(), ";"); - return output.c_str(); - } - if (prop == "COMPILE_OPTIONS") { - output = cmJoin(this->GetCompileOptionsEntries(), ";"); - return output.c_str(); - } - if (prop == "COMPILE_DEFINITIONS") { - output = cmJoin(this->GetCompileDefinitionsEntries(), ";"); - return output.c_str(); - } - - const char* retVal = this->DirectoryState->Properties.GetPropertyValue(prop); - if (!retVal && chain) { - cmStateSnapshot parentSnapshot = - this->Snapshot_.GetBuildsystemDirectoryParent(); - if (parentSnapshot.IsValid()) { - return parentSnapshot.GetDirectory().GetProperty(prop, chain); - } - return this->Snapshot_.State->GetGlobalProperty(prop); - } - - return retVal; -} - -bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const -{ - return cmSystemTools::IsOn(this->GetProperty(prop)); -} - -std::vector cmStateDirectory::GetPropertyKeys() const -{ - std::vector keys; - keys.reserve(this->DirectoryState->Properties.size()); - for (cmPropertyMap::const_iterator it = - this->DirectoryState->Properties.begin(); - it != this->DirectoryState->Properties.end(); ++it) { - keys.push_back(it->first); - } - return keys; -} - -void cmStateDirectory::AddNormalTargetName(std::string const& name) -{ - this->DirectoryState->NormalTargetNames.push_back(name); -} - -bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) -{ - return lhs.Position == rhs.Position; -} - -bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) -{ - return lhs.Position != rhs.Position; -} - static bool ParseEntryWithoutType(const std::string& entry, std::string& var, std::string& value) { diff --git a/Source/cmState.h b/Source/cmState.h index 938c90b..6d74815 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -8,7 +8,6 @@ #include "cmAlgorithms.h" #include "cmDefinitions.h" #include "cmLinkedTree.h" -#include "cmPolicies.h" #include "cmProperty.h" #include "cmPropertyDefinitionMap.h" #include "cmPropertyMap.h" @@ -186,138 +185,4 @@ private: bool MSYSShell; }; -class cmStateSnapshot -{ -public: - cmStateSnapshot(cmState* state = CM_NULLPTR); - cmStateSnapshot(cmState* state, cmStateDetail::PositionType position); - - const char* GetDefinition(std::string const& name) const; - bool IsInitialized(std::string const& name) const; - void SetDefinition(std::string const& name, std::string const& value); - void RemoveDefinition(std::string const& name); - std::vector UnusedKeys() const; - std::vector ClosureKeys() const; - bool RaiseScope(std::string const& var, const char* varDef); - - void SetListFile(std::string const& listfile); - - std::string GetExecutionListFile() const; - - std::vector GetChildren(); - - bool IsValid() const; - cmStateSnapshot GetBuildsystemDirectoryParent() const; - cmStateSnapshot GetCallStackParent() const; - cmStateSnapshot GetCallStackBottom() const; - cmStateEnums::SnapshotType GetType() const; - - void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); - cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; - bool HasDefinedPolicyCMP0011(); - void PushPolicy(cmPolicies::PolicyMap entry, bool weak); - bool PopPolicy(); - bool CanPopPolicyScope(); - - cmState* GetState() const; - - cmStateDirectory GetDirectory() const; - - void SetProjectName(std::string const& name); - std::string GetProjectName() const; - - void InitializeFromParent_ForSubdirsCommand(); - - struct StrictWeakOrder - { - bool operator()(const cmStateSnapshot& lhs, - const cmStateSnapshot& rhs) const; - }; - - void SetDirectoryDefinitions(); - void SetDefaultDefinitions(); - -private: - friend bool operator==(const cmStateSnapshot& lhs, - const cmStateSnapshot& rhs); - friend bool operator!=(const cmStateSnapshot& lhs, - const cmStateSnapshot& rhs); - friend class cmState; - friend class cmStateDirectory; - friend struct StrictWeakOrder; - - void InitializeFromParent(); - - cmState* State; - cmStateDetail::PositionType Position; -}; - -class cmStateDirectory -{ - cmStateDirectory( - cmLinkedTree::iterator iter, - cmStateSnapshot const& snapshot); - -public: - const char* GetCurrentSource() const; - void SetCurrentSource(std::string const& dir); - const char* GetCurrentBinary() const; - void SetCurrentBinary(std::string const& dir); - - const char* GetRelativePathTopSource() const; - const char* GetRelativePathTopBinary() const; - void SetRelativePathTopSource(const char* dir); - void SetRelativePathTopBinary(const char* dir); - - cmStringRange GetIncludeDirectoriesEntries() const; - cmBacktraceRange GetIncludeDirectoriesEntryBacktraces() const; - void AppendIncludeDirectoriesEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void PrependIncludeDirectoriesEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetIncludeDirectories(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearIncludeDirectories(); - - cmStringRange GetCompileDefinitionsEntries() const; - cmBacktraceRange GetCompileDefinitionsEntryBacktraces() const; - void AppendCompileDefinitionsEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetCompileDefinitions(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearCompileDefinitions(); - - cmStringRange GetCompileOptionsEntries() const; - cmBacktraceRange GetCompileOptionsEntryBacktraces() const; - void AppendCompileOptionsEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetCompileOptions(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearCompileOptions(); - - void SetProperty(const std::string& prop, const char* value, - cmListFileBacktrace const& lfbt); - void AppendProperty(const std::string& prop, const char* value, - bool asString, cmListFileBacktrace const& lfbt); - const char* GetProperty(const std::string& prop) const; - const char* GetProperty(const std::string& prop, bool chain) const; - bool GetPropertyAsBool(const std::string& prop) const; - std::vector GetPropertyKeys() const; - - void AddNormalTargetName(std::string const& name); - -private: - void ComputeRelativePathTopSource(); - void ComputeRelativePathTopBinary(); - -private: - cmLinkedTree::iterator - DirectoryState; - cmStateSnapshot Snapshot_; - friend class cmStateSnapshot; -}; - -bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); -bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); - #endif diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx new file mode 100644 index 0000000..01e1e7e --- /dev/null +++ b/Source/cmStateDirectory.cxx @@ -0,0 +1,518 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmStateDirectory.h" +#include "cmState.h" +#include "cmStatePrivate.h" +#include "cmSystemTools.h" + +static std::string const kBINARY_DIR = "BINARY_DIR"; +static std::string const kBUILDSYSTEM_TARGETS = "BUILDSYSTEM_TARGETS"; +static std::string const kSOURCE_DIR = "SOURCE_DIR"; +static std::string const kSUBDIRECTORIES = "SUBDIRECTORIES"; + +void cmStateDirectory::ComputeRelativePathTopSource() +{ + // Relative path conversion inside the source tree is not used to + // construct relative paths passed to build tools so it is safe to use + // even when the source is a network path. + + cmStateSnapshot snapshot = this->Snapshot_; + std::vector snapshots; + snapshots.push_back(snapshot); + while (true) { + snapshot = snapshot.GetBuildsystemDirectoryParent(); + if (snapshot.IsValid()) { + snapshots.push_back(snapshot); + } else { + break; + } + } + + std::string result = snapshots.front().GetDirectory().GetCurrentSource(); + + for (std::vector::const_iterator it = snapshots.begin() + 1; + it != snapshots.end(); ++it) { + std::string currentSource = it->GetDirectory().GetCurrentSource(); + if (cmSystemTools::IsSubDirectory(result, currentSource)) { + result = currentSource; + } + } + this->DirectoryState->RelativePathTopSource = result; +} + +void cmStateDirectory::ComputeRelativePathTopBinary() +{ + cmStateSnapshot snapshot = this->Snapshot_; + std::vector snapshots; + snapshots.push_back(snapshot); + while (true) { + snapshot = snapshot.GetBuildsystemDirectoryParent(); + if (snapshot.IsValid()) { + snapshots.push_back(snapshot); + } else { + break; + } + } + + std::string result = snapshots.front().GetDirectory().GetCurrentBinary(); + + for (std::vector::const_iterator it = snapshots.begin() + 1; + it != snapshots.end(); ++it) { + std::string currentBinary = it->GetDirectory().GetCurrentBinary(); + if (cmSystemTools::IsSubDirectory(result, currentBinary)) { + result = currentBinary; + } + } + + // The current working directory on Windows cannot be a network + // path. Therefore relative paths cannot work when the binary tree + // is a network path. + if (result.size() < 2 || result.substr(0, 2) != "//") { + this->DirectoryState->RelativePathTopBinary = result; + } else { + this->DirectoryState->RelativePathTopBinary = ""; + } +} + +const char* cmStateDirectory::GetCurrentSource() const +{ + return this->DirectoryState->Location.c_str(); +} + +void cmStateDirectory::SetCurrentSource(std::string const& dir) +{ + std::string& loc = this->DirectoryState->Location; + loc = dir; + cmSystemTools::ConvertToUnixSlashes(loc); + loc = cmSystemTools::CollapseFullPath(loc); + + this->ComputeRelativePathTopSource(); + + this->Snapshot_.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", loc); +} + +const char* cmStateDirectory::GetCurrentBinary() const +{ + return this->DirectoryState->OutputLocation.c_str(); +} + +void cmStateDirectory::SetCurrentBinary(std::string const& dir) +{ + std::string& loc = this->DirectoryState->OutputLocation; + loc = dir; + cmSystemTools::ConvertToUnixSlashes(loc); + loc = cmSystemTools::CollapseFullPath(loc); + + this->ComputeRelativePathTopBinary(); + + this->Snapshot_.SetDefinition("CMAKE_CURRENT_BINARY_DIR", loc); +} + +const char* cmStateDirectory::GetRelativePathTopSource() const +{ + return this->DirectoryState->RelativePathTopSource.c_str(); +} + +const char* cmStateDirectory::GetRelativePathTopBinary() const +{ + return this->DirectoryState->RelativePathTopBinary.c_str(); +} + +void cmStateDirectory::SetRelativePathTopSource(const char* dir) +{ + this->DirectoryState->RelativePathTopSource = dir; +} + +void cmStateDirectory::SetRelativePathTopBinary(const char* dir) +{ + this->DirectoryState->RelativePathTopBinary = dir; +} + +cmStateDirectory::cmStateDirectory( + cmLinkedTree::iterator iter, + const cmStateSnapshot& snapshot) + : DirectoryState(iter) + , Snapshot_(snapshot) +{ +} + +template +cmStringRange GetPropertyContent(T const& content, U contentEndPosition) +{ + std::vector::const_iterator end = + content.begin() + contentEndPosition; + + std::vector::const_reverse_iterator rbegin = + cmMakeReverseIterator(end); + rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); + + return cmMakeRange(rbegin.base(), end); +} + +template +cmBacktraceRange GetPropertyBacktraces(T const& content, U const& backtraces, + V contentEndPosition) +{ + std::vector::const_iterator entryEnd = + content.begin() + contentEndPosition; + + std::vector::const_reverse_iterator rbegin = + cmMakeReverseIterator(entryEnd); + rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); + + std::vector::const_iterator it = + backtraces.begin() + std::distance(content.begin(), rbegin.base()); + + std::vector::const_iterator end = backtraces.end(); + return cmMakeRange(it, end); +} + +template +void AppendEntry(T& content, U& backtraces, V& endContentPosition, + const std::string& value, const cmListFileBacktrace& lfbt) +{ + if (value.empty()) { + return; + } + + assert(endContentPosition == content.size()); + + content.push_back(value); + backtraces.push_back(lfbt); + + endContentPosition = content.size(); +} + +template +void SetContent(T& content, U& backtraces, V& endContentPosition, + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + assert(endContentPosition == content.size()); + + content.resize(content.size() + 2); + backtraces.resize(backtraces.size() + 2); + + content.back() = vec; + backtraces.back() = lfbt; + + endContentPosition = content.size(); +} + +template +void ClearContent(T& content, U& backtraces, V& endContentPosition) +{ + assert(endContentPosition == content.size()); + + content.resize(content.size() + 1); + backtraces.resize(backtraces.size() + 1); + + endContentPosition = content.size(); +} + +cmStringRange cmStateDirectory::GetIncludeDirectoriesEntries() const +{ + return GetPropertyContent( + this->DirectoryState->IncludeDirectories, + this->Snapshot_.Position->IncludeDirectoryPosition); +} + +cmBacktraceRange cmStateDirectory::GetIncludeDirectoriesEntryBacktraces() const +{ + return GetPropertyBacktraces( + this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition); +} + +void cmStateDirectory::AppendIncludeDirectoriesEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + AppendEntry(this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); +} + +void cmStateDirectory::PrependIncludeDirectoriesEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + std::vector::iterator entryEnd = + this->DirectoryState->IncludeDirectories.begin() + + this->Snapshot_.Position->IncludeDirectoryPosition; + + std::vector::reverse_iterator rend = + this->DirectoryState->IncludeDirectories.rend(); + std::vector::reverse_iterator rbegin = + cmMakeReverseIterator(entryEnd); + rbegin = std::find(rbegin, rend, cmPropertySentinal); + + std::vector::iterator entryIt = rbegin.base(); + std::vector::iterator entryBegin = + this->DirectoryState->IncludeDirectories.begin(); + + std::vector::iterator btIt = + this->DirectoryState->IncludeDirectoryBacktraces.begin() + + std::distance(entryBegin, entryIt); + + this->DirectoryState->IncludeDirectories.insert(entryIt, vec); + this->DirectoryState->IncludeDirectoryBacktraces.insert(btIt, lfbt); + + this->Snapshot_.Position->IncludeDirectoryPosition = + this->DirectoryState->IncludeDirectories.size(); +} + +void cmStateDirectory::SetIncludeDirectories(const std::string& vec, + const cmListFileBacktrace& lfbt) +{ + SetContent(this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); +} + +void cmStateDirectory::ClearIncludeDirectories() +{ + ClearContent(this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition); +} + +cmStringRange cmStateDirectory::GetCompileDefinitionsEntries() const +{ + return GetPropertyContent( + this->DirectoryState->CompileDefinitions, + this->Snapshot_.Position->CompileDefinitionsPosition); +} + +cmBacktraceRange cmStateDirectory::GetCompileDefinitionsEntryBacktraces() const +{ + return GetPropertyBacktraces( + this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition); +} + +void cmStateDirectory::AppendCompileDefinitionsEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + AppendEntry(this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); +} + +void cmStateDirectory::SetCompileDefinitions(const std::string& vec, + const cmListFileBacktrace& lfbt) +{ + SetContent(this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); +} + +void cmStateDirectory::ClearCompileDefinitions() +{ + ClearContent(this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition); +} + +cmStringRange cmStateDirectory::GetCompileOptionsEntries() const +{ + return GetPropertyContent(this->DirectoryState->CompileOptions, + this->Snapshot_.Position->CompileOptionsPosition); +} + +cmBacktraceRange cmStateDirectory::GetCompileOptionsEntryBacktraces() const +{ + return GetPropertyBacktraces( + this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition); +} + +void cmStateDirectory::AppendCompileOptionsEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + AppendEntry(this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); +} + +void cmStateDirectory::SetCompileOptions(const std::string& vec, + const cmListFileBacktrace& lfbt) +{ + SetContent(this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); +} + +void cmStateDirectory::ClearCompileOptions() +{ + ClearContent(this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition); +} + +void cmStateDirectory::SetProperty(const std::string& prop, const char* value, + cmListFileBacktrace const& lfbt) +{ + if (prop == "INCLUDE_DIRECTORIES") { + if (!value) { + this->ClearIncludeDirectories(); + return; + } + this->SetIncludeDirectories(value, lfbt); + return; + } + if (prop == "COMPILE_OPTIONS") { + if (!value) { + this->ClearCompileOptions(); + return; + } + this->SetCompileOptions(value, lfbt); + return; + } + if (prop == "COMPILE_DEFINITIONS") { + if (!value) { + this->ClearCompileDefinitions(); + return; + } + this->SetCompileDefinitions(value, lfbt); + return; + } + + this->DirectoryState->Properties.SetProperty(prop, value); +} + +void cmStateDirectory::AppendProperty(const std::string& prop, + const char* value, bool asString, + cmListFileBacktrace const& lfbt) +{ + if (prop == "INCLUDE_DIRECTORIES") { + this->AppendIncludeDirectoriesEntry(value, lfbt); + return; + } + if (prop == "COMPILE_OPTIONS") { + this->AppendCompileOptionsEntry(value, lfbt); + return; + } + if (prop == "COMPILE_DEFINITIONS") { + this->AppendCompileDefinitionsEntry(value, lfbt); + return; + } + + this->DirectoryState->Properties.AppendProperty(prop, value, asString); +} + +const char* cmStateDirectory::GetProperty(const std::string& prop) const +{ + const bool chain = + this->Snapshot_.State->IsPropertyChained(prop, cmProperty::DIRECTORY); + return this->GetProperty(prop, chain); +} + +const char* cmStateDirectory::GetProperty(const std::string& prop, + bool chain) const +{ + static std::string output; + output = ""; + if (prop == "PARENT_DIRECTORY") { + cmStateSnapshot parent = this->Snapshot_.GetBuildsystemDirectoryParent(); + if (parent.IsValid()) { + return parent.GetDirectory().GetCurrentSource(); + } + return ""; + } + if (prop == kBINARY_DIR) { + output = this->GetCurrentBinary(); + return output.c_str(); + } + if (prop == kSOURCE_DIR) { + output = this->GetCurrentSource(); + return output.c_str(); + } + if (prop == kSUBDIRECTORIES) { + std::vector child_dirs; + std::vector const& children = + this->DirectoryState->Children; + for (std::vector::const_iterator ci = children.begin(); + ci != children.end(); ++ci) { + child_dirs.push_back(ci->GetDirectory().GetCurrentSource()); + } + output = cmJoin(child_dirs, ";"); + return output.c_str(); + } + if (prop == kBUILDSYSTEM_TARGETS) { + output = cmJoin(this->DirectoryState->NormalTargetNames, ";"); + return output.c_str(); + } + + if (prop == "LISTFILE_STACK") { + std::vector listFiles; + cmStateSnapshot snp = this->Snapshot_; + while (snp.IsValid()) { + listFiles.push_back(snp.GetExecutionListFile()); + snp = snp.GetCallStackParent(); + } + std::reverse(listFiles.begin(), listFiles.end()); + output = cmJoin(listFiles, ";"); + return output.c_str(); + } + if (prop == "CACHE_VARIABLES") { + output = cmJoin(this->Snapshot_.State->GetCacheEntryKeys(), ";"); + return output.c_str(); + } + if (prop == "VARIABLES") { + std::vector res = this->Snapshot_.ClosureKeys(); + std::vector cacheKeys = + this->Snapshot_.State->GetCacheEntryKeys(); + res.insert(res.end(), cacheKeys.begin(), cacheKeys.end()); + std::sort(res.begin(), res.end()); + output = cmJoin(res, ";"); + return output.c_str(); + } + if (prop == "INCLUDE_DIRECTORIES") { + output = cmJoin(this->GetIncludeDirectoriesEntries(), ";"); + return output.c_str(); + } + if (prop == "COMPILE_OPTIONS") { + output = cmJoin(this->GetCompileOptionsEntries(), ";"); + return output.c_str(); + } + if (prop == "COMPILE_DEFINITIONS") { + output = cmJoin(this->GetCompileDefinitionsEntries(), ";"); + return output.c_str(); + } + + const char* retVal = this->DirectoryState->Properties.GetPropertyValue(prop); + if (!retVal && chain) { + cmStateSnapshot parentSnapshot = + this->Snapshot_.GetBuildsystemDirectoryParent(); + if (parentSnapshot.IsValid()) { + return parentSnapshot.GetDirectory().GetProperty(prop, chain); + } + return this->Snapshot_.State->GetGlobalProperty(prop); + } + + return retVal; +} + +bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const +{ + return cmSystemTools::IsOn(this->GetProperty(prop)); +} + +std::vector cmStateDirectory::GetPropertyKeys() const +{ + std::vector keys; + keys.reserve(this->DirectoryState->Properties.size()); + for (cmPropertyMap::const_iterator it = + this->DirectoryState->Properties.begin(); + it != this->DirectoryState->Properties.end(); ++it) { + keys.push_back(it->first); + } + return keys; +} + +void cmStateDirectory::AddNormalTargetName(std::string const& name) +{ + this->DirectoryState->NormalTargetNames.push_back(name); +} diff --git a/Source/cmStateDirectory.h b/Source/cmStateDirectory.h new file mode 100644 index 0000000..12f5083 --- /dev/null +++ b/Source/cmStateDirectory.h @@ -0,0 +1,82 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmStateDirectory_h +#define cmStateDirectory_h + +#include // IWYU pragma: keep + +#include +#include + +#include "cmAlgorithms.h" +#include "cmListFileCache.h" +#include "cmStateSnapshot.h" +#include "cmStateTypes.h" + +class cmStateDirectory +{ + cmStateDirectory( + cmLinkedTree::iterator iter, + cmStateSnapshot const& snapshot); + +public: + const char* GetCurrentSource() const; + void SetCurrentSource(std::string const& dir); + const char* GetCurrentBinary() const; + void SetCurrentBinary(std::string const& dir); + + const char* GetRelativePathTopSource() const; + const char* GetRelativePathTopBinary() const; + void SetRelativePathTopSource(const char* dir); + void SetRelativePathTopBinary(const char* dir); + + cmStringRange GetIncludeDirectoriesEntries() const; + cmBacktraceRange GetIncludeDirectoriesEntryBacktraces() const; + void AppendIncludeDirectoriesEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void PrependIncludeDirectoriesEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetIncludeDirectories(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearIncludeDirectories(); + + cmStringRange GetCompileDefinitionsEntries() const; + cmBacktraceRange GetCompileDefinitionsEntryBacktraces() const; + void AppendCompileDefinitionsEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetCompileDefinitions(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearCompileDefinitions(); + + cmStringRange GetCompileOptionsEntries() const; + cmBacktraceRange GetCompileOptionsEntryBacktraces() const; + void AppendCompileOptionsEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetCompileOptions(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearCompileOptions(); + + void SetProperty(const std::string& prop, const char* value, + cmListFileBacktrace const& lfbt); + void AppendProperty(const std::string& prop, const char* value, + bool asString, cmListFileBacktrace const& lfbt); + const char* GetProperty(const std::string& prop) const; + const char* GetProperty(const std::string& prop, bool chain) const; + bool GetPropertyAsBool(const std::string& prop) const; + std::vector GetPropertyKeys() const; + + void AddNormalTargetName(std::string const& name); + +private: + void ComputeRelativePathTopSource(); + void ComputeRelativePathTopBinary(); + +private: + cmLinkedTree::iterator + DirectoryState; + cmStateSnapshot Snapshot_; + friend class cmStateSnapshot; +}; + +#endif \ No newline at end of file diff --git a/Source/cmStatePrivate.h b/Source/cmStatePrivate.h new file mode 100644 index 0000000..8daa3cf --- /dev/null +++ b/Source/cmStatePrivate.h @@ -0,0 +1,94 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmStatePrivate_h +#define cmStatePrivate_h + +#include // IWYU pragma: keep + +#include +#include + +#include "cmDefinitions.h" +#include "cmLinkedTree.h" +#include "cmListFileCache.h" +#include "cmPropertyMap.h" +#include "cmStateTypes.h" + +static const std::string cmPropertySentinal = std::string(); + +struct cmStateDetail::SnapshotDataType +{ + cmStateDetail::PositionType ScopeParent; + cmStateDetail::PositionType DirectoryParent; + cmLinkedTree::iterator Policies; + cmLinkedTree::iterator PolicyRoot; + cmLinkedTree::iterator PolicyScope; + cmStateEnums::SnapshotType SnapshotType; + bool Keep; + cmLinkedTree::iterator ExecutionListFile; + cmLinkedTree::iterator + BuildSystemDirectory; + cmLinkedTree::iterator Vars; + cmLinkedTree::iterator Root; + cmLinkedTree::iterator Parent; + std::vector::size_type IncludeDirectoryPosition; + std::vector::size_type CompileDefinitionsPosition; + std::vector::size_type CompileOptionsPosition; +}; + +struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap +{ + typedef cmPolicies::PolicyMap derived; + PolicyStackEntry(bool w = false) + : derived() + , Weak(w) + { + } + PolicyStackEntry(derived const& d, bool w) + : derived(d) + , Weak(w) + { + } + PolicyStackEntry(PolicyStackEntry const& r) + : derived(r) + , Weak(r.Weak) + { + } + bool Weak; +}; + +struct cmStateDetail::BuildsystemDirectoryStateType +{ + cmStateDetail::PositionType DirectoryEnd; + + std::string Location; + std::string OutputLocation; + + // The top-most directories for relative path conversion. Both the + // source and destination location of a relative path conversion + // must be underneath one of these directories (both under source or + // both under binary) in order for the relative path to be evaluated + // safely by the build tools. + std::string RelativePathTopSource; + std::string RelativePathTopBinary; + + std::vector IncludeDirectories; + std::vector IncludeDirectoryBacktraces; + + std::vector CompileDefinitions; + std::vector CompileDefinitionsBacktraces; + + std::vector CompileOptions; + std::vector CompileOptionsBacktraces; + + std::vector NormalTargetNames; + + std::string ProjectName; + + cmPropertyMap Properties; + + std::vector Children; +}; + +#endif diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx new file mode 100644 index 0000000..7f86221 --- /dev/null +++ b/Source/cmStateSnapshot.cxx @@ -0,0 +1,415 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmStateSnapshot.h" + +#include "cmState.h" +#include "cmStateDirectory.h" +#include "cmStatePrivate.h" +#include "cmSystemTools.h" +#include "cmVersion.h" +#include "cmake.h" + +cmStateSnapshot::cmStateSnapshot(cmState* state) + : State(state) + , Position() +{ +} + +std::vector cmStateSnapshot::GetChildren() +{ + return this->Position->BuildSystemDirectory->Children; +} + +cmStateSnapshot::cmStateSnapshot(cmState* state, + cmStateDetail::PositionType position) + : State(state) + , Position(position) +{ +} + +cmStateEnums::SnapshotType cmStateSnapshot::GetType() const +{ + return this->Position->SnapshotType; +} + +void cmStateSnapshot::SetListFile(const std::string& listfile) +{ + *this->Position->ExecutionListFile = listfile; +} + +std::string cmStateSnapshot::GetExecutionListFile() const +{ + return *this->Position->ExecutionListFile; +} + +bool cmStateSnapshot::IsValid() const +{ + return this->State && this->Position.IsValid() + ? this->Position != this->State->SnapshotData.Root() + : false; +} + +cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const +{ + cmStateSnapshot snapshot; + if (!this->State || this->Position == this->State->SnapshotData.Root()) { + return snapshot; + } + cmStateDetail::PositionType parentPos = this->Position->DirectoryParent; + if (parentPos != this->State->SnapshotData.Root()) { + snapshot = cmStateSnapshot(this->State, + parentPos->BuildSystemDirectory->DirectoryEnd); + } + + return snapshot; +} + +cmStateSnapshot cmStateSnapshot::GetCallStackParent() const +{ + assert(this->State); + assert(this->Position != this->State->SnapshotData.Root()); + + cmStateSnapshot snapshot; + cmStateDetail::PositionType parentPos = this->Position; + while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || + parentPos->SnapshotType == cmStateEnums::VariableScopeType) { + ++parentPos; + } + if (parentPos->SnapshotType == cmStateEnums::BuildsystemDirectoryType || + parentPos->SnapshotType == cmStateEnums::BaseType) { + return snapshot; + } + + ++parentPos; + while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || + parentPos->SnapshotType == cmStateEnums::VariableScopeType) { + ++parentPos; + } + + if (parentPos == this->State->SnapshotData.Root()) { + return snapshot; + } + + snapshot = cmStateSnapshot(this->State, parentPos); + return snapshot; +} + +cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const +{ + assert(this->State); + assert(this->Position != this->State->SnapshotData.Root()); + + cmStateDetail::PositionType pos = this->Position; + while (pos->SnapshotType != cmStateEnums::BaseType && + pos->SnapshotType != cmStateEnums::BuildsystemDirectoryType && + pos != this->State->SnapshotData.Root()) { + ++pos; + } + return cmStateSnapshot(this->State, pos); +} + +void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) +{ + cmStateDetail::PositionType pos = this->Position; + pos->Policies = this->State->PolicyStack.Push( + pos->Policies, cmStateDetail::PolicyStackEntry(entry, weak)); +} + +bool cmStateSnapshot::PopPolicy() +{ + cmStateDetail::PositionType pos = this->Position; + if (pos->Policies == pos->PolicyScope) { + return false; + } + pos->Policies = this->State->PolicyStack.Pop(pos->Policies); + return true; +} + +bool cmStateSnapshot::CanPopPolicyScope() +{ + return this->Position->Policies == this->Position->PolicyScope; +} + +void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id, + cmPolicies::PolicyStatus status) +{ + // Update the policy stack from the top to the top-most strong entry. + bool previous_was_weak = true; + for (cmLinkedTree::iterator psi = + this->Position->Policies; + previous_was_weak && psi != this->Position->PolicyRoot; ++psi) { + psi->Set(id, status); + previous_was_weak = psi->Weak; + } +} + +cmPolicies::PolicyStatus cmStateSnapshot::GetPolicy( + cmPolicies::PolicyID id) const +{ + cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id); + + if (status == cmPolicies::REQUIRED_ALWAYS || + status == cmPolicies::REQUIRED_IF_USED) { + return status; + } + + cmLinkedTree::iterator dir = + this->Position->BuildSystemDirectory; + + while (true) { + assert(dir.IsValid()); + cmLinkedTree::iterator leaf = + dir->DirectoryEnd->Policies; + cmLinkedTree::iterator root = + dir->DirectoryEnd->PolicyRoot; + for (; leaf != root; ++leaf) { + if (leaf->IsDefined(id)) { + status = leaf->Get(id); + return status; + } + } + cmStateDetail::PositionType e = dir->DirectoryEnd; + cmStateDetail::PositionType p = e->DirectoryParent; + if (p == this->State->SnapshotData.Root()) { + break; + } + dir = p->BuildSystemDirectory; + } + return status; +} + +bool cmStateSnapshot::HasDefinedPolicyCMP0011() +{ + return !this->Position->Policies->IsEmpty(); +} + +const char* cmStateSnapshot::GetDefinition(std::string const& name) const +{ + assert(this->Position->Vars.IsValid()); + return cmDefinitions::Get(name, this->Position->Vars, this->Position->Root); +} + +bool cmStateSnapshot::IsInitialized(std::string const& name) const +{ + return cmDefinitions::HasKey(name, this->Position->Vars, + this->Position->Root); +} + +void cmStateSnapshot::SetDefinition(std::string const& name, + std::string const& value) +{ + this->Position->Vars->Set(name, value.c_str()); +} + +void cmStateSnapshot::RemoveDefinition(std::string const& name) +{ + this->Position->Vars->Set(name, CM_NULLPTR); +} + +std::vector cmStateSnapshot::UnusedKeys() const +{ + return this->Position->Vars->UnusedKeys(); +} + +std::vector cmStateSnapshot::ClosureKeys() const +{ + return cmDefinitions::ClosureKeys(this->Position->Vars, + this->Position->Root); +} + +bool cmStateSnapshot::RaiseScope(std::string const& var, const char* varDef) +{ + if (this->Position->ScopeParent == this->Position->DirectoryParent) { + cmStateSnapshot parentDir = this->GetBuildsystemDirectoryParent(); + if (!parentDir.IsValid()) { + return false; + } + // Update the definition in the parent directory top scope. This + // directory's scope was initialized by the closure of the parent + // scope, so we do not need to localize the definition first. + if (varDef) { + parentDir.SetDefinition(var, varDef); + } else { + parentDir.RemoveDefinition(var); + } + return true; + } + // First localize the definition in the current scope. + cmDefinitions::Raise(var, this->Position->Vars, this->Position->Root); + + // Now update the definition in the parent scope. + this->Position->Parent->Set(var, varDef); + return true; +} + +template +void InitializeContentFromParent(T& parentContent, T& thisContent, + U& parentBacktraces, U& thisBacktraces, + V& contentEndPosition) +{ + std::vector::const_iterator parentBegin = parentContent.begin(); + std::vector::const_iterator parentEnd = parentContent.end(); + + std::vector::const_reverse_iterator parentRbegin = + cmMakeReverseIterator(parentEnd); + std::vector::const_reverse_iterator parentRend = + parentContent.rend(); + parentRbegin = std::find(parentRbegin, parentRend, cmPropertySentinal); + std::vector::const_iterator parentIt = parentRbegin.base(); + + thisContent = std::vector(parentIt, parentEnd); + + std::vector::const_iterator btIt = + parentBacktraces.begin() + std::distance(parentBegin, parentIt); + std::vector::const_iterator btEnd = + parentBacktraces.end(); + + thisBacktraces = std::vector(btIt, btEnd); + + contentEndPosition = thisContent.size(); +} + +void cmStateSnapshot::SetDefaultDefinitions() +{ +/* Up to CMake 2.4 here only WIN32, UNIX and APPLE were set. + With CMake must separate between target and host platform. In most cases + the tests for WIN32, UNIX and APPLE will be for the target system, so an + additional set of variables for the host system is required -> + CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE. + WIN32, UNIX and APPLE are now set in the platform files in + Modules/Platforms/. + To keep cmake scripts (-P) and custom language and compiler modules + working, these variables are still also set here in this place, but they + will be reset in CMakeSystemSpecificInformation.cmake before the platform + files are executed. */ +#if defined(_WIN32) + this->SetDefinition("WIN32", "1"); + this->SetDefinition("CMAKE_HOST_WIN32", "1"); +#else + this->SetDefinition("UNIX", "1"); + this->SetDefinition("CMAKE_HOST_UNIX", "1"); +#endif +#if defined(__CYGWIN__) + std::string legacy; + if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) && + cmSystemTools::IsOn(legacy.c_str())) { + this->SetDefinition("WIN32", "1"); + this->SetDefinition("CMAKE_HOST_WIN32", "1"); + } +#endif +#if defined(__APPLE__) + this->SetDefinition("APPLE", "1"); + this->SetDefinition("CMAKE_HOST_APPLE", "1"); +#endif +#if defined(__sun__) + this->SetDefinition("CMAKE_HOST_SOLARIS", "1"); +#endif + + char temp[1024]; + sprintf(temp, "%d", cmVersion::GetMinorVersion()); + this->SetDefinition("CMAKE_MINOR_VERSION", temp); + sprintf(temp, "%d", cmVersion::GetMajorVersion()); + this->SetDefinition("CMAKE_MAJOR_VERSION", temp); + sprintf(temp, "%d", cmVersion::GetPatchVersion()); + this->SetDefinition("CMAKE_PATCH_VERSION", temp); + sprintf(temp, "%d", cmVersion::GetTweakVersion()); + this->SetDefinition("CMAKE_TWEAK_VERSION", temp); + this->SetDefinition("CMAKE_VERSION", cmVersion::GetCMakeVersion()); + + this->SetDefinition("CMAKE_FILES_DIRECTORY", + cmake::GetCMakeFilesDirectory()); + + // Setup the default include file regular expression (match everything). + this->Position->BuildSystemDirectory->Properties.SetProperty( + "INCLUDE_REGULAR_EXPRESSION", "^.*$"); +} + +void cmStateSnapshot::SetDirectoryDefinitions() +{ + this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); + this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", + this->State->GetSourceDirectory()); + this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); + this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", + this->State->GetBinaryDirectory()); +} + +void cmStateSnapshot::InitializeFromParent() +{ + cmStateDetail::PositionType parent = this->Position->DirectoryParent; + assert(this->Position->Vars.IsValid()); + assert(parent->Vars.IsValid()); + + *this->Position->Vars = + cmDefinitions::MakeClosure(parent->Vars, parent->Root); + + InitializeContentFromParent( + parent->BuildSystemDirectory->IncludeDirectories, + this->Position->BuildSystemDirectory->IncludeDirectories, + parent->BuildSystemDirectory->IncludeDirectoryBacktraces, + this->Position->BuildSystemDirectory->IncludeDirectoryBacktraces, + this->Position->IncludeDirectoryPosition); + + InitializeContentFromParent( + parent->BuildSystemDirectory->CompileDefinitions, + this->Position->BuildSystemDirectory->CompileDefinitions, + parent->BuildSystemDirectory->CompileDefinitionsBacktraces, + this->Position->BuildSystemDirectory->CompileDefinitionsBacktraces, + this->Position->CompileDefinitionsPosition); + + InitializeContentFromParent( + parent->BuildSystemDirectory->CompileOptions, + this->Position->BuildSystemDirectory->CompileOptions, + parent->BuildSystemDirectory->CompileOptionsBacktraces, + this->Position->BuildSystemDirectory->CompileOptionsBacktraces, + this->Position->CompileOptionsPosition); +} + +cmState* cmStateSnapshot::GetState() const +{ + return this->State; +} + +cmStateDirectory cmStateSnapshot::GetDirectory() const +{ + return cmStateDirectory(this->Position->BuildSystemDirectory, *this); +} + +void cmStateSnapshot::SetProjectName(const std::string& name) +{ + this->Position->BuildSystemDirectory->ProjectName = name; +} + +std::string cmStateSnapshot::GetProjectName() const +{ + return this->Position->BuildSystemDirectory->ProjectName; +} + +void cmStateSnapshot::InitializeFromParent_ForSubdirsCommand() +{ + std::string currentSrcDir = this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR"); + std::string currentBinDir = this->GetDefinition("CMAKE_CURRENT_BINARY_DIR"); + this->InitializeFromParent(); + this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); + this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); + + this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", currentSrcDir); + this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", currentBinDir); +} + +bool cmStateSnapshot::StrictWeakOrder::operator()( + const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) const +{ + return lhs.Position.StrictWeakOrdered(rhs.Position); +} + +bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) +{ + return lhs.Position == rhs.Position; +} + +bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) +{ + return lhs.Position != rhs.Position; +} diff --git a/Source/cmStateSnapshot.h b/Source/cmStateSnapshot.h new file mode 100644 index 0000000..63b581d --- /dev/null +++ b/Source/cmStateSnapshot.h @@ -0,0 +1,88 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmStateSnapshot_h +#define cmStateSnapshot_h + +#include // IWYU pragma: keep + +#include +#include +#include + +#include "cmPolicies.h" +#include "cmStateTypes.h" + +class cmState; +class cmStateDirectory; + +class cmStateSnapshot +{ +public: + cmStateSnapshot(cmState* state = CM_NULLPTR); + cmStateSnapshot(cmState* state, cmStateDetail::PositionType position); + + const char* GetDefinition(std::string const& name) const; + bool IsInitialized(std::string const& name) const; + void SetDefinition(std::string const& name, std::string const& value); + void RemoveDefinition(std::string const& name); + std::vector UnusedKeys() const; + std::vector ClosureKeys() const; + bool RaiseScope(std::string const& var, const char* varDef); + + void SetListFile(std::string const& listfile); + + std::string GetExecutionListFile() const; + + std::vector GetChildren(); + + bool IsValid() const; + cmStateSnapshot GetBuildsystemDirectoryParent() const; + cmStateSnapshot GetCallStackParent() const; + cmStateSnapshot GetCallStackBottom() const; + cmStateEnums::SnapshotType GetType() const; + + void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); + cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; + bool HasDefinedPolicyCMP0011(); + void PushPolicy(cmPolicies::PolicyMap entry, bool weak); + bool PopPolicy(); + bool CanPopPolicyScope(); + + cmState* GetState() const; + + cmStateDirectory GetDirectory() const; + + void SetProjectName(std::string const& name); + std::string GetProjectName() const; + + void InitializeFromParent_ForSubdirsCommand(); + + struct StrictWeakOrder + { + bool operator()(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs) const; + }; + + void SetDirectoryDefinitions(); + void SetDefaultDefinitions(); + +private: + friend bool operator==(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs); + friend bool operator!=(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs); + friend class cmState; + friend class cmStateDirectory; + friend struct StrictWeakOrder; + + void InitializeFromParent(); + + cmState* State; + cmStateDetail::PositionType Position; +}; + +bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); +bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); + +#endif diff --git a/Source/cmake.h b/Source/cmake.h index 0a577ad..cd00c61 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -7,7 +7,7 @@ #include "cmInstalledFile.h" #include "cmListFileCache.h" -#include "cmState.h" +#include "cmStateSnapshot.h" #include #include diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 912acdb..6e9ad6c 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -7,7 +7,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmQtAutoGenerators.h" -#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include "cmUtils.hxx" #include "cmVersion.h" diff --git a/bootstrap b/bootstrap index d537211..44afbb2 100755 --- a/bootstrap +++ b/bootstrap @@ -292,6 +292,8 @@ CMAKE_CXX_SOURCES="\ cmSourceFile \ cmSourceFileLocation \ cmState \ + cmStateDirectory \ + cmStateSnapshot \ cmSystemTools \ cmTestGenerator \ cmVersion \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a91eaf387287a201d421e90d78bcae8836cc6042 commit a91eaf387287a201d421e90d78bcae8836cc6042 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:48 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:59 2016 +0200 cmState: Port dependents to new cmStateTypes header diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 71892ba..3124f81 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -360,6 +360,7 @@ set(SRCS cmSourceGroup.h cmState.cxx cmState.h + cmStateTypes.h cmSystemTools.cxx cmSystemTools.h cmTarget.cxx diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index d4135ce..09b9c0d 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -8,7 +8,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmXMLSafe.h" #include "cm_auto_ptr.hxx" #include "cmake.h" diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index a3281ab..e3adf6b 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -9,7 +9,7 @@ #include "cmDocumentationEntry.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTypeMacro.h" #include "cm_auto_ptr.hxx" diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index e5c50b2..224681a 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -7,7 +7,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index e9980d0..fa816a6 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -21,7 +21,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 06cd77f..a114755 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -7,7 +7,7 @@ #include "cmCTestScriptHandler.h" #include "cmCurl.h" #include "cmGeneratedFileStream.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLParser.h" #include "cmake.h" diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 0d0237f..09efafb 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -9,7 +9,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cm_auto_ptr.hxx" diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx index 3b81c65..80a5b5b 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.cxx +++ b/Source/CursesDialog/cmCursesBoolWidget.cxx @@ -3,7 +3,7 @@ #include "cmCursesBoolWidget.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #include diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 46c0d0c..5d29942 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -9,7 +9,7 @@ #include "cmCursesPathWidget.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx index b5a1daa..da0478a 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.cxx +++ b/Source/CursesDialog/cmCursesDummyWidget.cxx @@ -3,7 +3,7 @@ #include "cmCursesDummyWidget.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left, int top) diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx index ee5f2d7..518da4f 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.cxx +++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx @@ -3,7 +3,7 @@ #include "cmCursesFilePathWidget.h" #include "cmCursesPathWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left, int top) diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 0db0200..e8e70df 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -11,7 +11,7 @@ #include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index 10ae960..d891ea0 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -7,7 +7,7 @@ #include "cmCursesForm.h" #include "cmCursesStandardIncludes.h" -#include "cmState.h" +#include "cmStateTypes.h" #include #include diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx index 1b752a6..d26a98f 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.cxx +++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx @@ -3,7 +3,7 @@ #include "cmCursesOptionsWidget.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #define ctrl(z) ((z)&037) diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx index 3f96436..05c3279 100644 --- a/Source/CursesDialog/cmCursesPathWidget.cxx +++ b/Source/CursesDialog/cmCursesPathWidget.cxx @@ -4,7 +4,7 @@ #include "cmCursesMainForm.h" #include "cmCursesStringWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index 0f67d23..eabc642 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -6,7 +6,7 @@ #include "cmCursesMainForm.h" #include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" -#include "cmState.h" +#include "cmStateTypes.h" #include #include diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index 1ef4ab2..d226dd7 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -6,7 +6,7 @@ #include // IWYU pragma: keep #include "cmCursesStandardIncludes.h" -#include "cmState.h" +#include "cmStateTypes.h" #include diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index d1281d4..3cde147 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddLibraryCommand.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmake.h" // cmLibraryCommand diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 3a37eeb..502a709 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -20,7 +20,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" #include "cmVersionConfig.h" diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 72556b8..4d900b6 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -17,7 +17,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt) : GeneratorTarget(gt) diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 804d900..3e2cf18 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -8,7 +8,7 @@ #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmake.h" diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 565eb15..16bbadb 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -11,7 +11,7 @@ #include "cmOrderDirectories.h" #include "cmOutputConverter.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmake.h" diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 4cc4edf..70ed31e 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -10,7 +10,7 @@ #include "cmMakefile.h" #include "cmPolicies.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 5cb1104..2125f1b 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -9,7 +9,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx index 8800363..99db478 100644 --- a/Source/cmDefinePropertyCommand.cxx +++ b/Source/cmDefinePropertyCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDefinePropertyCommand.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmake.h" bool cmDefinePropertyCommand::InitialPass(std::vector const& args, diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index e5f7a55..0c25268 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -9,7 +9,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetExport.h" diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 3cd72a8..6c21eaf 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -11,7 +11,7 @@ #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetExport.h" diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 92c3bf1..64ea3c8 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -14,7 +14,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetExport.h" diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index a262e14..cd0a7e6 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -8,7 +8,7 @@ #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index b91cae9..41fc428 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -9,7 +9,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 90d41fe..6f48935 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -8,7 +8,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index b50db25..d20e386 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -11,7 +11,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceGroup.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index 3f09469..3730433 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -8,7 +8,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 9a83c49..5d35f13 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -8,7 +8,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index b8b3463..66433f9 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -3,7 +3,7 @@ #include "cmFindBase.h" #include "cmAlgorithms.h" -#include "cmState.h" +#include "cmStateTypes.h" cmFindBase::cmFindBase() { diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index f34b2d6..86d7dcf 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -15,7 +15,7 @@ #include "cmOutputConverter.h" #include "cmPolicies.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 625c28e..3805bfc 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -8,7 +8,7 @@ #include "cmLinkItem.h" #include "cmListFileCache.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include #include diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index 11373b7..e5949f0 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -4,7 +4,7 @@ #include "cmAlgorithms.h" #include "cmGlobalGenerator.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmake.h" // cmGetCMakePropertyCommand diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 39445dd..c44445a 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -5,7 +5,7 @@ #include "cmGlobalGenerator.h" #include "cmPropertyDefinition.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmTargetPropertyComputer.h" #include "cmTest.h" #include "cmake.h" diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 313b65a..fd3734b 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -28,7 +28,7 @@ #include "cmPolicies.h" #include "cmQtAutoGeneratorInitializer.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 1881b7a..75209c3 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -8,7 +8,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmXMLWriter.h" diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 7015669..b90428d 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -13,7 +13,7 @@ #include "cmMakefile.h" #include "cmNinjaLinkLineComputer.h" #include "cmOutputConverter.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index a1127f9..843e5dc 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -8,7 +8,7 @@ #include "cmGeneratorTarget.h" #include "cmGlobalCommonGenerator.h" #include "cmGlobalGeneratorFactory.h" -#include "cmState.h" +#include "cmStateTypes.h" #include #include diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 94cdb38..f97bb75 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -4,7 +4,7 @@ #include "cmDocumentationEntry.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmake.h" cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator(cmake* cm) diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index 8d5515b..1ff07ab 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -5,7 +5,7 @@ #include // IWYU pragma: keep -#include "cmState.h" +#include "cmStateTypes.h" #include #include diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index ed3be3f..f1df073 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -9,7 +9,7 @@ #include "cmInstallType.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 1cea655..6314aff 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -9,7 +9,7 @@ #include "cmOutputConverter.h" #include "cmPolicies.h" #include "cmRulePlaceholderExpander.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmake.h" #include diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 232e1dc..8789530 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -12,7 +12,7 @@ #include "cmNinjaTargetGenerator.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 5b90f99..eda604d 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -16,7 +16,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 47cb246..28912c3 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -17,7 +17,7 @@ #include "cmListFileCache.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTest.h" #include "cmVersion.h" diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 5bf2f51..cfe1e83 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -12,7 +12,7 @@ #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 97c430f..4a8924f 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -20,7 +20,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" #include "cmake.h" diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index dd903d6..d5d3e90 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -17,7 +17,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 6552832..76fe047 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -16,7 +16,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx index 7de185a..500ff4a 100644 --- a/Source/cmNinjaUtilityTargetGenerator.cxx +++ b/Source/cmNinjaUtilityTargetGenerator.cxx @@ -12,7 +12,7 @@ #include "cmNinjaTypes.h" #include "cmOutputConverter.h" #include "cmSourceFile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 25acb52..41bee8b 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -2,7 +2,7 @@ #include "cmAlgorithms.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 5246a67..b04c7ca 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -12,7 +12,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmake.h" diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 3c2b148..dca0f69 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -7,7 +7,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" #include "cmake.h" diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 5d37578..ba24ff2 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -6,7 +6,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmProperty.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 6a7c8f0..929e204 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -10,7 +10,7 @@ #include "cmListFileCache.h" #include "cmPolicies.h" #include "cmPropertyMap.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmTargetLinkLibraryType.h" #include diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx index 4d0cbaa..f55dc83 100644 --- a/Source/cmTest.cxx +++ b/Source/cmTest.cxx @@ -4,7 +4,7 @@ #include "cmMakefile.h" #include "cmProperty.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" cmTest::cmTest(cmMakefile* mf) diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index 301660e..843f7b1 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -8,7 +8,7 @@ #include "cmOutputConverter.h" #include "cmProperty.h" #include "cmPropertyMap.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTest.h" #include "cm_auto_ptr.hxx" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27be1d815298ebf343823ff99baa35484da92a85 commit 27be1d815298ebf343823ff99baa35484da92a85 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:48 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:59 2016 +0200 cmState: Move extracted declarations to a separate file diff --git a/Source/cmState.h b/Source/cmState.h index c7cf756..938c90b 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -12,6 +12,7 @@ #include "cmProperty.h" #include "cmPropertyDefinitionMap.h" #include "cmPropertyMap.h" +#include "cmStateTypes.h" #include #include @@ -23,51 +24,6 @@ class cmCommand; class cmListFileBacktrace; class cmPropertyDefinition; -namespace cmStateDetail { -struct BuildsystemDirectoryStateType; -struct SnapshotDataType; -struct PolicyStackEntry; -typedef cmLinkedTree::iterator PositionType; -} - -namespace cmStateEnums { - -enum SnapshotType -{ - BaseType, - BuildsystemDirectoryType, - FunctionCallType, - MacroCallType, - IncludeFileType, - InlineListFileType, - PolicyScopeType, - VariableScopeType -}; - -enum TargetType -{ - EXECUTABLE, - STATIC_LIBRARY, - SHARED_LIBRARY, - MODULE_LIBRARY, - OBJECT_LIBRARY, - UTILITY, - GLOBAL_TARGET, - INTERFACE_LIBRARY, - UNKNOWN_LIBRARY -}; -enum CacheEntryType -{ - BOOL = 0, - PATH, - FILEPATH, - STRING, - INTERNAL, - STATIC, - UNINITIALIZED -}; -} - class cmStateDirectory; class cmStateSnapshot; diff --git a/Source/cmStateTypes.h b/Source/cmStateTypes.h new file mode 100644 index 0000000..75f9e60 --- /dev/null +++ b/Source/cmStateTypes.h @@ -0,0 +1,55 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmStateTypes_h +#define cmStateTypes_h + +#include "cmLinkedTree.h" + +namespace cmStateDetail { +struct BuildsystemDirectoryStateType; +struct SnapshotDataType; +struct PolicyStackEntry; +typedef cmLinkedTree::iterator PositionType; +} + +namespace cmStateEnums { + +enum SnapshotType +{ + BaseType, + BuildsystemDirectoryType, + FunctionCallType, + MacroCallType, + IncludeFileType, + InlineListFileType, + PolicyScopeType, + VariableScopeType +}; + +enum TargetType +{ + EXECUTABLE, + STATIC_LIBRARY, + SHARED_LIBRARY, + MODULE_LIBRARY, + OBJECT_LIBRARY, + UTILITY, + GLOBAL_TARGET, + INTERFACE_LIBRARY, + UNKNOWN_LIBRARY +}; + +enum CacheEntryType +{ + BOOL = 0, + PATH, + FILEPATH, + STRING, + INTERNAL, + STATIC, + UNINITIALIZED +}; +} + +#endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34433c88e259493a22c59558e1ee052251f2c149 commit 34433c88e259493a22c59558e1ee052251f2c149 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:48 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:59 2016 +0200 cmState: Remove compatibility typedefs diff --git a/Source/cmState.h b/Source/cmState.h index 82eec3f..c7cf756 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -79,9 +79,6 @@ public: cmState(); ~cmState(); - typedef cmStateSnapshot Snapshot; - typedef cmStateDirectory Directory; - static const char* GetTargetTypeName(cmStateEnums::TargetType targetType); cmStateSnapshot CreateBaseSnapshot(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cde6eb6249cd3211cb3391860221ec32f985e53b commit cde6eb6249cd3211cb3391860221ec32f985e53b Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:48 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:59 2016 +0200 cmState: Port dependent code to new cmStateSnapshot name diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 8848a70..e9980d0 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -280,7 +280,7 @@ void cmCTestScriptHandler::CreateCMake() this->CMake->AddCMakePaths(); this->GlobalGenerator = new cmGlobalGenerator(this->CMake); - cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->CMake->GetCurrentSnapshot(); std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); snapshot.GetDirectory().SetCurrentSource(cwd); snapshot.GetDirectory().SetCurrentBinary(cwd); diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 24a3277..313b65a 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1062,7 +1062,7 @@ void cmGlobalGenerator::Configure() this->FirstTimeProgress = 0.0f; this->ClearGeneratorMembers(); - cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->CMakeInstance->GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentSource( this->CMakeInstance->GetHomeDirectory()); @@ -1909,10 +1909,10 @@ void cmGlobalGenerator::SetConfiguredFilesPath(cmGlobalGenerator* gen) } } -bool cmGlobalGenerator::IsExcluded(cmState::Snapshot const& rootSnp, - cmState::Snapshot const& snp_) const +bool cmGlobalGenerator::IsExcluded(cmStateSnapshot const& rootSnp, + cmStateSnapshot const& snp_) const { - cmState::Snapshot snp = snp_; + cmStateSnapshot snp = snp_; while (snp.IsValid()) { if (snp == rootSnp) { // No directory excludes itself. @@ -1933,8 +1933,8 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, { assert(gen); - cmState::Snapshot rootSnp = root->GetStateSnapshot(); - cmState::Snapshot snp = gen->GetStateSnapshot(); + cmStateSnapshot rootSnp = root->GetStateSnapshot(); + cmStateSnapshot snp = gen->GetStateSnapshot(); return this->IsExcluded(rootSnp, snp); } @@ -1974,7 +1974,7 @@ void cmGlobalGenerator::FillProjectMap() unsigned int i; for (i = 0; i < this->LocalGenerators.size(); ++i) { // for each local generator add all projects - cmState::Snapshot snp = this->LocalGenerators[i]->GetStateSnapshot(); + cmStateSnapshot snp = this->LocalGenerators[i]->GetStateSnapshot(); std::string name; do { std::string snpProjName = snp.GetProjectName(); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 0f483db..959fe32 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -410,8 +410,8 @@ protected: // has been populated. void FillProjectMap(); void CheckTargetProperties(); - bool IsExcluded(cmState::Snapshot const& root, - cmState::Snapshot const& snp) const; + bool IsExcluded(cmStateSnapshot const& root, + cmStateSnapshot const& snp) const; bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const; bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const; virtual void InitializeProgressMarks() {} diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index a84baca..7015669 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1116,9 +1116,9 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) // The directory-level rule should depend on the directory-level // rules of the subdirectories. - std::vector const& children = + std::vector const& children = lg->GetStateSnapshot().GetChildren(); - for (std::vector::const_iterator stateIt = + for (std::vector::const_iterator stateIt = children.begin(); stateIt != children.end(); ++stateIt) { targetsPerFolder[currentSourceFolder].push_back( @@ -1667,8 +1667,7 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile( { // Setup path conversions. { - cmState::Snapshot snapshot = - this->GetCMakeInstance()->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->GetCMakeInstance()->GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentSource(dir_cur_src); snapshot.GetDirectory().SetCurrentBinary(dir_cur_bld); snapshot.GetDirectory().SetRelativePathTopSource(dir_top_src.c_str()); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 45f8151..3433d75 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -436,9 +436,8 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRule2( // The directory-level rule should depend on the directory-level // rules of the subdirectories. - std::vector children = - lg->GetStateSnapshot().GetChildren(); - for (std::vector::const_iterator ci = children.begin(); + std::vector children = lg->GetStateSnapshot().GetChildren(); + for (std::vector::const_iterator ci = children.begin(); ci != children.end(); ++ci) { std::string subdir = ci->GetDirectory().GetCurrentBinary(); subdir += "/"; @@ -507,7 +506,7 @@ void cmGlobalUnixMakefileGenerator3::GenerateBuildCommand( if (!this->Makefiles.empty()) { mf = this->Makefiles[0]; } else { - cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->CMakeInstance->GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentSource( this->CMakeInstance->GetHomeDirectory()); snapshot.GetDirectory().SetCurrentBinary( @@ -817,8 +816,8 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks() continue; } - cmState::Snapshot csnp = lg->GetStateSnapshot(); - cmState::Snapshot tsnp = tlg->GetStateSnapshot(); + cmStateSnapshot csnp = lg->GetStateSnapshot(); + cmStateSnapshot tsnp = tlg->GetStateSnapshot(); // Consider the directory containing the target and all its // parents until something excludes the target. diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 1019d86..a1127f9 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -248,8 +248,8 @@ private: const char* GetBuildIgnoreErrorsFlag() const CM_OVERRIDE { return "-i"; } std::string GetEditCacheCommand() const CM_OVERRIDE; - std::map, - cmState::Snapshot::StrictWeakOrder> + std::map, + cmStateSnapshot::StrictWeakOrder> DirectoryTargetsMap; void InitializeProgressMarks() CM_OVERRIDE; }; diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 5e6273c..c8744d4 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -298,7 +298,7 @@ struct cmListFileBacktrace::Entry : public cmListFileContext unsigned int RefCount; }; -cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot bottom, Entry* up, +cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* up, cmListFileContext const& lfc) : Bottom(bottom) , Cur(new Entry(lfc, up)) @@ -307,7 +307,7 @@ cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot bottom, Entry* up, this->Cur->Ref(); } -cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot bottom, Entry* cur) +cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur) : Bottom(bottom) , Cur(cur) { @@ -323,7 +323,7 @@ cmListFileBacktrace::cmListFileBacktrace() { } -cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot snapshot) +cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot snapshot) : Bottom(snapshot.GetCallStackBottom()) , Cur(CM_NULLPTR) { diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index fd779c7..83aac51 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -113,14 +113,14 @@ public: // Construct an empty backtrace whose bottom sits in the directory // indicated by the given valid snapshot. - cmListFileBacktrace(cmState::Snapshot snapshot); + cmListFileBacktrace(cmStateSnapshot snapshot); // Backtraces may be copied and assigned as values. cmListFileBacktrace(cmListFileBacktrace const& r); cmListFileBacktrace& operator=(cmListFileBacktrace const& r); ~cmListFileBacktrace(); - cmState::Snapshot GetBottom() const { return this->Bottom; } + cmStateSnapshot GetBottom() const { return this->Bottom; } // Get a backtrace with the given file scope added to the top. // May not be called until after construction with a valid snapshot. @@ -147,11 +147,11 @@ public: private: struct Entry; - cmState::Snapshot Bottom; + cmStateSnapshot Bottom; Entry* Cur; - cmListFileBacktrace(cmState::Snapshot bottom, Entry* up, + cmListFileBacktrace(cmStateSnapshot bottom, Entry* up, cmListFileContext const& lfc); - cmListFileBacktrace(cmState::Snapshot bottom, Entry* cur); + cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur); }; struct cmListFile diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index b6fb3e6..d90094b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -249,7 +249,7 @@ void cmLocalGenerator::GenerateTestFiles() (*gi)->Compute(this); (*gi)->Generate(fout, config, configurationTypes); } - typedef std::vector vec_t; + typedef std::vector vec_t; vec_t const& children = this->Makefile->GetStateSnapshot().GetChildren(); std::string parentBinDir = this->GetCurrentBinaryDirectory(); for (vec_t::const_iterator i = children.begin(); i != children.end(); ++i) { @@ -446,12 +446,12 @@ void cmLocalGenerator::GenerateInstallRules() this->GenerateTargetInstallRules(fout, config, configurationTypes); // Include install scripts from subdirectories. - std::vector children = + std::vector children = this->Makefile->GetStateSnapshot().GetChildren(); if (!children.empty()) { fout << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n"; fout << " # Include the install script for each subdirectory.\n"; - for (std::vector::const_iterator ci = children.begin(); + for (std::vector::const_iterator ci = children.begin(); ci != children.end(); ++ci) { if (!ci->GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL")) { std::string odir = ci->GetDirectory().GetCurrentBinary(); @@ -563,7 +563,7 @@ cmState* cmLocalGenerator::GetState() const return this->GlobalGenerator->GetCMakeInstance()->GetState(); } -cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const +cmStateSnapshot cmLocalGenerator::GetStateSnapshot() const { return this->Makefile->GetStateSnapshot(); } @@ -1868,7 +1868,7 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature, featureName += "_"; featureName += cmSystemTools::UpperCase(config); } - cmState::Snapshot snp = this->StateSnapshot; + cmStateSnapshot snp = this->StateSnapshot; while (snp.IsValid()) { if (const char* value = snp.GetDirectory().GetProperty(featureName)) { return value; diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 055e1a9..1cea655 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -92,7 +92,7 @@ public: cmGeneratorTarget& tgt) const; cmState* GetState() const; - cmState::Snapshot GetStateSnapshot() const; + cmStateSnapshot GetStateSnapshot() const; void AddArchitectureFlags(std::string& flags, cmGeneratorTarget const* target, @@ -337,7 +337,7 @@ protected: virtual bool CheckDefinition(std::string const& define) const; cmMakefile* Makefile; - cmState::Snapshot StateSnapshot; + cmStateSnapshot StateSnapshot; cmListFileBacktrace DirectoryBacktrace; cmGlobalGenerator* GlobalGenerator; std::map UniqueObjectNamesMap; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 5036b0d..47cb246 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -45,7 +45,7 @@ class cmMessenger; // default is not to be building executables cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, - cmState::Snapshot const& snapshot) + cmStateSnapshot const& snapshot) : GlobalGenerator(globalGenerator) , StateSnapshot(snapshot) , Backtrace(snapshot) @@ -1356,7 +1356,7 @@ private: cmMakefile* Makefile; cmGlobalGenerator* GG; cmMakefile* CurrentMakefile; - cmState::Snapshot Snapshot; + cmStateSnapshot Snapshot; bool ReportError; }; @@ -1538,7 +1538,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath, return; } - cmState::Snapshot newSnapshot = + cmStateSnapshot newSnapshot = this->GetState()->CreateBuildsystemDirectorySnapshot(this->StateSnapshot); newSnapshot.GetDirectory().SetCurrentSource(srcPath); @@ -3621,7 +3621,7 @@ void cmMakefile::AddCMakeDependFilesFromUser() std::string cmMakefile::FormatListFileStack() const { std::vector listFiles; - cmState::Snapshot snp = this->StateSnapshot; + cmStateSnapshot snp = this->StateSnapshot; while (snp.IsValid()) { listFiles.push_back(snp.GetExecutionListFile()); snp = snp.GetCallStackParent(); @@ -3918,7 +3918,7 @@ void cmMakefile::StoreMatches(cmsys::RegularExpression& re) this->MarkVariableAsUsed(nMatchesVariable); } -cmState::Snapshot cmMakefile::GetStateSnapshot() const +cmStateSnapshot cmMakefile::GetStateSnapshot() const { return this->StateSnapshot; } @@ -3999,7 +3999,7 @@ void cmMakefile::PopPolicy() void cmMakefile::PopSnapshot(bool reportError) { - // cmState::Snapshot manages nested policy scopes within it. + // cmStateSnapshot manages nested policy scopes within it. // Since the scope corresponding to the snapshot is closing, // reject any still-open nested policy scopes with an error. while (!this->StateSnapshot.CanPopPolicyScope()) { diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index e7e8a0b..8ac0e33 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -70,7 +70,7 @@ public: * Construct an empty makefile. */ cmMakefile(cmGlobalGenerator* globalGenerator, - const cmState::Snapshot& snapshot); + const cmStateSnapshot& snapshot); /** * Destructor. @@ -753,7 +753,7 @@ public: void ClearMatches(); void StoreMatches(cmsys::RegularExpression& re); - cmState::Snapshot GetStateSnapshot() const; + cmStateSnapshot GetStateSnapshot() const; const char* GetDefineFlagsCMP0059() const; @@ -829,7 +829,7 @@ private: cmMakefile(const cmMakefile& mf); cmMakefile& operator=(const cmMakefile& mf); - cmState::Snapshot StateSnapshot; + cmStateSnapshot StateSnapshot; cmListFileBacktrace Backtrace; void ReadListFile(cmListFile const& listFile, diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index a1228e5..c219fdf 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -11,7 +11,7 @@ #include #include -cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot) +cmOutputConverter::cmOutputConverter(cmStateSnapshot snapshot) : StateSnapshot(snapshot) , LinkScriptShell(false) { diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 9e745ec..2a81dab 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -13,7 +13,7 @@ class cmOutputConverter { public: - cmOutputConverter(cmState::Snapshot snapshot); + cmOutputConverter(cmStateSnapshot snapshot); enum OutputFormat { @@ -125,7 +125,7 @@ private: static std::string Shell__GetArgument(const char* in, int flags); private: - cmState::Snapshot StateSnapshot; + cmStateSnapshot StateSnapshot; bool LinkScriptShell; }; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index b66257c..3c2b148 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -165,7 +165,7 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory, cm.GetCurrentSnapshot().SetDefaultDefinitions(); cmGlobalGenerator gg(&cm); - cmState::Snapshot snapshot = cm.GetCurrentSnapshot(); + cmStateSnapshot snapshot = cm.GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentBinary(targetDirectory); snapshot.GetDirectory().SetCurrentSource(targetDirectory); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index b50c8bd..388984f 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -481,7 +481,7 @@ void cmake::ReadListFile(const std::vector& args, std::string homeOutputDir = this->GetHomeOutputDirectory(); this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory()); this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory()); - cmState::Snapshot snapshot = this->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentBinary( cmSystemTools::GetCurrentWorkingDirectory()); snapshot.GetDirectory().SetCurrentSource( @@ -517,7 +517,7 @@ bool cmake::FindPackage(const std::vector& args) cmGlobalGenerator* gg = new cmGlobalGenerator(this); this->SetGlobalGenerator(gg); - cmState::Snapshot snapshot = this->GetCurrentSnapshot(); + cmStateSnapshot snapshot = this->GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentBinary( cmSystemTools::GetCurrentWorkingDirectory()); snapshot.GetDirectory().SetCurrentSource( diff --git a/Source/cmake.h b/Source/cmake.h index cff753f..0a577ad 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -407,14 +407,11 @@ public: void WatchUnusedCli(const std::string& var); cmState* GetState() const { return this->State; } - void SetCurrentSnapshot(cmState::Snapshot snapshot) + void SetCurrentSnapshot(cmStateSnapshot snapshot) { this->CurrentSnapshot = snapshot; } - cmState::Snapshot GetCurrentSnapshot() const - { - return this->CurrentSnapshot; - } + cmStateSnapshot GetCurrentSnapshot() const { return this->CurrentSnapshot; } protected: void RunCheckForUnusedVariables(); @@ -490,7 +487,7 @@ private: InstalledFilesMap InstalledFiles; cmState* State; - cmState::Snapshot CurrentSnapshot; + cmStateSnapshot CurrentSnapshot; cmMessenger* Messenger; std::vector TraceOnlyThisSources; diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 4387bf6..912acdb 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -760,7 +760,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) cm.GetCurrentSnapshot().SetDefaultDefinitions(); if (cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen)) { cm.SetGlobalGenerator(ggd); - cmState::Snapshot snapshot = cm.GetCurrentSnapshot(); + cmStateSnapshot snapshot = cm.GetCurrentSnapshot(); snapshot.GetDirectory().SetCurrentBinary(startOutDir); snapshot.GetDirectory().SetCurrentSource(startDir); CM_AUTO_PTR mf(new cmMakefile(ggd, snapshot)); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9bf981a4c0ee3aece0b162ba7ebc76ad99330eb commit a9bf981a4c0ee3aece0b162ba7ebc76ad99330eb Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:47 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:58 2016 +0200 cmState: Move Snapshot type to separate namespace Leave behind a typedef to avoid porting dependent code in this commit. diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 31aac63..32fe66c 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -96,7 +96,7 @@ struct cmStateDetail::BuildsystemDirectoryStateType cmPropertyMap Properties; - std::vector Children; + std::vector Children; }; cmState::cmState() @@ -304,7 +304,7 @@ void cmState::RemoveCacheEntryProperty(std::string const& key, .SetProperty(propertyName, (void*)CM_NULLPTR); } -cmState::Snapshot cmState::Reset() +cmStateSnapshot cmState::Reset() { this->GlobalProperties.clear(); this->PropertyDefinitions.clear(); @@ -360,7 +360,7 @@ cmState::Snapshot cmState::Reset() this->DefineProperty("RULE_LAUNCH_LINK", cmProperty::TARGET, "", "", true); this->DefineProperty("RULE_LAUNCH_CUSTOM", cmProperty::TARGET, "", "", true); - return Snapshot(this, pos); + return cmStateSnapshot(this, pos); } void cmState::DefineProperty(const std::string& name, @@ -682,8 +682,8 @@ void cmStateDirectory::ComputeRelativePathTopSource() // construct relative paths passed to build tools so it is safe to use // even when the source is a network path. - cmState::Snapshot snapshot = this->Snapshot_; - std::vector snapshots; + cmStateSnapshot snapshot = this->Snapshot_; + std::vector snapshots; snapshots.push_back(snapshot); while (true) { snapshot = snapshot.GetBuildsystemDirectoryParent(); @@ -696,8 +696,7 @@ void cmStateDirectory::ComputeRelativePathTopSource() std::string result = snapshots.front().GetDirectory().GetCurrentSource(); - for (std::vector::const_iterator it = - snapshots.begin() + 1; + for (std::vector::const_iterator it = snapshots.begin() + 1; it != snapshots.end(); ++it) { std::string currentSource = it->GetDirectory().GetCurrentSource(); if (cmSystemTools::IsSubDirectory(result, currentSource)) { @@ -709,8 +708,8 @@ void cmStateDirectory::ComputeRelativePathTopSource() void cmStateDirectory::ComputeRelativePathTopBinary() { - cmState::Snapshot snapshot = this->Snapshot_; - std::vector snapshots; + cmStateSnapshot snapshot = this->Snapshot_; + std::vector snapshots; snapshots.push_back(snapshot); while (true) { snapshot = snapshot.GetBuildsystemDirectoryParent(); @@ -723,8 +722,7 @@ void cmStateDirectory::ComputeRelativePathTopBinary() std::string result = snapshots.front().GetDirectory().GetCurrentBinary(); - for (std::vector::const_iterator it = - snapshots.begin() + 1; + for (std::vector::const_iterator it = snapshots.begin() + 1; it != snapshots.end(); ++it) { std::string currentBinary = it->GetDirectory().GetCurrentBinary(); if (cmSystemTools::IsSubDirectory(result, currentBinary)) { @@ -742,7 +740,7 @@ void cmStateDirectory::ComputeRelativePathTopBinary() } } -cmState::Snapshot cmState::CreateBaseSnapshot() +cmStateSnapshot cmState::CreateBaseSnapshot() { cmStateDetail::PositionType pos = this->SnapshotData.Push(this->SnapshotData.Root()); @@ -767,11 +765,11 @@ cmState::Snapshot cmState::CreateBaseSnapshot() assert(pos->Vars.IsValid()); pos->Parent = this->VarTree.Root(); pos->Root = this->VarTree.Root(); - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreateBuildsystemDirectorySnapshot( - Snapshot originSnapshot) +cmStateSnapshot cmState::CreateBuildsystemDirectorySnapshot( + cmStateSnapshot originSnapshot) { assert(originSnapshot.IsValid()); cmStateDetail::PositionType pos = @@ -796,7 +794,7 @@ cmState::Snapshot cmState::CreateBuildsystemDirectorySnapshot( pos->Root = origin; pos->Vars = this->VarTree.Push(origin); - cmState::Snapshot snapshot = cmState::Snapshot(this, pos); + cmStateSnapshot snapshot = cmStateSnapshot(this, pos); originSnapshot.Position->BuildSystemDirectory->Children.push_back(snapshot); snapshot.SetDefaultDefinitions(); snapshot.InitializeFromParent(); @@ -804,8 +802,8 @@ cmState::Snapshot cmState::CreateBuildsystemDirectorySnapshot( return snapshot; } -cmState::Snapshot cmState::CreateFunctionCallSnapshot( - cmState::Snapshot originSnapshot, std::string const& fileName) +cmStateSnapshot cmState::CreateFunctionCallSnapshot( + cmStateSnapshot originSnapshot, std::string const& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -820,11 +818,11 @@ cmState::Snapshot cmState::CreateFunctionCallSnapshot( cmLinkedTree::iterator origin = originSnapshot.Position->Vars; pos->Parent = origin; pos->Vars = this->VarTree.Push(origin); - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreateMacroCallSnapshot( - cmState::Snapshot originSnapshot, std::string const& fileName) +cmStateSnapshot cmState::CreateMacroCallSnapshot( + cmStateSnapshot originSnapshot, std::string const& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -835,11 +833,11 @@ cmState::Snapshot cmState::CreateMacroCallSnapshot( assert(originSnapshot.Position->Vars.IsValid()); pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreateIncludeFileSnapshot( - cmState::Snapshot originSnapshot, const std::string& fileName) +cmStateSnapshot cmState::CreateIncludeFileSnapshot( + cmStateSnapshot originSnapshot, const std::string& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -850,11 +848,11 @@ cmState::Snapshot cmState::CreateIncludeFileSnapshot( assert(originSnapshot.Position->Vars.IsValid()); pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreateVariableScopeSnapshot( - cmState::Snapshot originSnapshot) +cmStateSnapshot cmState::CreateVariableScopeSnapshot( + cmStateSnapshot originSnapshot) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -868,11 +866,11 @@ cmState::Snapshot cmState::CreateVariableScopeSnapshot( pos->Parent = origin; pos->Vars = this->VarTree.Push(origin); assert(pos->Vars.IsValid()); - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreateInlineListFileSnapshot( - cmState::Snapshot originSnapshot, const std::string& fileName) +cmStateSnapshot cmState::CreateInlineListFileSnapshot( + cmStateSnapshot originSnapshot, const std::string& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -882,11 +880,11 @@ cmState::Snapshot cmState::CreateInlineListFileSnapshot( originSnapshot.Position->ExecutionListFile, fileName); pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::CreatePolicyScopeSnapshot( - cmState::Snapshot originSnapshot) +cmStateSnapshot cmState::CreatePolicyScopeSnapshot( + cmStateSnapshot originSnapshot) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -894,10 +892,10 @@ cmState::Snapshot cmState::CreatePolicyScopeSnapshot( pos->Keep = false; pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmState::Snapshot(this, pos); + return cmStateSnapshot(this, pos); } -cmState::Snapshot cmState::Pop(cmState::Snapshot originSnapshot) +cmStateSnapshot cmState::Pop(cmStateSnapshot originSnapshot) { cmStateDetail::PositionType pos = originSnapshot.Position; cmStateDetail::PositionType prevPos = pos; @@ -922,28 +920,28 @@ cmState::Snapshot cmState::Pop(cmState::Snapshot originSnapshot) this->SnapshotData.Pop(pos); } - return Snapshot(this, prevPos); + return cmStateSnapshot(this, prevPos); } -cmState::Snapshot::Snapshot(cmState* state) +cmStateSnapshot::cmStateSnapshot(cmState* state) : State(state) , Position() { } -std::vector cmState::Snapshot::GetChildren() +std::vector cmStateSnapshot::GetChildren() { return this->Position->BuildSystemDirectory->Children; } -cmState::Snapshot::Snapshot(cmState* state, - cmStateDetail::PositionType position) +cmStateSnapshot::cmStateSnapshot(cmState* state, + cmStateDetail::PositionType position) : State(state) , Position(position) { } -cmStateEnums::SnapshotType cmState::Snapshot::GetType() const +cmStateEnums::SnapshotType cmStateSnapshot::GetType() const { return this->Position->SnapshotType; } @@ -982,7 +980,7 @@ void cmStateDirectory::SetCurrentBinary(std::string const& dir) this->Snapshot_.SetDefinition("CMAKE_CURRENT_BINARY_DIR", loc); } -void cmState::Snapshot::SetListFile(const std::string& listfile) +void cmStateSnapshot::SetListFile(const std::string& listfile) { *this->Position->ExecutionListFile = listfile; } @@ -1007,39 +1005,39 @@ void cmStateDirectory::SetRelativePathTopBinary(const char* dir) this->DirectoryState->RelativePathTopBinary = dir; } -std::string cmState::Snapshot::GetExecutionListFile() const +std::string cmStateSnapshot::GetExecutionListFile() const { return *this->Position->ExecutionListFile; } -bool cmState::Snapshot::IsValid() const +bool cmStateSnapshot::IsValid() const { return this->State && this->Position.IsValid() ? this->Position != this->State->SnapshotData.Root() : false; } -cmState::Snapshot cmState::Snapshot::GetBuildsystemDirectoryParent() const +cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const { - Snapshot snapshot; + cmStateSnapshot snapshot; if (!this->State || this->Position == this->State->SnapshotData.Root()) { return snapshot; } cmStateDetail::PositionType parentPos = this->Position->DirectoryParent; if (parentPos != this->State->SnapshotData.Root()) { - snapshot = - Snapshot(this->State, parentPos->BuildSystemDirectory->DirectoryEnd); + snapshot = cmStateSnapshot(this->State, + parentPos->BuildSystemDirectory->DirectoryEnd); } return snapshot; } -cmState::Snapshot cmState::Snapshot::GetCallStackParent() const +cmStateSnapshot cmStateSnapshot::GetCallStackParent() const { assert(this->State); assert(this->Position != this->State->SnapshotData.Root()); - Snapshot snapshot; + cmStateSnapshot snapshot; cmStateDetail::PositionType parentPos = this->Position; while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || parentPos->SnapshotType == cmStateEnums::VariableScopeType) { @@ -1060,11 +1058,11 @@ cmState::Snapshot cmState::Snapshot::GetCallStackParent() const return snapshot; } - snapshot = Snapshot(this->State, parentPos); + snapshot = cmStateSnapshot(this->State, parentPos); return snapshot; } -cmState::Snapshot cmState::Snapshot::GetCallStackBottom() const +cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const { assert(this->State); assert(this->Position != this->State->SnapshotData.Root()); @@ -1075,17 +1073,17 @@ cmState::Snapshot cmState::Snapshot::GetCallStackBottom() const pos != this->State->SnapshotData.Root()) { ++pos; } - return Snapshot(this->State, pos); + return cmStateSnapshot(this->State, pos); } -void cmState::Snapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) +void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) { cmStateDetail::PositionType pos = this->Position; pos->Policies = this->State->PolicyStack.Push( pos->Policies, cmStateDetail::PolicyStackEntry(entry, weak)); } -bool cmState::Snapshot::PopPolicy() +bool cmStateSnapshot::PopPolicy() { cmStateDetail::PositionType pos = this->Position; if (pos->Policies == pos->PolicyScope) { @@ -1095,13 +1093,13 @@ bool cmState::Snapshot::PopPolicy() return true; } -bool cmState::Snapshot::CanPopPolicyScope() +bool cmStateSnapshot::CanPopPolicyScope() { return this->Position->Policies == this->Position->PolicyScope; } -void cmState::Snapshot::SetPolicy(cmPolicies::PolicyID id, - cmPolicies::PolicyStatus status) +void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id, + cmPolicies::PolicyStatus status) { // Update the policy stack from the top to the top-most strong entry. bool previous_was_weak = true; @@ -1113,7 +1111,7 @@ void cmState::Snapshot::SetPolicy(cmPolicies::PolicyID id, } } -cmPolicies::PolicyStatus cmState::Snapshot::GetPolicy( +cmPolicies::PolicyStatus cmStateSnapshot::GetPolicy( cmPolicies::PolicyID id) const { cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id); @@ -1148,49 +1146,49 @@ cmPolicies::PolicyStatus cmState::Snapshot::GetPolicy( return status; } -bool cmState::Snapshot::HasDefinedPolicyCMP0011() +bool cmStateSnapshot::HasDefinedPolicyCMP0011() { return !this->Position->Policies->IsEmpty(); } -const char* cmState::Snapshot::GetDefinition(std::string const& name) const +const char* cmStateSnapshot::GetDefinition(std::string const& name) const { assert(this->Position->Vars.IsValid()); return cmDefinitions::Get(name, this->Position->Vars, this->Position->Root); } -bool cmState::Snapshot::IsInitialized(std::string const& name) const +bool cmStateSnapshot::IsInitialized(std::string const& name) const { return cmDefinitions::HasKey(name, this->Position->Vars, this->Position->Root); } -void cmState::Snapshot::SetDefinition(std::string const& name, - std::string const& value) +void cmStateSnapshot::SetDefinition(std::string const& name, + std::string const& value) { this->Position->Vars->Set(name, value.c_str()); } -void cmState::Snapshot::RemoveDefinition(std::string const& name) +void cmStateSnapshot::RemoveDefinition(std::string const& name) { this->Position->Vars->Set(name, CM_NULLPTR); } -std::vector cmState::Snapshot::UnusedKeys() const +std::vector cmStateSnapshot::UnusedKeys() const { return this->Position->Vars->UnusedKeys(); } -std::vector cmState::Snapshot::ClosureKeys() const +std::vector cmStateSnapshot::ClosureKeys() const { return cmDefinitions::ClosureKeys(this->Position->Vars, this->Position->Root); } -bool cmState::Snapshot::RaiseScope(std::string const& var, const char* varDef) +bool cmStateSnapshot::RaiseScope(std::string const& var, const char* varDef) { if (this->Position->ScopeParent == this->Position->DirectoryParent) { - Snapshot parentDir = this->GetBuildsystemDirectoryParent(); + cmStateSnapshot parentDir = this->GetBuildsystemDirectoryParent(); if (!parentDir.IsValid()) { return false; } @@ -1241,7 +1239,7 @@ void InitializeContentFromParent(T& parentContent, T& thisContent, contentEndPosition = thisContent.size(); } -void cmState::Snapshot::SetDefaultDefinitions() +void cmStateSnapshot::SetDefaultDefinitions() { /* Up to CMake 2.4 here only WIN32, UNIX and APPLE were set. With CMake must separate between target and host platform. In most cases @@ -1296,7 +1294,7 @@ void cmState::Snapshot::SetDefaultDefinitions() "INCLUDE_REGULAR_EXPRESSION", "^.*$"); } -void cmState::Snapshot::SetDirectoryDefinitions() +void cmStateSnapshot::SetDirectoryDefinitions() { this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", @@ -1306,7 +1304,7 @@ void cmState::Snapshot::SetDirectoryDefinitions() this->State->GetBinaryDirectory()); } -void cmState::Snapshot::InitializeFromParent() +void cmStateSnapshot::InitializeFromParent() { cmStateDetail::PositionType parent = this->Position->DirectoryParent; assert(this->Position->Vars.IsValid()); @@ -1337,27 +1335,27 @@ void cmState::Snapshot::InitializeFromParent() this->Position->CompileOptionsPosition); } -cmState* cmState::Snapshot::GetState() const +cmState* cmStateSnapshot::GetState() const { return this->State; } -cmStateDirectory cmState::Snapshot::GetDirectory() const +cmStateDirectory cmStateSnapshot::GetDirectory() const { return cmStateDirectory(this->Position->BuildSystemDirectory, *this); } -void cmState::Snapshot::SetProjectName(const std::string& name) +void cmStateSnapshot::SetProjectName(const std::string& name) { this->Position->BuildSystemDirectory->ProjectName = name; } -std::string cmState::Snapshot::GetProjectName() const +std::string cmStateSnapshot::GetProjectName() const { return this->Position->BuildSystemDirectory->ProjectName; } -void cmState::Snapshot::InitializeFromParent_ForSubdirsCommand() +void cmStateSnapshot::InitializeFromParent_ForSubdirsCommand() { std::string currentSrcDir = this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR"); std::string currentBinDir = this->GetDefinition("CMAKE_CURRENT_BINARY_DIR"); @@ -1371,7 +1369,7 @@ void cmState::Snapshot::InitializeFromParent_ForSubdirsCommand() cmStateDirectory::cmStateDirectory( cmLinkedTree::iterator iter, - const cmState::Snapshot& snapshot) + const cmStateSnapshot& snapshot) : DirectoryState(iter) , Snapshot_(snapshot) { @@ -1591,8 +1589,8 @@ void cmStateDirectory::ClearCompileOptions() this->Snapshot_.Position->CompileOptionsPosition); } -bool cmState::Snapshot::StrictWeakOrder::operator()( - const cmState::Snapshot& lhs, const cmState::Snapshot& rhs) const +bool cmStateSnapshot::StrictWeakOrder::operator()( + const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) const { return lhs.Position.StrictWeakOrdered(rhs.Position); } @@ -1661,7 +1659,7 @@ const char* cmStateDirectory::GetProperty(const std::string& prop, static std::string output; output = ""; if (prop == "PARENT_DIRECTORY") { - cmState::Snapshot parent = this->Snapshot_.GetBuildsystemDirectoryParent(); + cmStateSnapshot parent = this->Snapshot_.GetBuildsystemDirectoryParent(); if (parent.IsValid()) { return parent.GetDirectory().GetCurrentSource(); } @@ -1677,9 +1675,9 @@ const char* cmStateDirectory::GetProperty(const std::string& prop, } if (prop == kSUBDIRECTORIES) { std::vector child_dirs; - std::vector const& children = + std::vector const& children = this->DirectoryState->Children; - for (std::vector::const_iterator ci = children.begin(); + for (std::vector::const_iterator ci = children.begin(); ci != children.end(); ++ci) { child_dirs.push_back(ci->GetDirectory().GetCurrentSource()); } @@ -1693,7 +1691,7 @@ const char* cmStateDirectory::GetProperty(const std::string& prop, if (prop == "LISTFILE_STACK") { std::vector listFiles; - cmState::Snapshot snp = this->Snapshot_; + cmStateSnapshot snp = this->Snapshot_; while (snp.IsValid()) { listFiles.push_back(snp.GetExecutionListFile()); snp = snp.GetCallStackParent(); @@ -1730,7 +1728,7 @@ const char* cmStateDirectory::GetProperty(const std::string& prop, const char* retVal = this->DirectoryState->Properties.GetPropertyValue(prop); if (!retVal && chain) { - cmState::Snapshot parentSnapshot = + cmStateSnapshot parentSnapshot = this->Snapshot_.GetBuildsystemDirectoryParent(); if (parentSnapshot.IsValid()) { return parentSnapshot.GetDirectory().GetProperty(prop, chain); @@ -1763,12 +1761,12 @@ void cmStateDirectory::AddNormalTargetName(std::string const& name) this->DirectoryState->NormalTargetNames.push_back(name); } -bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs) +bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) { return lhs.Position == rhs.Position; } -bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs) +bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) { return lhs.Position != rhs.Position; } diff --git a/Source/cmState.h b/Source/cmState.h index 843a5cf..82eec3f 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -69,97 +69,35 @@ enum CacheEntryType } class cmStateDirectory; +class cmStateSnapshot; class cmState { + friend class cmStateSnapshot; public: cmState(); ~cmState(); + typedef cmStateSnapshot Snapshot; typedef cmStateDirectory Directory; - class Snapshot - { - public: - Snapshot(cmState* state = CM_NULLPTR); - Snapshot(cmState* state, cmStateDetail::PositionType position); - - const char* GetDefinition(std::string const& name) const; - bool IsInitialized(std::string const& name) const; - void SetDefinition(std::string const& name, std::string const& value); - void RemoveDefinition(std::string const& name); - std::vector UnusedKeys() const; - std::vector ClosureKeys() const; - bool RaiseScope(std::string const& var, const char* varDef); - - void SetListFile(std::string const& listfile); - - std::string GetExecutionListFile() const; - - std::vector GetChildren(); - - bool IsValid() const; - Snapshot GetBuildsystemDirectoryParent() const; - Snapshot GetCallStackParent() const; - Snapshot GetCallStackBottom() const; - cmStateEnums::SnapshotType GetType() const; - - void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); - cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; - bool HasDefinedPolicyCMP0011(); - void PushPolicy(cmPolicies::PolicyMap entry, bool weak); - bool PopPolicy(); - bool CanPopPolicyScope(); - - cmState* GetState() const; - - cmStateDirectory GetDirectory() const; - - void SetProjectName(std::string const& name); - std::string GetProjectName() const; - - void InitializeFromParent_ForSubdirsCommand(); - - struct StrictWeakOrder - { - bool operator()(const cmState::Snapshot& lhs, - const cmState::Snapshot& rhs) const; - }; - - void SetDirectoryDefinitions(); - void SetDefaultDefinitions(); - - private: - friend bool operator==(const cmState::Snapshot& lhs, - const cmState::Snapshot& rhs); - friend bool operator!=(const cmState::Snapshot& lhs, - const cmState::Snapshot& rhs); - friend class cmState; - friend class cmStateDirectory; - friend struct StrictWeakOrder; - - void InitializeFromParent(); - - cmState* State; - cmStateDetail::PositionType Position; - }; - static const char* GetTargetTypeName(cmStateEnums::TargetType targetType); - Snapshot CreateBaseSnapshot(); - Snapshot CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot); - Snapshot CreateFunctionCallSnapshot(Snapshot originSnapshot, - std::string const& fileName); - Snapshot CreateMacroCallSnapshot(Snapshot originSnapshot, - std::string const& fileName); - Snapshot CreateIncludeFileSnapshot(Snapshot originSnapshot, - std::string const& fileName); - Snapshot CreateVariableScopeSnapshot(Snapshot originSnapshot); - Snapshot CreateInlineListFileSnapshot(Snapshot originSnapshot, - std::string const& fileName); - Snapshot CreatePolicyScopeSnapshot(Snapshot originSnapshot); - Snapshot Pop(Snapshot originSnapshot); + cmStateSnapshot CreateBaseSnapshot(); + cmStateSnapshot CreateBuildsystemDirectorySnapshot( + cmStateSnapshot originSnapshot); + cmStateSnapshot CreateFunctionCallSnapshot(cmStateSnapshot originSnapshot, + std::string const& fileName); + cmStateSnapshot CreateMacroCallSnapshot(cmStateSnapshot originSnapshot, + std::string const& fileName); + cmStateSnapshot CreateIncludeFileSnapshot(cmStateSnapshot originSnapshot, + std::string const& fileName); + cmStateSnapshot CreateVariableScopeSnapshot(cmStateSnapshot originSnapshot); + cmStateSnapshot CreateInlineListFileSnapshot(cmStateSnapshot originSnapshot, + std::string const& fileName); + cmStateSnapshot CreatePolicyScopeSnapshot(cmStateSnapshot originSnapshot); + cmStateSnapshot Pop(cmStateSnapshot originSnapshot); static cmStateEnums::CacheEntryType StringToCacheEntryType(const char*); static const char* CacheEntryTypeToString(cmStateEnums::CacheEntryType); @@ -204,7 +142,7 @@ public: std::string& value, cmStateEnums::CacheEntryType& type); - Snapshot Reset(); + cmStateSnapshot Reset(); // Define a property void DefineProperty(const std::string& name, cmProperty::ScopeType scope, const char* ShortDescription, @@ -295,11 +233,77 @@ private: bool MSYSShell; }; +class cmStateSnapshot +{ +public: + cmStateSnapshot(cmState* state = CM_NULLPTR); + cmStateSnapshot(cmState* state, cmStateDetail::PositionType position); + + const char* GetDefinition(std::string const& name) const; + bool IsInitialized(std::string const& name) const; + void SetDefinition(std::string const& name, std::string const& value); + void RemoveDefinition(std::string const& name); + std::vector UnusedKeys() const; + std::vector ClosureKeys() const; + bool RaiseScope(std::string const& var, const char* varDef); + + void SetListFile(std::string const& listfile); + + std::string GetExecutionListFile() const; + + std::vector GetChildren(); + + bool IsValid() const; + cmStateSnapshot GetBuildsystemDirectoryParent() const; + cmStateSnapshot GetCallStackParent() const; + cmStateSnapshot GetCallStackBottom() const; + cmStateEnums::SnapshotType GetType() const; + + void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); + cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; + bool HasDefinedPolicyCMP0011(); + void PushPolicy(cmPolicies::PolicyMap entry, bool weak); + bool PopPolicy(); + bool CanPopPolicyScope(); + + cmState* GetState() const; + + cmStateDirectory GetDirectory() const; + + void SetProjectName(std::string const& name); + std::string GetProjectName() const; + + void InitializeFromParent_ForSubdirsCommand(); + + struct StrictWeakOrder + { + bool operator()(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs) const; + }; + + void SetDirectoryDefinitions(); + void SetDefaultDefinitions(); + +private: + friend bool operator==(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs); + friend bool operator!=(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs); + friend class cmState; + friend class cmStateDirectory; + friend struct StrictWeakOrder; + + void InitializeFromParent(); + + cmState* State; + cmStateDetail::PositionType Position; +}; + class cmStateDirectory { cmStateDirectory( cmLinkedTree::iterator iter, - cmState::Snapshot const& snapshot); + cmStateSnapshot const& snapshot); public: const char* GetCurrentSource() const; @@ -356,11 +360,11 @@ private: private: cmLinkedTree::iterator DirectoryState; - cmState::Snapshot Snapshot_; - friend class cmState::Snapshot; + cmStateSnapshot Snapshot_; + friend class cmStateSnapshot; }; -bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); -bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); +bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); +bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17d27893e6fdc70a39a35cad468f332f968e44e7 commit 17d27893e6fdc70a39a35cad468f332f968e44e7 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:47 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:58 2016 +0200 cmState: Port dependent code to new cmStateDirectory name diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index efa95a5..24a3277 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1415,13 +1415,13 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() } cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const + cmOutputConverter* outputConverter, cmStateDirectory stateDir) const { return new cmLinkLineComputer(outputConverter, stateDir); } cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const + cmOutputConverter* outputConverter, cmStateDirectory stateDir) const { return new cmMSVC60LinkLineComputer(outputConverter, stateDir); } diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index c3498e0..0f483db 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -108,10 +108,10 @@ public: virtual void Generate(); virtual cmLinkLineComputer* CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const; + cmOutputConverter* outputConverter, cmStateDirectory stateDir) const; cmLinkLineComputer* CreateMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) const; + cmOutputConverter* outputConverter, cmStateDirectory stateDir) const; /** * Set/Get and Clear the enabled languages. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 98654c5..a84baca 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -66,7 +66,7 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os, } cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory /* stateDir */) const + cmOutputConverter* outputConverter, cmStateDirectory /* stateDir */) const { return new cmNinjaLinkLineComputer( outputConverter, diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 6b77a2b..d4a14e2 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -72,7 +72,7 @@ public: cmLinkLineComputer* CreateLinkLineComputer( cmOutputConverter* outputConverter, - cmState::Directory stateDir) const CM_OVERRIDE; + cmStateDirectory stateDir) const CM_OVERRIDE; /** * Write the given @a comment to the output stream @a os. It diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 5fc861b..f6d5e70 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -7,7 +7,7 @@ #include "cmOutputConverter.h" cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir) + cmStateDirectory stateDir) : StateDir(stateDir) , OutputConverter(outputConverter) , ForResponse(false) diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index 1fb9b24..59e7357 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -13,7 +13,7 @@ class cmLinkLineComputer { public: cmLinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir); + cmStateDirectory stateDir); virtual ~cmLinkLineComputer(); void SetUseWatcomQuote(bool useWatcomQuote); @@ -39,7 +39,7 @@ private: std::string ConvertToOutputFormat(std::string const& input); std::string ConvertToOutputForExisting(std::string const& input); - cmState::Directory StateDir; + cmStateDirectory StateDir; cmOutputConverter* OutputConverter; bool ForResponse; diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx index 2b6df2a..9308d91 100644 --- a/Source/cmMSVC60LinkLineComputer.cxx +++ b/Source/cmMSVC60LinkLineComputer.cxx @@ -6,7 +6,7 @@ #include "cmSystemTools.h" cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) + cmOutputConverter* outputConverter, cmStateDirectory stateDir) : cmLinkLineComputer(outputConverter, stateDir) { } diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h index ca9da31..381b8a2 100644 --- a/Source/cmMSVC60LinkLineComputer.h +++ b/Source/cmMSVC60LinkLineComputer.h @@ -10,7 +10,7 @@ class cmMSVC60LinkLineComputer : public cmLinkLineComputer { public: cmMSVC60LinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir); + cmStateDirectory stateDir); std::string ConvertToLinkReference(std::string const& input) const CM_OVERRIDE; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index f0502bf..97c430f 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1232,7 +1232,7 @@ class cmMakefileTargetGeneratorObjectStrings public: cmMakefileTargetGeneratorObjectStrings(std::vector& strings, cmOutputConverter* outputConverter, - cmState::Directory stateDir, + cmStateDirectory stateDir, std::string::size_type limit) : Strings(strings) , OutputConverter(outputConverter) @@ -1277,7 +1277,7 @@ private: std::vector& Strings; cmOutputConverter* OutputConverter; - cmState::Directory StateDir; + cmStateDirectory StateDir; std::string::size_type LengthLimit; std::string CurrentString; std::string NextObject; @@ -1553,7 +1553,7 @@ std::string cmMakefileTargetGenerator::CreateResponseFile( } cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir) + cmOutputConverter* outputConverter, cmStateDirectory stateDir) { if (this->Makefile->IsOn("MSVC60")) { return this->GlobalGenerator->CreateMSVC60LinkLineComputer(outputConverter, diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 4c61011..e44f64a 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -141,7 +141,7 @@ protected: std::vector& makefile_depends); cmLinkLineComputer* CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir); + cmOutputConverter* outputConverter, cmStateDirectory stateDir); /** Create a response file with the given set of options. Returns the relative path from the target build working directory to the diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx index 3dcb20b..fa9df6d 100644 --- a/Source/cmNinjaLinkLineComputer.cxx +++ b/Source/cmNinjaLinkLineComputer.cxx @@ -5,7 +5,7 @@ #include "cmGlobalNinjaGenerator.h" cmNinjaLinkLineComputer::cmNinjaLinkLineComputer( - cmOutputConverter* outputConverter, cmState::Directory stateDir, + cmOutputConverter* outputConverter, cmStateDirectory stateDir, cmGlobalNinjaGenerator const* gg) : cmLinkLineComputer(outputConverter, stateDir) , GG(gg) diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h index a108568..daecea4 100644 --- a/Source/cmNinjaLinkLineComputer.h +++ b/Source/cmNinjaLinkLineComputer.h @@ -13,7 +13,7 @@ class cmNinjaLinkLineComputer : public cmLinkLineComputer { public: cmNinjaLinkLineComputer(cmOutputConverter* outputConverter, - cmState::Directory stateDir, + cmStateDirectory stateDir, cmGlobalNinjaGenerator const* gg); std::string ConvertToLinkReference(std::string const& input) const diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 84a433c..a1228e5 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -78,7 +78,7 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) bool cmOutputConverter::ContainedInDirectory(std::string const& local_path, std::string const& remote_path, - cmState::Directory directory) + cmStateDirectory directory) { const std::string relativePathTopBinary = directory.GetRelativePathTopBinary(); diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 71cacab..9e745ec 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -92,7 +92,7 @@ public: static bool ContainedInDirectory(std::string const& local_path, std::string const& remote_path, - cmState::Directory directory); + cmStateDirectory directory); /** * Convert the given remote path to a relative path with respect to https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34bcec39c68b82148635cec94a2f7d49d40edf75 commit 34bcec39c68b82148635cec94a2f7d49d40edf75 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:47 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:58 2016 +0200 cmState: Move Directory class to separate namespace Leave behind a typedef to avoid porting dependent code in this commit. diff --git a/Source/cmState.cxx b/Source/cmState.cxx index a52374f..31aac63 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -676,7 +676,7 @@ const char* cmState::GetBinaryDirectory() const return this->BinaryDirectory.c_str(); } -void cmState::Directory::ComputeRelativePathTopSource() +void cmStateDirectory::ComputeRelativePathTopSource() { // Relative path conversion inside the source tree is not used to // construct relative paths passed to build tools so it is safe to use @@ -707,7 +707,7 @@ void cmState::Directory::ComputeRelativePathTopSource() this->DirectoryState->RelativePathTopSource = result; } -void cmState::Directory::ComputeRelativePathTopBinary() +void cmStateDirectory::ComputeRelativePathTopBinary() { cmState::Snapshot snapshot = this->Snapshot_; std::vector snapshots; @@ -948,12 +948,12 @@ cmStateEnums::SnapshotType cmState::Snapshot::GetType() const return this->Position->SnapshotType; } -const char* cmState::Directory::GetCurrentSource() const +const char* cmStateDirectory::GetCurrentSource() const { return this->DirectoryState->Location.c_str(); } -void cmState::Directory::SetCurrentSource(std::string const& dir) +void cmStateDirectory::SetCurrentSource(std::string const& dir) { std::string& loc = this->DirectoryState->Location; loc = dir; @@ -965,12 +965,12 @@ void cmState::Directory::SetCurrentSource(std::string const& dir) this->Snapshot_.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", loc); } -const char* cmState::Directory::GetCurrentBinary() const +const char* cmStateDirectory::GetCurrentBinary() const { return this->DirectoryState->OutputLocation.c_str(); } -void cmState::Directory::SetCurrentBinary(std::string const& dir) +void cmStateDirectory::SetCurrentBinary(std::string const& dir) { std::string& loc = this->DirectoryState->OutputLocation; loc = dir; @@ -987,22 +987,22 @@ void cmState::Snapshot::SetListFile(const std::string& listfile) *this->Position->ExecutionListFile = listfile; } -const char* cmState::Directory::GetRelativePathTopSource() const +const char* cmStateDirectory::GetRelativePathTopSource() const { return this->DirectoryState->RelativePathTopSource.c_str(); } -const char* cmState::Directory::GetRelativePathTopBinary() const +const char* cmStateDirectory::GetRelativePathTopBinary() const { return this->DirectoryState->RelativePathTopBinary.c_str(); } -void cmState::Directory::SetRelativePathTopSource(const char* dir) +void cmStateDirectory::SetRelativePathTopSource(const char* dir) { this->DirectoryState->RelativePathTopSource = dir; } -void cmState::Directory::SetRelativePathTopBinary(const char* dir) +void cmStateDirectory::SetRelativePathTopBinary(const char* dir) { this->DirectoryState->RelativePathTopBinary = dir; } @@ -1342,9 +1342,9 @@ cmState* cmState::Snapshot::GetState() const return this->State; } -cmState::Directory cmState::Snapshot::GetDirectory() const +cmStateDirectory cmState::Snapshot::GetDirectory() const { - return Directory(this->Position->BuildSystemDirectory, *this); + return cmStateDirectory(this->Position->BuildSystemDirectory, *this); } void cmState::Snapshot::SetProjectName(const std::string& name) @@ -1369,7 +1369,7 @@ void cmState::Snapshot::InitializeFromParent_ForSubdirsCommand() this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", currentBinDir); } -cmState::Directory::Directory( +cmStateDirectory::cmStateDirectory( cmLinkedTree::iterator iter, const cmState::Snapshot& snapshot) : DirectoryState(iter) @@ -1450,15 +1450,14 @@ void ClearContent(T& content, U& backtraces, V& endContentPosition) endContentPosition = content.size(); } -cmStringRange cmState::Directory::GetIncludeDirectoriesEntries() const +cmStringRange cmStateDirectory::GetIncludeDirectoriesEntries() const { return GetPropertyContent( this->DirectoryState->IncludeDirectories, this->Snapshot_.Position->IncludeDirectoryPosition); } -cmBacktraceRange cmState::Directory::GetIncludeDirectoriesEntryBacktraces() - const +cmBacktraceRange cmStateDirectory::GetIncludeDirectoriesEntryBacktraces() const { return GetPropertyBacktraces( this->DirectoryState->IncludeDirectories, @@ -1466,7 +1465,7 @@ cmBacktraceRange cmState::Directory::GetIncludeDirectoriesEntryBacktraces() this->Snapshot_.Position->IncludeDirectoryPosition); } -void cmState::Directory::AppendIncludeDirectoriesEntry( +void cmStateDirectory::AppendIncludeDirectoriesEntry( const std::string& vec, const cmListFileBacktrace& lfbt) { AppendEntry(this->DirectoryState->IncludeDirectories, @@ -1474,7 +1473,7 @@ void cmState::Directory::AppendIncludeDirectoriesEntry( this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); } -void cmState::Directory::PrependIncludeDirectoriesEntry( +void cmStateDirectory::PrependIncludeDirectoriesEntry( const std::string& vec, const cmListFileBacktrace& lfbt) { std::vector::iterator entryEnd = @@ -1502,30 +1501,29 @@ void cmState::Directory::PrependIncludeDirectoriesEntry( this->DirectoryState->IncludeDirectories.size(); } -void cmState::Directory::SetIncludeDirectories(const std::string& vec, - const cmListFileBacktrace& lfbt) +void cmStateDirectory::SetIncludeDirectories(const std::string& vec, + const cmListFileBacktrace& lfbt) { SetContent(this->DirectoryState->IncludeDirectories, this->DirectoryState->IncludeDirectoryBacktraces, this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); } -void cmState::Directory::ClearIncludeDirectories() +void cmStateDirectory::ClearIncludeDirectories() { ClearContent(this->DirectoryState->IncludeDirectories, this->DirectoryState->IncludeDirectoryBacktraces, this->Snapshot_.Position->IncludeDirectoryPosition); } -cmStringRange cmState::Directory::GetCompileDefinitionsEntries() const +cmStringRange cmStateDirectory::GetCompileDefinitionsEntries() const { return GetPropertyContent( this->DirectoryState->CompileDefinitions, this->Snapshot_.Position->CompileDefinitionsPosition); } -cmBacktraceRange cmState::Directory::GetCompileDefinitionsEntryBacktraces() - const +cmBacktraceRange cmStateDirectory::GetCompileDefinitionsEntryBacktraces() const { return GetPropertyBacktraces( this->DirectoryState->CompileDefinitions, @@ -1533,7 +1531,7 @@ cmBacktraceRange cmState::Directory::GetCompileDefinitionsEntryBacktraces() this->Snapshot_.Position->CompileDefinitionsPosition); } -void cmState::Directory::AppendCompileDefinitionsEntry( +void cmStateDirectory::AppendCompileDefinitionsEntry( const std::string& vec, const cmListFileBacktrace& lfbt) { AppendEntry(this->DirectoryState->CompileDefinitions, @@ -1541,28 +1539,28 @@ void cmState::Directory::AppendCompileDefinitionsEntry( this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); } -void cmState::Directory::SetCompileDefinitions(const std::string& vec, - const cmListFileBacktrace& lfbt) +void cmStateDirectory::SetCompileDefinitions(const std::string& vec, + const cmListFileBacktrace& lfbt) { SetContent(this->DirectoryState->CompileDefinitions, this->DirectoryState->CompileDefinitionsBacktraces, this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); } -void cmState::Directory::ClearCompileDefinitions() +void cmStateDirectory::ClearCompileDefinitions() { ClearContent(this->DirectoryState->CompileDefinitions, this->DirectoryState->CompileDefinitionsBacktraces, this->Snapshot_.Position->CompileDefinitionsPosition); } -cmStringRange cmState::Directory::GetCompileOptionsEntries() const +cmStringRange cmStateDirectory::GetCompileOptionsEntries() const { return GetPropertyContent(this->DirectoryState->CompileOptions, this->Snapshot_.Position->CompileOptionsPosition); } -cmBacktraceRange cmState::Directory::GetCompileOptionsEntryBacktraces() const +cmBacktraceRange cmStateDirectory::GetCompileOptionsEntryBacktraces() const { return GetPropertyBacktraces( this->DirectoryState->CompileOptions, @@ -1570,7 +1568,7 @@ cmBacktraceRange cmState::Directory::GetCompileOptionsEntryBacktraces() const this->Snapshot_.Position->CompileOptionsPosition); } -void cmState::Directory::AppendCompileOptionsEntry( +void cmStateDirectory::AppendCompileOptionsEntry( const std::string& vec, const cmListFileBacktrace& lfbt) { AppendEntry(this->DirectoryState->CompileOptions, @@ -1578,15 +1576,15 @@ void cmState::Directory::AppendCompileOptionsEntry( this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); } -void cmState::Directory::SetCompileOptions(const std::string& vec, - const cmListFileBacktrace& lfbt) +void cmStateDirectory::SetCompileOptions(const std::string& vec, + const cmListFileBacktrace& lfbt) { SetContent(this->DirectoryState->CompileOptions, this->DirectoryState->CompileOptionsBacktraces, this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); } -void cmState::Directory::ClearCompileOptions() +void cmStateDirectory::ClearCompileOptions() { ClearContent(this->DirectoryState->CompileOptions, this->DirectoryState->CompileOptionsBacktraces, @@ -1599,9 +1597,8 @@ bool cmState::Snapshot::StrictWeakOrder::operator()( return lhs.Position.StrictWeakOrdered(rhs.Position); } -void cmState::Directory::SetProperty(const std::string& prop, - const char* value, - cmListFileBacktrace const& lfbt) +void cmStateDirectory::SetProperty(const std::string& prop, const char* value, + cmListFileBacktrace const& lfbt) { if (prop == "INCLUDE_DIRECTORIES") { if (!value) { @@ -1631,9 +1628,9 @@ void cmState::Directory::SetProperty(const std::string& prop, this->DirectoryState->Properties.SetProperty(prop, value); } -void cmState::Directory::AppendProperty(const std::string& prop, - const char* value, bool asString, - cmListFileBacktrace const& lfbt) +void cmStateDirectory::AppendProperty(const std::string& prop, + const char* value, bool asString, + cmListFileBacktrace const& lfbt) { if (prop == "INCLUDE_DIRECTORIES") { this->AppendIncludeDirectoriesEntry(value, lfbt); @@ -1651,15 +1648,15 @@ void cmState::Directory::AppendProperty(const std::string& prop, this->DirectoryState->Properties.AppendProperty(prop, value, asString); } -const char* cmState::Directory::GetProperty(const std::string& prop) const +const char* cmStateDirectory::GetProperty(const std::string& prop) const { const bool chain = this->Snapshot_.State->IsPropertyChained(prop, cmProperty::DIRECTORY); return this->GetProperty(prop, chain); } -const char* cmState::Directory::GetProperty(const std::string& prop, - bool chain) const +const char* cmStateDirectory::GetProperty(const std::string& prop, + bool chain) const { static std::string output; output = ""; @@ -1733,7 +1730,8 @@ const char* cmState::Directory::GetProperty(const std::string& prop, const char* retVal = this->DirectoryState->Properties.GetPropertyValue(prop); if (!retVal && chain) { - Snapshot parentSnapshot = this->Snapshot_.GetBuildsystemDirectoryParent(); + cmState::Snapshot parentSnapshot = + this->Snapshot_.GetBuildsystemDirectoryParent(); if (parentSnapshot.IsValid()) { return parentSnapshot.GetDirectory().GetProperty(prop, chain); } @@ -1743,12 +1741,12 @@ const char* cmState::Directory::GetProperty(const std::string& prop, return retVal; } -bool cmState::Directory::GetPropertyAsBool(const std::string& prop) const +bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const { return cmSystemTools::IsOn(this->GetProperty(prop)); } -std::vector cmState::Directory::GetPropertyKeys() const +std::vector cmStateDirectory::GetPropertyKeys() const { std::vector keys; keys.reserve(this->DirectoryState->Properties.size()); @@ -1760,7 +1758,7 @@ std::vector cmState::Directory::GetPropertyKeys() const return keys; } -void cmState::Directory::AddNormalTargetName(std::string const& name) +void cmStateDirectory::AddNormalTargetName(std::string const& name) { this->DirectoryState->NormalTargetNames.push_back(name); } diff --git a/Source/cmState.h b/Source/cmState.h index fdbbc98..843a5cf 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -68,6 +68,8 @@ enum CacheEntryType }; } +class cmStateDirectory; + class cmState { @@ -75,7 +77,7 @@ public: cmState(); ~cmState(); - class Directory; + typedef cmStateDirectory Directory; class Snapshot { @@ -112,7 +114,7 @@ public: cmState* GetState() const; - Directory GetDirectory() const; + cmStateDirectory GetDirectory() const; void SetProjectName(std::string const& name); std::string GetProjectName() const; @@ -134,7 +136,7 @@ public: friend bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); friend class cmState; - friend class Directory; + friend class cmStateDirectory; friend struct StrictWeakOrder; void InitializeFromParent(); @@ -143,71 +145,6 @@ public: cmStateDetail::PositionType Position; }; - class Directory - { - Directory(cmLinkedTree< - cmStateDetail::BuildsystemDirectoryStateType>::iterator iter, - Snapshot const& snapshot); - - public: - const char* GetCurrentSource() const; - void SetCurrentSource(std::string const& dir); - const char* GetCurrentBinary() const; - void SetCurrentBinary(std::string const& dir); - - const char* GetRelativePathTopSource() const; - const char* GetRelativePathTopBinary() const; - void SetRelativePathTopSource(const char* dir); - void SetRelativePathTopBinary(const char* dir); - - cmStringRange GetIncludeDirectoriesEntries() const; - cmBacktraceRange GetIncludeDirectoriesEntryBacktraces() const; - void AppendIncludeDirectoriesEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void PrependIncludeDirectoriesEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetIncludeDirectories(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearIncludeDirectories(); - - cmStringRange GetCompileDefinitionsEntries() const; - cmBacktraceRange GetCompileDefinitionsEntryBacktraces() const; - void AppendCompileDefinitionsEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetCompileDefinitions(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearCompileDefinitions(); - - cmStringRange GetCompileOptionsEntries() const; - cmBacktraceRange GetCompileOptionsEntryBacktraces() const; - void AppendCompileOptionsEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetCompileOptions(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearCompileOptions(); - - void SetProperty(const std::string& prop, const char* value, - cmListFileBacktrace const& lfbt); - void AppendProperty(const std::string& prop, const char* value, - bool asString, cmListFileBacktrace const& lfbt); - const char* GetProperty(const std::string& prop) const; - const char* GetProperty(const std::string& prop, bool chain) const; - bool GetPropertyAsBool(const std::string& prop) const; - std::vector GetPropertyKeys() const; - - void AddNormalTargetName(std::string const& name); - - private: - void ComputeRelativePathTopSource(); - void ComputeRelativePathTopBinary(); - - private: - cmLinkedTree::iterator - DirectoryState; - Snapshot Snapshot_; - friend class Snapshot; - }; - static const char* GetTargetTypeName(cmStateEnums::TargetType targetType); Snapshot CreateBaseSnapshot(); @@ -358,6 +295,71 @@ private: bool MSYSShell; }; +class cmStateDirectory +{ + cmStateDirectory( + cmLinkedTree::iterator iter, + cmState::Snapshot const& snapshot); + +public: + const char* GetCurrentSource() const; + void SetCurrentSource(std::string const& dir); + const char* GetCurrentBinary() const; + void SetCurrentBinary(std::string const& dir); + + const char* GetRelativePathTopSource() const; + const char* GetRelativePathTopBinary() const; + void SetRelativePathTopSource(const char* dir); + void SetRelativePathTopBinary(const char* dir); + + cmStringRange GetIncludeDirectoriesEntries() const; + cmBacktraceRange GetIncludeDirectoriesEntryBacktraces() const; + void AppendIncludeDirectoriesEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void PrependIncludeDirectoriesEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetIncludeDirectories(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearIncludeDirectories(); + + cmStringRange GetCompileDefinitionsEntries() const; + cmBacktraceRange GetCompileDefinitionsEntryBacktraces() const; + void AppendCompileDefinitionsEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetCompileDefinitions(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearCompileDefinitions(); + + cmStringRange GetCompileOptionsEntries() const; + cmBacktraceRange GetCompileOptionsEntryBacktraces() const; + void AppendCompileOptionsEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetCompileOptions(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearCompileOptions(); + + void SetProperty(const std::string& prop, const char* value, + cmListFileBacktrace const& lfbt); + void AppendProperty(const std::string& prop, const char* value, + bool asString, cmListFileBacktrace const& lfbt); + const char* GetProperty(const std::string& prop) const; + const char* GetProperty(const std::string& prop, bool chain) const; + bool GetPropertyAsBool(const std::string& prop) const; + std::vector GetPropertyKeys() const; + + void AddNormalTargetName(std::string const& name); + +private: + void ComputeRelativePathTopSource(); + void ComputeRelativePathTopBinary(); + +private: + cmLinkedTree::iterator + DirectoryState; + cmState::Snapshot Snapshot_; + friend class cmState::Snapshot; +}; + bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2fe3e55d53989c909be595b00a4749b75886accf commit 2fe3e55d53989c909be595b00a4749b75886accf Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:47 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:58 2016 +0200 cmState: Move CacheEntryType enum to separate namespace Port dependent code to the change. diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx index 5268a5d..3b81c65 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.cxx +++ b/Source/CursesDialog/cmCursesBoolWidget.cxx @@ -11,7 +11,7 @@ cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { - this->Type = cmState::BOOL; + this->Type = cmStateEnums::BOOL; set_field_fore(this->Field, A_NORMAL); set_field_back(this->Field, A_STANDOUT); field_opts_off(this->Field, O_STATIC); diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 93785e0..46c0d0c 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -47,7 +47,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( const char* value = cm->GetState()->GetCacheEntryValue(key); assert(value); switch (cm->GetState()->GetCacheEntryType(key)) { - case cmState::BOOL: + case cmStateEnums::BOOL: this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1); if (cmSystemTools::IsOn(value)) { static_cast(this->Entry)->SetValueAsBool(true); @@ -55,15 +55,15 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( static_cast(this->Entry)->SetValueAsBool(false); } break; - case cmState::PATH: + case cmStateEnums::PATH: this->Entry = new cmCursesPathWidget(this->EntryWidth, 1, 1, 1); static_cast(this->Entry)->SetString(value); break; - case cmState::FILEPATH: + case cmStateEnums::FILEPATH: this->Entry = new cmCursesFilePathWidget(this->EntryWidth, 1, 1, 1); static_cast(this->Entry)->SetString(value); break; - case cmState::STRING: { + case cmStateEnums::STRING: { const char* stringsProp = cm->GetState()->GetCacheEntryProperty(key, "STRINGS"); if (stringsProp) { @@ -83,7 +83,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( } break; } - case cmState::UNINITIALIZED: + case cmStateEnums::UNINITIALIZED: cmSystemTools::Error("Found an undefined variable: ", key.c_str()); break; default: diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx index 61d07e2..b5a1daa 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.cxx +++ b/Source/CursesDialog/cmCursesDummyWidget.cxx @@ -9,7 +9,7 @@ cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { - this->Type = cmState::INTERNAL; + this->Type = cmStateEnums::INTERNAL; } bool cmCursesDummyWidget::HandleInput(int& /*key*/, cmCursesMainForm* /*fm*/, diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx index 670c50f..ee5f2d7 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.cxx +++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx @@ -9,5 +9,5 @@ cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left, int top) : cmCursesPathWidget(width, height, left, top) { - this->Type = cmState::FILEPATH; + this->Type = cmStateEnums::FILEPATH; } diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 0c3d29d..0db0200 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -106,10 +106,10 @@ void cmCursesMainForm::InitializeUI() for (std::vector::const_iterator it = cacheKeys.begin(); it != cacheKeys.end(); ++it) { - cmState::CacheEntryType t = + cmStateEnums::CacheEntryType t = this->CMakeInstance->GetState()->GetCacheEntryType(*it); - if (t != cmState::INTERNAL && t != cmState::STATIC && - t != cmState::UNINITIALIZED) { + if (t != cmStateEnums::INTERNAL && t != cmStateEnums::STATIC && + t != cmStateEnums::UNINITIALIZED) { ++count; } } @@ -130,10 +130,10 @@ void cmCursesMainForm::InitializeUI() for (std::vector::const_iterator it = cacheKeys.begin(); it != cacheKeys.end(); ++it) { std::string key = *it; - cmState::CacheEntryType t = + cmStateEnums::CacheEntryType t = this->CMakeInstance->GetState()->GetCacheEntryType(*it); - if (t == cmState::INTERNAL || t == cmState::STATIC || - t == cmState::UNINITIALIZED) { + if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC || + t == cmStateEnums::UNINITIALIZED) { continue; } @@ -148,10 +148,10 @@ void cmCursesMainForm::InitializeUI() for (std::vector::const_iterator it = cacheKeys.begin(); it != cacheKeys.end(); ++it) { std::string key = *it; - cmState::CacheEntryType t = + cmStateEnums::CacheEntryType t = this->CMakeInstance->GetState()->GetCacheEntryType(*it); - if (t == cmState::INTERNAL || t == cmState::STATIC || - t == cmState::UNINITIALIZED) { + if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC || + t == cmStateEnums::UNINITIALIZED) { continue; } @@ -249,8 +249,9 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) cmCursesWidget* cw = reinterpret_cast(field_userptr(currentField)); // If in edit mode, get out of it - if (cw->GetType() == cmState::STRING || cw->GetType() == cmState::PATH || - cw->GetType() == cmState::FILEPATH) { + if (cw->GetType() == cmStateEnums::STRING || + cw->GetType() == cmStateEnums::PATH || + cw->GetType() == cmStateEnums::FILEPATH) { cmCursesStringWidget* sw = static_cast(cw); sw->SetInEdit(false); } @@ -704,7 +705,7 @@ void cmCursesMainForm::FillCacheManagerFromUI() std::string newValue = (*this->Entries)[i]->Entry->GetValue(); std::string fixedOldValue; std::string fixedNewValue; - cmState::CacheEntryType t = + cmStateEnums::CacheEntryType t = this->CMakeInstance->GetState()->GetCacheEntryType(cacheKey); this->FixValue(t, oldValue, fixedOldValue); this->FixValue(t, newValue, fixedNewValue); @@ -720,14 +721,14 @@ void cmCursesMainForm::FillCacheManagerFromUI() } } -void cmCursesMainForm::FixValue(cmState::CacheEntryType type, +void cmCursesMainForm::FixValue(cmStateEnums::CacheEntryType type, const std::string& in, std::string& out) const { out = in.substr(0, in.find_last_not_of(' ') + 1); - if (type == cmState::PATH || type == cmState::FILEPATH) { + if (type == cmStateEnums::PATH || type == cmStateEnums::FILEPATH) { cmSystemTools::ConvertToUnixSlashes(out); } - if (type == cmState::BOOL) { + if (type == cmStateEnums::BOOL) { if (cmSystemTools::IsOff(out.c_str())) { out = "OFF"; } else { diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index 4bf452d..10ae960 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -110,7 +110,7 @@ protected: // cache. void FillCacheManagerFromUI(); // Fix formatting of values to a consistent form. - void FixValue(cmState::CacheEntryType type, const std::string& in, + void FixValue(cmStateEnums::CacheEntryType type, const std::string& in, std::string& out) const; // Re-post the existing fields. Used to toggle between // normal and advanced modes. Render() should be called diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx index e23a82d..1b752a6 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.cxx +++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx @@ -11,7 +11,7 @@ cmCursesOptionsWidget::cmCursesOptionsWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { - this->Type = cmState::BOOL; // this is a bit of a hack + this->Type = cmStateEnums::BOOL; // this is a bit of a hack // there is no option type, and string type causes ccmake to cast // the widget into a string widget at some point. BOOL is safe for // now. diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx index d208598..3f96436 100644 --- a/Source/CursesDialog/cmCursesPathWidget.cxx +++ b/Source/CursesDialog/cmCursesPathWidget.cxx @@ -13,7 +13,7 @@ cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left, int top) : cmCursesStringWidget(width, height, left, top) { - this->Type = cmState::PATH; + this->Type = cmStateEnums::PATH; this->Cycle = false; this->CurrentIndex = 0; } @@ -50,7 +50,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w) std::vector dirs; cmSystemTools::SimpleGlob(glob, dirs, - (this->Type == cmState::PATH ? -1 : 0)); + (this->Type == cmStateEnums::PATH ? -1 : 0)); if (this->CurrentIndex < dirs.size()) { cstr = dirs[this->CurrentIndex]; } diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index f068f67..0f67d23 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -21,7 +21,7 @@ cmCursesStringWidget::cmCursesStringWidget(int width, int height, int left, : cmCursesWidget(width, height, left, top) { this->InEdit = false; - this->Type = cmState::STRING; + this->Type = cmStateEnums::STRING; set_field_fore(this->Field, A_NORMAL); set_field_back(this->Field, A_STANDOUT); field_opts_off(this->Field, O_STATIC); diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index bb26cf6..1ef4ab2 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -41,7 +41,7 @@ public: /** * Get the type of the widget (STRING, PATH etc...) */ - cmState::CacheEntryType GetType() { return this->Type; } + cmStateEnums::CacheEntryType GetType() { return this->Type; } /** * If there are any, print the widget specific commands @@ -62,7 +62,7 @@ protected: cmCursesWidget(const cmCursesWidget& from); void operator=(const cmCursesWidget&); - cmState::CacheEntryType Type; + cmStateEnums::CacheEntryType Type; std::string Value; FIELD* Field; // The page in the main form this widget is in diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index cfb10f3..abeff97 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -196,8 +196,8 @@ void QCMake::setProperties(const QCMakePropertyList& newProps) std::vector cacheKeys = state->GetCacheEntryKeys(); for (std::vector::const_iterator it = cacheKeys.begin(); it != cacheKeys.end(); ++it) { - cmState::CacheEntryType t = state->GetCacheEntryType(*it); - if (t == cmState::INTERNAL || t == cmState::STATIC) { + cmStateEnums::CacheEntryType t = state->GetCacheEntryType(*it); + if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC) { continue; } @@ -232,19 +232,19 @@ void QCMake::setProperties(const QCMakePropertyList& newProps) if (s.Type == QCMakeProperty::BOOL) { this->CMakeInstance->AddCacheEntry( s.Key.toLocal8Bit().data(), s.Value.toBool() ? "ON" : "OFF", - s.Help.toLocal8Bit().data(), cmState::BOOL); + s.Help.toLocal8Bit().data(), cmStateEnums::BOOL); } else if (s.Type == QCMakeProperty::STRING) { this->CMakeInstance->AddCacheEntry( s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(), - s.Help.toLocal8Bit().data(), cmState::STRING); + s.Help.toLocal8Bit().data(), cmStateEnums::STRING); } else if (s.Type == QCMakeProperty::PATH) { this->CMakeInstance->AddCacheEntry( s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(), - s.Help.toLocal8Bit().data(), cmState::PATH); + s.Help.toLocal8Bit().data(), cmStateEnums::PATH); } else if (s.Type == QCMakeProperty::FILEPATH) { this->CMakeInstance->AddCacheEntry( s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(), - s.Help.toLocal8Bit().data(), cmState::FILEPATH); + s.Help.toLocal8Bit().data(), cmStateEnums::FILEPATH); } } @@ -259,9 +259,9 @@ QCMakePropertyList QCMake::properties() const std::vector cacheKeys = state->GetCacheEntryKeys(); for (std::vector::const_iterator i = cacheKeys.begin(); i != cacheKeys.end(); ++i) { - cmState::CacheEntryType t = state->GetCacheEntryType(*i); - if (t == cmState::INTERNAL || t == cmState::STATIC || - t == cmState::UNINITIALIZED) { + cmStateEnums::CacheEntryType t = state->GetCacheEntryType(*i); + if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC || + t == cmStateEnums::UNINITIALIZED) { continue; } @@ -273,14 +273,14 @@ QCMakePropertyList QCMake::properties() const QString::fromLocal8Bit(state->GetCacheEntryProperty(*i, "HELPSTRING")); prop.Value = QString::fromLocal8Bit(cachedValue); prop.Advanced = state->GetCacheEntryPropertyAsBool(*i, "ADVANCED"); - if (t == cmState::BOOL) { + if (t == cmStateEnums::BOOL) { prop.Type = QCMakeProperty::BOOL; prop.Value = cmSystemTools::IsOn(cachedValue); - } else if (t == cmState::PATH) { + } else if (t == cmStateEnums::PATH) { prop.Type = QCMakeProperty::PATH; - } else if (t == cmState::FILEPATH) { + } else if (t == cmStateEnums::FILEPATH) { prop.Type = QCMakeProperty::FILEPATH; - } else if (t == cmState::STRING) { + } else if (t == cmStateEnums::STRING) { prop.Type = QCMakeProperty::STRING; const char* stringsProperty = state->GetCacheEntryProperty(*i, "STRINGS"); diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx index 365a426..8aa4102 100644 --- a/Source/cmBuildCommand.cxx +++ b/Source/cmBuildCommand.cxx @@ -116,6 +116,6 @@ bool cmBuildCommand::TwoArgsSignature(std::vector const& args) this->Makefile->AddCacheDefinition(define, makecommand.c_str(), "Command used to build entire project " "from the command line.", - cmState::STRING); + cmStateEnums::STRING); return true; } diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx index 9134b9a..816147b 100644 --- a/Source/cmBuildNameCommand.cxx +++ b/Source/cmBuildNameCommand.cxx @@ -27,7 +27,7 @@ bool cmBuildNameCommand::InitialPass(std::vector const& args, std::replace(cv.begin(), cv.end(), '(', '_'); std::replace(cv.begin(), cv.end(), ')', '_'); this->Makefile->AddCacheDefinition(args[0], cv.c_str(), "Name of build.", - cmState::STRING); + cmStateEnums::STRING); } return true; } @@ -53,6 +53,6 @@ bool cmBuildNameCommand::InitialPass(std::vector const& args, std::replace(buildname.begin(), buildname.end(), ')', '_'); this->Makefile->AddCacheDefinition(args[0], buildname.c_str(), - "Name of build.", cmState::STRING); + "Name of build.", cmStateEnums::STRING); return true; } diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index eea76f2..36ffd7c 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -79,7 +79,7 @@ bool cmCMakePolicyCommand::HandleSetMode(std::vector const& args) "For backwards compatibility, what version of CMake " "commands and " "syntax should this version of CMake try to support.", - cmState::STRING); + cmStateEnums::STRING); } } return true; diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 98e18ed..155456a 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -75,22 +75,22 @@ void CCONV cmAddCacheDefinition(void* arg, const char* name, const char* value, switch (type) { case CM_CACHE_BOOL: - mf->AddCacheDefinition(name, value, doc, cmState::BOOL); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::BOOL); break; case CM_CACHE_PATH: - mf->AddCacheDefinition(name, value, doc, cmState::PATH); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::PATH); break; case CM_CACHE_FILEPATH: - mf->AddCacheDefinition(name, value, doc, cmState::FILEPATH); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::FILEPATH); break; case CM_CACHE_STRING: - mf->AddCacheDefinition(name, value, doc, cmState::STRING); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::STRING); break; case CM_CACHE_INTERNAL: - mf->AddCacheDefinition(name, value, doc, cmState::INTERNAL); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::INTERNAL); break; case CM_CACHE_STATIC: - mf->AddCacheDefinition(name, value, doc, cmState::STATIC); + mf->AddCacheDefinition(name, value, doc, cmStateEnums::STATIC); break; } } diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 7dc9e33..3a37eeb 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1969,7 +1969,7 @@ bool cmCTest::AddVariableDefinition(const std::string& arg) { std::string name; std::string value; - cmState::CacheEntryType type = cmState::UNINITIALIZED; + cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED; if (cmake::ParseCacheEntry(arg, name, value, type)) { this->Definitions[name] = value; diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 4b03499..e84012c 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -94,13 +94,13 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal, // If the entry is not internal to the cache being loaded // or if it is in the list of internal entries to be // imported, load it. - if (internal || (e.Type != cmState::INTERNAL) || + if (internal || (e.Type != cmStateEnums::INTERNAL) || (includes.find(entryKey) != includes.end())) { // If we are loading the cache from another project, // make all loaded entries internal so that it is // not visible in the gui if (!internal) { - e.Type = cmState::INTERNAL; + e.Type = cmStateEnums::INTERNAL; helpString = "DO NOT EDIT, "; helpString += entryKey; helpString += " loaded from external file. " @@ -142,11 +142,11 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal, this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", "0", "Minor version of cmake used to create the " "current loaded cache", - cmState::INTERNAL); + cmStateEnums::INTERNAL); this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", "0", "Major version of cmake used to create the " "current loaded cache", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } // check to make sure the cache directory has not // been moved @@ -178,7 +178,7 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey, CacheEntry& e) { // All property entries are internal. - if (e.Type != cmState::INTERNAL) { + if (e.Type != cmStateEnums::INTERNAL) { return false; } @@ -192,7 +192,7 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey, if (it.IsAtEnd()) { // Create an entry and store the property. CacheEntry& ne = this->Cache[key]; - ne.Type = cmState::UNINITIALIZED; + ne.Type = cmStateEnums::UNINITIALIZED; ne.SetProperty(*p, e.Value.c_str()); } else { // Store this property on its entry. @@ -244,17 +244,17 @@ bool cmCacheManager::SaveCache(const std::string& path) this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", temp, "Minor version of cmake used to create the " "current loaded cache", - cmState::INTERNAL); + cmStateEnums::INTERNAL); sprintf(temp, "%d", cmVersion::GetMajorVersion()); this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", temp, "Major version of cmake used to create the " "current loaded cache", - cmState::INTERNAL); + cmStateEnums::INTERNAL); sprintf(temp, "%d", cmVersion::GetPatchVersion()); this->AddCacheEntry("CMAKE_CACHE_PATCH_VERSION", temp, "Patch version of cmake used to create the " "current loaded cache", - cmState::INTERNAL); + cmStateEnums::INTERNAL); // Let us store the current working directory so that if somebody // Copies it, he will not be surprised @@ -268,7 +268,7 @@ bool cmCacheManager::SaveCache(const std::string& path) this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(), "This is the directory where this CMakeCache.txt" " was created", - cmState::INTERNAL); + cmStateEnums::INTERNAL); /* clang-format off */ fout << "# This is the CMakeCache file.\n" @@ -301,14 +301,14 @@ bool cmCacheManager::SaveCache(const std::string& path) this->Cache.begin(); i != this->Cache.end(); ++i) { const CacheEntry& ce = (*i).second; - cmState::CacheEntryType t = ce.Type; + cmStateEnums::CacheEntryType t = ce.Type; if (!ce.Initialized) { /* // This should be added in, but is not for now. cmSystemTools::Error("Cache entry \"", (*i).first.c_str(), "\" is uninitialized"); */ - } else if (t != cmState::INTERNAL) { + } else if (t != cmStateEnums::INTERNAL) { // Format is key:type=value if (const char* help = ce.GetProperty("HELPSTRING")) { cmCacheManager::OutputHelpString(fout, help); @@ -334,9 +334,9 @@ bool cmCacheManager::SaveCache(const std::string& path) continue; } - cmState::CacheEntryType t = i.GetType(); + cmStateEnums::CacheEntryType t = i.GetType(); this->WritePropertyEntries(fout, i); - if (t == cmState::INTERNAL) { + if (t == cmStateEnums::INTERNAL) { // Format is key:type=value if (const char* help = i.GetProperty("HELPSTRING")) { this->OutputHelpString(fout, help); @@ -465,7 +465,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const for (std::map::const_iterator i = this->Cache.begin(); i != this->Cache.end(); ++i) { - if ((*i).second.Type != cmState::INTERNAL) { + if ((*i).second.Type != cmStateEnums::INTERNAL) { out << (*i).first << " = " << (*i).second.Value << std::endl; } } @@ -477,7 +477,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const void cmCacheManager::AddCacheEntry(const std::string& key, const char* value, const char* helpString, - cmState::CacheEntryType type) + cmStateEnums::CacheEntryType type) { CacheEntry& e = this->Cache[key]; if (value) { @@ -488,7 +488,7 @@ void cmCacheManager::AddCacheEntry(const std::string& key, const char* value, } e.Type = type; // make sure we only use unix style paths - if (type == cmState::FILEPATH || type == cmState::PATH) { + if (type == cmStateEnums::FILEPATH || type == cmStateEnums::PATH) { if (e.Value.find(';') != e.Value.npos) { std::vector paths; cmSystemTools::ExpandListArgument(e.Value, paths); diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index 16a2e78..90731f5 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -34,7 +34,7 @@ private: struct CacheEntry { std::string Value; - cmState::CacheEntryType Type; + cmStateEnums::CacheEntryType Type; cmPropertyMap Properties; std::vector GetPropertyList() const; const char* GetProperty(const std::string&) const; @@ -44,7 +44,7 @@ private: bool Initialized; CacheEntry() : Value("") - , Type(cmState::UNINITIALIZED) + , Type(cmStateEnums::UNINITIALIZED) , Initialized(false) { } @@ -70,8 +70,14 @@ public: const char* GetValue() const { return this->GetEntry().Value.c_str(); } bool GetValueAsBool() const; void SetValue(const char*); - cmState::CacheEntryType GetType() const { return this->GetEntry().Type; } - void SetType(cmState::CacheEntryType ty) { this->GetEntry().Type = ty; } + cmStateEnums::CacheEntryType GetType() const + { + return this->GetEntry().Type; + } + void SetType(cmStateEnums::CacheEntryType ty) + { + this->GetEntry().Type = ty; + } bool Initialized() { return this->GetEntry().Initialized; } cmCacheManager& Container; std::map::iterator Position; @@ -137,7 +143,7 @@ public: return this->GetCacheIterator(key.c_str()).GetProperty(propName); } - cmState::CacheEntryType GetCacheEntryType(std::string const& key) + cmStateEnums::CacheEntryType GetCacheEntryType(std::string const& key) { return this->GetCacheIterator(key.c_str()).GetType(); } @@ -200,7 +206,8 @@ public: protected: ///! Add an entry into the cache void AddCacheEntry(const std::string& key, const char* value, - const char* helpString, cmState::CacheEntryType type); + const char* helpString, + cmStateEnums::CacheEntryType type); ///! Get a cache entry object for a key CacheEntry* GetCacheEntry(const std::string& key); diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index cafba86..e4a97a1 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -531,7 +531,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, // set the result var to the return value to indicate success or failure this->Makefile->AddCacheDefinition(argv[0], (res == 0 ? "TRUE" : "FALSE"), "Result of TRY_COMPILE", - cmState::INTERNAL); + cmStateEnums::INTERNAL); if (!outputVariable.empty()) { this->Makefile->AddDefinition(outputVariable, output.c_str()); diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 7535e8c..b50db25 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -230,7 +230,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out, // in the cache valueToUse = envVarValue; mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(), - cacheEntryName.c_str(), cmState::STRING, true); + cacheEntryName.c_str(), cmStateEnums::STRING, true); mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory()); } else if (!envVarSet && cacheValue != CM_NULLPTR) { // It is already in the cache, but not in the env, so use it from the cache @@ -245,7 +245,8 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out, if (valueToUse.find(envVarValue) == std::string::npos) { valueToUse = envVarValue; mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(), - cacheEntryName.c_str(), cmState::STRING, true); + cacheEntryName.c_str(), cmStateEnums::STRING, + true); mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory()); } } diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 982d740..b8b3463 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -308,7 +308,7 @@ bool cmFindBase::CheckForVariableInCache() // this. if (cached && state->GetCacheEntryType(this->VariableName) == - cmState::UNINITIALIZED) { + cmStateEnums::UNINITIALIZED) { this->AlreadyInCacheWithoutMetaInfo = true; } return true; diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 082350f..2909209 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -26,7 +26,7 @@ bool cmFindLibraryCommand::InitialPass(std::vector const& argsIn, if (this->AlreadyInCacheWithoutMetaInfo) { this->Makefile->AddCacheDefinition(this->VariableName, "", this->VariableDocumentation.c_str(), - cmState::FILEPATH); + cmStateEnums::FILEPATH); } return true; } @@ -52,13 +52,13 @@ bool cmFindLibraryCommand::InitialPass(std::vector const& argsIn, // Save the value in the cache this->Makefile->AddCacheDefinition(this->VariableName, library.c_str(), this->VariableDocumentation.c_str(), - cmState::FILEPATH); + cmStateEnums::FILEPATH); return true; } std::string notfound = this->VariableName + "-NOTFOUND"; this->Makefile->AddCacheDefinition(this->VariableName, notfound.c_str(), this->VariableDocumentation.c_str(), - cmState::FILEPATH); + cmStateEnums::FILEPATH); return true; } diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 554618e..5723999 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -890,7 +890,7 @@ bool cmFindPackageCommand::FindConfig() help += "."; // We force the value since we do not get here if it was already set. this->Makefile->AddCacheDefinition(this->Variable, init.c_str(), - help.c_str(), cmState::PATH, true); + help.c_str(), cmStateEnums::PATH, true); return found; } diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 35929fe..7d37185 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -26,7 +26,8 @@ bool cmFindPathCommand::InitialPass(std::vector const& argsIn, if (this->AlreadyInCacheWithoutMetaInfo) { this->Makefile->AddCacheDefinition( this->VariableName, "", this->VariableDocumentation.c_str(), - (this->IncludeFileInPath ? cmState::FILEPATH : cmState::PATH)); + (this->IncludeFileInPath ? cmStateEnums::FILEPATH + : cmStateEnums::PATH)); } return true; } @@ -35,13 +36,13 @@ bool cmFindPathCommand::InitialPass(std::vector const& argsIn, if (!result.empty()) { this->Makefile->AddCacheDefinition( this->VariableName, result.c_str(), this->VariableDocumentation.c_str(), - (this->IncludeFileInPath) ? cmState::FILEPATH : cmState::PATH); + (this->IncludeFileInPath) ? cmStateEnums::FILEPATH : cmStateEnums::PATH); return true; } this->Makefile->AddCacheDefinition( this->VariableName, (this->VariableName + "-NOTFOUND").c_str(), this->VariableDocumentation.c_str(), - (this->IncludeFileInPath) ? cmState::FILEPATH : cmState::PATH); + (this->IncludeFileInPath) ? cmStateEnums::FILEPATH : cmStateEnums::PATH); return true; } diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index a6f2518..9886860 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -90,7 +90,7 @@ bool cmFindProgramCommand::InitialPass(std::vector const& argsIn, if (this->AlreadyInCacheWithoutMetaInfo) { this->Makefile->AddCacheDefinition(this->VariableName, "", this->VariableDocumentation.c_str(), - cmState::FILEPATH); + cmStateEnums::FILEPATH); } return true; } @@ -100,13 +100,13 @@ bool cmFindProgramCommand::InitialPass(std::vector const& argsIn, // Save the value in the cache this->Makefile->AddCacheDefinition(this->VariableName, result.c_str(), this->VariableDocumentation.c_str(), - cmState::FILEPATH); + cmStateEnums::FILEPATH); return true; } this->Makefile->AddCacheDefinition( this->VariableName, (this->VariableName + "-NOTFOUND").c_str(), - this->VariableDocumentation.c_str(), cmState::FILEPATH); + this->VariableDocumentation.c_str(), cmStateEnums::FILEPATH); return true; } diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index 05dbfb4..c183947 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -88,13 +88,13 @@ bool cmGetFilenameComponentCommand::InitialPass( if (args.size() >= 4 && args[args.size() - 1] == "CACHE") { if (!programArgs.empty() && !storeArgs.empty()) { - this->Makefile->AddCacheDefinition(storeArgs, programArgs.c_str(), "", - args[2] == "PATH" ? cmState::FILEPATH - : cmState::STRING); + this->Makefile->AddCacheDefinition( + storeArgs, programArgs.c_str(), "", + args[2] == "PATH" ? cmStateEnums::FILEPATH : cmStateEnums::STRING); } - this->Makefile->AddCacheDefinition(args[0], result.c_str(), "", - args[2] == "PATH" ? cmState::FILEPATH - : cmState::STRING); + this->Makefile->AddCacheDefinition( + args[0], result.c_str(), "", + args[2] == "PATH" ? cmStateEnums::FILEPATH : cmStateEnums::STRING); } else { if (!programArgs.empty() && !storeArgs.empty()) { this->Makefile->AddDefinition(storeArgs, programArgs.c_str()); diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 58c6a00..efa95a5 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -308,7 +308,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) makeProgram += "/"; makeProgram += saveFile; mf->AddCacheDefinition("CMAKE_MAKE_PROGRAM", makeProgram.c_str(), - "make program", cmState::FILEPATH); + "make program", cmStateEnums::FILEPATH); } } @@ -1103,7 +1103,7 @@ void cmGlobalGenerator::Configure() sprintf(num, "%d", static_cast(this->Makefiles.size())); this->GetCMakeInstance()->AddCacheEntry("CMAKE_NUMBER_OF_MAKEFILES", num, "number of local generators", - cmState::INTERNAL); + cmStateEnums::INTERNAL); // check for link libraries and include directories containing "NOTFOUND" // and for infinite loops @@ -1886,8 +1886,8 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator* gen, this->TryCompileOuterMakefile = mf; const char* make = gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM"); - this->GetCMakeInstance()->AddCacheEntry("CMAKE_MAKE_PROGRAM", make, - "make program", cmState::FILEPATH); + this->GetCMakeInstance()->AddCacheEntry( + "CMAKE_MAKE_PROGRAM", make, "make program", cmStateEnums::FILEPATH); // copy the enabled languages this->GetCMakeInstance()->GetState()->SetEnabledLanguages( gen->GetCMakeInstance()->GetState()->GetEnabledLanguages()); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 615670c..45f8151 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -93,7 +93,7 @@ std::string cmGlobalUnixMakefileGenerator3::GetEditCacheCommand() const if (!editCacheCommand.empty()) { cm->AddCacheEntry("CMAKE_EDIT_COMMAND", editCacheCommand.c_str(), "Path to cache edit program executable.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } } const char* edit_cmd = cm->GetCacheDefinition("CMAKE_EDIT_COMMAND"); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 1ffcf07..635d07e 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -101,7 +101,7 @@ void cmGlobalVisualStudio7Generator::EnableLanguage( "Semicolon separated list of supported configuration types, " "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, " "anything else will be ignored.", - cmState::STRING); + cmStateEnums::STRING); } // Create list of configurations requested by user's cache, if any. @@ -118,7 +118,7 @@ void cmGlobalVisualStudio7Generator::EnableLanguage( if (cmSystemTools::GetEnv("CMAKE_MSVCIDE_RUN_PATH", extraPath)) { mf->AddCacheDefinition("CMAKE_MSVCIDE_RUN_PATH", extraPath.c_str(), "Saved environment variable CMAKE_MSVCIDE_RUN_PATH", - cmState::STATIC); + cmStateEnums::STATIC); } } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 34a01d6..6de4caa 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -257,7 +257,7 @@ void cmGlobalXCodeGenerator::EnableLanguage( "Semicolon separated list of supported configuration types, " "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, " "anything else will be ignored.", - cmState::STRING); + cmStateEnums::STRING); } } mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); @@ -2432,8 +2432,9 @@ std::string cmGlobalXCodeGenerator::GetOrCreateId(const std::string& name, return storedGUID; } - this->CMakeInstance->AddCacheEntry( - guidStoreName, id.c_str(), "Stored Xcode object GUID", cmState::INTERNAL); + this->CMakeInstance->AddCacheEntry(guidStoreName, id.c_str(), + "Stored Xcode object GUID", + cmStateEnums::INTERNAL); return id; } diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index 57bf33e..d598722 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -66,7 +66,7 @@ bool cmIncludeExternalMSProjectCommand::InitialPass( std::string guidVariable = utility_name + "_GUID_CMAKE"; this->Makefile->GetCMakeInstance()->AddCacheEntry( guidVariable.c_str(), customGuid.c_str(), "Stored GUID", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } // Create a target instance for this utility. diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index 3428a6c..49db5b0 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -140,7 +140,7 @@ void cmLoadCacheCommand::CheckLine(const char* line) // Check one line of the cache file. std::string var; std::string value; - cmState::CacheEntryType type = cmState::UNINITIALIZED; + cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED; if (cmake::ParseCacheEntry(line, var, value, type)) { // Found a real entry. See if this one was requested. if (this->VariablesToRead.find(var) != this->VariablesToRead.end()) { diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 006cdf8..0516bdf 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -95,7 +95,7 @@ void cmLocalVisualStudio10Generator::ReadAndStoreExternalGUID( // save the GUID in the cache this->GlobalGenerator->GetCMakeInstance()->AddCacheEntry( guidStoreName.c_str(), parser.GUID.c_str(), "Stored GUID", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } const char* cmLocalVisualStudio10Generator::ReportErrorLabel() const diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 1ea56b4..7c32e6c 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -2118,7 +2118,7 @@ void cmLocalVisualStudio7Generator::ReadAndStoreExternalGUID( // save the GUID in the cache this->GlobalGenerator->GetCMakeInstance()->AddCacheEntry( guidStoreName.c_str(), parser.GUID.c_str(), "Stored GUID", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } std::string cmLocalVisualStudio7Generator::GetTargetDirectory( diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 65116d5..5036b0d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1643,20 +1643,21 @@ void cmMakefile::AddDefinition(const std::string& name, const char* value) void cmMakefile::AddCacheDefinition(const std::string& name, const char* value, const char* doc, - cmState::CacheEntryType type, bool force) + cmStateEnums::CacheEntryType type, + bool force) { const char* existingValue = this->GetState()->GetInitializedCacheValue(name); // must be outside the following if() to keep it alive long enough std::string nvalue; - if (existingValue && - (this->GetState()->GetCacheEntryType(name) == cmState::UNINITIALIZED)) { + if (existingValue && (this->GetState()->GetCacheEntryType(name) == + cmStateEnums::UNINITIALIZED)) { // if this is not a force, then use the value from the cache // if it is a force, then use the value being passed in if (!force) { value = existingValue; } - if (type == cmState::PATH || type == cmState::FILEPATH) { + if (type == cmStateEnums::PATH || type == cmStateEnums::FILEPATH) { std::vector::size_type cc; std::vector files; nvalue = value ? value : ""; @@ -3177,7 +3178,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, // Add this before the user-provided CMake arguments in case // one of the arguments is -DCMAKE_BUILD_TYPE=... cm.AddCacheEntry("CMAKE_BUILD_TYPE", config, "Build configuration", - cmState::STRING); + cmStateEnums::STRING); } } // if cmake args were provided then pass them in @@ -3213,10 +3214,10 @@ int cmMakefile::TryCompile(const std::string& srcdir, gg->EnableLanguagesFromGenerator(this->GetGlobalGenerator(), this); if (this->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS")) { cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE", "", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } else { cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE", "", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } if (cm.Configure() != 0) { cmSystemTools::Error( diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 71078ab..e7e8a0b 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -224,7 +224,7 @@ public: void AddDefinition(const std::string& name, const char* value); ///! Add a definition to this makefile and the global cmake cache. void AddCacheDefinition(const std::string& name, const char* value, - const char* doc, cmState::CacheEntryType type, + const char* doc, cmStateEnums::CacheEntryType type, bool force = false); /** diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx index 5ec1620..8f9e288 100644 --- a/Source/cmMarkAsAdvancedCommand.cxx +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -26,7 +26,7 @@ bool cmMarkAsAdvancedCommand::InitialPass(std::vector const& args, cmState* state = this->Makefile->GetState(); if (!state->GetCacheEntryValue(variable)) { this->Makefile->GetCMakeInstance()->AddCacheEntry( - variable, CM_NULLPTR, CM_NULLPTR, cmState::UNINITIALIZED); + variable, CM_NULLPTR, CM_NULLPTR, cmStateEnums::UNINITIALIZED); overwrite = true; } if (!state->GetCacheEntryValue(variable)) { diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 946a543..0186ef2 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -32,7 +32,7 @@ bool cmOptionCommand::InitialPass(std::vector const& args, cmState* state = this->Makefile->GetState(); const char* existingValue = state->GetCacheEntryValue(args[0]); if (existingValue) { - if (state->GetCacheEntryType(args[0]) != cmState::UNINITIALIZED) { + if (state->GetCacheEntryType(args[0]) != cmStateEnums::UNINITIALIZED) { state->SetCacheEntryProperty(args[0], "HELPSTRING", args[1]); return true; } @@ -43,6 +43,6 @@ bool cmOptionCommand::InitialPass(std::vector const& args, } bool init = cmSystemTools::IsOn(initialValue.c_str()); this->Makefile->AddCacheDefinition(args[0], init ? "ON" : "OFF", - args[1].c_str(), cmState::BOOL); + args[1].c_str(), cmStateEnums::BOOL); return true; } diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 3402191..25acb52 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -233,7 +233,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, const char* version) "For backwards compatibility, what version of CMake " "commands and " "syntax should this version of CMake try to support.", - cmState::STRING); + cmStateEnums::STRING); } } } diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index c34a94b..c27da8e 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -19,10 +19,10 @@ bool cmProjectCommand::InitialPass(std::vector const& args, this->Makefile->AddCacheDefinition( bindir, this->Makefile->GetCurrentBinaryDirectory(), - "Value Computed by CMake", cmState::STATIC); + "Value Computed by CMake", cmStateEnums::STATIC); this->Makefile->AddCacheDefinition( srcdir, this->Makefile->GetCurrentSourceDirectory(), - "Value Computed by CMake", cmState::STATIC); + "Value Computed by CMake", cmStateEnums::STATIC); bindir = "PROJECT_BINARY_DIR"; srcdir = "PROJECT_SOURCE_DIR"; @@ -45,7 +45,7 @@ bool cmProjectCommand::InitialPass(std::vector const& args, this->Makefile->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str()); this->Makefile->AddCacheDefinition("CMAKE_PROJECT_NAME", args[0].c_str(), "Value Computed by CMake", - cmState::STATIC); + cmStateEnums::STATIC); } bool haveVersion = false; diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 8ce0b18..65b0e9c 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -64,8 +64,9 @@ bool cmSetCommand::InitialPass(std::vector const& args, bool cache = false; // optional bool force = false; // optional bool parentScope = false; - cmState::CacheEntryType type = cmState::STRING; // required if cache - const char* docstring = CM_NULLPTR; // required if cache + cmStateEnums::CacheEntryType type = + cmStateEnums::STRING; // required if cache + const char* docstring = CM_NULLPTR; // required if cache unsigned int ignoreLastArgs = 0; // look for PARENT_SCOPE argument @@ -115,12 +116,12 @@ bool cmSetCommand::InitialPass(std::vector const& args, cmState* state = this->Makefile->GetState(); const char* existingValue = state->GetCacheEntryValue(variable); if (existingValue && - (state->GetCacheEntryType(variable) != cmState::UNINITIALIZED)) { + (state->GetCacheEntryType(variable) != cmStateEnums::UNINITIALIZED)) { // if the set is trying to CACHE the value but the value // is already in the cache and the type is not internal // then leave now without setting any definitions in the cache // or the makefile - if (cache && type != cmState::INTERNAL && !force) { + if (cache && type != cmStateEnums::INTERNAL && !force) { return true; } } diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx index dbd3ed9..7664eca 100644 --- a/Source/cmSiteNameCommand.cxx +++ b/Source/cmSiteNameCommand.cxx @@ -68,7 +68,8 @@ bool cmSiteNameCommand::InitialPass(std::vector const& args, #endif this->Makefile->AddCacheDefinition( args[0], siteName.c_str(), - "Name of the computer/site where compile is being run", cmState::STRING); + "Name of the computer/site where compile is being run", + cmStateEnums::STRING); return true; } diff --git a/Source/cmState.cxx b/Source/cmState.cxx index cdadbda..a52374f 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -147,7 +147,7 @@ const char* cmCacheEntryTypes[] = { "BOOL", "PATH", "FILEPATH", "STRING", "INTERNAL", "STATIC", "UNINITIALIZED", CM_NULLPTR }; -const char* cmState::CacheEntryTypeToString(cmState::CacheEntryType type) +const char* cmState::CacheEntryTypeToString(cmStateEnums::CacheEntryType type) { if (type > 6) { return cmCacheEntryTypes[6]; @@ -155,16 +155,16 @@ const char* cmState::CacheEntryTypeToString(cmState::CacheEntryType type) return cmCacheEntryTypes[type]; } -cmState::CacheEntryType cmState::StringToCacheEntryType(const char* s) +cmStateEnums::CacheEntryType cmState::StringToCacheEntryType(const char* s) { int i = 0; while (cmCacheEntryTypes[i]) { if (strcmp(s, cmCacheEntryTypes[i]) == 0) { - return static_cast(i); + return static_cast(i); } ++i; } - return STRING; + return cmStateEnums::STRING; } bool cmState::IsCacheEntryType(std::string const& key) @@ -219,7 +219,7 @@ const char* cmState::GetInitializedCacheValue(std::string const& key) const return this->CacheManager->GetInitializedCacheValue(key); } -cmState::CacheEntryType cmState::GetCacheEntryType( +cmStateEnums::CacheEntryType cmState::GetCacheEntryType( std::string const& key) const { cmCacheManager::CacheIterator it = @@ -279,7 +279,7 @@ bool cmState::GetCacheEntryPropertyAsBool(std::string const& key, void cmState::AddCacheEntry(const std::string& key, const char* value, const char* helpString, - cmState::CacheEntryType type) + cmStateEnums::CacheEntryType type) { this->CacheManager->AddCacheEntry(key, value, helpString, type); } @@ -1806,7 +1806,8 @@ static bool ParseEntryWithoutType(const std::string& entry, std::string& var, } bool cmState::ParseCacheEntry(const std::string& entry, std::string& var, - std::string& value, CacheEntryType& type) + std::string& value, + cmStateEnums::CacheEntryType& type) { // input line is: key:type=value static cmsys::RegularExpression reg( diff --git a/Source/cmState.h b/Source/cmState.h index 521870d..fdbbc98 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -56,6 +56,16 @@ enum TargetType INTERFACE_LIBRARY, UNKNOWN_LIBRARY }; +enum CacheEntryType +{ + BOOL = 0, + PATH, + FILEPATH, + STRING, + INTERNAL, + STATIC, + UNINITIALIZED +}; } class cmState @@ -214,18 +224,8 @@ public: Snapshot CreatePolicyScopeSnapshot(Snapshot originSnapshot); Snapshot Pop(Snapshot originSnapshot); - enum CacheEntryType - { - BOOL = 0, - PATH, - FILEPATH, - STRING, - INTERNAL, - STATIC, - UNINITIALIZED - }; - static CacheEntryType StringToCacheEntryType(const char*); - static const char* CacheEntryTypeToString(CacheEntryType); + static cmStateEnums::CacheEntryType StringToCacheEntryType(const char*); + static const char* CacheEntryTypeToString(cmStateEnums::CacheEntryType); static bool IsCacheEntryType(std::string const& key); bool LoadCache(const std::string& path, bool internal, @@ -239,7 +239,7 @@ public: std::vector GetCacheEntryKeys() const; const char* GetCacheEntryValue(std::string const& key) const; const char* GetInitializedCacheValue(std::string const& key) const; - CacheEntryType GetCacheEntryType(std::string const& key) const; + cmStateEnums::CacheEntryType GetCacheEntryType(std::string const& key) const; void SetCacheEntryValue(std::string const& key, std::string const& value); void SetCacheValue(std::string const& key, std::string const& value); @@ -264,7 +264,8 @@ public: ///! Break up a line like VAR:type="value" into var, type and value static bool ParseCacheEntry(const std::string& entry, std::string& var, - std::string& value, CacheEntryType& type); + std::string& value, + cmStateEnums::CacheEntryType& type); Snapshot Reset(); // Define a property @@ -328,7 +329,8 @@ public: private: friend class cmake; void AddCacheEntry(const std::string& key, const char* value, - const char* helpString, CacheEntryType type); + const char* helpString, + cmStateEnums::CacheEntryType type); std::map PropertyDefinitions; std::vector EnabledLanguages; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 5753dd8..2527366 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -635,7 +635,7 @@ void cmTarget::ClearDependencyInformation(cmMakefile& mf, depname += "_LIB_DEPENDS"; if (this->RecordDependencies) { mf.AddCacheDefinition(depname, "", "Dependencies for target", - cmState::STATIC); + cmStateEnums::STATIC); } else { if (mf.GetDefinition(depname)) { std::string message = "Target "; @@ -773,7 +773,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib, dependencies += lib; dependencies += ";"; mf.AddCacheDefinition(targetEntry, dependencies.c_str(), - "Dependencies for the target", cmState::STATIC); + "Dependencies for the target", cmStateEnums::STATIC); } } diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index 5c9e41a..b248489 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -189,7 +189,8 @@ void cmTryRunCommand::RunExecutable(const std::string& runArgs, strcpy(retChar, "FAILED_TO_RUN"); } this->Makefile->AddCacheDefinition(this->RunResultVariable, retChar, - "Result of TRY_RUN", cmState::INTERNAL); + "Result of TRY_RUN", + cmStateEnums::INTERNAL); } /* This is only used when cross compiling. Instead of running the @@ -231,7 +232,7 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs, comment += detailsString; this->Makefile->AddCacheDefinition(this->RunResultVariable, "PLEASE_FILL_OUT-FAILED_TO_RUN", - comment.c_str(), cmState::STRING); + comment.c_str(), cmStateEnums::STRING); cmState* state = this->Makefile->GetState(); const char* existingValue = @@ -254,9 +255,9 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs, "would have printed on stdout and stderr on its target platform.\n"; comment += detailsString; - this->Makefile->AddCacheDefinition(internalRunOutputName, - "PLEASE_FILL_OUT-NOTFOUND", - comment.c_str(), cmState::STRING); + this->Makefile->AddCacheDefinition( + internalRunOutputName, "PLEASE_FILL_OUT-NOTFOUND", comment.c_str(), + cmStateEnums::STRING); cmState* state = this->Makefile->GetState(); const char* existing = state->GetCacheEntryValue(internalRunOutputName); if (existing) { diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 08ea21e..8f25cbb 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -98,13 +98,13 @@ bool cmUtilitySourceCommand::InitialPass(std::vector const& args, // Enter the value into the cache. this->Makefile->AddCacheDefinition(cacheEntry, utilityExecutable.c_str(), "Path to an internal program.", - cmState::FILEPATH); + cmStateEnums::FILEPATH); // add a value into the cache that maps from the // full path to the name of the project cmSystemTools::ConvertToUnixSlashes(utilityExecutable); this->Makefile->AddCacheDefinition(utilityExecutable, utilityName.c_str(), "Executable to project name.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); return true; } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 5936d77..b50c8bd 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -315,7 +315,7 @@ bool cmake::SetCacheArgs(const std::vector& args) } } std::string var, value; - cmState::CacheEntryType type = cmState::UNINITIALIZED; + cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED; if (cmState::ParseCacheEntry(entry, var, value, type)) { // The value is transformed if it is a filepath for example, so // we can't compare whether the value is already in the cache until @@ -410,8 +410,8 @@ bool cmake::SetCacheArgs(const std::vector& args) std::vector cacheKeys = this->State->GetCacheEntryKeys(); for (std::vector::const_iterator it = cacheKeys.begin(); it != cacheKeys.end(); ++it) { - cmState::CacheEntryType t = this->State->GetCacheEntryType(*it); - if (t != cmState::STATIC) { + cmStateEnums::CacheEntryType t = this->State->GetCacheEntryType(*it); + if (t != cmStateEnums::STATIC) { if (regex.find(it->c_str())) { entriesToDelete.push_back(*it); } @@ -859,14 +859,14 @@ int cmake::AddCMakePaths() // Save the value in the cache this->AddCacheEntry("CMAKE_COMMAND", cmSystemTools::GetCMakeCommand().c_str(), - "Path to CMake executable.", cmState::INTERNAL); + "Path to CMake executable.", cmStateEnums::INTERNAL); #ifdef CMAKE_BUILD_WITH_CMAKE - this->AddCacheEntry("CMAKE_CTEST_COMMAND", - cmSystemTools::GetCTestCommand().c_str(), - "Path to ctest program executable.", cmState::INTERNAL); - this->AddCacheEntry("CMAKE_CPACK_COMMAND", - cmSystemTools::GetCPackCommand().c_str(), - "Path to cpack program executable.", cmState::INTERNAL); + this->AddCacheEntry( + "CMAKE_CTEST_COMMAND", cmSystemTools::GetCTestCommand().c_str(), + "Path to ctest program executable.", cmStateEnums::INTERNAL); + this->AddCacheEntry( + "CMAKE_CPACK_COMMAND", cmSystemTools::GetCPackCommand().c_str(), + "Path to cpack program executable.", cmStateEnums::INTERNAL); #endif if (!cmSystemTools::FileExists( (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake").c_str())) { @@ -879,7 +879,7 @@ int cmake::AddCMakePaths() return 0; } this->AddCacheEntry("CMAKE_ROOT", cmSystemTools::GetCMakeRoot().c_str(), - "Path to CMake installation.", cmState::INTERNAL); + "Path to CMake installation.", cmStateEnums::INTERNAL); return 1; } @@ -1147,7 +1147,7 @@ struct SaveCacheEntry std::string key; std::string value; std::string help; - cmState::CacheEntryType type; + cmStateEnums::CacheEntryType type; }; int cmake::HandleDeleteCacheVariables(const std::string& var) @@ -1291,7 +1291,7 @@ int cmake::ActualConfigure() "CMAKE_HOME_DIRECTORY", this->GetHomeDirectory(), "Source directory with the top level CMakeLists.txt file for this " "project", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } // no generator specified on the command line @@ -1338,11 +1338,11 @@ int cmake::ActualConfigure() if (!this->State->GetInitializedCacheValue("CMAKE_GENERATOR")) { this->AddCacheEntry("CMAKE_GENERATOR", this->GlobalGenerator->GetName().c_str(), - "Name of generator.", cmState::INTERNAL); + "Name of generator.", cmStateEnums::INTERNAL); this->AddCacheEntry("CMAKE_EXTRA_GENERATOR", this->GlobalGenerator->GetExtraGeneratorName().c_str(), "Name of external makefile project generator.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } if (const char* platformName = @@ -1362,7 +1362,7 @@ int cmake::ActualConfigure() } else { this->AddCacheEntry("CMAKE_GENERATOR_PLATFORM", this->GeneratorPlatform.c_str(), - "Name of generator platform.", cmState::INTERNAL); + "Name of generator platform.", cmStateEnums::INTERNAL); } if (const char* tsName = @@ -1382,7 +1382,7 @@ int cmake::ActualConfigure() } else { this->AddCacheEntry("CMAKE_GENERATOR_TOOLSET", this->GeneratorToolset.c_str(), - "Name of generator toolset.", cmState::INTERNAL); + "Name of generator toolset.", cmStateEnums::INTERNAL); } // reset any system configuration information, except for when we are @@ -1411,13 +1411,14 @@ int cmake::ActualConfigure() if (!this->State->GetInitializedCacheValue("LIBRARY_OUTPUT_PATH")) { this->AddCacheEntry( "LIBRARY_OUTPUT_PATH", "", - "Single output directory for building all libraries.", cmState::PATH); + "Single output directory for building all libraries.", + cmStateEnums::PATH); } if (!this->State->GetInitializedCacheValue("EXECUTABLE_OUTPUT_PATH")) { this->AddCacheEntry( "EXECUTABLE_OUTPUT_PATH", "", "Single output directory for building all executables.", - cmState::PATH); + cmStateEnums::PATH); } } @@ -1640,7 +1641,7 @@ void cmake::AddCacheEntry(const std::string& key, const char* value, const char* helpString, int type) { this->State->AddCacheEntry(key, value, helpString, - cmState::CacheEntryType(type)); + cmStateEnums::CacheEntryType(type)); this->UnwatchUnusedCli(key); } @@ -1694,7 +1695,8 @@ void cmake::AddDefaultGenerators() } bool cmake::ParseCacheEntry(const std::string& entry, std::string& var, - std::string& value, cmState::CacheEntryType& type) + std::string& value, + cmStateEnums::CacheEntryType& type) { return cmState::ParseCacheEntry(entry, var, value, type); } @@ -2464,7 +2466,7 @@ void cmake::SetSuppressDevWarnings(bool b) this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", value.c_str(), "Suppress Warnings that are meant for" " the author of the CMakeLists.txt files.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } bool cmake::GetSuppressDeprecatedWarnings() const @@ -2488,7 +2490,7 @@ void cmake::SetSuppressDeprecatedWarnings(bool b) this->AddCacheEntry("CMAKE_WARN_DEPRECATED", value.c_str(), "Whether to issue warnings for deprecated " "functionality.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } bool cmake::GetDevWarningsAsErrors() const @@ -2512,7 +2514,7 @@ void cmake::SetDevWarningsAsErrors(bool b) this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_ERRORS", value.c_str(), "Suppress errors that are meant for" " the author of the CMakeLists.txt files.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } bool cmake::GetDeprecatedWarningsAsErrors() const @@ -2536,5 +2538,5 @@ void cmake::SetDeprecatedWarningsAsErrors(bool b) this->AddCacheEntry("CMAKE_ERROR_DEPRECATED", value.c_str(), "Whether to issue deprecation errors for macros" " and functions.", - cmState::INTERNAL); + cmStateEnums::INTERNAL); } diff --git a/Source/cmake.h b/Source/cmake.h index 865748b..cff753f 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -161,7 +161,7 @@ public: ///! Break up a line like VAR:type="value" into var, type and value static bool ParseCacheEntry(const std::string& entry, std::string& var, std::string& value, - cmState::CacheEntryType& type); + cmStateEnums::CacheEntryType& type); int LoadCache(); bool LoadCache(const std::string& path); diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 0d1f1ce..d1159c3 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -292,9 +292,9 @@ int do_cmake(int ac, char const* const* av) std::vector keys = cm.GetState()->GetCacheEntryKeys(); for (std::vector::const_iterator it = keys.begin(); it != keys.end(); ++it) { - cmState::CacheEntryType t = cm.GetState()->GetCacheEntryType(*it); - if (t != cmState::INTERNAL && t != cmState::STATIC && - t != cmState::UNINITIALIZED) { + cmStateEnums::CacheEntryType t = cm.GetState()->GetCacheEntryType(*it); + if (t != cmStateEnums::INTERNAL && t != cmStateEnums::STATIC && + t != cmStateEnums::UNINITIALIZED) { const char* advancedProp = cm.GetState()->GetCacheEntryProperty(*it, "ADVANCED"); if (list_all_cached || !advancedProp) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a49751fb2eed0ca6415b243c35b23201b8060597 commit a49751fb2eed0ca6415b243c35b23201b8060597 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:46 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:58 2016 +0200 cmState: Move TargetType enum to separate namespace diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index 96ad82a..a03d77d 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -133,8 +133,8 @@ bool cmAddExecutableCommand::InitialPass(std::vector const& args, this->SetError(e.str()); return false; } - cmState::TargetType type = aliasedTarget->GetType(); - if (type != cmState::EXECUTABLE) { + cmStateEnums::TargetType type = aliasedTarget->GetType(); + if (type != cmStateEnums::EXECUTABLE) { std::ostringstream e; e << "cannot create ALIAS target \"" << exename << "\" because target \"" << aliasedName << "\" is not an " @@ -165,7 +165,7 @@ bool cmAddExecutableCommand::InitialPass(std::vector const& args, } // Create the imported target. - this->Makefile->AddImportedTarget(exename, cmState::EXECUTABLE, + this->Makefile->AddImportedTarget(exename, cmStateEnums::EXECUTABLE, importGlobal); return true; } diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 26e38b8..d1281d4 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -15,10 +15,10 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, } // Library type defaults to value of BUILD_SHARED_LIBS, if it exists, // otherwise it defaults to static library. - cmState::TargetType type = cmState::SHARED_LIBRARY; + cmStateEnums::TargetType type = cmStateEnums::SHARED_LIBRARY; if (cmSystemTools::IsOff( this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { - type = cmState::STATIC_LIBRARY; + type = cmStateEnums::STATIC_LIBRARY; } bool excludeFromAll = false; bool importTarget = false; @@ -38,57 +38,57 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, while (s != args.end()) { std::string libType = *s; if (libType == "STATIC") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting STATIC type."; this->SetError(e.str()); return false; } ++s; - type = cmState::STATIC_LIBRARY; + type = cmStateEnums::STATIC_LIBRARY; haveSpecifiedType = true; } else if (libType == "SHARED") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting SHARED type."; this->SetError(e.str()); return false; } ++s; - type = cmState::SHARED_LIBRARY; + type = cmStateEnums::SHARED_LIBRARY; haveSpecifiedType = true; } else if (libType == "MODULE") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting MODULE type."; this->SetError(e.str()); return false; } ++s; - type = cmState::MODULE_LIBRARY; + type = cmStateEnums::MODULE_LIBRARY; haveSpecifiedType = true; } else if (libType == "OBJECT") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting OBJECT type."; this->SetError(e.str()); return false; } ++s; - type = cmState::OBJECT_LIBRARY; + type = cmStateEnums::OBJECT_LIBRARY; haveSpecifiedType = true; } else if (libType == "UNKNOWN") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting UNKNOWN type."; this->SetError(e.str()); return false; } ++s; - type = cmState::UNKNOWN_LIBRARY; + type = cmStateEnums::UNKNOWN_LIBRARY; haveSpecifiedType = true; } else if (libType == "ALIAS") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library specified with conflicting ALIAS type."; this->SetError(e.str()); @@ -116,10 +116,10 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, return false; } ++s; - type = cmState::INTERFACE_LIBRARY; + type = cmStateEnums::INTERFACE_LIBRARY; haveSpecifiedType = true; } else if (*s == "EXCLUDE_FROM_ALL") { - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL."; this->SetError(e.str()); @@ -133,7 +133,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, } else if (importTarget && *s == "GLOBAL") { ++s; importGlobal = true; - } else if (type == cmState::INTERFACE_LIBRARY && *s == "GLOBAL") { + } else if (type == cmStateEnums::INTERFACE_LIBRARY && *s == "GLOBAL") { std::ostringstream e; e << "GLOBAL option may only be used with IMPORTED libraries."; this->SetError(e.str()); @@ -143,7 +143,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, } } - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { if (s != args.end()) { std::ostringstream e; e << "INTERFACE library requires no source arguments."; @@ -170,7 +170,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, bool issueMessage = false; switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0037)) { case cmPolicies::WARN: - if (type != cmState::INTERFACE_LIBRARY) { + if (type != cmStateEnums::INTERFACE_LIBRARY) { e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0037) << "\n"; issueMessage = true; } @@ -233,12 +233,12 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, this->SetError(e.str()); return false; } - cmState::TargetType aliasedType = aliasedTarget->GetType(); - if (aliasedType != cmState::SHARED_LIBRARY && - aliasedType != cmState::STATIC_LIBRARY && - aliasedType != cmState::MODULE_LIBRARY && - aliasedType != cmState::OBJECT_LIBRARY && - aliasedType != cmState::INTERFACE_LIBRARY) { + cmStateEnums::TargetType aliasedType = aliasedTarget->GetType(); + if (aliasedType != cmStateEnums::SHARED_LIBRARY && + aliasedType != cmStateEnums::STATIC_LIBRARY && + aliasedType != cmStateEnums::MODULE_LIBRARY && + aliasedType != cmStateEnums::OBJECT_LIBRARY && + aliasedType != cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "cannot create ALIAS target \"" << libName << "\" because target \"" << aliasedName << "\" is not a library."; @@ -265,16 +265,17 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, CMAKE_${LANG}_CREATE_SHARED_LIBRARY is defined and if not default to STATIC. But at this point we know only the name of the target, but not yet its linker language. */ - if ((type == cmState::SHARED_LIBRARY || type == cmState::MODULE_LIBRARY) && + if ((type == cmStateEnums::SHARED_LIBRARY || + type == cmStateEnums::MODULE_LIBRARY) && (this->Makefile->GetState()->GetGlobalPropertyAsBool( "TARGET_SUPPORTS_SHARED_LIBS") == false)) { std::ostringstream w; w << "ADD_LIBRARY called with " - << (type == cmState::SHARED_LIBRARY ? "SHARED" : "MODULE") + << (type == cmStateEnums::SHARED_LIBRARY ? "SHARED" : "MODULE") << " option but the target platform does not support dynamic linking. " "Building a STATIC library instead. This may lead to problems."; this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); - type = cmState::STATIC_LIBRARY; + type = cmStateEnums::STATIC_LIBRARY; } // Handle imported target creation. @@ -284,13 +285,13 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, this->SetError("called with IMPORTED argument but no library type."); return false; } - if (type == cmState::OBJECT_LIBRARY) { + if (type == cmStateEnums::OBJECT_LIBRARY) { this->Makefile->IssueMessage( cmake::FATAL_ERROR, "The OBJECT library type may not be used for IMPORTED libraries."); return true; } - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { if (!cmGeneratorExpression::IsValidTargetName(libName)) { std::ostringstream e; e << "Invalid name for IMPORTED INTERFACE library target: " << libName; @@ -314,7 +315,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, } // A non-imported target may not have UNKNOWN type. - if (type == cmState::UNKNOWN_LIBRARY) { + if (type == cmStateEnums::UNKNOWN_LIBRARY) { this->Makefile->IssueMessage( cmake::FATAL_ERROR, "The UNKNOWN library type may be used only for IMPORTED libraries."); @@ -332,7 +333,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, std::vector srclists; - if (type == cmState::INTERFACE_LIBRARY) { + if (type == cmStateEnums::INTERFACE_LIBRARY) { if (!cmGeneratorExpression::IsValidTargetName(libName) || libName.find("::") != std::string::npos) { std::ostringstream e; diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 56a469d..98e18ed 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -350,9 +350,9 @@ static void addLinkLibrary(cmMakefile* mf, std::string const& target, } cmTarget* tgt = mf->GetGlobalGenerator()->FindTarget(lib); - if (tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && - (tgt->GetType() != cmState::SHARED_LIBRARY) && - (tgt->GetType() != cmState::INTERFACE_LIBRARY) && + if (tgt && (tgt->GetType() != cmStateEnums::STATIC_LIBRARY) && + (tgt->GetType() != cmStateEnums::SHARED_LIBRARY) && + (tgt->GetType() != cmStateEnums::INTERFACE_LIBRARY) && !tgt->IsExecutableWithExports()) { std::ostringstream e; e << "Target \"" << lib << "\" of type " @@ -393,8 +393,8 @@ void CCONV cmAddLibrary(void* arg, const char* libname, int shared, for (i = 0; i < numSrcs; ++i) { srcs2.push_back(srcs[i]); } - mf->AddLibrary(libname, - (shared ? cmState::SHARED_LIBRARY : cmState::STATIC_LIBRARY), + mf->AddLibrary(libname, (shared ? cmStateEnums::SHARED_LIBRARY + : cmStateEnums::STATIC_LIBRARY), srcs2); } diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index b995fa1..72556b8 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -171,7 +171,7 @@ std::vector cmCommonTargetGenerator::GetLinkedTargetDirectories() // We can ignore the INTERFACE_LIBRARY items because // Target->GetLinkInformation already processed their // link interface and they don't have any output themselves. - && linkee->GetType() != cmState::INTERFACE_LIBRARY && + && linkee->GetType() != cmStateEnums::INTERFACE_LIBRARY && emitted.insert(linkee).second) { cmLocalGenerator* lg = linkee->GetLocalGenerator(); std::string di = lg->GetCurrentBinaryDirectory(); diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 93f3289..804d900 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -262,7 +262,7 @@ cmComputeLinkDepends::Compute() LinkEntry const& e = this->EntryList[i]; cmGeneratorTarget const* t = e.Target; // Entries that we know the linker will re-use do not need to be repeated. - bool uniquify = t && t->GetType() == cmState::SHARED_LIBRARY; + bool uniquify = t && t->GetType() == cmStateEnums::SHARED_LIBRARY; if (!uniquify || emmitted.insert(i).second) { this->FinalLinkEntries.push_back(e); } @@ -345,7 +345,7 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe) if (cmLinkInterface const* iface = entry.Target->GetLinkInterface(this->Config, this->Target)) { const bool isIface = - entry.Target->GetType() == cmState::INTERFACE_LIBRARY; + entry.Target->GetType() == cmStateEnums::INTERFACE_LIBRARY; // This target provides its own link interface information. this->AddLinkEntries(depender_index, iface->Libraries); diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 0807ef8..565eb15 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -282,7 +282,7 @@ cmComputeLinkInformation::cmComputeLinkInformation( // the program that will load it. this->LoaderFlag = CM_NULLPTR; if (!this->UseImportLibrary && - this->Target->GetType() == cmState::MODULE_LIBRARY) { + this->Target->GetType() == cmStateEnums::MODULE_LIBRARY) { std::string loader_flag_var = "CMAKE_SHARED_MODULE_LOADER_"; loader_flag_var += this->LinkLanguage; loader_flag_var += "_FLAG"; @@ -299,10 +299,10 @@ cmComputeLinkInformation::cmComputeLinkInformation( // Get options needed to specify RPATHs. this->RuntimeUseChrpath = false; - if (this->Target->GetType() != cmState::STATIC_LIBRARY) { - const char* tType = - ((this->Target->GetType() == cmState::EXECUTABLE) ? "EXECUTABLE" - : "SHARED_LIBRARY"); + if (this->Target->GetType() != cmStateEnums::STATIC_LIBRARY) { + const char* tType = ((this->Target->GetType() == cmStateEnums::EXECUTABLE) + ? "EXECUTABLE" + : "SHARED_LIBRARY"); std::string rtVar = "CMAKE_"; rtVar += tType; rtVar += "_RUNTIME_"; @@ -446,10 +446,10 @@ cmComputeLinkInformation::GetSharedLibrariesLinked() bool cmComputeLinkInformation::Compute() { // Skip targets that do not link. - if (!(this->Target->GetType() == cmState::EXECUTABLE || - this->Target->GetType() == cmState::SHARED_LIBRARY || - this->Target->GetType() == cmState::MODULE_LIBRARY || - this->Target->GetType() == cmState::STATIC_LIBRARY)) { + if (!(this->Target->GetType() == cmStateEnums::EXECUTABLE || + this->Target->GetType() == cmStateEnums::SHARED_LIBRARY || + this->Target->GetType() == cmStateEnums::MODULE_LIBRARY || + this->Target->GetType() == cmStateEnums::STATIC_LIBRARY)) { return false; } @@ -498,7 +498,7 @@ bool cmComputeLinkInformation::Compute() i != wrongItems.end(); ++i) { cmGeneratorTarget const* tgt = *i; bool implib = (this->UseImportLibrary && - (tgt->GetType() == cmState::SHARED_LIBRARY)); + (tgt->GetType() == cmStateEnums::SHARED_LIBRARY)); std::string lib = tgt->GetFullPath(this->Config, implib, true); this->OldLinkDirItems.push_back(lib); } @@ -600,20 +600,21 @@ void cmComputeLinkInformation::AddItem(std::string const& item, linkItem += exe; this->Items.push_back(Item(linkItem, true, tgt)); this->Depends.push_back(exe); - } else if (tgt->GetType() == cmState::INTERFACE_LIBRARY) { + } else if (tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { // Add the interface library as an item so it can be considered as part // of COMPATIBLE_INTERFACE_ enforcement. The generators will ignore // this for the actual link line. this->Items.push_back(Item(std::string(), false, tgt)); } else { // Decide whether to use an import library. - bool implib = (this->UseImportLibrary && - (impexe || tgt->GetType() == cmState::SHARED_LIBRARY)); + bool implib = + (this->UseImportLibrary && + (impexe || tgt->GetType() == cmStateEnums::SHARED_LIBRARY)); // Pass the full path to the target file. std::string lib = tgt->GetFullPath(config, implib, true); if (!this->LinkDependsNoShared || - tgt->GetType() != cmState::SHARED_LIBRARY) { + tgt->GetType() != cmStateEnums::SHARED_LIBRARY) { this->Depends.push_back(lib); } @@ -652,7 +653,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item, if (tgt) { // The target will provide a full path. Make sure it is a shared // library. - if (tgt->GetType() != cmState::SHARED_LIBRARY) { + if (tgt->GetType() != cmStateEnums::SHARED_LIBRARY) { return; } } else { @@ -725,13 +726,13 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo() const char* shared_link_type_flag = CM_NULLPTR; const char* target_type_str = CM_NULLPTR; switch (this->Target->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: target_type_str = "EXE"; break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: target_type_str = "SHARED_LIBRARY"; break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: target_type_str = "SHARED_MODULE"; break; default: @@ -964,12 +965,12 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item, // shared and static libraries but static-mode can handle only // static libraries. If a previous user item changed the link type // to static we need to make sure it is back to shared. - if (target->GetType() != cmState::STATIC_LIBRARY) { + if (target->GetType() != cmStateEnums::STATIC_LIBRARY) { this->SetCurrentLinkType(LinkShared); } // Keep track of shared library targets linked. - if (target->GetType() == cmState::SHARED_LIBRARY) { + if (target->GetType() == cmStateEnums::SHARED_LIBRARY) { this->SharedLibrariesLinked.insert(target); } @@ -1590,13 +1591,13 @@ void cmComputeLinkInformation::AddLibraryRuntimeInfo( // Libraries with unknown type must be handled using just the file // on disk. - if (target->GetType() == cmState::UNKNOWN_LIBRARY) { + if (target->GetType() == cmStateEnums::UNKNOWN_LIBRARY) { this->AddLibraryRuntimeInfo(fullPath); return; } // Skip targets that are not shared libraries (modules cannot be linked). - if (target->GetType() != cmState::SHARED_LIBRARY) { + if (target->GetType() != cmStateEnums::SHARED_LIBRARY) { return; } diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 735bc32..4cc4edf 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -187,7 +187,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index) { // Get the depender. cmGeneratorTarget const* depender = this->Targets[depender_index]; - if (depender->GetType() == cmState::INTERFACE_LIBRARY) { + if (depender->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return; } @@ -212,10 +212,10 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index) oi != objectFiles.end(); ++oi) { std::string objLib = (*oi)->GetObjectLibrary(); if (!objLib.empty() && emitted.insert(objLib).second) { - if (depender->GetType() != cmState::EXECUTABLE && - depender->GetType() != cmState::STATIC_LIBRARY && - depender->GetType() != cmState::SHARED_LIBRARY && - depender->GetType() != cmState::MODULE_LIBRARY) { + if (depender->GetType() != cmStateEnums::EXECUTABLE && + depender->GetType() != cmStateEnums::STATIC_LIBRARY && + depender->GetType() != cmStateEnums::SHARED_LIBRARY && + depender->GetType() != cmStateEnums::MODULE_LIBRARY) { this->GlobalGenerator->GetCMakeInstance()->IssueMessage( cmake::FATAL_ERROR, "Only executables and non-OBJECT libraries may " @@ -287,7 +287,7 @@ void cmComputeTargetDepends::AddInterfaceDepends( // Skip targets that will not really be linked. This is probably a // name conflict between an external library and an executable // within the project. - if (dependee && dependee->GetType() == cmState::EXECUTABLE && + if (dependee && dependee->GetType() == cmStateEnums::EXECUTABLE && !dependee->IsExecutableWithExports()) { dependee = CM_NULLPTR; } @@ -316,7 +316,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index, cmGeneratorTarget const* dependee = dependee_name.Target; if (!dependee && !linking && - (depender->GetType() != cmState::GLOBAL_TARGET)) { + (depender->GetType() != cmStateEnums::GLOBAL_TARGET)) { cmake::MessageType messageType = cmake::AUTHOR_WARNING; bool issueMessage = false; std::ostringstream e; @@ -351,7 +351,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index, // Skip targets that will not really be linked. This is probably a // name conflict between an external library and an executable // within the project. - if (linking && dependee && dependee->GetType() == cmState::EXECUTABLE && + if (linking && dependee && dependee->GetType() == cmStateEnums::EXECUTABLE && !dependee->IsExecutableWithExports()) { dependee = CM_NULLPTR; } @@ -366,7 +366,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index, bool linking) { if (dependee->IsImported() || - dependee->GetType() == cmState::INTERFACE_LIBRARY) { + dependee->GetType() == cmStateEnums::INTERFACE_LIBRARY) { // Skip IMPORTED and INTERFACE targets but follow their utility // dependencies. std::set const& utils = dependee->GetUtilityItems(); @@ -452,7 +452,7 @@ bool cmComputeTargetDepends::CheckComponents( // Make sure the component is all STATIC_LIBRARY targets. for (NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) { - if (this->Targets[*ni]->GetType() != cmState::STATIC_LIBRARY) { + if (this->Targets[*ni]->GetType() != cmStateEnums::STATIC_LIBRARY) { this->ComplainAboutBadComponent(ccg, c); return false; } diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index a409d40..cafba86 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -43,24 +43,25 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, // which signature were we called with ? this->SrcFileSignature = true; - cmState::TargetType targetType = cmState::EXECUTABLE; + cmStateEnums::TargetType targetType = cmStateEnums::EXECUTABLE; const char* tt = this->Makefile->GetDefinition("CMAKE_TRY_COMPILE_TARGET_TYPE"); if (!isTryRun && tt && *tt) { - if (strcmp(tt, cmState::GetTargetTypeName(cmState::EXECUTABLE)) == 0) { - targetType = cmState::EXECUTABLE; + if (strcmp(tt, cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE)) == + 0) { + targetType = cmStateEnums::EXECUTABLE; } else if (strcmp(tt, cmState::GetTargetTypeName( - cmState::STATIC_LIBRARY)) == 0) { - targetType = cmState::STATIC_LIBRARY; + cmStateEnums::STATIC_LIBRARY)) == 0) { + targetType = cmStateEnums::STATIC_LIBRARY; } else { this->Makefile->IssueMessage( cmake::FATAL_ERROR, std::string("Invalid value '") + tt + "' for " "CMAKE_TRY_COMPILE_TARGET_TYPE. Only " "'" + - cmState::GetTargetTypeName(cmState::EXECUTABLE) + "' and " - "'" + - cmState::GetTargetTypeName(cmState::STATIC_LIBRARY) + + cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE) + "' and " + "'" + + cmState::GetTargetTypeName(cmStateEnums::STATIC_LIBRARY) + "' " "are allowed."); return -1; @@ -122,12 +123,12 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, libsToLink += "\"" + cmSystemTools::TrimWhitespace(argv[i]) + "\" "; if (cmTarget* tgt = this->Makefile->FindTargetToUse(argv[i])) { switch (tgt->GetType()) { - case cmState::SHARED_LIBRARY: - case cmState::STATIC_LIBRARY: - case cmState::INTERFACE_LIBRARY: - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: break; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: if (tgt->IsExecutableWithExports()) { break; } @@ -481,13 +482,13 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, ? "NEW" : "OLD"); - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { /* Put the executable at a known location (for COPY_FILE). */ fprintf(fout, "set(CMAKE_RUNTIME_OUTPUT_DIRECTORY \"%s\")\n", this->BinaryDirectory.c_str()); /* Create the actual executable. */ fprintf(fout, "add_executable(%s", targetName.c_str()); - } else // if (targetType == cmState::STATIC_LIBRARY) + } else // if (targetType == cmStateEnums::STATIC_LIBRARY) { /* Put the static library at a known location (for COPY_FILE). */ fprintf(fout, "set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY \"%s\")\n", @@ -627,16 +628,16 @@ void cmCoreTryCompile::CleanupFiles(const char* binDir) } void cmCoreTryCompile::FindOutputFile(const std::string& targetName, - cmState::TargetType targetType) + cmStateEnums::TargetType targetType) { this->FindErrorMessage = ""; this->OutputFile = ""; std::string tmpOutputFile = "/"; - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { tmpOutputFile += targetName; tmpOutputFile += this->Makefile->GetSafeDefinition("CMAKE_EXECUTABLE_SUFFIX"); - } else // if (targetType == cmState::STATIC_LIBRARY) + } else // if (targetType == cmStateEnums::STATIC_LIBRARY) { tmpOutputFile += this->Makefile->GetSafeDefinition("CMAKE_STATIC_LIBRARY_PREFIX"); diff --git a/Source/cmCoreTryCompile.h b/Source/cmCoreTryCompile.h index e173a16..43b971f 100644 --- a/Source/cmCoreTryCompile.h +++ b/Source/cmCoreTryCompile.h @@ -35,7 +35,7 @@ protected: the error message is stored in FindErrorMessage. */ void FindOutputFile(const std::string& targetName, - cmState::TargetType targetType); + cmStateEnums::TargetType targetType); cmTypeMacro(cmCoreTryCompile, cmCommand); diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 0fd4ffb..5cb1104 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -42,7 +42,7 @@ bool cmCustomCommandGenerator::UseCrossCompilingEmulator(unsigned int c) const { std::string const& argv0 = this->CC.GetCommandLines()[c][0]; cmGeneratorTarget* target = this->LG->FindGeneratorTargetToUse(argv0); - if (target && target->GetType() == cmState::EXECUTABLE) { + if (target && target->GetType() == cmStateEnums::EXECUTABLE) { return target->GetProperty("CROSSCOMPILING_EMULATOR") != CM_NULLPTR; } return false; @@ -52,12 +52,12 @@ std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const { std::string const& argv0 = this->CC.GetCommandLines()[c][0]; cmGeneratorTarget* target = this->LG->FindGeneratorTargetToUse(argv0); - if (target && target->GetType() == cmState::EXECUTABLE && + if (target && target->GetType() == cmStateEnums::EXECUTABLE && (target->IsImported() || !this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING"))) { return target->GetLocation(this->Config); } - if (target && target->GetType() == cmState::EXECUTABLE) { + if (target && target->GetType() == cmStateEnums::EXECUTABLE) { const char* emulator = target->GetProperty("CROSSCOMPILING_EMULATOR"); if (emulator) { return std::string(emulator); diff --git a/Source/cmExportBuildAndroidMKGenerator.cxx b/Source/cmExportBuildAndroidMKGenerator.cxx index f5e6628..38f95d2 100644 --- a/Source/cmExportBuildAndroidMKGenerator.cxx +++ b/Source/cmExportBuildAndroidMKGenerator.cxx @@ -111,8 +111,8 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( target->GetLocalGenerator()->FindGeneratorTargetToUse(*i); if (gt) { - if (gt->GetType() == cmState::SHARED_LIBRARY || - gt->GetType() == cmState::MODULE_LIBRARY) { + if (gt->GetType() == cmStateEnums::SHARED_LIBRARY || + gt->GetType() == cmStateEnums::MODULE_LIBRARY) { sharedLibs += " " + *i; } else { staticLibs += " " + *i; @@ -168,7 +168,7 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( } // Tell the NDK build system if prebuilt static libraries use C++. - if (target->GetType() == cmState::STATIC_LIBRARY) { + if (target->GetType() == cmStateEnums::STATIC_LIBRARY) { cmLinkImplementation const* li = target->GetLinkImplementation(config); if (std::find(li->Languages.begin(), li->Languages.end(), "CXX") != li->Languages.end()) { @@ -177,19 +177,19 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( } switch (target->GetType()) { - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: os << "include $(PREBUILT_SHARED_LIBRARY)\n"; break; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: os << "include $(PREBUILT_STATIC_LIBRARY)\n"; break; - case cmState::EXECUTABLE: - case cmState::UTILITY: - case cmState::OBJECT_LIBRARY: - case cmState::GLOBAL_TARGET: - case cmState::INTERFACE_LIBRARY: - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::EXECUTABLE: + case cmStateEnums::UTILITY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::GLOBAL_TARGET: + case cmStateEnums::INTERFACE_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: break; } os << "\n"; diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 68831c7..e5f7a55 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -57,7 +57,7 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os) this->LG->GetMakefile()->GetBacktrace()); return false; } - if (te->GetType() == cmState::INTERFACE_LIBRARY) { + if (te->GetType() == cmStateEnums::INTERFACE_LIBRARY) { this->GenerateRequiredCMakeVersion(os, "3.0.0"); } } @@ -134,12 +134,12 @@ void cmExportBuildFileGenerator::GenerateImportTargetsConfig( cmGeneratorTarget* target = *tei; ImportPropertyMap properties; - if (target->GetType() != cmState::INTERFACE_LIBRARY) { + if (target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { this->SetImportLocationProperty(config, suffix, target, properties); } if (!properties.empty()) { // Get the rest of the target details. - if (target->GetType() != cmState::INTERFACE_LIBRARY) { + if (target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { this->SetImportDetailProperties(config, suffix, target, properties, missingTargets); this->SetImportLinkInterface(config, suffix, @@ -186,7 +186,7 @@ void cmExportBuildFileGenerator::SetImportLocationProperty( // Add the import library for windows DLLs. if (target->IsDLLPlatform() && - (target->GetType() == cmState::SHARED_LIBRARY || + (target->GetType() == cmStateEnums::SHARED_LIBRARY || target->IsExecutableWithExports()) && mf->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX")) { std::string prop = "IMPORTED_IMPLIB"; diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index d438363..4fb5998 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -141,14 +141,14 @@ bool cmExportCommand::InitialPass(std::vector const& args, } if (cmTarget* target = gg->FindTarget(*currentTarget)) { - if (target->GetType() == cmState::OBJECT_LIBRARY) { + if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "given OBJECT library \"" << *currentTarget << "\" which may not be exported."; this->SetError(e.str()); return false; } - if (target->GetType() == cmState::UTILITY) { + if (target->GetType() == cmStateEnums::UTILITY) { this->SetError("given custom target \"" + *currentTarget + "\" which may not be exported."); return false; diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index d3a99fa..3cd72a8 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -492,7 +492,7 @@ void cmExportFileGenerator::PopulateCompatibleInterfaceProperties( getPropertyContents(gtarget, "COMPATIBLE_INTERFACE_NUMBER_MAX", ifaceProperties); - if (gtarget->GetType() != cmState::INTERFACE_LIBRARY) { + if (gtarget->GetType() != cmStateEnums::INTERFACE_LIBRARY) { getCompatibleInterfaceProperties(gtarget, ifaceProperties, ""); std::vector configNames; @@ -735,8 +735,8 @@ void cmExportFileGenerator::SetImportDetailProperties( cmMakefile* mf = target->Makefile; // Add the soname for unix shared libraries. - if (target->GetType() == cmState::SHARED_LIBRARY || - target->GetType() == cmState::MODULE_LIBRARY) { + if (target->GetType() == cmStateEnums::SHARED_LIBRARY || + target->GetType() == cmStateEnums::MODULE_LIBRARY) { if (!target->IsDLLPlatform()) { std::string prop; std::string value; @@ -912,22 +912,22 @@ void cmExportFileGenerator::GenerateImportTargetCode( // Create the imported target. os << "# Create imported target " << targetName << "\n"; switch (target->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: os << "add_executable(" << targetName << " IMPORTED)\n"; break; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: os << "add_library(" << targetName << " STATIC IMPORTED)\n"; break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: os << "add_library(" << targetName << " SHARED IMPORTED)\n"; break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: os << "add_library(" << targetName << " MODULE IMPORTED)\n"; break; - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: os << "add_library(" << targetName << " UNKNOWN IMPORTED)\n"; break; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: os << "add_library(" << targetName << " INTERFACE IMPORTED)\n"; break; default: // should never happen diff --git a/Source/cmExportInstallAndroidMKGenerator.cxx b/Source/cmExportInstallAndroidMKGenerator.cxx index 58b7510..f9f5f3a 100644 --- a/Source/cmExportInstallAndroidMKGenerator.cxx +++ b/Source/cmExportInstallAndroidMKGenerator.cxx @@ -38,7 +38,7 @@ void cmExportInstallAndroidMKGenerator::GenerateImportHeaderCode( tei != this->IEGen->GetExportSet()->GetTargetExports()->end(); ++tei) { // Collect import properties for this target. cmTargetExport const* te = *tei; - if (te->Target->GetType() == cmState::INTERFACE_LIBRARY) { + if (te->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } std::string dest; diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 0e043de..92c3bf1 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -81,7 +81,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) cmGeneratorTarget* gt = (*tei)->Target; requiresConfigFiles = - requiresConfigFiles || gt->GetType() != cmState::INTERFACE_LIBRARY; + requiresConfigFiles || gt->GetType() != cmStateEnums::INTERFACE_LIBRARY; this->GenerateImportTargetCode(os, gt); @@ -120,7 +120,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) require2_8_12 = true; } } - if (gt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { require3_0_0 = true; } if (gt->GetProperty("INTERFACE_SOURCES")) { @@ -316,7 +316,7 @@ void cmExportInstallFileGenerator::GenerateImportTargetsConfig( tei != this->IEGen->GetExportSet()->GetTargetExports()->end(); ++tei) { // Collect import properties for this target. cmTargetExport const* te = *tei; - if (te->Target->GetType() == cmState::INTERFACE_LIBRARY) { + if (te->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index f80980a..66b77a6 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -79,8 +79,8 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const cmTarget const& target = l->second; // Skip non-library targets. - if (target.GetType() < cmState::STATIC_LIBRARY || - target.GetType() > cmState::MODULE_LIBRARY) { + if (target.GetType() < cmStateEnums::STATIC_LIBRARY || + target.GetType() > cmStateEnums::MODULE_LIBRARY) { continue; } diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index 9fc71f6..a262e14 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -67,7 +67,7 @@ std::string cmExportTryCompileFileGenerator::FindTargets( CM_AUTO_PTR cge = ge.Parse(prop); - cmTarget dummyHead("try_compile_dummy_exe", cmState::EXECUTABLE, + cmTarget dummyHead("try_compile_dummy_exe", cmStateEnums::EXECUTABLE, cmTarget::VisibilityNormal, tgt->Target->GetMakefile()); cmGeneratorTarget gDummyHead(&dummyHead, tgt->GetLocalGenerator()); diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 18c732d..b91cae9 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -302,7 +302,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( ti != targets.end(); ti++) { std::string targetName = (*ti)->GetName(); switch ((*ti)->GetType()) { - case cmState::GLOBAL_TARGET: { + case cmStateEnums::GLOBAL_TARGET: { // Only add the global targets from CMAKE_BINARY_DIR, // not from the subdirs if (strcmp((*lg)->GetCurrentBinaryDirectory(), @@ -311,7 +311,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( compiler.c_str(), makeArgs); } } break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: // Add all utility targets, except the Nightly/Continuous/ // Experimental-"sub"targets as e.g. NightlyStart if (((targetName.find("Nightly") == 0) && @@ -326,11 +326,11 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( this->AppendTarget(xml, targetName, CM_NULLPTR, make.c_str(), *lg, compiler.c_str(), makeArgs); break; - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: { cmGeneratorTarget* gt = *ti; this->AppendTarget(xml, targetName, gt, make.c_str(), *lg, compiler.c_str(), makeArgs); @@ -364,12 +364,12 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( for (std::vector::iterator ti = targets.begin(); ti != targets.end(); ti++) { switch ((*ti)->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: - case cmState::UTILITY: // can have sources since 2.6.3 + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::UTILITY: // can have sources since 2.6.3 { std::vector sources; cmGeneratorTarget* gt = *ti; @@ -379,7 +379,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( si != sources.end(); si++) { // don't add source files from UTILITY target which have the // GENERATED property set: - if (gt->GetType() == cmState::UTILITY && + if (gt->GetType() == cmStateEnums::UTILITY && (*si)->GetPropertyAsBool("GENERATED")) { continue; } @@ -519,7 +519,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget( if (target != CM_NULLPTR) { int cbTargetType = this->GetCBTargetType(target); std::string workingDir = lg->GetCurrentBinaryDirectory(); - if (target->GetType() == cmState::EXECUTABLE) { + if (target->GetType() == cmStateEnums::EXECUTABLE) { // Determine the directory where the executable target is created, and // set the working directory to this dir. const char* runtimeOutputDir = @@ -537,7 +537,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget( std::string buildType = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); std::string location; - if (target->GetType() == cmState::OBJECT_LIBRARY) { + if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) { location = this->CreateDummyTargetFile(const_cast(lg), target); } else { @@ -713,17 +713,17 @@ std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf) int cmExtraCodeBlocksGenerator::GetCBTargetType(cmGeneratorTarget* target) { switch (target->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: if ((target->GetPropertyAsBool("WIN32_EXECUTABLE")) || (target->GetPropertyAsBool("MACOSX_BUNDLE"))) { return 0; } return 1; - case cmState::STATIC_LIBRARY: - case cmState::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: return 2; - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return 3; default: return 4; diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 360c852..90d41fe 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -127,7 +127,7 @@ std::vector cmExtraCodeLiteGenerator::CreateProjectsByTarget( for (std::vector::const_iterator lt = (*lg)->GetGeneratorTargets().begin(); lt != (*lg)->GetGeneratorTargets().end(); lt++) { - cmState::TargetType type = (*lt)->GetType(); + cmStateEnums::TargetType type = (*lt)->GetType(); std::string outputDir = (*lg)->GetCurrentBinaryDirectory(); std::string filename = outputDir + "/" + (*lt)->GetName() + ".project"; retval.push_back((*lt)->GetName()); @@ -136,11 +136,11 @@ std::vector cmExtraCodeLiteGenerator::CreateProjectsByTarget( this->WorkspacePath.c_str(), filename.c_str()); std::string visualname = (*lt)->GetName(); switch (type) { - case cmState::SHARED_LIBRARY: - case cmState::STATIC_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: visualname = "lib" + visualname; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: xml->StartElement("Project"); xml->Attribute("Name", visualname); xml->Attribute("Path", relafilename); @@ -209,16 +209,16 @@ std::string cmExtraCodeLiteGenerator::CollectSourceFiles( std::string projectType; switch (gt->GetType()) { - case cmState::EXECUTABLE: { + case cmStateEnums::EXECUTABLE: { projectType = "Executable"; } break; - case cmState::STATIC_LIBRARY: { + case cmStateEnums::STATIC_LIBRARY: { projectType = "Static Library"; } break; - case cmState::SHARED_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: { projectType = "Dynamic Library"; } break; - case cmState::MODULE_LIBRARY: { + case cmStateEnums::MODULE_LIBRARY: { projectType = "Dynamic Library"; } break; default: // intended fallthrough @@ -226,10 +226,10 @@ std::string cmExtraCodeLiteGenerator::CollectSourceFiles( } switch (gt->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: { std::vector sources; gt->GetSourceFiles(sources, makefile->GetSafeDefinition("CMAKE_BUILD_TYPE")); @@ -511,9 +511,9 @@ void cmExtraCodeLiteGenerator::CreateNewProjectFile( xml.StartElement("CodeLite_Project"); std::string visualname = gt->GetName(); switch (gt->GetType()) { - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: visualname = "lib" + visualname; default: // intended fallthrough break; diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index e342f4c..7535e8c 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -482,13 +482,14 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(cmXMLWriter& xml) std::string linkName2 = linkName; linkName2 += "/"; switch ((*ti)->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: { const char* prefix = - ((*ti)->GetType() == cmState::EXECUTABLE ? "[exe] " : "[lib] "); + ((*ti)->GetType() == cmStateEnums::EXECUTABLE ? "[exe] " + : "[lib] "); linkName2 += prefix; linkName2 += (*ti)->GetName(); this->AppendLinkedResource(xml, linkName2, "virtual:/virtual", @@ -912,14 +913,14 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const ti != targets.end(); ++ti) { std::string targetName = (*ti)->GetName(); switch ((*ti)->GetType()) { - case cmState::GLOBAL_TARGET: { + case cmStateEnums::GLOBAL_TARGET: { // Only add the global targets from CMAKE_BINARY_DIR, // not from the subdirs if (subdir.empty()) { this->AppendTarget(xml, targetName, make, makeArgs, subdir, ": "); } } break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: // Add all utility targets, except the Nightly/Continuous/ // Experimental-"sub"targets as e.g. NightlyStart if (((targetName.find("Nightly") == 0) && @@ -933,13 +934,14 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const this->AppendTarget(xml, targetName, make, makeArgs, subdir, ": "); break; - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: { const char* prefix = - ((*ti)->GetType() == cmState::EXECUTABLE ? "[exe] " : "[lib] "); + ((*ti)->GetType() == cmStateEnums::EXECUTABLE ? "[exe] " + : "[lib] "); this->AppendTarget(xml, targetName, make, makeArgs, subdir, prefix); std::string fastTarget = targetName; fastTarget += "/fast"; diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index b78d09a..3f09469 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -124,7 +124,7 @@ void cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg, ti != targets.end(); ++ti) { std::string targetName = (*ti)->GetName(); switch ((*ti)->GetType()) { - case cmState::GLOBAL_TARGET: { + case cmStateEnums::GLOBAL_TARGET: { bool insertTarget = false; // Only add the global targets from CMAKE_BINARY_DIR, // not from the subdirs @@ -147,7 +147,7 @@ void cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg, homeOutputDir); } } break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: // Add all utility targets, except the Nightly/Continuous/ // Experimental-"sub"targets as e.g. NightlyStart if (((targetName.find("Nightly") == 0) && @@ -162,11 +162,11 @@ void cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg, this->AppendTarget(fout, targetName, make, makeArgs, currentDir, homeOutputDir); break; - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: { this->AppendTarget(fout, targetName, make, makeArgs, currentDir, homeOutputDir); std::string fastTarget = targetName; diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 41f82a2..9a83c49 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -156,7 +156,7 @@ void cmExtraSublimeTextGenerator::AppendAllTargets( ti != targets.end(); ti++) { std::string targetName = (*ti)->GetName(); switch ((*ti)->GetType()) { - case cmState::GLOBAL_TARGET: { + case cmStateEnums::GLOBAL_TARGET: { // Only add the global targets from CMAKE_BINARY_DIR, // not from the subdirs if (strcmp((*lg)->GetCurrentBinaryDirectory(), @@ -166,7 +166,7 @@ void cmExtraSublimeTextGenerator::AppendAllTargets( false); } } break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: // Add all utility targets, except the Nightly/Continuous/ // Experimental-"sub"targets as e.g. NightlyStart if (((targetName.find("Nightly") == 0) && @@ -182,11 +182,11 @@ void cmExtraSublimeTextGenerator::AppendAllTargets( makefile, compiler.c_str(), sourceFileFlags, false); break; - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: { this->AppendTarget(fout, targetName, *lg, *ti, make.c_str(), makefile, compiler.c_str(), sourceFileFlags, false); diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index f866605..f34b2d6 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1104,7 +1104,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode if (!prop) { if (target->IsImported() || - target->GetType() == cmState::INTERFACE_LIBRARY) { + target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return linkedTargetsContent; } if (target->IsLinkInterfaceDependentBoolProperty(propertyName, @@ -1224,7 +1224,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode reportError(context, content->GetOriginalExpression(), e.str()); return std::string(); } - if (gt->GetType() != cmState::OBJECT_LIBRARY) { + if (gt->GetType() != cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "Objects of target \"" << tgtName << "\" referenced but is not an OBJECT library."; @@ -1506,7 +1506,7 @@ struct TargetFilesystemArtifactResultCreator "for DLL target platforms."); return std::string(); } - if (target->GetType() != cmState::SHARED_LIBRARY) { + if (target->GetType() != cmStateEnums::SHARED_LIBRARY) { ::reportError(context, content->GetOriginalExpression(), "TARGET_SONAME_FILE is allowed only for " "SHARED libraries."); @@ -1542,11 +1542,11 @@ struct TargetFilesystemArtifactResultCreator return std::string(); } - cmState::TargetType targetType = target->GetType(); + cmStateEnums::TargetType targetType = target->GetType(); - if (targetType != cmState::SHARED_LIBRARY && - targetType != cmState::MODULE_LIBRARY && - targetType != cmState::EXECUTABLE) { + if (targetType != cmStateEnums::SHARED_LIBRARY && + targetType != cmStateEnums::MODULE_LIBRARY && + targetType != cmStateEnums::EXECUTABLE) { ::reportError(context, content->GetOriginalExpression(), "TARGET_PDB_FILE is allowed only for " "targets with linker created artifacts."); @@ -1646,8 +1646,8 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode "No target \"" + name + "\""); return std::string(); } - if (target->GetType() >= cmState::OBJECT_LIBRARY && - target->GetType() != cmState::UNKNOWN_LIBRARY) { + if (target->GetType() >= cmStateEnums::OBJECT_LIBRARY && + target->GetType() != cmStateEnums::UNKNOWN_LIBRARY) { ::reportError(context, content->GetOriginalExpression(), "Target \"" + name + "\" is not an executable or library."); return std::string(); diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index b16cfc6..8324c30 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -215,7 +215,7 @@ struct TagVisitor , Target(target) , GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator()) , Header(CM_HEADER_REGEX) - , IsObjLib(target->GetType() == cmState::OBJECT_LIBRARY) + , IsObjLib(target->GetType() == cmStateEnums::OBJECT_LIBRARY) { } @@ -230,7 +230,7 @@ struct TagVisitor std::string ext = cmSystemTools::LowerCase(sf->GetExtension()); if (sf->GetCustomCommand()) { DoAccept::Result>::Do(this->Data, sf); - } else if (this->Target->GetType() == cmState::UTILITY) { + } else if (this->Target->GetType() == cmStateEnums::UTILITY) { DoAccept::Result>::Do(this->Data, sf); } else if (sf->GetPropertyAsBool("HEADER_FILE_ONLY")) { DoAccept::Result>::Do(this->Data, sf); @@ -368,7 +368,7 @@ cmLocalGenerator* cmGeneratorTarget::GetLocalGenerator() const return this->LocalGenerator; } -cmState::TargetType cmGeneratorTarget::GetType() const +cmStateEnums::TargetType cmGeneratorTarget::GetType() const { return this->Target->GetType(); } @@ -415,7 +415,7 @@ const char* cmGeneratorTarget::GetProperty(const std::string& prop) const const char* cmGeneratorTarget::GetOutputTargetType(bool implib) const { switch (this->GetType()) { - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: if (this->IsDLLPlatform()) { if (implib) { // A DLL import library is treated as an archive target. @@ -428,10 +428,10 @@ const char* cmGeneratorTarget::GetOutputTargetType(bool implib) const // library targets. return "LIBRARY"; } - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: // Static libraries are always treated as archive targets. return "ARCHIVE"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: if (implib) { // Module libraries are always treated as library targets. return "ARCHIVE"; @@ -439,7 +439,7 @@ const char* cmGeneratorTarget::GetOutputTargetType(bool implib) const // Module import libraries are treated as archive targets. return "LIBRARY"; } - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: if (implib) { // Executable import libraries are treated as archive targets. return "ARCHIVE"; @@ -845,7 +845,7 @@ const char* cmGeneratorTarget::GetLocationForBuild() const bool cmGeneratorTarget::IsSystemIncludeDirectory( const std::string& dir, const std::string& config) const { - assert(this->GetType() != cmState::INTERFACE_LIBRARY); + assert(this->GetType() != cmStateEnums::INTERFACE_LIBRARY); std::string config_upper; if (!config.empty()) { config_upper = cmSystemTools::UpperCase(config); @@ -1006,7 +1006,7 @@ static bool processSources( void cmGeneratorTarget::GetSourceFiles(std::vector& files, const std::string& config) const { - assert(this->GetType() != cmState::INTERFACE_LIBRARY); + assert(this->GetType() != cmStateEnums::INTERFACE_LIBRARY); if (!this->LocalGenerator->GetGlobalGenerator()->GetConfigureDoneCMP0026()) { // At configure-time, this method can be called as part of getting the @@ -1151,7 +1151,7 @@ bool cmGeneratorTarget::HasSOName(const std::string& config) const { // soname is supported only for shared libraries and modules, // and then only when the platform supports an soname flag. - return ((this->GetType() == cmState::SHARED_LIBRARY) && + return ((this->GetType() == cmStateEnums::SHARED_LIBRARY) && !this->GetPropertyAsBool("NO_SONAME") && this->Makefile->GetSONameFlag(this->GetLinkerLanguage(config))); } @@ -1161,9 +1161,9 @@ bool cmGeneratorTarget::NeedRelinkBeforeInstall( { // Only executables and shared libraries can have an rpath and may // need relinking. - if (this->GetType() != cmState::EXECUTABLE && - this->GetType() != cmState::SHARED_LIBRARY && - this->GetType() != cmState::MODULE_LIBRARY) { + if (this->GetType() != cmStateEnums::EXECUTABLE && + this->GetType() != cmStateEnums::SHARED_LIBRARY && + this->GetType() != cmStateEnums::MODULE_LIBRARY) { return false; } @@ -1235,9 +1235,9 @@ bool cmGeneratorTarget::NeedRelinkBeforeInstall( bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const { // Only certain target types have an rpath. - if (!(this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY || - this->GetType() == cmState::EXECUTABLE)) { + if (!(this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY || + this->GetType() == cmStateEnums::EXECUTABLE)) { return false; } @@ -1292,7 +1292,7 @@ bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const bool cmGeneratorTarget::IsImportedSharedLibWithoutSOName( const std::string& config) const { - if (this->IsImported() && this->GetType() == cmState::SHARED_LIBRARY) { + if (this->IsImported() && this->GetType() == cmStateEnums::SHARED_LIBRARY) { if (cmGeneratorTarget::ImportInfo const* info = this->GetImportInfo(config)) { return info->NoSOName; @@ -1308,7 +1308,7 @@ bool cmGeneratorTarget::HasMacOSXRpathInstallNameDir( bool macosx_rpath = false; if (!this->IsImported()) { - if (this->GetType() != cmState::SHARED_LIBRARY) { + if (this->GetType() != cmStateEnums::SHARED_LIBRARY) { return false; } const char* install_name = this->GetProperty("INSTALL_NAME_DIR"); @@ -1562,17 +1562,17 @@ const cmListFileBacktrace* cmGeneratorTarget::GetUtilityBacktrace( bool cmGeneratorTarget::HaveWellDefinedOutputFiles() const { - return this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY || - this->GetType() == cmState::EXECUTABLE; + return this->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY || + this->GetType() == cmStateEnums::EXECUTABLE; } const char* cmGeneratorTarget::GetExportMacro() const { // Define the symbol for targets that export symbols. - if (this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY || + if (this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY || this->IsExecutableWithExports()) { if (const char* custom_export_name = this->GetProperty("DEFINE_SYMBOL")) { this->ExportMacro = custom_export_name; @@ -1846,7 +1846,7 @@ cmGeneratorTarget::CompileInfo const* cmGeneratorTarget::GetCompileInfo( return CM_NULLPTR; } - if (this->GetType() > cmState::OBJECT_LIBRARY) { + if (this->GetType() > cmStateEnums::OBJECT_LIBRARY) { std::string msg = "cmTarget::GetCompileInfo called for "; msg += this->GetName(); msg += " which has type "; @@ -2023,7 +2023,7 @@ cmTargetTraceDependencies::cmTargetTraceDependencies(cmGeneratorTarget* target) this->CurrentEntry = CM_NULLPTR; // Queue all the source files already specified for the target. - if (target->GetType() != cmState::INTERFACE_LIBRARY) { + if (target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { std::vector configs; this->Makefile->GetConfigurations(configs); if (configs.empty()) { @@ -2158,8 +2158,8 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep) // then make sure it was not a full path to something else, and // the fact that the name matched a target was just a coincidence. if (cmSystemTools::FileIsFullPath(dep.c_str())) { - if (t->GetType() >= cmState::EXECUTABLE && - t->GetType() <= cmState::MODULE_LIBRARY) { + if (t->GetType() >= cmStateEnums::EXECUTABLE && + t->GetType() <= cmStateEnums::MODULE_LIBRARY) { // This is really only for compatibility so we do not need to // worry about configuration names and output names. std::string tLocation = t->GetLocationForBuild(); @@ -2199,7 +2199,7 @@ void cmTargetTraceDependencies::CheckCustomCommand(cmCustomCommand const& cc) // Check for a target with this name. if (cmGeneratorTarget* t = this->LocalGenerator->FindGeneratorTargetToUse(command)) { - if (t->GetType() == cmState::EXECUTABLE) { + if (t->GetType() == cmStateEnums::EXECUTABLE) { // The command refers to an executable target built in // this project. Add the target-level dependency to make // sure the executable is up to date before this custom @@ -2273,7 +2273,7 @@ void cmGeneratorTarget::TraceDependencies() // would find nothing anyway, but when building CMake itself the "install" // target command ends up referencing the "cmake" target but we do not // really want the dependency because "install" depend on "all" anyway. - if (this->GetType() == cmState::GLOBAL_TARGET) { + if (this->GetType() == cmStateEnums::GLOBAL_TARGET) { return; } @@ -2312,7 +2312,7 @@ std::string cmGeneratorTarget::GetCreateRuleVariable( std::string const& lang, std::string const& config) const { switch (this->GetType()) { - case cmState::STATIC_LIBRARY: { + case cmStateEnums::STATIC_LIBRARY: { std::string var = "CMAKE_" + lang + "_CREATE_STATIC_LIBRARY"; if (this->GetFeatureAsBool("INTERPROCEDURAL_OPTIMIZATION", config)) { std::string varIPO = var + "_IPO"; @@ -2322,11 +2322,11 @@ std::string cmGeneratorTarget::GetCreateRuleVariable( } return var; } - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return "CMAKE_" + lang + "_CREATE_SHARED_LIBRARY"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return "CMAKE_" + lang + "_CREATE_SHARED_MODULE"; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return "CMAKE_" + lang + "_LINK_EXECUTABLE"; default: break; @@ -2753,11 +2753,11 @@ void cmGeneratorTarget::ComputeTargetManifest(const std::string& config) const std::string realName; std::string impName; std::string pdbName; - if (this->GetType() == cmState::EXECUTABLE) { + if (this->GetType() == cmStateEnums::EXECUTABLE) { this->GetExecutableNames(name, realName, impName, pdbName, config); - } else if (this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY) { + } else if (this->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY) { this->GetLibraryNames(name, soName, realName, impName, pdbName, config); } else { return; @@ -2843,7 +2843,7 @@ std::string cmGeneratorTarget::NormalGetRealName( this->LocalGenerator->IssueMessage(cmake::INTERNAL_ERROR, msg); } - if (this->GetType() == cmState::EXECUTABLE) { + if (this->GetType() == cmStateEnums::EXECUTABLE) { // Compute the real name that will be built. std::string name; std::string realName; @@ -2926,8 +2926,8 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name, std::string& soName, } // The import library name. - if (this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY) { + if (this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY) { impName = this->GetFullNameInternal(config, true); } else { impName = ""; @@ -2959,7 +2959,7 @@ void cmGeneratorTarget::GetExecutableNames(std::string& name, #else // Check for executable version properties. const char* version = this->GetProperty("VERSION"); - if (this->GetType() != cmState::EXECUTABLE || + if (this->GetType() != cmStateEnums::EXECUTABLE || this->Makefile->IsOn("XCODE")) { version = CM_NULLPTR; } @@ -3028,10 +3028,10 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, std::string& outSuffix) const { // Use just the target name for non-main target types. - if (this->GetType() != cmState::STATIC_LIBRARY && - this->GetType() != cmState::SHARED_LIBRARY && - this->GetType() != cmState::MODULE_LIBRARY && - this->GetType() != cmState::EXECUTABLE) { + if (this->GetType() != cmStateEnums::STATIC_LIBRARY && + this->GetType() != cmStateEnums::SHARED_LIBRARY && + this->GetType() != cmStateEnums::MODULE_LIBRARY && + this->GetType() != cmStateEnums::EXECUTABLE) { outPrefix = ""; outBase = this->GetName(); outSuffix = ""; @@ -3050,9 +3050,9 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, // The implib option is only allowed for shared libraries, module // libraries, and executables. - if (this->GetType() != cmState::SHARED_LIBRARY && - this->GetType() != cmState::MODULE_LIBRARY && - this->GetType() != cmState::EXECUTABLE) { + if (this->GetType() != cmStateEnums::SHARED_LIBRARY && + this->GetType() != cmStateEnums::MODULE_LIBRARY && + this->GetType() != cmStateEnums::EXECUTABLE) { implib = false; } @@ -3130,7 +3130,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, // Name shared libraries with their version number on some platforms. if (const char* soversion = this->GetProperty("SOVERSION")) { - if (this->GetType() == cmState::SHARED_LIBRARY && !implib && + if (this->GetType() == cmStateEnums::SHARED_LIBRARY && !implib && this->Makefile->IsOn("CMAKE_SHARED_LIBRARY_NAME_WITH_VERSION")) { outBase += "-"; outBase += soversion; @@ -3296,8 +3296,8 @@ cmGeneratorTarget::GetCompatibleInterfaces(std::string const& config) const bool cmGeneratorTarget::IsLinkInterfaceDependentBoolProperty( const std::string& p, const std::string& config) const { - if (this->GetType() == cmState::OBJECT_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::OBJECT_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return false; } return this->GetCompatibleInterfaces(config).PropsBool.count(p) > 0; @@ -3306,8 +3306,8 @@ bool cmGeneratorTarget::IsLinkInterfaceDependentBoolProperty( bool cmGeneratorTarget::IsLinkInterfaceDependentStringProperty( const std::string& p, const std::string& config) const { - if (this->GetType() == cmState::OBJECT_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::OBJECT_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return false; } return this->GetCompatibleInterfaces(config).PropsString.count(p) > 0; @@ -3316,8 +3316,8 @@ bool cmGeneratorTarget::IsLinkInterfaceDependentStringProperty( bool cmGeneratorTarget::IsLinkInterfaceDependentNumberMinProperty( const std::string& p, const std::string& config) const { - if (this->GetType() == cmState::OBJECT_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::OBJECT_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return false; } return this->GetCompatibleInterfaces(config).PropsNumberMin.count(p) > 0; @@ -3326,8 +3326,8 @@ bool cmGeneratorTarget::IsLinkInterfaceDependentNumberMinProperty( bool cmGeneratorTarget::IsLinkInterfaceDependentNumberMaxProperty( const std::string& p, const std::string& config) const { - if (this->GetType() == cmState::OBJECT_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::OBJECT_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return false; } return this->GetCompatibleInterfaces(config).PropsNumberMax.count(p) > 0; @@ -3921,7 +3921,7 @@ void cmGeneratorTarget::GetTargetVersion(bool soversion, int& major, minor = 0; patch = 0; - assert(this->GetType() != cmState::INTERFACE_LIBRARY); + assert(this->GetType() != cmStateEnums::INTERFACE_LIBRARY); // Look for a VERSION or SOVERSION property. const char* prop = soversion ? "SOVERSION" : "VERSION"; @@ -3993,7 +3993,7 @@ std::string cmGeneratorTarget::CreateFortranModuleDirectory( std::string cmGeneratorTarget::GetFrameworkVersion() const { - assert(this->GetType() != cmState::INTERFACE_LIBRARY); + assert(this->GetType() != cmStateEnums::INTERFACE_LIBRARY); if (const char* fversion = this->GetProperty("FRAMEWORK_VERSION")) { return fversion; @@ -4109,7 +4109,7 @@ cmLinkInterface const* cmGeneratorTarget::GetLinkInterface( // Link interfaces are not supported for executables that do not // export symbols. - if (this->GetType() == cmState::EXECUTABLE && + if (this->GetType() == cmStateEnums::EXECUTABLE && !this->IsExecutableWithExports()) { return CM_NULLPTR; } @@ -4143,9 +4143,9 @@ void cmGeneratorTarget::ComputeLinkInterface( cmGeneratorTarget const* headTarget) const { if (iface.ExplicitLibraries) { - if (this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { // Shared libraries may have runtime implementation dependencies // on other shared libraries that are not in the interface. UNORDERED_SET emitted; @@ -4154,7 +4154,7 @@ void cmGeneratorTarget::ComputeLinkInterface( li != iface.Libraries.end(); ++li) { emitted.insert(*li); } - if (this->GetType() != cmState::INTERFACE_LIBRARY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY) { cmLinkImplementation const* impl = this->GetLinkImplementation(config); for (std::vector::const_iterator li = impl->Libraries.begin(); @@ -4162,7 +4162,7 @@ void cmGeneratorTarget::ComputeLinkInterface( if (emitted.insert(*li).second) { if (li->Target) { // This is a runtime dependency on another shared library. - if (li->Target->GetType() == cmState::SHARED_LIBRARY) { + if (li->Target->GetType() == cmStateEnums::SHARED_LIBRARY) { iface.SharedDeps.push_back(*li); } } else { @@ -4192,7 +4192,7 @@ void cmGeneratorTarget::ComputeLinkInterface( } } - if (this->GetType() == cmState::STATIC_LIBRARY) { + if (this->GetType() == cmStateEnums::STATIC_LIBRARY) { // Construct the property name suffix for this configuration. std::string suffix = "_"; if (!config.empty()) { @@ -4225,7 +4225,7 @@ const cmLinkInterfaceLibraries* cmGeneratorTarget::GetLinkInterfaceLibraries( // Link interfaces are not supported for executables that do not // export symbols. - if (this->GetType() == cmState::EXECUTABLE && + if (this->GetType() == cmStateEnums::EXECUTABLE && !this->IsExecutableWithExports()) { return CM_NULLPTR; } @@ -4372,12 +4372,12 @@ bool cmGeneratorTarget::ComputeOutputDir(const std::string& config, if (out != outdir) { conf = ""; } - } else if (this->GetType() == cmState::EXECUTABLE) { + } else if (this->GetType() == cmStateEnums::EXECUTABLE) { // Lookup the output path for executables. out = this->Makefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH"); - } else if (this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY) { + } else if (this->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY) { // Lookup the output path for libraries. out = this->Makefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH"); } @@ -4486,7 +4486,7 @@ void cmGeneratorTarget::ComputeLinkInterfaceLibraries( // CMP0022 NEW behavior is to use INTERFACE_LINK_LIBRARIES. linkIfaceProp = "INTERFACE_LINK_LIBRARIES"; explicitLibraries = this->GetProperty(linkIfaceProp); - } else if (this->GetType() == cmState::SHARED_LIBRARY || + } else if (this->GetType() == cmStateEnums::SHARED_LIBRARY || this->IsExecutableWithExports()) { // CMP0022 OLD behavior is to use LINK_INTERFACE_LIBRARIES if set on a // shared lib or executable. @@ -4531,8 +4531,9 @@ void cmGeneratorTarget::ComputeLinkInterfaceLibraries( // There is no implicit link interface for executables or modules // so if none was explicitly set then there is no link interface. - if (!explicitLibraries && (this->GetType() == cmState::EXECUTABLE || - (this->GetType() == cmState::MODULE_LIBRARY))) { + if (!explicitLibraries && + (this->GetType() == cmStateEnums::EXECUTABLE || + (this->GetType() == cmStateEnums::MODULE_LIBRARY))) { return; } iface.Exists = true; @@ -4661,7 +4662,7 @@ cmGeneratorTarget::ImportInfo const* cmGeneratorTarget::GetImportInfo( i = this->ImportInfoMap.insert(entry).first; } - if (this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return &i->second; } // If the location is empty then the target is not available for @@ -4696,7 +4697,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, std::string linkProp = "INTERFACE_LINK_LIBRARIES"; const char* propertyLibs = this->GetProperty(linkProp); - if (this->GetType() != cmState::INTERFACE_LIBRARY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY) { if (!propertyLibs) { linkProp = "IMPORTED_LINK_INTERFACE_LIBRARIES"; linkProp += suffix; @@ -4713,7 +4714,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, info.Libraries = propertyLibs; } } - if (this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return; } @@ -4734,7 +4735,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, } // Get the soname. - if (this->GetType() == cmState::SHARED_LIBRARY) { + if (this->GetType() == cmStateEnums::SHARED_LIBRARY) { std::string soProp = "IMPORTED_SONAME"; soProp += suffix; if (const char* config_soname = this->GetProperty(soProp)) { @@ -4745,7 +4746,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, } // Get the "no-soname" mark. - if (this->GetType() == cmState::SHARED_LIBRARY) { + if (this->GetType() == cmStateEnums::SHARED_LIBRARY) { std::string soProp = "IMPORTED_NO_SONAME"; soProp += suffix; if (const char* config_no_soname = this->GetProperty(soProp)) { @@ -4759,7 +4760,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, // Get the import library. if (imp) { info.ImportLibrary = imp; - } else if (this->GetType() == cmState::SHARED_LIBRARY || + } else if (this->GetType() == cmStateEnums::SHARED_LIBRARY || this->IsExecutableWithExports()) { std::string impProp = "IMPORTED_IMPLIB"; impProp += suffix; @@ -4795,7 +4796,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, } // Get the cyclic repetition count. - if (this->GetType() == cmState::STATIC_LIBRARY) { + if (this->GetType() == cmStateEnums::STATIC_LIBRARY) { std::string linkProp = "IMPORTED_LINK_INTERFACE_MULTIPLICITY"; linkProp += suffix; if (const char* config_reps = this->GetProperty(linkProp)) { @@ -5191,12 +5192,12 @@ cmGeneratorTarget* cmGeneratorTarget::FindTargetToLink( // Skip targets that will not really be linked. This is probably a // name conflict between an external library and an executable // within the project. - if (tgt && tgt->GetType() == cmState::EXECUTABLE && + if (tgt && tgt->GetType() == cmStateEnums::EXECUTABLE && !tgt->IsExecutableWithExports()) { tgt = CM_NULLPTR; } - if (tgt && tgt->GetType() == cmState::OBJECT_LIBRARY) { + if (tgt && tgt->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "Target \"" << this->GetName() << "\" links to " "OBJECT library \"" @@ -5242,14 +5243,14 @@ bool cmGeneratorTarget::GetImplibGNUtoMS(std::string const& gnuName, bool cmGeneratorTarget::IsExecutableWithExports() const { - return (this->GetType() == cmState::EXECUTABLE && + return (this->GetType() == cmStateEnums::EXECUTABLE && this->GetPropertyAsBool("ENABLE_EXPORTS")); } bool cmGeneratorTarget::HasImportLibrary() const { return (this->IsDLLPlatform() && - (this->GetType() == cmState::SHARED_LIBRARY || + (this->GetType() == cmStateEnums::SHARED_LIBRARY || this->IsExecutableWithExports())); } @@ -5269,24 +5270,24 @@ std::string cmGeneratorTarget::GetSupportDirectory() const bool cmGeneratorTarget::IsLinkable() const { - return (this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY || - this->GetType() == cmState::UNKNOWN_LIBRARY || - this->GetType() == cmState::INTERFACE_LIBRARY || + return (this->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GetType() == cmStateEnums::MODULE_LIBRARY || + this->GetType() == cmStateEnums::UNKNOWN_LIBRARY || + this->GetType() == cmStateEnums::INTERFACE_LIBRARY || this->IsExecutableWithExports()); } bool cmGeneratorTarget::IsFrameworkOnApple() const { - return (this->GetType() == cmState::SHARED_LIBRARY && + return (this->GetType() == cmStateEnums::SHARED_LIBRARY && this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("FRAMEWORK")); } bool cmGeneratorTarget::IsAppBundleOnApple() const { - return (this->GetType() == cmState::EXECUTABLE && + return (this->GetType() == cmStateEnums::EXECUTABLE && this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("MACOSX_BUNDLE")); } @@ -5298,6 +5299,6 @@ bool cmGeneratorTarget::IsXCTestOnApple() const bool cmGeneratorTarget::IsCFBundleOnApple() const { - return (this->GetType() == cmState::MODULE_LIBRARY && + return (this->GetType() == cmStateEnums::MODULE_LIBRARY && this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("BUNDLE")); } diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 8e5a02d..625c28e 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -60,7 +60,7 @@ public: cmComputeLinkInformation* GetLinkInformation( const std::string& config) const; - cmState::TargetType GetType() const; + cmStateEnums::TargetType GetType() const; const std::string& GetName() const; std::string GetExportName() const; @@ -198,7 +198,7 @@ public: bool LinkLanguagePropagatesToDependents() const { - return this->GetType() == cmState::STATIC_LIBRARY; + return this->GetType() == cmStateEnums::STATIC_LIBRARY; } /** Get the macro to define when building sources in this target. diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 3154f8d..ba623d5 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -130,7 +130,7 @@ void cmGhsMultiTargetGenerator::Generate() this->WriteCompilerFlags(config, language); this->WriteCompilerDefinitions(config, language); this->WriteIncludes(config, language); - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { this->WriteTargetLinkLibraries(config, language); } this->WriteCustomCommands(); @@ -174,7 +174,7 @@ GhsMultiGpj::Types cmGhsMultiTargetGenerator::GetGpjTag( GhsMultiGpj::Types output; if (cmGhsMultiTargetGenerator::DetermineIfTargetGroup(target)) { output = GhsMultiGpj::INTERGRITY_APPLICATION; - } else if (target->GetType() == cmState::STATIC_LIBRARY) { + } else if (target->GetType() == cmStateEnums::STATIC_LIBRARY) { output = GhsMultiGpj::LIBRARY; } else { output = GhsMultiGpj::PROGRAM; @@ -195,13 +195,13 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string& config, std::string outputDir(this->GetOutputDirectory(config)); std::string outputFilename(this->GetOutputFilename(config)); - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) { std::string const static_library_suffix = this->Makefile->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX"); *this->GetFolderBuildStreams() << " -o \"" << outputDir << outputFilename << static_library_suffix << "\"" << std::endl; - } else if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + } else if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { if (notKernel && !this->IsTargetGroup()) { *this->GetFolderBuildStreams() << " -relprog" << std::endl; } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 7d0c2da..58c6a00 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1371,14 +1371,14 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() filteredTargets.reserve(targets.size()); for (std::vector::iterator ti = targets.begin(); ti != targets.end(); ++ti) { - if ((*ti)->GetType() == cmState::GLOBAL_TARGET) { + if ((*ti)->GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } - if ((*ti)->GetType() != cmState::EXECUTABLE && - (*ti)->GetType() != cmState::STATIC_LIBRARY && - (*ti)->GetType() != cmState::SHARED_LIBRARY && - (*ti)->GetType() != cmState::MODULE_LIBRARY && - (*ti)->GetType() != cmState::OBJECT_LIBRARY) { + if ((*ti)->GetType() != cmStateEnums::EXECUTABLE && + (*ti)->GetType() != cmStateEnums::STATIC_LIBRARY && + (*ti)->GetType() != cmStateEnums::SHARED_LIBRARY && + (*ti)->GetType() != cmStateEnums::MODULE_LIBRARY && + (*ti)->GetType() != cmStateEnums::OBJECT_LIBRARY) { continue; } if ((!(*ti)->GetPropertyAsBool("AUTOMOC") && @@ -1443,13 +1443,13 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo() cmTargets& targets = mf->GetTargets(); for (cmTargets::iterator ti = targets.begin(); ti != targets.end(); ++ti) { cmTarget* t = &ti->second; - if (t->GetType() == cmState::GLOBAL_TARGET) { + if (t->GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } t->AppendBuildInterfaceIncludes(); - if (t->GetType() == cmState::INTERFACE_LIBRARY) { + if (t->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } @@ -1575,7 +1575,7 @@ void cmGlobalGenerator::CheckTargetProperties() this->Makefiles[i]->ConfigureFinalPass(); cmTargets& targets = this->Makefiles[i]->GetTargets(); for (cmTargets::iterator l = targets.begin(); l != targets.end(); l++) { - if (l->second.GetType() == cmState::INTERFACE_LIBRARY) { + if (l->second.GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } const cmTarget::LinkLibraryVectorType& libs = @@ -1942,7 +1942,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const { - if (target->GetType() == cmState::INTERFACE_LIBRARY || + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY || target->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { // This target is excluded from its directory. return true; @@ -2398,8 +2398,8 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(GlobalTargetInfo const& gti, cmMakefile* mf) { // Package - cmTarget target(gti.Name, cmState::GLOBAL_TARGET, cmTarget::VisibilityNormal, - mf); + cmTarget target(gti.Name, cmStateEnums::GLOBAL_TARGET, + cmTarget::VisibilityNormal, mf); target.SetProperty("EXCLUDE_FROM_ALL", "TRUE"); std::vector no_outputs; @@ -2544,7 +2544,7 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets, bool cmGlobalGenerator::IsRootOnlyTarget(cmGeneratorTarget* target) const { - return (target->GetType() == cmState::GLOBAL_TARGET || + return (target->GetType() == cmStateEnums::GLOBAL_TARGET || target->GetName() == this->GetAllTargetName()); } @@ -2729,7 +2729,7 @@ void cmGlobalGenerator::WriteSummary() this->LocalGenerators[i]->GetGeneratorTargets(); for (std::vector::iterator it = tgts.begin(); it != tgts.end(); ++it) { - if ((*it)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*it)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } this->WriteSummary(*it); diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 57d9aca..1881b7a 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -74,7 +74,7 @@ void cmGlobalKdevelopGenerator::Generate() for (std::vector::const_iterator ti = targets.begin(); ti != targets.end(); ti++) { - if ((*ti)->GetType() == cmState::EXECUTABLE) { + if ((*ti)->GetType() == cmStateEnums::EXECUTABLE) { executable = (*ti)->GetLocation(""); break; } diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 67df038..98654c5 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -956,17 +956,17 @@ void cmGlobalNinjaGenerator::AppendTargetOutputs( bool realname = target->IsFrameworkOnApple(); switch (target->GetType()) { - case cmState::EXECUTABLE: - case cmState::SHARED_LIBRARY: - case cmState::STATIC_LIBRARY: - case cmState::MODULE_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: { outputs.push_back(this->ConvertToNinjaPath( target->GetFullPath(configName, false, realname))); break; } - case cmState::OBJECT_LIBRARY: - case cmState::GLOBAL_TARGET: - case cmState::UTILITY: { + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::GLOBAL_TARGET: + case cmStateEnums::UTILITY: { std::string path = target->GetLocalGenerator()->GetCurrentBinaryDirectory() + std::string("/") + target->GetName(); @@ -982,7 +982,7 @@ void cmGlobalNinjaGenerator::AppendTargetOutputs( void cmGlobalNinjaGenerator::AppendTargetDepends( cmGeneratorTarget const* target, cmNinjaDeps& outputs) { - if (target->GetType() == cmState::GLOBAL_TARGET) { + if (target->GetType() == cmStateEnums::GLOBAL_TARGET) { // These depend only on other CMake-provided targets, e.g. "all". std::set const& utils = target->GetUtilities(); for (std::set::const_iterator i = utils.begin(); @@ -997,7 +997,7 @@ void cmGlobalNinjaGenerator::AppendTargetDepends( cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target); for (cmTargetDependSet::const_iterator i = targetDeps.begin(); i != targetDeps.end(); ++i) { - if ((*i)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*i)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } this->AppendTargetOutputs(*i, outs); @@ -1034,7 +1034,7 @@ void cmGlobalNinjaGenerator::ComputeTargetDependsClosure( cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target); for (cmTargetDependSet::const_iterator i = targetDeps.begin(); i != targetDeps.end(); ++i) { - if ((*i)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*i)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } if (depends.insert(*i).second) { @@ -1102,11 +1102,13 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) lg->GetGeneratorTargets().begin(); ti != lg->GetGeneratorTargets().end(); ++ti) { cmGeneratorTarget const* gt = *ti; - cmState::TargetType const type = gt->GetType(); - if ((type == cmState::EXECUTABLE || type == cmState::STATIC_LIBRARY || - type == cmState::SHARED_LIBRARY || - type == cmState::MODULE_LIBRARY || - type == cmState::OBJECT_LIBRARY || type == cmState::UTILITY) && + cmStateEnums::TargetType const type = gt->GetType(); + if ((type == cmStateEnums::EXECUTABLE || + type == cmStateEnums::STATIC_LIBRARY || + type == cmStateEnums::SHARED_LIBRARY || + type == cmStateEnums::MODULE_LIBRARY || + type == cmStateEnums::OBJECT_LIBRARY || + type == cmStateEnums::UTILITY) && !gt->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { targetsPerFolder[currentSourceFolder].push_back(gt->GetName()); } diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index daacef0..615670c 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -382,12 +382,12 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefileLanguageRules( std::vector tgts = lg->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); l++) { - if (((*l)->GetType() == cmState::EXECUTABLE) || - ((*l)->GetType() == cmState::STATIC_LIBRARY) || - ((*l)->GetType() == cmState::SHARED_LIBRARY) || - ((*l)->GetType() == cmState::MODULE_LIBRARY) || - ((*l)->GetType() == cmState::OBJECT_LIBRARY) || - ((*l)->GetType() == cmState::UTILITY)) { + if (((*l)->GetType() == cmStateEnums::EXECUTABLE) || + ((*l)->GetType() == cmStateEnums::STATIC_LIBRARY) || + ((*l)->GetType() == cmStateEnums::SHARED_LIBRARY) || + ((*l)->GetType() == cmStateEnums::MODULE_LIBRARY) || + ((*l)->GetType() == cmStateEnums::OBJECT_LIBRARY) || + ((*l)->GetType() == cmStateEnums::UTILITY)) { cmGeneratorTarget* gt = *l; std::string tname = lg->GetRelativeTargetDirectory(gt); tname += "/DependInfo.cmake"; @@ -416,10 +416,12 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRule2( l != targets.end(); ++l) { cmGeneratorTarget* gtarget = *l; int type = gtarget->GetType(); - if ((type == cmState::EXECUTABLE) || (type == cmState::STATIC_LIBRARY) || - (type == cmState::SHARED_LIBRARY) || - (type == cmState::MODULE_LIBRARY) || - (type == cmState::OBJECT_LIBRARY) || (type == cmState::UTILITY)) { + if ((type == cmStateEnums::EXECUTABLE) || + (type == cmStateEnums::STATIC_LIBRARY) || + (type == cmStateEnums::SHARED_LIBRARY) || + (type == cmStateEnums::MODULE_LIBRARY) || + (type == cmStateEnums::OBJECT_LIBRARY) || + (type == cmStateEnums::UTILITY)) { // Add this to the list of depends rules in this directory. if ((!check_all || !gtarget->GetPropertyAsBool("EXCLUDE_FROM_ALL")) && (!check_relink || @@ -554,11 +556,12 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules( if (!name.empty() && emitted.insert(name).second && // Handle user targets here. Global targets are handled in // the local generator on a per-directory basis. - ((type == cmState::EXECUTABLE) || - (type == cmState::STATIC_LIBRARY) || - (type == cmState::SHARED_LIBRARY) || - (type == cmState::MODULE_LIBRARY) || - (type == cmState::OBJECT_LIBRARY) || (type == cmState::UTILITY))) { + ((type == cmStateEnums::EXECUTABLE) || + (type == cmStateEnums::STATIC_LIBRARY) || + (type == cmStateEnums::SHARED_LIBRARY) || + (type == cmStateEnums::MODULE_LIBRARY) || + (type == cmStateEnums::OBJECT_LIBRARY) || + (type == cmStateEnums::UTILITY))) { // Add a rule to build the target by name. lg->WriteDivider(ruleFileStream); ruleFileStream << "# Target rules for targets named " << name @@ -630,11 +633,12 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2( cmGeneratorTarget* gtarget = *t; int type = gtarget->GetType(); std::string name = gtarget->GetName(); - if (!name.empty() && - ((type == cmState::EXECUTABLE) || (type == cmState::STATIC_LIBRARY) || - (type == cmState::SHARED_LIBRARY) || - (type == cmState::MODULE_LIBRARY) || - (type == cmState::OBJECT_LIBRARY) || (type == cmState::UTILITY))) { + if (!name.empty() && ((type == cmStateEnums::EXECUTABLE) || + (type == cmStateEnums::STATIC_LIBRARY) || + (type == cmStateEnums::SHARED_LIBRARY) || + (type == cmStateEnums::MODULE_LIBRARY) || + (type == cmStateEnums::OBJECT_LIBRARY) || + (type == cmStateEnums::UTILITY))) { std::string makefileName; // Add a rule to build the target by name. localName = lg->GetRelativeTargetDirectory(gtarget); @@ -808,7 +812,7 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks() cmLocalGenerator* tlg = gt->GetLocalGenerator(); - if (gt->GetType() == cmState::INTERFACE_LIBRARY || + if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY || gt->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { continue; } @@ -847,7 +851,7 @@ size_t cmGlobalUnixMakefileGenerator3::CountProgressMarksInTarget( TargetDependSet const& depends = this->GetTargetDirectDepends(target); for (TargetDependSet::const_iterator di = depends.begin(); di != depends.end(); ++di) { - if ((*di)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*di)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } count += this->CountProgressMarksInTarget(*di, emitted); @@ -908,7 +912,7 @@ void cmGlobalUnixMakefileGenerator3::AppendGlobalTargetDepends( i != depends_set.end(); ++i) { // Create the target-level dependency. cmGeneratorTarget const* dep = *i; - if (dep->GetType() == cmState::INTERFACE_LIBRARY) { + if (dep->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } cmLocalUnixMakefileGenerator3* lg3 = @@ -950,13 +954,14 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule( for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { cmGeneratorTarget* target = *t; - cmState::TargetType type = target->GetType(); - if ((type == cmState::EXECUTABLE) || - (type == cmState::STATIC_LIBRARY) || - (type == cmState::SHARED_LIBRARY) || - (type == cmState::MODULE_LIBRARY) || - (type == cmState::OBJECT_LIBRARY) || - (type == cmState::GLOBAL_TARGET) || (type == cmState::UTILITY)) { + cmStateEnums::TargetType type = target->GetType(); + if ((type == cmStateEnums::EXECUTABLE) || + (type == cmStateEnums::STATIC_LIBRARY) || + (type == cmStateEnums::SHARED_LIBRARY) || + (type == cmStateEnums::MODULE_LIBRARY) || + (type == cmStateEnums::OBJECT_LIBRARY) || + (type == cmStateEnums::GLOBAL_TARGET) || + (type == cmStateEnums::UTILITY)) { std::string name = target->GetName(); if (emittedTargets.insert(name).second) { path = "... "; diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 5d9a02b..f120762 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -230,9 +230,10 @@ cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs() } bool cmGlobalVisualStudio11Generator::NeedsDeploy( - cmState::TargetType type) const + cmStateEnums::TargetType type) const { - if ((type == cmState::EXECUTABLE || type == cmState::SHARED_LIBRARY) && + if ((type == cmStateEnums::EXECUTABLE || + type == cmStateEnums::SHARED_LIBRARY) && (this->SystemIsWindowsPhone || this->SystemIsWindowsStore)) { return true; } diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index 0c03b0a..be78544 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -37,7 +37,7 @@ protected: static std::set GetInstalledWindowsCESDKs(); /** Return true if the configuration needs to be deployed */ - virtual bool NeedsDeploy(cmState::TargetType type) const; + virtual bool NeedsDeploy(cmStateEnums::TargetType type) const; private: class Factory; diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index ffd87e2..6941e15 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -246,7 +246,7 @@ void cmGlobalVisualStudio71Generator::WriteExternalProject( // Write a dsp file into the SLN file, Note, that dependencies from // executables to the libraries it uses are also done here void cmGlobalVisualStudio71Generator::WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType, + std::ostream& fout, const std::string& name, cmStateEnums::TargetType, std::vector const& configs, const std::set& configsPartOfDefaultBuild, std::string const& platformMapping) diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h index eb65bcb..9953047 100644 --- a/Source/cmGlobalVisualStudio71Generator.h +++ b/Source/cmGlobalVisualStudio71Generator.h @@ -56,7 +56,7 @@ protected: const char* path, cmGeneratorTarget const* t); virtual void WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType type, + std::ostream& fout, const std::string& name, cmStateEnums::TargetType type, std::vector const& configs, const std::set& configsPartOfDefaultBuild, const std::string& platformMapping = ""); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 0287def..1ffcf07 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -345,7 +345,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations( for (OrderedTargetDependSet::const_iterator tt = projectTargets.begin(); tt != projectTargets.end(); ++tt) { cmGeneratorTarget const* target = *tt; - if (target->GetType() == cmState::INTERFACE_LIBRARY) { + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } const char* expath = target->GetProperty("EXTERNAL_MSPROJECT"); @@ -377,7 +377,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( for (OrderedTargetDependSet::const_iterator tt = projectTargets.begin(); tt != projectTargets.end(); ++tt) { cmGeneratorTarget const* target = *tt; - if (target->GetType() == cmState::INTERFACE_LIBRARY) { + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } bool written = false; @@ -446,7 +446,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetDepends( for (OrderedTargetDependSet::const_iterator tt = projectTargets.begin(); tt != projectTargets.end(); ++tt) { cmGeneratorTarget const* target = *tt; - if (target->GetType() == cmState::INTERFACE_LIBRARY) { + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } const char* vcprojName = target->GetProperty("GENERATOR_FILE_NAME"); @@ -676,7 +676,7 @@ std::set cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild( // if it is a utilitiy target then only make it part of the // default build if another target depends on it int type = target->GetType(); - if (type == cmState::GLOBAL_TARGET) { + if (type == cmStateEnums::GLOBAL_TARGET) { // check if INSTALL target is part of default build if (target->GetName() == "INSTALL") { // inspect CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD properties @@ -696,7 +696,7 @@ std::set cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild( } return activeConfigs; } - if (type == cmState::UTILITY && + if (type == cmStateEnums::UTILITY && !this->IsDependedOn(projectTargets, target)) { return activeConfigs; } diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 3c6ce11..4d588e6 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -120,7 +120,7 @@ protected: const char* path, cmGeneratorTarget const* t) = 0; virtual void WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType type, + std::ostream& fout, const std::string& name, cmStateEnums::TargetType type, std::vector const& configs, const std::set& configsPartOfDefaultBuild, const std::string& platformMapping = "") = 0; diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 2ce0098..64808c9 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -347,7 +347,7 @@ void cmGlobalVisualStudio8Generator::WriteSolutionConfigurations( } void cmGlobalVisualStudio8Generator::WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType type, + std::ostream& fout, const std::string& name, cmStateEnums::TargetType type, std::vector const& configs, const std::set& configsPartOfDefaultBuild, std::string const& platformMapping) @@ -380,10 +380,10 @@ void cmGlobalVisualStudio8Generator::WriteProjectConfigurations( } bool cmGlobalVisualStudio8Generator::NeedsDeploy( - cmState::TargetType type) const + cmStateEnums::TargetType type) const { bool needsDeploy = - (type == cmState::EXECUTABLE || type == cmState::SHARED_LIBRARY); + (type == cmStateEnums::EXECUTABLE || type == cmStateEnums::SHARED_LIBRARY); return this->TargetsWindowsCE() && needsDeploy; } @@ -402,7 +402,7 @@ void cmGlobalVisualStudio8Generator::WriteProjectDepends( OrderedTargetDependSet depends(unordered, std::string()); for (OrderedTargetDependSet::const_iterator i = depends.begin(); i != depends.end(); ++i) { - if ((*i)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*i)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } std::string guid = this->GetGUID((*i)->GetName().c_str()); @@ -419,7 +419,7 @@ bool cmGlobalVisualStudio8Generator::NeedLinkLibraryDependencies( ui != target->GetUtilities().end(); ++ui) { if (cmGeneratorTarget* depTarget = target->GetLocalGenerator()->FindGeneratorTargetToUse(ui->c_str())) { - if (depTarget->GetType() != cmState::INTERFACE_LIBRARY && + if (depTarget->GetType() != cmStateEnums::INTERFACE_LIBRARY && depTarget->GetProperty("EXTERNAL_MSPROJECT")) { // This utility dependency names an external .vcproj target. // We use LinkLibraryDependencies="true" to link to it without diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index 2543ec1..b149c9d 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -72,14 +72,14 @@ protected: bool AddCheckTarget(); /** Return true if the configuration needs to be deployed */ - virtual bool NeedsDeploy(cmState::TargetType type) const; + virtual bool NeedsDeploy(cmStateEnums::TargetType type) const; static cmIDEFlagTable const* GetExtraFlagTableVS8(); virtual void WriteSLNHeader(std::ostream& fout); virtual void WriteSolutionConfigurations( std::ostream& fout, std::vector const& configs); virtual void WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType type, + std::ostream& fout, const std::string& name, cmStateEnums::TargetType type, std::vector const& configs, const std::set& configsPartOfDefaultBuild, const std::string& platformMapping = ""); diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 6296dd2..45f7913 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -81,7 +81,8 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets() for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { cmGeneratorTarget* tgt = *t; - if (tgt->GetType() == cmState::GLOBAL_TARGET || tgt->IsImported()) { + if (tgt->GetType() == cmStateEnums::GLOBAL_TARGET || + tgt->IsImported()) { continue; } if (!this->IsExcluded(gen[0], tgt)) { @@ -265,11 +266,11 @@ cmGlobalVisualStudioGenerator::GetTargetLinkClosure(cmGeneratorTarget* target) void cmGlobalVisualStudioGenerator::FollowLinkDepends( const cmGeneratorTarget* target, std::set& linked) { - if (target->GetType() == cmState::INTERFACE_LIBRARY) { + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return; } if (linked.insert(target).second && - target->GetType() == cmState::STATIC_LIBRARY) { + target->GetType() == cmStateEnums::STATIC_LIBRARY) { // Static library targets do not list their link dependencies so // we must follow them transitively now. TargetDependSet const& depends = this->GetTargetDirectDepends(target); @@ -304,7 +305,7 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends() static bool VSLinkable(cmGeneratorTarget const* t) { - return t->IsLinkable() || t->GetType() == cmState::OBJECT_LIBRARY; + return t->IsLinkable() || t->GetType() == cmStateEnums::OBJECT_LIBRARY; } void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( @@ -333,10 +334,10 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( // leaving them out for the static library itself but following them // transitively for other targets. - bool allowLinkable = (target->GetType() != cmState::STATIC_LIBRARY && - target->GetType() != cmState::SHARED_LIBRARY && - target->GetType() != cmState::MODULE_LIBRARY && - target->GetType() != cmState::EXECUTABLE); + bool allowLinkable = (target->GetType() != cmStateEnums::STATIC_LIBRARY && + target->GetType() != cmStateEnums::SHARED_LIBRARY && + target->GetType() != cmStateEnums::MODULE_LIBRARY && + target->GetType() != cmStateEnums::EXECUTABLE); TargetDependSet const& depends = this->GetTargetDirectDepends(target); @@ -344,7 +345,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( // Static libraries cannot depend on their link implementation // due to behavior (2), but they do not really need to. std::set linkDepends; - if (target->GetType() != cmState::STATIC_LIBRARY) { + if (target->GetType() != cmStateEnums::STATIC_LIBRARY) { for (TargetDependSet::const_iterator di = depends.begin(); di != depends.end(); ++di) { cmTargetDepend dep = *di; @@ -367,7 +368,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( // Collect all targets linked by this target so we can avoid // intermediate targets below. TargetSet linked; - if (target->GetType() != cmState::STATIC_LIBRARY) { + if (target->GetType() != cmStateEnums::STATIC_LIBRARY) { linked = this->GetTargetLinkClosure(target); } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 7b1afa5..34a01d6 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -444,7 +444,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets( l != tgts.end(); l++) { cmGeneratorTarget* target = *l; - if (target->GetType() == cmState::GLOBAL_TARGET) { + if (target->GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } @@ -459,12 +459,12 @@ void cmGlobalXCodeGenerator::AddExtraTargets( // this will make sure that when the next target is built // things are up-to-date if (!makeHelper.empty() && - (target->GetType() == cmState::EXECUTABLE || + (target->GetType() == cmStateEnums::EXECUTABLE || // Nope - no post-build for OBJECT_LIRBRARY - // target->GetType() == cmState::OBJECT_LIBRARY || - target->GetType() == cmState::STATIC_LIBRARY || - target->GetType() == cmState::SHARED_LIBRARY || - target->GetType() == cmState::MODULE_LIBRARY)) { + // target->GetType() == cmStateEnums::OBJECT_LIBRARY || + target->GetType() == cmStateEnums::STATIC_LIBRARY || + target->GetType() == cmStateEnums::SHARED_LIBRARY || + target->GetType() == cmStateEnums::MODULE_LIBRARY)) { makeHelper[makeHelper.size() - 1] = // fill placeholder this->PostBuildMakeTarget(target->GetName(), "$(CONFIGURATION)"); cmCustomCommandLines commandLines; @@ -475,7 +475,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets( cmTarget::POST_BUILD, "Depend check for xcode", dir.c_str()); } - if (target->GetType() != cmState::INTERFACE_LIBRARY && + if (target->GetType() != cmStateEnums::INTERFACE_LIBRARY && !target->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { allbuild->AddUtility(target->GetName()); } @@ -955,12 +955,12 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( continue; } - if (gtgt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } - if (gtgt->GetType() == cmState::UTILITY || - gtgt->GetType() == cmState::GLOBAL_TARGET) { + if (gtgt->GetType() == cmStateEnums::UTILITY || + gtgt->GetType() == cmStateEnums::GLOBAL_TARGET) { cmXCodeObject* t = this->CreateUtilityTarget(gtgt); if (!t) { return false; @@ -1188,9 +1188,9 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguages() void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmGeneratorTarget* gtgt) { // This matters only for targets that link. - if (gtgt->GetType() != cmState::EXECUTABLE && - gtgt->GetType() != cmState::SHARED_LIBRARY && - gtgt->GetType() != cmState::MODULE_LIBRARY) { + if (gtgt->GetType() != cmStateEnums::EXECUTABLE && + gtgt->GetType() != cmStateEnums::SHARED_LIBRARY && + gtgt->GetType() != cmStateEnums::MODULE_LIBRARY) { return; } @@ -1268,7 +1268,7 @@ void cmGlobalXCodeGenerator::CreateCustomCommands( std::vector const& prelink = gtgt->GetPreLinkCommands(); std::vector postbuild = gtgt->GetPostBuildCommands(); - if (gtgt->GetType() == cmState::SHARED_LIBRARY && + if (gtgt->GetType() == cmStateEnums::SHARED_LIBRARY && !gtgt->IsFrameworkOnApple()) { cmCustomCommandLines cmd; cmd.resize(1); @@ -1590,16 +1590,16 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, cmXCodeObject* buildSettings, const std::string& configName) { - if (gtgt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return; } std::string defFlags; - bool shared = ((gtgt->GetType() == cmState::SHARED_LIBRARY) || - (gtgt->GetType() == cmState::MODULE_LIBRARY)); - bool binary = ((gtgt->GetType() == cmState::OBJECT_LIBRARY) || - (gtgt->GetType() == cmState::STATIC_LIBRARY) || - (gtgt->GetType() == cmState::EXECUTABLE) || shared); + bool shared = ((gtgt->GetType() == cmStateEnums::SHARED_LIBRARY) || + (gtgt->GetType() == cmStateEnums::MODULE_LIBRARY)); + bool binary = ((gtgt->GetType() == cmStateEnums::OBJECT_LIBRARY) || + (gtgt->GetType() == cmStateEnums::STATIC_LIBRARY) || + (gtgt->GetType() == cmStateEnums::EXECUTABLE) || shared); // Compute the compilation flags for each language. std::set languages; @@ -1653,11 +1653,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, std::string extraLinkOptionsVar; std::string extraLinkOptions; - if (gtgt->GetType() == cmState::EXECUTABLE) { + if (gtgt->GetType() == cmStateEnums::EXECUTABLE) { extraLinkOptionsVar = "CMAKE_EXE_LINKER_FLAGS"; - } else if (gtgt->GetType() == cmState::SHARED_LIBRARY) { + } else if (gtgt->GetType() == cmStateEnums::SHARED_LIBRARY) { extraLinkOptionsVar = "CMAKE_SHARED_LINKER_FLAGS"; - } else if (gtgt->GetType() == cmState::MODULE_LIBRARY) { + } else if (gtgt->GetType() == cmStateEnums::MODULE_LIBRARY) { extraLinkOptionsVar = "CMAKE_MODULE_LINKER_FLAGS"; } if (!extraLinkOptionsVar.empty()) { @@ -1665,8 +1665,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, extraLinkOptions, extraLinkOptionsVar, configName); } - if (gtgt->GetType() == cmState::OBJECT_LIBRARY || - gtgt->GetType() == cmState::STATIC_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::OBJECT_LIBRARY || + gtgt->GetType() == cmStateEnums::STATIC_LIBRARY) { this->CurrentLocalGenerator->GetStaticLibraryFlags( extraLinkOptions, cmSystemTools::UpperCase(configName), gtgt); } else { @@ -1736,10 +1736,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, // Set attributes to specify the proper name for the target. std::string pndir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory(); - if (gtgt->GetType() == cmState::STATIC_LIBRARY || - gtgt->GetType() == cmState::SHARED_LIBRARY || - gtgt->GetType() == cmState::MODULE_LIBRARY || - gtgt->GetType() == cmState::EXECUTABLE) { + if (gtgt->GetType() == cmStateEnums::STATIC_LIBRARY || + gtgt->GetType() == cmStateEnums::SHARED_LIBRARY || + gtgt->GetType() == cmStateEnums::MODULE_LIBRARY || + gtgt->GetType() == cmStateEnums::EXECUTABLE) { if (this->XcodeVersion >= 21) { if (!gtgt->UsesDefaultOutputDir(configName, false)) { std::string pncdir = gtgt->GetDirectory(configName); @@ -1759,7 +1759,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, this->CreateString(pnprefix)); buildSettings->AddAttribute("EXECUTABLE_SUFFIX", this->CreateString(pnsuffix)); - } else if (gtgt->GetType() == cmState::OBJECT_LIBRARY) { + } else if (gtgt->GetType() == cmStateEnums::OBJECT_LIBRARY) { pnprefix = "lib"; pnbase = gtgt->GetName(); pnsuffix = ".a"; @@ -1782,14 +1782,14 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, // Handle settings for each target type. switch (gtgt->GetType()) { - case cmState::OBJECT_LIBRARY: - case cmState::STATIC_LIBRARY: { + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: { buildSettings->AddAttribute("LIBRARY_STYLE", this->CreateString("STATIC")); break; } - case cmState::MODULE_LIBRARY: { + case cmStateEnums::MODULE_LIBRARY: { buildSettings->AddAttribute("LIBRARY_STYLE", this->CreateString("BUNDLE")); if (gtgt->IsCFBundleOnApple()) { @@ -1839,7 +1839,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, } break; } - case cmState::SHARED_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: { if (gtgt->GetPropertyAsBool("FRAMEWORK")) { std::string fw_version = gtgt->GetFrameworkVersion(); buildSettings->AddAttribute("FRAMEWORK_VERSION", @@ -1872,7 +1872,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, this->CreateString("DYNAMIC")); break; } - case cmState::EXECUTABLE: { + case cmStateEnums::EXECUTABLE: { // Add the flags to create an executable. std::string createFlags = this->LookupFlags("CMAKE_", llang, "_LINK_FLAGS", ""); @@ -2051,7 +2051,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, // Create the INSTALL_PATH attribute. std::string install_name_dir; - if (gtgt->GetType() == cmState::SHARED_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::SHARED_LIBRARY) { // Get the install_name directory for the build tree. install_name_dir = gtgt->GetInstallNameDirForBuildTree(configName); // Xcode doesn't create the correct install_name in some cases. @@ -2124,7 +2124,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, } // Runtime version information. - if (gtgt->GetType() == cmState::SHARED_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::SHARED_LIBRARY) { int major; int minor; int patch; @@ -2219,7 +2219,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget( this->XCodeObjectMap[gtgt] = target; // Add source files without build rules for editing convenience. - if (gtgt->GetType() == cmState::UTILITY) { + if (gtgt->GetType() == cmStateEnums::UTILITY) { std::vector sources; if (!gtgt->GetConfigCommonSourceFiles(sources)) { return 0; @@ -2285,8 +2285,8 @@ const char* cmGlobalXCodeGenerator::GetTargetLinkFlagsVar( cmGeneratorTarget const* target) const { if (this->XcodeVersion >= 60 && - (target->GetType() == cmState::STATIC_LIBRARY || - target->GetType() == cmState::OBJECT_LIBRARY)) { + (target->GetType() == cmStateEnums::STATIC_LIBRARY || + target->GetType() == cmStateEnums::OBJECT_LIBRARY)) { return "OTHER_LIBTOOLFLAGS"; } else { return "OTHER_LDFLAGS"; @@ -2297,10 +2297,10 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType( cmGeneratorTarget* target) { switch (target->GetType()) { - case cmState::OBJECT_LIBRARY: - case cmState::STATIC_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "archive.ar"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: if (target->IsXCTestOnApple()) return "wrapper.cfbundle"; else if (target->IsCFBundleOnApple()) @@ -2308,11 +2308,11 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType( else return ((this->XcodeVersion >= 22) ? "compiled.mach-o.executable" : "compiled.mach-o.dylib"); - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return (target->GetPropertyAsBool("FRAMEWORK") ? "wrapper.framework" : "compiled.mach-o.dylib"); - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return "compiled.mach-o.executable"; default: break; @@ -2324,10 +2324,10 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType( cmGeneratorTarget* target) { switch (target->GetType()) { - case cmState::OBJECT_LIBRARY: - case cmState::STATIC_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "com.apple.product-type.library.static"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: if (target->IsXCTestOnApple()) return "com.apple.product-type.bundle.unit-test"; else if (target->IsCFBundleOnApple()) @@ -2336,11 +2336,11 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType( return ((this->XcodeVersion >= 22) ? "com.apple.product-type.tool" : "com.apple.product-type.library.dynamic"); - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return (target->GetPropertyAsBool("FRAMEWORK") ? "com.apple.product-type.framework" : "com.apple.product-type.library.dynamic"); - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return (target->GetPropertyAsBool("MACOSX_BUNDLE") ? "com.apple.product-type.application" : "com.apple.product-type.tool"); @@ -2353,7 +2353,7 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType( cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( cmGeneratorTarget* gtgt, cmXCodeObject* buildPhases) { - if (gtgt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return 0; } cmXCodeObject* target = this->CreateObject(cmXCodeObject::PBXNativeTarget); @@ -2380,7 +2380,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( fileRef->AddAttribute("explicitFileType", this->CreateString(fileType)); } std::string fullName; - if (gtgt->GetType() == cmState::OBJECT_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::OBJECT_LIBRARY) { fullName = "lib"; fullName += gtgt->GetName(); fullName += ".a"; @@ -2527,7 +2527,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) cmSystemTools::Error("Error no target on xobject\n"); return; } - if (gt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return; } @@ -2564,8 +2564,8 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) } // Skip link information for object libraries. - if (gt->GetType() == cmState::OBJECT_LIBRARY || - gt->GetType() == cmState::STATIC_LIBRARY) { + if (gt->GetType() == cmStateEnums::OBJECT_LIBRARY || + gt->GetType() == cmStateEnums::STATIC_LIBRARY) { continue; } @@ -2620,7 +2620,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) if (li->IsPath) { linkLibs += this->XCodeEscapePath(li->Value); } else if (!li->Target || - li->Target->GetType() != cmState::INTERFACE_LIBRARY) { + li->Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { linkLibs += li->Value; } if (li->Target && !li->Target->IsImported()) { @@ -2649,10 +2649,10 @@ bool cmGlobalXCodeGenerator::CreateGroups( // end up with (empty anyhow) ALL_BUILD and XCODE_DEPEND_HELPER source // groups: // - if (gtgt->GetType() == cmState::GLOBAL_TARGET) { + if (gtgt->GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } - if (gtgt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } @@ -3149,20 +3149,20 @@ void cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( cmXCodeObject* target = *i; cmGeneratorTarget* gt = target->GetTarget(); - if (gt->GetType() == cmState::EXECUTABLE || + if (gt->GetType() == cmStateEnums::EXECUTABLE || // Nope - no post-build for OBJECT_LIRBRARY - // gt->GetType() == cmState::OBJECT_LIBRARY || - gt->GetType() == cmState::STATIC_LIBRARY || - gt->GetType() == cmState::SHARED_LIBRARY || - gt->GetType() == cmState::MODULE_LIBRARY) { + // gt->GetType() == cmStateEnums::OBJECT_LIBRARY || + gt->GetType() == cmStateEnums::STATIC_LIBRARY || + gt->GetType() == cmStateEnums::SHARED_LIBRARY || + gt->GetType() == cmStateEnums::MODULE_LIBRARY) { // Declare an entry point for the target post-build phase. makefileStream << this->PostBuildMakeTarget(gt->GetName(), *ct) << ":\n"; } - if (gt->GetType() == cmState::EXECUTABLE || - gt->GetType() == cmState::SHARED_LIBRARY || - gt->GetType() == cmState::MODULE_LIBRARY) { + if (gt->GetType() == cmStateEnums::EXECUTABLE || + gt->GetType() == cmStateEnums::SHARED_LIBRARY || + gt->GetType() == cmStateEnums::MODULE_LIBRARY) { std::string tfull = gt->GetFullPath(configName); std::string trel = this->ConvertToRelativeForMake(tfull.c_str()); diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index db11bd3..6b32f73 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -24,13 +24,13 @@ static const char* getShapeForTarget(const cmGeneratorTarget* target) } switch (target->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return "house"; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "diamond"; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return "polygon"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return "octagon"; default: break; @@ -495,16 +495,16 @@ bool cmGraphVizWriter::IgnoreThisTarget(const std::string& name) } bool cmGraphVizWriter::GenerateForTargetType( - cmState::TargetType targetType) const + cmStateEnums::TargetType targetType) const { switch (targetType) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return this->GenerateForExecutables; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return this->GenerateForStaticLibs; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return this->GenerateForSharedLibs; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return this->GenerateForModuleLibs; default: break; diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index 0efe2b7..8d5515b 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -60,7 +60,7 @@ protected: bool IgnoreThisTarget(const std::string& name); - bool GenerateForTargetType(cmState::TargetType targetType) const; + bool GenerateForTargetType(cmStateEnums::TargetType targetType) const; std::string GraphType; std::string GraphName; diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index 166bc7c..57bf33e 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -70,8 +70,8 @@ bool cmIncludeExternalMSProjectCommand::InitialPass( } // Create a target instance for this utility. - cmTarget* target = - this->Makefile->AddNewTarget(cmState::UTILITY, utility_name.c_str()); + cmTarget* target = this->Makefile->AddNewTarget(cmStateEnums::UTILITY, + utility_name.c_str()); target->SetProperty("GENERATOR_FILE_NAME", utility_name.c_str()); target->SetProperty("EXTERNAL_MSPROJECT", path.c_str()); diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index f040a4e..d85748e 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -327,19 +327,19 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) if (cmTarget* target = this->Makefile->FindLocalNonAliasTarget(*targetIt)) { // Found the target. Check its type. - if (target->GetType() != cmState::EXECUTABLE && - target->GetType() != cmState::STATIC_LIBRARY && - target->GetType() != cmState::SHARED_LIBRARY && - target->GetType() != cmState::MODULE_LIBRARY && - target->GetType() != cmState::OBJECT_LIBRARY && - target->GetType() != cmState::INTERFACE_LIBRARY) { + if (target->GetType() != cmStateEnums::EXECUTABLE && + target->GetType() != cmStateEnums::STATIC_LIBRARY && + target->GetType() != cmStateEnums::SHARED_LIBRARY && + target->GetType() != cmStateEnums::MODULE_LIBRARY && + target->GetType() != cmStateEnums::OBJECT_LIBRARY && + target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "TARGETS given target \"" << (*targetIt) << "\" which is not an executable, library, or module."; this->SetError(e.str()); return false; } - if (target->GetType() == cmState::OBJECT_LIBRARY) { + if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "TARGETS given OBJECT library \"" << (*targetIt) << "\" which may not be installed."; @@ -387,7 +387,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) bool namelinkOnly = false; switch (target.GetType()) { - case cmState::SHARED_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: { // Shared libraries are handled differently on DLL and non-DLL // platforms. All windows platforms are DLL platforms including // cygwin. Currently no other platform is a DLL platform. @@ -454,7 +454,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) } } } break; - case cmState::STATIC_LIBRARY: { + case cmStateEnums::STATIC_LIBRARY: { // Static libraries use ARCHIVE properties. if (!archiveArgs.GetDestination().empty()) { archiveGenerator = @@ -468,7 +468,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) return false; } } break; - case cmState::MODULE_LIBRARY: { + case cmStateEnums::MODULE_LIBRARY: { // Modules use LIBRARY properties. if (!libraryArgs.GetDestination().empty()) { libraryGenerator = @@ -484,7 +484,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) return false; } } break; - case cmState::EXECUTABLE: { + case cmStateEnums::EXECUTABLE: { if (target.IsAppBundleOnApple()) { // Application bundles use the BUNDLE properties. if (!bundleArgs.GetDestination().empty()) { @@ -534,7 +534,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) CreateInstallTargetGenerator(target, archiveArgs, true, true); } } break; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: // Nothing to do. An INTERFACE_LIBRARY can be installed, but the // only effect of that is to make it exportable. It installs no // other files itself. @@ -553,7 +553,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector const& args) bool createInstallGeneratorsForTargetFileSets = true; if (target.IsFrameworkOnApple() || - target.GetType() == cmState::INTERFACE_LIBRARY) { + target.GetType() == cmStateEnums::INTERFACE_LIBRARY) { createInstallGeneratorsForTargetFileSets = false; } diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 70ae204..ed3be3f 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -80,36 +80,36 @@ void cmInstallTargetGenerator::GenerateScriptForConfig( std::vector filesFrom; std::vector filesTo; std::string literal_args; - cmState::TargetType targetType = this->Target->GetType(); + cmStateEnums::TargetType targetType = this->Target->GetType(); cmInstallType type = cmInstallType(); switch (targetType) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: type = cmInstallType_EXECUTABLE; break; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: type = cmInstallType_STATIC_LIBRARY; break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: type = cmInstallType_SHARED_LIBRARY; break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: type = cmInstallType_MODULE_LIBRARY; break; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: // Not reachable. We never create a cmInstallTargetGenerator for // an INTERFACE_LIBRARY. assert(0 && "INTERFACE_LIBRARY targets have no installable outputs."); break; - case cmState::OBJECT_LIBRARY: - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: + case cmStateEnums::UNKNOWN_LIBRARY: this->Target->GetLocalGenerator()->IssueMessage( cmake::INTERNAL_ERROR, "cmInstallTargetGenerator created with non-installable target."); return; } - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { // There is a bug in cmInstallCommand if this fails. assert(this->NamelinkMode == NamelinkModeNone); @@ -337,7 +337,7 @@ std::string cmInstallTargetGenerator::GetInstallFilename( { std::string fname; // Compute the name of the library. - if (target->GetType() == cmState::EXECUTABLE) { + if (target->GetType() == cmStateEnums::EXECUTABLE) { std::string targetName; std::string targetNameReal; std::string targetNameImport; @@ -471,9 +471,9 @@ void cmInstallTargetGenerator::AddInstallNamePatchRule( std::string const& toDestDirPath) { if (this->ImportLibrary || - !(this->Target->GetType() == cmState::SHARED_LIBRARY || - this->Target->GetType() == cmState::MODULE_LIBRARY || - this->Target->GetType() == cmState::EXECUTABLE)) { + !(this->Target->GetType() == cmStateEnums::SHARED_LIBRARY || + this->Target->GetType() == cmStateEnums::MODULE_LIBRARY || + this->Target->GetType() == cmStateEnums::EXECUTABLE)) { return; } @@ -527,7 +527,7 @@ void cmInstallTargetGenerator::AddInstallNamePatchRule( // Edit the install_name of the target itself if necessary. std::string new_id; - if (this->Target->GetType() == cmState::SHARED_LIBRARY) { + if (this->Target->GetType() == cmStateEnums::SHARED_LIBRARY) { std::string for_build = this->Target->GetInstallNameDirForBuildTree(config); std::string for_install = this->Target->GetInstallNameDirForInstallTree(); @@ -704,7 +704,7 @@ void cmInstallTargetGenerator::AddStripRule(std::ostream& os, // don't strip static and import libraries, because it removes the only // symbol table they have so you can't link to them anymore - if (this->Target->GetType() == cmState::STATIC_LIBRARY || + if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY || this->ImportLibrary) { return; } @@ -731,7 +731,7 @@ void cmInstallTargetGenerator::AddRanlibRule(std::ostream& os, const std::string& toDestDirPath) { // Static libraries need ranlib on this platform. - if (this->Target->GetType() != cmState::STATIC_LIBRARY) { + if (this->Target->GetType() != cmStateEnums::STATIC_LIBRARY) { return; } @@ -767,10 +767,10 @@ void cmInstallTargetGenerator::AddUniversalInstallRule( } switch (this->Target->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: break; default: diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 24f3578..5fc861b 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -55,7 +55,8 @@ std::string cmLinkLineComputer::ComputeLinkLibs(cmComputeLinkInformation& cli) ItemVector const& items = cli.GetItems(); for (ItemVector::const_iterator li = items.begin(); li != items.end(); ++li) { - if (li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY) { + if (li->Target && + li->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } if (li->IsPath) { diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 1c3a97d..b6fb3e6 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -199,7 +199,7 @@ void cmLocalGenerator::TraceDependencies() std::vector targets = this->GetGeneratorTargets(); for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { - if ((*t)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*t)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } (*t)->TraceDependencies(); @@ -542,7 +542,7 @@ void cmLocalGenerator::ComputeTargetManifest() for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { cmGeneratorTarget* target = *t; - if (target->GetType() == cmState::INTERFACE_LIBRARY) { + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } for (std::vector::iterator ci = configNames.begin(); @@ -911,12 +911,12 @@ void cmLocalGenerator::GetTargetFlags( "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library switch (target->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: this->GetStaticLibraryFlags(linkFlags, buildType, target); break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: libraryLinkVariable = "CMAKE_MODULE_LINKER_FLAGS"; - case cmState::SHARED_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: { linkFlags = this->Makefile->GetSafeDefinition(libraryLinkVariable); linkFlags += " "; if (!buildType.empty()) { @@ -962,7 +962,7 @@ void cmLocalGenerator::GetTargetFlags( frameworkPath, linkPath); } } break; - case cmState::EXECUTABLE: { + case cmStateEnums::EXECUTABLE: { linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); linkFlags += " "; if (!buildType.empty()) { @@ -1189,7 +1189,7 @@ std::string cmLocalGenerator::GetLinkLibsCMP0065( std::string linkFlags; // Flags to link an executable to shared libraries. - if (tgt.GetType() == cmState::EXECUTABLE && + if (tgt.GetType() == cmStateEnums::EXECUTABLE && this->StateSnapshot.GetState()->GetGlobalPropertyAsBool( "TARGET_SUPPORTS_SHARED_LIBS")) { bool add_shlib_flags = false; @@ -1334,8 +1334,8 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName, // found is part of the inName if (cmSystemTools::FileIsFullPath(inName.c_str())) { std::string tLocation; - if (target->GetType() >= cmState::EXECUTABLE && - target->GetType() <= cmState::MODULE_LIBRARY) { + if (target->GetType() >= cmStateEnums::EXECUTABLE && + target->GetType() <= cmStateEnums::MODULE_LIBRARY) { tLocation = target->GetLocation(config); tLocation = cmSystemTools::GetFilenamePath(tLocation); tLocation = cmSystemTools::CollapseFullPath(tLocation); @@ -1352,23 +1352,23 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName, } } switch (target->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: dep = target->GetLocation(config); return true; - case cmState::OBJECT_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: // An object library has no single file on which to depend. // This was listed to get the target-level dependency. return false; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: // An interface library has no file on which to depend. // This was listed to get the target-level dependency. return false; - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: // A utility target has no file on which to depend. This was listed // only to get the target-level dependency. return false; @@ -1584,8 +1584,8 @@ void cmLocalGenerator::AddVisibilityPresetFlags( std::string warnCMP0063; std::string* pWarnCMP0063 = CM_NULLPTR; - if (target->GetType() != cmState::SHARED_LIBRARY && - target->GetType() != cmState::MODULE_LIBRARY && + if (target->GetType() != cmStateEnums::SHARED_LIBRARY && + target->GetType() != cmStateEnums::MODULE_LIBRARY && !target->IsExecutableWithExports()) { switch (target->GetPolicyStatusCMP0063()) { case cmPolicies::OLD: @@ -1627,13 +1627,13 @@ void cmLocalGenerator::AddCMP0018Flags(std::string& flags, { int targetType = target->GetType(); - bool shared = ((targetType == cmState::SHARED_LIBRARY) || - (targetType == cmState::MODULE_LIBRARY)); + bool shared = ((targetType == cmStateEnums::SHARED_LIBRARY) || + (targetType == cmStateEnums::MODULE_LIBRARY)); if (this->GetShouldUseOldFlags(shared, lang)) { this->AddSharedFlags(flags, lang, shared); } else { - if (target->GetType() == cmState::OBJECT_LIBRARY) { + if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) { if (target->GetPropertyAsBool("POSITION_INDEPENDENT_CODE")) { this->AddPositionIndependentFlags(flags, lang, targetType); } @@ -1696,7 +1696,7 @@ void cmLocalGenerator::AddPositionIndependentFlags(std::string& flags, { const char* picFlags = CM_NULLPTR; - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { std::string flagsVar = "CMAKE_"; flagsVar += lang; flagsVar += "_COMPILE_OPTIONS_PIE"; @@ -1933,7 +1933,7 @@ void cmLocalGenerator::GenerateTargetInstallRules( std::vector tgts = this->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); ++l) { - if ((*l)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } @@ -1956,15 +1956,15 @@ void cmLocalGenerator::GenerateTargetInstallRules( // Generate the proper install generator for this target type. switch ((*l)->GetType()) { - case cmState::EXECUTABLE: - case cmState::STATIC_LIBRARY: - case cmState::MODULE_LIBRARY: { + case cmStateEnums::EXECUTABLE: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: { // Use a target install generator. cmInstallTargetGeneratorLocal g(this, (*l)->GetName(), destination.c_str(), false); g.Generate(os, config, configurationTypes); } break; - case cmState::SHARED_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: { #if defined(_WIN32) || defined(__CYGWIN__) // Special code to handle DLL. Install the import library // to the normal destination and the DLL to the runtime diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx index 157b32e..5f37af5 100644 --- a/Source/cmLocalGhsMultiGenerator.cxx +++ b/Source/cmLocalGhsMultiGenerator.cxx @@ -24,7 +24,7 @@ void cmLocalGhsMultiGenerator::Generate() for (std::vector::iterator l = tgts.begin(); l != tgts.end(); ++l) { - if ((*l)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } cmGhsMultiTargetGenerator tg(*l); diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 1863376..232e1dc 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -81,7 +81,7 @@ void cmLocalNinjaGenerator::Generate() std::vector targets = this->GetGeneratorTargets(); for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { - if ((*t)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*t)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } cmNinjaTargetGenerator* tg = cmNinjaTargetGenerator::New(*t); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index f30414c..5b90f99 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -120,7 +120,7 @@ void cmLocalUnixMakefileGenerator3::Generate() static_cast(this->GlobalGenerator); for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { - if ((*t)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*t)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } CM_AUTO_PTR tg( @@ -172,7 +172,7 @@ void cmLocalUnixMakefileGenerator3::GetLocalObjectFiles( for (std::vector::iterator ti = targets.begin(); ti != targets.end(); ++ti) { cmGeneratorTarget* gt = *ti; - if (gt->GetType() == cmState::INTERFACE_LIBRARY) { + if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } std::vector objectSources; @@ -382,12 +382,12 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets( std::string localName; for (std::vector::iterator t = targets.begin(); t != targets.end(); ++t) { - if (((*t)->GetType() == cmState::EXECUTABLE) || - ((*t)->GetType() == cmState::STATIC_LIBRARY) || - ((*t)->GetType() == cmState::SHARED_LIBRARY) || - ((*t)->GetType() == cmState::MODULE_LIBRARY) || - ((*t)->GetType() == cmState::OBJECT_LIBRARY) || - ((*t)->GetType() == cmState::UTILITY)) { + if (((*t)->GetType() == cmStateEnums::EXECUTABLE) || + ((*t)->GetType() == cmStateEnums::STATIC_LIBRARY) || + ((*t)->GetType() == cmStateEnums::SHARED_LIBRARY) || + ((*t)->GetType() == cmStateEnums::MODULE_LIBRARY) || + ((*t)->GetType() == cmStateEnums::OBJECT_LIBRARY) || + ((*t)->GetType() == cmStateEnums::UTILITY)) { emitted.insert((*t)->GetName()); // for subdirs add a rule to build this specific target by name. @@ -1558,7 +1558,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( std::vector targets = this->GetGeneratorTargets(); std::vector::iterator glIt; for (glIt = targets.begin(); glIt != targets.end(); ++glIt) { - if ((*glIt)->GetType() == cmState::GLOBAL_TARGET) { + if ((*glIt)->GetType() == cmStateEnums::GLOBAL_TARGET) { std::string targetString = "Special rule for the target " + (*glIt)->GetName(); std::vector commands; diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 6f9f009..006cdf8 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -63,7 +63,7 @@ void cmLocalVisualStudio10Generator::Generate() std::vector tgts = this->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); ++l) { - if ((*l)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } if (static_cast(this->GlobalGenerator) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index a4b28b5..1ea56b4 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -64,7 +64,7 @@ void cmLocalVisualStudio7Generator::AddHelperCommands() std::vector tgts = this->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); ++l) { - if ((*l)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } const char* path = (*l)->GetProperty("EXTERNAL_MSPROJECT"); @@ -93,7 +93,7 @@ void cmLocalVisualStudio7Generator::AddCMakeListsRules() std::vector tgts = this->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); ++l) { - if ((*l)->GetType() == cmState::GLOBAL_TARGET) { + if ((*l)->GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } if ((*l)->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET) { @@ -112,7 +112,7 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets() std::vector tgts = this->GetGeneratorTargets(); for (std::vector::iterator l = tgts.begin(); l != tgts.end(); l++) { - if ((*l)->GetType() == cmState::GLOBAL_TARGET) { + if ((*l)->GetType() == cmStateEnums::GLOBAL_TARGET) { std::vector no_depends; cmCustomCommandLine force_command; force_command.push_back("cd"); @@ -154,7 +154,7 @@ void cmLocalVisualStudio7Generator::WriteProjectFiles() // Create the project file for each target. for (std::vector::iterator l = tgts.begin(); l != tgts.end(); l++) { - if ((*l)->GetType() == cmState::INTERFACE_LIBRARY) { + if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } // INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace @@ -615,22 +615,22 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( bool targetBuilds = true; switch (target->GetType()) { - case cmState::OBJECT_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: targetBuilds = false; // no manifest tool for object library - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: projectType = "typeStaticLibrary"; configType = "4"; break; - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: projectType = "typeDynamicLibrary"; configType = "2"; break; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: configType = "1"; break; - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: configType = "10"; default: targetBuilds = false; @@ -725,8 +725,9 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( intermediateDir += "/"; intermediateDir += configName; - if (target->GetType() < cmState::UTILITY) { - std::string const& outDir = target->GetType() == cmState::OBJECT_LIBRARY + if (target->GetType() < cmStateEnums::UTILITY) { + std::string const& outDir = + target->GetType() == cmStateEnums::OBJECT_LIBRARY ? intermediateDir : target->GetDirectory(configName); /* clang-format off */ @@ -810,7 +811,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( targetOptions.OutputFlagMap(fout, "\t\t\t\t"); targetOptions.OutputPreprocessorDefinitions(fout, "\t\t\t\t", "\n", "CXX"); fout << "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n"; - if (target->GetType() <= cmState::OBJECT_LIBRARY) { + if (target->GetType() <= cmStateEnums::OBJECT_LIBRARY) { // Specify the compiler program database file if configured. std::string pdb = target->GetCompilePDBPath(configName); if (!pdb.empty()) { @@ -959,19 +960,19 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( static_cast(this->GlobalGenerator); std::string temp; std::string extraLinkOptions; - if (target->GetType() == cmState::EXECUTABLE) { + if (target->GetType() == cmStateEnums::EXECUTABLE) { extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS") + std::string(" ") + GetBuildTypeLinkerFlags("CMAKE_EXE_LINKER_FLAGS", configName); } - if (target->GetType() == cmState::SHARED_LIBRARY) { + if (target->GetType() == cmStateEnums::SHARED_LIBRARY) { extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS") + std::string(" ") + GetBuildTypeLinkerFlags("CMAKE_SHARED_LINKER_FLAGS", configName); } - if (target->GetType() == cmState::MODULE_LIBRARY) { + if (target->GetType() == cmStateEnums::MODULE_LIBRARY) { extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS") + std::string(" ") + @@ -1004,7 +1005,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str()); } - if ((target->GetType() == cmState::SHARED_LIBRARY || + if ((target->GetType() == cmStateEnums::SHARED_LIBRARY || target->IsExecutableWithExports()) && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { @@ -1012,9 +1013,9 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( } } switch (target->GetType()) { - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: break; - case cmState::OBJECT_LIBRARY: { + case cmStateEnums::OBJECT_LIBRARY: { std::string libpath = this->GetTargetDirectory(target); libpath += "/"; libpath += configName; @@ -1029,7 +1030,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( << this->ConvertToXMLOutputPathSingle(libpath.c_str()) << "\"/>\n"; break; } - case cmState::STATIC_LIBRARY: { + case cmStateEnums::STATIC_LIBRARY: { std::string targetNameFull = target->GetFullName(configName); std::string libpath = target->GetDirectory(configName); libpath += "/"; @@ -1059,8 +1060,8 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( << this->ConvertToXMLOutputPathSingle(libpath.c_str()) << "\"/>\n"; break; } - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: { + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: { std::string targetName; std::string targetNameSO; std::string targetNameFull; @@ -1145,7 +1146,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( } fout << "/>\n"; } break; - case cmState::EXECUTABLE: { + case cmStateEnums::EXECUTABLE: { std::string targetName; std::string targetNameFull; std::string targetNameImport; @@ -1241,9 +1242,9 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"/>\n"; break; } - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: + case cmStateEnums::INTERFACE_LIBRARY: break; } } @@ -1296,7 +1297,7 @@ void cmLocalVisualStudio7GeneratorInternals::OutputLibraries( lg->ConvertToRelativePath(currentBinDir, l->Value.c_str()); fout << lg->ConvertToXMLOutputPath(rel.c_str()) << " "; } else if (!l->Target || - l->Target->GetType() != cmState::INTERFACE_LIBRARY) { + l->Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { fout << l->Value << " "; } } @@ -1607,8 +1608,8 @@ bool cmLocalVisualStudio7Generator::WriteGroup( std::string source = (*sf)->GetFullPath(); FCInfo fcinfo(this, target, *(*sf), configs); - if (source != libName || target->GetType() == cmState::UTILITY || - target->GetType() == cmState::GLOBAL_TARGET) { + if (source != libName || target->GetType() == cmStateEnums::UTILITY || + target->GetType() == cmStateEnums::GLOBAL_TARGET) { fout << "\t\t\tConvertToXMLOutputPathSingle(source.c_str()); // Tell MS-Dev what the source is. If the compiler knows how to @@ -1812,7 +1813,7 @@ void cmLocalVisualStudio7Generator::OutputTargetRules( std::ostream& fout, const std::string& configName, cmGeneratorTarget* target, const std::string& /*libName*/) { - if (target->GetType() > cmState::GLOBAL_TARGET) { + if (target->GetType() > cmStateEnums::GLOBAL_TARGET) { return; } EventWriter event(this, configName, fout); @@ -1828,7 +1829,7 @@ void cmLocalVisualStudio7Generator::OutputTargetRules( tool = this->FortranProject ? "VFPreLinkEventTool" : "VCPreLinkEventTool"; event.Start(tool); bool addedPrelink = false; - if ((target->GetType() == cmState::SHARED_LIBRARY || + if ((target->GetType() == cmStateEnums::SHARED_LIBRARY || target->IsExecutableWithExports()) && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { @@ -1900,27 +1901,27 @@ void cmLocalVisualStudio7Generator::WriteProjectStartFortran( } const char* projectType = 0; switch (target->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: projectType = "typeStaticLibrary"; if (keyword) { keyword = "Static Library"; } break; - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: projectType = "typeDynamicLibrary"; if (!keyword) { keyword = "Dll"; } break; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: if (!keyword) { keyword = "Console Application"; } projectType = 0; break; - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: default: break; } diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index e2b3cd2..e20fe50 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -76,8 +76,8 @@ cmLocalVisualStudioGenerator::MaybeCreateImplibDir(cmGeneratorTarget* target, // If an executable exports symbols then VS wants to create an // import library but forgets to create the output directory. // The Intel Fortran plugin always forgets to the directory. - if (target->GetType() != cmState::EXECUTABLE && - !(isFortran && target->GetType() == cmState::SHARED_LIBRARY)) { + if (target->GetType() != cmStateEnums::EXECUTABLE && + !(isFortran && target->GetType() == cmStateEnums::SHARED_LIBRARY)) { return pcc; } std::string outDir = target->GetDirectory(config, false); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c3111c0..65116d5 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -730,7 +730,7 @@ void cmMakefile::AddCustomCommandToTarget( return; } - if (ti->second.GetType() == cmState::OBJECT_LIBRARY) { + if (ti->second.GetType() == cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "Target \"" << target << "\" is an OBJECT library " @@ -738,7 +738,7 @@ void cmMakefile::AddCustomCommandToTarget( this->IssueMessage(cmake::FATAL_ERROR, e.str()); return; } - if (ti->second.GetType() == cmState::INTERFACE_LIBRARY) { + if (ti->second.GetType() == cmStateEnums::INTERFACE_LIBRARY) { std::ostringstream e; e << "Target \"" << target << "\" is an INTERFACE library " @@ -1032,7 +1032,7 @@ cmTarget* cmMakefile::AddUtilityCommand( const char* comment, bool uses_terminal) { // Create a target instance for this utility. - cmTarget* target = this->AddNewTarget(cmState::UTILITY, utilityName); + cmTarget* target = this->AddNewTarget(cmStateEnums::UTILITY, utilityName); if (excludeFromAll) { target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } @@ -1774,9 +1774,9 @@ void cmMakefile::AddGlobalLinkInformation(cmTarget& target) { // for these targets do not add anything switch (target.GetType()) { - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: + case cmStateEnums::INTERFACE_LIBRARY: return; default:; } @@ -1828,13 +1828,15 @@ void cmMakefile::AddAlias(const std::string& lname, std::string const& tgtName) } cmTarget* cmMakefile::AddLibrary(const std::string& lname, - cmState::TargetType type, + cmStateEnums::TargetType type, const std::vector& srcs, bool excludeFromAll) { - assert(type == cmState::STATIC_LIBRARY || type == cmState::SHARED_LIBRARY || - type == cmState::MODULE_LIBRARY || type == cmState::OBJECT_LIBRARY || - type == cmState::INTERFACE_LIBRARY); + assert(type == cmStateEnums::STATIC_LIBRARY || + type == cmStateEnums::SHARED_LIBRARY || + type == cmStateEnums::MODULE_LIBRARY || + type == cmStateEnums::OBJECT_LIBRARY || + type == cmStateEnums::INTERFACE_LIBRARY); cmTarget* target = this->AddNewTarget(type, lname); // Clear its dependencies. Otherwise, dependencies might persist @@ -1853,7 +1855,7 @@ cmTarget* cmMakefile::AddExecutable(const char* exeName, const std::vector& srcs, bool excludeFromAll) { - cmTarget* target = this->AddNewTarget(cmState::EXECUTABLE, exeName); + cmTarget* target = this->AddNewTarget(cmStateEnums::EXECUTABLE, exeName); if (excludeFromAll) { target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } @@ -1862,7 +1864,7 @@ cmTarget* cmMakefile::AddExecutable(const char* exeName, return target; } -cmTarget* cmMakefile::AddNewTarget(cmState::TargetType type, +cmTarget* cmMakefile::AddNewTarget(cmStateEnums::TargetType type, const std::string& name) { cmTargets::iterator it = @@ -2040,8 +2042,8 @@ void cmMakefile::ExpandVariablesCMP0019() for (cmTargets::iterator l = this->Targets.begin(); l != this->Targets.end(); ++l) { cmTarget& t = l->second; - if (t.GetType() == cmState::INTERFACE_LIBRARY || - t.GetType() == cmState::GLOBAL_TARGET) { + if (t.GetType() == cmStateEnums::INTERFACE_LIBRARY || + t.GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } includeDirs = t.GetProperty("INCLUDE_DIRECTORIES"); @@ -3681,7 +3683,8 @@ void cmMakefile::RaiseScope(const std::string& var, const char* varDef) } cmTarget* cmMakefile::AddImportedTarget(const std::string& name, - cmState::TargetType type, bool global) + cmStateEnums::TargetType type, + bool global) { // Create the target. CM_AUTO_PTR target( @@ -3767,7 +3770,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg, // The conflict is with a non-imported target. // Allow this if the user has requested support. cmake* cm = this->GetCMakeInstance(); - if (isCustom && existing->GetType() == cmState::UTILITY && + if (isCustom && existing->GetType() == cmStateEnums::UTILITY && this != existing->GetMakefile() && cm->GetState()->GetGlobalPropertyAsBool( "ALLOW_DUPLICATE_CUSTOM_TARGETS")) { @@ -3781,22 +3784,22 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg, << "\" because another target with the same name already exists. " << "The existing target is "; switch (existing->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: e << "an executable "; break; - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: e << "a static library "; break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: e << "a shared library "; break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: e << "a module library "; break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: e << "a custom target "; break; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: e << "an interface library "; break; default: diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 0116ce1..71078ab 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -163,9 +163,10 @@ public: /** Create a new imported target with the name and type given. */ cmTarget* AddImportedTarget(const std::string& name, - cmState::TargetType type, bool global); + cmStateEnums::TargetType type, bool global); - cmTarget* AddNewTarget(cmState::TargetType type, const std::string& name); + cmTarget* AddNewTarget(cmStateEnums::TargetType type, + const std::string& name); /** * Add an executable to the build. @@ -251,7 +252,8 @@ public: /** * Set the name of the library. */ - cmTarget* AddLibrary(const std::string& libname, cmState::TargetType type, + cmTarget* AddLibrary(const std::string& libname, + cmStateEnums::TargetType type, const std::vector& srcs, bool excludeFromAll = false); void AddAlias(const std::string& libname, const std::string& tgt); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 00a9100..5bf2f51 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -24,7 +24,7 @@ cmMakefileLibraryTargetGenerator::cmMakefileLibraryTargetGenerator( : cmMakefileTargetGenerator(target) { this->CustomCommandDriver = OnDepends; - if (this->GeneratorTarget->GetType() != cmState::INTERFACE_LIBRARY) { + if (this->GeneratorTarget->GetType() != cmStateEnums::INTERFACE_LIBRARY) { this->GeneratorTarget->GetLibraryNames( this->TargetNameOut, this->TargetNameSO, this->TargetNameReal, this->TargetNameImport, this->TargetNamePDB, this->ConfigName); @@ -57,24 +57,24 @@ void cmMakefileLibraryTargetGenerator::WriteRuleFiles() // write the link rules // Write the rule for this target type. switch (this->GeneratorTarget->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: this->WriteStaticLibraryRules(); break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: this->WriteSharedLibraryRules(false); if (this->GeneratorTarget->NeedRelinkBeforeInstall(this->ConfigName)) { // Write rules to link an installable version of the target. this->WriteSharedLibraryRules(true); } break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: this->WriteModuleLibraryRules(false); if (this->GeneratorTarget->NeedRelinkBeforeInstall(this->ConfigName)) { // Write rules to link an installable version of the target. this->WriteModuleLibraryRules(true); } break; - case cmState::OBJECT_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: this->WriteObjectLibraryRules(); break; default: @@ -251,8 +251,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( this->LocalGenerator->AppendFlags(linkFlags, extraFlags); // Add OSX version flags, if any. - if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { this->AppendOSXVerFlag(linkFlags, linkLanguage, "COMPATIBILITY", true); this->AppendOSXVerFlag(linkFlags, linkLanguage, "CURRENT", false); } @@ -345,13 +345,13 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string buildEcho = "Linking "; buildEcho += linkLanguage; switch (this->GeneratorTarget->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: buildEcho += " static library "; break; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: buildEcho += " shared library "; break; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: if (this->GeneratorTarget->IsCFBundleOnApple()) { buildEcho += " CFBundle"; } @@ -399,7 +399,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. - if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() != cmStateEnums::STATIC_LIBRARY) { libCleanFiles.push_back(this->LocalGenerator->MaybeConvertToRelativePath( this->LocalGenerator->GetCurrentBinaryDirectory(), (targetFullPath + ".manifest").c_str())); @@ -409,7 +409,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::vector commands1; // Add a command to remove any existing files for this library. // for static libs only - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) { this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles, this->GeneratorTarget, "target"); this->LocalGenerator->CreateCDCommand( @@ -443,7 +443,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::vector archiveAppendCommands; std::vector archiveFinishCommands; std::string::size_type archiveCommandLimit = std::string::npos; - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) { haveStaticLibraryRule = this->Makefile->IsDefinitionSet(linkRuleVar); std::string arCreateVar = "CMAKE_"; arCreateVar += linkLanguage; @@ -492,7 +492,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Collect up flags to link in needed libraries. std::string linkLibs; - if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() != cmStateEnums::STATIC_LIBRARY) { CM_AUTO_PTR linkLineComputer( this->CreateLinkLineComputer( @@ -514,7 +514,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( useWatcomQuote); // maybe create .def file from list of objects - if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY && + if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { this->GenDefFile(real_link_commands, linkFlags); } @@ -574,7 +574,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Compute the directory portion of the install_name setting. std::string install_name_dir; - if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY) { // Get the install_name directory for the build tree. install_name_dir = this->GeneratorTarget->GetInstallNameDirForBuildTree(this->ConfigName); @@ -659,7 +659,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string linkRule = this->GetLinkRule(linkRuleVar); cmSystemTools::ExpandListArgument(linkRule, real_link_commands); if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE") && - (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY)) { + (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY)) { std::string cmakeCommand = this->LocalGenerator->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); cmakeCommand += " -E __run_iwyu --lwyu="; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index cbfe850..f0502bf 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -68,16 +68,16 @@ cmMakefileTargetGenerator* cmMakefileTargetGenerator::New( cmMakefileTargetGenerator* result = CM_NULLPTR; switch (tgt->GetType()) { - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: result = new cmMakefileExecutableTargetGenerator(tgt); break; - case cmState::STATIC_LIBRARY: - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: result = new cmMakefileLibraryTargetGenerator(tgt); break; - case cmState::UTILITY: + case cmStateEnums::UTILITY: result = new cmMakefileUtilityTargetGenerator(tgt); break; default: @@ -504,10 +504,10 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( std::string targetFullPathReal; std::string targetFullPathPDB; std::string targetFullPathCompilePDB; - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE || - this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY || - this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE || + this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { targetFullPathReal = this->GeneratorTarget->GetFullPath(this->ConfigName, false, true); targetFullPathPDB = @@ -515,7 +515,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( targetFullPathPDB += "/"; targetFullPathPDB += this->GeneratorTarget->GetPDBName(this->ConfigName); } - if (this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { targetFullPathCompilePDB = this->GeneratorTarget->GetCompilePDBPath(this->ConfigName); if (targetFullPathCompilePDB.empty()) { @@ -1346,7 +1346,7 @@ void cmMakefileTargetGenerator::AppendTargetDepends( std::vector& depends) { // Static libraries never depend on anything for linking. - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) { return; } diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index b28b19a..dd903d6 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -45,7 +45,7 @@ cmNinjaNormalTargetGenerator::cmNinjaNormalTargetGenerator( , TargetLinkLanguage("") { this->TargetLinkLanguage = target->GetLinkerLanguage(this->GetConfigName()); - if (target->GetType() == cmState::EXECUTABLE) { + if (target->GetType() == cmStateEnums::EXECUTABLE) { this->GetGeneratorTarget()->GetExecutableNames( this->TargetNameOut, this->TargetNameReal, this->TargetNameImport, this->TargetNamePDB, GetLocalGenerator()->GetConfigName()); @@ -56,7 +56,7 @@ cmNinjaNormalTargetGenerator::cmNinjaNormalTargetGenerator( GetLocalGenerator()->GetConfigName()); } - if (target->GetType() != cmState::OBJECT_LIBRARY) { + if (target->GetType() != cmStateEnums::OBJECT_LIBRARY) { // on Windows the output dir is already needed at compile time // ensure the directory exists (OutDir test) EnsureDirectoryExists(target->GetDirectory(this->GetConfigName())); @@ -87,7 +87,7 @@ void cmNinjaNormalTargetGenerator::Generate() // Write the build statements this->WriteObjectBuildStatements(); - if (this->GetGeneratorTarget()->GetType() == cmState::OBJECT_LIBRARY) { + if (this->GetGeneratorTarget()->GetType() == cmStateEnums::OBJECT_LIBRARY) { this->WriteObjectLibStatement(); } else { this->WriteLinkStatement(); @@ -125,17 +125,17 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules() const char* cmNinjaNormalTargetGenerator::GetVisibleTypeName() const { switch (this->GetGeneratorTarget()->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "static library"; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return "shared library"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: if (this->GetGeneratorTarget()->IsCFBundleOnApple()) { return "CFBundle shared module"; } else { return "shared module"; } - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return "executable"; default: return CM_NULLPTR; @@ -160,7 +160,7 @@ struct cmNinjaRemoveNoOpCommands void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) { - cmState::TargetType targetType = this->GetGeneratorTarget()->GetType(); + cmStateEnums::TargetType targetType = this->GetGeneratorTarget()->GetType(); std::string ruleName = this->LanguageLinkerRule(); // Select whether to use a response file for objects. @@ -236,7 +236,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) vars.Manifests = "$MANIFESTS"; std::string langFlags; - if (targetType != cmState::EXECUTABLE) { + if (targetType != cmStateEnums::EXECUTABLE) { langFlags += "$LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS"; vars.LanguageCompileFlags = langFlags.c_str(); } @@ -292,7 +292,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) std::string cmakeCommand = this->GetLocalGenerator()->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL); - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { this->GetGlobalGenerator()->AddRule( "CMAKE_SYMLINK_EXECUTABLE", cmakeCommand + " -E cmake_symlink_executable" @@ -352,7 +352,7 @@ std::vector cmNinjaNormalTargetGenerator::ComputeLinkCmd() } } switch (this->GetGeneratorTarget()->GetType()) { - case cmState::STATIC_LIBRARY: { + case cmStateEnums::STATIC_LIBRARY: { // We have archive link commands set. First, delete the existing archive. { std::string cmakeCommand = @@ -377,9 +377,9 @@ std::vector cmNinjaNormalTargetGenerator::ComputeLinkCmd() } return linkCmds; } - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::EXECUTABLE: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::EXECUTABLE: break; default: assert(0 && "Unexpected target type"); @@ -452,7 +452,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() // Write comments. cmGlobalNinjaGenerator::WriteDivider(this->GetBuildFileStream()); - const cmState::TargetType targetType = gt.GetType(); + const cmStateEnums::TargetType targetType = gt.GetType(); this->GetBuildFileStream() << "# Link build statements for " << cmState::GetTargetTypeName(targetType) << " target " << this->GetTargetName() << "\n\n"; @@ -497,7 +497,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() linkLineComputer.get(), this->GetConfigName(), vars["LINK_LIBRARIES"], vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, linkPath, &genTarget); if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") && - (gt.GetType() == cmState::SHARED_LIBRARY || + (gt.GetType() == cmStateEnums::SHARED_LIBRARY || gt.IsExecutableWithExports())) { if (gt.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { std::string name_of_def_file = gt.GetSupportDirectory(); @@ -510,8 +510,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() } // Add OS X version flags, if any. - if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { this->AppendOSXVerFlag(vars["LINK_FLAGS"], this->TargetLinkLanguage, "COMPATIBILITY", true); this->AppendOSXVerFlag(vars["LINK_FLAGS"], this->TargetLinkLanguage, @@ -535,7 +535,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() // Compute architecture specific link flags. Yes, these go into a different // variable for executables, probably due to a mistake made when duplicating // code between the Makefile executable and library generators. - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { std::string t = vars["FLAGS"]; localGen.AddArchitectureFlags(t, &genTarget, TargetLinkLanguage, cfgName); t += lwyuFlags; @@ -552,7 +552,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() if (this->GetGeneratorTarget()->HasSOName(cfgName)) { vars["SONAME_FLAG"] = mf->GetSONameFlag(this->TargetLinkLanguage); vars["SONAME"] = this->TargetNameSO; - if (targetType == cmState::SHARED_LIBRARY) { + if (targetType == cmStateEnums::SHARED_LIBRARY) { std::string install_dir = this->GetGeneratorTarget()->GetInstallNameDirForBuildTree(cfgName); if (!install_dir.empty()) { @@ -625,7 +625,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() } // maybe create .def file from list of objects - if ((gt.GetType() == cmState::SHARED_LIBRARY || + if ((gt.GetType() == cmStateEnums::SHARED_LIBRARY || gt.IsExecutableWithExports()) && this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (gt.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { @@ -713,7 +713,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->WriteLinkRule(usedResponseFile); if (symlinkNeeded) { - if (targetType == cmState::EXECUTABLE) { + if (targetType == cmStateEnums::EXECUTABLE) { globalGen.WriteBuild( this->GetBuildFileStream(), "Create executable symlink " + targetOutput, diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 1ac6cd4..6552832 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -31,15 +31,15 @@ cmNinjaTargetGenerator* cmNinjaTargetGenerator::New(cmGeneratorTarget* target) { switch (target->GetType()) { - case cmState::EXECUTABLE: - case cmState::SHARED_LIBRARY: - case cmState::STATIC_LIBRARY: - case cmState::MODULE_LIBRARY: - case cmState::OBJECT_LIBRARY: + case cmStateEnums::EXECUTABLE: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: return new cmNinjaNormalTargetGenerator(target); - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: return new cmNinjaUtilityTargetGenerator(target); default: @@ -186,8 +186,8 @@ std::string cmNinjaTargetGenerator::ComputeDefines(cmSourceFile const* source, cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const { // Static libraries never depend on other targets for linking. - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY || - this->GeneratorTarget->GetType() == cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::OBJECT_LIBRARY) { return cmNinjaDeps(); } @@ -335,15 +335,15 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID")) { std::string pdbPath; std::string compilePdbPath; - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE || - this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY || - this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE || + this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { pdbPath = this->GeneratorTarget->GetPDBDirectory(this->GetConfigName()); pdbPath += "/"; pdbPath += this->GeneratorTarget->GetPDBName(this->GetConfigName()); } - if (this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { compilePdbPath = this->GeneratorTarget->GetCompilePDBPath(this->GetConfigName()); if (compilePdbPath.empty()) { diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx index 17e35e5..7de185a 100644 --- a/Source/cmNinjaUtilityTargetGenerator.cxx +++ b/Source/cmNinjaUtilityTargetGenerator.cxx @@ -151,7 +151,7 @@ void cmNinjaUtilityTargetGenerator::Generate() // Add an alias for the logical target name regardless of what directory // contains it. Skip this for GLOBAL_TARGET because they are meant to // be per-directory and have one at the top-level anyway. - if (this->GetGeneratorTarget()->GetType() != cmState::GLOBAL_TARGET) { + if (this->GetGeneratorTarget()->GetType() != cmStateEnums::GLOBAL_TARGET) { this->GetGlobalGenerator()->AddTargetAlias(this->GetTargetName(), this->GetGeneratorTarget()); } diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a9a3ce2..d332ed7 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -684,7 +684,7 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, cmLocalGenerator* lg = target->GetLocalGenerator(); const cmState* state = lg->GetState(); - const cmState::TargetType type = target->GetType(); + const cmStateEnums::TargetType type = target->GetType(); const std::string typeName = state->GetTargetTypeName(type); Json::Value ttl = Json::arrayValue; diff --git a/Source/cmState.cxx b/Source/cmState.cxx index ca0295a..cdadbda 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -117,26 +117,26 @@ cmState::~cmState() cmDeleteAll(this->Commands); } -const char* cmState::GetTargetTypeName(cmState::TargetType targetType) +const char* cmState::GetTargetTypeName(cmStateEnums::TargetType targetType) { switch (targetType) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "STATIC_LIBRARY"; - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return "MODULE_LIBRARY"; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return "SHARED_LIBRARY"; - case cmState::OBJECT_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: return "OBJECT_LIBRARY"; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return "EXECUTABLE"; - case cmState::UTILITY: + case cmStateEnums::UTILITY: return "UTILITY"; - case cmState::GLOBAL_TARGET: + case cmStateEnums::GLOBAL_TARGET: return "GLOBAL_TARGET"; - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: return "INTERFACE_LIBRARY"; - case cmState::UNKNOWN_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: return "UNKNOWN_LIBRARY"; } assert(0 && "Unexpected target type"); diff --git a/Source/cmState.h b/Source/cmState.h index 8f0b5ee..521870d 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -43,6 +43,19 @@ enum SnapshotType PolicyScopeType, VariableScopeType }; + +enum TargetType +{ + EXECUTABLE, + STATIC_LIBRARY, + SHARED_LIBRARY, + MODULE_LIBRARY, + OBJECT_LIBRARY, + UTILITY, + GLOBAL_TARGET, + INTERFACE_LIBRARY, + UNKNOWN_LIBRARY +}; } class cmState @@ -185,20 +198,7 @@ public: friend class Snapshot; }; - enum TargetType - { - EXECUTABLE, - STATIC_LIBRARY, - SHARED_LIBRARY, - MODULE_LIBRARY, - OBJECT_LIBRARY, - UTILITY, - GLOBAL_TARGET, - INTERFACE_LIBRARY, - UNKNOWN_LIBRARY - }; - - static const char* GetTargetTypeName(cmState::TargetType targetType); + static const char* GetTargetTypeName(cmStateEnums::TargetType targetType); Snapshot CreateBaseSnapshot(); Snapshot CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 3a22309..5753dd8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -180,7 +180,7 @@ public: std::vector LinkImplementationPropertyBacktraces; }; -cmTarget::cmTarget(std::string const& name, cmState::TargetType type, +cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, Visibility vis, cmMakefile* mf) { assert(mf); @@ -196,8 +196,8 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, this->BuildInterfaceIncludesAppended = false; // only add dependency information for library targets - if (this->TargetTypeValue >= cmState::STATIC_LIBRARY && - this->TargetTypeValue <= cmState::MODULE_LIBRARY) { + if (this->TargetTypeValue >= cmStateEnums::STATIC_LIBRARY && + this->TargetTypeValue <= cmStateEnums::MODULE_LIBRARY) { this->RecordDependencies = true; } else { this->RecordDependencies = false; @@ -214,8 +214,8 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, "Android") == 0; // Setup default property values. - if (this->GetType() != cmState::INTERFACE_LIBRARY && - this->GetType() != cmState::UTILITY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && + this->GetType() != cmStateEnums::UTILITY) { this->SetPropertyDefault("ANDROID_API", CM_NULLPTR); this->SetPropertyDefault("ANDROID_API_MIN", CM_NULLPTR); this->SetPropertyDefault("ANDROID_ARCH", CM_NULLPTR); @@ -282,7 +282,7 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, mf->GetConfigurations(configNames); // Setup per-configuration property default values. - if (this->GetType() != cmState::UTILITY) { + if (this->GetType() != cmStateEnums::UTILITY) { const char* configProps[] = { /* clang-format needs this comment to break after the opening brace */ "ARCHIVE_OUTPUT_DIRECTORY_", @@ -297,7 +297,7 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, ci != configNames.end(); ++ci) { std::string configUpper = cmSystemTools::UpperCase(*ci); for (const char** p = configProps; *p; ++p) { - if (this->TargetTypeValue == cmState::INTERFACE_LIBRARY && + if (this->TargetTypeValue == cmStateEnums::INTERFACE_LIBRARY && strcmp(*p, "MAP_IMPORTED_CONFIG_") != 0) { continue; } @@ -311,8 +311,8 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, // compatibility with previous CMake versions in which executables // did not support this variable. Projects may still specify the // property directly. - if (this->TargetTypeValue != cmState::EXECUTABLE && - this->TargetTypeValue != cmState::INTERFACE_LIBRARY) { + if (this->TargetTypeValue != cmStateEnums::EXECUTABLE && + this->TargetTypeValue != cmStateEnums::INTERFACE_LIBRARY) { std::string property = cmSystemTools::UpperCase(*ci); property += "_POSTFIX"; this->SetPropertyDefault(property, CM_NULLPTR); @@ -357,44 +357,45 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, parentOptionsBts.end()); } - if (this->GetType() != cmState::INTERFACE_LIBRARY && - this->GetType() != cmState::UTILITY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && + this->GetType() != cmStateEnums::UTILITY) { this->SetPropertyDefault("C_VISIBILITY_PRESET", CM_NULLPTR); this->SetPropertyDefault("CXX_VISIBILITY_PRESET", CM_NULLPTR); this->SetPropertyDefault("VISIBILITY_INLINES_HIDDEN", CM_NULLPTR); } - if (this->TargetTypeValue == cmState::EXECUTABLE) { + if (this->TargetTypeValue == cmStateEnums::EXECUTABLE) { this->SetPropertyDefault("ANDROID_GUI", CM_NULLPTR); this->SetPropertyDefault("CROSSCOMPILING_EMULATOR", CM_NULLPTR); this->SetPropertyDefault("ENABLE_EXPORTS", CM_NULLPTR); } - if (this->TargetTypeValue == cmState::SHARED_LIBRARY || - this->TargetTypeValue == cmState::MODULE_LIBRARY) { + if (this->TargetTypeValue == cmStateEnums::SHARED_LIBRARY || + this->TargetTypeValue == cmStateEnums::MODULE_LIBRARY) { this->SetProperty("POSITION_INDEPENDENT_CODE", "True"); } - if (this->TargetTypeValue == cmState::SHARED_LIBRARY || - this->TargetTypeValue == cmState::EXECUTABLE) { + if (this->TargetTypeValue == cmStateEnums::SHARED_LIBRARY || + this->TargetTypeValue == cmStateEnums::EXECUTABLE) { this->SetPropertyDefault("WINDOWS_EXPORT_ALL_SYMBOLS", CM_NULLPTR); } - if (this->GetType() != cmState::INTERFACE_LIBRARY && - this->GetType() != cmState::UTILITY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && + this->GetType() != cmStateEnums::UTILITY) { this->SetPropertyDefault("POSITION_INDEPENDENT_CODE", CM_NULLPTR); } // Record current policies for later use. this->Makefile->RecordPolicies(this->PolicyMap); - if (this->TargetTypeValue == cmState::INTERFACE_LIBRARY) { + if (this->TargetTypeValue == cmStateEnums::INTERFACE_LIBRARY) { // This policy is checked in a few conditions. The properties relevant - // to the policy are always ignored for cmState::INTERFACE_LIBRARY targets, + // to the policy are always ignored for cmStateEnums::INTERFACE_LIBRARY + // targets, // so ensure that the conditions don't lead to nonsense. this->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW); } - if (this->GetType() != cmState::INTERFACE_LIBRARY && - this->GetType() != cmState::UTILITY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && + this->GetType() != cmStateEnums::UTILITY) { this->SetPropertyDefault("JOB_POOL_COMPILE", CM_NULLPTR); this->SetPropertyDefault("JOB_POOL_LINK", CM_NULLPTR); } @@ -432,26 +433,27 @@ cmListFileBacktrace const& cmTarget::GetBacktrace() const bool cmTarget::IsExecutableWithExports() const { - return (this->GetType() == cmState::EXECUTABLE && + return (this->GetType() == cmStateEnums::EXECUTABLE && this->GetPropertyAsBool("ENABLE_EXPORTS")); } bool cmTarget::HasImportLibrary() const { - return (this->DLLPlatform && (this->GetType() == cmState::SHARED_LIBRARY || - this->IsExecutableWithExports())); + return (this->DLLPlatform && + (this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->IsExecutableWithExports())); } bool cmTarget::IsFrameworkOnApple() const { - return (this->GetType() == cmState::SHARED_LIBRARY && + return (this->GetType() == cmStateEnums::SHARED_LIBRARY && this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("FRAMEWORK")); } bool cmTarget::IsAppBundleOnApple() const { - return (this->GetType() == cmState::EXECUTABLE && + return (this->GetType() == cmStateEnums::EXECUTABLE && this->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("MACOSX_BUNDLE")); } @@ -730,7 +732,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib, } if (cmGeneratorExpression::Find(lib) != std::string::npos || - (tgt && tgt->GetType() == cmState::INTERFACE_LIBRARY) || + (tgt && tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) || (this->Name == lib)) { return; } @@ -986,10 +988,10 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, void cmTarget::AppendBuildInterfaceIncludes() { - if (this->GetType() != cmState::SHARED_LIBRARY && - this->GetType() != cmState::STATIC_LIBRARY && - this->GetType() != cmState::MODULE_LIBRARY && - this->GetType() != cmState::INTERFACE_LIBRARY && + if (this->GetType() != cmStateEnums::SHARED_LIBRARY && + this->GetType() != cmStateEnums::STATIC_LIBRARY && + this->GetType() != cmStateEnums::MODULE_LIBRARY && + this->GetType() != cmStateEnums::INTERFACE_LIBRARY && !this->IsExecutableWithExports()) { return; } @@ -1255,15 +1257,15 @@ bool cmTarget::GetPropertyAsBool(const std::string& prop) const const char* cmTarget::GetSuffixVariableInternal(bool implib) const { switch (this->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "CMAKE_STATIC_LIBRARY_SUFFIX"; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return (implib ? "CMAKE_IMPORT_LIBRARY_SUFFIX" : "CMAKE_SHARED_LIBRARY_SUFFIX"); - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return (implib ? "CMAKE_IMPORT_LIBRARY_SUFFIX" : "CMAKE_SHARED_MODULE_SUFFIX"); - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return (implib ? "CMAKE_IMPORT_LIBRARY_SUFFIX" // Android GUI application packages store the native @@ -1280,15 +1282,15 @@ const char* cmTarget::GetSuffixVariableInternal(bool implib) const const char* cmTarget::GetPrefixVariableInternal(bool implib) const { switch (this->GetType()) { - case cmState::STATIC_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: return "CMAKE_STATIC_LIBRARY_PREFIX"; - case cmState::SHARED_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: return (implib ? "CMAKE_IMPORT_LIBRARY_PREFIX" : "CMAKE_SHARED_LIBRARY_PREFIX"); - case cmState::MODULE_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: return (implib ? "CMAKE_IMPORT_LIBRARY_PREFIX" : "CMAKE_SHARED_MODULE_PREFIX"); - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: return (implib ? "CMAKE_IMPORT_LIBRARY_PREFIX" // Android GUI application packages store the native @@ -1322,7 +1324,7 @@ std::string cmTarget::ImportedGetFullPath(const std::string& config, const char* imp = CM_NULLPTR; std::string suffix; - if (this->GetType() != cmState::INTERFACE_LIBRARY && + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && this->GetMappedConfig(config_upper, &loc, &imp, suffix)) { if (!pimplib) { if (loc) { @@ -1340,7 +1342,7 @@ std::string cmTarget::ImportedGetFullPath(const std::string& config, } else { if (imp) { result = imp; - } else if (this->GetType() == cmState::SHARED_LIBRARY || + } else if (this->GetType() == cmStateEnums::SHARED_LIBRARY || this->IsExecutableWithExports()) { std::string impProp = "IMPORTED_IMPLIB"; impProp += suffix; @@ -1378,9 +1380,10 @@ bool cmTarget::GetMappedConfig(std::string const& desired_config, const char** loc, const char** imp, std::string& suffix) const { - if (this->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { // This method attempts to find a config-specific LOCATION for the - // IMPORTED library. In the case of cmState::INTERFACE_LIBRARY, there is no + // IMPORTED library. In the case of cmStateEnums::INTERFACE_LIBRARY, there + // is no // LOCATION at all, so leaving *loc and *imp unchanged is the appropriate // and valid response. return true; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index bd00b3d..6a7c8f0 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -62,8 +62,8 @@ public: VisibilityImportedGlobally }; - cmTarget(std::string const& name, cmState::TargetType type, Visibility vis, - cmMakefile* mf); + cmTarget(std::string const& name, cmStateEnums::TargetType type, + Visibility vis, cmMakefile* mf); enum CustomCommandType { @@ -75,7 +75,7 @@ public: /** * Return the type of target. */ - cmState::TargetType GetType() const { return this->TargetTypeValue; } + cmStateEnums::TargetType GetType() const { return this->TargetTypeValue; } cmGlobalGenerator* GetGlobalGenerator() const; @@ -302,7 +302,7 @@ private: LinkLibraryVectorType OriginalLinkLibraries; cmMakefile* Makefile; cmTargetInternalPointer Internal; - cmState::TargetType TargetTypeValue; + cmStateEnums::TargetType TargetTypeValue; bool HaveInstallRule; bool RecordDependencies; bool DLLPlatform; diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index d1de7ef..804dc5a 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -71,7 +71,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass( return true; } - if (this->Target->GetType() == cmState::OBJECT_LIBRARY) { + if (this->Target->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "Object library target \"" << args[0] << "\" " << "may not link to anything."; @@ -80,7 +80,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass( return true; } - if (this->Target->GetType() == cmState::UTILITY) { + if (this->Target->GetType() == cmStateEnums::UTILITY) { std::ostringstream e; const char* modal = CM_NULLPTR; cmake::MessageType messageType = cmake::AUTHOR_WARNING; @@ -278,7 +278,7 @@ void cmTargetLinkLibrariesCommand::LinkLibraryTypeSpecifierWarning(int left, bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, cmTargetLinkLibraryType llt) { - if (this->Target->GetType() == cmState::INTERFACE_LIBRARY && + if (this->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY && this->CurrentProcessingState != ProcessingKeywordLinkInterface) { this->Makefile->IssueMessage( cmake::FATAL_ERROR, @@ -351,9 +351,9 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, cmTarget* tgt = this->Makefile->GetGlobalGenerator()->FindTarget(lib); - if (tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) && - (tgt->GetType() != cmState::SHARED_LIBRARY) && - (tgt->GetType() != cmState::INTERFACE_LIBRARY) && + if (tgt && (tgt->GetType() != cmStateEnums::STATIC_LIBRARY) && + (tgt->GetType() != cmStateEnums::SHARED_LIBRARY) && + (tgt->GetType() != cmStateEnums::INTERFACE_LIBRARY) && !tgt->IsExecutableWithExports()) { std::ostringstream e; e << "Target \"" << lib << "\" of type " @@ -375,7 +375,7 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, } if (this->CurrentProcessingState != ProcessingKeywordPublicInterface && this->CurrentProcessingState != ProcessingPlainPublicInterface) { - if (this->Target->GetType() == cmState::STATIC_LIBRARY) { + if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY) { std::string configLib = this->Target->GetDebugGeneratorExpressions(lib, llt); if (cmGeneratorExpression::IsValidTargetName(lib) || @@ -403,7 +403,7 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, return true; } - if (this->Target->GetType() == cmState::INTERFACE_LIBRARY) { + if (this->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return true; } diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx index a00360b..e2e02ad 100644 --- a/Source/cmTargetPropCommandBase.cxx +++ b/Source/cmTargetPropCommandBase.cxx @@ -28,12 +28,12 @@ bool cmTargetPropCommandBase::HandleArguments( this->HandleMissingTarget(args[0]); return false; } - if ((this->Target->GetType() != cmState::SHARED_LIBRARY) && - (this->Target->GetType() != cmState::STATIC_LIBRARY) && - (this->Target->GetType() != cmState::OBJECT_LIBRARY) && - (this->Target->GetType() != cmState::MODULE_LIBRARY) && - (this->Target->GetType() != cmState::INTERFACE_LIBRARY) && - (this->Target->GetType() != cmState::EXECUTABLE)) { + if ((this->Target->GetType() != cmStateEnums::SHARED_LIBRARY) && + (this->Target->GetType() != cmStateEnums::STATIC_LIBRARY) && + (this->Target->GetType() != cmStateEnums::OBJECT_LIBRARY) && + (this->Target->GetType() != cmStateEnums::MODULE_LIBRARY) && + (this->Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) && + (this->Target->GetType() != cmStateEnums::EXECUTABLE)) { this->SetError("called with non-compilable target type"); return false; } @@ -86,7 +86,7 @@ bool cmTargetPropCommandBase::ProcessContentArgs( return false; } - if (this->Target->GetType() == cmState::INTERFACE_LIBRARY && + if (this->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY && scope != "INTERFACE") { this->SetError("may only be set INTERFACE properties on INTERFACE " "targets"); diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx index 21408d1..36d1940 100644 --- a/Source/cmTargetPropertyComputer.cxx +++ b/Source/cmTargetPropertyComputer.cxx @@ -83,10 +83,10 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( } bool cmTargetPropertyComputer::PassesWhitelist( - cmState::TargetType tgtType, std::string const& prop, cmMessenger* messenger, - cmListFileBacktrace const& context) + cmStateEnums::TargetType tgtType, std::string const& prop, + cmMessenger* messenger, cmListFileBacktrace const& context) { - if (tgtType == cmState::INTERFACE_LIBRARY && + if (tgtType == cmStateEnums::INTERFACE_LIBRARY && !WhiteListedInterfaceProperty(prop)) { std::ostringstream e; e << "INTERFACE_LIBRARY targets may only have whitelisted properties. " diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index ed9a4e2..f8b683a 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -36,7 +36,7 @@ public: static bool WhiteListedInterfaceProperty(const std::string& prop); - static bool PassesWhitelist(cmState::TargetType tgtType, + static bool PassesWhitelist(cmStateEnums::TargetType tgtType, std::string const& prop, cmMessenger* messenger, cmListFileBacktrace const& context); @@ -59,11 +59,11 @@ private: { // Watch for special "computed" properties that are dependent on // other properties or variables. Always recompute them. - if (tgt->GetType() == cmState::EXECUTABLE || - tgt->GetType() == cmState::STATIC_LIBRARY || - tgt->GetType() == cmState::SHARED_LIBRARY || - tgt->GetType() == cmState::MODULE_LIBRARY || - tgt->GetType() == cmState::UNKNOWN_LIBRARY) { + if (tgt->GetType() == cmStateEnums::EXECUTABLE || + tgt->GetType() == cmStateEnums::STATIC_LIBRARY || + tgt->GetType() == cmStateEnums::SHARED_LIBRARY || + tgt->GetType() == cmStateEnums::MODULE_LIBRARY || + tgt->GetType() == cmStateEnums::UNKNOWN_LIBRARY) { static const std::string propLOCATION = "LOCATION"; if (prop == propLOCATION) { if (!tgt->IsImported() && diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index 3ea59cb..301660e 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -77,7 +77,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os, // be translated. std::string exe = command[0]; cmGeneratorTarget* target = this->LG->FindGeneratorTargetToUse(exe); - if (target && target->GetType() == cmState::EXECUTABLE) { + if (target && target->GetType() == cmStateEnums::EXECUTABLE) { // Use the target file on disk. exe = target->GetFullPath(config); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 8524ecc..9c857f2 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -255,7 +255,7 @@ void cmVisualStudio10TargetGenerator::WriteString(const char* line, void cmVisualStudio10TargetGenerator::Generate() { // do not generate external ms projects - if (this->GeneratorTarget->GetType() == cmState::INTERFACE_LIBRARY || + if (this->GeneratorTarget->GetType() == cmStateEnums::INTERFACE_LIBRARY || this->GeneratorTarget->GetProperty("EXTERNAL_MSPROJECT")) { return; } @@ -264,7 +264,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->Name.c_str()); this->GeneratorTarget->Target->SetProperty("GENERATOR_FILE_NAME_EXT", ".vcxproj"); - if (this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { if (!this->ComputeClOptions()) { return; } @@ -344,7 +344,7 @@ void cmVisualStudio10TargetGenerator::Generate() (*this->BuildFileStream) << "{" << this->GUID << "}\n"; if (this->MSTools && - this->GeneratorTarget->GetType() <= cmState::GLOBAL_TARGET) { + this->GeneratorTarget->GetType() <= cmStateEnums::GLOBAL_TARGET) { this->WriteApplicationTypeSettings(); this->VerifyNecessaryFiles(); } @@ -655,15 +655,15 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues() configType += cmVS10EscapeXML(vsConfigurationType); } else { switch (this->GeneratorTarget->GetType()) { - case cmState::SHARED_LIBRARY: - case cmState::MODULE_LIBRARY: + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: configType += "DynamicLibrary"; break; - case cmState::OBJECT_LIBRARY: - case cmState::STATIC_LIBRARY: + case cmStateEnums::OBJECT_LIBRARY: + case cmStateEnums::STATIC_LIBRARY: configType += "StaticLibrary"; break; - case cmState::EXECUTABLE: + case cmStateEnums::EXECUTABLE: if (this->NsightTegra && !this->GeneratorTarget->GetPropertyAsBool("ANDROID_GUI")) { // Android executables are .so too. @@ -672,8 +672,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues() configType += "Application"; } break; - case cmState::UTILITY: - case cmState::GLOBAL_TARGET: + case cmStateEnums::UTILITY: + case cmStateEnums::GLOBAL_TARGET: if (this->NsightTegra) { // Tegra-Android platform does not understand "Utility". configType += "StaticLibrary"; @@ -681,8 +681,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues() configType += "Utility"; } break; - case cmState::UNKNOWN_LIBRARY: - case cmState::INTERFACE_LIBRARY: + case cmStateEnums::UNKNOWN_LIBRARY: + case cmStateEnums::INTERFACE_LIBRARY: break; } } @@ -710,7 +710,7 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues( std::string mfcFlagValue = mfcFlag ? mfcFlag : "0"; std::string useOfMfcValue = "false"; - if (this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { if (mfcFlagValue == "1") { useOfMfcValue = "Static"; } else if (mfcFlagValue == "2") { @@ -721,14 +721,15 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues( mfcLine += useOfMfcValue + "\n"; this->WriteString(mfcLine.c_str(), 2); - if ((this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY && + if ((this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY && this->ClOptions[config]->UsingUnicode()) || this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT") || this->GlobalGenerator->TargetsWindowsPhone() || this->GlobalGenerator->TargetsWindowsStore() || this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_EXTENSIONS")) { this->WriteString("Unicode\n", 2); - } else if (this->GeneratorTarget->GetType() <= cmState::MODULE_LIBRARY && + } else if (this->GeneratorTarget->GetType() <= + cmStateEnums::MODULE_LIBRARY && this->ClOptions[config]->UsingSBCS()) { this->WriteString("NotSet\n", 2); } else { @@ -1351,7 +1352,7 @@ void cmVisualStudio10TargetGenerator::WriteSources( void cmVisualStudio10TargetGenerator::WriteAllSources() { - if (this->GeneratorTarget->GetType() > cmState::UTILITY) { + if (this->GeneratorTarget->GetType() > cmStateEnums::UTILITY) { return; } this->WriteString("\n", 1); @@ -1573,8 +1574,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() { - cmState::TargetType ttype = this->GeneratorTarget->GetType(); - if (ttype > cmState::GLOBAL_TARGET) { + cmStateEnums::TargetType ttype = this->GeneratorTarget->GetType(); + if (ttype > cmStateEnums::GLOBAL_TARGET) { return; } @@ -1585,7 +1586,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() for (std::vector::const_iterator config = this->Configurations.begin(); config != this->Configurations.end(); ++config) { - if (ttype >= cmState::UTILITY) { + if (ttype >= cmStateEnums::UTILITY) { this->WritePlatformConfigTag("IntDir", config->c_str(), 3); *this->BuildFileStream << "$(Platform)\\$(Configuration)\\$(ProjectName)\\" @@ -1598,7 +1599,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() intermediateDir += "/"; std::string outDir; std::string targetNameFull; - if (ttype == cmState::OBJECT_LIBRARY) { + if (ttype == cmStateEnums::OBJECT_LIBRARY) { outDir = intermediateDir; targetNameFull = this->GeneratorTarget->GetName(); targetNameFull += ".lib"; @@ -1645,8 +1646,8 @@ void cmVisualStudio10TargetGenerator::OutputLinkIncremental( } // static libraries and things greater than modules do not need // to set this option - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY || - this->GeneratorTarget->GetType() > cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GeneratorTarget->GetType() > cmStateEnums::MODULE_LIBRARY) { return; } Options& linkOptions = *(this->LinkOptions[configName]); @@ -1767,8 +1768,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( if (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT")) { clOptions.AddFlag("CompileAsWinRT", "true"); // For WinRT components, add the _WINRT_DLL define to produce a lib - if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { clOptions.AddDefine("_WINRT_DLL"); } } else if (this->GlobalGenerator->TargetsWindowsStore() || @@ -1958,8 +1959,8 @@ void cmVisualStudio10TargetGenerator::WriteMasmOptions( void cmVisualStudio10TargetGenerator::WriteLibOptions( std::string const& config) { - if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY && - this->GeneratorTarget->GetType() != cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() != cmStateEnums::STATIC_LIBRARY && + this->GeneratorTarget->GetType() != cmStateEnums::OBJECT_LIBRARY) { return; } std::string libflags; @@ -1992,9 +1993,9 @@ void cmVisualStudio10TargetGenerator::WriteLibOptions( void cmVisualStudio10TargetGenerator::WriteManifestOptions( std::string const& config) { - if (this->GeneratorTarget->GetType() != cmState::EXECUTABLE && - this->GeneratorTarget->GetType() != cmState::SHARED_LIBRARY && - this->GeneratorTarget->GetType() != cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() != cmStateEnums::EXECUTABLE && + this->GeneratorTarget->GetType() != cmStateEnums::SHARED_LIBRARY && + this->GeneratorTarget->GetType() != cmStateEnums::MODULE_LIBRARY) { return; } @@ -2145,9 +2146,9 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions( bool cmVisualStudio10TargetGenerator::ComputeLinkOptions() { - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE || - this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || - this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE || + this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || + this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { for (std::vector::const_iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { @@ -2178,10 +2179,10 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( std::string CONFIG = cmSystemTools::UpperCase(config); const char* linkType = "SHARED"; - if (this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) { linkType = "MODULE"; } - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { linkType = "EXE"; } std::string flags; @@ -2258,7 +2259,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( std::string targetNameFull; std::string targetNameImport; std::string targetNamePDB; - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { this->GeneratorTarget->GetExecutableNames(targetName, targetNameFull, targetNameImport, targetNamePDB, config.c_str()); @@ -2274,7 +2275,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( if (this->GeneratorTarget->GetPropertyAsBool("WIN32_EXECUTABLE")) { if (this->GlobalGenerator->TargetsWindowsCE()) { linkOptions.AddFlag("SubSystem", "WindowsCE"); - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { if (this->ClOptions[config]->UsingUnicode()) { linkOptions.AddFlag("EntryPointSymbol", "wWinMainCRTStartup"); } else { @@ -2287,7 +2288,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( } else { if (this->GlobalGenerator->TargetsWindowsCE()) { linkOptions.AddFlag("SubSystem", "WindowsCE"); - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { if (this->ClOptions[config]->UsingUnicode()) { linkOptions.AddFlag("EntryPointSymbol", "mainWCRTStartup"); } else { @@ -2325,7 +2326,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( // A Windows Runtime component uses internal .NET metadata, // so does not have an import library. if (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT") && - this->GeneratorTarget->GetType() != cmState::EXECUTABLE) { + this->GeneratorTarget->GetType() != cmStateEnums::EXECUTABLE) { linkOptions.AddFlag("GenerateWindowsMetadata", "true"); } else if (this->GlobalGenerator->TargetsWindowsPhone() || this->GlobalGenerator->TargetsWindowsStore()) { @@ -2356,7 +2357,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( "%(IgnoreSpecificDefaultLibraries)"); } - if ((this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || + if ((this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || this->GeneratorTarget->IsExecutableWithExports()) && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (this->GeneratorTarget->GetPropertyAsBool( @@ -2398,8 +2399,8 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( void cmVisualStudio10TargetGenerator::WriteLinkOptions( std::string const& config) { - if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY || - this->GeneratorTarget->GetType() > cmState::MODULE_LIBRARY) { + if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY || + this->GeneratorTarget->GetType() > cmStateEnums::MODULE_LIBRARY) { return; } Options& linkOptions = *(this->LinkOptions[config]); @@ -2432,7 +2433,7 @@ void cmVisualStudio10TargetGenerator::AddLibraries( this->ConvertToWindowsSlash(path); libVec.push_back(path); } else if (!l->Target || - l->Target->GetType() != cmState::INTERFACE_LIBRARY) { + l->Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { libVec.push_back(l->Value); } } @@ -2496,7 +2497,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups() this->WritePlatformConfigTag("ItemDefinitionGroup", i->c_str(), 1); *this->BuildFileStream << "\n"; // output cl compile flags - if (this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY) { + if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { this->WriteClOptions(*i, includes); // output rc compile flags this->WriteRCOptions(*i, includes); @@ -2513,7 +2514,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups() // output manifest flags this->WriteManifestOptions(*i); if (this->NsightTegra && - this->GeneratorTarget->GetType() == cmState::EXECUTABLE && + this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE && this->GeneratorTarget->GetPropertyAsBool("ANDROID_GUI")) { this->WriteAntBuildOptions(*i); } @@ -2525,7 +2526,7 @@ void cmVisualStudio10TargetGenerator::WriteEvents( std::string const& configName) { bool addedPrelink = false; - if ((this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY || + if ((this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || this->GeneratorTarget->IsExecutableWithExports()) && this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")) { if (this->GeneratorTarget->GetPropertyAsBool( @@ -2592,7 +2593,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences() for (OrderedTargetDependSet::const_iterator i = depends.begin(); i != depends.end(); ++i) { cmGeneratorTarget const* dt = *i; - if (dt->GetType() == cmState::INTERFACE_LIBRARY) { + if (dt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } // skip fortran targets as they can not be processed by MSBuild @@ -2728,7 +2729,7 @@ void cmVisualStudio10TargetGenerator::WriteWinRTPackageCertificateKeyFile() { if ((this->GlobalGenerator->TargetsWindowsStore() || this->GlobalGenerator->TargetsWindowsPhone()) && - (cmState::EXECUTABLE == this->GeneratorTarget->GetType())) { + (cmStateEnums::EXECUTABLE == this->GeneratorTarget->GetType())) { std::string pfxFile; std::vector certificates; this->GeneratorTarget->GetCertificates(certificates, ""); @@ -2853,7 +2854,7 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() "\n", 2); - if (this->GeneratorTarget->GetType() < cmState::UTILITY) { + if (this->GeneratorTarget->GetType() < cmStateEnums::UTILITY) { isAppContainer = true; } } else if (v == "8.1") { @@ -2865,7 +2866,7 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() "\n", 2); - if (this->GeneratorTarget->GetType() < cmState::UTILITY) { + if (this->GeneratorTarget->GetType() < cmStateEnums::UTILITY) { isAppContainer = true; } } else if (v == "8.0") { @@ -2878,10 +2879,11 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() 2); if (isWindowsStore && - this->GeneratorTarget->GetType() < cmState::UTILITY) { + this->GeneratorTarget->GetType() < cmStateEnums::UTILITY) { isAppContainer = true; } else if (isWindowsPhone && - this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + this->GeneratorTarget->GetType() == + cmStateEnums::EXECUTABLE) { this->WriteString("true\n", 2); this->WriteString("", 2); (*this->BuildFileStream) @@ -2931,7 +2933,7 @@ void cmVisualStudio10TargetGenerator::VerifyNecessaryFiles() { // For Windows and Windows Phone executables, we will assume that if a // manifest is not present that we need to add all the necessary files - if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) { + if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE) { std::vector manifestSources; this->GeneratorTarget->GetAppManifest(manifestSources, ""); { ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 09:51:52 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 09:51:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-660-g075a060 Message-ID: <20161019135152.49617F6823@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 075a06080ff86467dcc70bb2d4f467b8bc87eddf (commit) via 2e2ba95cb9d7806219c76773e81f91056e83077f (commit) via 5618f7123d9ed3667d5cb53a05779d10ae6438ff (commit) from eb5c141897404324d13c7cf568f9c92e80cb4609 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=075a06080ff86467dcc70bb2d4f467b8bc87eddf commit 075a06080ff86467dcc70bb2d4f467b8bc87eddf Merge: eb5c141 2e2ba95 Author: Brad King AuthorDate: Wed Oct 19 09:51:51 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 09:51:51 2016 -0400 Merge topic 'vs-csharp-prep' into next 2e2ba95c VS: Add internal API for detecting "managed" projects 5618f712 VS: Add CSharp project uuid and file extension https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e2ba95cb9d7806219c76773e81f91056e83077f commit 2e2ba95cb9d7806219c76773e81f91056e83077f Author: Michael St?rmer AuthorDate: Fri Sep 23 12:15:40 2016 +0200 Commit: Brad King CommitDate: Wed Oct 19 09:43:01 2016 -0400 VS: Add internal API for detecting "managed" projects This is in preparation for adding CSharp language support to the VS generator. diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 9badda6..4be183d 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -137,6 +137,11 @@ bool cmVisualStudioGeneratorOptions::IsWinRt() const return this->FlagMap.find("CompileAsWinRT") != this->FlagMap.end(); } +bool cmVisualStudioGeneratorOptions::IsManaged() const +{ + return this->FlagMap.find("CompileAsManaged") != this->FlagMap.end(); +} + bool cmVisualStudioGeneratorOptions::UsingUnicode() const { // Look for the a _UNICODE definition. diff --git a/Source/cmVisualStudioGeneratorOptions.h b/Source/cmVisualStudioGeneratorOptions.h index 4eeae3d..0a0b96d 100644 --- a/Source/cmVisualStudioGeneratorOptions.h +++ b/Source/cmVisualStudioGeneratorOptions.h @@ -49,6 +49,7 @@ public: bool IsDebug() const; bool IsWinRt() const; + bool IsManaged() const; // Write options to output. void OutputPreprocessorDefinitions(std::ostream& fout, const char* prefix, const char* suffix, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5618f7123d9ed3667d5cb53a05779d10ae6438ff commit 5618f7123d9ed3667d5cb53a05779d10ae6438ff Author: Michael St?rmer AuthorDate: Fri Sep 23 12:15:40 2016 +0200 Commit: Brad King CommitDate: Wed Oct 19 09:39:30 2016 -0400 VS: Add CSharp project uuid and file extension This is in preparation for adding CSharp language support to the VS generator. diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index ffd87e2..1fa2741 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -159,6 +159,10 @@ void cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout, ext = ".vfproj"; project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \""; } + if (this->TargetIsCSharpOnly(t)) { + ext = ".csproj"; + project = "Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \""; + } const char* targetExt = t->GetProperty("GENERATOR_FILE_NAME_EXT"); if (targetExt) { ext = targetExt; diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 6296dd2..151d1d3 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -734,6 +734,30 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly( return false; } +bool cmGlobalVisualStudioGenerator::TargetIsCSharpOnly( + cmGeneratorTarget const* gt) +{ + if (gt->GetType() > cmState::OBJECT_LIBRARY) { + return false; + } + // check to see if this is a C# build + std::set languages; + { + // Issue diagnostic if the source files depend on the config. + std::vector sources; + if (!gt->GetConfigCommonSourceFiles(sources)) { + return false; + } + } + gt->GetLanguages(languages, ""); + if (languages.size() == 1) { + if (*languages.begin() == "CSharp") { + return true; + } + } + return false; +} + bool cmGlobalVisualStudioGenerator::TargetCompare::operator()( cmGeneratorTarget const* l, cmGeneratorTarget const* r) const { diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index a774d96..c8fc984 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -69,6 +69,9 @@ public: // return true if target is fortran only bool TargetIsFortranOnly(const cmGeneratorTarget* gt); + // return true if target is C# only + static bool TargetIsCSharpOnly(cmGeneratorTarget const* gt); + /** Get the top-level registry key for this VS version. */ std::string GetRegistryBase(); ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio71Generator.cxx | 4 ++++ Source/cmGlobalVisualStudioGenerator.cxx | 24 ++++++++++++++++++++++++ Source/cmGlobalVisualStudioGenerator.h | 3 +++ Source/cmVisualStudioGeneratorOptions.cxx | 5 +++++ Source/cmVisualStudioGeneratorOptions.h | 1 + 5 files changed, 37 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 10:45:23 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 10:45:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-663-g24b4801 Message-ID: <20161019144523.8A275F6646@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 24b4801a660b64f6736a0fcc6f8f4c0f2b5d72ed (commit) via c44804bd2c49cfc5ae2d588c2f9e81a8515e35c9 (commit) via fb461cacba5afe98fd9871d4b8ab0500d825ad5a (commit) from 075a06080ff86467dcc70bb2d4f467b8bc87eddf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24b4801a660b64f6736a0fcc6f8f4c0f2b5d72ed commit 24b4801a660b64f6736a0fcc6f8f4c0f2b5d72ed Merge: 075a060 c44804b Author: Brad King AuthorDate: Wed Oct 19 10:45:21 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 10:45:21 2016 -0400 Merge topic 'clang-tidy' into next c44804bd fix more issues reported by clang-tidy fb461cac silence selected clang-tidy violations https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c44804bd2c49cfc5ae2d588c2f9e81a8515e35c9 commit c44804bd2c49cfc5ae2d588c2f9e81a8515e35c9 Author: Daniel Pfeifer AuthorDate: Tue Oct 18 23:16:02 2016 +0200 Commit: Daniel Pfeifer CommitDate: Tue Oct 18 23:16:02 2016 +0200 fix more issues reported by clang-tidy diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index d9ac909..0098a4b 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -231,7 +231,7 @@ public: protected: void StartElement(const std::string& name, const char** /*atts*/) CM_OVERRIDE { - file = name == "file" ? true : false; + file = name == "file"; if (file) { hasFiles = true; } diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 360c852..efce263 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -430,17 +430,19 @@ void cmExtraCodeLiteGenerator::CreateProjectSourceEntries( xml.StartElement("General"); std::string outputPath = mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH"); - if (!outputPath.empty()) + if (!outputPath.empty()) { xml.Attribute("OutputFile", outputPath + "/$(ProjectName)"); - else + } else { xml.Attribute("OutputFile", "$(IntermediateDirectory)/$(ProjectName)"); + } xml.Attribute("IntermediateDirectory", "./"); xml.Attribute("Command", "./$(ProjectName)"); xml.Attribute("CommandArguments", ""); - if (!outputPath.empty()) + if (!outputPath.empty()) { xml.Attribute("WorkingDirectory", outputPath); - else + } else { xml.Attribute("WorkingDirectory", "$(IntermediateDirectory)"); + } xml.Attribute("PauseExecWhenProcTerminates", "yes"); xml.EndElement(); // General diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index a71ff71..8dd204b 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -115,41 +115,59 @@ bool cmFileCommand::InitialPass(std::vector const& args, } if (subCommand == "STRINGS") { return this->HandleStringsCommand(args); - } else if (subCommand == "GLOB") { + } + if (subCommand == "GLOB") { return this->HandleGlobCommand(args, false); - } else if (subCommand == "GLOB_RECURSE") { + } + if (subCommand == "GLOB_RECURSE") { return this->HandleGlobCommand(args, true); - } else if (subCommand == "MAKE_DIRECTORY") { + } + if (subCommand == "MAKE_DIRECTORY") { return this->HandleMakeDirectoryCommand(args); - } else if (subCommand == "RENAME") { + } + if (subCommand == "RENAME") { return this->HandleRename(args); - } else if (subCommand == "REMOVE") { + } + if (subCommand == "REMOVE") { return this->HandleRemove(args, false); - } else if (subCommand == "REMOVE_RECURSE") { + } + if (subCommand == "REMOVE_RECURSE") { return this->HandleRemove(args, true); - } else if (subCommand == "COPY") { + } + if (subCommand == "COPY") { return this->HandleCopyCommand(args); - } else if (subCommand == "INSTALL") { + } + if (subCommand == "INSTALL") { return this->HandleInstallCommand(args); - } else if (subCommand == "DIFFERENT") { + } + if (subCommand == "DIFFERENT") { return this->HandleDifferentCommand(args); - } else if (subCommand == "RPATH_CHANGE" || subCommand == "CHRPATH") { + } + if (subCommand == "RPATH_CHANGE" || subCommand == "CHRPATH") { return this->HandleRPathChangeCommand(args); - } else if (subCommand == "RPATH_CHECK") { + } + if (subCommand == "RPATH_CHECK") { return this->HandleRPathCheckCommand(args); - } else if (subCommand == "RPATH_REMOVE") { + } + if (subCommand == "RPATH_REMOVE") { return this->HandleRPathRemoveCommand(args); - } else if (subCommand == "RELATIVE_PATH") { + } + if (subCommand == "RELATIVE_PATH") { return this->HandleRelativePathCommand(args); - } else if (subCommand == "TO_CMAKE_PATH") { + } + if (subCommand == "TO_CMAKE_PATH") { return this->HandleCMakePathCommand(args, false); - } else if (subCommand == "TO_NATIVE_PATH") { + } + if (subCommand == "TO_NATIVE_PATH") { return this->HandleCMakePathCommand(args, true); - } else if (subCommand == "TIMESTAMP") { + } + if (subCommand == "TIMESTAMP") { return this->HandleTimestampCommand(args); - } else if (subCommand == "GENERATE") { + } + if (subCommand == "GENERATE") { return this->HandleGenerateCommand(args); - } else if (subCommand == "LOCK") { + } + if (subCommand == "LOCK") { return this->HandleLockCommand(args); } diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx index 41ec8b4..b55341b 100644 --- a/Source/cmFileMonitor.cxx +++ b/Source/cmFileMonitor.cxx @@ -36,7 +36,7 @@ public: class cmVirtualDirectoryWatcher : public cmIBaseWatcher { public: - ~cmVirtualDirectoryWatcher() + ~cmVirtualDirectoryWatcher() override { for (auto i : this->Children) { delete i.second; @@ -156,7 +156,7 @@ public: p->AddChildWatcher(ps, this); } - ~cmRealDirectoryWatcher() + ~cmRealDirectoryWatcher() override { // Handle is freed via uv_handle_close callback! } diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index b16cfc6..9fa23c0 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -400,7 +400,7 @@ const char* cmGeneratorTarget::GetProperty(const std::string& prop) const if (!cmTargetPropertyComputer::PassesWhitelist( this->GetType(), prop, this->Makefile->GetMessenger(), this->GetBacktrace())) { - return 0; + return CM_NULLPTR; } if (const char* result = cmTargetPropertyComputer::GetProperty( this, prop, this->Makefile->GetMessenger(), this->GetBacktrace())) { diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 39445dd..9f64397 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -247,7 +247,7 @@ bool cmGetPropertyCommand::HandleTargetMode() } return this->StoreResult(CM_NULLPTR); } - const char* prop_cstr = 0; + const char* prop_cstr = CM_NULLPTR; cmListFileBacktrace bt = this->Makefile->GetBacktrace(); cmMessenger* messenger = this->Makefile->GetMessenger(); if (cmTargetPropertyComputer::PassesWhitelist( diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx index 6a816d8..e78f780 100644 --- a/Source/cmGetTargetPropertyCommand.cxx +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -24,7 +24,7 @@ bool cmGetTargetPropertyCommand::InitialPass( prop_exists = true; } } else if (!args[2].empty()) { - const char* prop_cstr = 0; + const char* prop_cstr = CM_NULLPTR; cmListFileBacktrace bt = this->Makefile->GetBacktrace(); cmMessenger* messenger = this->Makefile->GetMessenger(); if (cmTargetPropertyComputer::PassesWhitelist(tgt->GetType(), args[2], diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 1ac6cd4..ff4098b 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -274,8 +274,9 @@ std::string cmNinjaTargetGenerator::GetPreprocessedFilePath( objName.substr(0, objName.size() - objExt.size()) + "-pp." + ppExt; std::string path = this->LocalGenerator->GetHomeRelativeOutputPath(); - if (!path.empty()) + if (!path.empty()) { path += "/"; + } path += this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget); path += "/"; path += ppName; @@ -286,8 +287,9 @@ std::string cmNinjaTargetGenerator::GetDyndepFilePath( std::string const& lang) const { std::string path = this->LocalGenerator->GetHomeRelativeOutputPath(); - if (!path.empty()) + if (!path.empty()) { path += "/"; + } path += this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget); path += "/"; path += lang; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index e0fcb75..84628d4 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -42,8 +42,9 @@ static std::vector getConfigurations(const cmake* cm) } makefiles[0]->GetConfigurations(configurations); - if (configurations.empty()) + if (configurations.empty()) { configurations.push_back(""); + } return configurations; } @@ -96,20 +97,24 @@ static void getCMakeInputs(const cmGlobalGenerator* gg, if (!sourceDir.empty()) { const std::string& relative = cmSystemTools::RelativePath(sourceDir.c_str(), jt->c_str()); - if (toAdd.size() > relative.size()) + if (toAdd.size() > relative.size()) { toAdd = relative; + } } if (isInternal) { - if (internalFiles) + if (internalFiles) { internalFiles->push_back(toAdd); + } } else { if (isTemporary) { - if (tmpFiles) + if (tmpFiles) { tmpFiles->push_back(toAdd); + } } else { - if (explicitFiles) + if (explicitFiles) { explicitFiles->push_back(toAdd); + } } } } @@ -672,8 +677,9 @@ static Json::Value DumpSourceFilesList( Json::Value result = Json::arrayValue; for (auto it = fileGroups.begin(); it != fileGroups.end(); ++it) { Json::Value group = DumpSourceFileGroup(it->first, it->second, baseDir); - if (!group.isNull()) + if (!group.isNull()) { result.append(group); + } } return result; @@ -821,8 +827,8 @@ static Json::Value DumpProjectList(const cmake* cm, const std::string config) Json::Value pObj = Json::objectValue; pObj[kNAME_KEY] = projectIt.first; - assert(projectIt.second.size() > - 0); // All Projects must have at least one local generator + // All Projects must have at least one local generator + assert(!projectIt.second.empty()); const cmLocalGenerator* lg = projectIt.second.at(0); // Project structure information: diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 3a22309..073d0d6 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -852,13 +852,15 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "EXPORT_NAME" && this->IsImported()) { + } + if (prop == "EXPORT_NAME" && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" << this->Name << "\")\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "SOURCES" && this->IsImported()) { + } + if (prop == "SOURCES" && this->IsImported()) { std::ostringstream e; e << "SOURCES property can't be set on imported targets (\"" << this->Name << "\")\n"; diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index ed9a4e2..1f7150a 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -75,7 +75,7 @@ private: } // Support "LOCATION_". - else if (cmHasLiteralPrefix(prop, "LOCATION_")) { + if (cmHasLiteralPrefix(prop, "LOCATION_")) { if (!tgt->IsImported() && !HandleLocationPropertyPolicy(tgt->GetName(), messenger, context)) { @@ -86,8 +86,8 @@ private: } // Support "_LOCATION". - else if (cmHasLiteralSuffix(prop, "_LOCATION") && - !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { + if (cmHasLiteralSuffix(prop, "_LOCATION") && + !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { std::string configName(prop.c_str(), prop.size() - 9); if (configName != "IMPORTED") { if (!tgt->IsImported() && diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 4387bf6..290261a 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -414,7 +414,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) return 0; } - else if (args[1] == "env") { + if (args[1] == "env") { std::vector::const_iterator ai = args.begin() + 2; std::vector::const_iterator ae = args.end(); for (; ai != ae; ++ai) { @@ -454,7 +454,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } #if defined(CMAKE_BUILD_WITH_CMAKE) - else if (args[1] == "environment") { + if (args[1] == "environment") { std::vector env = cmSystemTools::GetEnvironmentVariables(); std::vector::iterator it; for (it = env.begin(); it != env.end(); ++it) { @@ -464,7 +464,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } #endif - else if (args[1] == "make_directory" && args.size() > 2) { + if (args[1] == "make_directory" && args.size() > 2) { // If error occurs we want to continue copying next files. bool return_value = 0; for (std::string::size_type cc = 2; cc < args.size(); cc++) { @@ -476,7 +476,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) return return_value; } - else if (args[1] == "remove_directory" && args.size() == 3) { + if (args[1] == "remove_directory" && args.size() == 3) { if (cmSystemTools::FileIsDirectory(args[2]) && !cmSystemTools::RemoveADirectory(args[2])) { std::cerr << "Error removing directory \"" << args[2] << "\".\n"; @@ -486,7 +486,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Remove file - else if (args[1] == "remove" && args.size() > 2) { + if (args[1] == "remove" && args.size() > 2) { bool force = false; for (std::string::size_type cc = 2; cc < args.size(); cc++) { if (args[cc] == "\\-f" || args[cc] == "-f") { @@ -502,8 +502,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } return 0; } + // Touch file - else if (args[1] == "touch" && args.size() > 2) { + if (args[1] == "touch" && args.size() > 2) { for (std::string::size_type cc = 2; cc < args.size(); cc++) { if (!cmSystemTools::Touch(args[cc], true)) { return 1; @@ -511,8 +512,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } return 0; } + // Touch file - else if (args[1] == "touch_nocreate" && args.size() > 2) { + if (args[1] == "touch_nocreate" && args.size() > 2) { for (std::string::size_type cc = 2; cc < args.size(); cc++) { // Complain if the file could not be removed, still exists, // and the -f option was not given. @@ -522,8 +524,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } return 0; } + // capabilities - else if (args[1] == "capabilities") { + if (args[1] == "capabilities") { if (args.size() > 2) { std::cerr << "-E capabilities accepts no additional arguments\n"; return 1; @@ -538,7 +541,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Sleep command - else if (args[1] == "sleep" && args.size() > 2) { + if (args[1] == "sleep" && args.size() > 2) { double total = 0; for (size_t i = 2; i < args.size(); ++i) { double num = 0.0; @@ -559,7 +562,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Clock command - else if (args[1] == "time" && args.size() > 2) { + if (args[1] == "time" && args.size() > 2) { std::vector command(args.begin() + 2, args.end()); clock_t clock_start, clock_finish; @@ -583,8 +586,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) << "\n"; return ret; } + // Command to calculate the md5sum of a file - else if (args[1] == "md5sum" && args.size() >= 3) { + if (args[1] == "md5sum" && args.size() >= 3) { char md5out[32]; int retval = 0; for (std::string::size_type cc = 2; cc < args.size(); cc++) { @@ -606,7 +610,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Command to change directory and run a program. - else if (args[1] == "chdir" && args.size() >= 4) { + if (args[1] == "chdir" && args.size() >= 4) { std::string directory = args[2]; if (!cmSystemTools::FileExists(directory.c_str())) { cmSystemTools::Error("Directory does not exist for chdir command: ", @@ -628,7 +632,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Command to start progress for a build - else if (args[1] == "cmake_progress_start" && args.size() == 4) { + if (args[1] == "cmake_progress_start" && args.size() == 4) { // basically remove the directory std::string dirName = args[2]; dirName += "/Progress"; @@ -660,7 +664,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Command to report progress for a build - else if (args[1] == "cmake_progress_report" && args.size() >= 3) { + if (args[1] == "cmake_progress_report" && args.size() >= 3) { // This has been superseded by cmake_echo_color --progress-* // options. We leave it here to avoid errors if somehow this // is invoked by an existing makefile without regenerating. @@ -669,7 +673,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) // Command to create a symbolic link. Fails on platforms not // supporting them. - else if (args[1] == "create_symlink" && args.size() == 4) { + if (args[1] == "create_symlink" && args.size() == 4) { const char* destinationFileName = args[3].c_str(); if ((cmSystemTools::FileExists(destinationFileName) || cmSystemTools::FileIsSymlink(destinationFileName)) && @@ -690,16 +694,17 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Internal CMake shared library support. - else if (args[1] == "cmake_symlink_library" && args.size() == 5) { + if (args[1] == "cmake_symlink_library" && args.size() == 5) { return cmcmd::SymlinkLibrary(args); } + // Internal CMake versioned executable support. - else if (args[1] == "cmake_symlink_executable" && args.size() == 4) { + if (args[1] == "cmake_symlink_executable" && args.size() == 4) { return cmcmd::SymlinkExecutable(args); } // Internal CMake dependency scanning support. - else if (args[1] == "cmake_depends" && args.size() >= 6) { + if (args[1] == "cmake_depends" && args.size() >= 6) { const bool verbose = isCMakeVerbose(); // Create a cmake object instance to process dependencies. @@ -774,24 +779,24 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Internal CMake link script support. - else if (args[1] == "cmake_link_script" && args.size() >= 3) { + if (args[1] == "cmake_link_script" && args.size() >= 3) { return cmcmd::ExecuteLinkScript(args); } #ifdef CMAKE_BUILD_WITH_CMAKE // Internal CMake ninja dependency scanning support. - else if (args[1] == "cmake_ninja_depends") { + if (args[1] == "cmake_ninja_depends") { return cmcmd_cmake_ninja_depends(args.begin() + 2, args.end()); } // Internal CMake ninja dyndep support. - else if (args[1] == "cmake_ninja_dyndep") { + if (args[1] == "cmake_ninja_dyndep") { return cmcmd_cmake_ninja_dyndep(args.begin() + 2, args.end()); } #endif // Internal CMake unimplemented feature notification. - else if (args[1] == "cmake_unimplemented_variable") { + if (args[1] == "cmake_unimplemented_variable") { std::cerr << "Feature not implemented for this platform."; if (args.size() == 3) { std::cerr << " Variable " << args[2] << " is not set."; @@ -803,12 +808,14 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } else if (args[1] == "vs_link_dll") { return cmcmd::VisualStudioLink(args, 2); } + // Internal CMake color makefile support. - else if (args[1] == "cmake_echo_color") { + if (args[1] == "cmake_echo_color") { return cmcmd::ExecuteEchoColor(args); } + #ifdef CMAKE_BUILD_WITH_CMAKE - else if (args[1] == "cmake_autogen" && args.size() >= 4) { + if (args[1] == "cmake_autogen" && args.size() >= 4) { cmQtAutoGenerators autogen; std::string const& config = args[3]; bool autogenSuccess = autogen.Run(args[2], config); @@ -817,7 +824,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) #endif // Tar files - else if (args[1] == "tar" && args.size() > 3) { + if (args[1] == "tar" && args.size() > 3) { const char* knownFormats[] = { "7zip", "gnutar", "pax", "paxr", "zip" }; std::string flags = args[2]; @@ -958,28 +965,26 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) std::string errorMessage; if (server.Serve(&errorMessage)) { return 0; - } else { - cmSystemTools::Error(errorMessage.c_str()); - return 1; } + cmSystemTools::Error(errorMessage.c_str()); #else static_cast(supportExperimental); static_cast(isDebug); cmSystemTools::Error("CMake was not built with server mode enabled"); - return 1; #endif + return 1; } #if defined(CMAKE_BUILD_WITH_CMAKE) // Internal CMake Fortran module support. - else if (args[1] == "cmake_copy_f90_mod" && args.size() >= 4) { + if (args[1] == "cmake_copy_f90_mod" && args.size() >= 4) { return cmDependsFortran::CopyModule(args) ? 0 : 1; } #endif #if defined(_WIN32) && !defined(__CYGWIN__) // Write registry value - else if (args[1] == "write_regv" && args.size() > 3) { + if (args[1] == "write_regv" && args.size() > 3) { return cmSystemTools::WriteRegistryValue(args[2].c_str(), args[3].c_str()) ? 0 @@ -987,16 +992,21 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Delete registry value - else if (args[1] == "delete_regv" && args.size() > 2) { + if (args[1] == "delete_regv" && args.size() > 2) { return cmSystemTools::DeleteRegistryValue(args[2].c_str()) ? 0 : 1; } + // Remove file - else if (args[1] == "comspec" && args.size() > 2) { + if (args[1] == "comspec" && args.size() > 2) { std::cerr << "Win9x helper \"cmake -E comspec\" no longer supported\n"; return 1; - } else if (args[1] == "env_vs8_wince" && args.size() == 3) { + } + + if (args[1] == "env_vs8_wince" && args.size() == 3) { return cmcmd::WindowsCEEnvironment("8.0", args[2]); - } else if (args[1] == "env_vs9_wince" && args.size() == 3) { + } + + if (args[1] == "env_vs9_wince" && args.size() == 3) { return cmcmd::WindowsCEEnvironment("9.0", args[2]); } #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb461cacba5afe98fd9871d4b8ab0500d825ad5a commit fb461cacba5afe98fd9871d4b8ab0500d825ad5a Author: Daniel Pfeifer AuthorDate: Tue Oct 18 22:56:47 2016 +0200 Commit: Daniel Pfeifer CommitDate: Tue Oct 18 22:56:47 2016 +0200 silence selected clang-tidy violations diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx index aff1ecd..c026631 100644 --- a/Source/cmGeneratorExpressionDAGChecker.cxx +++ b/Source/cmGeneratorExpressionDAGChecker.cxx @@ -53,8 +53,9 @@ void cmGeneratorExpressionDAGChecker::Initialize() #define TEST_TRANSITIVE_PROPERTY_METHOD(METHOD) top->METHOD() || - if (CheckResult == DAG && (CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD( - TEST_TRANSITIVE_PROPERTY_METHOD) false)) + if (CheckResult == DAG && + (CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD( + TEST_TRANSITIVE_PROPERTY_METHOD) false)) // NOLINT(clang-tidy) #undef TEST_TRANSITIVE_PROPERTY_METHOD { std::map >::const_iterator it = diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index f866605..d937dfe 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1035,7 +1035,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode #define TRANSITIVE_PROPERTY_COMPARE(PROPERTY) \ (#PROPERTY == propertyName || "INTERFACE_" #PROPERTY == propertyName) || if (CM_FOR_EACH_TRANSITIVE_PROPERTY_NAME( - TRANSITIVE_PROPERTY_COMPARE) false) { + TRANSITIVE_PROPERTY_COMPARE) false) { // NOLINT(clang-tidy) reportError( context, content->GetOriginalExpression(), "$ expression in link libraries " @@ -1052,7 +1052,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode #define ASSERT_TRANSITIVE_PROPERTY_METHOD(METHOD) dagCheckerParent->METHOD() || assert(CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD( - ASSERT_TRANSITIVE_PROPERTY_METHOD) false); + ASSERT_TRANSITIVE_PROPERTY_METHOD) false); // NOLINT(clang-tidy) #undef ASSERT_TRANSITIVE_PROPERTY_METHOD } } ----------------------------------------------------------------------- Summary of changes: Source/CPack/IFW/cmCPackIFWInstaller.cxx | 2 +- Source/cmExtraCodeLiteGenerator.cxx | 10 ++-- Source/cmFileCommand.cxx | 54 ++++++++++++------- Source/cmFileMonitor.cxx | 4 +- Source/cmGeneratorExpressionDAGChecker.cxx | 5 +- Source/cmGeneratorExpressionNode.cxx | 4 +- Source/cmGeneratorTarget.cxx | 2 +- Source/cmGetPropertyCommand.cxx | 2 +- Source/cmGetTargetPropertyCommand.cxx | 2 +- Source/cmNinjaTargetGenerator.cxx | 6 ++- Source/cmServerProtocol.cxx | 22 +++++--- Source/cmTarget.cxx | 6 ++- Source/cmTargetPropertyComputer.h | 6 +-- Source/cmcmd.cxx | 80 ++++++++++++++++------------ 14 files changed, 123 insertions(+), 82 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 10:46:38 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 10:46:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-665-g773fa85 Message-ID: <20161019144638.9521BF672F@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 773fa853f2c6bc5d108b47a536f6cb43658771ac (commit) via 63d215dfa8373899d0d35f2c28ea0aa7a672be8c (commit) from 24b4801a660b64f6736a0fcc6f8f4c0f2b5d72ed (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=773fa853f2c6bc5d108b47a536f6cb43658771ac commit 773fa853f2c6bc5d108b47a536f6cb43658771ac Merge: 24b4801 63d215d Author: Brad King AuthorDate: Wed Oct 19 10:46:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 10:46:37 2016 -0400 Merge topic 'external-project-configure-command-extraction' into next 63d215df ExternalProject: support extracting the configure command https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63d215dfa8373899d0d35f2c28ea0aa7a672be8c commit 63d215dfa8373899d0d35f2c28ea0aa7a672be8c Author: Ben Boeckel AuthorDate: Tue Oct 18 10:39:05 2016 -0400 Commit: Ben Boeckel CommitDate: Wed Oct 19 08:58:25 2016 -0400 ExternalProject: support extracting the configure command Previously, the configure command generated by ExternalProject was not accessible prior to actually adding the targets. This makes the CMake configure command accessible with just a call to _ep_parse_arguments. Future work will leverage this to support custom environment settings on a per-project basis. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 4551cc8..4d702c8 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1180,6 +1180,7 @@ function(_ep_write_initial_cache target_name script_filename script_initial_cach # Write out values into an initial cache, that will be passed to CMake with -C # Replace location tags. _ep_replace_location_tags(${target_name} script_initial_cache) + _ep_replace_location_tags(${target_name} script_filename) # Write out the initial cache file to the location specified. file(GENERATE OUTPUT "${script_filename}" CONTENT "${script_initial_cache}") endfunction() @@ -2181,24 +2182,7 @@ function(_ep_add_patch_command name) endfunction() -# TODO: Make sure external projects use the proper compiler -function(_ep_add_configure_command name) - ExternalProject_Get_Property(${name} source_dir source_subdir binary_dir tmp_dir) - - # Depend on other external projects (file-level). - set(file_deps) - get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS) - foreach(dep IN LISTS deps) - get_property(dep_type TARGET ${dep} PROPERTY TYPE) - if(dep_type STREQUAL "UTILITY") - get_property(is_ep TARGET ${dep} PROPERTY _EP_IS_EXTERNAL_PROJECT) - if(is_ep) - _ep_get_step_stampfile(${dep} "done" done_stamp_file) - list(APPEND file_deps ${done_stamp_file}) - endif() - endif() - endforeach() - +function(_ep_extract_configure_command var name) get_property(cmd_set TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND SET) if(cmd_set) get_property(cmd TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND) @@ -2219,7 +2203,7 @@ function(_ep_add_configure_command name) get_property(cmake_cache_default_args TARGET ${name} PROPERTY _EP_CMAKE_CACHE_DEFAULT_ARGS) if(cmake_cache_args OR cmake_cache_default_args) - set(_ep_cache_args_script "${tmp_dir}/${name}-cache-$.cmake") + set(_ep_cache_args_script "/${name}-cache-$.cmake") if(cmake_cache_args) _ep_command_line_to_initial_cache(script_initial_cache_force "${cmake_cache_args}" 1) endif() @@ -2261,9 +2245,32 @@ function(_ep_add_configure_command name) endif() endif() - list(APPEND cmd "${source_dir}${source_subdir}") + list(APPEND cmd "") endif() + set("${var}" "${cmd}" PARENT_SCOPE) +endfunction() + +# TODO: Make sure external projects use the proper compiler +function(_ep_add_configure_command name) + ExternalProject_Get_Property(${name} binary_dir tmp_dir) + + # Depend on other external projects (file-level). + set(file_deps) + get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS) + foreach(dep IN LISTS deps) + get_property(dep_type TARGET ${dep} PROPERTY TYPE) + if(dep_type STREQUAL "UTILITY") + get_property(is_ep TARGET ${dep} PROPERTY _EP_IS_EXTERNAL_PROJECT) + if(is_ep) + _ep_get_step_stampfile(${dep} "done" done_stamp_file) + list(APPEND file_deps ${done_stamp_file}) + endif() + endif() + endforeach() + + _ep_extract_configure_command(cmd ${name}) + # If anything about the configure command changes, (command itself, cmake # used, cmake args or cmake generator) then re-run the configure step. # Fixes issue https://gitlab.kitware.com/cmake/cmake/issues/10258 ----------------------------------------------------------------------- Summary of changes: Modules/ExternalProject.cmake | 47 +++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 20 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 10:57:33 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 10:57:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc1-311-g0de6a40 Message-ID: <20161019145733.2DF26F6D64@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 0de6a404aafb497074980eba5144d243b6868d68 (commit) via 876da11858ab6649bb088c4bb7758fc84910ba20 (commit) from aa105725152defd75b11a96e27db8b28b9e884a5 (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 Wed Oct 19 10:57:33 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 10:57:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-667-g2811bf8 Message-ID: <20161019145735.63F67F6D6A@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 2811bf8d21c1441b3846621b31b62a4bc634fcd4 (commit) via 0de6a404aafb497074980eba5144d243b6868d68 (commit) from 773fa853f2c6bc5d108b47a536f6cb43658771ac (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2811bf8d21c1441b3846621b31b62a4bc634fcd4 commit 2811bf8d21c1441b3846621b31b62a4bc634fcd4 Merge: 773fa85 0de6a40 Author: Brad King AuthorDate: Wed Oct 19 10:57:22 2016 -0400 Commit: Brad King CommitDate: Wed Oct 19 10:57:22 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 10:57:35 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 10:57:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.7.0-rc1-64-g876da11 Message-ID: <20161019145735.944DBF6D63@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 876da11858ab6649bb088c4bb7758fc84910ba20 (commit) from a0c539b5460da283433976053ea181f07fcea32e (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 Wed Oct 19 11:09:12 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 11:09:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-669-gc6eb6f1 Message-ID: <20161019150912.3B707F2802@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 c6eb6f124e422969b4d4b7a64dd86122bbc058be (commit) via e80c272bcd8e6bf2f1549218f7b3cc2a03087482 (commit) from 2811bf8d21c1441b3846621b31b62a4bc634fcd4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6eb6f124e422969b4d4b7a64dd86122bbc058be commit c6eb6f124e422969b4d4b7a64dd86122bbc058be Merge: 2811bf8 e80c272 Author: Brad King AuthorDate: Wed Oct 19 11:09:11 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 11:09:11 2016 -0400 Merge topic 'vs-csharp-prep' into next e80c272b Revert topic 'vs-csharp-prep' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e80c272bcd8e6bf2f1549218f7b3cc2a03087482 commit e80c272bcd8e6bf2f1549218f7b3cc2a03087482 Author: Brad King AuthorDate: Wed Oct 19 11:08:54 2016 -0400 Commit: Brad King CommitDate: Wed Oct 19 11:08:54 2016 -0400 Revert topic 'vs-csharp-prep' It logically conflicts with another topic in next. diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 1fa2741..ffd87e2 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -159,10 +159,6 @@ void cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout, ext = ".vfproj"; project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \""; } - if (this->TargetIsCSharpOnly(t)) { - ext = ".csproj"; - project = "Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \""; - } const char* targetExt = t->GetProperty("GENERATOR_FILE_NAME_EXT"); if (targetExt) { ext = targetExt; diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 151d1d3..6296dd2 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -734,30 +734,6 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly( return false; } -bool cmGlobalVisualStudioGenerator::TargetIsCSharpOnly( - cmGeneratorTarget const* gt) -{ - if (gt->GetType() > cmState::OBJECT_LIBRARY) { - return false; - } - // check to see if this is a C# build - std::set languages; - { - // Issue diagnostic if the source files depend on the config. - std::vector sources; - if (!gt->GetConfigCommonSourceFiles(sources)) { - return false; - } - } - gt->GetLanguages(languages, ""); - if (languages.size() == 1) { - if (*languages.begin() == "CSharp") { - return true; - } - } - return false; -} - bool cmGlobalVisualStudioGenerator::TargetCompare::operator()( cmGeneratorTarget const* l, cmGeneratorTarget const* r) const { diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index c8fc984..a774d96 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -69,9 +69,6 @@ public: // return true if target is fortran only bool TargetIsFortranOnly(const cmGeneratorTarget* gt); - // return true if target is C# only - static bool TargetIsCSharpOnly(cmGeneratorTarget const* gt); - /** Get the top-level registry key for this VS version. */ std::string GetRegistryBase(); diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 4be183d..9badda6 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -137,11 +137,6 @@ bool cmVisualStudioGeneratorOptions::IsWinRt() const return this->FlagMap.find("CompileAsWinRT") != this->FlagMap.end(); } -bool cmVisualStudioGeneratorOptions::IsManaged() const -{ - return this->FlagMap.find("CompileAsManaged") != this->FlagMap.end(); -} - bool cmVisualStudioGeneratorOptions::UsingUnicode() const { // Look for the a _UNICODE definition. diff --git a/Source/cmVisualStudioGeneratorOptions.h b/Source/cmVisualStudioGeneratorOptions.h index 0a0b96d..4eeae3d 100644 --- a/Source/cmVisualStudioGeneratorOptions.h +++ b/Source/cmVisualStudioGeneratorOptions.h @@ -49,7 +49,6 @@ public: bool IsDebug() const; bool IsWinRt() const; - bool IsManaged() const; // Write options to output. void OutputPreprocessorDefinitions(std::ostream& fout, const char* prefix, const char* suffix, ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio71Generator.cxx | 4 ---- Source/cmGlobalVisualStudioGenerator.cxx | 24 ------------------------ Source/cmGlobalVisualStudioGenerator.h | 3 --- Source/cmVisualStudioGeneratorOptions.cxx | 5 ----- Source/cmVisualStudioGeneratorOptions.h | 1 - 5 files changed, 37 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 11:15:17 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 11:15:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-672-g307cb3c Message-ID: <20161019151517.76955F64FD@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 307cb3c1f24857f4ff93747c14fb268d6b20fdb4 (commit) via f27492a4db2c56f334b2ca5c746b01b8e9a04995 (commit) via 4f78b9ff2df89d5b4104f92251feb0a7f0976d7f (commit) from c6eb6f124e422969b4d4b7a64dd86122bbc058be (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=307cb3c1f24857f4ff93747c14fb268d6b20fdb4 commit 307cb3c1f24857f4ff93747c14fb268d6b20fdb4 Merge: c6eb6f1 f27492a Author: Brad King AuthorDate: Wed Oct 19 11:15:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 11:15:16 2016 -0400 Merge topic 'vs-csharp-prep' into next f27492a4 VS: Add internal API for detecting "managed" projects 4f78b9ff VS: Add CSharp project uuid and file extension https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f27492a4db2c56f334b2ca5c746b01b8e9a04995 commit f27492a4db2c56f334b2ca5c746b01b8e9a04995 Author: Michael St?rmer AuthorDate: Fri Sep 23 12:15:40 2016 +0200 Commit: Brad King CommitDate: Wed Oct 19 11:14:19 2016 -0400 VS: Add internal API for detecting "managed" projects This is in preparation for adding CSharp language support to the VS generator. diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 9badda6..4be183d 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -137,6 +137,11 @@ bool cmVisualStudioGeneratorOptions::IsWinRt() const return this->FlagMap.find("CompileAsWinRT") != this->FlagMap.end(); } +bool cmVisualStudioGeneratorOptions::IsManaged() const +{ + return this->FlagMap.find("CompileAsManaged") != this->FlagMap.end(); +} + bool cmVisualStudioGeneratorOptions::UsingUnicode() const { // Look for the a _UNICODE definition. diff --git a/Source/cmVisualStudioGeneratorOptions.h b/Source/cmVisualStudioGeneratorOptions.h index 4eeae3d..0a0b96d 100644 --- a/Source/cmVisualStudioGeneratorOptions.h +++ b/Source/cmVisualStudioGeneratorOptions.h @@ -49,6 +49,7 @@ public: bool IsDebug() const; bool IsWinRt() const; + bool IsManaged() const; // Write options to output. void OutputPreprocessorDefinitions(std::ostream& fout, const char* prefix, const char* suffix, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4f78b9ff2df89d5b4104f92251feb0a7f0976d7f commit 4f78b9ff2df89d5b4104f92251feb0a7f0976d7f Author: Michael St?rmer AuthorDate: Fri Sep 23 12:15:40 2016 +0200 Commit: Brad King CommitDate: Wed Oct 19 11:14:16 2016 -0400 VS: Add CSharp project uuid and file extension This is in preparation for adding CSharp language support to the VS generator. diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index ffd87e2..1fa2741 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -159,6 +159,10 @@ void cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout, ext = ".vfproj"; project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \""; } + if (this->TargetIsCSharpOnly(t)) { + ext = ".csproj"; + project = "Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \""; + } const char* targetExt = t->GetProperty("GENERATOR_FILE_NAME_EXT"); if (targetExt) { ext = targetExt; diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 6296dd2..b277391 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -734,6 +734,27 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly( return false; } +bool cmGlobalVisualStudioGenerator::TargetIsCSharpOnly( + cmGeneratorTarget const* gt) +{ + // check to see if this is a C# build + std::set languages; + { + // Issue diagnostic if the source files depend on the config. + std::vector sources; + if (!gt->GetConfigCommonSourceFiles(sources)) { + return false; + } + } + gt->GetLanguages(languages, ""); + if (languages.size() == 1) { + if (*languages.begin() == "CSharp") { + return true; + } + } + return false; +} + bool cmGlobalVisualStudioGenerator::TargetCompare::operator()( cmGeneratorTarget const* l, cmGeneratorTarget const* r) const { diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index a774d96..c8fc984 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -69,6 +69,9 @@ public: // return true if target is fortran only bool TargetIsFortranOnly(const cmGeneratorTarget* gt); + // return true if target is C# only + static bool TargetIsCSharpOnly(cmGeneratorTarget const* gt); + /** Get the top-level registry key for this VS version. */ std::string GetRegistryBase(); ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio71Generator.cxx | 4 ++++ Source/cmGlobalVisualStudioGenerator.cxx | 21 +++++++++++++++++++++ Source/cmGlobalVisualStudioGenerator.h | 3 +++ Source/cmVisualStudioGeneratorOptions.cxx | 5 +++++ Source/cmVisualStudioGeneratorOptions.h | 1 + 5 files changed, 34 insertions(+) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Wed Oct 19 15:06:56 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Wed, 19 Oct 2016 15:06:56 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-674-gec25bfb Message-ID: <20161019190657.05E3FF700F@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 ec25bfbe1a2623245fb3b7bc047b5243d3916dfd (commit) via d2080ff950d88d91f80affce596171862c0fcd59 (commit) from 307cb3c1f24857f4ff93747c14fb268d6b20fdb4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec25bfbe1a2623245fb3b7bc047b5243d3916dfd commit ec25bfbe1a2623245fb3b7bc047b5243d3916dfd Merge: 307cb3c d2080ff Author: Daniel Pfeifer AuthorDate: Wed Oct 19 15:06:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 15:06:55 2016 -0400 Merge topic 'clang-tidy' into next d2080ff9 fixup! fix more issues reported by clang-tidy https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2080ff950d88d91f80affce596171862c0fcd59 commit d2080ff950d88d91f80affce596171862c0fcd59 Author: Daniel Pfeifer AuthorDate: Wed Oct 19 21:06:13 2016 +0200 Commit: Daniel Pfeifer CommitDate: Wed Oct 19 21:06:13 2016 +0200 fixup! fix more issues reported by clang-tidy diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 073d0d6..de48193 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -934,13 +934,15 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "EXPORT_NAME" && this->IsImported()) { + } + if (prop == "EXPORT_NAME" && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" << this->Name << "\")\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "SOURCES" && this->IsImported()) { + } + if (prop == "SOURCES" && this->IsImported()) { std::ostringstream e; e << "SOURCES property can't be set on imported targets (\"" << this->Name << "\")\n"; diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 290261a..b878534 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -803,9 +803,13 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } std::cerr << std::endl; return 1; - } else if (args[1] == "vs_link_exe") { + } + + if (args[1] == "vs_link_exe") { return cmcmd::VisualStudioLink(args, 1); - } else if (args[1] == "vs_link_dll") { + } + + if (args[1] == "vs_link_dll") { return cmcmd::VisualStudioLink(args, 2); } @@ -928,7 +932,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) #endif } return 0; - } else if (args[1] == "server") { + } + + if (args[1] == "server") { const std::string pipePrefix = "--pipe="; bool supportExperimental = false; bool isDebug = false; ----------------------------------------------------------------------- Summary of changes: Source/cmTarget.cxx | 6 ++++-- Source/cmcmd.cxx | 12 +++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From robert.maynard at kitware.com Wed Oct 19 15:50:54 2016 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 19 Oct 2016 15:50:54 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.7.0-rc2, created. v3.7.0-rc2 Message-ID: <20161019195054.EEAA2F67BB@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.7.0-rc2 has been created at 43fe2e0863278f06ccd9cd7e845ff9b0fd7031b9 (tag) tagging 876da11858ab6649bb088c4bb7758fc84910ba20 (commit) replaces v3.7.0-rc1 tagged by Brad King on Wed Oct 19 10:53:36 2016 -0400 - Log ----------------------------------------------------------------- CMake 3.7.0-rc2 -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdBQJYB4jwFhxicmFkLmtpbmdAa2l0d2FyZS5jb20ACgkQLSzvEDSS FoQo+w//Q4sgQCUH2rYOCMleN0N95xOdDcawh1nhdF5Fl7TvGVK4sNAM6NBjdPKD tA+jYZ15AkXMbk0+mDo7Y2bZziujbZvpU6iiKxdaZ+h+lHiUEAFMUm15j+wgldj9 qFcQFEVRmHR0EPSDLntxa3LfCtYTR6F2QEAeye9inqWwzXplZV7zz+5jHwAHnJpM YQV777aQ4uYyt0OAwtv5jYQjp07jzcbg3uleLds3TNynId7ChiMYZNO3Kao0eDrC qdBqVfCRzDo/UtxHAAdcndRtzvEgLIPHQx84vwR1tiFHg4o1l/caxWZSM0aXxbv5 JmDmx5hIV7XLA0XhwyHHuV5gnIhhN85FuCp0UrmFeJiIFH+H5xggTYm9t59gioB4 KT3dv6skStNGalhEuhT8MleLDNnouEjv2Jf4yOZvNvMDpf5lj6qva1dfmNYDNAEZ 9os5q+QVG+HsAv5dfXj5oqqSpYdYVRKBVs8A9UvpAB9cPxKJdqtpVQSLcTCROyxc bCvMa0rP3idW9ws19UGA6s1oNO7rGcw3jXZyX7ZKOcTLDk7vXqiuEDDXZAj1vOBY sL+vXZbD3cSfJcIXdLWTnp9Cx5vdxgh2H9v64/oJyMfGWxOECLGD4hfMHDIjtQbb uM/UcX6tmC46tMqHd6FtsA0vvvO4P63M5hbD95BJnfSLbjctKKQ= =/HQ7 -----END PGP SIGNATURE----- Ben Boeckel (3): Ninja: Fix RC language depfile generation with cmcldeps ExternalProject: error out only if the property is unset ExternalProject: make SOURCE_SUBDIR directly appendable Brad King (43): QtIFW: Reference cmake.org via https in cmake.org.html Merge branch 'cmake-server-improve-shutdown' into release Merge branch 'qtifw-https-cmake.org' into release Merge branch 'fix-VS-resources-pri-path' into release Merge branch 'FindMatlab-documentation' into release Merge branch 'FindMatlab-fix-simulink-cache' into release Merge branch 'cpack-rpm-debuginfo-fixes' into release Android: Suppress -Wattributes warnings in test case builds Android: Update libc++ include directories for NDK r13 Merge branch 'android-ndk-r13' into release Merge branch 'codelite-global-setting' into release Merge branch 'check-libuv-minimum-version' into release Android: Fix support for cxxabi.h with libc++ Merge branch 'android-cxxabi' into release Merge branch 'FindProtobuf-fix-subdirs' into release Android: Record use of C++ by static libs in exported Android.mk files Merge branch 'android-export-has-cpp' into release Merge branch 'upstream-KWSys' into update-kwsys Merge branch 'update-kwsys' into release VS: Split flag table between v140 and v141 toolsets Merge branch 'vs15-separate-flag-table' into release Merge branch 'ExternalProject-fix-CMAKE_CACHE_ARGS-list' into release cmake-gui: Fix "extra" generator entries in drop-down list Merge branch 'cmake-gui-fix-extra-generator-names' into release Merge branch 'ice-3.6.3' into release Merge branch 'ninja-rc-regression' into release Merge branch 'backport-LINK_WHAT_YOU_USE-allow-OFF' into release Ninja: Fix POST_BUILD commands on macOS Frameworks Merge branch 'ninja-framework-POST_BUILD' into release Help: Clarify `ctest_*` APPEND option behavior Merge branch 'doc-clarify-ctest-APPEND' into release Help: Fix math(EXPR) documentation formatting Merge branch 'doc-math-EXPR' into release Merge branch 'osx-no-deployment-target-on-cross-compile' into release FindwxWidgets: Fix finding unversioned VS-built directory prefixes Merge branch 'FindwxWidgets-unversioned-library-path' into release Merge branch 'external-project-source-subdir-usage' into release Merge branch 'cmake-server-pipe-mode-fix' into release VS: Fix NVIDIA Nsight Tegra Visual Studio Edition support Tests: Fix VSNsightTegra test on Android NDK r12b Tests: Add VSNsightTegra test for VS 2015 Merge branch 'fix-Android-NsightTegra' into release CMake 3.7.0-rc2 Chuck Atkins (2): Use find_package for JsonCpp and LibUV instead of include Set minimum version for LibUV to 1.0.0 Domen Vrankar (2): CPack/RPM debuginfo package objdump error suppression CPack/RPM debuginfo package without binaries Gregor Jasny (1): OS X: Do not try to set deployment target when cross-compiling Jamie Snape (1): Honor LINK_WHAT_YOU_USE when set to OFF KWSys Upstream (1): KWSys 2016-10-07 (dfe9b386) Martin Joly (1): FindProtobuf: Fix protobuf_generate_*() to handle subdirs Max Smolens (1): ExternalProject: Fix regression in passing list to CMAKE_CACHE_ARGS Raffi Enficiaud (3): FindMatlab: remove SIMULINK path from cache when FindMatlab is reconfigured FindMatlab: small documentation fixes Help: Extend 3.7 release notes for FindMatlab Roger Leigh (1): FindIce: Add support for version 3.6.3 Roman W?ger (1): VS: Use absolute target-specific directory for `resources.pri` Stephen Kelly (2): cmGlobalGenerator: Add API to get settings from top-level cmMakefile Codelite: Consume the CMAKE_CODELITE_USE_TARGETS setting globally Tobias Hunger (2): server-mode: Improve shutdown behavior server-mode: Fix named pipe mode ----------------------------------------------------------------------- hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 16:26:32 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 16:26:32 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-612-g01c0024 Message-ID: <20161019202632.E72C9F6BF9@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 01c002450510e33e7f66da1af4b7d14de97156ca (commit) via 437d9ffa10541a43c9af08e0d8da52728506d536 (commit) from ec25bfbe1a2623245fb3b7bc047b5243d3916dfd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01c002450510e33e7f66da1af4b7d14de97156ca commit 01c002450510e33e7f66da1af4b7d14de97156ca Merge: ec25bfb 437d9ff Author: Brad King AuthorDate: Wed Oct 19 16:26:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 16:26:31 2016 -0400 Merge topic 'split-cmState' into next 437d9ffa Fix style of topic 'split-cmState' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=437d9ffa10541a43c9af08e0d8da52728506d536 commit 437d9ffa10541a43c9af08e0d8da52728506d536 Author: Brad King AuthorDate: Wed Oct 19 16:26:05 2016 -0400 Commit: Brad King CommitDate: Wed Oct 19 16:26:05 2016 -0400 Fix style of topic 'split-cmState' diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index 6d85861..78bf5bd 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -3,8 +3,8 @@ #include "cmGlobalJOMMakefileGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" -#include "cmState.h" #include "cmMakefile.h" +#include "cmState.h" cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index 4a14df9..255c0f5 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -3,8 +3,8 @@ #include "cmGlobalMinGWMakefileGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" -#include "cmState.h" #include "cmMakefile.h" +#include "cmState.h" cmGlobalMinGWMakefileGenerator::cmGlobalMinGWMakefileGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index 92af8a9..06aba73 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalNMakeMakefileGenerator.h" -#include "cmState.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index d6209db..0782182 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -9,8 +9,8 @@ #include "cmGeneratorTarget.h" #include "cmLocalVisualStudioGenerator.h" #include "cmMakefile.h" -#include "cmState.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmTarget.h" #include diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index 817e8c2..352d858 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -5,9 +5,9 @@ #include // IWYU pragma: keep +#include "cmAlgorithms.h" #include "cmListFileCache.h" #include "cmSystemTools.h" -#include "cmAlgorithms.h" #include #include ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalJOMMakefileGenerator.cxx | 2 +- Source/cmGlobalMinGWMakefileGenerator.cxx | 2 +- Source/cmGlobalNMakeMakefileGenerator.cxx | 2 +- Source/cmGlobalVisualStudioGenerator.cxx | 2 +- Source/cmTargetPropertyComputer.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 19 16:26:49 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 19 Oct 2016 16:26:49 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-615-g65c4cae Message-ID: <20161019202649.3178EF6C08@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 65c4caedf049d34effbadfae449c00974ebf11c2 (commit) via 042ce68948fde096fc99d0658994646f9651be6f (commit) via 93b60614f97cb7cb0a181a10c2f56ae624f31448 (commit) from 01c002450510e33e7f66da1af4b7d14de97156ca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65c4caedf049d34effbadfae449c00974ebf11c2 commit 65c4caedf049d34effbadfae449c00974ebf11c2 Merge: 01c0024 042ce68 Author: Brad King AuthorDate: Wed Oct 19 16:26:47 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 19 16:26:47 2016 -0400 Merge topic 'split-cmState' into next 042ce689 cmListFileCache: Remove cmState header include 93b60614 cmTargetPropertyComputer: Add missing include https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=042ce68948fde096fc99d0658994646f9651be6f commit 042ce68948fde096fc99d0658994646f9651be6f Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:49 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:41:00 2016 +0200 cmListFileCache: Remove cmState header include Include it in dependents which have previously relied on it transitively. diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index e3adf6b..c305cbf 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -9,6 +9,7 @@ #include "cmDocumentationEntry.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTypeMacro.h" diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index fa816a6..7ee0f75 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -21,6 +21,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index a114755..d21471d 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -7,6 +7,7 @@ #include "cmCTestScriptHandler.h" #include "cmCurl.h" #include "cmGeneratedFileStream.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLParser.h" diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 09efafb..4e6f1e9 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -9,6 +9,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 5d29942..5539fbe 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -9,6 +9,7 @@ #include "cmCursesPathWidget.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index e8e70df..ebd35f3 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -11,6 +11,7 @@ #include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 3cde147..0777ef0 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddLibraryCommand.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index 36ffd7c..67581b6 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakePolicyCommand.h" +#include "cmState.h" #include "cmVersion.h" // cmCMakePolicyCommand diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 502a709..024260c 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -20,6 +20,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 3df7689..2d66344 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -6,6 +6,7 @@ #include "cmCommandArgumentLexer.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 16bbadb..28aa533 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -11,6 +11,7 @@ #include "cmOrderDirectories.h" #include "cmOutputConverter.h" #include "cmPolicies.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 70ed31e..cfebda2 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -10,6 +10,7 @@ #include "cmMakefile.h" #include "cmPolicies.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 420a777..4c0b649 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -4,6 +4,7 @@ #include "cmAlgorithms.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmSystemTools.h" static std::string const keyAND = "AND"; diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index e4a97a1..c7b6d58 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -6,6 +6,7 @@ #include "cmExportTryCompileFileGenerator.h" #include "cmGlobalGenerator.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmake.h" #include diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx index 99db478..af4eff9 100644 --- a/Source/cmDefinePropertyCommand.cxx +++ b/Source/cmDefinePropertyCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDefinePropertyCommand.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index d20e386..c4e86a9 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -11,6 +11,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceGroup.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 66433f9..ff822b8 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -3,6 +3,7 @@ #include "cmFindBase.h" #include "cmAlgorithms.h" +#include "cmState.h" #include "cmStateTypes.h" cmFindBase::cmFindBase() diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 2909209..5d8aaa2 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindLibraryCommand.h" +#include "cmState.h" #include cmFindLibraryCommand::cmFindLibraryCommand() diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 5723999..029d422 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -3,6 +3,7 @@ #include "cmFindPackageCommand.h" #include "cmAlgorithms.h" +#include "cmState.h" #include #include #include diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8324c30..7dae226 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -15,6 +15,7 @@ #include "cmPropertyMap.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index c44445a..da648d9 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -5,6 +5,7 @@ #include "cmGlobalGenerator.h" #include "cmPropertyDefinition.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmTargetPropertyComputer.h" #include "cmTest.h" diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx index 5a2150d..a0a33ea 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.cxx +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmake.h" cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator(cmake* cm) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index fd3734b..b4ede1d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -28,6 +28,7 @@ #include "cmPolicies.h" #include "cmQtAutoGeneratorInitializer.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index a846773..78bf5bd 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index 6d314d6..f17b915 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmake.h" #include diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index d5decfb..255c0f5 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" cmGlobalMinGWMakefileGenerator::cmGlobalMinGWMakefileGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index 48798fb..06aba73 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 635d07e..51cb315 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -8,6 +8,7 @@ #include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmUuid.h" #include "cmake.h" #include diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 45f7913..0782182 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -10,6 +10,7 @@ #include "cmLocalVisualStudioGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmTarget.h" #include diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index f97bb75..0900797 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -4,6 +4,7 @@ #include "cmDocumentationEntry.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index c8744d4..b1cd889 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -5,6 +5,7 @@ #include "cmListFileLexer.h" #include "cmMessenger.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 9af00b2..1a30f29 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -9,7 +9,6 @@ #include #include -#include "cmState.h" #include "cmStateSnapshot.h" /** \class cmListFileCache diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 8789530..cd9af54 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -12,6 +12,7 @@ #include "cmNinjaTargetGenerator.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 7eca0a8..cbbd2e6 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index cfe1e83..a249efd 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 4a8924f..68c166e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -20,6 +20,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index d5d3e90..3b71e34 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -17,6 +17,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 76fe047..514fbeb 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -16,6 +16,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 41bee8b..6339e11 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -2,6 +2,7 @@ #include "cmAlgorithms.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index b04c7ca..f0373a1 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -12,6 +12,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index ba24ff2..6f29b18 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -6,6 +6,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmProperty.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 2527366..e2ee3a5 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -13,6 +13,7 @@ #include "cmProperty.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmTargetPropertyComputer.h" #include "cmake.h" diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx index f55dc83..1c36dc6 100644 --- a/Source/cmTest.cxx +++ b/Source/cmTest.cxx @@ -4,6 +4,7 @@ #include "cmMakefile.h" #include "cmProperty.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 8f25cbb..c816114 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUtilitySourceCommand.h" +#include "cmState.h" + // cmUtilitySourceCommand bool cmUtilitySourceCommand::InitialPass(std::vector const& args, cmExecutionStatus&) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93b60614f97cb7cb0a181a10c2f56ae624f31448 commit 93b60614f97cb7cb0a181a10c2f56ae624f31448 Author: Stephen Kelly AuthorDate: Tue Oct 18 22:16:11 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:59 2016 +0200 cmTargetPropertyComputer: Add missing include diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index f8b683a..352d858 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -5,6 +5,7 @@ #include // IWYU pragma: keep +#include "cmAlgorithms.h" #include "cmListFileCache.h" #include "cmSystemTools.h" ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Thu Oct 20 00:01:09 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 20 Oct 2016 00:01:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-248-ge104391 Message-ID: <20161020040109.5E903F6CF6@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 e10439121e9602f77f80531dd60acc781fba5e79 (commit) from 0de6a404aafb497074980eba5144d243b6868d68 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e10439121e9602f77f80531dd60acc781fba5e79 commit e10439121e9602f77f80531dd60acc781fba5e79 Author: Kitware Robot AuthorDate: Thu Oct 20 00:01:03 2016 -0400 Commit: Kitware Robot CommitDate: Thu Oct 20 00:01:03 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index f68167c..223e473 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 7) -set(CMake_VERSION_PATCH 20161019) +set(CMake_VERSION_PATCH 20161020) #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 Thu Oct 20 08:23:13 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 08:23:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-617-g299c411 Message-ID: <20161020122313.4CA11F6A7F@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 299c411444e7c833adcf58248b30ebec56ff2f30 (commit) via 0ef81f9de3026aadafd68ab5b1b000bbfe57338e (commit) from 65c4caedf049d34effbadfae449c00974ebf11c2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=299c411444e7c833adcf58248b30ebec56ff2f30 commit 299c411444e7c833adcf58248b30ebec56ff2f30 Merge: 65c4cae 0ef81f9 Author: Brad King AuthorDate: Thu Oct 20 08:23:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 08:23:12 2016 -0400 Merge topic 'split-cmState' into next 0ef81f9d Add missing trailing newline https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ef81f9de3026aadafd68ab5b1b000bbfe57338e commit 0ef81f9de3026aadafd68ab5b1b000bbfe57338e Author: Brad King AuthorDate: Thu Oct 20 08:22:54 2016 -0400 Commit: Brad King CommitDate: Thu Oct 20 08:22:54 2016 -0400 Add missing trailing newline diff --git a/Source/cmStateDirectory.h b/Source/cmStateDirectory.h index 12f5083..17a89d8 100644 --- a/Source/cmStateDirectory.h +++ b/Source/cmStateDirectory.h @@ -79,4 +79,4 @@ private: friend class cmStateSnapshot; }; -#endif \ No newline at end of file +#endif ----------------------------------------------------------------------- Summary of changes: Source/cmStateDirectory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 20 08:23:39 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 08:23:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-621-g9745fcf Message-ID: <20161020122339.27F62F6ABA@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 9745fcfa79993a2524c2bb40c126d338cfa78899 (commit) via e6eecec761afd9c1b275d4adebfd08c2e96412fd (commit) via e3587ee01ddf834805e317c21dc87198f443c00e (commit) via e0a84904eb38e145c3a4d4e4ef5d7aceb3c2d196 (commit) from 299c411444e7c833adcf58248b30ebec56ff2f30 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9745fcfa79993a2524c2bb40c126d338cfa78899 commit 9745fcfa79993a2524c2bb40c126d338cfa78899 Merge: 299c411 e6eecec Author: Brad King AuthorDate: Thu Oct 20 08:23:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 08:23:37 2016 -0400 Merge topic 'split-cmState' into next e6eecec7 cmListFileCache: Remove cmState header include e3587ee0 cmTargetPropertyComputer: Add missing include e0a84904 cmState: Split auxiliary classes into separate files https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6eecec761afd9c1b275d4adebfd08c2e96412fd commit e6eecec761afd9c1b275d4adebfd08c2e96412fd Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:49 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:41:00 2016 +0200 cmListFileCache: Remove cmState header include Include it in dependents which have previously relied on it transitively. diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index e3adf6b..c305cbf 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -9,6 +9,7 @@ #include "cmDocumentationEntry.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTypeMacro.h" diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index fa816a6..7ee0f75 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -21,6 +21,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index a114755..d21471d 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -7,6 +7,7 @@ #include "cmCTestScriptHandler.h" #include "cmCurl.h" #include "cmGeneratedFileStream.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLParser.h" diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 09efafb..4e6f1e9 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -9,6 +9,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 5d29942..5539fbe 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -9,6 +9,7 @@ #include "cmCursesPathWidget.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index e8e70df..ebd35f3 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -11,6 +11,7 @@ #include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" #include "cmCursesWidget.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 3cde147..0777ef0 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddLibraryCommand.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index 36ffd7c..67581b6 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakePolicyCommand.h" +#include "cmState.h" #include "cmVersion.h" // cmCMakePolicyCommand diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 502a709..024260c 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -20,6 +20,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 3df7689..2d66344 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -6,6 +6,7 @@ #include "cmCommandArgumentLexer.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 16bbadb..28aa533 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -11,6 +11,7 @@ #include "cmOrderDirectories.h" #include "cmOutputConverter.h" #include "cmPolicies.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 70ed31e..cfebda2 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -10,6 +10,7 @@ #include "cmMakefile.h" #include "cmPolicies.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 420a777..4c0b649 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -4,6 +4,7 @@ #include "cmAlgorithms.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmSystemTools.h" static std::string const keyAND = "AND"; diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index e4a97a1..c7b6d58 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -6,6 +6,7 @@ #include "cmExportTryCompileFileGenerator.h" #include "cmGlobalGenerator.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmake.h" #include diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx index 99db478..af4eff9 100644 --- a/Source/cmDefinePropertyCommand.cxx +++ b/Source/cmDefinePropertyCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDefinePropertyCommand.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index d20e386..c4e86a9 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -11,6 +11,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceGroup.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 66433f9..ff822b8 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -3,6 +3,7 @@ #include "cmFindBase.h" #include "cmAlgorithms.h" +#include "cmState.h" #include "cmStateTypes.h" cmFindBase::cmFindBase() diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 2909209..5d8aaa2 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindLibraryCommand.h" +#include "cmState.h" #include cmFindLibraryCommand::cmFindLibraryCommand() diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 5723999..029d422 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -3,6 +3,7 @@ #include "cmFindPackageCommand.h" #include "cmAlgorithms.h" +#include "cmState.h" #include #include #include diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8324c30..7dae226 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -15,6 +15,7 @@ #include "cmPropertyMap.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index c44445a..da648d9 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -5,6 +5,7 @@ #include "cmGlobalGenerator.h" #include "cmPropertyDefinition.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmTargetPropertyComputer.h" #include "cmTest.h" diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx index 5a2150d..a0a33ea 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.cxx +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmake.h" cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator(cmake* cm) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index fd3734b..b4ede1d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -28,6 +28,7 @@ #include "cmPolicies.h" #include "cmQtAutoGeneratorInitializer.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmVersion.h" #include "cmake.h" diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index a846773..78bf5bd 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index 6d314d6..f17b915 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmake.h" #include diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index d5decfb..255c0f5 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" cmGlobalMinGWMakefileGenerator::cmGlobalMinGWMakefileGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index 48798fb..06aba73 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -4,6 +4,7 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" +#include "cmState.h" cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 635d07e..51cb315 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -8,6 +8,7 @@ #include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmUuid.h" #include "cmake.h" #include diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 45f7913..0782182 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -10,6 +10,7 @@ #include "cmLocalVisualStudioGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmTarget.h" #include diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index f97bb75..0900797 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -4,6 +4,7 @@ #include "cmDocumentationEntry.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index c8744d4..b1cd889 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -5,6 +5,7 @@ #include "cmListFileLexer.h" #include "cmMessenger.h" #include "cmOutputConverter.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 9af00b2..1a30f29 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -9,7 +9,6 @@ #include #include -#include "cmState.h" #include "cmStateSnapshot.h" /** \class cmListFileCache diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 8789530..cd9af54 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -12,6 +12,7 @@ #include "cmNinjaTargetGenerator.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 7eca0a8..cbbd2e6 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index cfe1e83..a249efd 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmOSXBundleGenerator.h" #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 4a8924f..68c166e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -20,6 +20,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index d5d3e90..3b71e34 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -17,6 +17,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 76fe047..514fbeb 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -16,6 +16,7 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 41bee8b..6339e11 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -2,6 +2,7 @@ #include "cmAlgorithms.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index b04c7ca..f0373a1 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -12,6 +12,7 @@ #include "cmOutputConverter.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index ba24ff2..6f29b18 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -6,6 +6,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmProperty.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 2527366..e2ee3a5 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -13,6 +13,7 @@ #include "cmProperty.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmTargetPropertyComputer.h" #include "cmake.h" diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx index f55dc83..1c36dc6 100644 --- a/Source/cmTest.cxx +++ b/Source/cmTest.cxx @@ -4,6 +4,7 @@ #include "cmMakefile.h" #include "cmProperty.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 8f25cbb..c816114 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUtilitySourceCommand.h" +#include "cmState.h" + // cmUtilitySourceCommand bool cmUtilitySourceCommand::InitialPass(std::vector const& args, cmExecutionStatus&) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3587ee01ddf834805e317c21dc87198f443c00e commit e3587ee01ddf834805e317c21dc87198f443c00e Author: Stephen Kelly AuthorDate: Tue Oct 18 22:16:11 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:59 2016 +0200 cmTargetPropertyComputer: Add missing include diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index f8b683a..352d858 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -5,6 +5,7 @@ #include // IWYU pragma: keep +#include "cmAlgorithms.h" #include "cmListFileCache.h" #include "cmSystemTools.h" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0a84904eb38e145c3a4d4e4ef5d7aceb3c2d196 commit e0a84904eb38e145c3a4d4e4ef5d7aceb3c2d196 Author: Stephen Kelly AuthorDate: Tue Oct 18 21:28:49 2016 +0200 Commit: Stephen Kelly CommitDate: Wed Oct 19 15:40:59 2016 +0200 cmState: Split auxiliary classes into separate files Port dependents to the new locations as needed. Leave behind a cmState.h include in cmListFileCache to reduce noise. It is removed in a following commit. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 3124f81..2b8c17c 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -360,6 +360,10 @@ set(SRCS cmSourceGroup.h cmState.cxx cmState.h + cmStateDirectory.cxx + cmStateDirectory.h + cmStateSnapshot.cxx + cmStateSnapshot.h cmStateTypes.h cmSystemTools.cxx cmSystemTools.h diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 4d900b6..95b95c1 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -17,6 +17,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt) diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index aaa9d3a..c8723d0 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -7,6 +7,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 959fe32..9cc6724 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -6,7 +6,8 @@ #include #include "cmExportSetMap.h" -#include "cmState.h" +#include "cmStateDirectory.h" +#include "cmStateSnapshot.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 3433d75..17d49e8 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -12,6 +12,8 @@ #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetDepend.h" diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index f6d5e70..c271246 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -5,6 +5,7 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" #include "cmOutputConverter.h" +#include "cmStateDirectory.h" cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, cmStateDirectory stateDir) diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index 59e7357..6bbb69e 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -4,7 +4,7 @@ #ifndef cmLinkLineComputer_h #define cmLinkLineComputer_h -#include "cmState.h" +#include "cmStateDirectory.h" class cmComputeLinkInformation; class cmOutputConverter; diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 83aac51..9af00b2 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -10,6 +10,7 @@ #include #include "cmState.h" +#include "cmStateSnapshot.h" /** \class cmListFileCache * \brief A class to cache list file contents. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index d90094b..4aecb1d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -16,6 +16,8 @@ #include "cmMakefile.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTestGenerator.h" diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index eda604d..4f81ef1 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -16,6 +16,8 @@ #include "cmOutputConverter.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 28912c3..00c0e82 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -17,6 +17,8 @@ #include "cmListFileCache.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTest.h" diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 8ac0e33..b61e81b 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -9,7 +9,7 @@ #include "cmListFileCache.h" #include "cmNewLineStyle.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateSnapshot.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" #include "cmake.h" diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index c219fdf..445ad0b 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -3,6 +3,8 @@ #include "cmOutputConverter.h" #include "cmAlgorithms.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 2a81dab..dabb091 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -5,7 +5,7 @@ #include // IWYU pragma: keep -#include "cmState.h" +#include "cmStateSnapshot.h" #include #include diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index dca0f69..f56f575 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -7,6 +7,8 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmState.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 32fe66c..0d1eb3e 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmState.h" +#include "cmStatePrivate.h" + #include "cmAlgorithms.h" #include "cmCacheManager.h" #include "cmCommand.h" @@ -9,7 +11,6 @@ #include "cmListFileCache.h" #include "cmSystemTools.h" #include "cmTypeMacro.h" -#include "cmVersion.h" #include "cmake.h" #include @@ -20,85 +21,6 @@ #include #include -static std::string const kBINARY_DIR = "BINARY_DIR"; -static std::string const kBUILDSYSTEM_TARGETS = "BUILDSYSTEM_TARGETS"; -static std::string const kSOURCE_DIR = "SOURCE_DIR"; -static std::string const kSUBDIRECTORIES = "SUBDIRECTORIES"; - -struct cmStateDetail::SnapshotDataType -{ - cmStateDetail::PositionType ScopeParent; - cmStateDetail::PositionType DirectoryParent; - cmLinkedTree::iterator Policies; - cmLinkedTree::iterator PolicyRoot; - cmLinkedTree::iterator PolicyScope; - cmStateEnums::SnapshotType SnapshotType; - bool Keep; - cmLinkedTree::iterator ExecutionListFile; - cmLinkedTree::iterator - BuildSystemDirectory; - cmLinkedTree::iterator Vars; - cmLinkedTree::iterator Root; - cmLinkedTree::iterator Parent; - std::vector::size_type IncludeDirectoryPosition; - std::vector::size_type CompileDefinitionsPosition; - std::vector::size_type CompileOptionsPosition; -}; - -struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap -{ - typedef cmPolicies::PolicyMap derived; - PolicyStackEntry(bool w = false) - : derived() - , Weak(w) - { - } - PolicyStackEntry(derived const& d, bool w) - : derived(d) - , Weak(w) - { - } - PolicyStackEntry(PolicyStackEntry const& r) - : derived(r) - , Weak(r.Weak) - { - } - bool Weak; -}; - -struct cmStateDetail::BuildsystemDirectoryStateType -{ - cmStateDetail::PositionType DirectoryEnd; - - std::string Location; - std::string OutputLocation; - - // The top-most directories for relative path conversion. Both the - // source and destination location of a relative path conversion - // must be underneath one of these directories (both under source or - // both under binary) in order for the relative path to be evaluated - // safely by the build tools. - std::string RelativePathTopSource; - std::string RelativePathTopBinary; - - std::vector IncludeDirectories; - std::vector IncludeDirectoryBacktraces; - - std::vector CompileDefinitions; - std::vector CompileDefinitionsBacktraces; - - std::vector CompileOptions; - std::vector CompileOptionsBacktraces; - - std::vector NormalTargetNames; - - std::string ProjectName; - - cmPropertyMap Properties; - - std::vector Children; -}; - cmState::cmState() : IsInTryCompile(false) , WindowsShell(false) @@ -676,70 +598,6 @@ const char* cmState::GetBinaryDirectory() const return this->BinaryDirectory.c_str(); } -void cmStateDirectory::ComputeRelativePathTopSource() -{ - // Relative path conversion inside the source tree is not used to - // construct relative paths passed to build tools so it is safe to use - // even when the source is a network path. - - cmStateSnapshot snapshot = this->Snapshot_; - std::vector snapshots; - snapshots.push_back(snapshot); - while (true) { - snapshot = snapshot.GetBuildsystemDirectoryParent(); - if (snapshot.IsValid()) { - snapshots.push_back(snapshot); - } else { - break; - } - } - - std::string result = snapshots.front().GetDirectory().GetCurrentSource(); - - for (std::vector::const_iterator it = snapshots.begin() + 1; - it != snapshots.end(); ++it) { - std::string currentSource = it->GetDirectory().GetCurrentSource(); - if (cmSystemTools::IsSubDirectory(result, currentSource)) { - result = currentSource; - } - } - this->DirectoryState->RelativePathTopSource = result; -} - -void cmStateDirectory::ComputeRelativePathTopBinary() -{ - cmStateSnapshot snapshot = this->Snapshot_; - std::vector snapshots; - snapshots.push_back(snapshot); - while (true) { - snapshot = snapshot.GetBuildsystemDirectoryParent(); - if (snapshot.IsValid()) { - snapshots.push_back(snapshot); - } else { - break; - } - } - - std::string result = snapshots.front().GetDirectory().GetCurrentBinary(); - - for (std::vector::const_iterator it = snapshots.begin() + 1; - it != snapshots.end(); ++it) { - std::string currentBinary = it->GetDirectory().GetCurrentBinary(); - if (cmSystemTools::IsSubDirectory(result, currentBinary)) { - result = currentBinary; - } - } - - // The current working directory on Windows cannot be a network - // path. Therefore relative paths cannot work when the binary tree - // is a network path. - if (result.size() < 2 || result.substr(0, 2) != "//") { - this->DirectoryState->RelativePathTopBinary = result; - } else { - this->DirectoryState->RelativePathTopBinary = ""; - } -} - cmStateSnapshot cmState::CreateBaseSnapshot() { cmStateDetail::PositionType pos = @@ -923,854 +781,6 @@ cmStateSnapshot cmState::Pop(cmStateSnapshot originSnapshot) return cmStateSnapshot(this, prevPos); } -cmStateSnapshot::cmStateSnapshot(cmState* state) - : State(state) - , Position() -{ -} - -std::vector cmStateSnapshot::GetChildren() -{ - return this->Position->BuildSystemDirectory->Children; -} - -cmStateSnapshot::cmStateSnapshot(cmState* state, - cmStateDetail::PositionType position) - : State(state) - , Position(position) -{ -} - -cmStateEnums::SnapshotType cmStateSnapshot::GetType() const -{ - return this->Position->SnapshotType; -} - -const char* cmStateDirectory::GetCurrentSource() const -{ - return this->DirectoryState->Location.c_str(); -} - -void cmStateDirectory::SetCurrentSource(std::string const& dir) -{ - std::string& loc = this->DirectoryState->Location; - loc = dir; - cmSystemTools::ConvertToUnixSlashes(loc); - loc = cmSystemTools::CollapseFullPath(loc); - - this->ComputeRelativePathTopSource(); - - this->Snapshot_.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", loc); -} - -const char* cmStateDirectory::GetCurrentBinary() const -{ - return this->DirectoryState->OutputLocation.c_str(); -} - -void cmStateDirectory::SetCurrentBinary(std::string const& dir) -{ - std::string& loc = this->DirectoryState->OutputLocation; - loc = dir; - cmSystemTools::ConvertToUnixSlashes(loc); - loc = cmSystemTools::CollapseFullPath(loc); - - this->ComputeRelativePathTopBinary(); - - this->Snapshot_.SetDefinition("CMAKE_CURRENT_BINARY_DIR", loc); -} - -void cmStateSnapshot::SetListFile(const std::string& listfile) -{ - *this->Position->ExecutionListFile = listfile; -} - -const char* cmStateDirectory::GetRelativePathTopSource() const -{ - return this->DirectoryState->RelativePathTopSource.c_str(); -} - -const char* cmStateDirectory::GetRelativePathTopBinary() const -{ - return this->DirectoryState->RelativePathTopBinary.c_str(); -} - -void cmStateDirectory::SetRelativePathTopSource(const char* dir) -{ - this->DirectoryState->RelativePathTopSource = dir; -} - -void cmStateDirectory::SetRelativePathTopBinary(const char* dir) -{ - this->DirectoryState->RelativePathTopBinary = dir; -} - -std::string cmStateSnapshot::GetExecutionListFile() const -{ - return *this->Position->ExecutionListFile; -} - -bool cmStateSnapshot::IsValid() const -{ - return this->State && this->Position.IsValid() - ? this->Position != this->State->SnapshotData.Root() - : false; -} - -cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const -{ - cmStateSnapshot snapshot; - if (!this->State || this->Position == this->State->SnapshotData.Root()) { - return snapshot; - } - cmStateDetail::PositionType parentPos = this->Position->DirectoryParent; - if (parentPos != this->State->SnapshotData.Root()) { - snapshot = cmStateSnapshot(this->State, - parentPos->BuildSystemDirectory->DirectoryEnd); - } - - return snapshot; -} - -cmStateSnapshot cmStateSnapshot::GetCallStackParent() const -{ - assert(this->State); - assert(this->Position != this->State->SnapshotData.Root()); - - cmStateSnapshot snapshot; - cmStateDetail::PositionType parentPos = this->Position; - while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || - parentPos->SnapshotType == cmStateEnums::VariableScopeType) { - ++parentPos; - } - if (parentPos->SnapshotType == cmStateEnums::BuildsystemDirectoryType || - parentPos->SnapshotType == cmStateEnums::BaseType) { - return snapshot; - } - - ++parentPos; - while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || - parentPos->SnapshotType == cmStateEnums::VariableScopeType) { - ++parentPos; - } - - if (parentPos == this->State->SnapshotData.Root()) { - return snapshot; - } - - snapshot = cmStateSnapshot(this->State, parentPos); - return snapshot; -} - -cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const -{ - assert(this->State); - assert(this->Position != this->State->SnapshotData.Root()); - - cmStateDetail::PositionType pos = this->Position; - while (pos->SnapshotType != cmStateEnums::BaseType && - pos->SnapshotType != cmStateEnums::BuildsystemDirectoryType && - pos != this->State->SnapshotData.Root()) { - ++pos; - } - return cmStateSnapshot(this->State, pos); -} - -void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) -{ - cmStateDetail::PositionType pos = this->Position; - pos->Policies = this->State->PolicyStack.Push( - pos->Policies, cmStateDetail::PolicyStackEntry(entry, weak)); -} - -bool cmStateSnapshot::PopPolicy() -{ - cmStateDetail::PositionType pos = this->Position; - if (pos->Policies == pos->PolicyScope) { - return false; - } - pos->Policies = this->State->PolicyStack.Pop(pos->Policies); - return true; -} - -bool cmStateSnapshot::CanPopPolicyScope() -{ - return this->Position->Policies == this->Position->PolicyScope; -} - -void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id, - cmPolicies::PolicyStatus status) -{ - // Update the policy stack from the top to the top-most strong entry. - bool previous_was_weak = true; - for (cmLinkedTree::iterator psi = - this->Position->Policies; - previous_was_weak && psi != this->Position->PolicyRoot; ++psi) { - psi->Set(id, status); - previous_was_weak = psi->Weak; - } -} - -cmPolicies::PolicyStatus cmStateSnapshot::GetPolicy( - cmPolicies::PolicyID id) const -{ - cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id); - - if (status == cmPolicies::REQUIRED_ALWAYS || - status == cmPolicies::REQUIRED_IF_USED) { - return status; - } - - cmLinkedTree::iterator dir = - this->Position->BuildSystemDirectory; - - while (true) { - assert(dir.IsValid()); - cmLinkedTree::iterator leaf = - dir->DirectoryEnd->Policies; - cmLinkedTree::iterator root = - dir->DirectoryEnd->PolicyRoot; - for (; leaf != root; ++leaf) { - if (leaf->IsDefined(id)) { - status = leaf->Get(id); - return status; - } - } - cmStateDetail::PositionType e = dir->DirectoryEnd; - cmStateDetail::PositionType p = e->DirectoryParent; - if (p == this->State->SnapshotData.Root()) { - break; - } - dir = p->BuildSystemDirectory; - } - return status; -} - -bool cmStateSnapshot::HasDefinedPolicyCMP0011() -{ - return !this->Position->Policies->IsEmpty(); -} - -const char* cmStateSnapshot::GetDefinition(std::string const& name) const -{ - assert(this->Position->Vars.IsValid()); - return cmDefinitions::Get(name, this->Position->Vars, this->Position->Root); -} - -bool cmStateSnapshot::IsInitialized(std::string const& name) const -{ - return cmDefinitions::HasKey(name, this->Position->Vars, - this->Position->Root); -} - -void cmStateSnapshot::SetDefinition(std::string const& name, - std::string const& value) -{ - this->Position->Vars->Set(name, value.c_str()); -} - -void cmStateSnapshot::RemoveDefinition(std::string const& name) -{ - this->Position->Vars->Set(name, CM_NULLPTR); -} - -std::vector cmStateSnapshot::UnusedKeys() const -{ - return this->Position->Vars->UnusedKeys(); -} - -std::vector cmStateSnapshot::ClosureKeys() const -{ - return cmDefinitions::ClosureKeys(this->Position->Vars, - this->Position->Root); -} - -bool cmStateSnapshot::RaiseScope(std::string const& var, const char* varDef) -{ - if (this->Position->ScopeParent == this->Position->DirectoryParent) { - cmStateSnapshot parentDir = this->GetBuildsystemDirectoryParent(); - if (!parentDir.IsValid()) { - return false; - } - // Update the definition in the parent directory top scope. This - // directory's scope was initialized by the closure of the parent - // scope, so we do not need to localize the definition first. - if (varDef) { - parentDir.SetDefinition(var, varDef); - } else { - parentDir.RemoveDefinition(var); - } - return true; - } - // First localize the definition in the current scope. - cmDefinitions::Raise(var, this->Position->Vars, this->Position->Root); - - // Now update the definition in the parent scope. - this->Position->Parent->Set(var, varDef); - return true; -} - -static const std::string cmPropertySentinal = std::string(); - -template -void InitializeContentFromParent(T& parentContent, T& thisContent, - U& parentBacktraces, U& thisBacktraces, - V& contentEndPosition) -{ - std::vector::const_iterator parentBegin = parentContent.begin(); - std::vector::const_iterator parentEnd = parentContent.end(); - - std::vector::const_reverse_iterator parentRbegin = - cmMakeReverseIterator(parentEnd); - std::vector::const_reverse_iterator parentRend = - parentContent.rend(); - parentRbegin = std::find(parentRbegin, parentRend, cmPropertySentinal); - std::vector::const_iterator parentIt = parentRbegin.base(); - - thisContent = std::vector(parentIt, parentEnd); - - std::vector::const_iterator btIt = - parentBacktraces.begin() + std::distance(parentBegin, parentIt); - std::vector::const_iterator btEnd = - parentBacktraces.end(); - - thisBacktraces = std::vector(btIt, btEnd); - - contentEndPosition = thisContent.size(); -} - -void cmStateSnapshot::SetDefaultDefinitions() -{ -/* Up to CMake 2.4 here only WIN32, UNIX and APPLE were set. - With CMake must separate between target and host platform. In most cases - the tests for WIN32, UNIX and APPLE will be for the target system, so an - additional set of variables for the host system is required -> - CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE. - WIN32, UNIX and APPLE are now set in the platform files in - Modules/Platforms/. - To keep cmake scripts (-P) and custom language and compiler modules - working, these variables are still also set here in this place, but they - will be reset in CMakeSystemSpecificInformation.cmake before the platform - files are executed. */ -#if defined(_WIN32) - this->SetDefinition("WIN32", "1"); - this->SetDefinition("CMAKE_HOST_WIN32", "1"); -#else - this->SetDefinition("UNIX", "1"); - this->SetDefinition("CMAKE_HOST_UNIX", "1"); -#endif -#if defined(__CYGWIN__) - std::string legacy; - if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) && - cmSystemTools::IsOn(legacy.c_str())) { - this->SetDefinition("WIN32", "1"); - this->SetDefinition("CMAKE_HOST_WIN32", "1"); - } -#endif -#if defined(__APPLE__) - this->SetDefinition("APPLE", "1"); - this->SetDefinition("CMAKE_HOST_APPLE", "1"); -#endif -#if defined(__sun__) - this->SetDefinition("CMAKE_HOST_SOLARIS", "1"); -#endif - - char temp[1024]; - sprintf(temp, "%d", cmVersion::GetMinorVersion()); - this->SetDefinition("CMAKE_MINOR_VERSION", temp); - sprintf(temp, "%d", cmVersion::GetMajorVersion()); - this->SetDefinition("CMAKE_MAJOR_VERSION", temp); - sprintf(temp, "%d", cmVersion::GetPatchVersion()); - this->SetDefinition("CMAKE_PATCH_VERSION", temp); - sprintf(temp, "%d", cmVersion::GetTweakVersion()); - this->SetDefinition("CMAKE_TWEAK_VERSION", temp); - this->SetDefinition("CMAKE_VERSION", cmVersion::GetCMakeVersion()); - - this->SetDefinition("CMAKE_FILES_DIRECTORY", - cmake::GetCMakeFilesDirectory()); - - // Setup the default include file regular expression (match everything). - this->Position->BuildSystemDirectory->Properties.SetProperty( - "INCLUDE_REGULAR_EXPRESSION", "^.*$"); -} - -void cmStateSnapshot::SetDirectoryDefinitions() -{ - this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); - this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", - this->State->GetSourceDirectory()); - this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); - this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", - this->State->GetBinaryDirectory()); -} - -void cmStateSnapshot::InitializeFromParent() -{ - cmStateDetail::PositionType parent = this->Position->DirectoryParent; - assert(this->Position->Vars.IsValid()); - assert(parent->Vars.IsValid()); - - *this->Position->Vars = - cmDefinitions::MakeClosure(parent->Vars, parent->Root); - - InitializeContentFromParent( - parent->BuildSystemDirectory->IncludeDirectories, - this->Position->BuildSystemDirectory->IncludeDirectories, - parent->BuildSystemDirectory->IncludeDirectoryBacktraces, - this->Position->BuildSystemDirectory->IncludeDirectoryBacktraces, - this->Position->IncludeDirectoryPosition); - - InitializeContentFromParent( - parent->BuildSystemDirectory->CompileDefinitions, - this->Position->BuildSystemDirectory->CompileDefinitions, - parent->BuildSystemDirectory->CompileDefinitionsBacktraces, - this->Position->BuildSystemDirectory->CompileDefinitionsBacktraces, - this->Position->CompileDefinitionsPosition); - - InitializeContentFromParent( - parent->BuildSystemDirectory->CompileOptions, - this->Position->BuildSystemDirectory->CompileOptions, - parent->BuildSystemDirectory->CompileOptionsBacktraces, - this->Position->BuildSystemDirectory->CompileOptionsBacktraces, - this->Position->CompileOptionsPosition); -} - -cmState* cmStateSnapshot::GetState() const -{ - return this->State; -} - -cmStateDirectory cmStateSnapshot::GetDirectory() const -{ - return cmStateDirectory(this->Position->BuildSystemDirectory, *this); -} - -void cmStateSnapshot::SetProjectName(const std::string& name) -{ - this->Position->BuildSystemDirectory->ProjectName = name; -} - -std::string cmStateSnapshot::GetProjectName() const -{ - return this->Position->BuildSystemDirectory->ProjectName; -} - -void cmStateSnapshot::InitializeFromParent_ForSubdirsCommand() -{ - std::string currentSrcDir = this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR"); - std::string currentBinDir = this->GetDefinition("CMAKE_CURRENT_BINARY_DIR"); - this->InitializeFromParent(); - this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); - this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); - - this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", currentSrcDir); - this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", currentBinDir); -} - -cmStateDirectory::cmStateDirectory( - cmLinkedTree::iterator iter, - const cmStateSnapshot& snapshot) - : DirectoryState(iter) - , Snapshot_(snapshot) -{ -} - -template -cmStringRange GetPropertyContent(T const& content, U contentEndPosition) -{ - std::vector::const_iterator end = - content.begin() + contentEndPosition; - - std::vector::const_reverse_iterator rbegin = - cmMakeReverseIterator(end); - rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); - - return cmMakeRange(rbegin.base(), end); -} - -template -cmBacktraceRange GetPropertyBacktraces(T const& content, U const& backtraces, - V contentEndPosition) -{ - std::vector::const_iterator entryEnd = - content.begin() + contentEndPosition; - - std::vector::const_reverse_iterator rbegin = - cmMakeReverseIterator(entryEnd); - rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); - - std::vector::const_iterator it = - backtraces.begin() + std::distance(content.begin(), rbegin.base()); - - std::vector::const_iterator end = backtraces.end(); - return cmMakeRange(it, end); -} - -template -void AppendEntry(T& content, U& backtraces, V& endContentPosition, - const std::string& value, const cmListFileBacktrace& lfbt) -{ - if (value.empty()) { - return; - } - - assert(endContentPosition == content.size()); - - content.push_back(value); - backtraces.push_back(lfbt); - - endContentPosition = content.size(); -} - -template -void SetContent(T& content, U& backtraces, V& endContentPosition, - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - assert(endContentPosition == content.size()); - - content.resize(content.size() + 2); - backtraces.resize(backtraces.size() + 2); - - content.back() = vec; - backtraces.back() = lfbt; - - endContentPosition = content.size(); -} - -template -void ClearContent(T& content, U& backtraces, V& endContentPosition) -{ - assert(endContentPosition == content.size()); - - content.resize(content.size() + 1); - backtraces.resize(backtraces.size() + 1); - - endContentPosition = content.size(); -} - -cmStringRange cmStateDirectory::GetIncludeDirectoriesEntries() const -{ - return GetPropertyContent( - this->DirectoryState->IncludeDirectories, - this->Snapshot_.Position->IncludeDirectoryPosition); -} - -cmBacktraceRange cmStateDirectory::GetIncludeDirectoriesEntryBacktraces() const -{ - return GetPropertyBacktraces( - this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition); -} - -void cmStateDirectory::AppendIncludeDirectoriesEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - AppendEntry(this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); -} - -void cmStateDirectory::PrependIncludeDirectoriesEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - std::vector::iterator entryEnd = - this->DirectoryState->IncludeDirectories.begin() + - this->Snapshot_.Position->IncludeDirectoryPosition; - - std::vector::reverse_iterator rend = - this->DirectoryState->IncludeDirectories.rend(); - std::vector::reverse_iterator rbegin = - cmMakeReverseIterator(entryEnd); - rbegin = std::find(rbegin, rend, cmPropertySentinal); - - std::vector::iterator entryIt = rbegin.base(); - std::vector::iterator entryBegin = - this->DirectoryState->IncludeDirectories.begin(); - - std::vector::iterator btIt = - this->DirectoryState->IncludeDirectoryBacktraces.begin() + - std::distance(entryBegin, entryIt); - - this->DirectoryState->IncludeDirectories.insert(entryIt, vec); - this->DirectoryState->IncludeDirectoryBacktraces.insert(btIt, lfbt); - - this->Snapshot_.Position->IncludeDirectoryPosition = - this->DirectoryState->IncludeDirectories.size(); -} - -void cmStateDirectory::SetIncludeDirectories(const std::string& vec, - const cmListFileBacktrace& lfbt) -{ - SetContent(this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); -} - -void cmStateDirectory::ClearIncludeDirectories() -{ - ClearContent(this->DirectoryState->IncludeDirectories, - this->DirectoryState->IncludeDirectoryBacktraces, - this->Snapshot_.Position->IncludeDirectoryPosition); -} - -cmStringRange cmStateDirectory::GetCompileDefinitionsEntries() const -{ - return GetPropertyContent( - this->DirectoryState->CompileDefinitions, - this->Snapshot_.Position->CompileDefinitionsPosition); -} - -cmBacktraceRange cmStateDirectory::GetCompileDefinitionsEntryBacktraces() const -{ - return GetPropertyBacktraces( - this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition); -} - -void cmStateDirectory::AppendCompileDefinitionsEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - AppendEntry(this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); -} - -void cmStateDirectory::SetCompileDefinitions(const std::string& vec, - const cmListFileBacktrace& lfbt) -{ - SetContent(this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); -} - -void cmStateDirectory::ClearCompileDefinitions() -{ - ClearContent(this->DirectoryState->CompileDefinitions, - this->DirectoryState->CompileDefinitionsBacktraces, - this->Snapshot_.Position->CompileDefinitionsPosition); -} - -cmStringRange cmStateDirectory::GetCompileOptionsEntries() const -{ - return GetPropertyContent(this->DirectoryState->CompileOptions, - this->Snapshot_.Position->CompileOptionsPosition); -} - -cmBacktraceRange cmStateDirectory::GetCompileOptionsEntryBacktraces() const -{ - return GetPropertyBacktraces( - this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition); -} - -void cmStateDirectory::AppendCompileOptionsEntry( - const std::string& vec, const cmListFileBacktrace& lfbt) -{ - AppendEntry(this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); -} - -void cmStateDirectory::SetCompileOptions(const std::string& vec, - const cmListFileBacktrace& lfbt) -{ - SetContent(this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); -} - -void cmStateDirectory::ClearCompileOptions() -{ - ClearContent(this->DirectoryState->CompileOptions, - this->DirectoryState->CompileOptionsBacktraces, - this->Snapshot_.Position->CompileOptionsPosition); -} - -bool cmStateSnapshot::StrictWeakOrder::operator()( - const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) const -{ - return lhs.Position.StrictWeakOrdered(rhs.Position); -} - -void cmStateDirectory::SetProperty(const std::string& prop, const char* value, - cmListFileBacktrace const& lfbt) -{ - if (prop == "INCLUDE_DIRECTORIES") { - if (!value) { - this->ClearIncludeDirectories(); - return; - } - this->SetIncludeDirectories(value, lfbt); - return; - } - if (prop == "COMPILE_OPTIONS") { - if (!value) { - this->ClearCompileOptions(); - return; - } - this->SetCompileOptions(value, lfbt); - return; - } - if (prop == "COMPILE_DEFINITIONS") { - if (!value) { - this->ClearCompileDefinitions(); - return; - } - this->SetCompileDefinitions(value, lfbt); - return; - } - - this->DirectoryState->Properties.SetProperty(prop, value); -} - -void cmStateDirectory::AppendProperty(const std::string& prop, - const char* value, bool asString, - cmListFileBacktrace const& lfbt) -{ - if (prop == "INCLUDE_DIRECTORIES") { - this->AppendIncludeDirectoriesEntry(value, lfbt); - return; - } - if (prop == "COMPILE_OPTIONS") { - this->AppendCompileOptionsEntry(value, lfbt); - return; - } - if (prop == "COMPILE_DEFINITIONS") { - this->AppendCompileDefinitionsEntry(value, lfbt); - return; - } - - this->DirectoryState->Properties.AppendProperty(prop, value, asString); -} - -const char* cmStateDirectory::GetProperty(const std::string& prop) const -{ - const bool chain = - this->Snapshot_.State->IsPropertyChained(prop, cmProperty::DIRECTORY); - return this->GetProperty(prop, chain); -} - -const char* cmStateDirectory::GetProperty(const std::string& prop, - bool chain) const -{ - static std::string output; - output = ""; - if (prop == "PARENT_DIRECTORY") { - cmStateSnapshot parent = this->Snapshot_.GetBuildsystemDirectoryParent(); - if (parent.IsValid()) { - return parent.GetDirectory().GetCurrentSource(); - } - return ""; - } - if (prop == kBINARY_DIR) { - output = this->GetCurrentBinary(); - return output.c_str(); - } - if (prop == kSOURCE_DIR) { - output = this->GetCurrentSource(); - return output.c_str(); - } - if (prop == kSUBDIRECTORIES) { - std::vector child_dirs; - std::vector const& children = - this->DirectoryState->Children; - for (std::vector::const_iterator ci = children.begin(); - ci != children.end(); ++ci) { - child_dirs.push_back(ci->GetDirectory().GetCurrentSource()); - } - output = cmJoin(child_dirs, ";"); - return output.c_str(); - } - if (prop == kBUILDSYSTEM_TARGETS) { - output = cmJoin(this->DirectoryState->NormalTargetNames, ";"); - return output.c_str(); - } - - if (prop == "LISTFILE_STACK") { - std::vector listFiles; - cmStateSnapshot snp = this->Snapshot_; - while (snp.IsValid()) { - listFiles.push_back(snp.GetExecutionListFile()); - snp = snp.GetCallStackParent(); - } - std::reverse(listFiles.begin(), listFiles.end()); - output = cmJoin(listFiles, ";"); - return output.c_str(); - } - if (prop == "CACHE_VARIABLES") { - output = cmJoin(this->Snapshot_.State->GetCacheEntryKeys(), ";"); - return output.c_str(); - } - if (prop == "VARIABLES") { - std::vector res = this->Snapshot_.ClosureKeys(); - std::vector cacheKeys = - this->Snapshot_.State->GetCacheEntryKeys(); - res.insert(res.end(), cacheKeys.begin(), cacheKeys.end()); - std::sort(res.begin(), res.end()); - output = cmJoin(res, ";"); - return output.c_str(); - } - if (prop == "INCLUDE_DIRECTORIES") { - output = cmJoin(this->GetIncludeDirectoriesEntries(), ";"); - return output.c_str(); - } - if (prop == "COMPILE_OPTIONS") { - output = cmJoin(this->GetCompileOptionsEntries(), ";"); - return output.c_str(); - } - if (prop == "COMPILE_DEFINITIONS") { - output = cmJoin(this->GetCompileDefinitionsEntries(), ";"); - return output.c_str(); - } - - const char* retVal = this->DirectoryState->Properties.GetPropertyValue(prop); - if (!retVal && chain) { - cmStateSnapshot parentSnapshot = - this->Snapshot_.GetBuildsystemDirectoryParent(); - if (parentSnapshot.IsValid()) { - return parentSnapshot.GetDirectory().GetProperty(prop, chain); - } - return this->Snapshot_.State->GetGlobalProperty(prop); - } - - return retVal; -} - -bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const -{ - return cmSystemTools::IsOn(this->GetProperty(prop)); -} - -std::vector cmStateDirectory::GetPropertyKeys() const -{ - std::vector keys; - keys.reserve(this->DirectoryState->Properties.size()); - for (cmPropertyMap::const_iterator it = - this->DirectoryState->Properties.begin(); - it != this->DirectoryState->Properties.end(); ++it) { - keys.push_back(it->first); - } - return keys; -} - -void cmStateDirectory::AddNormalTargetName(std::string const& name) -{ - this->DirectoryState->NormalTargetNames.push_back(name); -} - -bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) -{ - return lhs.Position == rhs.Position; -} - -bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) -{ - return lhs.Position != rhs.Position; -} - static bool ParseEntryWithoutType(const std::string& entry, std::string& var, std::string& value) { diff --git a/Source/cmState.h b/Source/cmState.h index 938c90b..6d74815 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -8,7 +8,6 @@ #include "cmAlgorithms.h" #include "cmDefinitions.h" #include "cmLinkedTree.h" -#include "cmPolicies.h" #include "cmProperty.h" #include "cmPropertyDefinitionMap.h" #include "cmPropertyMap.h" @@ -186,138 +185,4 @@ private: bool MSYSShell; }; -class cmStateSnapshot -{ -public: - cmStateSnapshot(cmState* state = CM_NULLPTR); - cmStateSnapshot(cmState* state, cmStateDetail::PositionType position); - - const char* GetDefinition(std::string const& name) const; - bool IsInitialized(std::string const& name) const; - void SetDefinition(std::string const& name, std::string const& value); - void RemoveDefinition(std::string const& name); - std::vector UnusedKeys() const; - std::vector ClosureKeys() const; - bool RaiseScope(std::string const& var, const char* varDef); - - void SetListFile(std::string const& listfile); - - std::string GetExecutionListFile() const; - - std::vector GetChildren(); - - bool IsValid() const; - cmStateSnapshot GetBuildsystemDirectoryParent() const; - cmStateSnapshot GetCallStackParent() const; - cmStateSnapshot GetCallStackBottom() const; - cmStateEnums::SnapshotType GetType() const; - - void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); - cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; - bool HasDefinedPolicyCMP0011(); - void PushPolicy(cmPolicies::PolicyMap entry, bool weak); - bool PopPolicy(); - bool CanPopPolicyScope(); - - cmState* GetState() const; - - cmStateDirectory GetDirectory() const; - - void SetProjectName(std::string const& name); - std::string GetProjectName() const; - - void InitializeFromParent_ForSubdirsCommand(); - - struct StrictWeakOrder - { - bool operator()(const cmStateSnapshot& lhs, - const cmStateSnapshot& rhs) const; - }; - - void SetDirectoryDefinitions(); - void SetDefaultDefinitions(); - -private: - friend bool operator==(const cmStateSnapshot& lhs, - const cmStateSnapshot& rhs); - friend bool operator!=(const cmStateSnapshot& lhs, - const cmStateSnapshot& rhs); - friend class cmState; - friend class cmStateDirectory; - friend struct StrictWeakOrder; - - void InitializeFromParent(); - - cmState* State; - cmStateDetail::PositionType Position; -}; - -class cmStateDirectory -{ - cmStateDirectory( - cmLinkedTree::iterator iter, - cmStateSnapshot const& snapshot); - -public: - const char* GetCurrentSource() const; - void SetCurrentSource(std::string const& dir); - const char* GetCurrentBinary() const; - void SetCurrentBinary(std::string const& dir); - - const char* GetRelativePathTopSource() const; - const char* GetRelativePathTopBinary() const; - void SetRelativePathTopSource(const char* dir); - void SetRelativePathTopBinary(const char* dir); - - cmStringRange GetIncludeDirectoriesEntries() const; - cmBacktraceRange GetIncludeDirectoriesEntryBacktraces() const; - void AppendIncludeDirectoriesEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void PrependIncludeDirectoriesEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetIncludeDirectories(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearIncludeDirectories(); - - cmStringRange GetCompileDefinitionsEntries() const; - cmBacktraceRange GetCompileDefinitionsEntryBacktraces() const; - void AppendCompileDefinitionsEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetCompileDefinitions(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearCompileDefinitions(); - - cmStringRange GetCompileOptionsEntries() const; - cmBacktraceRange GetCompileOptionsEntryBacktraces() const; - void AppendCompileOptionsEntry(std::string const& vec, - cmListFileBacktrace const& lfbt); - void SetCompileOptions(std::string const& vec, - cmListFileBacktrace const& lfbt); - void ClearCompileOptions(); - - void SetProperty(const std::string& prop, const char* value, - cmListFileBacktrace const& lfbt); - void AppendProperty(const std::string& prop, const char* value, - bool asString, cmListFileBacktrace const& lfbt); - const char* GetProperty(const std::string& prop) const; - const char* GetProperty(const std::string& prop, bool chain) const; - bool GetPropertyAsBool(const std::string& prop) const; - std::vector GetPropertyKeys() const; - - void AddNormalTargetName(std::string const& name); - -private: - void ComputeRelativePathTopSource(); - void ComputeRelativePathTopBinary(); - -private: - cmLinkedTree::iterator - DirectoryState; - cmStateSnapshot Snapshot_; - friend class cmStateSnapshot; -}; - -bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); -bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); - #endif diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx new file mode 100644 index 0000000..01e1e7e --- /dev/null +++ b/Source/cmStateDirectory.cxx @@ -0,0 +1,518 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmStateDirectory.h" +#include "cmState.h" +#include "cmStatePrivate.h" +#include "cmSystemTools.h" + +static std::string const kBINARY_DIR = "BINARY_DIR"; +static std::string const kBUILDSYSTEM_TARGETS = "BUILDSYSTEM_TARGETS"; +static std::string const kSOURCE_DIR = "SOURCE_DIR"; +static std::string const kSUBDIRECTORIES = "SUBDIRECTORIES"; + +void cmStateDirectory::ComputeRelativePathTopSource() +{ + // Relative path conversion inside the source tree is not used to + // construct relative paths passed to build tools so it is safe to use + // even when the source is a network path. + + cmStateSnapshot snapshot = this->Snapshot_; + std::vector snapshots; + snapshots.push_back(snapshot); + while (true) { + snapshot = snapshot.GetBuildsystemDirectoryParent(); + if (snapshot.IsValid()) { + snapshots.push_back(snapshot); + } else { + break; + } + } + + std::string result = snapshots.front().GetDirectory().GetCurrentSource(); + + for (std::vector::const_iterator it = snapshots.begin() + 1; + it != snapshots.end(); ++it) { + std::string currentSource = it->GetDirectory().GetCurrentSource(); + if (cmSystemTools::IsSubDirectory(result, currentSource)) { + result = currentSource; + } + } + this->DirectoryState->RelativePathTopSource = result; +} + +void cmStateDirectory::ComputeRelativePathTopBinary() +{ + cmStateSnapshot snapshot = this->Snapshot_; + std::vector snapshots; + snapshots.push_back(snapshot); + while (true) { + snapshot = snapshot.GetBuildsystemDirectoryParent(); + if (snapshot.IsValid()) { + snapshots.push_back(snapshot); + } else { + break; + } + } + + std::string result = snapshots.front().GetDirectory().GetCurrentBinary(); + + for (std::vector::const_iterator it = snapshots.begin() + 1; + it != snapshots.end(); ++it) { + std::string currentBinary = it->GetDirectory().GetCurrentBinary(); + if (cmSystemTools::IsSubDirectory(result, currentBinary)) { + result = currentBinary; + } + } + + // The current working directory on Windows cannot be a network + // path. Therefore relative paths cannot work when the binary tree + // is a network path. + if (result.size() < 2 || result.substr(0, 2) != "//") { + this->DirectoryState->RelativePathTopBinary = result; + } else { + this->DirectoryState->RelativePathTopBinary = ""; + } +} + +const char* cmStateDirectory::GetCurrentSource() const +{ + return this->DirectoryState->Location.c_str(); +} + +void cmStateDirectory::SetCurrentSource(std::string const& dir) +{ + std::string& loc = this->DirectoryState->Location; + loc = dir; + cmSystemTools::ConvertToUnixSlashes(loc); + loc = cmSystemTools::CollapseFullPath(loc); + + this->ComputeRelativePathTopSource(); + + this->Snapshot_.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", loc); +} + +const char* cmStateDirectory::GetCurrentBinary() const +{ + return this->DirectoryState->OutputLocation.c_str(); +} + +void cmStateDirectory::SetCurrentBinary(std::string const& dir) +{ + std::string& loc = this->DirectoryState->OutputLocation; + loc = dir; + cmSystemTools::ConvertToUnixSlashes(loc); + loc = cmSystemTools::CollapseFullPath(loc); + + this->ComputeRelativePathTopBinary(); + + this->Snapshot_.SetDefinition("CMAKE_CURRENT_BINARY_DIR", loc); +} + +const char* cmStateDirectory::GetRelativePathTopSource() const +{ + return this->DirectoryState->RelativePathTopSource.c_str(); +} + +const char* cmStateDirectory::GetRelativePathTopBinary() const +{ + return this->DirectoryState->RelativePathTopBinary.c_str(); +} + +void cmStateDirectory::SetRelativePathTopSource(const char* dir) +{ + this->DirectoryState->RelativePathTopSource = dir; +} + +void cmStateDirectory::SetRelativePathTopBinary(const char* dir) +{ + this->DirectoryState->RelativePathTopBinary = dir; +} + +cmStateDirectory::cmStateDirectory( + cmLinkedTree::iterator iter, + const cmStateSnapshot& snapshot) + : DirectoryState(iter) + , Snapshot_(snapshot) +{ +} + +template +cmStringRange GetPropertyContent(T const& content, U contentEndPosition) +{ + std::vector::const_iterator end = + content.begin() + contentEndPosition; + + std::vector::const_reverse_iterator rbegin = + cmMakeReverseIterator(end); + rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); + + return cmMakeRange(rbegin.base(), end); +} + +template +cmBacktraceRange GetPropertyBacktraces(T const& content, U const& backtraces, + V contentEndPosition) +{ + std::vector::const_iterator entryEnd = + content.begin() + contentEndPosition; + + std::vector::const_reverse_iterator rbegin = + cmMakeReverseIterator(entryEnd); + rbegin = std::find(rbegin, content.rend(), cmPropertySentinal); + + std::vector::const_iterator it = + backtraces.begin() + std::distance(content.begin(), rbegin.base()); + + std::vector::const_iterator end = backtraces.end(); + return cmMakeRange(it, end); +} + +template +void AppendEntry(T& content, U& backtraces, V& endContentPosition, + const std::string& value, const cmListFileBacktrace& lfbt) +{ + if (value.empty()) { + return; + } + + assert(endContentPosition == content.size()); + + content.push_back(value); + backtraces.push_back(lfbt); + + endContentPosition = content.size(); +} + +template +void SetContent(T& content, U& backtraces, V& endContentPosition, + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + assert(endContentPosition == content.size()); + + content.resize(content.size() + 2); + backtraces.resize(backtraces.size() + 2); + + content.back() = vec; + backtraces.back() = lfbt; + + endContentPosition = content.size(); +} + +template +void ClearContent(T& content, U& backtraces, V& endContentPosition) +{ + assert(endContentPosition == content.size()); + + content.resize(content.size() + 1); + backtraces.resize(backtraces.size() + 1); + + endContentPosition = content.size(); +} + +cmStringRange cmStateDirectory::GetIncludeDirectoriesEntries() const +{ + return GetPropertyContent( + this->DirectoryState->IncludeDirectories, + this->Snapshot_.Position->IncludeDirectoryPosition); +} + +cmBacktraceRange cmStateDirectory::GetIncludeDirectoriesEntryBacktraces() const +{ + return GetPropertyBacktraces( + this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition); +} + +void cmStateDirectory::AppendIncludeDirectoriesEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + AppendEntry(this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); +} + +void cmStateDirectory::PrependIncludeDirectoriesEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + std::vector::iterator entryEnd = + this->DirectoryState->IncludeDirectories.begin() + + this->Snapshot_.Position->IncludeDirectoryPosition; + + std::vector::reverse_iterator rend = + this->DirectoryState->IncludeDirectories.rend(); + std::vector::reverse_iterator rbegin = + cmMakeReverseIterator(entryEnd); + rbegin = std::find(rbegin, rend, cmPropertySentinal); + + std::vector::iterator entryIt = rbegin.base(); + std::vector::iterator entryBegin = + this->DirectoryState->IncludeDirectories.begin(); + + std::vector::iterator btIt = + this->DirectoryState->IncludeDirectoryBacktraces.begin() + + std::distance(entryBegin, entryIt); + + this->DirectoryState->IncludeDirectories.insert(entryIt, vec); + this->DirectoryState->IncludeDirectoryBacktraces.insert(btIt, lfbt); + + this->Snapshot_.Position->IncludeDirectoryPosition = + this->DirectoryState->IncludeDirectories.size(); +} + +void cmStateDirectory::SetIncludeDirectories(const std::string& vec, + const cmListFileBacktrace& lfbt) +{ + SetContent(this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition, vec, lfbt); +} + +void cmStateDirectory::ClearIncludeDirectories() +{ + ClearContent(this->DirectoryState->IncludeDirectories, + this->DirectoryState->IncludeDirectoryBacktraces, + this->Snapshot_.Position->IncludeDirectoryPosition); +} + +cmStringRange cmStateDirectory::GetCompileDefinitionsEntries() const +{ + return GetPropertyContent( + this->DirectoryState->CompileDefinitions, + this->Snapshot_.Position->CompileDefinitionsPosition); +} + +cmBacktraceRange cmStateDirectory::GetCompileDefinitionsEntryBacktraces() const +{ + return GetPropertyBacktraces( + this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition); +} + +void cmStateDirectory::AppendCompileDefinitionsEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + AppendEntry(this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); +} + +void cmStateDirectory::SetCompileDefinitions(const std::string& vec, + const cmListFileBacktrace& lfbt) +{ + SetContent(this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition, vec, lfbt); +} + +void cmStateDirectory::ClearCompileDefinitions() +{ + ClearContent(this->DirectoryState->CompileDefinitions, + this->DirectoryState->CompileDefinitionsBacktraces, + this->Snapshot_.Position->CompileDefinitionsPosition); +} + +cmStringRange cmStateDirectory::GetCompileOptionsEntries() const +{ + return GetPropertyContent(this->DirectoryState->CompileOptions, + this->Snapshot_.Position->CompileOptionsPosition); +} + +cmBacktraceRange cmStateDirectory::GetCompileOptionsEntryBacktraces() const +{ + return GetPropertyBacktraces( + this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition); +} + +void cmStateDirectory::AppendCompileOptionsEntry( + const std::string& vec, const cmListFileBacktrace& lfbt) +{ + AppendEntry(this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); +} + +void cmStateDirectory::SetCompileOptions(const std::string& vec, + const cmListFileBacktrace& lfbt) +{ + SetContent(this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition, vec, lfbt); +} + +void cmStateDirectory::ClearCompileOptions() +{ + ClearContent(this->DirectoryState->CompileOptions, + this->DirectoryState->CompileOptionsBacktraces, + this->Snapshot_.Position->CompileOptionsPosition); +} + +void cmStateDirectory::SetProperty(const std::string& prop, const char* value, + cmListFileBacktrace const& lfbt) +{ + if (prop == "INCLUDE_DIRECTORIES") { + if (!value) { + this->ClearIncludeDirectories(); + return; + } + this->SetIncludeDirectories(value, lfbt); + return; + } + if (prop == "COMPILE_OPTIONS") { + if (!value) { + this->ClearCompileOptions(); + return; + } + this->SetCompileOptions(value, lfbt); + return; + } + if (prop == "COMPILE_DEFINITIONS") { + if (!value) { + this->ClearCompileDefinitions(); + return; + } + this->SetCompileDefinitions(value, lfbt); + return; + } + + this->DirectoryState->Properties.SetProperty(prop, value); +} + +void cmStateDirectory::AppendProperty(const std::string& prop, + const char* value, bool asString, + cmListFileBacktrace const& lfbt) +{ + if (prop == "INCLUDE_DIRECTORIES") { + this->AppendIncludeDirectoriesEntry(value, lfbt); + return; + } + if (prop == "COMPILE_OPTIONS") { + this->AppendCompileOptionsEntry(value, lfbt); + return; + } + if (prop == "COMPILE_DEFINITIONS") { + this->AppendCompileDefinitionsEntry(value, lfbt); + return; + } + + this->DirectoryState->Properties.AppendProperty(prop, value, asString); +} + +const char* cmStateDirectory::GetProperty(const std::string& prop) const +{ + const bool chain = + this->Snapshot_.State->IsPropertyChained(prop, cmProperty::DIRECTORY); + return this->GetProperty(prop, chain); +} + +const char* cmStateDirectory::GetProperty(const std::string& prop, + bool chain) const +{ + static std::string output; + output = ""; + if (prop == "PARENT_DIRECTORY") { + cmStateSnapshot parent = this->Snapshot_.GetBuildsystemDirectoryParent(); + if (parent.IsValid()) { + return parent.GetDirectory().GetCurrentSource(); + } + return ""; + } + if (prop == kBINARY_DIR) { + output = this->GetCurrentBinary(); + return output.c_str(); + } + if (prop == kSOURCE_DIR) { + output = this->GetCurrentSource(); + return output.c_str(); + } + if (prop == kSUBDIRECTORIES) { + std::vector child_dirs; + std::vector const& children = + this->DirectoryState->Children; + for (std::vector::const_iterator ci = children.begin(); + ci != children.end(); ++ci) { + child_dirs.push_back(ci->GetDirectory().GetCurrentSource()); + } + output = cmJoin(child_dirs, ";"); + return output.c_str(); + } + if (prop == kBUILDSYSTEM_TARGETS) { + output = cmJoin(this->DirectoryState->NormalTargetNames, ";"); + return output.c_str(); + } + + if (prop == "LISTFILE_STACK") { + std::vector listFiles; + cmStateSnapshot snp = this->Snapshot_; + while (snp.IsValid()) { + listFiles.push_back(snp.GetExecutionListFile()); + snp = snp.GetCallStackParent(); + } + std::reverse(listFiles.begin(), listFiles.end()); + output = cmJoin(listFiles, ";"); + return output.c_str(); + } + if (prop == "CACHE_VARIABLES") { + output = cmJoin(this->Snapshot_.State->GetCacheEntryKeys(), ";"); + return output.c_str(); + } + if (prop == "VARIABLES") { + std::vector res = this->Snapshot_.ClosureKeys(); + std::vector cacheKeys = + this->Snapshot_.State->GetCacheEntryKeys(); + res.insert(res.end(), cacheKeys.begin(), cacheKeys.end()); + std::sort(res.begin(), res.end()); + output = cmJoin(res, ";"); + return output.c_str(); + } + if (prop == "INCLUDE_DIRECTORIES") { + output = cmJoin(this->GetIncludeDirectoriesEntries(), ";"); + return output.c_str(); + } + if (prop == "COMPILE_OPTIONS") { + output = cmJoin(this->GetCompileOptionsEntries(), ";"); + return output.c_str(); + } + if (prop == "COMPILE_DEFINITIONS") { + output = cmJoin(this->GetCompileDefinitionsEntries(), ";"); + return output.c_str(); + } + + const char* retVal = this->DirectoryState->Properties.GetPropertyValue(prop); + if (!retVal && chain) { + cmStateSnapshot parentSnapshot = + this->Snapshot_.GetBuildsystemDirectoryParent(); + if (parentSnapshot.IsValid()) { + return parentSnapshot.GetDirectory().GetProperty(prop, chain); + } + return this->Snapshot_.State->GetGlobalProperty(prop); + } + + return retVal; +} + +bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const +{ + return cmSystemTools::IsOn(this->GetProperty(prop)); +} + +std::vector cmStateDirectory::GetPropertyKeys() const +{ + std::vector keys; + keys.reserve(this->DirectoryState->Properties.size()); + for (cmPropertyMap::const_iterator it = + this->DirectoryState->Properties.begin(); + it != this->DirectoryState->Properties.end(); ++it) { + keys.push_back(it->first); + } + return keys; +} + +void cmStateDirectory::AddNormalTargetName(std::string const& name) +{ + this->DirectoryState->NormalTargetNames.push_back(name); +} diff --git a/Source/cmStateDirectory.h b/Source/cmStateDirectory.h new file mode 100644 index 0000000..17a89d8 --- /dev/null +++ b/Source/cmStateDirectory.h @@ -0,0 +1,82 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmStateDirectory_h +#define cmStateDirectory_h + +#include // IWYU pragma: keep + +#include +#include + +#include "cmAlgorithms.h" +#include "cmListFileCache.h" +#include "cmStateSnapshot.h" +#include "cmStateTypes.h" + +class cmStateDirectory +{ + cmStateDirectory( + cmLinkedTree::iterator iter, + cmStateSnapshot const& snapshot); + +public: + const char* GetCurrentSource() const; + void SetCurrentSource(std::string const& dir); + const char* GetCurrentBinary() const; + void SetCurrentBinary(std::string const& dir); + + const char* GetRelativePathTopSource() const; + const char* GetRelativePathTopBinary() const; + void SetRelativePathTopSource(const char* dir); + void SetRelativePathTopBinary(const char* dir); + + cmStringRange GetIncludeDirectoriesEntries() const; + cmBacktraceRange GetIncludeDirectoriesEntryBacktraces() const; + void AppendIncludeDirectoriesEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void PrependIncludeDirectoriesEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetIncludeDirectories(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearIncludeDirectories(); + + cmStringRange GetCompileDefinitionsEntries() const; + cmBacktraceRange GetCompileDefinitionsEntryBacktraces() const; + void AppendCompileDefinitionsEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetCompileDefinitions(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearCompileDefinitions(); + + cmStringRange GetCompileOptionsEntries() const; + cmBacktraceRange GetCompileOptionsEntryBacktraces() const; + void AppendCompileOptionsEntry(std::string const& vec, + cmListFileBacktrace const& lfbt); + void SetCompileOptions(std::string const& vec, + cmListFileBacktrace const& lfbt); + void ClearCompileOptions(); + + void SetProperty(const std::string& prop, const char* value, + cmListFileBacktrace const& lfbt); + void AppendProperty(const std::string& prop, const char* value, + bool asString, cmListFileBacktrace const& lfbt); + const char* GetProperty(const std::string& prop) const; + const char* GetProperty(const std::string& prop, bool chain) const; + bool GetPropertyAsBool(const std::string& prop) const; + std::vector GetPropertyKeys() const; + + void AddNormalTargetName(std::string const& name); + +private: + void ComputeRelativePathTopSource(); + void ComputeRelativePathTopBinary(); + +private: + cmLinkedTree::iterator + DirectoryState; + cmStateSnapshot Snapshot_; + friend class cmStateSnapshot; +}; + +#endif diff --git a/Source/cmStatePrivate.h b/Source/cmStatePrivate.h new file mode 100644 index 0000000..8daa3cf --- /dev/null +++ b/Source/cmStatePrivate.h @@ -0,0 +1,94 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmStatePrivate_h +#define cmStatePrivate_h + +#include // IWYU pragma: keep + +#include +#include + +#include "cmDefinitions.h" +#include "cmLinkedTree.h" +#include "cmListFileCache.h" +#include "cmPropertyMap.h" +#include "cmStateTypes.h" + +static const std::string cmPropertySentinal = std::string(); + +struct cmStateDetail::SnapshotDataType +{ + cmStateDetail::PositionType ScopeParent; + cmStateDetail::PositionType DirectoryParent; + cmLinkedTree::iterator Policies; + cmLinkedTree::iterator PolicyRoot; + cmLinkedTree::iterator PolicyScope; + cmStateEnums::SnapshotType SnapshotType; + bool Keep; + cmLinkedTree::iterator ExecutionListFile; + cmLinkedTree::iterator + BuildSystemDirectory; + cmLinkedTree::iterator Vars; + cmLinkedTree::iterator Root; + cmLinkedTree::iterator Parent; + std::vector::size_type IncludeDirectoryPosition; + std::vector::size_type CompileDefinitionsPosition; + std::vector::size_type CompileOptionsPosition; +}; + +struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap +{ + typedef cmPolicies::PolicyMap derived; + PolicyStackEntry(bool w = false) + : derived() + , Weak(w) + { + } + PolicyStackEntry(derived const& d, bool w) + : derived(d) + , Weak(w) + { + } + PolicyStackEntry(PolicyStackEntry const& r) + : derived(r) + , Weak(r.Weak) + { + } + bool Weak; +}; + +struct cmStateDetail::BuildsystemDirectoryStateType +{ + cmStateDetail::PositionType DirectoryEnd; + + std::string Location; + std::string OutputLocation; + + // The top-most directories for relative path conversion. Both the + // source and destination location of a relative path conversion + // must be underneath one of these directories (both under source or + // both under binary) in order for the relative path to be evaluated + // safely by the build tools. + std::string RelativePathTopSource; + std::string RelativePathTopBinary; + + std::vector IncludeDirectories; + std::vector IncludeDirectoryBacktraces; + + std::vector CompileDefinitions; + std::vector CompileDefinitionsBacktraces; + + std::vector CompileOptions; + std::vector CompileOptionsBacktraces; + + std::vector NormalTargetNames; + + std::string ProjectName; + + cmPropertyMap Properties; + + std::vector Children; +}; + +#endif diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx new file mode 100644 index 0000000..7f86221 --- /dev/null +++ b/Source/cmStateSnapshot.cxx @@ -0,0 +1,415 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#include "cmStateSnapshot.h" + +#include "cmState.h" +#include "cmStateDirectory.h" +#include "cmStatePrivate.h" +#include "cmSystemTools.h" +#include "cmVersion.h" +#include "cmake.h" + +cmStateSnapshot::cmStateSnapshot(cmState* state) + : State(state) + , Position() +{ +} + +std::vector cmStateSnapshot::GetChildren() +{ + return this->Position->BuildSystemDirectory->Children; +} + +cmStateSnapshot::cmStateSnapshot(cmState* state, + cmStateDetail::PositionType position) + : State(state) + , Position(position) +{ +} + +cmStateEnums::SnapshotType cmStateSnapshot::GetType() const +{ + return this->Position->SnapshotType; +} + +void cmStateSnapshot::SetListFile(const std::string& listfile) +{ + *this->Position->ExecutionListFile = listfile; +} + +std::string cmStateSnapshot::GetExecutionListFile() const +{ + return *this->Position->ExecutionListFile; +} + +bool cmStateSnapshot::IsValid() const +{ + return this->State && this->Position.IsValid() + ? this->Position != this->State->SnapshotData.Root() + : false; +} + +cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const +{ + cmStateSnapshot snapshot; + if (!this->State || this->Position == this->State->SnapshotData.Root()) { + return snapshot; + } + cmStateDetail::PositionType parentPos = this->Position->DirectoryParent; + if (parentPos != this->State->SnapshotData.Root()) { + snapshot = cmStateSnapshot(this->State, + parentPos->BuildSystemDirectory->DirectoryEnd); + } + + return snapshot; +} + +cmStateSnapshot cmStateSnapshot::GetCallStackParent() const +{ + assert(this->State); + assert(this->Position != this->State->SnapshotData.Root()); + + cmStateSnapshot snapshot; + cmStateDetail::PositionType parentPos = this->Position; + while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || + parentPos->SnapshotType == cmStateEnums::VariableScopeType) { + ++parentPos; + } + if (parentPos->SnapshotType == cmStateEnums::BuildsystemDirectoryType || + parentPos->SnapshotType == cmStateEnums::BaseType) { + return snapshot; + } + + ++parentPos; + while (parentPos->SnapshotType == cmStateEnums::PolicyScopeType || + parentPos->SnapshotType == cmStateEnums::VariableScopeType) { + ++parentPos; + } + + if (parentPos == this->State->SnapshotData.Root()) { + return snapshot; + } + + snapshot = cmStateSnapshot(this->State, parentPos); + return snapshot; +} + +cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const +{ + assert(this->State); + assert(this->Position != this->State->SnapshotData.Root()); + + cmStateDetail::PositionType pos = this->Position; + while (pos->SnapshotType != cmStateEnums::BaseType && + pos->SnapshotType != cmStateEnums::BuildsystemDirectoryType && + pos != this->State->SnapshotData.Root()) { + ++pos; + } + return cmStateSnapshot(this->State, pos); +} + +void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) +{ + cmStateDetail::PositionType pos = this->Position; + pos->Policies = this->State->PolicyStack.Push( + pos->Policies, cmStateDetail::PolicyStackEntry(entry, weak)); +} + +bool cmStateSnapshot::PopPolicy() +{ + cmStateDetail::PositionType pos = this->Position; + if (pos->Policies == pos->PolicyScope) { + return false; + } + pos->Policies = this->State->PolicyStack.Pop(pos->Policies); + return true; +} + +bool cmStateSnapshot::CanPopPolicyScope() +{ + return this->Position->Policies == this->Position->PolicyScope; +} + +void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id, + cmPolicies::PolicyStatus status) +{ + // Update the policy stack from the top to the top-most strong entry. + bool previous_was_weak = true; + for (cmLinkedTree::iterator psi = + this->Position->Policies; + previous_was_weak && psi != this->Position->PolicyRoot; ++psi) { + psi->Set(id, status); + previous_was_weak = psi->Weak; + } +} + +cmPolicies::PolicyStatus cmStateSnapshot::GetPolicy( + cmPolicies::PolicyID id) const +{ + cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id); + + if (status == cmPolicies::REQUIRED_ALWAYS || + status == cmPolicies::REQUIRED_IF_USED) { + return status; + } + + cmLinkedTree::iterator dir = + this->Position->BuildSystemDirectory; + + while (true) { + assert(dir.IsValid()); + cmLinkedTree::iterator leaf = + dir->DirectoryEnd->Policies; + cmLinkedTree::iterator root = + dir->DirectoryEnd->PolicyRoot; + for (; leaf != root; ++leaf) { + if (leaf->IsDefined(id)) { + status = leaf->Get(id); + return status; + } + } + cmStateDetail::PositionType e = dir->DirectoryEnd; + cmStateDetail::PositionType p = e->DirectoryParent; + if (p == this->State->SnapshotData.Root()) { + break; + } + dir = p->BuildSystemDirectory; + } + return status; +} + +bool cmStateSnapshot::HasDefinedPolicyCMP0011() +{ + return !this->Position->Policies->IsEmpty(); +} + +const char* cmStateSnapshot::GetDefinition(std::string const& name) const +{ + assert(this->Position->Vars.IsValid()); + return cmDefinitions::Get(name, this->Position->Vars, this->Position->Root); +} + +bool cmStateSnapshot::IsInitialized(std::string const& name) const +{ + return cmDefinitions::HasKey(name, this->Position->Vars, + this->Position->Root); +} + +void cmStateSnapshot::SetDefinition(std::string const& name, + std::string const& value) +{ + this->Position->Vars->Set(name, value.c_str()); +} + +void cmStateSnapshot::RemoveDefinition(std::string const& name) +{ + this->Position->Vars->Set(name, CM_NULLPTR); +} + +std::vector cmStateSnapshot::UnusedKeys() const +{ + return this->Position->Vars->UnusedKeys(); +} + +std::vector cmStateSnapshot::ClosureKeys() const +{ + return cmDefinitions::ClosureKeys(this->Position->Vars, + this->Position->Root); +} + +bool cmStateSnapshot::RaiseScope(std::string const& var, const char* varDef) +{ + if (this->Position->ScopeParent == this->Position->DirectoryParent) { + cmStateSnapshot parentDir = this->GetBuildsystemDirectoryParent(); + if (!parentDir.IsValid()) { + return false; + } + // Update the definition in the parent directory top scope. This + // directory's scope was initialized by the closure of the parent + // scope, so we do not need to localize the definition first. + if (varDef) { + parentDir.SetDefinition(var, varDef); + } else { + parentDir.RemoveDefinition(var); + } + return true; + } + // First localize the definition in the current scope. + cmDefinitions::Raise(var, this->Position->Vars, this->Position->Root); + + // Now update the definition in the parent scope. + this->Position->Parent->Set(var, varDef); + return true; +} + +template +void InitializeContentFromParent(T& parentContent, T& thisContent, + U& parentBacktraces, U& thisBacktraces, + V& contentEndPosition) +{ + std::vector::const_iterator parentBegin = parentContent.begin(); + std::vector::const_iterator parentEnd = parentContent.end(); + + std::vector::const_reverse_iterator parentRbegin = + cmMakeReverseIterator(parentEnd); + std::vector::const_reverse_iterator parentRend = + parentContent.rend(); + parentRbegin = std::find(parentRbegin, parentRend, cmPropertySentinal); + std::vector::const_iterator parentIt = parentRbegin.base(); + + thisContent = std::vector(parentIt, parentEnd); + + std::vector::const_iterator btIt = + parentBacktraces.begin() + std::distance(parentBegin, parentIt); + std::vector::const_iterator btEnd = + parentBacktraces.end(); + + thisBacktraces = std::vector(btIt, btEnd); + + contentEndPosition = thisContent.size(); +} + +void cmStateSnapshot::SetDefaultDefinitions() +{ +/* Up to CMake 2.4 here only WIN32, UNIX and APPLE were set. + With CMake must separate between target and host platform. In most cases + the tests for WIN32, UNIX and APPLE will be for the target system, so an + additional set of variables for the host system is required -> + CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE. + WIN32, UNIX and APPLE are now set in the platform files in + Modules/Platforms/. + To keep cmake scripts (-P) and custom language and compiler modules + working, these variables are still also set here in this place, but they + will be reset in CMakeSystemSpecificInformation.cmake before the platform + files are executed. */ +#if defined(_WIN32) + this->SetDefinition("WIN32", "1"); + this->SetDefinition("CMAKE_HOST_WIN32", "1"); +#else + this->SetDefinition("UNIX", "1"); + this->SetDefinition("CMAKE_HOST_UNIX", "1"); +#endif +#if defined(__CYGWIN__) + std::string legacy; + if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) && + cmSystemTools::IsOn(legacy.c_str())) { + this->SetDefinition("WIN32", "1"); + this->SetDefinition("CMAKE_HOST_WIN32", "1"); + } +#endif +#if defined(__APPLE__) + this->SetDefinition("APPLE", "1"); + this->SetDefinition("CMAKE_HOST_APPLE", "1"); +#endif +#if defined(__sun__) + this->SetDefinition("CMAKE_HOST_SOLARIS", "1"); +#endif + + char temp[1024]; + sprintf(temp, "%d", cmVersion::GetMinorVersion()); + this->SetDefinition("CMAKE_MINOR_VERSION", temp); + sprintf(temp, "%d", cmVersion::GetMajorVersion()); + this->SetDefinition("CMAKE_MAJOR_VERSION", temp); + sprintf(temp, "%d", cmVersion::GetPatchVersion()); + this->SetDefinition("CMAKE_PATCH_VERSION", temp); + sprintf(temp, "%d", cmVersion::GetTweakVersion()); + this->SetDefinition("CMAKE_TWEAK_VERSION", temp); + this->SetDefinition("CMAKE_VERSION", cmVersion::GetCMakeVersion()); + + this->SetDefinition("CMAKE_FILES_DIRECTORY", + cmake::GetCMakeFilesDirectory()); + + // Setup the default include file regular expression (match everything). + this->Position->BuildSystemDirectory->Properties.SetProperty( + "INCLUDE_REGULAR_EXPRESSION", "^.*$"); +} + +void cmStateSnapshot::SetDirectoryDefinitions() +{ + this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); + this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", + this->State->GetSourceDirectory()); + this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); + this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", + this->State->GetBinaryDirectory()); +} + +void cmStateSnapshot::InitializeFromParent() +{ + cmStateDetail::PositionType parent = this->Position->DirectoryParent; + assert(this->Position->Vars.IsValid()); + assert(parent->Vars.IsValid()); + + *this->Position->Vars = + cmDefinitions::MakeClosure(parent->Vars, parent->Root); + + InitializeContentFromParent( + parent->BuildSystemDirectory->IncludeDirectories, + this->Position->BuildSystemDirectory->IncludeDirectories, + parent->BuildSystemDirectory->IncludeDirectoryBacktraces, + this->Position->BuildSystemDirectory->IncludeDirectoryBacktraces, + this->Position->IncludeDirectoryPosition); + + InitializeContentFromParent( + parent->BuildSystemDirectory->CompileDefinitions, + this->Position->BuildSystemDirectory->CompileDefinitions, + parent->BuildSystemDirectory->CompileDefinitionsBacktraces, + this->Position->BuildSystemDirectory->CompileDefinitionsBacktraces, + this->Position->CompileDefinitionsPosition); + + InitializeContentFromParent( + parent->BuildSystemDirectory->CompileOptions, + this->Position->BuildSystemDirectory->CompileOptions, + parent->BuildSystemDirectory->CompileOptionsBacktraces, + this->Position->BuildSystemDirectory->CompileOptionsBacktraces, + this->Position->CompileOptionsPosition); +} + +cmState* cmStateSnapshot::GetState() const +{ + return this->State; +} + +cmStateDirectory cmStateSnapshot::GetDirectory() const +{ + return cmStateDirectory(this->Position->BuildSystemDirectory, *this); +} + +void cmStateSnapshot::SetProjectName(const std::string& name) +{ + this->Position->BuildSystemDirectory->ProjectName = name; +} + +std::string cmStateSnapshot::GetProjectName() const +{ + return this->Position->BuildSystemDirectory->ProjectName; +} + +void cmStateSnapshot::InitializeFromParent_ForSubdirsCommand() +{ + std::string currentSrcDir = this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR"); + std::string currentBinDir = this->GetDefinition("CMAKE_CURRENT_BINARY_DIR"); + this->InitializeFromParent(); + this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); + this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); + + this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", currentSrcDir); + this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", currentBinDir); +} + +bool cmStateSnapshot::StrictWeakOrder::operator()( + const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) const +{ + return lhs.Position.StrictWeakOrdered(rhs.Position); +} + +bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) +{ + return lhs.Position == rhs.Position; +} + +bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs) +{ + return lhs.Position != rhs.Position; +} diff --git a/Source/cmStateSnapshot.h b/Source/cmStateSnapshot.h new file mode 100644 index 0000000..63b581d --- /dev/null +++ b/Source/cmStateSnapshot.h @@ -0,0 +1,88 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifndef cmStateSnapshot_h +#define cmStateSnapshot_h + +#include // IWYU pragma: keep + +#include +#include +#include + +#include "cmPolicies.h" +#include "cmStateTypes.h" + +class cmState; +class cmStateDirectory; + +class cmStateSnapshot +{ +public: + cmStateSnapshot(cmState* state = CM_NULLPTR); + cmStateSnapshot(cmState* state, cmStateDetail::PositionType position); + + const char* GetDefinition(std::string const& name) const; + bool IsInitialized(std::string const& name) const; + void SetDefinition(std::string const& name, std::string const& value); + void RemoveDefinition(std::string const& name); + std::vector UnusedKeys() const; + std::vector ClosureKeys() const; + bool RaiseScope(std::string const& var, const char* varDef); + + void SetListFile(std::string const& listfile); + + std::string GetExecutionListFile() const; + + std::vector GetChildren(); + + bool IsValid() const; + cmStateSnapshot GetBuildsystemDirectoryParent() const; + cmStateSnapshot GetCallStackParent() const; + cmStateSnapshot GetCallStackBottom() const; + cmStateEnums::SnapshotType GetType() const; + + void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); + cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; + bool HasDefinedPolicyCMP0011(); + void PushPolicy(cmPolicies::PolicyMap entry, bool weak); + bool PopPolicy(); + bool CanPopPolicyScope(); + + cmState* GetState() const; + + cmStateDirectory GetDirectory() const; + + void SetProjectName(std::string const& name); + std::string GetProjectName() const; + + void InitializeFromParent_ForSubdirsCommand(); + + struct StrictWeakOrder + { + bool operator()(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs) const; + }; + + void SetDirectoryDefinitions(); + void SetDefaultDefinitions(); + +private: + friend bool operator==(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs); + friend bool operator!=(const cmStateSnapshot& lhs, + const cmStateSnapshot& rhs); + friend class cmState; + friend class cmStateDirectory; + friend struct StrictWeakOrder; + + void InitializeFromParent(); + + cmState* State; + cmStateDetail::PositionType Position; +}; + +bool operator==(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); +bool operator!=(const cmStateSnapshot& lhs, const cmStateSnapshot& rhs); + +#endif diff --git a/Source/cmake.h b/Source/cmake.h index 0a577ad..cd00c61 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -7,7 +7,7 @@ #include "cmInstalledFile.h" #include "cmListFileCache.h" -#include "cmState.h" +#include "cmStateSnapshot.h" #include #include diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 912acdb..6e9ad6c 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -7,7 +7,7 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmQtAutoGenerators.h" -#include "cmState.h" +#include "cmStateDirectory.h" #include "cmSystemTools.h" #include "cmUtils.hxx" #include "cmVersion.h" diff --git a/bootstrap b/bootstrap index d537211..44afbb2 100755 --- a/bootstrap +++ b/bootstrap @@ -292,6 +292,8 @@ CMAKE_CXX_SOURCES="\ cmSourceFile \ cmSourceFileLocation \ cmState \ + cmStateDirectory \ + cmStateSnapshot \ cmSystemTools \ cmTestGenerator \ cmVersion \ ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 20 08:49:03 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 08:49:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-623-g032d3b4 Message-ID: <20161020124903.2363EF67A2@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 032d3b4030b97fefcf4a808c541344405efbdeda (commit) via effa6c8343fb871574cb5471de5eb4c1705dd334 (commit) from 9745fcfa79993a2524c2bb40c126d338cfa78899 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=032d3b4030b97fefcf4a808c541344405efbdeda commit 032d3b4030b97fefcf4a808c541344405efbdeda Merge: 9745fcf effa6c8 Author: Brad King AuthorDate: Thu Oct 20 08:49:01 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 08:49:01 2016 -0400 Merge topic 'clang-tidy' into next effa6c83 fix more issues reported by clang-tidy https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=effa6c8343fb871574cb5471de5eb4c1705dd334 commit effa6c8343fb871574cb5471de5eb4c1705dd334 Author: Daniel Pfeifer AuthorDate: Tue Oct 18 23:16:02 2016 +0200 Commit: Brad King CommitDate: Thu Oct 20 08:48:20 2016 -0400 fix more issues reported by clang-tidy diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index d9ac909..0098a4b 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -231,7 +231,7 @@ public: protected: void StartElement(const std::string& name, const char** /*atts*/) CM_OVERRIDE { - file = name == "file" ? true : false; + file = name == "file"; if (file) { hasFiles = true; } diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 360c852..efce263 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -430,17 +430,19 @@ void cmExtraCodeLiteGenerator::CreateProjectSourceEntries( xml.StartElement("General"); std::string outputPath = mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH"); - if (!outputPath.empty()) + if (!outputPath.empty()) { xml.Attribute("OutputFile", outputPath + "/$(ProjectName)"); - else + } else { xml.Attribute("OutputFile", "$(IntermediateDirectory)/$(ProjectName)"); + } xml.Attribute("IntermediateDirectory", "./"); xml.Attribute("Command", "./$(ProjectName)"); xml.Attribute("CommandArguments", ""); - if (!outputPath.empty()) + if (!outputPath.empty()) { xml.Attribute("WorkingDirectory", outputPath); - else + } else { xml.Attribute("WorkingDirectory", "$(IntermediateDirectory)"); + } xml.Attribute("PauseExecWhenProcTerminates", "yes"); xml.EndElement(); // General diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index a71ff71..8dd204b 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -115,41 +115,59 @@ bool cmFileCommand::InitialPass(std::vector const& args, } if (subCommand == "STRINGS") { return this->HandleStringsCommand(args); - } else if (subCommand == "GLOB") { + } + if (subCommand == "GLOB") { return this->HandleGlobCommand(args, false); - } else if (subCommand == "GLOB_RECURSE") { + } + if (subCommand == "GLOB_RECURSE") { return this->HandleGlobCommand(args, true); - } else if (subCommand == "MAKE_DIRECTORY") { + } + if (subCommand == "MAKE_DIRECTORY") { return this->HandleMakeDirectoryCommand(args); - } else if (subCommand == "RENAME") { + } + if (subCommand == "RENAME") { return this->HandleRename(args); - } else if (subCommand == "REMOVE") { + } + if (subCommand == "REMOVE") { return this->HandleRemove(args, false); - } else if (subCommand == "REMOVE_RECURSE") { + } + if (subCommand == "REMOVE_RECURSE") { return this->HandleRemove(args, true); - } else if (subCommand == "COPY") { + } + if (subCommand == "COPY") { return this->HandleCopyCommand(args); - } else if (subCommand == "INSTALL") { + } + if (subCommand == "INSTALL") { return this->HandleInstallCommand(args); - } else if (subCommand == "DIFFERENT") { + } + if (subCommand == "DIFFERENT") { return this->HandleDifferentCommand(args); - } else if (subCommand == "RPATH_CHANGE" || subCommand == "CHRPATH") { + } + if (subCommand == "RPATH_CHANGE" || subCommand == "CHRPATH") { return this->HandleRPathChangeCommand(args); - } else if (subCommand == "RPATH_CHECK") { + } + if (subCommand == "RPATH_CHECK") { return this->HandleRPathCheckCommand(args); - } else if (subCommand == "RPATH_REMOVE") { + } + if (subCommand == "RPATH_REMOVE") { return this->HandleRPathRemoveCommand(args); - } else if (subCommand == "RELATIVE_PATH") { + } + if (subCommand == "RELATIVE_PATH") { return this->HandleRelativePathCommand(args); - } else if (subCommand == "TO_CMAKE_PATH") { + } + if (subCommand == "TO_CMAKE_PATH") { return this->HandleCMakePathCommand(args, false); - } else if (subCommand == "TO_NATIVE_PATH") { + } + if (subCommand == "TO_NATIVE_PATH") { return this->HandleCMakePathCommand(args, true); - } else if (subCommand == "TIMESTAMP") { + } + if (subCommand == "TIMESTAMP") { return this->HandleTimestampCommand(args); - } else if (subCommand == "GENERATE") { + } + if (subCommand == "GENERATE") { return this->HandleGenerateCommand(args); - } else if (subCommand == "LOCK") { + } + if (subCommand == "LOCK") { return this->HandleLockCommand(args); } diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx index 41ec8b4..b55341b 100644 --- a/Source/cmFileMonitor.cxx +++ b/Source/cmFileMonitor.cxx @@ -36,7 +36,7 @@ public: class cmVirtualDirectoryWatcher : public cmIBaseWatcher { public: - ~cmVirtualDirectoryWatcher() + ~cmVirtualDirectoryWatcher() override { for (auto i : this->Children) { delete i.second; @@ -156,7 +156,7 @@ public: p->AddChildWatcher(ps, this); } - ~cmRealDirectoryWatcher() + ~cmRealDirectoryWatcher() override { // Handle is freed via uv_handle_close callback! } diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index b16cfc6..9fa23c0 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -400,7 +400,7 @@ const char* cmGeneratorTarget::GetProperty(const std::string& prop) const if (!cmTargetPropertyComputer::PassesWhitelist( this->GetType(), prop, this->Makefile->GetMessenger(), this->GetBacktrace())) { - return 0; + return CM_NULLPTR; } if (const char* result = cmTargetPropertyComputer::GetProperty( this, prop, this->Makefile->GetMessenger(), this->GetBacktrace())) { diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 39445dd..9f64397 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -247,7 +247,7 @@ bool cmGetPropertyCommand::HandleTargetMode() } return this->StoreResult(CM_NULLPTR); } - const char* prop_cstr = 0; + const char* prop_cstr = CM_NULLPTR; cmListFileBacktrace bt = this->Makefile->GetBacktrace(); cmMessenger* messenger = this->Makefile->GetMessenger(); if (cmTargetPropertyComputer::PassesWhitelist( diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx index 6a816d8..e78f780 100644 --- a/Source/cmGetTargetPropertyCommand.cxx +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -24,7 +24,7 @@ bool cmGetTargetPropertyCommand::InitialPass( prop_exists = true; } } else if (!args[2].empty()) { - const char* prop_cstr = 0; + const char* prop_cstr = CM_NULLPTR; cmListFileBacktrace bt = this->Makefile->GetBacktrace(); cmMessenger* messenger = this->Makefile->GetMessenger(); if (cmTargetPropertyComputer::PassesWhitelist(tgt->GetType(), args[2], diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 1ac6cd4..ff4098b 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -274,8 +274,9 @@ std::string cmNinjaTargetGenerator::GetPreprocessedFilePath( objName.substr(0, objName.size() - objExt.size()) + "-pp." + ppExt; std::string path = this->LocalGenerator->GetHomeRelativeOutputPath(); - if (!path.empty()) + if (!path.empty()) { path += "/"; + } path += this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget); path += "/"; path += ppName; @@ -286,8 +287,9 @@ std::string cmNinjaTargetGenerator::GetDyndepFilePath( std::string const& lang) const { std::string path = this->LocalGenerator->GetHomeRelativeOutputPath(); - if (!path.empty()) + if (!path.empty()) { path += "/"; + } path += this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget); path += "/"; path += lang; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index e0fcb75..84628d4 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -42,8 +42,9 @@ static std::vector getConfigurations(const cmake* cm) } makefiles[0]->GetConfigurations(configurations); - if (configurations.empty()) + if (configurations.empty()) { configurations.push_back(""); + } return configurations; } @@ -96,20 +97,24 @@ static void getCMakeInputs(const cmGlobalGenerator* gg, if (!sourceDir.empty()) { const std::string& relative = cmSystemTools::RelativePath(sourceDir.c_str(), jt->c_str()); - if (toAdd.size() > relative.size()) + if (toAdd.size() > relative.size()) { toAdd = relative; + } } if (isInternal) { - if (internalFiles) + if (internalFiles) { internalFiles->push_back(toAdd); + } } else { if (isTemporary) { - if (tmpFiles) + if (tmpFiles) { tmpFiles->push_back(toAdd); + } } else { - if (explicitFiles) + if (explicitFiles) { explicitFiles->push_back(toAdd); + } } } } @@ -672,8 +677,9 @@ static Json::Value DumpSourceFilesList( Json::Value result = Json::arrayValue; for (auto it = fileGroups.begin(); it != fileGroups.end(); ++it) { Json::Value group = DumpSourceFileGroup(it->first, it->second, baseDir); - if (!group.isNull()) + if (!group.isNull()) { result.append(group); + } } return result; @@ -821,8 +827,8 @@ static Json::Value DumpProjectList(const cmake* cm, const std::string config) Json::Value pObj = Json::objectValue; pObj[kNAME_KEY] = projectIt.first; - assert(projectIt.second.size() > - 0); // All Projects must have at least one local generator + // All Projects must have at least one local generator + assert(!projectIt.second.empty()); const cmLocalGenerator* lg = projectIt.second.at(0); // Project structure information: diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 3a22309..de48193 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -852,13 +852,15 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "EXPORT_NAME" && this->IsImported()) { + } + if (prop == "EXPORT_NAME" && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" << this->Name << "\")\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "SOURCES" && this->IsImported()) { + } + if (prop == "SOURCES" && this->IsImported()) { std::ostringstream e; e << "SOURCES property can't be set on imported targets (\"" << this->Name << "\")\n"; @@ -932,13 +934,15 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "EXPORT_NAME" && this->IsImported()) { + } + if (prop == "EXPORT_NAME" && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" << this->Name << "\")\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "SOURCES" && this->IsImported()) { + } + if (prop == "SOURCES" && this->IsImported()) { std::ostringstream e; e << "SOURCES property can't be set on imported targets (\"" << this->Name << "\")\n"; diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index ed9a4e2..1f7150a 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -75,7 +75,7 @@ private: } // Support "LOCATION_". - else if (cmHasLiteralPrefix(prop, "LOCATION_")) { + if (cmHasLiteralPrefix(prop, "LOCATION_")) { if (!tgt->IsImported() && !HandleLocationPropertyPolicy(tgt->GetName(), messenger, context)) { @@ -86,8 +86,8 @@ private: } // Support "_LOCATION". - else if (cmHasLiteralSuffix(prop, "_LOCATION") && - !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { + if (cmHasLiteralSuffix(prop, "_LOCATION") && + !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) { std::string configName(prop.c_str(), prop.size() - 9); if (configName != "IMPORTED") { if (!tgt->IsImported() && diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 4387bf6..b878534 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -414,7 +414,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) return 0; } - else if (args[1] == "env") { + if (args[1] == "env") { std::vector::const_iterator ai = args.begin() + 2; std::vector::const_iterator ae = args.end(); for (; ai != ae; ++ai) { @@ -454,7 +454,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } #if defined(CMAKE_BUILD_WITH_CMAKE) - else if (args[1] == "environment") { + if (args[1] == "environment") { std::vector env = cmSystemTools::GetEnvironmentVariables(); std::vector::iterator it; for (it = env.begin(); it != env.end(); ++it) { @@ -464,7 +464,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } #endif - else if (args[1] == "make_directory" && args.size() > 2) { + if (args[1] == "make_directory" && args.size() > 2) { // If error occurs we want to continue copying next files. bool return_value = 0; for (std::string::size_type cc = 2; cc < args.size(); cc++) { @@ -476,7 +476,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) return return_value; } - else if (args[1] == "remove_directory" && args.size() == 3) { + if (args[1] == "remove_directory" && args.size() == 3) { if (cmSystemTools::FileIsDirectory(args[2]) && !cmSystemTools::RemoveADirectory(args[2])) { std::cerr << "Error removing directory \"" << args[2] << "\".\n"; @@ -486,7 +486,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Remove file - else if (args[1] == "remove" && args.size() > 2) { + if (args[1] == "remove" && args.size() > 2) { bool force = false; for (std::string::size_type cc = 2; cc < args.size(); cc++) { if (args[cc] == "\\-f" || args[cc] == "-f") { @@ -502,8 +502,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } return 0; } + // Touch file - else if (args[1] == "touch" && args.size() > 2) { + if (args[1] == "touch" && args.size() > 2) { for (std::string::size_type cc = 2; cc < args.size(); cc++) { if (!cmSystemTools::Touch(args[cc], true)) { return 1; @@ -511,8 +512,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } return 0; } + // Touch file - else if (args[1] == "touch_nocreate" && args.size() > 2) { + if (args[1] == "touch_nocreate" && args.size() > 2) { for (std::string::size_type cc = 2; cc < args.size(); cc++) { // Complain if the file could not be removed, still exists, // and the -f option was not given. @@ -522,8 +524,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } return 0; } + // capabilities - else if (args[1] == "capabilities") { + if (args[1] == "capabilities") { if (args.size() > 2) { std::cerr << "-E capabilities accepts no additional arguments\n"; return 1; @@ -538,7 +541,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Sleep command - else if (args[1] == "sleep" && args.size() > 2) { + if (args[1] == "sleep" && args.size() > 2) { double total = 0; for (size_t i = 2; i < args.size(); ++i) { double num = 0.0; @@ -559,7 +562,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Clock command - else if (args[1] == "time" && args.size() > 2) { + if (args[1] == "time" && args.size() > 2) { std::vector command(args.begin() + 2, args.end()); clock_t clock_start, clock_finish; @@ -583,8 +586,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) << "\n"; return ret; } + // Command to calculate the md5sum of a file - else if (args[1] == "md5sum" && args.size() >= 3) { + if (args[1] == "md5sum" && args.size() >= 3) { char md5out[32]; int retval = 0; for (std::string::size_type cc = 2; cc < args.size(); cc++) { @@ -606,7 +610,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Command to change directory and run a program. - else if (args[1] == "chdir" && args.size() >= 4) { + if (args[1] == "chdir" && args.size() >= 4) { std::string directory = args[2]; if (!cmSystemTools::FileExists(directory.c_str())) { cmSystemTools::Error("Directory does not exist for chdir command: ", @@ -628,7 +632,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Command to start progress for a build - else if (args[1] == "cmake_progress_start" && args.size() == 4) { + if (args[1] == "cmake_progress_start" && args.size() == 4) { // basically remove the directory std::string dirName = args[2]; dirName += "/Progress"; @@ -660,7 +664,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Command to report progress for a build - else if (args[1] == "cmake_progress_report" && args.size() >= 3) { + if (args[1] == "cmake_progress_report" && args.size() >= 3) { // This has been superseded by cmake_echo_color --progress-* // options. We leave it here to avoid errors if somehow this // is invoked by an existing makefile without regenerating. @@ -669,7 +673,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) // Command to create a symbolic link. Fails on platforms not // supporting them. - else if (args[1] == "create_symlink" && args.size() == 4) { + if (args[1] == "create_symlink" && args.size() == 4) { const char* destinationFileName = args[3].c_str(); if ((cmSystemTools::FileExists(destinationFileName) || cmSystemTools::FileIsSymlink(destinationFileName)) && @@ -690,16 +694,17 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Internal CMake shared library support. - else if (args[1] == "cmake_symlink_library" && args.size() == 5) { + if (args[1] == "cmake_symlink_library" && args.size() == 5) { return cmcmd::SymlinkLibrary(args); } + // Internal CMake versioned executable support. - else if (args[1] == "cmake_symlink_executable" && args.size() == 4) { + if (args[1] == "cmake_symlink_executable" && args.size() == 4) { return cmcmd::SymlinkExecutable(args); } // Internal CMake dependency scanning support. - else if (args[1] == "cmake_depends" && args.size() >= 6) { + if (args[1] == "cmake_depends" && args.size() >= 6) { const bool verbose = isCMakeVerbose(); // Create a cmake object instance to process dependencies. @@ -774,41 +779,47 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Internal CMake link script support. - else if (args[1] == "cmake_link_script" && args.size() >= 3) { + if (args[1] == "cmake_link_script" && args.size() >= 3) { return cmcmd::ExecuteLinkScript(args); } #ifdef CMAKE_BUILD_WITH_CMAKE // Internal CMake ninja dependency scanning support. - else if (args[1] == "cmake_ninja_depends") { + if (args[1] == "cmake_ninja_depends") { return cmcmd_cmake_ninja_depends(args.begin() + 2, args.end()); } // Internal CMake ninja dyndep support. - else if (args[1] == "cmake_ninja_dyndep") { + if (args[1] == "cmake_ninja_dyndep") { return cmcmd_cmake_ninja_dyndep(args.begin() + 2, args.end()); } #endif // Internal CMake unimplemented feature notification. - else if (args[1] == "cmake_unimplemented_variable") { + if (args[1] == "cmake_unimplemented_variable") { std::cerr << "Feature not implemented for this platform."; if (args.size() == 3) { std::cerr << " Variable " << args[2] << " is not set."; } std::cerr << std::endl; return 1; - } else if (args[1] == "vs_link_exe") { + } + + if (args[1] == "vs_link_exe") { return cmcmd::VisualStudioLink(args, 1); - } else if (args[1] == "vs_link_dll") { + } + + if (args[1] == "vs_link_dll") { return cmcmd::VisualStudioLink(args, 2); } + // Internal CMake color makefile support. - else if (args[1] == "cmake_echo_color") { + if (args[1] == "cmake_echo_color") { return cmcmd::ExecuteEchoColor(args); } + #ifdef CMAKE_BUILD_WITH_CMAKE - else if (args[1] == "cmake_autogen" && args.size() >= 4) { + if (args[1] == "cmake_autogen" && args.size() >= 4) { cmQtAutoGenerators autogen; std::string const& config = args[3]; bool autogenSuccess = autogen.Run(args[2], config); @@ -817,7 +828,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) #endif // Tar files - else if (args[1] == "tar" && args.size() > 3) { + if (args[1] == "tar" && args.size() > 3) { const char* knownFormats[] = { "7zip", "gnutar", "pax", "paxr", "zip" }; std::string flags = args[2]; @@ -921,7 +932,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) #endif } return 0; - } else if (args[1] == "server") { + } + + if (args[1] == "server") { const std::string pipePrefix = "--pipe="; bool supportExperimental = false; bool isDebug = false; @@ -958,28 +971,26 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) std::string errorMessage; if (server.Serve(&errorMessage)) { return 0; - } else { - cmSystemTools::Error(errorMessage.c_str()); - return 1; } + cmSystemTools::Error(errorMessage.c_str()); #else static_cast(supportExperimental); static_cast(isDebug); cmSystemTools::Error("CMake was not built with server mode enabled"); - return 1; #endif + return 1; } #if defined(CMAKE_BUILD_WITH_CMAKE) // Internal CMake Fortran module support. - else if (args[1] == "cmake_copy_f90_mod" && args.size() >= 4) { + if (args[1] == "cmake_copy_f90_mod" && args.size() >= 4) { return cmDependsFortran::CopyModule(args) ? 0 : 1; } #endif #if defined(_WIN32) && !defined(__CYGWIN__) // Write registry value - else if (args[1] == "write_regv" && args.size() > 3) { + if (args[1] == "write_regv" && args.size() > 3) { return cmSystemTools::WriteRegistryValue(args[2].c_str(), args[3].c_str()) ? 0 @@ -987,16 +998,21 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Delete registry value - else if (args[1] == "delete_regv" && args.size() > 2) { + if (args[1] == "delete_regv" && args.size() > 2) { return cmSystemTools::DeleteRegistryValue(args[2].c_str()) ? 0 : 1; } + // Remove file - else if (args[1] == "comspec" && args.size() > 2) { + if (args[1] == "comspec" && args.size() > 2) { std::cerr << "Win9x helper \"cmake -E comspec\" no longer supported\n"; return 1; - } else if (args[1] == "env_vs8_wince" && args.size() == 3) { + } + + if (args[1] == "env_vs8_wince" && args.size() == 3) { return cmcmd::WindowsCEEnvironment("8.0", args[2]); - } else if (args[1] == "env_vs9_wince" && args.size() == 3) { + } + + if (args[1] == "env_vs9_wince" && args.size() == 3) { return cmcmd::WindowsCEEnvironment("9.0", args[2]); } #endif ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 20 08:51:08 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 08:51:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-268-g92c3cab Message-ID: <20161020125108.A5243F686D@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 92c3cab223845ca83533bba7b6d73f6180223935 (commit) via e6eecec761afd9c1b275d4adebfd08c2e96412fd (commit) via e3587ee01ddf834805e317c21dc87198f443c00e (commit) via e0a84904eb38e145c3a4d4e4ef5d7aceb3c2d196 (commit) via a91eaf387287a201d421e90d78bcae8836cc6042 (commit) via 27be1d815298ebf343823ff99baa35484da92a85 (commit) via 34433c88e259493a22c59558e1ee052251f2c149 (commit) via cde6eb6249cd3211cb3391860221ec32f985e53b (commit) via a9bf981a4c0ee3aece0b162ba7ebc76ad99330eb (commit) via 17d27893e6fdc70a39a35cad468f332f968e44e7 (commit) via 34bcec39c68b82148635cec94a2f7d49d40edf75 (commit) via 2fe3e55d53989c909be595b00a4749b75886accf (commit) via a49751fb2eed0ca6415b243c35b23201b8060597 (commit) via 0060391dffe824526b1f359db79c66c55e53d0c5 (commit) via 5bc964eddbee7936f05ab758c7ac417fffbe4a3e (commit) via 2dc409964858c96125948082a2c488bd573b8269 (commit) via cb40af5d6fa65dae9421280c05934eafc8a66165 (commit) via 1205f75e3bd9e5ff7051459cac4594ea7c3a9bf9 (commit) via 163991dd83cac6afa0f6dfeec41d885e8b880fc8 (commit) via 51f89932c0adccdc28bc3cb6ccf0248a16d897a2 (commit) from e10439121e9602f77f80531dd60acc781fba5e79 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92c3cab223845ca83533bba7b6d73f6180223935 commit 92c3cab223845ca83533bba7b6d73f6180223935 Merge: e104391 e6eecec Author: Brad King AuthorDate: Thu Oct 20 08:51:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 08:51:04 2016 -0400 Merge topic 'split-cmState' e6eecec7 cmListFileCache: Remove cmState header include e3587ee0 cmTargetPropertyComputer: Add missing include e0a84904 cmState: Split auxiliary classes into separate files a91eaf38 cmState: Port dependents to new cmStateTypes header 27be1d81 cmState: Move extracted declarations to a separate file 34433c88 cmState: Remove compatibility typedefs cde6eb62 cmState: Port dependent code to new cmStateSnapshot name a9bf981a cmState: Move Snapshot type to separate namespace 17d27893 cmState: Port dependent code to new cmStateDirectory name 34bcec39 cmState: Move Directory class to separate namespace 2fe3e55d cmState: Move CacheEntryType enum to separate namespace a49751fb cmState: Move TargetType enum to separate namespace 0060391d cmState: Move SnapshotType enum to separate namespace 5bc964ed cmState: Move PositionType to separate namespace 2dc40996 cmState: Move PolicyStackEntry to separate namespace cb40af5d cmState: Move SnapshotDataType to separate namespace ... ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 5 + Source/CPack/cmCPackGenerator.cxx | 2 +- Source/CPack/cpack.cxx | 1 + Source/CTest/cmCTestLaunch.cxx | 2 +- Source/CTest/cmCTestScriptHandler.cxx | 3 +- Source/CTest/cmCTestSubmitHandler.cxx | 1 + Source/CTest/cmCTestTestHandler.cxx | 1 + Source/CursesDialog/cmCursesBoolWidget.cxx | 4 +- .../CursesDialog/cmCursesCacheEntryComposite.cxx | 11 +- Source/CursesDialog/cmCursesDummyWidget.cxx | 4 +- Source/CursesDialog/cmCursesFilePathWidget.cxx | 4 +- Source/CursesDialog/cmCursesMainForm.cxx | 32 +- Source/CursesDialog/cmCursesMainForm.h | 4 +- Source/CursesDialog/cmCursesOptionsWidget.cxx | 4 +- Source/CursesDialog/cmCursesPathWidget.cxx | 6 +- Source/CursesDialog/cmCursesStringWidget.cxx | 4 +- Source/CursesDialog/cmCursesWidget.h | 6 +- Source/QtDialog/QCMake.cxx | 26 +- Source/cmAddExecutableCommand.cxx | 6 +- Source/cmAddLibraryCommand.cxx | 64 +- Source/cmBuildCommand.cxx | 2 +- Source/cmBuildNameCommand.cxx | 4 +- Source/cmCMakePolicyCommand.cxx | 3 +- Source/cmCPluginAPI.cxx | 22 +- Source/cmCTest.cxx | 3 +- Source/cmCacheManager.cxx | 34 +- Source/cmCacheManager.h | 19 +- Source/cmCommonTargetGenerator.cxx | 5 +- Source/cmComputeLinkDepends.cxx | 6 +- Source/cmComputeLinkInformation.cxx | 46 +- Source/cmComputeTargetDepends.cxx | 21 +- Source/cmConditionEvaluator.cxx | 1 + Source/cmCoreTryCompile.cxx | 40 +- Source/cmCoreTryCompile.h | 2 +- Source/cmCustomCommandGenerator.cxx | 8 +- Source/cmDefinePropertyCommand.cxx | 1 + Source/cmDependsFortran.cxx | 1 + Source/cmExportBuildAndroidMKGenerator.cxx | 24 +- Source/cmExportBuildFileGenerator.cxx | 10 +- Source/cmExportCommand.cxx | 4 +- Source/cmExportFileGenerator.cxx | 20 +- Source/cmExportInstallAndroidMKGenerator.cxx | 2 +- Source/cmExportInstallFileGenerator.cxx | 8 +- Source/cmExportLibraryDependenciesCommand.cxx | 4 +- Source/cmExportTryCompileFileGenerator.cxx | 4 +- Source/cmExtraCodeBlocksGenerator.cxx | 44 +- Source/cmExtraCodeLiteGenerator.cxx | 34 +- Source/cmExtraEclipseCDT4Generator.cxx | 36 +- Source/cmExtraKateGenerator.cxx | 16 +- Source/cmExtraSublimeTextGenerator.cxx | 16 +- Source/cmFindBase.cxx | 3 +- Source/cmFindLibraryCommand.cxx | 7 +- Source/cmFindPackageCommand.cxx | 3 +- Source/cmFindPathCommand.cxx | 7 +- Source/cmFindProgramCommand.cxx | 6 +- Source/cmGeneratorExpressionNode.cxx | 20 +- Source/cmGeneratorTarget.cxx | 190 ++-- Source/cmGeneratorTarget.h | 6 +- Source/cmGetCMakePropertyCommand.cxx | 2 +- Source/cmGetFilenameComponentCommand.cxx | 12 +- Source/cmGetPropertyCommand.cxx | 1 + Source/cmGhsMultiTargetGenerator.cxx | 8 +- Source/cmGlobalBorlandMakefileGenerator.cxx | 1 + Source/cmGlobalGenerator.cxx | 55 +- Source/cmGlobalGenerator.h | 11 +- Source/cmGlobalJOMMakefileGenerator.cxx | 1 + Source/cmGlobalKdevelopGenerator.cxx | 4 +- Source/cmGlobalMSYSMakefileGenerator.cxx | 1 + Source/cmGlobalMinGWMakefileGenerator.cxx | 1 + Source/cmGlobalNMakeMakefileGenerator.cxx | 1 + Source/cmGlobalNinjaGenerator.cxx | 43 +- Source/cmGlobalNinjaGenerator.h | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 80 +- Source/cmGlobalUnixMakefileGenerator3.h | 6 +- Source/cmGlobalVisualStudio11Generator.cxx | 5 +- Source/cmGlobalVisualStudio11Generator.h | 2 +- Source/cmGlobalVisualStudio71Generator.cxx | 2 +- Source/cmGlobalVisualStudio71Generator.h | 2 +- Source/cmGlobalVisualStudio7Generator.cxx | 15 +- Source/cmGlobalVisualStudio7Generator.h | 2 +- Source/cmGlobalVisualStudio8Generator.cxx | 10 +- Source/cmGlobalVisualStudio8Generator.h | 4 +- Source/cmGlobalVisualStudioGenerator.cxx | 22 +- Source/cmGlobalWatcomWMakeGenerator.cxx | 1 + Source/cmGlobalXCodeGenerator.cxx | 139 +-- Source/cmGraphVizWriter.cxx | 18 +- Source/cmGraphVizWriter.h | 4 +- Source/cmIncludeExternalMSProjectCommand.cxx | 6 +- Source/cmInstallCommand.cxx | 26 +- Source/cmInstallTargetGenerator.cxx | 46 +- Source/cmLinkLineComputer.cxx | 6 +- Source/cmLinkLineComputer.h | 6 +- Source/cmListFileCache.cxx | 7 +- Source/cmListFileCache.h | 12 +- Source/cmLoadCacheCommand.cxx | 2 +- Source/cmLocalGenerator.cxx | 70 +- Source/cmLocalGenerator.h | 6 +- Source/cmLocalGhsMultiGenerator.cxx | 2 +- Source/cmLocalNinjaGenerator.cxx | 3 +- Source/cmLocalUnixMakefileGenerator3.cxx | 20 +- Source/cmLocalVisualStudio10Generator.cxx | 4 +- Source/cmLocalVisualStudio7Generator.cxx | 79 +- Source/cmLocalVisualStudioGenerator.cxx | 4 +- Source/cmMSVC60LinkLineComputer.cxx | 2 +- Source/cmMSVC60LinkLineComputer.h | 2 +- Source/cmMakefile.cxx | 76 +- Source/cmMakefile.h | 18 +- Source/cmMakefileExecutableTargetGenerator.cxx | 1 + Source/cmMakefileLibraryTargetGenerator.cxx | 35 +- Source/cmMakefileTargetGenerator.cxx | 31 +- Source/cmMakefileTargetGenerator.h | 2 +- Source/cmMarkAsAdvancedCommand.cxx | 2 +- Source/cmNinjaLinkLineComputer.cxx | 2 +- Source/cmNinjaLinkLineComputer.h | 2 +- Source/cmNinjaNormalTargetGenerator.cxx | 45 +- Source/cmNinjaTargetGenerator.cxx | 29 +- Source/cmNinjaUtilityTargetGenerator.cxx | 4 +- Source/cmOptionCommand.cxx | 4 +- Source/cmOutputConverter.cxx | 6 +- Source/cmOutputConverter.h | 8 +- Source/cmPolicies.cxx | 3 +- Source/cmProjectCommand.cxx | 6 +- Source/cmQtAutoGeneratorInitializer.cxx | 1 + Source/cmQtAutoGenerators.cxx | 4 +- Source/cmServerProtocol.cxx | 3 +- Source/cmSetCommand.cxx | 9 +- Source/cmSiteNameCommand.cxx | 3 +- Source/cmSourceFile.cxx | 1 + Source/cmState.cxx | 1127 ++------------------ Source/cmState.h | 234 +--- Source/cmStateDirectory.cxx | 518 +++++++++ Source/cmStateDirectory.h | 82 ++ Source/cmStatePrivate.h | 94 ++ Source/cmStateSnapshot.cxx | 415 +++++++ Source/cmStateSnapshot.h | 88 ++ Source/cmStateTypes.h | 55 + Source/cmTarget.cxx | 96 +- Source/cmTarget.h | 10 +- Source/cmTargetLinkLibrariesCommand.cxx | 16 +- Source/cmTargetPropCommandBase.cxx | 14 +- Source/cmTargetPropertyComputer.cxx | 6 +- Source/cmTargetPropertyComputer.h | 13 +- Source/cmTest.cxx | 1 + Source/cmTestGenerator.cxx | 4 +- Source/cmTryRunCommand.cxx | 11 +- Source/cmUtilitySourceCommand.cxx | 6 +- Source/cmVisualStudio10TargetGenerator.cxx | 106 +- Source/cmake.cxx | 56 +- Source/cmake.h | 13 +- Source/cmakemain.cxx | 6 +- Source/cmcmd.cxx | 4 +- bootstrap | 2 + 152 files changed, 2552 insertions(+), 2350 deletions(-) create mode 100644 Source/cmStateDirectory.cxx create mode 100644 Source/cmStateDirectory.h create mode 100644 Source/cmStatePrivate.h create mode 100644 Source/cmStateSnapshot.cxx create mode 100644 Source/cmStateSnapshot.h create mode 100644 Source/cmStateTypes.h hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 20 08:51:12 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 08:51:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-271-ga5f4463 Message-ID: <20161020125112.2CCEEF6870@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 a5f4463eedc31f6f552b7f7837212661349898df (commit) via effa6c8343fb871574cb5471de5eb4c1705dd334 (commit) via fb461cacba5afe98fd9871d4b8ab0500d825ad5a (commit) from 92c3cab223845ca83533bba7b6d73f6180223935 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5f4463eedc31f6f552b7f7837212661349898df commit a5f4463eedc31f6f552b7f7837212661349898df Merge: 92c3cab effa6c8 Author: Brad King AuthorDate: Thu Oct 20 08:51:09 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 08:51:09 2016 -0400 Merge topic 'clang-tidy' effa6c83 fix more issues reported by clang-tidy fb461cac silence selected clang-tidy violations ----------------------------------------------------------------------- Summary of changes: Source/CPack/IFW/cmCPackIFWInstaller.cxx | 2 +- Source/cmExtraCodeLiteGenerator.cxx | 10 +-- Source/cmFileCommand.cxx | 54 ++++++++++------ Source/cmFileMonitor.cxx | 4 +- Source/cmGeneratorExpressionDAGChecker.cxx | 5 +- Source/cmGeneratorExpressionNode.cxx | 4 +- Source/cmGeneratorTarget.cxx | 2 +- Source/cmGetPropertyCommand.cxx | 2 +- Source/cmGetTargetPropertyCommand.cxx | 2 +- Source/cmNinjaTargetGenerator.cxx | 6 +- Source/cmServerProtocol.cxx | 22 ++++--- Source/cmTarget.cxx | 12 ++-- Source/cmTargetPropertyComputer.h | 6 +- Source/cmcmd.cxx | 92 ++++++++++++++++------------ 14 files changed, 136 insertions(+), 87 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 20 08:51:15 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 08:51:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-273-g090c871 Message-ID: <20161020125115.3BB74F6871@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 090c8712435f19d3cb7e23a7ca67ba21313ee0c8 (commit) via 3a9e92bce1c10e0082d431a61e100485fd6cf270 (commit) from a5f4463eedc31f6f552b7f7837212661349898df (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=090c8712435f19d3cb7e23a7ca67ba21313ee0c8 commit 090c8712435f19d3cb7e23a7ca67ba21313ee0c8 Merge: a5f4463 3a9e92b Author: Brad King AuthorDate: Thu Oct 20 08:51:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 08:51:12 2016 -0400 Merge topic 'ninja-only-object-rules' 3a9e92bc Ninja: Add compile rules only for languages that are actually compiled ----------------------------------------------------------------------- Summary of changes: Source/cmNinjaNormalTargetGenerator.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 20 08:51:18 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 08:51:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-275-g72dac53 Message-ID: <20161020125118.1728BF687A@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 72dac5365e97f2223037e6d3c37de78328883f32 (commit) via 63d215dfa8373899d0d35f2c28ea0aa7a672be8c (commit) from 090c8712435f19d3cb7e23a7ca67ba21313ee0c8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72dac5365e97f2223037e6d3c37de78328883f32 commit 72dac5365e97f2223037e6d3c37de78328883f32 Merge: 090c871 63d215d Author: Brad King AuthorDate: Thu Oct 20 08:51:15 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 08:51:15 2016 -0400 Merge topic 'external-project-configure-command-extraction' 63d215df ExternalProject: support extracting the configure command ----------------------------------------------------------------------- Summary of changes: Modules/ExternalProject.cmake | 47 +++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 20 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 20 08:51:21 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 08:51:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-278-gfc7ecd6 Message-ID: <20161020125121.71E9BF687A@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 fc7ecd6b0570d91a31221203e4bbaf7e48006662 (commit) via e89fbfaf6626b0693cc597ce4e705d87b8faf996 (commit) via 64aa29b7d682c333653ee4720e07914396ec3da7 (commit) from 72dac5365e97f2223037e6d3c37de78328883f32 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc7ecd6b0570d91a31221203e4bbaf7e48006662 commit fc7ecd6b0570d91a31221203e4bbaf7e48006662 Merge: 72dac53 e89fbfa Author: Brad King AuthorDate: Thu Oct 20 08:51:18 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 08:51:18 2016 -0400 Merge topic 'external-project-clone-progress' e89fbfaf ExternalProject: support GIT_PROGRESS argument 64aa29b7 ExternalProject: fix typo ----------------------------------------------------------------------- Summary of changes: Help/release/dev/external-project-clone-progress.rst | 5 +++++ Modules/ExternalProject.cmake | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 Help/release/dev/external-project-clone-progress.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 20 08:51:26 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 08:51:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-281-g7aa9961 Message-ID: <20161020125126.43632F6881@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 7aa9961939f99c915485d86e460b9941f949d59c (commit) via f27492a4db2c56f334b2ca5c746b01b8e9a04995 (commit) via 4f78b9ff2df89d5b4104f92251feb0a7f0976d7f (commit) from fc7ecd6b0570d91a31221203e4bbaf7e48006662 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7aa9961939f99c915485d86e460b9941f949d59c commit 7aa9961939f99c915485d86e460b9941f949d59c Merge: fc7ecd6 f27492a Author: Brad King AuthorDate: Thu Oct 20 08:51:24 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 08:51:24 2016 -0400 Merge topic 'vs-csharp-prep' f27492a4 VS: Add internal API for detecting "managed" projects 4f78b9ff VS: Add CSharp project uuid and file extension ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio71Generator.cxx | 4 ++++ Source/cmGlobalVisualStudioGenerator.cxx | 21 +++++++++++++++++++++ Source/cmGlobalVisualStudioGenerator.h | 3 +++ Source/cmVisualStudioGeneratorOptions.cxx | 5 +++++ Source/cmVisualStudioGeneratorOptions.h | 1 + 5 files changed, 34 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 20 08:51:42 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 08:51:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-631-g8188561 Message-ID: <20161020125142.67341F6893@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 81885619e30455a26655c604901160dfc7455c34 (commit) via 7aa9961939f99c915485d86e460b9941f949d59c (commit) via fc7ecd6b0570d91a31221203e4bbaf7e48006662 (commit) via 72dac5365e97f2223037e6d3c37de78328883f32 (commit) via 090c8712435f19d3cb7e23a7ca67ba21313ee0c8 (commit) via a5f4463eedc31f6f552b7f7837212661349898df (commit) via 92c3cab223845ca83533bba7b6d73f6180223935 (commit) via e10439121e9602f77f80531dd60acc781fba5e79 (commit) from 032d3b4030b97fefcf4a808c541344405efbdeda (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81885619e30455a26655c604901160dfc7455c34 commit 81885619e30455a26655c604901160dfc7455c34 Merge: 032d3b4 7aa9961 Author: Brad King AuthorDate: Thu Oct 20 08:51:32 2016 -0400 Commit: Brad King CommitDate: Thu Oct 20 08:51:32 2016 -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 Oct 20 11:09:36 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 11:09:36 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-634-gb4f9572 Message-ID: <20161020150936.C90DCF5951@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 b4f95726130a6241e65be94083866176d8c431e1 (commit) via 010560be6674def3ce02d05dcf2331230d0c4e91 (commit) via 2d3aa94225e259c9bc1c0d469e6326b476d225c1 (commit) from 81885619e30455a26655c604901160dfc7455c34 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b4f95726130a6241e65be94083866176d8c431e1 commit b4f95726130a6241e65be94083866176d8c431e1 Merge: 8188561 010560b Author: Brad King AuthorDate: Thu Oct 20 11:09:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 11:09:31 2016 -0400 Merge topic 'ninja-diagnose-missing-tool' into next 010560be Ninja: Fail early on when ninja build tool does not run 2d3aa942 cmGlobalGenerator: Allow FindMakeProgram to fail https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=010560be6674def3ce02d05dcf2331230d0c4e91 commit 010560be6674def3ce02d05dcf2331230d0c4e91 Author: Brad King AuthorDate: Thu Oct 20 10:38:00 2016 -0400 Commit: Brad King CommitDate: Thu Oct 20 11:04:21 2016 -0400 Ninja: Fail early on when ninja build tool does not run Diagnose failure to run `ninja --version` and abort early. Otherwise we end up aborting with a confusing message about ninja version "" being too old. Closes: #16378 diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 50550aa..f023a2a 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -564,8 +564,17 @@ bool cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf) command.push_back(this->NinjaCommand); command.push_back("--version"); std::string version; - cmSystemTools::RunSingleCommand(command, &version, CM_NULLPTR, CM_NULLPTR, - CM_NULLPTR, cmSystemTools::OUTPUT_NONE); + std::string error; + if (!cmSystemTools::RunSingleCommand(command, &version, &error, CM_NULLPTR, + CM_NULLPTR, + cmSystemTools::OUTPUT_NONE)) { + mf->IssueMessage(cmake::FATAL_ERROR, "Running\n '" + + cmJoin(command, "' '") + "'\n" + "failed with:\n " + + error); + cmSystemTools::SetFatalErrorOccured(); + return false; + } this->NinjaVersion = cmSystemTools::TrimWhitespace(version); this->CheckNinjaFeatures(); } diff --git a/Tests/RunCMake/Ninja/NinjaToolMissing-result.txt b/Tests/RunCMake/Ninja/NinjaToolMissing-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Ninja/NinjaToolMissing-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Ninja/NinjaToolMissing-stderr.txt b/Tests/RunCMake/Ninja/NinjaToolMissing-stderr.txt new file mode 100644 index 0000000..1214288 --- /dev/null +++ b/Tests/RunCMake/Ninja/NinjaToolMissing-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at CMakeLists.txt:[0-9]+ \(project\): + Running + + 'ninja-tool-missing' '--version' + + failed with: diff --git a/Tests/RunCMake/Ninja/NinjaToolMissing.cmake b/Tests/RunCMake/Ninja/NinjaToolMissing.cmake new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 778f2c1..446dc3c 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -15,6 +15,12 @@ else() message(FATAL_ERROR "'ninja --version' reported:\n${ninja_out}") endif() +function(run_NinjaToolMissing) + set(RunCMake_MAKE_PROGRAM ninja-tool-missing) + run_cmake(NinjaToolMissing) +endfunction() +run_NinjaToolMissing() + function(run_CMP0058 case) # Use a single build tree for a few tests without cleaning. set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0058-${case}-build) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d3aa94225e259c9bc1c0d469e6326b476d225c1 commit 2d3aa94225e259c9bc1c0d469e6326b476d225c1 Author: Brad King AuthorDate: Thu Oct 20 10:36:26 2016 -0400 Commit: Brad King CommitDate: Thu Oct 20 10:37:27 2016 -0400 cmGlobalGenerator: Allow FindMakeProgram to fail Revise its signature to return `bool` so that it can fail and abort configuration early. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index b4ede1d..cf51c6a 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -269,12 +269,13 @@ bool cmGlobalGenerator::IsExportedTargetsFile( } // Find the make program for the generator, required for try compiles -void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) +bool cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) { if (this->FindMakeProgramFile.empty()) { cmSystemTools::Error( "Generator implementation error, " "all generators must specify this->FindMakeProgramFile"); + return false; } if (!mf->GetDefinition("CMAKE_MAKE_PROGRAM") || cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) { @@ -292,7 +293,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) << "probably need to select a different build tool."; cmSystemTools::Error(err.str().c_str()); cmSystemTools::SetFatalErrorOccured(); - return; + return false; } std::string makeProgram = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); // if there are spaces in the make program use short path @@ -311,6 +312,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) mf->AddCacheDefinition("CMAKE_MAKE_PROGRAM", makeProgram.c_str(), "make program", cmStateEnums::FILEPATH); } + return true; } bool cmGlobalGenerator::CheckLanguages( @@ -426,7 +428,9 @@ void cmGlobalGenerator::EnableLanguage( mf->AddDefinition("CMAKE_PLATFORM_INFO_DIR", rootBin.c_str()); // find and make sure CMAKE_MAKE_PROGRAM is defined - this->FindMakeProgram(mf); + if (!this->FindMakeProgram(mf)) { + return; + } if (!this->CheckLanguages(languages, mf)) { return; diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 9cc6724..d8d47a1 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -250,7 +250,7 @@ public: /* * Determine what program to use for building the project. */ - virtual void FindMakeProgram(cmMakefile*); + virtual bool FindMakeProgram(cmMakefile*); ///! Find a target by name by searching the local generators. cmTarget* FindTarget(const std::string& name, diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index d4ae677..6bbfed5 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -73,7 +73,7 @@ void cmGlobalGhsMultiGenerator::EnableLanguage( this->cmGlobalGenerator::EnableLanguage(l, mf, optional); } -void cmGlobalGhsMultiGenerator::FindMakeProgram(cmMakefile* mf) +bool cmGlobalGhsMultiGenerator::FindMakeProgram(cmMakefile* mf) { // The GHS generator knows how to lookup its build tool // directly instead of needing a helper module to do it, so we @@ -82,6 +82,7 @@ void cmGlobalGhsMultiGenerator::FindMakeProgram(cmMakefile* mf) mf->AddDefinition("CMAKE_MAKE_PROGRAM", this->GetGhsBuildCommand().c_str()); } + return true; } std::string const& cmGlobalGhsMultiGenerator::GetGhsBuildCommand() diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h index 27a40ba..7b3eebb 100644 --- a/Source/cmGlobalGhsMultiGenerator.h +++ b/Source/cmGlobalGhsMultiGenerator.h @@ -57,7 +57,7 @@ public: /* * Determine what program to use for building the project. */ - virtual void FindMakeProgram(cmMakefile*); + bool FindMakeProgram(cmMakefile* mf) CM_OVERRIDE; cmGeneratedFileStream* GetBuildFileStream() { diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index b90428d..50550aa 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -553,9 +553,11 @@ void cmGlobalNinjaGenerator::Generate() this->CloseBuildFileStream(); } -void cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf) +bool cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf) { - this->cmGlobalGenerator::FindMakeProgram(mf); + if (!this->cmGlobalGenerator::FindMakeProgram(mf)) { + return false; + } if (const char* ninjaCommand = mf->GetDefinition("CMAKE_MAKE_PROGRAM")) { this->NinjaCommand = ninjaCommand; std::vector command; @@ -567,6 +569,7 @@ void cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf) this->NinjaVersion = cmSystemTools::TrimWhitespace(version); this->CheckNinjaFeatures(); } + return true; } void cmGlobalNinjaGenerator::CheckNinjaFeatures() diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index d4a14e2..8613cb4 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -357,7 +357,7 @@ protected: private: std::string GetEditCacheCommand() const CM_OVERRIDE; - void FindMakeProgram(cmMakefile* mf) CM_OVERRIDE; + bool FindMakeProgram(cmMakefile* mf) CM_OVERRIDE; void CheckNinjaFeatures(); bool CheckLanguages(std::vector const& languages, cmMakefile* mf) const CM_OVERRIDE; diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 02ffa41..7af971e 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -357,11 +357,14 @@ cmGlobalVisualStudio10Generator::GetPlatformToolsetHostArchitecture() const return CM_NULLPTR; } -void cmGlobalVisualStudio10Generator::FindMakeProgram(cmMakefile* mf) +bool cmGlobalVisualStudio10Generator::FindMakeProgram(cmMakefile* mf) { - this->cmGlobalVisualStudio8Generator::FindMakeProgram(mf); + if (!this->cmGlobalVisualStudio8Generator::FindMakeProgram(mf)) { + return false; + } mf->AddDefinition("CMAKE_VS_MSBUILD_COMMAND", this->GetMSBuildCommand().c_str()); + return true; } std::string const& cmGlobalVisualStudio10Generator::GetMSBuildCommand() diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index f8a50ac..62b8661 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -84,7 +84,7 @@ public: virtual const char* GetToolsVersion() { return "4.0"; } - virtual void FindMakeProgram(cmMakefile*); + bool FindMakeProgram(cmMakefile* mf) CM_OVERRIDE; static std::string GetInstalledNsightTegraVersion(); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 51cb315..773f8a0 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -123,11 +123,14 @@ void cmGlobalVisualStudio7Generator::EnableLanguage( } } -void cmGlobalVisualStudio7Generator::FindMakeProgram(cmMakefile* mf) +bool cmGlobalVisualStudio7Generator::FindMakeProgram(cmMakefile* mf) { - this->cmGlobalVisualStudioGenerator::FindMakeProgram(mf); + if (!this->cmGlobalVisualStudioGenerator::FindMakeProgram(mf)) { + return false; + } mf->AddDefinition("CMAKE_VS_DEVENV_COMMAND", this->GetDevEnvCommand().c_str()); + return true; } std::string const& cmGlobalVisualStudio7Generator::GetDevEnvCommand() diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 4d588e6..62194c3 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -91,7 +91,7 @@ public: const char* GetIntelProjectVersion(); - virtual void FindMakeProgram(cmMakefile*); + bool FindMakeProgram(cmMakefile* mf) CM_OVERRIDE; /** Is the Microsoft Assembler enabled? */ bool IsMasmEnabled() const { return this->MasmEnabled; } diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 67c355b..354ada9 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -395,7 +395,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( } } -void cmGlobalVisualStudioGenerator::FindMakeProgram(cmMakefile* mf) +bool cmGlobalVisualStudioGenerator::FindMakeProgram(cmMakefile* mf) { // Visual Studio generators know how to lookup their build tool // directly instead of needing a helper module to do it, so we @@ -403,6 +403,7 @@ void cmGlobalVisualStudioGenerator::FindMakeProgram(cmMakefile* mf) if (cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) { mf->AddDefinition("CMAKE_MAKE_PROGRAM", this->GetVSMakeProgram().c_str()); } + return true; } std::string cmGlobalVisualStudioGenerator::GetUtilityDepend( diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index c8fc984..0e88bce 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -102,7 +102,7 @@ public: }; class OrderedTargetDependSet; - virtual void FindMakeProgram(cmMakefile*); + bool FindMakeProgram(cmMakefile*) CM_OVERRIDE; virtual std::string ExpandCFGIntDir(const std::string& str, const std::string& config) const; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 6de4caa..8424ded 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -182,7 +182,7 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator( #endif } -void cmGlobalXCodeGenerator::FindMakeProgram(cmMakefile* mf) +bool cmGlobalXCodeGenerator::FindMakeProgram(cmMakefile* mf) { // The Xcode generator knows how to lookup its build tool // directly instead of needing a helper module to do it, so we @@ -191,6 +191,7 @@ void cmGlobalXCodeGenerator::FindMakeProgram(cmMakefile* mf) mf->AddDefinition("CMAKE_MAKE_PROGRAM", this->GetXcodeBuildCommand().c_str()); } + return true; } std::string const& cmGlobalXCodeGenerator::GetXcodeBuildCommand() diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index dbd5205..ded8073 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -58,7 +58,7 @@ public: const std::string& suffix, std::string& dir); - virtual void FindMakeProgram(cmMakefile*); + bool FindMakeProgram(cmMakefile*) CM_OVERRIDE; ///! What is the configurations directory variable called? virtual const char* GetCMakeCFGIntDir() const; ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalGenerator.cxx | 10 +++++++--- Source/cmGlobalGenerator.h | 2 +- Source/cmGlobalGhsMultiGenerator.cxx | 3 ++- Source/cmGlobalGhsMultiGenerator.h | 2 +- Source/cmGlobalNinjaGenerator.cxx | 20 ++++++++++++++++---- Source/cmGlobalNinjaGenerator.h | 2 +- Source/cmGlobalVisualStudio10Generator.cxx | 7 +++++-- Source/cmGlobalVisualStudio10Generator.h | 2 +- Source/cmGlobalVisualStudio7Generator.cxx | 7 +++++-- Source/cmGlobalVisualStudio7Generator.h | 2 +- Source/cmGlobalVisualStudioGenerator.cxx | 3 ++- Source/cmGlobalVisualStudioGenerator.h | 2 +- Source/cmGlobalXCodeGenerator.cxx | 3 ++- Source/cmGlobalXCodeGenerator.h | 2 +- .../NinjaToolMissing-result.txt} | 0 Tests/RunCMake/Ninja/NinjaToolMissing-stderr.txt | 6 ++++++ .../RunCMake/Ninja/NinjaToolMissing.cmake | 0 Tests/RunCMake/Ninja/RunCMakeTest.cmake | 6 ++++++ 18 files changed, 58 insertions(+), 21 deletions(-) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => Ninja/NinjaToolMissing-result.txt} (100%) create mode 100644 Tests/RunCMake/Ninja/NinjaToolMissing-stderr.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Ninja/NinjaToolMissing.cmake (100%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 20 13:36:15 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 13:36:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-636-gdfe2e25 Message-ID: <20161020173615.D8E2CF73A2@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 dfe2e256cdfdec77894e0fb7832279c996b3d81e (commit) via ced77d2bbd07d195f563217bea1930e29472fd4d (commit) from b4f95726130a6241e65be94083866176d8c431e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dfe2e256cdfdec77894e0fb7832279c996b3d81e commit dfe2e256cdfdec77894e0fb7832279c996b3d81e Merge: b4f9572 ced77d2 Author: Brad King AuthorDate: Thu Oct 20 13:36:14 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 13:36:14 2016 -0400 Merge topic 'ninja-encoding' into next ced77d2b Ninja: Use ANSI encoding for Ninja build files on Windows https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ced77d2bbd07d195f563217bea1930e29472fd4d commit ced77d2bbd07d195f563217bea1930e29472fd4d Author: D?vis Mos?ns AuthorDate: Wed Oct 19 23:51:51 2016 +0300 Commit: Brad King CommitDate: Thu Oct 20 13:13:48 2016 -0400 Ninja: Use ANSI encoding for Ninja build files on Windows Pass ANSI encoding to cmGeneratedFileStream for use with Ninja generator. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index b90428d..22302fb 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -496,6 +496,18 @@ cmLocalGenerator* cmGlobalNinjaGenerator::CreateLocalGenerator(cmMakefile* mf) return new cmLocalNinjaGenerator(this, mf); } +codecvt::Encoding cmGlobalNinjaGenerator::GetMakefileEncoding() const +{ +#ifdef _WIN32 + // Ninja on Windows does not support non-ANSI characters. + // https://github.com/ninja-build/ninja/issues/1195 + return codecvt::ANSI; +#else + // No encoding conversion needed on other platforms. + return codecvt::None; +#endif +} + void cmGlobalNinjaGenerator::GetDocumentation(cmDocumentationEntry& entry) { entry.Name = cmGlobalNinjaGenerator::GetActualName(); @@ -754,7 +766,8 @@ void cmGlobalNinjaGenerator::OpenBuildFileStream() // Get a stream where to generate things. if (!this->BuildFileStream) { - this->BuildFileStream = new cmGeneratedFileStream(buildFilePath.c_str()); + this->BuildFileStream = new cmGeneratedFileStream( + buildFilePath.c_str(), false, this->GetMakefileEncoding()); if (!this->BuildFileStream) { // An error message is generated by the constructor if it cannot // open the file. @@ -791,7 +804,8 @@ void cmGlobalNinjaGenerator::OpenRulesFileStream() // Get a stream where to generate things. if (!this->RulesFileStream) { - this->RulesFileStream = new cmGeneratedFileStream(rulesFilePath.c_str()); + this->RulesFileStream = new cmGeneratedFileStream( + rulesFilePath.c_str(), false, this->GetMakefileEncoding()); if (!this->RulesFileStream) { // An error message is generated by the constructor if it cannot // open the file. diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index d4a14e2..3d13e0b 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -186,6 +186,9 @@ public: static std::string GetActualName() { return "Ninja"; } + /** Get encoding used by generator for ninja files */ + codecvt::Encoding GetMakefileEncoding() const CM_OVERRIDE; + static void GetDocumentation(cmDocumentationEntry& entry); void EnableLanguage(std::vector const& languages, ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalNinjaGenerator.cxx | 18 ++++++++++++++++-- Source/cmGlobalNinjaGenerator.h | 3 +++ 2 files changed, 19 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 20 13:39:26 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 20 Oct 2016 13:39:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-640-g9f2c6ee Message-ID: <20161020173926.DA732F52C2@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 9f2c6ee4d0a389aa89f94754f50a59674ab06e67 (commit) via 587ab3221300f04a4de0756dc1a44fa0eac9c0d2 (commit) via 149d49ea7c009f9965d9be91cdac8ee6cd2cfb91 (commit) via 60d73393a50944c1e81472d7e80a458bcb898554 (commit) from dfe2e256cdfdec77894e0fb7832279c996b3d81e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f2c6ee4d0a389aa89f94754f50a59674ab06e67 commit 9f2c6ee4d0a389aa89f94754f50a59674ab06e67 Merge: dfe2e25 587ab32 Author: Brad King AuthorDate: Thu Oct 20 13:39:25 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 20 13:39:25 2016 -0400 Merge topic 'allow-fallback-config-mapping' into next 587ab322 Tests: Add test for MAP_IMPORTED_CONFIG_ empty fallback 149d49ea Teach MAP_IMPORTED_CONFIG_ to support configuration-less import 60d73393 Help: Format MAP_IMPORTED_CONFIG_ documentation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=587ab3221300f04a4de0756dc1a44fa0eac9c0d2 commit 587ab3221300f04a4de0756dc1a44fa0eac9c0d2 Author: Brad King AuthorDate: Thu Oct 20 11:49:57 2016 -0400 Commit: Brad King CommitDate: Thu Oct 20 11:51:11 2016 -0400 Tests: Add test for MAP_IMPORTED_CONFIG_ empty fallback diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt index 27f33a2..4f2f434 100644 --- a/Tests/GeneratorExpression/CMakeLists.txt +++ b/Tests/GeneratorExpression/CMakeLists.txt @@ -171,6 +171,13 @@ add_executable(Alias::SomeExe ALIAS someexe) add_library(Alias::SomeLib ALIAS empty1) +add_library(importedFallback STATIC IMPORTED) +set_property(TARGET importedFallback PROPERTY IMPORTED_LOCATION_DEBUG debug_loc) +set_property(TARGET importedFallback PROPERTY IMPORTED_LOCATION_RELEASE release_loc) +set_property(TARGET importedFallback PROPERTY IMPORTED_LOCATION fallback_loc) +set_property(TARGET importedFallback PROPERTY MAP_IMPORTED_CONFIG_DEBUG "" DEBUG) +set_property(TARGET importedFallback PROPERTY MAP_IMPORTED_CONFIG_RELEASE "") + add_custom_target(check-part3 ALL COMMAND ${CMAKE_COMMAND} -Dtest_version_greater_1=$ @@ -184,6 +191,7 @@ add_custom_target(check-part3 ALL -Dtest_imported_release=$ -Dtest_imported_relwithdebinfo=$ -Dtest_imported_minsizerel=$ + -Dtest_imported_fallback=$,fallback_loc> -Dtest_alias_file_exe=$,$> -Dtest_alias_file_lib=$,$> -Dtest_alias_target_name=$,$> diff --git a/Tests/GeneratorExpression/check-part3.cmake b/Tests/GeneratorExpression/check-part3.cmake index 70ccfe1..e12d8c6 100644 --- a/Tests/GeneratorExpression/check-part3.cmake +++ b/Tests/GeneratorExpression/check-part3.cmake @@ -21,6 +21,8 @@ foreach(c debug release relwithdebinfo minsizerel) endif() endforeach() +check(test_imported_fallback "1") + check(test_alias_file_exe "1") check(test_alias_file_lib "1") check(test_alias_target_name "1") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=149d49ea7c009f9965d9be91cdac8ee6cd2cfb91 commit 149d49ea7c009f9965d9be91cdac8ee6cd2cfb91 Author: Jens Weggemann AuthorDate: Wed Oct 19 03:39:51 2016 +0200 Commit: Brad King CommitDate: Thu Oct 20 11:51:10 2016 -0400 Teach MAP_IMPORTED_CONFIG_ to support configuration-less import If this property has an empty list entry, check for `IMPORTED_LOCATION` instead of `IMPORTED_LOCATION_`. This allows custom imported targets to have some configurations mapped and others fall back to a default location. Closes: #16280 diff --git a/Help/prop_tgt/MAP_IMPORTED_CONFIG_CONFIG.rst b/Help/prop_tgt/MAP_IMPORTED_CONFIG_CONFIG.rst index 9eed069..4da855b 100644 --- a/Help/prop_tgt/MAP_IMPORTED_CONFIG_CONFIG.rst +++ b/Help/prop_tgt/MAP_IMPORTED_CONFIG_CONFIG.rst @@ -10,8 +10,13 @@ imported from another project may not provide the same set of configuration names available in the current project. Setting this property tells CMake what imported configurations are suitable for use when building the ```` configuration. The first configuration in -the list found to be provided by the imported target is selected. If -this property is set and no matching configurations are available, +the list found to be provided by the imported target (i.e. via +:prop_tgt:`IMPORTED_LOCATION_` for the mapped-to ````) +is selected. As a special case, an empty list element refers to the +configuration-less imported target location +(i.e. :prop_tgt:`IMPORTED_LOCATION`). + +If this property is set and no matching configurations are available, then the imported target is considered to be not found. This property is ignored for non-imported targets. diff --git a/Help/release/dev/allow-fallback-config-mapping.rst b/Help/release/dev/allow-fallback-config-mapping.rst new file mode 100644 index 0000000..2522e10 --- /dev/null +++ b/Help/release/dev/allow-fallback-config-mapping.rst @@ -0,0 +1,6 @@ +allow-fallback-config-mapping +----------------------------- + +* The :prop_tgt:`MAP_IMPORTED_CONFIG_` target property learned + to interpret empty list elements as referring to the configuration-less + imported location specified by :prop_tgt:`IMPORTED_LOCATION`. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 3a22309..de30f98 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1395,7 +1395,7 @@ bool cmTarget::GetMappedConfig(std::string const& desired_config, std::string mapProp = "MAP_IMPORTED_CONFIG_"; mapProp += desired_config; if (const char* mapValue = this->GetProperty(mapProp)) { - cmSystemTools::ExpandListArgument(mapValue, mappedConfigs); + cmSystemTools::ExpandListArgument(mapValue, mappedConfigs, true); } } @@ -1408,20 +1408,33 @@ bool cmTarget::GetMappedConfig(std::string const& desired_config, for (std::vector::const_iterator mci = mappedConfigs.begin(); !*loc && !*imp && mci != mappedConfigs.end(); ++mci) { // Look for this configuration. - std::string mcUpper = cmSystemTools::UpperCase(*mci); - std::string locProp = "IMPORTED_LOCATION_"; - locProp += mcUpper; - *loc = this->GetProperty(locProp); - if (allowImp) { - std::string impProp = "IMPORTED_IMPLIB_"; - impProp += mcUpper; - *imp = this->GetProperty(impProp); - } + if (mci->empty()) { + // An empty string in the mapping has a special meaning: + // look up the config-less properties. + *loc = this->GetProperty("IMPORTED_LOCATION"); + if (allowImp) { + *imp = this->GetProperty("IMPORTED_IMPLIB"); + } + // If it was found, set the suffix. + if (*loc || *imp) { + suffix = ""; + } + } else { + std::string mcUpper = cmSystemTools::UpperCase(*mci); + std::string locProp = "IMPORTED_LOCATION_"; + locProp += mcUpper; + *loc = this->GetProperty(locProp); + if (allowImp) { + std::string impProp = "IMPORTED_IMPLIB_"; + impProp += mcUpper; + *imp = this->GetProperty(impProp); + } - // If it was found, use it for all properties below. - if (*loc || *imp) { - suffix = "_"; - suffix += mcUpper; + // If it was found, use it for all properties below. + if (*loc || *imp) { + suffix = "_"; + suffix += mcUpper; + } } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60d73393a50944c1e81472d7e80a458bcb898554 commit 60d73393a50944c1e81472d7e80a458bcb898554 Author: Brad King AuthorDate: Thu Oct 20 11:28:39 2016 -0400 Commit: Brad King CommitDate: Thu Oct 20 11:31:13 2016 -0400 Help: Format MAP_IMPORTED_CONFIG_ documentation diff --git a/Help/prop_tgt/MAP_IMPORTED_CONFIG_CONFIG.rst b/Help/prop_tgt/MAP_IMPORTED_CONFIG_CONFIG.rst index 09ff0ce..9eed069 100644 --- a/Help/prop_tgt/MAP_IMPORTED_CONFIG_CONFIG.rst +++ b/Help/prop_tgt/MAP_IMPORTED_CONFIG_CONFIG.rst @@ -1,19 +1,20 @@ MAP_IMPORTED_CONFIG_ ---------------------------- -Map from project configuration to IMPORTED target's configuration. +Map from project configuration to +:ref:`imported target `'s configuration. Set this to the list of configurations of an imported target that may -be used for the current project's configuration. Targets +be used for the current project's ```` configuration. Targets imported from another project may not provide the same set of configuration names available in the current project. Setting this property tells CMake what imported configurations are suitable for use -when building the configuration. The first configuration in +when building the ```` configuration. The first configuration in the list found to be provided by the imported target is selected. If this property is set and no matching configurations are available, then the imported target is considered to be not found. This property is ignored for non-imported targets. -This property is initialized by the value of the variable -CMAKE_MAP_IMPORTED_CONFIG_ if it is set when a target is -created. +This property is initialized by the value of the +:variable:`CMAKE_MAP_IMPORTED_CONFIG_` variable if it is set when a +target is created. ----------------------------------------------------------------------- Summary of changes: Help/prop_tgt/MAP_IMPORTED_CONFIG_CONFIG.rst | 22 +++++++---- Help/release/dev/allow-fallback-config-mapping.rst | 6 +++ Source/cmTarget.cxx | 41 +++++++++++++------- Tests/GeneratorExpression/CMakeLists.txt | 8 ++++ Tests/GeneratorExpression/check-part3.cmake | 2 + 5 files changed, 57 insertions(+), 22 deletions(-) create mode 100644 Help/release/dev/allow-fallback-config-mapping.rst hooks/post-receive -- CMake From kwrobot at kitware.com Fri Oct 21 00:01:10 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 21 Oct 2016 00:01:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-282-gac394fd Message-ID: <20161021040110.129D0F703B@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 ac394fddab4c4407c08059eb70f6f2363b3c45fc (commit) from 7aa9961939f99c915485d86e460b9941f949d59c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac394fddab4c4407c08059eb70f6f2363b3c45fc commit ac394fddab4c4407c08059eb70f6f2363b3c45fc Author: Kitware Robot AuthorDate: Fri Oct 21 00:01:05 2016 -0400 Commit: Kitware Robot CommitDate: Fri Oct 21 00:01:05 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 223e473..149e14d 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 7) -set(CMake_VERSION_PATCH 20161020) +set(CMake_VERSION_PATCH 20161021) #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 Fri Oct 21 08:44:11 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 21 Oct 2016 08:44:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-642-ga93f28e Message-ID: <20161021124411.1AE43F64C6@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 a93f28e4c0794fdfc1226d774a8ddce57aeef452 (commit) via 43f4326ece5035a5a028a7bb90a67c193804c997 (commit) from 9f2c6ee4d0a389aa89f94754f50a59674ab06e67 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a93f28e4c0794fdfc1226d774a8ddce57aeef452 commit a93f28e4c0794fdfc1226d774a8ddce57aeef452 Merge: 9f2c6ee 43f4326 Author: Brad King AuthorDate: Fri Oct 21 08:43:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 08:43:55 2016 -0400 Merge topic 'android-armeabi-c++_static' into next 43f4326e Android: Fix support for armeabi with c++_static https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43f4326ece5035a5a028a7bb90a67c193804c997 commit 43f4326ece5035a5a028a7bb90a67c193804c997 Author: Brad King AuthorDate: Fri Oct 21 08:23:38 2016 -0400 Commit: Brad King CommitDate: Fri Oct 21 08:42:25 2016 -0400 Android: Fix support for armeabi with c++_static Add missing "unwind" and "atomic" libraries needed for this combination. See `${ndk}/sources/cxx-stl/llvm-libc++/libs/armeabi/libc++.a` for the libraries the NDK uses. Issue: #16380 diff --git a/Modules/Platform/Android/ndk-stl-c++_static.cmake b/Modules/Platform/Android/ndk-stl-c++_static.cmake index 8e562f8..061a5c2 100644 --- a/Modules/Platform/Android/ndk-stl-c++_static.cmake +++ b/Modules/Platform/Android/ndk-stl-c++_static.cmake @@ -3,4 +3,6 @@ macro(__android_stl lang) __android_stl_cxx(${lang} libc++_static.a) __android_stl_lib(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/libc++abi.a" 0) __android_stl_lib(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/libandroid_support.a" 0) + __android_stl_lib(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/libunwind.a" 0) + string(APPEND CMAKE_${lang}_STANDARD_LIBRARIES " -latomic") # provided by toolchain endmacro() diff --git a/Tests/RunCMake/Android/RunCMakeTest.cmake b/Tests/RunCMake/Android/RunCMakeTest.cmake index 39b77cd..86a9896 100644 --- a/Tests/RunCMake/Android/RunCMakeTest.cmake +++ b/Tests/RunCMake/Android/RunCMakeTest.cmake @@ -174,11 +174,6 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK) continue() endif() - # Skip combinations that seem to be broken. - if("${stl};${abi}" MATCHES [[^c\+\+_static;armeabi]]) - continue() - endif() - # Run the tests for this combination. if("${abi}" STREQUAL "armeabi") run_Android(ndk-armeabi-thumb) # default: -DCMAKE_ANDROID_ARCH_ABI=armeabi -DCMAKE_ANDROID_ARM_MODE=0 ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android/ndk-stl-c++_static.cmake | 2 ++ Tests/RunCMake/Android/RunCMakeTest.cmake | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 21 08:59:13 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 21 Oct 2016 08:59:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-284-g97670db Message-ID: <20161021125917.4B60BF6E80@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 97670dbf2fa567998c26686caa4f03b6f4e78967 (commit) via 43f4326ece5035a5a028a7bb90a67c193804c997 (commit) from ac394fddab4c4407c08059eb70f6f2363b3c45fc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97670dbf2fa567998c26686caa4f03b6f4e78967 commit 97670dbf2fa567998c26686caa4f03b6f4e78967 Merge: ac394fd 43f4326 Author: Brad King AuthorDate: Fri Oct 21 08:59:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 08:59:07 2016 -0400 Merge topic 'android-armeabi-c++_static' 43f4326e Android: Fix support for armeabi with c++_static ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android/ndk-stl-c++_static.cmake | 2 ++ Tests/RunCMake/Android/RunCMakeTest.cmake | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 21 08:59:35 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 21 Oct 2016 08:59:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-287-ge094c8f Message-ID: <20161021125936.49355F6E86@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 e094c8fa0aa3827b0e81660ad5e29d85b216d60f (commit) via 010560be6674def3ce02d05dcf2331230d0c4e91 (commit) via 2d3aa94225e259c9bc1c0d469e6326b476d225c1 (commit) from 97670dbf2fa567998c26686caa4f03b6f4e78967 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e094c8fa0aa3827b0e81660ad5e29d85b216d60f commit e094c8fa0aa3827b0e81660ad5e29d85b216d60f Merge: 97670db 010560b Author: Brad King AuthorDate: Fri Oct 21 08:59:30 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 08:59:30 2016 -0400 Merge topic 'ninja-diagnose-missing-tool' 010560be Ninja: Fail early on when ninja build tool does not run 2d3aa942 cmGlobalGenerator: Allow FindMakeProgram to fail ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalGenerator.cxx | 10 +++++++--- Source/cmGlobalGenerator.h | 2 +- Source/cmGlobalGhsMultiGenerator.cxx | 3 ++- Source/cmGlobalGhsMultiGenerator.h | 2 +- Source/cmGlobalNinjaGenerator.cxx | 20 ++++++++++++++++---- Source/cmGlobalNinjaGenerator.h | 2 +- Source/cmGlobalVisualStudio10Generator.cxx | 7 +++++-- Source/cmGlobalVisualStudio10Generator.h | 2 +- Source/cmGlobalVisualStudio7Generator.cxx | 7 +++++-- Source/cmGlobalVisualStudio7Generator.h | 2 +- Source/cmGlobalVisualStudioGenerator.cxx | 3 ++- Source/cmGlobalVisualStudioGenerator.h | 2 +- Source/cmGlobalXCodeGenerator.cxx | 3 ++- Source/cmGlobalXCodeGenerator.h | 2 +- .../NinjaToolMissing-result.txt} | 0 Tests/RunCMake/Ninja/NinjaToolMissing-stderr.txt | 6 ++++++ .../RunCMake/Ninja/NinjaToolMissing.cmake | 0 Tests/RunCMake/Ninja/RunCMakeTest.cmake | 6 ++++++ 18 files changed, 58 insertions(+), 21 deletions(-) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => Ninja/NinjaToolMissing-result.txt} (100%) create mode 100644 Tests/RunCMake/Ninja/NinjaToolMissing-stderr.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Ninja/NinjaToolMissing.cmake (100%) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 21 08:59:40 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 21 Oct 2016 08:59:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-291-gdd7f9d8 Message-ID: <20161021125940.D16AAF6E81@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 dd7f9d8393b4dfd470335e662bfb94aaf57f93e1 (commit) via 587ab3221300f04a4de0756dc1a44fa0eac9c0d2 (commit) via 149d49ea7c009f9965d9be91cdac8ee6cd2cfb91 (commit) via 60d73393a50944c1e81472d7e80a458bcb898554 (commit) from e094c8fa0aa3827b0e81660ad5e29d85b216d60f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dd7f9d8393b4dfd470335e662bfb94aaf57f93e1 commit dd7f9d8393b4dfd470335e662bfb94aaf57f93e1 Merge: e094c8f 587ab32 Author: Brad King AuthorDate: Fri Oct 21 08:59:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 08:59:37 2016 -0400 Merge topic 'allow-fallback-config-mapping' 587ab322 Tests: Add test for MAP_IMPORTED_CONFIG_ empty fallback 149d49ea Teach MAP_IMPORTED_CONFIG_ to support configuration-less import 60d73393 Help: Format MAP_IMPORTED_CONFIG_ documentation ----------------------------------------------------------------------- Summary of changes: Help/prop_tgt/MAP_IMPORTED_CONFIG_CONFIG.rst | 22 +++++++---- Help/release/dev/allow-fallback-config-mapping.rst | 6 +++ Source/cmTarget.cxx | 41 +++++++++++++------- Tests/GeneratorExpression/CMakeLists.txt | 8 ++++ Tests/GeneratorExpression/check-part3.cmake | 2 + 5 files changed, 57 insertions(+), 22 deletions(-) create mode 100644 Help/release/dev/allow-fallback-config-mapping.rst hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 21 08:59:44 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 21 Oct 2016 08:59:44 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-293-g1e555a4 Message-ID: <20161021125945.0B332F6E9F@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 1e555a44aa4e3d40bca2f88915c9f957098e5a55 (commit) via ced77d2bbd07d195f563217bea1930e29472fd4d (commit) from dd7f9d8393b4dfd470335e662bfb94aaf57f93e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e555a44aa4e3d40bca2f88915c9f957098e5a55 commit 1e555a44aa4e3d40bca2f88915c9f957098e5a55 Merge: dd7f9d8 ced77d2 Author: Brad King AuthorDate: Fri Oct 21 08:59:42 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 08:59:42 2016 -0400 Merge topic 'ninja-encoding' ced77d2b Ninja: Use ANSI encoding for Ninja build files on Windows ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalNinjaGenerator.cxx | 18 ++++++++++++++++-- Source/cmGlobalNinjaGenerator.h | 3 +++ 2 files changed, 19 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 21 09:00:14 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 21 Oct 2016 09:00:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-648-g1a54dc7 Message-ID: <20161021130015.5FA43F6E8E@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 1a54dc7196caedf938ef32655d13b05feb87e984 (commit) via 1e555a44aa4e3d40bca2f88915c9f957098e5a55 (commit) via dd7f9d8393b4dfd470335e662bfb94aaf57f93e1 (commit) via e094c8fa0aa3827b0e81660ad5e29d85b216d60f (commit) via 97670dbf2fa567998c26686caa4f03b6f4e78967 (commit) via ac394fddab4c4407c08059eb70f6f2363b3c45fc (commit) from a93f28e4c0794fdfc1226d774a8ddce57aeef452 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a54dc7196caedf938ef32655d13b05feb87e984 commit 1a54dc7196caedf938ef32655d13b05feb87e984 Merge: a93f28e 1e555a4 Author: Brad King AuthorDate: Fri Oct 21 09:00:02 2016 -0400 Commit: Brad King CommitDate: Fri Oct 21 09:00:02 2016 -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 Fri Oct 21 10:40:17 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 21 Oct 2016 10:40:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-650-g98cc166 Message-ID: <20161021144020.8B99DF59B9@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 98cc166c5565c2a57ff5e41c68d15dbb39e16aea (commit) via f85bd200f947b6d4c89e9475a6a424b5b2270a16 (commit) from 1a54dc7196caedf938ef32655d13b05feb87e984 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98cc166c5565c2a57ff5e41c68d15dbb39e16aea commit 98cc166c5565c2a57ff5e41c68d15dbb39e16aea Merge: 1a54dc7 f85bd20 Author: Brad King AuthorDate: Fri Oct 21 10:40:14 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 10:40:14 2016 -0400 Merge topic 'doc-cmake-server-typos' into next f85bd200 Help: Fix cmake-server typo and message type consistency https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f85bd200f947b6d4c89e9475a6a424b5b2270a16 commit f85bd200f947b6d4c89e9475a6a424b5b2270a16 Author: Sylvain Joubert AuthorDate: Fri Oct 21 15:46:12 2016 +0200 Commit: Brad King CommitDate: Fri Oct 21 10:35:24 2016 -0400 Help: Fix cmake-server typo and message type consistency diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index afd4e2b..fe479d1 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -403,7 +403,7 @@ CMake will reply like this (after reporting progress for some time):: Type "compute" ^^^^^^^^^^^^^^ -This requist will generate build system files in the build directory and +This request will generate build system files in the build directory and is only available after a project was successfully "configure"d. Example:: @@ -520,7 +520,7 @@ sourceDirectory of the target. Example:: [== CMake Server ==[ - {"type":"project"} + {"type":"codemodel"} ]== CMake Server ==] CMake will reply:: @@ -529,7 +529,7 @@ CMake will reply:: { "cookie":"", "type":"reply", - "inReplyTo":"project", + "inReplyTo":"codemodel", "projects": [ @@ -584,9 +584,9 @@ CMake will reply:: ]== CMake Server ==] The output can be tailored to the specific needs via parameter passed when -requesting "project" information. +requesting "codemodel" information. -You can have a "depth" key, which accepts "project", "configuration" and +You can have a "depth" key, which accepts "codemodel", "configuration" and "target" as string values. These cause the output to be trimmed at the appropriate depth of the output tree. ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 21 13:25:37 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 21 Oct 2016 13:25:37 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-652-g4cfeac8 Message-ID: <20161021172539.09B07F6CCE@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 4cfeac87fe0170b09b7c6a21a2f2dd0ff420d111 (commit) via 295c8efa359cbee22e45e6e9358990209b35aa39 (commit) from 98cc166c5565c2a57ff5e41c68d15dbb39e16aea (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4cfeac87fe0170b09b7c6a21a2f2dd0ff420d111 commit 4cfeac87fe0170b09b7c6a21a2f2dd0ff420d111 Merge: 98cc166 295c8ef Author: Brad King AuthorDate: Fri Oct 21 13:25:35 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 13:25:35 2016 -0400 Merge topic 'android-link-exe' into next 295c8efa Android: Add missing link flags for device executables https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=295c8efa359cbee22e45e6e9358990209b35aa39 commit 295c8efa359cbee22e45e6e9358990209b35aa39 Author: Brad King AuthorDate: Fri Oct 21 09:12:34 2016 -0400 Commit: Brad King CommitDate: Fri Oct 21 10:43:45 2016 -0400 Android: Add missing link flags for device executables See `${ndk}/build/core/default-build-commands.mk` for link flags the NDK uses for executables. Add them to our default executable link flags. Suppress `nocopyreloc` on `arm64-v8a` because it does not work with some STL types. Closes: #16380 diff --git a/Modules/Platform/Android-Common.cmake b/Modules/Platform/Android-Common.cmake index 6544696..8755d4f 100644 --- a/Modules/Platform/Android-Common.cmake +++ b/Modules/Platform/Android-Common.cmake @@ -107,6 +107,7 @@ set(_ANDROID_ABI_INIT_CFLAGS "") set(_ANDROID_ABI_INIT_CFLAGS_DEBUG "") set(_ANDROID_ABI_INIT_CFLAGS_RELEASE "") set(_ANDROID_ABI_INIT_LDFLAGS "") +set(_ANDROID_ABI_INIT_EXE_LDFLAGS "") macro(__android_compiler_common lang) if(_ANDROID_ABI_INIT_CFLAGS) @@ -125,6 +126,9 @@ macro(__android_compiler_common lang) string(APPEND CMAKE_${t}_LINKER_FLAGS_INIT " ${_ANDROID_ABI_INIT_LDFLAGS}") endforeach() endif() + if(_ANDROID_ABI_INIT_EXE_LDFLAGS) + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${_ANDROID_ABI_INIT_EXE_LDFLAGS}") + endif() if(DEFINED _ANDROID_STL_EXCEPTIONS) if(_ANDROID_STL_EXCEPTIONS) diff --git a/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake b/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake index 3ff1fe5..e56b67b 100644 --- a/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake +++ b/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake @@ -5,4 +5,7 @@ string(APPEND _ANDROID_ABI_INIT_CFLAGS " -fpic" ) +# Suppress -Wl,-z,nocopyreloc flag on arm64-v8a +set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1) + include(Platform/Android/abi-common-Clang) diff --git a/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake b/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake index 538ec2f..0bcfc86 100644 --- a/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake +++ b/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake @@ -3,4 +3,7 @@ string(APPEND _ANDROID_ABI_INIT_CFLAGS " -fpic" ) +# Suppress -Wl,-z,nocopyreloc flag on arm64-v8a +set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1) + include(Platform/Android/abi-common-GNU) diff --git a/Modules/Platform/Android/abi-common.cmake b/Modules/Platform/Android/abi-common.cmake index 12d8e5c..84e7dbd 100644 --- a/Modules/Platform/Android/abi-common.cmake +++ b/Modules/Platform/Android/abi-common.cmake @@ -2,3 +2,9 @@ string(APPEND _ANDROID_ABI_INIT_CFLAGS " -funwind-tables" " -no-canonical-prefixes" ) + +string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -Wl,--gc-sections") + +if(NOT _ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc) + string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -Wl,-z,nocopyreloc") +endif() ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android-Common.cmake | 4 ++++ Modules/Platform/Android/abi-arm64-v8a-Clang.cmake | 3 +++ Modules/Platform/Android/abi-arm64-v8a-GNU.cmake | 3 +++ Modules/Platform/Android/abi-common.cmake | 6 ++++++ 4 files changed, 16 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 21 13:28:22 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 21 Oct 2016 13:28:22 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-654-g174057f Message-ID: <20161021172823.10988F6DC7@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 174057f9e157e570a83cf7cd55a7e121d0f4c63c (commit) via dfa9c54353b329a73f09314bd119224818a947fa (commit) from 4cfeac87fe0170b09b7c6a21a2f2dd0ff420d111 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=174057f9e157e570a83cf7cd55a7e121d0f4c63c commit 174057f9e157e570a83cf7cd55a7e121d0f4c63c Merge: 4cfeac8 dfa9c54 Author: Brad King AuthorDate: Fri Oct 21 13:28:20 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 13:28:20 2016 -0400 Merge topic 'doc-cmake-server-typos' into next dfa9c543 Revert "Help: Fix cmake-server typo and message type consistency" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dfa9c54353b329a73f09314bd119224818a947fa commit dfa9c54353b329a73f09314bd119224818a947fa Author: Brad King AuthorDate: Fri Oct 21 13:28:06 2016 -0400 Commit: Brad King CommitDate: Fri Oct 21 13:28:06 2016 -0400 Revert "Help: Fix cmake-server typo and message type consistency" This reverts commit f85bd200f947b6d4c89e9475a6a424b5b2270a16. diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index fe479d1..afd4e2b 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -403,7 +403,7 @@ CMake will reply like this (after reporting progress for some time):: Type "compute" ^^^^^^^^^^^^^^ -This request will generate build system files in the build directory and +This requist will generate build system files in the build directory and is only available after a project was successfully "configure"d. Example:: @@ -520,7 +520,7 @@ sourceDirectory of the target. Example:: [== CMake Server ==[ - {"type":"codemodel"} + {"type":"project"} ]== CMake Server ==] CMake will reply:: @@ -529,7 +529,7 @@ CMake will reply:: { "cookie":"", "type":"reply", - "inReplyTo":"codemodel", + "inReplyTo":"project", "projects": [ @@ -584,9 +584,9 @@ CMake will reply:: ]== CMake Server ==] The output can be tailored to the specific needs via parameter passed when -requesting "codemodel" information. +requesting "project" information. -You can have a "depth" key, which accepts "codemodel", "configuration" and +You can have a "depth" key, which accepts "project", "configuration" and "target" as string values. These cause the output to be trimmed at the appropriate depth of the output tree. ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Fri Oct 21 14:06:57 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Fri, 21 Oct 2016 14:06:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-656-g5b23ea4 Message-ID: <20161021180658.A6DFAF706D@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 5b23ea48ac45f2b08ec1941c291608737ec16555 (commit) via e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f (commit) from 174057f9e157e570a83cf7cd55a7e121d0f4c63c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b23ea48ac45f2b08ec1941c291608737ec16555 commit 5b23ea48ac45f2b08ec1941c291608737ec16555 Merge: 174057f e3770c5 Author: Daniel Pfeifer AuthorDate: Fri Oct 21 14:06:54 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 14:06:54 2016 -0400 Merge topic 'parallel-boostrap-test' into next e3770c56 BootstrapTest: Use --parallel=... argument. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f commit e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f Author: Daniel Pfeifer AuthorDate: Fri Oct 21 18:18:18 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:22:44 2016 +0200 BootstrapTest: Use --parallel=... argument. Determine the number of processors and provide it to the bootstrap script. Also make sure this test does not run parallel with other tests. diff --git a/Tests/BootstrapTest.cmake b/Tests/BootstrapTest.cmake index 9c9fe09..07a65bf 100644 --- a/Tests/BootstrapTest.cmake +++ b/Tests/BootstrapTest.cmake @@ -1,7 +1,12 @@ file(MAKE_DIRECTORY "${bin_dir}") -message(STATUS "running bootstrap: ${bootstrap}") +include(ProcessorCount) +ProcessorCount(nproc) +if(NOT nproc EQUAL 0) + set(parallel_arg --parallel=${nproc}) +endif() +message(STATUS "running bootstrap: ${bootstrap} ${parallel_arg}") execute_process( - COMMAND ${bootstrap} + COMMAND ${bootstrap} ${parallel_arg} WORKING_DIRECTORY "${bin_dir}" RESULT_VARIABLE result ) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 7df9403..5d72e5c 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3081,8 +3081,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release -P ${CMAKE_CURRENT_SOURCE_DIR}/BootstrapTest.cmake ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BootstrapTest") - # Make this test run early during parallel execution - set_tests_properties(BootstrapTest PROPERTIES COST 5000) + # This test will use all processors. + set_tests_properties(BootstrapTest PROPERTIES RUN_SERIAL 1) # provide more time for the bootstrap test get_test_property(BootstrapTest TIMEOUT PREVIOUS_TIMEOUT) ----------------------------------------------------------------------- Summary of changes: Tests/BootstrapTest.cmake | 9 +++++++-- Tests/CMakeLists.txt | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Fri Oct 21 14:28:19 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Fri, 21 Oct 2016 14:28:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-663-g35e25ad Message-ID: <20161021182833.6ED94F6AFE@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 35e25ada0edbcd6a36204ea13a4da8309dab3cfc (commit) via 14f1a9d044504d831fe34e711f4e54da4d3f2d08 (commit) via 2b7eb72ebdd57a7c61075cad0fa6c7f3947f6e54 (commit) via 4bb235357a363646685f6595b6ea501becb74813 (commit) via b500bd327a4565bb85c0ef3585ad7c36aac5d8c5 (commit) via 3e330d8805c29f00ff550b37f50add3d009c93d7 (commit) via 75fbf9008092484c869d6e075d9c8a056ad8c331 (commit) from 5b23ea48ac45f2b08ec1941c291608737ec16555 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35e25ada0edbcd6a36204ea13a4da8309dab3cfc commit 35e25ada0edbcd6a36204ea13a4da8309dab3cfc Merge: 5b23ea4 14f1a9d Author: Daniel Pfeifer AuthorDate: Fri Oct 21 14:27:25 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 14:27:25 2016 -0400 Merge topic 'separate-compilation' into next 14f1a9d0 cmCommand: implement functions in cxx file 2b7eb72e bootstrap: Sort source files lexicographically 4bb23535 Create all commands from a single function b500bd32 Separate compilation for commands included in cmBootstrapCommands2 3e330d88 Separate compilation for commands included in cmBootstrapCommands1 75fbf900 Separate compilation for commands included in cmCommands https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14f1a9d044504d831fe34e711f4e54da4d3f2d08 commit 14f1a9d044504d831fe34e711f4e54da4d3f2d08 Author: Daniel Pfeifer AuthorDate: Thu Oct 20 00:29:18 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:51 2016 +0200 cmCommand: implement functions in cxx file diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index b2617ae..09c0acf 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -386,6 +386,8 @@ set(SRCS cmake.cxx cmake.h + cmCommand.cxx + cmCommand.h cmCommands.cxx cmCommands.h cmAddCompileOptionsCommand.cxx diff --git a/Source/cmCommand.cxx b/Source/cmCommand.cxx new file mode 100644 index 0000000..3c839de --- /dev/null +++ b/Source/cmCommand.cxx @@ -0,0 +1,48 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmCommand.h" + +bool cmCommand::InvokeInitialPass(const std::vector& args, + cmExecutionStatus& status) +{ + std::vector expandedArguments; + if (!this->Makefile->ExpandArguments(args, expandedArguments)) { + // There was an error expanding arguments. It was already + // reported, so we can skip this command without error. + return true; + } + return this->InitialPass(expandedArguments, status); +} + +const char* cmCommand::GetError() +{ + if (this->Error.empty()) { + this->Error = this->GetName(); + this->Error += " unknown error."; + } + return this->Error.c_str(); +} + +void cmCommand::SetError(const std::string& e) +{ + this->Error = this->GetName(); + this->Error += " "; + this->Error += e; +} + +bool cmCommand::Disallowed(cmPolicies::PolicyID pol, const char* e) +{ + switch (this->Makefile->GetPolicyStatus(pol)) { + case cmPolicies::WARN: + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, + cmPolicies::GetPolicyWarning(pol)); + case cmPolicies::OLD: + return false; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::NEW: + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e); + break; + } + return true; +} diff --git a/Source/cmCommand.h b/Source/cmCommand.h index d8e337d..9299c71 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -28,9 +28,9 @@ public: * Construct the command. By default it is enabled with no makefile. */ cmCommand() + : Makefile(CM_NULLPTR) + , Enabled(true) { - this->Makefile = CM_NULLPTR; - this->Enabled = true; } /** @@ -50,16 +50,7 @@ public: * arguments and then invokes the InitialPass. */ virtual bool InvokeInitialPass(const std::vector& args, - cmExecutionStatus& status) - { - std::vector expandedArguments; - if (!this->Makefile->ExpandArguments(args, expandedArguments)) { - // There was an error expanding arguments. It was already - // reported, so we can skip this command without error. - return true; - } - return this->InitialPass(expandedArguments, status); - } + cmExecutionStatus& status); /** * This is called when the command is first encountered in @@ -127,42 +118,15 @@ public: /** * Return the last error string. */ - const char* GetError() - { - if (this->Error.empty()) { - this->Error = this->GetName(); - this->Error += " unknown error."; - } - return this->Error.c_str(); - } + const char* GetError(); /** * Set the error message */ - void SetError(const std::string& e) - { - this->Error = this->GetName(); - this->Error += " "; - this->Error += e; - } + void SetError(const std::string& e); /** Check if the command is disallowed by a policy. */ - bool Disallowed(cmPolicies::PolicyID pol, const char* e) - { - switch (this->Makefile->GetPolicyStatus(pol)) { - case cmPolicies::WARN: - this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, - cmPolicies::GetPolicyWarning(pol)); - case cmPolicies::OLD: - return false; - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::REQUIRED_ALWAYS: - case cmPolicies::NEW: - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e); - break; - } - return true; - } + bool Disallowed(cmPolicies::PolicyID pol, const char* e); protected: cmMakefile* Makefile; diff --git a/bootstrap b/bootstrap index ab76526..4ce0dee 100755 --- a/bootstrap +++ b/bootstrap @@ -254,6 +254,7 @@ CMAKE_CXX_SOURCES="\ cmCMakePolicyCommand \ cmCPackPropertiesGenerator \ cmCacheManager \ + cmCommand \ cmCommandArgumentLexer \ cmCommandArgumentParser \ cmCommandArgumentParserHelper \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2b7eb72ebdd57a7c61075cad0fa6c7f3947f6e54 commit 2b7eb72ebdd57a7c61075cad0fa6c7f3947f6e54 Author: Daniel Pfeifer AuthorDate: Wed Oct 19 23:19:41 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:51 2016 +0200 bootstrap: Sort source files lexicographically diff --git a/bootstrap b/bootstrap index eb927d5..ab76526 100755 --- a/bootstrap +++ b/bootstrap @@ -240,91 +240,6 @@ CMAKE_UNUSED_SOURCES="\ " CMAKE_CXX_SOURCES="\ - cmake \ - cmakemain \ - cmcmd \ - cmCommandArgumentLexer \ - cmCommandArgumentParser \ - cmCommandArgumentParserHelper \ - cmCommonTargetGenerator \ - cmCPackPropertiesGenerator \ - cmDefinitions \ - cmDepends \ - cmDependsC \ - cmDocumentationFormatter \ - cmPolicies \ - cmProperty \ - cmPropertyMap \ - cmPropertyDefinition \ - cmPropertyDefinitionMap \ - cmMakefile \ - cmMessenger \ - cmExportBuildFileGenerator \ - cmExportFileGenerator \ - cmExportInstallFileGenerator \ - cmExportTryCompileFileGenerator \ - cmExportSet \ - cmExportSetMap \ - cmExternalMakefileProjectGenerator \ - cmGeneratorExpressionEvaluationFile \ - cmGeneratedFileStream \ - cmGeneratorTarget \ - cmGeneratorExpressionContext \ - cmGeneratorExpressionDAGChecker \ - cmGeneratorExpressionEvaluator \ - cmGeneratorExpressionLexer \ - cmGeneratorExpressionNode \ - cmGeneratorExpressionParser \ - cmGeneratorExpression \ - cmGlobalCommonGenerator \ - cmGlobalGenerator \ - cmInstallDirectoryGenerator \ - cmLocalCommonGenerator \ - cmLocalGenerator \ - cmRulePlaceholderExpander \ - cmInstalledFile \ - cmInstallGenerator \ - cmInstallExportGenerator \ - cmInstallFilesGenerator \ - cmInstallScriptGenerator \ - cmInstallTargetGenerator \ - cmScriptGenerator \ - cmSourceFile \ - cmSourceFileLocation \ - cmState \ - cmStateDirectory \ - cmStateSnapshot \ - cmSystemTools \ - cmTestGenerator \ - cmVersion \ - cmFileTimeComparison \ - cmGlobalUnixMakefileGenerator3 \ - cmLocalUnixMakefileGenerator3 \ - cmLinkLineComputer \ - cmMSVC60LinkLineComputer \ - cmMakefileExecutableTargetGenerator \ - cmMakefileLibraryTargetGenerator \ - cmMakefileTargetGenerator \ - cmMakefileUtilityTargetGenerator \ - cmOutputConverter \ - cmOSXBundleGenerator \ - cmNewLineStyle \ - cmCommands \ - cmTarget \ - cmTargetPropertyComputer \ - cmTest \ - cmCustomCommand \ - cmCustomCommandGenerator \ - cmCacheManager \ - cmListFileCache \ - cmComputeLinkDepends \ - cmComputeLinkInformation \ - cmOrderDirectories \ - cmComputeTargetDepends \ - cmComputeComponentGraph \ - cmExprLexer \ - cmExprParser \ - cmExprParserHelper \ cmAddCustomCommandCommand \ cmAddCustomTargetCommand \ cmAddDefinitionsCommand \ @@ -337,12 +252,30 @@ CMAKE_CXX_SOURCES="\ cmBuildCommand \ cmCMakeMinimumRequired \ cmCMakePolicyCommand \ + cmCPackPropertiesGenerator \ + cmCacheManager \ + cmCommandArgumentLexer \ + cmCommandArgumentParser \ + cmCommandArgumentParserHelper \ cmCommandArgumentsHelper \ + cmCommands \ + cmCommonTargetGenerator \ + cmComputeComponentGraph \ + cmComputeLinkDepends \ + cmComputeLinkInformation \ + cmComputeTargetDepends \ + cmConditionEvaluator \ cmConfigureFileCommand \ cmContinueCommand \ cmCoreTryCompile \ cmCreateTestSourceList \ + cmCustomCommand \ + cmCustomCommandGenerator \ cmDefinePropertyCommand \ + cmDefinitions \ + cmDepends \ + cmDependsC \ + cmDocumentationFormatter \ cmElseCommand \ cmEnableLanguageCommand \ cmEnableTestingCommand \ @@ -353,7 +286,19 @@ CMAKE_CXX_SOURCES="\ cmEndWhileCommand \ cmExecProgramCommand \ cmExecuteProcessCommand \ + cmExpandedCommandArgument \ + cmExportBuildFileGenerator \ + cmExportFileGenerator \ + cmExportInstallFileGenerator \ + cmExportSet \ + cmExportSetMap \ + cmExportTryCompileFileGenerator \ + cmExprLexer \ + cmExprParser \ + cmExprParserHelper \ + cmExternalMakefileProjectGenerator \ cmFileCommand \ + cmFileTimeComparison \ cmFindBase \ cmFindCommon \ cmFindFileCommand \ @@ -363,11 +308,16 @@ CMAKE_CXX_SOURCES="\ cmFindProgramCommand \ cmForEachCommand \ cmFunctionCommand \ - cmParseArgumentsCommand \ - cmPathLabel \ - cmSearchPath \ - cmConditionEvaluator \ - cmExpandedCommandArgument \ + cmGeneratedFileStream \ + cmGeneratorExpression \ + cmGeneratorExpressionContext \ + cmGeneratorExpressionDAGChecker \ + cmGeneratorExpressionEvaluationFile \ + cmGeneratorExpressionEvaluator \ + cmGeneratorExpressionLexer \ + cmGeneratorExpressionNode \ + cmGeneratorExpressionParser \ + cmGeneratorTarget \ cmGetCMakePropertyCommand \ cmGetDirectoryPropertyCommand \ cmGetFilenameComponentCommand \ @@ -375,6 +325,9 @@ CMAKE_CXX_SOURCES="\ cmGetSourceFilePropertyCommand \ cmGetTargetPropertyCommand \ cmGetTestPropertyCommand \ + cmGlobalCommonGenerator \ + cmGlobalGenerator \ + cmGlobalUnixMakefileGenerator3 \ cmHexFileConverter \ cmIfCommand \ cmIncludeCommand \ @@ -382,18 +335,51 @@ CMAKE_CXX_SOURCES="\ cmIncludeRegularExpressionCommand \ cmInstallCommand \ cmInstallCommandArguments \ + cmInstallDirectoryGenerator \ + cmInstallExportGenerator \ cmInstallFilesCommand \ + cmInstallFilesGenerator \ + cmInstallGenerator \ + cmInstallScriptGenerator \ + cmInstallTargetGenerator \ cmInstallTargetsCommand \ + cmInstalledFile \ cmLinkDirectoriesCommand \ + cmLinkLineComputer \ cmListCommand \ + cmListFileCache \ + cmLocalCommonGenerator \ + cmLocalGenerator \ + cmLocalUnixMakefileGenerator3 \ + cmMSVC60LinkLineComputer \ cmMacroCommand \ cmMakeDirectoryCommand \ + cmMakefile \ + cmMakefileExecutableTargetGenerator \ + cmMakefileLibraryTargetGenerator \ + cmMakefileTargetGenerator \ + cmMakefileUtilityTargetGenerator \ cmMarkAsAdvancedCommand \ cmMathCommand \ cmMessageCommand \ + cmMessenger \ + cmNewLineStyle \ + cmOSXBundleGenerator \ cmOptionCommand \ + cmOrderDirectories \ + cmOutputConverter \ + cmParseArgumentsCommand \ + cmPathLabel \ + cmPolicies \ cmProjectCommand \ + cmProperty \ + cmPropertyDefinition \ + cmPropertyDefinitionMap \ + cmPropertyMap \ cmReturnCommand \ + cmRulePlaceholderExpander \ + cmScriptGenerator \ + cmSearchPath \ cmSeparateArgumentsCommand \ cmSetCommand \ cmSetDirectoryPropertiesCommand \ @@ -402,14 +388,28 @@ CMAKE_CXX_SOURCES="\ cmSetTargetPropertiesCommand \ cmSetTestsPropertiesCommand \ cmSiteNameCommand \ + cmSourceFile \ + cmSourceFileLocation \ + cmState \ + cmStateDirectory \ + cmStateSnapshot \ cmStringCommand \ cmSubdirCommand \ + cmSystemTools \ + cmTarget \ cmTargetLinkLibrariesCommand \ + cmTargetPropertyComputer \ + cmTest \ + cmTestGenerator \ cmTimestamp \ cmTryCompileCommand \ cmTryRunCommand \ cmUnsetCommand \ + cmVersion \ cmWhileCommand \ + cmake \ + cmakemain \ + cmcmd \ " if ${cmake_system_mingw}; then https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bb235357a363646685f6595b6ea501becb74813 commit 4bb235357a363646685f6595b6ea501becb74813 Author: Daniel Pfeifer AuthorDate: Wed Oct 19 23:17:10 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:51 2016 +0200 Create all commands from a single function diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 5c8636e..b2617ae 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -159,14 +159,10 @@ endif() set(SRCS cmArchiveWrite.cxx cmBase32.cxx - cmBootstrapCommands1.cxx - cmBootstrapCommands2.cxx cmCacheManager.cxx cmCacheManager.h - "${CMAKE_CURRENT_BINARY_DIR}/cmCommands.cxx" cmCLocaleEnvironmentScope.h cmCLocaleEnvironmentScope.cxx - cmCommands.h cmCommandArgumentLexer.cxx cmCommandArgumentParser.cxx cmCommandArgumentParserHelper.cxx @@ -390,6 +386,10 @@ set(SRCS cmake.cxx cmake.h + cmCommands.cxx + cmCommands.h + cmAddCompileOptionsCommand.cxx + cmAddCompileOptionsCommand.h cmAddCustomCommandCommand.cxx cmAddCustomCommandCommand.h cmAddCustomTargetCommand.cxx @@ -406,10 +406,16 @@ set(SRCS cmAddSubDirectoryCommand.h cmAddTestCommand.cxx cmAddTestCommand.h + cmAuxSourceDirectoryCommand.cxx + cmAuxSourceDirectoryCommand.h cmBreakCommand.cxx cmBreakCommand.h cmBuildCommand.cxx cmBuildCommand.h + cmBuildNameCommand.cxx + cmBuildNameCommand.h + cmCMakeHostSystemInformationCommand.cxx + cmCMakeHostSystemInformationCommand.h cmCMakeMinimumRequired.cxx cmCMakeMinimumRequired.h cmCMakePolicyCommand.cxx @@ -430,6 +436,8 @@ set(SRCS cmDefinePropertyCommand.h cmElseCommand.cxx cmElseCommand.h + cmElseIfCommand.cxx + cmElseIfCommand.h cmEnableLanguageCommand.cxx cmEnableLanguageCommand.h cmEnableTestingCommand.cxx @@ -450,6 +458,12 @@ set(SRCS cmExecuteProcessCommand.h cmExpandedCommandArgument.cxx cmExpandedCommandArgument.h + cmExportCommand.cxx + cmExportCommand.h + cmExportLibraryDependenciesCommand.cxx + cmExportLibraryDependenciesCommand.h + cmFLTKWrapUICommand.cxx + cmFLTKWrapUICommand.h cmFileCommand.cxx cmFileCommand.h cmFindBase.cxx @@ -492,6 +506,8 @@ set(SRCS cmIncludeCommand.h cmIncludeDirectoryCommand.cxx cmIncludeDirectoryCommand.h + cmIncludeExternalMSProjectCommand.cxx + cmIncludeExternalMSProjectCommand.h cmIncludeRegularExpressionCommand.cxx cmIncludeRegularExpressionCommand.h cmInstallCommand.cxx @@ -500,12 +516,20 @@ set(SRCS cmInstallCommandArguments.h cmInstallFilesCommand.cxx cmInstallFilesCommand.h + cmInstallProgramsCommand.cxx + cmInstallProgramsCommand.h cmInstallTargetsCommand.cxx cmInstallTargetsCommand.h cmLinkDirectoriesCommand.cxx cmLinkDirectoriesCommand.h + cmLinkLibrariesCommand.cxx + cmLinkLibrariesCommand.h cmListCommand.cxx cmListCommand.h + cmLoadCacheCommand.cxx + cmLoadCacheCommand.h + cmLoadCommandCommand.cxx + cmLoadCommandCommand.h cmMacroCommand.cxx cmMacroCommand.h cmMakeDirectoryCommand.cxx @@ -518,12 +542,22 @@ set(SRCS cmMessageCommand.h cmOptionCommand.cxx cmOptionCommand.h + cmOutputRequiredFilesCommand.cxx + cmOutputRequiredFilesCommand.h cmParseArgumentsCommand.cxx cmParseArgumentsCommand.h cmPathLabel.cxx cmPathLabel.h cmProjectCommand.cxx cmProjectCommand.h + cmQTWrapCPPCommand.cxx + cmQTWrapCPPCommand.h + cmQTWrapUICommand.cxx + cmQTWrapUICommand.h + cmRemoveCommand.cxx + cmRemoveCommand.h + cmRemoveDefinitionsCommand.cxx + cmRemoveDefinitionsCommand.h cmReturnCommand.cxx cmReturnCommand.h cmSearchPath.cxx @@ -544,12 +578,28 @@ set(SRCS cmSetTestsPropertiesCommand.h cmSiteNameCommand.cxx cmSiteNameCommand.h + cmSourceGroupCommand.cxx + cmSourceGroupCommand.h cmStringCommand.cxx cmStringCommand.h cmSubdirCommand.cxx cmSubdirCommand.h + cmSubdirDependsCommand.cxx + cmSubdirDependsCommand.h + cmTargetCompileDefinitionsCommand.cxx + cmTargetCompileDefinitionsCommand.h + cmTargetCompileFeaturesCommand.cxx + cmTargetCompileFeaturesCommand.h + cmTargetCompileOptionsCommand.cxx + cmTargetCompileOptionsCommand.h + cmTargetIncludeDirectoriesCommand.cxx + cmTargetIncludeDirectoriesCommand.h cmTargetLinkLibrariesCommand.cxx cmTargetLinkLibrariesCommand.h + cmTargetPropCommandBase.cxx + cmTargetPropCommandBase.h + cmTargetSourcesCommand.cxx + cmTargetSourcesCommand.h cmTimestamp.cxx cmTimestamp.h cmTryCompileCommand.cxx @@ -558,8 +608,18 @@ set(SRCS cmTryRunCommand.h cmUnsetCommand.cxx cmUnsetCommand.h + cmUseMangledMesaCommand.cxx + cmUseMangledMesaCommand.h + cmUtilitySourceCommand.cxx + cmUtilitySourceCommand.h + cmVariableRequiresCommand.cxx + cmVariableRequiresCommand.h + cmVariableWatchCommand.cxx + cmVariableWatchCommand.h cmWhileCommand.cxx cmWhileCommand.h + cmWriteFileCommand.cxx + cmWriteFileCommand.h cm_auto_ptr.hxx cm_get_date.h @@ -572,47 +632,6 @@ set(SRCS cm_codecvt.cxx ) -set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.h\"\n") -list(APPEND SRCS cmTargetPropCommandBase.cxx cmTargetPropCommandBase.h) -set(NEW_COMMANDS "") -foreach(command_file - cmAddCompileOptionsCommand - cmAuxSourceDirectoryCommand - cmBuildNameCommand - cmCMakeHostSystemInformationCommand - cmElseIfCommand - cmExportCommand - cmExportLibraryDependenciesCommand - cmFLTKWrapUICommand - cmIncludeExternalMSProjectCommand - cmInstallProgramsCommand - cmLinkLibrariesCommand - cmLoadCacheCommand - cmLoadCommandCommand - cmOutputRequiredFilesCommand - cmQTWrapCPPCommand - cmQTWrapUICommand - cmRemoveCommand - cmRemoveDefinitionsCommand - cmSourceGroupCommand - cmSubdirDependsCommand - cmTargetCompileDefinitionsCommand - cmTargetCompileFeaturesCommand - cmTargetCompileOptionsCommand - cmTargetIncludeDirectoriesCommand - cmTargetSourcesCommand - cmUseMangledMesaCommand - cmUtilitySourceCommand - cmVariableRequiresCommand - cmVariableWatchCommand - cmWriteFileCommand - ) - set(COMMAND_INCLUDES "${COMMAND_INCLUDES}#include \"${command_file}.h\"\n") - set(NEW_COMMANDS "${NEW_COMMANDS}commands.push_back(new ${command_file});\n") - list(APPEND SRCS ${command_file}.cxx ${command_file}.h) -endforeach() -configure_file(cmCommands.cxx.in ${CMAKE_CURRENT_BINARY_DIR}/cmCommands.cxx @ONLY) - # Kdevelop only works on UNIX and not windows if(UNIX) set(SRCS ${SRCS} cmGlobalKdevelopGenerator.cxx) diff --git a/Source/cmBootstrapCommands1.cxx b/Source/cmBootstrapCommands1.cxx deleted file mode 100644 index afb7ad8..0000000 --- a/Source/cmBootstrapCommands1.cxx +++ /dev/null @@ -1,87 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -// This file is used to compile all the commands -// that CMake knows about at compile time. -// This is sort of a boot strapping approach since you would -// like to have CMake to build CMake. -#include "cmAddCustomCommandCommand.h" -#include "cmAddCustomTargetCommand.h" -#include "cmAddDefinitionsCommand.h" -#include "cmAddDependenciesCommand.h" -#include "cmAddExecutableCommand.h" -#include "cmAddLibraryCommand.h" -#include "cmAddSubDirectoryCommand.h" -#include "cmAddTestCommand.h" -#include "cmBreakCommand.h" -#include "cmBuildCommand.h" -#include "cmCMakeMinimumRequired.h" -#include "cmCMakePolicyCommand.h" -#include "cmCommandArgumentsHelper.h" -#include "cmCommands.h" -#include "cmConfigureFileCommand.h" -#include "cmContinueCommand.h" -#include "cmCoreTryCompile.h" -#include "cmCreateTestSourceList.h" -#include "cmDefinePropertyCommand.h" -#include "cmElseCommand.h" -#include "cmEnableLanguageCommand.h" -#include "cmEnableTestingCommand.h" -#include "cmEndForEachCommand.h" -#include "cmEndFunctionCommand.h" -#include "cmEndIfCommand.h" -#include "cmEndMacroCommand.h" -#include "cmEndWhileCommand.h" -#include "cmExecProgramCommand.h" -#include "cmExecuteProcessCommand.h" -#include "cmFileCommand.h" -#include "cmFindBase.h" -#include "cmFindCommon.h" -#include "cmFindFileCommand.h" -#include "cmFindLibraryCommand.h" -#include "cmFindPackageCommand.h" -#include "cmFindPathCommand.h" -#include "cmFindProgramCommand.h" -#include "cmForEachCommand.h" -#include "cmFunctionCommand.h" -#include "cmParseArgumentsCommand.h" -#include "cmPathLabel.h" -#include "cmSearchPath.h" - -void GetBootstrapCommands1(std::vector& commands) -{ - commands.push_back(new cmAddCustomCommandCommand); - commands.push_back(new cmAddCustomTargetCommand); - commands.push_back(new cmAddDefinitionsCommand); - commands.push_back(new cmAddDependenciesCommand); - commands.push_back(new cmAddExecutableCommand); - commands.push_back(new cmAddLibraryCommand); - commands.push_back(new cmAddSubDirectoryCommand); - commands.push_back(new cmAddTestCommand); - commands.push_back(new cmBreakCommand); - commands.push_back(new cmBuildCommand); - commands.push_back(new cmCMakeMinimumRequired); - commands.push_back(new cmCMakePolicyCommand); - commands.push_back(new cmConfigureFileCommand); - commands.push_back(new cmContinueCommand); - commands.push_back(new cmCreateTestSourceList); - commands.push_back(new cmDefinePropertyCommand); - commands.push_back(new cmElseCommand); - commands.push_back(new cmEnableLanguageCommand); - commands.push_back(new cmEnableTestingCommand); - commands.push_back(new cmEndForEachCommand); - commands.push_back(new cmEndFunctionCommand); - commands.push_back(new cmEndIfCommand); - commands.push_back(new cmEndMacroCommand); - commands.push_back(new cmEndWhileCommand); - commands.push_back(new cmExecProgramCommand); - commands.push_back(new cmExecuteProcessCommand); - commands.push_back(new cmFileCommand); - commands.push_back(new cmFindFileCommand); - commands.push_back(new cmFindLibraryCommand); - commands.push_back(new cmFindPackageCommand); - commands.push_back(new cmFindPathCommand); - commands.push_back(new cmFindProgramCommand); - commands.push_back(new cmForEachCommand); - commands.push_back(new cmFunctionCommand); - commands.push_back(new cmParseArgumentsCommand); -} diff --git a/Source/cmBootstrapCommands2.cxx b/Source/cmBootstrapCommands2.cxx deleted file mode 100644 index 972d5b3..0000000 --- a/Source/cmBootstrapCommands2.cxx +++ /dev/null @@ -1,94 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -// This file is used to compile all the commands -// that CMake knows about at compile time. -// This is sort of a boot strapping approach since you would -// like to have CMake to build CMake. -#include "cmCommands.h" -#include "cmConditionEvaluator.h" -#include "cmExpandedCommandArgument.h" -#include "cmGetCMakePropertyCommand.h" -#include "cmGetDirectoryPropertyCommand.h" -#include "cmGetFilenameComponentCommand.h" -#include "cmGetPropertyCommand.h" -#include "cmGetSourceFilePropertyCommand.h" -#include "cmGetTargetPropertyCommand.h" -#include "cmGetTestPropertyCommand.h" -#include "cmHexFileConverter.h" -#include "cmIfCommand.h" -#include "cmIncludeCommand.h" -#include "cmIncludeDirectoryCommand.h" -#include "cmIncludeRegularExpressionCommand.h" -#include "cmInstallCommand.h" -#include "cmInstallCommandArguments.h" -#include "cmInstallFilesCommand.h" -#include "cmInstallTargetsCommand.h" -#include "cmLinkDirectoriesCommand.h" -#include "cmListCommand.h" -#include "cmMacroCommand.h" -#include "cmMakeDirectoryCommand.h" -#include "cmMarkAsAdvancedCommand.h" -#include "cmMathCommand.h" -#include "cmMessageCommand.h" -#include "cmOptionCommand.h" -#include "cmProjectCommand.h" -#include "cmReturnCommand.h" -#include "cmSeparateArgumentsCommand.h" -#include "cmSetCommand.h" -#include "cmSetDirectoryPropertiesCommand.h" -#include "cmSetPropertyCommand.h" -#include "cmSetSourceFilesPropertiesCommand.h" -#include "cmSetTargetPropertiesCommand.h" -#include "cmSetTestsPropertiesCommand.h" -#include "cmSiteNameCommand.h" -#include "cmStringCommand.h" -#include "cmSubdirCommand.h" -#include "cmTargetLinkLibrariesCommand.h" -#include "cmTimestamp.h" -#include "cmTryCompileCommand.h" -#include "cmTryRunCommand.h" -#include "cmUnsetCommand.h" -#include "cmWhileCommand.h" - -void GetBootstrapCommands2(std::vector& commands) -{ - commands.push_back(new cmGetCMakePropertyCommand); - commands.push_back(new cmGetDirectoryPropertyCommand); - commands.push_back(new cmGetFilenameComponentCommand); - commands.push_back(new cmGetPropertyCommand); - commands.push_back(new cmGetSourceFilePropertyCommand); - commands.push_back(new cmGetTargetPropertyCommand); - commands.push_back(new cmIfCommand); - commands.push_back(new cmIncludeCommand); - commands.push_back(new cmIncludeDirectoryCommand); - commands.push_back(new cmIncludeRegularExpressionCommand); - commands.push_back(new cmInstallCommand); - commands.push_back(new cmInstallFilesCommand); - commands.push_back(new cmInstallTargetsCommand); - commands.push_back(new cmLinkDirectoriesCommand); - commands.push_back(new cmListCommand); - commands.push_back(new cmMacroCommand); - commands.push_back(new cmMakeDirectoryCommand); - commands.push_back(new cmMarkAsAdvancedCommand); - commands.push_back(new cmMathCommand); - commands.push_back(new cmMessageCommand); - commands.push_back(new cmOptionCommand); - commands.push_back(new cmProjectCommand); - commands.push_back(new cmReturnCommand); - commands.push_back(new cmSeparateArgumentsCommand); - commands.push_back(new cmSetCommand); - commands.push_back(new cmSetDirectoryPropertiesCommand); - commands.push_back(new cmSetPropertyCommand); - commands.push_back(new cmSetSourceFilesPropertiesCommand); - commands.push_back(new cmSetTargetPropertiesCommand); - commands.push_back(new cmGetTestPropertyCommand); - commands.push_back(new cmSetTestsPropertiesCommand); - commands.push_back(new cmSiteNameCommand); - commands.push_back(new cmStringCommand); - commands.push_back(new cmSubdirCommand); - commands.push_back(new cmTargetLinkLibrariesCommand); - commands.push_back(new cmTryCompileCommand); - commands.push_back(new cmTryRunCommand); - commands.push_back(new cmUnsetCommand); - commands.push_back(new cmWhileCommand); -} diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx new file mode 100644 index 0000000..0697d4b --- /dev/null +++ b/Source/cmCommands.cxx @@ -0,0 +1,238 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmCommands.h" + +#include "cmAddCustomCommandCommand.h" +#include "cmAddCustomTargetCommand.h" +#include "cmAddDefinitionsCommand.h" +#include "cmAddDependenciesCommand.h" +#include "cmAddExecutableCommand.h" +#include "cmAddLibraryCommand.h" +#include "cmAddSubDirectoryCommand.h" +#include "cmAddTestCommand.h" +#include "cmBreakCommand.h" +#include "cmBuildCommand.h" +#include "cmCMakeMinimumRequired.h" +#include "cmCMakePolicyCommand.h" +#include "cmCommandArgumentsHelper.h" +#include "cmConditionEvaluator.h" +#include "cmConfigureFileCommand.h" +#include "cmContinueCommand.h" +#include "cmCoreTryCompile.h" +#include "cmCreateTestSourceList.h" +#include "cmDefinePropertyCommand.h" +#include "cmElseCommand.h" +#include "cmEnableLanguageCommand.h" +#include "cmEnableTestingCommand.h" +#include "cmEndForEachCommand.h" +#include "cmEndFunctionCommand.h" +#include "cmEndIfCommand.h" +#include "cmEndMacroCommand.h" +#include "cmEndWhileCommand.h" +#include "cmExecProgramCommand.h" +#include "cmExecuteProcessCommand.h" +#include "cmExpandedCommandArgument.h" +#include "cmFileCommand.h" +#include "cmFindBase.h" +#include "cmFindCommon.h" +#include "cmFindFileCommand.h" +#include "cmFindLibraryCommand.h" +#include "cmFindPackageCommand.h" +#include "cmFindPathCommand.h" +#include "cmFindProgramCommand.h" +#include "cmForEachCommand.h" +#include "cmFunctionCommand.h" +#include "cmGetCMakePropertyCommand.h" +#include "cmGetDirectoryPropertyCommand.h" +#include "cmGetFilenameComponentCommand.h" +#include "cmGetPropertyCommand.h" +#include "cmGetSourceFilePropertyCommand.h" +#include "cmGetTargetPropertyCommand.h" +#include "cmGetTestPropertyCommand.h" +#include "cmHexFileConverter.h" +#include "cmIfCommand.h" +#include "cmIncludeCommand.h" +#include "cmIncludeDirectoryCommand.h" +#include "cmIncludeRegularExpressionCommand.h" +#include "cmInstallCommand.h" +#include "cmInstallCommandArguments.h" +#include "cmInstallFilesCommand.h" +#include "cmInstallTargetsCommand.h" +#include "cmLinkDirectoriesCommand.h" +#include "cmListCommand.h" +#include "cmMacroCommand.h" +#include "cmMakeDirectoryCommand.h" +#include "cmMarkAsAdvancedCommand.h" +#include "cmMathCommand.h" +#include "cmMessageCommand.h" +#include "cmOptionCommand.h" +#include "cmParseArgumentsCommand.h" +#include "cmPathLabel.h" +#include "cmProjectCommand.h" +#include "cmReturnCommand.h" +#include "cmSearchPath.h" +#include "cmSeparateArgumentsCommand.h" +#include "cmSetCommand.h" +#include "cmSetDirectoryPropertiesCommand.h" +#include "cmSetPropertyCommand.h" +#include "cmSetSourceFilesPropertiesCommand.h" +#include "cmSetTargetPropertiesCommand.h" +#include "cmSetTestsPropertiesCommand.h" +#include "cmSiteNameCommand.h" +#include "cmStringCommand.h" +#include "cmSubdirCommand.h" +#include "cmTargetLinkLibrariesCommand.h" +#include "cmTimestamp.h" +#include "cmTryCompileCommand.h" +#include "cmTryRunCommand.h" +#include "cmUnsetCommand.h" +#include "cmWhileCommand.h" + +#if defined(CMAKE_BUILD_WITH_CMAKE) +#include "cmAddCompileOptionsCommand.h" +#include "cmAuxSourceDirectoryCommand.h" +#include "cmBuildNameCommand.h" +#include "cmCMakeHostSystemInformationCommand.h" +#include "cmElseIfCommand.h" +#include "cmExportCommand.h" +#include "cmExportLibraryDependenciesCommand.h" +#include "cmFLTKWrapUICommand.h" +#include "cmIncludeExternalMSProjectCommand.h" +#include "cmInstallProgramsCommand.h" +#include "cmLinkLibrariesCommand.h" +#include "cmLoadCacheCommand.h" +#include "cmLoadCommandCommand.h" +#include "cmOutputRequiredFilesCommand.h" +#include "cmQTWrapCPPCommand.h" +#include "cmQTWrapUICommand.h" +#include "cmRemoveCommand.h" +#include "cmRemoveDefinitionsCommand.h" +#include "cmSourceGroupCommand.h" +#include "cmSubdirDependsCommand.h" +#include "cmTargetCompileDefinitionsCommand.h" +#include "cmTargetCompileFeaturesCommand.h" +#include "cmTargetCompileOptionsCommand.h" +#include "cmTargetIncludeDirectoriesCommand.h" +#include "cmTargetPropCommandBase.h" +#include "cmTargetSourcesCommand.h" +#include "cmUseMangledMesaCommand.h" +#include "cmUtilitySourceCommand.h" +#include "cmVariableRequiresCommand.h" +#include "cmVariableWatchCommand.h" +#include "cmWriteFileCommand.h" +#endif + +std::vector GetPredefinedCommands() +{ + std::vector commands; + + commands.push_back(new cmAddCustomCommandCommand); + commands.push_back(new cmAddCustomTargetCommand); + commands.push_back(new cmAddDefinitionsCommand); + commands.push_back(new cmAddDependenciesCommand); + commands.push_back(new cmAddExecutableCommand); + commands.push_back(new cmAddLibraryCommand); + commands.push_back(new cmAddSubDirectoryCommand); + commands.push_back(new cmAddTestCommand); + commands.push_back(new cmBreakCommand); + commands.push_back(new cmBuildCommand); + commands.push_back(new cmCMakeMinimumRequired); + commands.push_back(new cmCMakePolicyCommand); + commands.push_back(new cmConfigureFileCommand); + commands.push_back(new cmContinueCommand); + commands.push_back(new cmCreateTestSourceList); + commands.push_back(new cmDefinePropertyCommand); + commands.push_back(new cmElseCommand); + commands.push_back(new cmEnableLanguageCommand); + commands.push_back(new cmEnableTestingCommand); + commands.push_back(new cmEndForEachCommand); + commands.push_back(new cmEndFunctionCommand); + commands.push_back(new cmEndIfCommand); + commands.push_back(new cmEndMacroCommand); + commands.push_back(new cmEndWhileCommand); + commands.push_back(new cmExecProgramCommand); + commands.push_back(new cmExecuteProcessCommand); + commands.push_back(new cmFileCommand); + commands.push_back(new cmFindFileCommand); + commands.push_back(new cmFindLibraryCommand); + commands.push_back(new cmFindPackageCommand); + commands.push_back(new cmFindPathCommand); + commands.push_back(new cmFindProgramCommand); + commands.push_back(new cmForEachCommand); + commands.push_back(new cmFunctionCommand); + commands.push_back(new cmGetCMakePropertyCommand); + commands.push_back(new cmGetDirectoryPropertyCommand); + commands.push_back(new cmGetFilenameComponentCommand); + commands.push_back(new cmGetPropertyCommand); + commands.push_back(new cmGetSourceFilePropertyCommand); + commands.push_back(new cmGetTargetPropertyCommand); + commands.push_back(new cmGetTestPropertyCommand); + commands.push_back(new cmIfCommand); + commands.push_back(new cmIncludeCommand); + commands.push_back(new cmIncludeDirectoryCommand); + commands.push_back(new cmIncludeRegularExpressionCommand); + commands.push_back(new cmInstallCommand); + commands.push_back(new cmInstallFilesCommand); + commands.push_back(new cmInstallTargetsCommand); + commands.push_back(new cmLinkDirectoriesCommand); + commands.push_back(new cmListCommand); + commands.push_back(new cmMacroCommand); + commands.push_back(new cmMakeDirectoryCommand); + commands.push_back(new cmMarkAsAdvancedCommand); + commands.push_back(new cmMathCommand); + commands.push_back(new cmMessageCommand); + commands.push_back(new cmOptionCommand); + commands.push_back(new cmParseArgumentsCommand); + commands.push_back(new cmProjectCommand); + commands.push_back(new cmReturnCommand); + commands.push_back(new cmSeparateArgumentsCommand); + commands.push_back(new cmSetCommand); + commands.push_back(new cmSetDirectoryPropertiesCommand); + commands.push_back(new cmSetPropertyCommand); + commands.push_back(new cmSetSourceFilesPropertiesCommand); + commands.push_back(new cmSetTargetPropertiesCommand); + commands.push_back(new cmSetTestsPropertiesCommand); + commands.push_back(new cmSiteNameCommand); + commands.push_back(new cmStringCommand); + commands.push_back(new cmSubdirCommand); + commands.push_back(new cmTargetLinkLibrariesCommand); + commands.push_back(new cmTryCompileCommand); + commands.push_back(new cmTryRunCommand); + commands.push_back(new cmUnsetCommand); + commands.push_back(new cmWhileCommand); + +#if defined(CMAKE_BUILD_WITH_CMAKE) + commands.push_back(new cmAddCompileOptionsCommand); + commands.push_back(new cmAuxSourceDirectoryCommand); + commands.push_back(new cmBuildNameCommand); + commands.push_back(new cmCMakeHostSystemInformationCommand); + commands.push_back(new cmElseIfCommand); + commands.push_back(new cmExportCommand); + commands.push_back(new cmExportLibraryDependenciesCommand); + commands.push_back(new cmFLTKWrapUICommand); + commands.push_back(new cmIncludeExternalMSProjectCommand); + commands.push_back(new cmInstallProgramsCommand); + commands.push_back(new cmLinkLibrariesCommand); + commands.push_back(new cmLoadCacheCommand); + commands.push_back(new cmLoadCommandCommand); + commands.push_back(new cmOutputRequiredFilesCommand); + commands.push_back(new cmQTWrapCPPCommand); + commands.push_back(new cmQTWrapUICommand); + commands.push_back(new cmRemoveCommand); + commands.push_back(new cmRemoveDefinitionsCommand); + commands.push_back(new cmSourceGroupCommand); + commands.push_back(new cmSubdirDependsCommand); + commands.push_back(new cmTargetCompileDefinitionsCommand); + commands.push_back(new cmTargetCompileFeaturesCommand); + commands.push_back(new cmTargetCompileOptionsCommand); + commands.push_back(new cmTargetIncludeDirectoriesCommand); + commands.push_back(new cmTargetSourcesCommand); + commands.push_back(new cmUseMangledMesaCommand); + commands.push_back(new cmUtilitySourceCommand); + commands.push_back(new cmVariableRequiresCommand); + commands.push_back(new cmVariableWatchCommand); + commands.push_back(new cmWriteFileCommand); +#endif + + return commands; +} diff --git a/Source/cmCommands.cxx.in b/Source/cmCommands.cxx.in deleted file mode 100644 index 9eddf30..0000000 --- a/Source/cmCommands.cxx.in +++ /dev/null @@ -1,10 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCommands.h" - - at COMMAND_INCLUDES@ - -void GetPredefinedCommands(std::vector& commands) -{ - at NEW_COMMANDS@ -} diff --git a/Source/cmCommands.h b/Source/cmCommands.h index c2a59b8..649dea6 100644 --- a/Source/cmCommands.h +++ b/Source/cmCommands.h @@ -10,13 +10,9 @@ class cmCommand; /** * Global function to return all compiled in commands. - * To add a new command edit cmCommands.cxx or cmBootstrapCommands[12].cxx - * and add your command. - * It is up to the caller to delete the commands created by this - * call. + * To add a new command edit cmCommands.cxx and add your command. + * It is up to the caller to delete the commands created by this call. */ -void GetBootstrapCommands1(std::vector& commands); -void GetBootstrapCommands2(std::vector& commands); -void GetPredefinedCommands(std::vector& commands); +std::vector GetPredefinedCommands(); #endif diff --git a/Source/cmCommandsForBootstrap.cxx b/Source/cmCommandsForBootstrap.cxx deleted file mode 100644 index 1b3bf51..0000000 --- a/Source/cmCommandsForBootstrap.cxx +++ /dev/null @@ -1,7 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCommands.h" - -void GetPredefinedCommands(std::vector&) -{ -} diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 388984f..210ac41 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1652,11 +1652,8 @@ const char* cmake::GetCacheDefinition(const std::string& name) const void cmake::AddDefaultCommands() { - std::vector commands; - GetBootstrapCommands1(commands); - GetBootstrapCommands2(commands); - GetPredefinedCommands(commands); - for (std::vector::iterator i = commands.begin(); + std::vector const commands = GetPredefinedCommands(); + for (std::vector::const_iterator i = commands.begin(); i != commands.end(); ++i) { this->State->AddCommand(*i); } diff --git a/bootstrap b/bootstrap index 5a0b8df..eb927d5 100755 --- a/bootstrap +++ b/bootstrap @@ -309,9 +309,7 @@ CMAKE_CXX_SOURCES="\ cmOutputConverter \ cmOSXBundleGenerator \ cmNewLineStyle \ - cmBootstrapCommands1 \ - cmBootstrapCommands2 \ - cmCommandsForBootstrap \ + cmCommands \ cmTarget \ cmTargetPropertyComputer \ cmTest \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b500bd327a4565bb85c0ef3585ad7c36aac5d8c5 commit b500bd327a4565bb85c0ef3585ad7c36aac5d8c5 Author: Daniel Pfeifer AuthorDate: Wed Oct 19 22:30:58 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:51 2016 +0200 Separate compilation for commands included in cmBootstrapCommands2 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index e028c5c..5c8636e 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -416,6 +416,8 @@ set(SRCS cmCMakePolicyCommand.h cmCommandArgumentsHelper.cxx cmCommandArgumentsHelper.h + cmConditionEvaluator.cxx + cmConditionEvaluator.h cmConfigureFileCommand.cxx cmConfigureFileCommand.h cmContinueCommand.cxx @@ -446,6 +448,8 @@ set(SRCS cmExecProgramCommand.h cmExecuteProcessCommand.cxx cmExecuteProcessCommand.h + cmExpandedCommandArgument.cxx + cmExpandedCommandArgument.h cmFileCommand.cxx cmFileCommand.h cmFindBase.cxx @@ -466,12 +470,96 @@ set(SRCS cmForEachCommand.h cmFunctionCommand.cxx cmFunctionCommand.h + cmGetCMakePropertyCommand.cxx + cmGetCMakePropertyCommand.h + cmGetDirectoryPropertyCommand.cxx + cmGetDirectoryPropertyCommand.h + cmGetFilenameComponentCommand.cxx + cmGetFilenameComponentCommand.h + cmGetPropertyCommand.cxx + cmGetPropertyCommand.h + cmGetSourceFilePropertyCommand.cxx + cmGetSourceFilePropertyCommand.h + cmGetTargetPropertyCommand.cxx + cmGetTargetPropertyCommand.h + cmGetTestPropertyCommand.cxx + cmGetTestPropertyCommand.h + cmHexFileConverter.cxx + cmHexFileConverter.h + cmIfCommand.cxx + cmIfCommand.h + cmIncludeCommand.cxx + cmIncludeCommand.h + cmIncludeDirectoryCommand.cxx + cmIncludeDirectoryCommand.h + cmIncludeRegularExpressionCommand.cxx + cmIncludeRegularExpressionCommand.h + cmInstallCommand.cxx + cmInstallCommand.h + cmInstallCommandArguments.cxx + cmInstallCommandArguments.h + cmInstallFilesCommand.cxx + cmInstallFilesCommand.h + cmInstallTargetsCommand.cxx + cmInstallTargetsCommand.h + cmLinkDirectoriesCommand.cxx + cmLinkDirectoriesCommand.h + cmListCommand.cxx + cmListCommand.h + cmMacroCommand.cxx + cmMacroCommand.h + cmMakeDirectoryCommand.cxx + cmMakeDirectoryCommand.h + cmMarkAsAdvancedCommand.cxx + cmMarkAsAdvancedCommand.h + cmMathCommand.cxx + cmMathCommand.h + cmMessageCommand.cxx + cmMessageCommand.h + cmOptionCommand.cxx + cmOptionCommand.h cmParseArgumentsCommand.cxx cmParseArgumentsCommand.h cmPathLabel.cxx cmPathLabel.h + cmProjectCommand.cxx + cmProjectCommand.h + cmReturnCommand.cxx + cmReturnCommand.h cmSearchPath.cxx cmSearchPath.h + cmSeparateArgumentsCommand.cxx + cmSeparateArgumentsCommand.h + cmSetCommand.cxx + cmSetCommand.h + cmSetDirectoryPropertiesCommand.cxx + cmSetDirectoryPropertiesCommand.h + cmSetPropertyCommand.cxx + cmSetPropertyCommand.h + cmSetSourceFilesPropertiesCommand.cxx + cmSetSourceFilesPropertiesCommand.h + cmSetTargetPropertiesCommand.cxx + cmSetTargetPropertiesCommand.h + cmSetTestsPropertiesCommand.cxx + cmSetTestsPropertiesCommand.h + cmSiteNameCommand.cxx + cmSiteNameCommand.h + cmStringCommand.cxx + cmStringCommand.h + cmSubdirCommand.cxx + cmSubdirCommand.h + cmTargetLinkLibrariesCommand.cxx + cmTargetLinkLibrariesCommand.h + cmTimestamp.cxx + cmTimestamp.h + cmTryCompileCommand.cxx + cmTryCompileCommand.h + cmTryRunCommand.cxx + cmTryRunCommand.h + cmUnsetCommand.cxx + cmUnsetCommand.h + cmWhileCommand.cxx + cmWhileCommand.h cm_auto_ptr.hxx cm_get_date.h diff --git a/Source/cmBootstrapCommands2.cxx b/Source/cmBootstrapCommands2.cxx index 625c3e0..972d5b3 100644 --- a/Source/cmBootstrapCommands2.cxx +++ b/Source/cmBootstrapCommands2.cxx @@ -5,50 +5,50 @@ // This is sort of a boot strapping approach since you would // like to have CMake to build CMake. #include "cmCommands.h" -#include "cmConditionEvaluator.cxx" -#include "cmExpandedCommandArgument.cxx" -#include "cmGetCMakePropertyCommand.cxx" -#include "cmGetDirectoryPropertyCommand.cxx" -#include "cmGetFilenameComponentCommand.cxx" -#include "cmGetPropertyCommand.cxx" -#include "cmGetSourceFilePropertyCommand.cxx" -#include "cmGetTargetPropertyCommand.cxx" -#include "cmGetTestPropertyCommand.cxx" -#include "cmHexFileConverter.cxx" -#include "cmIfCommand.cxx" -#include "cmIncludeCommand.cxx" -#include "cmIncludeDirectoryCommand.cxx" -#include "cmIncludeRegularExpressionCommand.cxx" -#include "cmInstallCommand.cxx" -#include "cmInstallCommandArguments.cxx" -#include "cmInstallFilesCommand.cxx" -#include "cmInstallTargetsCommand.cxx" -#include "cmLinkDirectoriesCommand.cxx" -#include "cmListCommand.cxx" -#include "cmMacroCommand.cxx" -#include "cmMakeDirectoryCommand.cxx" -#include "cmMarkAsAdvancedCommand.cxx" -#include "cmMathCommand.cxx" -#include "cmMessageCommand.cxx" -#include "cmOptionCommand.cxx" -#include "cmProjectCommand.cxx" -#include "cmReturnCommand.cxx" -#include "cmSeparateArgumentsCommand.cxx" -#include "cmSetCommand.cxx" -#include "cmSetDirectoryPropertiesCommand.cxx" -#include "cmSetPropertyCommand.cxx" -#include "cmSetSourceFilesPropertiesCommand.cxx" -#include "cmSetTargetPropertiesCommand.cxx" -#include "cmSetTestsPropertiesCommand.cxx" -#include "cmSiteNameCommand.cxx" -#include "cmStringCommand.cxx" -#include "cmSubdirCommand.cxx" -#include "cmTargetLinkLibrariesCommand.cxx" -#include "cmTimestamp.cxx" -#include "cmTryCompileCommand.cxx" -#include "cmTryRunCommand.cxx" -#include "cmUnsetCommand.cxx" -#include "cmWhileCommand.cxx" +#include "cmConditionEvaluator.h" +#include "cmExpandedCommandArgument.h" +#include "cmGetCMakePropertyCommand.h" +#include "cmGetDirectoryPropertyCommand.h" +#include "cmGetFilenameComponentCommand.h" +#include "cmGetPropertyCommand.h" +#include "cmGetSourceFilePropertyCommand.h" +#include "cmGetTargetPropertyCommand.h" +#include "cmGetTestPropertyCommand.h" +#include "cmHexFileConverter.h" +#include "cmIfCommand.h" +#include "cmIncludeCommand.h" +#include "cmIncludeDirectoryCommand.h" +#include "cmIncludeRegularExpressionCommand.h" +#include "cmInstallCommand.h" +#include "cmInstallCommandArguments.h" +#include "cmInstallFilesCommand.h" +#include "cmInstallTargetsCommand.h" +#include "cmLinkDirectoriesCommand.h" +#include "cmListCommand.h" +#include "cmMacroCommand.h" +#include "cmMakeDirectoryCommand.h" +#include "cmMarkAsAdvancedCommand.h" +#include "cmMathCommand.h" +#include "cmMessageCommand.h" +#include "cmOptionCommand.h" +#include "cmProjectCommand.h" +#include "cmReturnCommand.h" +#include "cmSeparateArgumentsCommand.h" +#include "cmSetCommand.h" +#include "cmSetDirectoryPropertiesCommand.h" +#include "cmSetPropertyCommand.h" +#include "cmSetSourceFilesPropertiesCommand.h" +#include "cmSetTargetPropertiesCommand.h" +#include "cmSetTestsPropertiesCommand.h" +#include "cmSiteNameCommand.h" +#include "cmStringCommand.h" +#include "cmSubdirCommand.h" +#include "cmTargetLinkLibrariesCommand.h" +#include "cmTimestamp.h" +#include "cmTryCompileCommand.h" +#include "cmTryRunCommand.h" +#include "cmUnsetCommand.h" +#include "cmWhileCommand.h" void GetBootstrapCommands2(std::vector& commands) { diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index e5949f0..90813ae 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -6,6 +6,7 @@ #include "cmGlobalGenerator.h" #include "cmStateTypes.h" #include "cmake.h" +#include "cmState.h" // cmGetCMakePropertyCommand bool cmGetCMakePropertyCommand::InitialPass( diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx index 8ebad4e..0670d31 100644 --- a/Source/cmGetDirectoryPropertyCommand.cxx +++ b/Source/cmGetDirectoryPropertyCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetDirectoryPropertyCommand.h" +#include "cmGlobalGenerator.h" +#include "cmSystemTools.h" #include "cmake.h" // cmGetDirectoryPropertyCommand diff --git a/Source/cmHexFileConverter.cxx b/Source/cmHexFileConverter.cxx index e121ece..6f3ea6a 100644 --- a/Source/cmHexFileConverter.cxx +++ b/Source/cmHexFileConverter.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmHexFileConverter.h" +#include "cmSystemTools.h" + #include #include diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index a2dec55..eb85b16 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -4,6 +4,7 @@ #include "cmOutputConverter.h" #include "cmStringCommand.h" +#include "cmSystemTools.h" #include "cmConditionEvaluator.h" diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx index acf51a7..e89641f 100644 --- a/Source/cmIncludeCommand.cxx +++ b/Source/cmIncludeCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeCommand.h" +#include "cmGlobalGenerator.h" +#include "cmSystemTools.h" + // cmIncludeCommand bool cmIncludeCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index f37f1ca..2260366 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeDirectoryCommand.h" +#include "cmSystemTools.h" + // cmIncludeDirectoryCommand bool cmIncludeDirectoryCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index d85748e..476755a 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -3,12 +3,14 @@ #include "cmInstallCommand.h" #include "cmExportSet.h" +#include "cmGlobalGenerator.h" #include "cmInstallCommandArguments.h" #include "cmInstallDirectoryGenerator.h" #include "cmInstallExportGenerator.h" #include "cmInstallFilesGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" +#include "cmSystemTools.h" #include "cmTargetExport.h" #include diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index f072ff5..50f97e9 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -2,7 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallFilesCommand.h" +#include "cmGlobalGenerator.h" #include "cmInstallFilesGenerator.h" +#include "cmSystemTools.h" // cmExecutableCommand bool cmInstallFilesCommand::InitialPass(std::vector const& args, diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx index fca0bf1..07f990d 100644 --- a/Source/cmInstallTargetsCommand.cxx +++ b/Source/cmInstallTargetsCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallTargetsCommand.h" +#include "cmGlobalGenerator.h" + // cmExecutableCommand bool cmInstallTargetsCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmLinkDirectoriesCommand.cxx b/Source/cmLinkDirectoriesCommand.cxx index fc6bf29..3a18a43 100644 --- a/Source/cmLinkDirectoriesCommand.cxx +++ b/Source/cmLinkDirectoriesCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLinkDirectoriesCommand.h" +#include "cmSystemTools.h" + // cmLinkDirectoriesCommand bool cmLinkDirectoriesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 98f3aa3..6cc9590 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -3,6 +3,7 @@ #include "cmListCommand.h" #include "cmAlgorithms.h" +#include "cmSystemTools.h" #include #include diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 9917394..1651950 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -3,7 +3,9 @@ #include "cmMacroCommand.h" #include "cmAlgorithms.h" +#include "cmSystemTools.h" #include "cmake.h" +#include "cmState.h" // define the class for macro commands class cmMacroHelperCommand : public cmCommand diff --git a/Source/cmMakeDirectoryCommand.cxx b/Source/cmMakeDirectoryCommand.cxx index e0011bd..fda9eea 100644 --- a/Source/cmMakeDirectoryCommand.cxx +++ b/Source/cmMakeDirectoryCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakeDirectoryCommand.h" +#include "cmSystemTools.h" + // cmMakeDirectoryCommand bool cmMakeDirectoryCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx index 8f9e288..46e6043 100644 --- a/Source/cmMarkAsAdvancedCommand.cxx +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMarkAsAdvancedCommand.h" +#include "cmSystemTools.h" +#include "cmState.h" + // cmMarkAsAdvancedCommand bool cmMarkAsAdvancedCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index 9a83cd9..83d847a 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -3,6 +3,7 @@ #include "cmMessageCommand.h" #include "cmMessenger.h" +#include "cmSystemTools.h" // cmLibraryCommand bool cmMessageCommand::InitialPass(std::vector const& args, diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 0186ef2..8343d1c 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmOptionCommand.h" +#include "cmSystemTools.h" +#include "cmState.h" + // cmOptionCommand bool cmOptionCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index c27da8e..4188661 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmProjectCommand.h" +#include "cmSystemTools.h" + // cmProjectCommand bool cmProjectCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmReturnCommand.cxx b/Source/cmReturnCommand.cxx index aa056c3..f8b3129 100644 --- a/Source/cmReturnCommand.cxx +++ b/Source/cmReturnCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmReturnCommand.h" +#include "cmExecutionStatus.h" + // cmReturnCommand bool cmReturnCommand::InitialPass(std::vector const&, cmExecutionStatus& status) diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx index b5c3186..77546a3 100644 --- a/Source/cmSeparateArgumentsCommand.cxx +++ b/Source/cmSeparateArgumentsCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSeparateArgumentsCommand.h" +#include "cmSystemTools.h" + // cmSeparateArgumentsCommand bool cmSeparateArgumentsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 65b0e9c..d93df64 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetCommand.h" +#include "cmSystemTools.h" +#include "cmState.h" + // cmSetCommand bool cmSetCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 2a4101f..9d88493 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetPropertyCommand.h" +#include "cmGlobalGenerator.h" #include "cmSetSourceFilesPropertiesCommand.h" #include "cmSetTargetPropertiesCommand.h" #include "cmSetTestsPropertiesCommand.h" +#include "cmSourceFile.h" +#include "cmTest.h" +#include "cmState.h" cmSetPropertyCommand::cmSetPropertyCommand() { diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx index 0021589..6a87d6d 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.cxx +++ b/Source/cmSetSourceFilesPropertiesCommand.cxx @@ -3,6 +3,7 @@ #include "cmSetSourceFilesPropertiesCommand.h" #include "cmSourceFile.h" +#include "cmSystemTools.h" // cmSetSourceFilesPropertiesCommand bool cmSetSourceFilesPropertiesCommand::InitialPass( diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx index 7664eca..18c2a3e 100644 --- a/Source/cmSiteNameCommand.cxx +++ b/Source/cmSiteNameCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSiteNameCommand.h" +#include "cmSystemTools.h" + #include // cmSiteNameCommand diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index c73025a..33d22e4 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -3,6 +3,7 @@ #include "cmStringCommand.h" #include "cmCryptoHash.h" +#include "cmSystemTools.h" #include #include diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx index fe7f659..d502c5f 100644 --- a/Source/cmSubdirCommand.cxx +++ b/Source/cmSubdirCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSubdirCommand.h" +#include "cmSystemTools.h" + // cmSubdirCommand bool cmSubdirCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 804dc5a..b249013 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -3,6 +3,9 @@ #include "cmTargetLinkLibrariesCommand.h" #include "cmGeneratorExpression.h" +#include "cmGlobalGenerator.h" +#include "cmSystemTools.h" +#include "cmState.h" const char* cmTargetLinkLibrariesCommand::LinkLibraryTypeNames[3] = { "general", "debug", "optimized" diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx index 6a8c9c6..9597e09 100644 --- a/Source/cmTimestamp.cxx +++ b/Source/cmTimestamp.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTimestamp.h" +#include "cmSystemTools.h" + #include #include #include diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index b248489..5ab5c45 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -2,7 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTryRunCommand.h" +#include "cmSystemTools.h" #include "cmTryCompileCommand.h" +#include "cmState.h" + #include // cmTryRunCommand diff --git a/Source/cmUnsetCommand.cxx b/Source/cmUnsetCommand.cxx index 746c435..2fea6192 100644 --- a/Source/cmUnsetCommand.cxx +++ b/Source/cmUnsetCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUnsetCommand.h" +#include "cmSystemTools.h" + // cmUnsetCommand bool cmUnsetCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index c52ea40..beb59bf 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -3,6 +3,7 @@ #include "cmWhileCommand.h" #include "cmConditionEvaluator.h" +#include "cmSystemTools.h" cmWhileFunctionBlocker::cmWhileFunctionBlocker(cmMakefile* mf) : Makefile(mf) diff --git a/bootstrap b/bootstrap index cb057c3..5a0b8df 100755 --- a/bootstrap +++ b/bootstrap @@ -368,6 +368,50 @@ CMAKE_CXX_SOURCES="\ cmParseArgumentsCommand \ cmPathLabel \ cmSearchPath \ + cmConditionEvaluator \ + cmExpandedCommandArgument \ + cmGetCMakePropertyCommand \ + cmGetDirectoryPropertyCommand \ + cmGetFilenameComponentCommand \ + cmGetPropertyCommand \ + cmGetSourceFilePropertyCommand \ + cmGetTargetPropertyCommand \ + cmGetTestPropertyCommand \ + cmHexFileConverter \ + cmIfCommand \ + cmIncludeCommand \ + cmIncludeDirectoryCommand \ + cmIncludeRegularExpressionCommand \ + cmInstallCommand \ + cmInstallCommandArguments \ + cmInstallFilesCommand \ + cmInstallTargetsCommand \ + cmLinkDirectoriesCommand \ + cmListCommand \ + cmMacroCommand \ + cmMakeDirectoryCommand \ + cmMarkAsAdvancedCommand \ + cmMathCommand \ + cmMessageCommand \ + cmOptionCommand \ + cmProjectCommand \ + cmReturnCommand \ + cmSeparateArgumentsCommand \ + cmSetCommand \ + cmSetDirectoryPropertiesCommand \ + cmSetPropertyCommand \ + cmSetSourceFilesPropertiesCommand \ + cmSetTargetPropertiesCommand \ + cmSetTestsPropertiesCommand \ + cmSiteNameCommand \ + cmStringCommand \ + cmSubdirCommand \ + cmTargetLinkLibrariesCommand \ + cmTimestamp \ + cmTryCompileCommand \ + cmTryRunCommand \ + cmUnsetCommand \ + cmWhileCommand \ " if ${cmake_system_mingw}; then @@ -1363,12 +1407,6 @@ for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_ objs="${objs} ${a}.o" done -# Generate dependencies for cmBootstrapCommands1.cxx -for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands2.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do - cmBootstrapCommands2Deps="${cmBootstrapCommands2Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`" -done -cmBootstrapCommands2Deps=`echo $cmBootstrapCommands2Deps` - if [ "x${cmake_ansi_cxx_flags}" != "x" ]; then cmake_cxx_flags="${cmake_ansi_cxx_flags} ${cmake_cxx_flags}" fi https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e330d8805c29f00ff550b37f50add3d009c93d7 commit 3e330d8805c29f00ff550b37f50add3d009c93d7 Author: Daniel Pfeifer AuthorDate: Wed Oct 19 21:59:14 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:51 2016 +0200 Separate compilation for commands included in cmBootstrapCommands1 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 9f8a3e2..e028c5c 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -390,6 +390,89 @@ set(SRCS cmake.cxx cmake.h + cmAddCustomCommandCommand.cxx + cmAddCustomCommandCommand.h + cmAddCustomTargetCommand.cxx + cmAddCustomTargetCommand.h + cmAddDefinitionsCommand.cxx + cmAddDefinitionsCommand.h + cmAddDependenciesCommand.cxx + cmAddDependenciesCommand.h + cmAddExecutableCommand.cxx + cmAddExecutableCommand.h + cmAddLibraryCommand.cxx + cmAddLibraryCommand.h + cmAddSubDirectoryCommand.cxx + cmAddSubDirectoryCommand.h + cmAddTestCommand.cxx + cmAddTestCommand.h + cmBreakCommand.cxx + cmBreakCommand.h + cmBuildCommand.cxx + cmBuildCommand.h + cmCMakeMinimumRequired.cxx + cmCMakeMinimumRequired.h + cmCMakePolicyCommand.cxx + cmCMakePolicyCommand.h + cmCommandArgumentsHelper.cxx + cmCommandArgumentsHelper.h + cmConfigureFileCommand.cxx + cmConfigureFileCommand.h + cmContinueCommand.cxx + cmContinueCommand.h + cmCoreTryCompile.cxx + cmCoreTryCompile.h + cmCreateTestSourceList.cxx + cmCreateTestSourceList.h + cmDefinePropertyCommand.cxx + cmDefinePropertyCommand.h + cmElseCommand.cxx + cmElseCommand.h + cmEnableLanguageCommand.cxx + cmEnableLanguageCommand.h + cmEnableTestingCommand.cxx + cmEnableTestingCommand.h + cmEndForEachCommand.cxx + cmEndForEachCommand.h + cmEndFunctionCommand.cxx + cmEndFunctionCommand.h + cmEndIfCommand.cxx + cmEndIfCommand.h + cmEndMacroCommand.cxx + cmEndMacroCommand.h + cmEndWhileCommand.cxx + cmEndWhileCommand.h + cmExecProgramCommand.cxx + cmExecProgramCommand.h + cmExecuteProcessCommand.cxx + cmExecuteProcessCommand.h + cmFileCommand.cxx + cmFileCommand.h + cmFindBase.cxx + cmFindBase.h + cmFindCommon.cxx + cmFindCommon.h + cmFindFileCommand.cxx + cmFindFileCommand.h + cmFindLibraryCommand.cxx + cmFindLibraryCommand.h + cmFindPackageCommand.cxx + cmFindPackageCommand.h + cmFindPathCommand.cxx + cmFindPathCommand.h + cmFindProgramCommand.cxx + cmFindProgramCommand.h + cmForEachCommand.cxx + cmForEachCommand.h + cmFunctionCommand.cxx + cmFunctionCommand.h + cmParseArgumentsCommand.cxx + cmParseArgumentsCommand.h + cmPathLabel.cxx + cmPathLabel.h + cmSearchPath.cxx + cmSearchPath.h + cm_auto_ptr.hxx cm_get_date.h cm_get_date.c diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index a03d77d..3d0729b 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddExecutableCommand.h" +#include "cmGlobalGenerator.h" + // cmExecutableCommand bool cmAddExecutableCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 0777ef0..18118a3 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -2,8 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddLibraryCommand.h" +#include "cmGlobalGenerator.h" #include "cmState.h" #include "cmStateTypes.h" +#include "cmSystemTools.h" #include "cmake.h" // cmLibraryCommand diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx index bb1e239..0ebe35d 100644 --- a/Source/cmAddSubDirectoryCommand.cxx +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddSubDirectoryCommand.h" +#include "cmSystemTools.h" + // cmAddSubDirectoryCommand bool cmAddSubDirectoryCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmBootstrapCommands1.cxx b/Source/cmBootstrapCommands1.cxx index 2b3b62f..afb7ad8 100644 --- a/Source/cmBootstrapCommands1.cxx +++ b/Source/cmBootstrapCommands1.cxx @@ -4,48 +4,48 @@ // that CMake knows about at compile time. // This is sort of a boot strapping approach since you would // like to have CMake to build CMake. -#include "cmAddCustomCommandCommand.cxx" -#include "cmAddCustomTargetCommand.cxx" -#include "cmAddDefinitionsCommand.cxx" -#include "cmAddDependenciesCommand.cxx" -#include "cmAddExecutableCommand.cxx" -#include "cmAddLibraryCommand.cxx" -#include "cmAddSubDirectoryCommand.cxx" -#include "cmAddTestCommand.cxx" -#include "cmBreakCommand.cxx" -#include "cmBuildCommand.cxx" -#include "cmCMakeMinimumRequired.cxx" -#include "cmCMakePolicyCommand.cxx" -#include "cmCommandArgumentsHelper.cxx" +#include "cmAddCustomCommandCommand.h" +#include "cmAddCustomTargetCommand.h" +#include "cmAddDefinitionsCommand.h" +#include "cmAddDependenciesCommand.h" +#include "cmAddExecutableCommand.h" +#include "cmAddLibraryCommand.h" +#include "cmAddSubDirectoryCommand.h" +#include "cmAddTestCommand.h" +#include "cmBreakCommand.h" +#include "cmBuildCommand.h" +#include "cmCMakeMinimumRequired.h" +#include "cmCMakePolicyCommand.h" +#include "cmCommandArgumentsHelper.h" #include "cmCommands.h" -#include "cmConfigureFileCommand.cxx" -#include "cmContinueCommand.cxx" -#include "cmCoreTryCompile.cxx" -#include "cmCreateTestSourceList.cxx" -#include "cmDefinePropertyCommand.cxx" -#include "cmElseCommand.cxx" -#include "cmEnableLanguageCommand.cxx" -#include "cmEnableTestingCommand.cxx" -#include "cmEndForEachCommand.cxx" -#include "cmEndFunctionCommand.cxx" -#include "cmEndIfCommand.cxx" -#include "cmEndMacroCommand.cxx" -#include "cmEndWhileCommand.cxx" -#include "cmExecProgramCommand.cxx" -#include "cmExecuteProcessCommand.cxx" -#include "cmFileCommand.cxx" -#include "cmFindBase.cxx" -#include "cmFindCommon.cxx" -#include "cmFindFileCommand.cxx" -#include "cmFindLibraryCommand.cxx" -#include "cmFindPackageCommand.cxx" -#include "cmFindPathCommand.cxx" -#include "cmFindProgramCommand.cxx" -#include "cmForEachCommand.cxx" -#include "cmFunctionCommand.cxx" -#include "cmParseArgumentsCommand.cxx" -#include "cmPathLabel.cxx" -#include "cmSearchPath.cxx" +#include "cmConfigureFileCommand.h" +#include "cmContinueCommand.h" +#include "cmCoreTryCompile.h" +#include "cmCreateTestSourceList.h" +#include "cmDefinePropertyCommand.h" +#include "cmElseCommand.h" +#include "cmEnableLanguageCommand.h" +#include "cmEnableTestingCommand.h" +#include "cmEndForEachCommand.h" +#include "cmEndFunctionCommand.h" +#include "cmEndIfCommand.h" +#include "cmEndMacroCommand.h" +#include "cmEndWhileCommand.h" +#include "cmExecProgramCommand.h" +#include "cmExecuteProcessCommand.h" +#include "cmFileCommand.h" +#include "cmFindBase.h" +#include "cmFindCommon.h" +#include "cmFindFileCommand.h" +#include "cmFindLibraryCommand.h" +#include "cmFindPackageCommand.h" +#include "cmFindPathCommand.h" +#include "cmFindProgramCommand.h" +#include "cmForEachCommand.h" +#include "cmFunctionCommand.h" +#include "cmParseArgumentsCommand.h" +#include "cmPathLabel.h" +#include "cmSearchPath.h" void GetBootstrapCommands1(std::vector& commands) { diff --git a/Source/cmCMakeMinimumRequired.cxx b/Source/cmCMakeMinimumRequired.cxx index 80b5108..d71172c 100644 --- a/Source/cmCMakeMinimumRequired.cxx +++ b/Source/cmCMakeMinimumRequired.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakeMinimumRequired.h" +#include "cmSystemTools.h" #include "cmVersion.h" // cmCMakeMinimumRequired diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index 6a451f5..0755dce 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmConfigureFileCommand.h" +#include "cmSystemTools.h" + #include // cmConfigureFileCommand diff --git a/Source/cmContinueCommand.cxx b/Source/cmContinueCommand.cxx index ce36463..dc3e02c 100644 --- a/Source/cmContinueCommand.cxx +++ b/Source/cmContinueCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmContinueCommand.h" +#include "cmExecutionStatus.h" +#include "cmSystemTools.h" + // cmContinueCommand bool cmContinueCommand::InitialPass(std::vector const& args, cmExecutionStatus& status) diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx index ec62c5b..b062d4d 100644 --- a/Source/cmCreateTestSourceList.cxx +++ b/Source/cmCreateTestSourceList.cxx @@ -3,6 +3,7 @@ #include "cmCreateTestSourceList.h" #include "cmSourceFile.h" +#include "cmSystemTools.h" // cmCreateTestSourceList bool cmCreateTestSourceList::InitialPass(std::vector const& args, diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index ff822b8..9e08f30 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -5,6 +5,7 @@ #include "cmAlgorithms.h" #include "cmState.h" #include "cmStateTypes.h" +#include "cmSystemTools.h" cmFindBase::cmFindBase() { diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index bd5298d..bc175ff 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindCommon.h" +#include "cmSystemTools.h" + #include #include diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 5d8aaa2..5bc953a 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -3,6 +3,10 @@ #include "cmFindLibraryCommand.h" #include "cmState.h" +#include "cmGlobalGenerator.h" +#include "cmSystemTools.h" +#include "cmVersion.h" + #include cmFindLibraryCommand::cmFindLibraryCommand() diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 029d422..2784e16 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -4,9 +4,12 @@ #include "cmAlgorithms.h" #include "cmState.h" +#include "cmVersion.h" + #include #include #include +#include #include #ifdef CMAKE_BUILD_WITH_CMAKE diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 7d37185..66dc5d7 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindPathCommand.h" +#include "cmSystemTools.h" + #include cmFindPathCommand::cmFindPathCommand() diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index 9886860..d258c3c 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindProgramCommand.h" +#include "cmSystemTools.h" + #include #if defined(__APPLE__) diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 987741b..6fbc93d 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmForEachCommand.h" +#include "cmSystemTools.h" + #include cmForEachFunctionBlocker::cmForEachFunctionBlocker(cmMakefile* mf) diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 99d883a..1b1d58e 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFunctionCommand.h" +#include "cmSystemTools.h" +#include "cmState.h" #include "cmake.h" // define the class for function commands diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index 55d71ea..e45e3a5 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -3,6 +3,7 @@ #include "cmParseArgumentsCommand.h" #include "cmAlgorithms.h" +#include "cmSystemTools.h" static std::string escape_arg(const std::string& arg) { diff --git a/Source/cmSearchPath.cxx b/Source/cmSearchPath.cxx index c34028e..fd3d482 100644 --- a/Source/cmSearchPath.cxx +++ b/Source/cmSearchPath.cxx @@ -4,6 +4,7 @@ #include "cmAlgorithms.h" #include "cmFindCommon.h" +#include "cmSystemTools.h" cmSearchPath::cmSearchPath(cmFindCommon* findCmd) : FC(findCmd) diff --git a/bootstrap b/bootstrap index 44afbb2..cb057c3 100755 --- a/bootstrap +++ b/bootstrap @@ -327,6 +327,47 @@ CMAKE_CXX_SOURCES="\ cmExprLexer \ cmExprParser \ cmExprParserHelper \ + cmAddCustomCommandCommand \ + cmAddCustomTargetCommand \ + cmAddDefinitionsCommand \ + cmAddDependenciesCommand \ + cmAddExecutableCommand \ + cmAddLibraryCommand \ + cmAddSubDirectoryCommand \ + cmAddTestCommand \ + cmBreakCommand \ + cmBuildCommand \ + cmCMakeMinimumRequired \ + cmCMakePolicyCommand \ + cmCommandArgumentsHelper \ + cmConfigureFileCommand \ + cmContinueCommand \ + cmCoreTryCompile \ + cmCreateTestSourceList \ + cmDefinePropertyCommand \ + cmElseCommand \ + cmEnableLanguageCommand \ + cmEnableTestingCommand \ + cmEndForEachCommand \ + cmEndFunctionCommand \ + cmEndIfCommand \ + cmEndMacroCommand \ + cmEndWhileCommand \ + cmExecProgramCommand \ + cmExecuteProcessCommand \ + cmFileCommand \ + cmFindBase \ + cmFindCommon \ + cmFindFileCommand \ + cmFindLibraryCommand \ + cmFindPackageCommand \ + cmFindPathCommand \ + cmFindProgramCommand \ + cmForEachCommand \ + cmFunctionCommand \ + cmParseArgumentsCommand \ + cmPathLabel \ + cmSearchPath \ " if ${cmake_system_mingw}; then @@ -1323,10 +1364,6 @@ for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_ done # Generate dependencies for cmBootstrapCommands1.cxx -for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands1.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do - cmBootstrapCommands1Deps="${cmBootstrapCommands1Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`" -done -cmBootstrapCommands1Deps=`echo $cmBootstrapCommands1Deps` for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands2.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do cmBootstrapCommands2Deps="${cmBootstrapCommands2Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`" done https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75fbf9008092484c869d6e075d9c8a056ad8c331 commit 75fbf9008092484c869d6e075d9c8a056ad8c331 Author: Daniel Pfeifer AuthorDate: Wed Oct 19 08:54:18 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:50 2016 +0200 Separate compilation for commands included in cmCommands diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 2b8c17c..9f8a3e2 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -401,9 +401,8 @@ set(SRCS cm_codecvt.cxx ) -set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.cxx\"\n") -list(APPEND SRCS cmTargetPropCommandBase.cxx) -set_property(SOURCE cmTargetPropCommandBase.cxx PROPERTY HEADER_FILE_ONLY ON) +set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.h\"\n") +list(APPEND SRCS cmTargetPropCommandBase.cxx cmTargetPropCommandBase.h) set(NEW_COMMANDS "") foreach(command_file cmAddCompileOptionsCommand @@ -418,6 +417,7 @@ foreach(command_file cmInstallProgramsCommand cmLinkLibrariesCommand cmLoadCacheCommand + cmLoadCommandCommand cmOutputRequiredFilesCommand cmQTWrapCPPCommand cmQTWrapUICommand @@ -435,15 +435,10 @@ foreach(command_file cmVariableRequiresCommand cmVariableWatchCommand cmWriteFileCommand - # This one must be last because it includes windows.h and - # windows.h #defines GetCurrentDirectory which is a member - # of cmMakefile - cmLoadCommandCommand ) - set(COMMAND_INCLUDES "${COMMAND_INCLUDES}#include \"${command_file}.cxx\"\n") + set(COMMAND_INCLUDES "${COMMAND_INCLUDES}#include \"${command_file}.h\"\n") set(NEW_COMMANDS "${NEW_COMMANDS}commands.push_back(new ${command_file});\n") - list(APPEND SRCS ${command_file}.cxx) - set_property(SOURCE ${command_file}.cxx PROPERTY HEADER_FILE_ONLY ON) + list(APPEND SRCS ${command_file}.cxx ${command_file}.h) endforeach() configure_file(cmCommands.cxx.in ${CMAKE_CURRENT_BINARY_DIR}/cmCommands.cxx @ONLY) diff --git a/Source/cmAddCompileOptionsCommand.cxx b/Source/cmAddCompileOptionsCommand.cxx index 9265cba..21a8012 100644 --- a/Source/cmAddCompileOptionsCommand.cxx +++ b/Source/cmAddCompileOptionsCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddCompileOptionsCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + bool cmAddCompileOptionsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { diff --git a/Source/cmAddCompileOptionsCommand.h b/Source/cmAddCompileOptionsCommand.h index 52c4b51..4c715e7 100644 --- a/Source/cmAddCompileOptionsCommand.h +++ b/Source/cmAddCompileOptionsCommand.h @@ -3,7 +3,14 @@ #ifndef cmAddCompileOptionsCommand_h #define cmAddCompileOptionsCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmAddCompileOptionsCommand : public cmCommand { diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx index 6655911..04e1a0b 100644 --- a/Source/cmAuxSourceDirectoryCommand.cxx +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -2,9 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAuxSourceDirectoryCommand.h" +#include +#include +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmSystemTools.h" +#include "cmake.h" -#include +class cmExecutionStatus; // cmAuxSourceDirectoryCommand bool cmAuxSourceDirectoryCommand::InitialPass( diff --git a/Source/cmAuxSourceDirectoryCommand.h b/Source/cmAuxSourceDirectoryCommand.h index cca70dc..6c15319 100644 --- a/Source/cmAuxSourceDirectoryCommand.h +++ b/Source/cmAuxSourceDirectoryCommand.h @@ -3,7 +3,14 @@ #ifndef cmAuxSourceDirectoryCommand_h #define cmAuxSourceDirectoryCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmAuxSourceDirectoryCommand * \brief Specify auxiliary source code directories. diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx index 816147b..3257c93 100644 --- a/Source/cmBuildNameCommand.cxx +++ b/Source/cmBuildNameCommand.cxx @@ -2,8 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmBuildNameCommand.h" +#include #include +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmBuildNameCommand bool cmBuildNameCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmBuildNameCommand.h b/Source/cmBuildNameCommand.h index 7c09d73..cefa379 100644 --- a/Source/cmBuildNameCommand.h +++ b/Source/cmBuildNameCommand.h @@ -3,7 +3,14 @@ #ifndef cmBuildNameCommand_h #define cmBuildNameCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmBuildNameCommand : public cmCommand { diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx index 018010e..7da93ac 100644 --- a/Source/cmCMakeHostSystemInformationCommand.cxx +++ b/Source/cmCMakeHostSystemInformationCommand.cxx @@ -2,6 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakeHostSystemInformationCommand.h" +#include + +#include "cmMakefile.h" +#include "cmsys/SystemInformation.hxx" + +class cmExecutionStatus; + // cmCMakeHostSystemInformation bool cmCMakeHostSystemInformationCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmCMakeHostSystemInformationCommand.h b/Source/cmCMakeHostSystemInformationCommand.h index 4ab6aa1..585d7fa 100644 --- a/Source/cmCMakeHostSystemInformationCommand.h +++ b/Source/cmCMakeHostSystemInformationCommand.h @@ -3,9 +3,18 @@ #ifndef cmCMakeHostSystemInformationCommand_h #define cmCMakeHostSystemInformationCommand_h +#include +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" -#include +class cmExecutionStatus; +namespace cmsys { +class SystemInformation; +} // namespace cmsys /** \class cmCMakeHostSystemInformationCommand * \brief Query host system specific information diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 155456a..50c3e7e 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -7,10 +7,12 @@ #include "cmCPluginAPI.h" +#include "cmExecutionStatus.h" +#include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmVersion.h" - #include "cmSourceFile.h" +#include "cmVersion.h" +#include "cmState.h" #include diff --git a/Source/cmElseIfCommand.cxx b/Source/cmElseIfCommand.cxx index cc3624b..1c32248 100644 --- a/Source/cmElseIfCommand.cxx +++ b/Source/cmElseIfCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmElseIfCommand.h" +class cmExecutionStatus; + bool cmElseIfCommand::InitialPass(std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmElseIfCommand.h b/Source/cmElseIfCommand.h index a489e30..6675b16 100644 --- a/Source/cmElseIfCommand.h +++ b/Source/cmElseIfCommand.h @@ -3,7 +3,14 @@ #ifndef cmElseIfCommand_h #define cmElseIfCommand_h -#include "cmIfCommand.h" +#include +#include +#include + +#include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmElseIfCommand * \brief ends an if block diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 4fb5998..c9dac35 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -2,15 +2,22 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExportCommand.h" -#include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmake.h" - -#include #include +#include +#include #include "cmExportBuildAndroidMKGenerator.h" #include "cmExportBuildFileGenerator.h" +#include "cmExportSetMap.h" +#include "cmGeneratedFileStream.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; #if defined(__HAIKU__) #include @@ -271,6 +278,7 @@ bool cmExportCommand::HandlePackage(std::vector const& args) #if defined(_WIN32) && !defined(__CYGWIN__) #include + #undef GetCurrentDirectory void cmExportCommand::ReportRegistryError(std::string const& msg, std::string const& key, long err) diff --git a/Source/cmExportCommand.h b/Source/cmExportCommand.h index ebde71c..8893000 100644 --- a/Source/cmExportCommand.h +++ b/Source/cmExportCommand.h @@ -3,9 +3,15 @@ #ifndef cmExportCommand_h #define cmExportCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmCommandArgumentsHelper.h" +#include "cmTypeMacro.h" -class cmExportBuildFileGenerator; +class cmExecutionStatus; class cmExportSet; /** \class cmExportLibraryDependenciesCommand diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index 66b77a6..bf1ea01 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -2,12 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExportLibraryDependenciesCommand.h" +#include +#include + #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" -#include "cmVersion.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetLinkLibraryType.h" #include "cmake.h" -#include +class cmExecutionStatus; bool cmExportLibraryDependenciesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmExportLibraryDependenciesCommand.h b/Source/cmExportLibraryDependenciesCommand.h index fa9f353..0a7823a 100644 --- a/Source/cmExportLibraryDependenciesCommand.h +++ b/Source/cmExportLibraryDependenciesCommand.h @@ -3,7 +3,14 @@ #ifndef cmExportLibraryDependenciesCommand_h #define cmExportLibraryDependenciesCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmExportLibraryDependenciesCommand : public cmCommand { diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index 5f621f1..1f0ce8d 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFLTKWrapUICommand.h" +#include + +#include "cmCustomCommandLines.h" +#include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; +class cmTarget; // cmFLTKWrapUICommand bool cmFLTKWrapUICommand::InitialPass(std::vector const& args, diff --git a/Source/cmFLTKWrapUICommand.h b/Source/cmFLTKWrapUICommand.h index 202067f..74bb8bb 100644 --- a/Source/cmFLTKWrapUICommand.h +++ b/Source/cmFLTKWrapUICommand.h @@ -3,7 +3,15 @@ #ifndef cmFLTKWrapUICommand_h #define cmFLTKWrapUICommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; +class cmSourceFile; /** \class cmFLTKWrapUICommand * \brief Create .h and .cxx files rules for FLTK user interfaces files diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index d598722..e7e9402 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -2,6 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeExternalMSProjectCommand.h" +#ifdef _WIN32 +#include "cmSystemTools.h" +#endif + +class cmExecutionStatus; + // cmIncludeExternalMSProjectCommand bool cmIncludeExternalMSProjectCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmIncludeExternalMSProjectCommand.h b/Source/cmIncludeExternalMSProjectCommand.h index 9401016..bfe7b2a 100644 --- a/Source/cmIncludeExternalMSProjectCommand.h +++ b/Source/cmIncludeExternalMSProjectCommand.h @@ -3,7 +3,14 @@ #ifndef cmIncludeExternalMSProjectCommand_h #define cmIncludeExternalMSProjectCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmIncludeExternalMSProjectCommand * \brief Specify an external MS project file for inclusion in the workspace. diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index bb2b61f..5ee81fb 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallProgramsCommand.h" +#include "cmGeneratorExpression.h" +#include "cmGlobalGenerator.h" #include "cmInstallFilesGenerator.h" +#include "cmInstallGenerator.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmExecutableCommand bool cmInstallProgramsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmInstallProgramsCommand.h b/Source/cmInstallProgramsCommand.h index cb85cce..aa6c2fc 100644 --- a/Source/cmInstallProgramsCommand.h +++ b/Source/cmInstallProgramsCommand.h @@ -3,7 +3,14 @@ #ifndef cmInstallProgramsCommand_h #define cmInstallProgramsCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmInstallProgramsCommand * \brief Specifies where to install some programs diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index 4202cf5..708ec8c 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLinkLibrariesCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // cmLinkLibrariesCommand bool cmLinkLibrariesCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmLinkLibrariesCommand.h b/Source/cmLinkLibrariesCommand.h index b4943b6..160eeb4 100644 --- a/Source/cmLinkLibrariesCommand.h +++ b/Source/cmLinkLibrariesCommand.h @@ -3,7 +3,14 @@ #ifndef cmLinkLibrariesCommand_h #define cmLinkLibrariesCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmLinkLibrariesCommand * \brief Specify a list of libraries to link into executables. diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index 49db5b0..2a06cb4 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -3,7 +3,13 @@ #include "cmLoadCacheCommand.h" #include -#include + +#include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmLoadCacheCommand bool cmLoadCacheCommand::InitialPass(std::vector const& args, diff --git a/Source/cmLoadCacheCommand.h b/Source/cmLoadCacheCommand.h index 57f64cd..64b82c5 100644 --- a/Source/cmLoadCacheCommand.h +++ b/Source/cmLoadCacheCommand.h @@ -3,7 +3,15 @@ #ifndef cmLoadCacheCommand_h #define cmLoadCacheCommand_h +#include +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmLoadCacheCommand * \brief load a cache file diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index bcfec79..12b3aa8 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -5,16 +5,23 @@ #include "cmCPluginAPI.cxx" #include "cmCPluginAPI.h" #include "cmDynamicLoader.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" -#include +class cmExecutionStatus; +#include +#include +#include #include +#include #ifdef __QNX__ #include /* for malloc/free on QNX */ #endif -#include extern "C" void TrapsForSignalsCFunction(int sig); // a class for loadabple commands diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h index e42d46a..470b9c5 100644 --- a/Source/cmLoadCommandCommand.h +++ b/Source/cmLoadCommandCommand.h @@ -3,7 +3,14 @@ #ifndef cmLoadCommandCommand_h #define cmLoadCommandCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmLoadCommandCommand : public cmCommand { diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index 8b629fe..6ecd942 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -2,8 +2,18 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmOutputRequiredFilesCommand.h" -#include "cmAlgorithms.h" #include +#include + +#include "cmAlgorithms.h" +#include "cmGeneratorExpression.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmSourceFile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" + +class cmExecutionStatus; /** \class cmDependInformation * \brief Store dependency information for a single source file. diff --git a/Source/cmOutputRequiredFilesCommand.h b/Source/cmOutputRequiredFilesCommand.h index 7a81a76..6bce1b7 100644 --- a/Source/cmOutputRequiredFilesCommand.h +++ b/Source/cmOutputRequiredFilesCommand.h @@ -3,9 +3,17 @@ #ifndef cmOutputRequiredFilesCommand_h #define cmOutputRequiredFilesCommand_h +#include +#include +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" class cmDependInformation; +class cmExecutionStatus; class cmOutputRequiredFilesCommand : public cmCommand { diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx index 3a721da..b0ff68d 100644 --- a/Source/cmQTWrapCPPCommand.cxx +++ b/Source/cmQTWrapCPPCommand.cxx @@ -2,6 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmQTWrapCPPCommand.h" +#include "cmCustomCommandLines.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmQTWrapCPPCommand bool cmQTWrapCPPCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmQTWrapCPPCommand.h b/Source/cmQTWrapCPPCommand.h index 3567fb6..015f90e 100644 --- a/Source/cmQTWrapCPPCommand.h +++ b/Source/cmQTWrapCPPCommand.h @@ -3,9 +3,14 @@ #ifndef cmQTWrapCPPCommand_h #define cmQTWrapCPPCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" -#include "cmSourceFile.h" +class cmExecutionStatus; /** \class cmQTWrapCPPCommand * \brief Create moc file rules for Qt classes diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx index 3b0f083..052e633 100644 --- a/Source/cmQTWrapUICommand.cxx +++ b/Source/cmQTWrapUICommand.cxx @@ -2,6 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmQTWrapUICommand.h" +#include "cmCustomCommandLines.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmQTWrapUICommand bool cmQTWrapUICommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmQTWrapUICommand.h b/Source/cmQTWrapUICommand.h index 84b88a8..da43961 100644 --- a/Source/cmQTWrapUICommand.h +++ b/Source/cmQTWrapUICommand.h @@ -3,9 +3,14 @@ #ifndef cmQTWrapUICommand_h #define cmQTWrapUICommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" -#include "cmSourceFile.h" +class cmExecutionStatus; /** \class cmQTWrapUICommand * \brief Create .h and .cxx files rules for Qt user interfaces files diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx index 540f37f..5a52927 100644 --- a/Source/cmRemoveCommand.cxx +++ b/Source/cmRemoveCommand.cxx @@ -2,6 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmRemoveCommand.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmRemoveCommand bool cmRemoveCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmRemoveCommand.h b/Source/cmRemoveCommand.h index bf33de0..5107038 100644 --- a/Source/cmRemoveCommand.h +++ b/Source/cmRemoveCommand.h @@ -3,7 +3,14 @@ #ifndef cmRemoveCommand_h #define cmRemoveCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmRemoveCommand * \brief remove command diff --git a/Source/cmRemoveDefinitionsCommand.cxx b/Source/cmRemoveDefinitionsCommand.cxx index cae5072..f5fe2df 100644 --- a/Source/cmRemoveDefinitionsCommand.cxx +++ b/Source/cmRemoveDefinitionsCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmRemoveDefinitionsCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // cmRemoveDefinitionsCommand bool cmRemoveDefinitionsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmRemoveDefinitionsCommand.h b/Source/cmRemoveDefinitionsCommand.h index 016f5fd..c88c66d 100644 --- a/Source/cmRemoveDefinitionsCommand.h +++ b/Source/cmRemoveDefinitionsCommand.h @@ -3,7 +3,14 @@ #ifndef cmRemoveDefinitionsCommand_h #define cmRemoveDefinitionsCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmRemoveDefinitionsCommand * \brief Specify a list of compiler defines diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx index 2b176b5..ff3ec7f 100644 --- a/Source/cmSourceGroupCommand.cxx +++ b/Source/cmSourceGroupCommand.cxx @@ -2,6 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSourceGroupCommand.h" +#include + +#include "cmMakefile.h" +#include "cmSourceGroup.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmSourceGroupCommand bool cmSourceGroupCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h index e3639df..89d86dc 100644 --- a/Source/cmSourceGroupCommand.h +++ b/Source/cmSourceGroupCommand.h @@ -3,7 +3,14 @@ #ifndef cmSourceGroupCommand_h #define cmSourceGroupCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmSourceGroupCommand * \brief Adds a cmSourceGroup to the cmMakefile. diff --git a/Source/cmSubdirDependsCommand.cxx b/Source/cmSubdirDependsCommand.cxx index b5b4148..9259836 100644 --- a/Source/cmSubdirDependsCommand.cxx +++ b/Source/cmSubdirDependsCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSubdirDependsCommand.h" +#include "cmPolicies.h" + +class cmExecutionStatus; + bool cmSubdirDependsCommand::InitialPass(std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmSubdirDependsCommand.h b/Source/cmSubdirDependsCommand.h index 0f3deb6..c8d9025 100644 --- a/Source/cmSubdirDependsCommand.h +++ b/Source/cmSubdirDependsCommand.h @@ -3,7 +3,14 @@ #ifndef cmSubdirDependsCommand_h #define cmSubdirDependsCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmSubdirDependsCommand : public cmCommand { diff --git a/Source/cmTargetCompileDefinitionsCommand.cxx b/Source/cmTargetCompileDefinitionsCommand.cxx index 9f08ba7..008d1a2 100644 --- a/Source/cmTargetCompileDefinitionsCommand.cxx +++ b/Source/cmTargetCompileDefinitionsCommand.cxx @@ -2,7 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetCompileDefinitionsCommand.h" +#include + #include "cmAlgorithms.h" +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; bool cmTargetCompileDefinitionsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetCompileDefinitionsCommand.h b/Source/cmTargetCompileDefinitionsCommand.h index b49f616..69edfb2 100644 --- a/Source/cmTargetCompileDefinitionsCommand.h +++ b/Source/cmTargetCompileDefinitionsCommand.h @@ -3,7 +3,16 @@ #ifndef cmTargetCompileDefinitionsCommand_h #define cmTargetCompileDefinitionsCommand_h +#include +#include +#include + #include "cmTargetPropCommandBase.h" +#include "cmTypeMacro.h" + +class cmCommand; +class cmExecutionStatus; +class cmTarget; class cmTargetCompileDefinitionsCommand : public cmTargetPropCommandBase { diff --git a/Source/cmTargetCompileFeaturesCommand.cxx b/Source/cmTargetCompileFeaturesCommand.cxx index 7636347..a1c9b82 100644 --- a/Source/cmTargetCompileFeaturesCommand.cxx +++ b/Source/cmTargetCompileFeaturesCommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetCompileFeaturesCommand.h" +#include +#include + #include "cmAlgorithms.h" +#include "cmMakefile.h" +#include "cmake.h" + +class cmExecutionStatus; +class cmTarget; bool cmTargetCompileFeaturesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetCompileFeaturesCommand.h b/Source/cmTargetCompileFeaturesCommand.h index 8273e02..275df43 100644 --- a/Source/cmTargetCompileFeaturesCommand.h +++ b/Source/cmTargetCompileFeaturesCommand.h @@ -3,7 +3,16 @@ #ifndef cmTargetCompileFeaturesCommand_h #define cmTargetCompileFeaturesCommand_h +#include +#include +#include + #include "cmTargetPropCommandBase.h" +#include "cmTypeMacro.h" + +class cmCommand; +class cmExecutionStatus; +class cmTarget; class cmTargetCompileFeaturesCommand : public cmTargetPropCommandBase { diff --git a/Source/cmTargetCompileOptionsCommand.cxx b/Source/cmTargetCompileOptionsCommand.cxx index eb66dd3..a4db55b 100644 --- a/Source/cmTargetCompileOptionsCommand.cxx +++ b/Source/cmTargetCompileOptionsCommand.cxx @@ -2,7 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetCompileOptionsCommand.h" +#include +#include + #include "cmAlgorithms.h" +#include "cmListFileCache.h" +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; bool cmTargetCompileOptionsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetCompileOptionsCommand.h b/Source/cmTargetCompileOptionsCommand.h index f5b4c70..d1a9d5b 100644 --- a/Source/cmTargetCompileOptionsCommand.h +++ b/Source/cmTargetCompileOptionsCommand.h @@ -3,7 +3,16 @@ #ifndef cmTargetCompileOptionsCommand_h #define cmTargetCompileOptionsCommand_h +#include +#include +#include + #include "cmTargetPropCommandBase.h" +#include "cmTypeMacro.h" + +class cmCommand; +class cmExecutionStatus; +class cmTarget; class cmTargetCompileOptionsCommand : public cmTargetPropCommandBase { diff --git a/Source/cmTargetIncludeDirectoriesCommand.cxx b/Source/cmTargetIncludeDirectoriesCommand.cxx index 37b9598..65a3149 100644 --- a/Source/cmTargetIncludeDirectoriesCommand.cxx +++ b/Source/cmTargetIncludeDirectoriesCommand.cxx @@ -2,7 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetIncludeDirectoriesCommand.h" +#include +#include + #include "cmGeneratorExpression.h" +#include "cmListFileCache.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; bool cmTargetIncludeDirectoriesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetIncludeDirectoriesCommand.h b/Source/cmTargetIncludeDirectoriesCommand.h index 671627a..e206823 100644 --- a/Source/cmTargetIncludeDirectoriesCommand.h +++ b/Source/cmTargetIncludeDirectoriesCommand.h @@ -3,7 +3,16 @@ #ifndef cmTargetIncludeDirectoriesCommand_h #define cmTargetIncludeDirectoriesCommand_h +#include +#include +#include + #include "cmTargetPropCommandBase.h" +#include "cmTypeMacro.h" + +class cmCommand; +class cmExecutionStatus; +class cmTarget; class cmTargetIncludeDirectoriesCommand : public cmTargetPropCommandBase { diff --git a/Source/cmTargetSourcesCommand.cxx b/Source/cmTargetSourcesCommand.cxx index 2170247..13c9a8f 100644 --- a/Source/cmTargetSourcesCommand.cxx +++ b/Source/cmTargetSourcesCommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetSourcesCommand.h" -#include "cmGeneratorExpression.h" +#include +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; bool cmTargetSourcesCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetSourcesCommand.h b/Source/cmTargetSourcesCommand.h index 8f88b25..fa5738a 100644 --- a/Source/cmTargetSourcesCommand.h +++ b/Source/cmTargetSourcesCommand.h @@ -3,7 +3,16 @@ #ifndef cmTargetSourcesCommand_h #define cmTargetSourcesCommand_h +#include +#include +#include + #include "cmTargetPropCommandBase.h" +#include "cmTypeMacro.h" + +class cmCommand; +class cmExecutionStatus; +class cmTarget; class cmTargetSourcesCommand : public cmTargetPropCommandBase { diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx index e2b6b1a..ffeaa51 100644 --- a/Source/cmUseMangledMesaCommand.cxx +++ b/Source/cmUseMangledMesaCommand.cxx @@ -2,11 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUseMangledMesaCommand.h" -#include "cmSystemTools.h" - #include #include +#include "cmPolicies.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + bool cmUseMangledMesaCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { diff --git a/Source/cmUseMangledMesaCommand.h b/Source/cmUseMangledMesaCommand.h index a5fa146..bf6352c 100644 --- a/Source/cmUseMangledMesaCommand.h +++ b/Source/cmUseMangledMesaCommand.h @@ -3,7 +3,14 @@ #ifndef cmUseMangledMesaCommand_h #define cmUseMangledMesaCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmUseMangledMesaCommand : public cmCommand { diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index c816114..1a42be3 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUtilitySourceCommand.h" +#include + +#include "cmState.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; // cmUtilitySourceCommand bool cmUtilitySourceCommand::InitialPass(std::vector const& args, diff --git a/Source/cmUtilitySourceCommand.h b/Source/cmUtilitySourceCommand.h index 6ee5f3e..7d12313 100644 --- a/Source/cmUtilitySourceCommand.h +++ b/Source/cmUtilitySourceCommand.h @@ -3,7 +3,14 @@ #ifndef cmUtilitySourceCommand_h #define cmUtilitySourceCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmUtilitySourceCommand : public cmCommand { diff --git a/Source/cmVariableRequiresCommand.cxx b/Source/cmVariableRequiresCommand.cxx index 7599551..1eb1f20 100644 --- a/Source/cmVariableRequiresCommand.cxx +++ b/Source/cmVariableRequiresCommand.cxx @@ -2,7 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmVariableRequiresCommand.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; // cmLibraryCommand bool cmVariableRequiresCommand::InitialPass( diff --git a/Source/cmVariableRequiresCommand.h b/Source/cmVariableRequiresCommand.h index e40151b..62f89da 100644 --- a/Source/cmVariableRequiresCommand.h +++ b/Source/cmVariableRequiresCommand.h @@ -3,7 +3,14 @@ #ifndef cmVariableRequiresCommand_h #define cmVariableRequiresCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmVariableRequiresCommand : public cmCommand { diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx index 5c1e00a..90b0b28 100644 --- a/Source/cmVariableWatchCommand.cxx +++ b/Source/cmVariableWatchCommand.cxx @@ -2,7 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmVariableWatchCommand.h" +#include + +#include "cmExecutionStatus.h" +#include "cmListFileCache.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" #include "cmVariableWatch.h" +#include "cmake.h" struct cmVariableWatchCallbackData { diff --git a/Source/cmVariableWatchCommand.h b/Source/cmVariableWatchCommand.h index b1862f0..5f5cba8 100644 --- a/Source/cmVariableWatchCommand.h +++ b/Source/cmVariableWatchCommand.h @@ -3,7 +3,15 @@ #ifndef cmVariableWatchCommand_h #define cmVariableWatchCommand_h +#include +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmVariableWatchCommand * \brief Watch when the variable changes and invoke command diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx index 0bdef0f..b3ac31c 100644 --- a/Source/cmWriteFileCommand.cxx +++ b/Source/cmWriteFileCommand.cxx @@ -8,6 +8,11 @@ // include sys/stat.h after sys/types.h #include +#include "cmMakefile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmLibraryCommand bool cmWriteFileCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmWriteFileCommand.h b/Source/cmWriteFileCommand.h index dbadf84..c6a30b0 100644 --- a/Source/cmWriteFileCommand.h +++ b/Source/cmWriteFileCommand.h @@ -3,7 +3,14 @@ #ifndef cmWriteFileCommand_h #define cmWriteFileCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmWriteFileCommand * \brief Writes a message to a file ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 287 +++++++++++++++++++----- Source/cmAddCompileOptionsCommand.cxx | 4 + Source/cmAddCompileOptionsCommand.h | 7 + Source/cmAddExecutableCommand.cxx | 2 + Source/cmAddLibraryCommand.cxx | 2 + Source/cmAddSubDirectoryCommand.cxx | 2 + Source/cmAuxSourceDirectoryCommand.cxx | 10 +- Source/cmAuxSourceDirectoryCommand.h | 7 + Source/cmBootstrapCommands1.cxx | 87 ------- Source/cmBootstrapCommands2.cxx | 94 -------- Source/cmBuildNameCommand.cxx | 8 + Source/cmBuildNameCommand.h | 7 + Source/cmCMakeHostSystemInformationCommand.cxx | 7 + Source/cmCMakeHostSystemInformationCommand.h | 11 +- Source/cmCMakeMinimumRequired.cxx | 1 + Source/cmCPluginAPI.cxx | 6 +- Source/cmCommand.cxx | 48 ++++ Source/cmCommand.h | 48 +--- Source/cmCommands.cxx | 238 ++++++++++++++++++++ Source/cmCommands.cxx.in | 10 - Source/cmCommands.h | 10 +- Source/cmCommandsForBootstrap.cxx | 7 - Source/cmConfigureFileCommand.cxx | 2 + Source/cmContinueCommand.cxx | 3 + Source/cmCreateTestSourceList.cxx | 1 + Source/cmElseIfCommand.cxx | 2 + Source/cmElseIfCommand.h | 9 +- Source/cmExportCommand.cxx | 18 +- Source/cmExportCommand.h | 8 +- Source/cmExportLibraryDependenciesCommand.cxx | 12 +- Source/cmExportLibraryDependenciesCommand.h | 7 + Source/cmFLTKWrapUICommand.cxx | 8 + Source/cmFLTKWrapUICommand.h | 8 + Source/cmFindBase.cxx | 1 + Source/cmFindCommon.cxx | 2 + Source/cmFindLibraryCommand.cxx | 4 + Source/cmFindPackageCommand.cxx | 3 + Source/cmFindPathCommand.cxx | 2 + Source/cmFindProgramCommand.cxx | 2 + Source/cmForEachCommand.cxx | 2 + Source/cmFunctionCommand.cxx | 2 + Source/cmGetCMakePropertyCommand.cxx | 1 + Source/cmGetDirectoryPropertyCommand.cxx | 2 + Source/cmHexFileConverter.cxx | 2 + Source/cmIfCommand.cxx | 1 + Source/cmIncludeCommand.cxx | 3 + Source/cmIncludeDirectoryCommand.cxx | 2 + Source/cmIncludeExternalMSProjectCommand.cxx | 6 + Source/cmIncludeExternalMSProjectCommand.h | 7 + Source/cmInstallCommand.cxx | 2 + Source/cmInstallFilesCommand.cxx | 2 + Source/cmInstallProgramsCommand.cxx | 8 + Source/cmInstallProgramsCommand.h | 7 + Source/cmInstallTargetsCommand.cxx | 2 + Source/cmLinkDirectoriesCommand.cxx | 2 + Source/cmLinkLibrariesCommand.cxx | 4 + Source/cmLinkLibrariesCommand.h | 7 + Source/cmListCommand.cxx | 1 + Source/cmLoadCacheCommand.cxx | 8 +- Source/cmLoadCacheCommand.h | 8 + Source/cmLoadCommandCommand.cxx | 11 +- Source/cmLoadCommandCommand.h | 7 + Source/cmMacroCommand.cxx | 2 + Source/cmMakeDirectoryCommand.cxx | 2 + Source/cmMarkAsAdvancedCommand.cxx | 3 + Source/cmMessageCommand.cxx | 1 + Source/cmOptionCommand.cxx | 3 + Source/cmOutputRequiredFilesCommand.cxx | 12 +- Source/cmOutputRequiredFilesCommand.h | 8 + Source/cmParseArgumentsCommand.cxx | 1 + Source/cmProjectCommand.cxx | 2 + Source/cmQTWrapCPPCommand.cxx | 7 + Source/cmQTWrapCPPCommand.h | 7 +- Source/cmQTWrapUICommand.cxx | 7 + Source/cmQTWrapUICommand.h | 7 +- Source/cmRemoveCommand.cxx | 5 + Source/cmRemoveCommand.h | 7 + Source/cmRemoveDefinitionsCommand.cxx | 4 + Source/cmRemoveDefinitionsCommand.h | 7 + Source/cmReturnCommand.cxx | 2 + Source/cmSearchPath.cxx | 1 + Source/cmSeparateArgumentsCommand.cxx | 2 + Source/cmSetCommand.cxx | 3 + Source/cmSetPropertyCommand.cxx | 4 + Source/cmSetSourceFilesPropertiesCommand.cxx | 1 + Source/cmSiteNameCommand.cxx | 2 + Source/cmSourceGroupCommand.cxx | 8 + Source/cmSourceGroupCommand.h | 7 + Source/cmStringCommand.cxx | 1 + Source/cmSubdirCommand.cxx | 2 + Source/cmSubdirDependsCommand.cxx | 4 + Source/cmSubdirDependsCommand.h | 7 + Source/cmTargetCompileDefinitionsCommand.cxx | 7 + Source/cmTargetCompileDefinitionsCommand.h | 9 + Source/cmTargetCompileFeaturesCommand.cxx | 8 + Source/cmTargetCompileFeaturesCommand.h | 9 + Source/cmTargetCompileOptionsCommand.cxx | 9 + Source/cmTargetCompileOptionsCommand.h | 9 + Source/cmTargetIncludeDirectoriesCommand.cxx | 10 + Source/cmTargetIncludeDirectoriesCommand.h | 9 + Source/cmTargetLinkLibrariesCommand.cxx | 3 + Source/cmTargetSourcesCommand.cxx | 10 +- Source/cmTargetSourcesCommand.h | 9 + Source/cmTimestamp.cxx | 2 + Source/cmTryRunCommand.cxx | 3 + Source/cmUnsetCommand.cxx | 2 + Source/cmUseMangledMesaCommand.cxx | 7 +- Source/cmUseMangledMesaCommand.h | 7 + Source/cmUtilitySourceCommand.cxx | 8 + Source/cmUtilitySourceCommand.h | 7 + Source/cmVariableRequiresCommand.cxx | 5 + Source/cmVariableRequiresCommand.h | 7 + Source/cmVariableWatchCommand.cxx | 7 + Source/cmVariableWatchCommand.h | 8 + Source/cmWhileCommand.cxx | 1 + Source/cmWriteFileCommand.cxx | 5 + Source/cmWriteFileCommand.h | 7 + Source/cmake.cxx | 7 +- bootstrap | 192 +++++++++++----- 119 files changed, 1205 insertions(+), 383 deletions(-) delete mode 100644 Source/cmBootstrapCommands1.cxx delete mode 100644 Source/cmBootstrapCommands2.cxx create mode 100644 Source/cmCommand.cxx create mode 100644 Source/cmCommands.cxx delete mode 100644 Source/cmCommands.cxx.in delete mode 100644 Source/cmCommandsForBootstrap.cxx hooks/post-receive -- CMake From daniel at pfeifer-mail.de Fri Oct 21 15:41:37 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Fri, 21 Oct 2016 15:41:37 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-665-g1a8f42e Message-ID: <20161021194137.470E4F5C4B@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 1a8f42e50f1435c05479ad3039e27d6c842a69fd (commit) via 32040cd3aefa07524d64f65340bdc2b7e1cca513 (commit) from 35e25ada0edbcd6a36204ea13a4da8309dab3cfc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a8f42e50f1435c05479ad3039e27d6c842a69fd commit 1a8f42e50f1435c05479ad3039e27d6c842a69fd Merge: 35e25ad 32040cd Author: Daniel Pfeifer AuthorDate: Fri Oct 21 15:41:30 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 15:41:30 2016 -0400 Merge topic 'separate-compilation' into next 32040cd3 Fix newly discovered clang-tidy issues https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32040cd3aefa07524d64f65340bdc2b7e1cca513 commit 32040cd3aefa07524d64f65340bdc2b7e1cca513 Author: Daniel Pfeifer AuthorDate: Fri Oct 21 21:32:43 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 21:32:43 2016 +0200 Fix newly discovered clang-tidy issues Clang-tidy reports some issues only from the currently compiled source file and its associated header file. Separating the compilation of commands exposed some clang-tidy issues that were not reported previously. Fix them. diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 18118a3..56cf91a 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -270,8 +270,8 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, yet its linker language. */ if ((type == cmStateEnums::SHARED_LIBRARY || type == cmStateEnums::MODULE_LIBRARY) && - (this->Makefile->GetState()->GetGlobalPropertyAsBool( - "TARGET_SUPPORTS_SHARED_LIBS") == false)) { + !this->Makefile->GetState()->GetGlobalPropertyAsBool( + "TARGET_SUPPORTS_SHARED_LIBS")) { std::ostringstream w; w << "ADD_LIBRARY called with " << (type == cmStateEnums::SHARED_LIBRARY ? "SHARED" : "MODULE") diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 4c0b649..7d98e73 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -222,7 +222,7 @@ bool cmConditionEvaluator::GetBooleanValue( double d = strtod(arg.c_str(), &end); if (*end == '\0') { // The whole string is a number. Use C conversion to bool. - return d ? true : false; + return static_cast(d); } } @@ -444,7 +444,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&, if (this->IsKeyword(keyCOMMAND, *arg) && argP1 != newArgs.end()) { cmCommand* command = this->Makefile.GetState()->GetCommand(argP1->c_str()); - this->HandlePredicate(command ? true : false, reducible, arg, newArgs, + this->HandlePredicate(command != CM_NULLPTR, reducible, arg, newArgs, argP1, argP2); } // does a policy exist @@ -456,7 +456,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&, // does a target exist if (this->IsKeyword(keyTARGET, *arg) && argP1 != newArgs.end()) { this->HandlePredicate( - this->Makefile.FindTargetToUse(argP1->GetValue()) ? true : false, + this->Makefile.FindTargetToUse(argP1->GetValue()) != CM_NULLPTR, reducible, arg, newArgs, argP1, argP2); } // does a test exist @@ -464,7 +464,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&, this->Policy64Status != cmPolicies::WARN) { if (this->IsKeyword(keyTEST, *arg) && argP1 != newArgs.end()) { const cmTest* haveTest = this->Makefile.GetTest(argP1->c_str()); - this->HandlePredicate(haveTest ? true : false, reducible, arg, + this->HandlePredicate(haveTest != CM_NULLPTR, reducible, arg, newArgs, argP1, argP2); } } else if (this->Policy64Status == cmPolicies::WARN && @@ -638,8 +638,8 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList& newArgs, bool success = cmSystemTools::FileTimeCompare( arg->GetValue(), (argP2)->GetValue(), &fileIsNewer); this->HandleBinaryOp( - (success == false || fileIsNewer == 1 || fileIsNewer == 0), - reducible, arg, newArgs, argP1, argP2); + (!success || fileIsNewer == 1 || fileIsNewer == 0), reducible, arg, + newArgs, argP1, argP2); } if (argP1 != newArgs.end() && argP2 != newArgs.end() && diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 8dd204b..6b5870b 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2449,18 +2449,14 @@ public: { } - ~cURLEasyGuard(void) + ~cURLEasyGuard() { if (this->Easy) { ::curl_easy_cleanup(this->Easy); } } - inline void release(void) - { - this->Easy = CM_NULLPTR; - return; - } + void release() { this->Easy = CM_NULLPTR; } private: ::CURL* Easy; diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 9e08f30..118c581 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -302,7 +302,7 @@ bool cmFindBase::CheckForVariableInCache() cmState* state = this->Makefile->GetState(); const char* cacheEntry = state->GetCacheEntryValue(this->VariableName); bool found = !cmSystemTools::IsNOTFOUND(cacheValue); - bool cached = cacheEntry ? true : false; + bool cached = cacheEntry != CM_NULLPTR; if (found) { // If the user specifies the entry on the command line without a // type we should add the type and docstring but keep the diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 2784e16..373b728 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -673,8 +673,8 @@ bool cmFindPackageCommand::HandlePackageMode() bool configFileSetFOUNDFalse = false; if (fileFound) { - if ((this->Makefile->IsDefinitionSet(foundVar)) && - (this->Makefile->IsOn(foundVar) == false)) { + if (this->Makefile->IsDefinitionSet(foundVar) && + !this->Makefile->IsOn(foundVar)) { // by removing Foo_FOUND here if it is FALSE, we don't really change // the situation for the Config file which is about to be included, // but we make it possible to detect later on whether the Config file @@ -693,8 +693,8 @@ bool cmFindPackageCommand::HandlePackageMode() found = true; // Check whether the Config file has set Foo_FOUND to FALSE: - if ((this->Makefile->IsDefinitionSet(foundVar)) && - (this->Makefile->IsOn(foundVar) == false)) { + if (this->Makefile->IsDefinitionSet(foundVar) && + !this->Makefile->IsOn(foundVar)) { // we get here if the Config file has set Foo_FOUND actively to FALSE found = false; configFileSetFOUNDFalse = true; @@ -1416,8 +1416,7 @@ bool cmFindPackageCommand::CheckVersion(std::string const& config_file) // Look for foo-config-version.cmake std::string version_file = version_file_base; version_file += "-version.cmake"; - if ((haveResult == false) && - (cmSystemTools::FileExists(version_file.c_str(), true))) { + if (!haveResult && cmSystemTools::FileExists(version_file.c_str(), true)) { result = this->CheckVersionFile(version_file, version); haveResult = true; } @@ -1425,14 +1424,13 @@ bool cmFindPackageCommand::CheckVersion(std::string const& config_file) // Look for fooConfigVersion.cmake version_file = version_file_base; version_file += "Version.cmake"; - if ((haveResult == false) && - (cmSystemTools::FileExists(version_file.c_str(), true))) { + if (!haveResult && cmSystemTools::FileExists(version_file.c_str(), true)) { result = this->CheckVersionFile(version_file, version); haveResult = true; } // If no version was requested a versionless package is acceptable. - if ((haveResult == false) && (this->Version.empty())) { + if (!haveResult && this->Version.empty()) { result = true; } diff --git a/Source/cmHexFileConverter.cxx b/Source/cmHexFileConverter.cxx index 6f3ea6a..db855d2 100644 --- a/Source/cmHexFileConverter.cxx +++ b/Source/cmHexFileConverter.cxx @@ -206,7 +206,7 @@ bool cmHexFileConverter::TryConvert(const char* inFileName, } else if (type == IntelHex) { success = ConvertIntelHexLine(buf, outFile); } - if (success == false) { + if (!success) { break; } } diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index 12b3aa8..82d2ee3 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -64,7 +64,7 @@ public: void FinalPass() CM_OVERRIDE; bool HasFinalPass() const CM_OVERRIDE { - return this->info.FinalPass ? true : false; + return this->info.FinalPass != CM_NULLPTR; } /** ----------------------------------------------------------------------- Summary of changes: Source/cmAddLibraryCommand.cxx | 4 ++-- Source/cmConditionEvaluator.cxx | 12 ++++++------ Source/cmFileCommand.cxx | 8 ++------ Source/cmFindBase.cxx | 2 +- Source/cmFindPackageCommand.cxx | 16 +++++++--------- Source/cmHexFileConverter.cxx | 2 +- Source/cmLoadCommandCommand.cxx | 2 +- 7 files changed, 20 insertions(+), 26 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Fri Oct 21 17:53:17 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Fri, 21 Oct 2016 17:53:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-667-ga8102f9 Message-ID: <20161021215318.0534CF68CF@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 a8102f933066923c47ed35e0125a5c2e0940a4e8 (commit) via 719a9e8f89a9b6f9bfd78638b62907062a84d535 (commit) from 1a8f42e50f1435c05479ad3039e27d6c842a69fd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8102f933066923c47ed35e0125a5c2e0940a4e8 commit a8102f933066923c47ed35e0125a5c2e0940a4e8 Merge: 1a8f42e 719a9e8 Author: Daniel Pfeifer AuthorDate: Fri Oct 21 17:53:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 21 17:53:16 2016 -0400 Merge topic 'cm_unordered_map' into next 719a9e8f Introduce CM_UNORDERED_MAP https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=719a9e8f89a9b6f9bfd78638b62907062a84d535 commit 719a9e8f89a9b6f9bfd78638b62907062a84d535 Author: Daniel Pfeifer AuthorDate: Fri Oct 21 23:52:51 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 23:52:51 2016 +0200 Introduce CM_UNORDERED_MAP diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index 569b3a2..8dfb9ea 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -6,20 +6,11 @@ #include #include "cmLinkedTree.h" +#include "cm_unordered_map.hxx" #include #include -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include "cmsys/hash_map.hxx" -#endif -#else -#include -#endif - /** \class cmDefinitions * \brief Store a scope of variable definitions for CMake language. * @@ -85,15 +76,7 @@ private: }; static Def NoDef; -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map MapType; -#else - typedef cmsys::hash_map MapType; -#endif -#else - typedef std::map MapType; -#endif + typedef CM_UNORDERED_MAP MapType; MapType Map; static Def const& GetInternal(const std::string& key, StackIter begin, diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx index a6c9cd0..55d8c2a 100644 --- a/Source/cmFileTimeComparison.cxx +++ b/Source/cmFileTimeComparison.cxx @@ -7,14 +7,7 @@ #include #include -// Use a hash table to avoid duplicate file time checks from disk. -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include -#endif -#endif +#include "cm_unordered_map.hxx" // Use a platform-specific API to get file times efficiently. #if !defined(_WIN32) || defined(__CYGWIN__) @@ -35,27 +28,9 @@ public: bool FileTimesDiffer(const char* f1, const char* f2); private: -#if defined(CMAKE_BUILD_WITH_CMAKE) - // Use a hash table to efficiently map from file name to modification time. - class HashString - { - public: - size_t operator()(const std::string& s) const { return h(s.c_str()); } -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - std::hash h; -#else - cmsys::hash h; -#endif - }; -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map + typedef CM_UNORDERED_MAP FileStatsMap; FileStatsMap Files; -#endif // Internal methods to lookup and compare modification times. inline bool Stat(const char* fname, cmFileTimeComparison_Type* st); @@ -68,7 +43,6 @@ private: bool cmFileTimeComparisonInternal::Stat(const char* fname, cmFileTimeComparison_Type* st) { -#if defined(CMAKE_BUILD_WITH_CMAKE) // Use the stored time if available. cmFileTimeComparisonInternal::FileStatsMap::iterator fit = this->Files.find(fname); @@ -76,7 +50,6 @@ bool cmFileTimeComparisonInternal::Stat(const char* fname, *st = fit->second; return true; } -#endif #if !defined(_WIN32) || defined(__CYGWIN__) // POSIX version. Use the stat function. @@ -97,11 +70,8 @@ bool cmFileTimeComparisonInternal::Stat(const char* fname, *st = fdata.ftLastWriteTime; #endif -#if defined(CMAKE_BUILD_WITH_CMAKE) // Store the time for future use. this->Files[fname] = *st; -#endif - return true; } diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index d8d47a1..4bf4bd1 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -12,6 +12,7 @@ #include "cmTarget.h" #include "cmTargetDepend.h" #include "cm_codecvt.hxx" +#include "cm_unordered_map.hxx" #include #include @@ -22,11 +23,6 @@ #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmFileLockPool.h" -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include -#endif #endif class cmCustomCommandLines; @@ -468,22 +464,9 @@ protected: const char* GetPredefinedTargetsFolder(); private: -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map TargetMap; - typedef std::unordered_map - GeneratorTargetMap; - typedef std::unordered_map MakefileMap; -#else - typedef cmsys::hash_map TargetMap; - typedef cmsys::hash_map GeneratorTargetMap; - typedef cmsys::hash_map MakefileMap; -#endif -#else - typedef std::map TargetMap; - typedef std::map GeneratorTargetMap; - typedef std::map MakefileMap; -#endif + typedef CM_UNORDERED_MAP TargetMap; + typedef CM_UNORDERED_MAP GeneratorTargetMap; + typedef CM_UNORDERED_MAP MakefileMap; // Map efficiently from target name to cmTarget instance. // Do not use this structure for looping over all targets. // It contains both normal and globally visible imported targets. diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index b61e81b..d6a0dfb 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -12,6 +12,7 @@ #include "cmStateSnapshot.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" +#include "cm_unordered_map.hxx" #include "cmake.h" #if defined(CMAKE_BUILD_WITH_CMAKE) @@ -27,14 +28,6 @@ #include #include -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include -#endif -#endif - class cmCommand; class cmCompiledGeneratorExpression; class cmCustomCommandLines; @@ -783,15 +776,6 @@ protected: // libraries, classes, and executables mutable cmTargets Targets; -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map TargetMap; -#else - typedef cmsys::hash_map TargetMap; -#endif -#else - typedef std::map TargetMap; -#endif std::map AliasTargets; std::vector SourceFiles; @@ -863,6 +847,7 @@ private: friend class cmParseFileScope; std::vector ImportedTargetsOwned; + typedef CM_UNORDERED_MAP TargetMap; TargetMap ImportedTargets; // Internal policy stack management. @@ -900,15 +885,7 @@ private: cmSourceFile* LinearGetSourceFileWithOutput(const std::string& cname) const; // A map for fast output to input look up. -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map OutputToSourceMap; -#else - typedef cmsys::hash_map OutputToSourceMap; -#endif -#else - typedef std::map OutputToSourceMap; -#endif + typedef CM_UNORDERED_MAP OutputToSourceMap; OutputToSourceMap OutputToSource; void UpdateOutputToSourceMap(std::vector const& outputs, diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 929e204..1f035a1 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -12,6 +12,7 @@ #include "cmPropertyMap.h" #include "cmStateTypes.h" #include "cmTargetLinkLibraryType.h" +#include "cm_unordered_map.hxx" #include #include @@ -20,14 +21,6 @@ #include #include -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include -#endif -#endif - class cmMakefile; class cmSourceFile; class cmGlobalGenerator; @@ -324,15 +317,7 @@ private: cmListFileBacktrace Backtrace; }; -#ifdef CMAKE_BUILD_WITH_CMAKE -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -typedef std::unordered_map cmTargets; -#else -typedef cmsys::hash_map cmTargets; -#endif -#else -typedef std::map cmTargets; -#endif +typedef CM_UNORDERED_MAP cmTargets; class cmTargetSet : public std::set { diff --git a/Source/cm_unordered_map.hxx b/Source/cm_unordered_map.hxx new file mode 100644 index 0000000..dc8ca35 --- /dev/null +++ b/Source/cm_unordered_map.hxx @@ -0,0 +1,25 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef CM_UNORDERED_MAP_HXX +#define CM_UNORDERED_MAP_HXX + +#include + +#if defined(CMake_HAVE_CXX_UNORDERED_MAP) + +#include +#define CM_UNORDERED_MAP std::unordered_map + +#elif defined(CMAKE_BUILD_WITH_CMAKE) + +#include +#define CM_UNORDERED_MAP cmsys::hash_map + +#else + +#include +#define CM_UNORDERED_MAP std::map + +#endif + +#endif diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 388984f..44b76ef 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -27,6 +27,7 @@ #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmGraphVizWriter.h" #include "cmVariableWatch.h" +#include "cm_unordered_map.hxx" #include #endif @@ -122,11 +123,7 @@ class cmCommand; namespace { #if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -typedef std::unordered_map JsonValueMapType; -#else -typedef cmsys::hash_map JsonValueMapType; -#endif +typedef CM_UNORDERED_MAP JsonValueMapType; #endif } // namespace ----------------------------------------------------------------------- Summary of changes: Source/cmDefinitions.h | 21 ++------------------- Source/cmFileTimeComparison.cxx | 34 ++-------------------------------- Source/cmGlobalGenerator.h | 25 ++++--------------------- Source/cmMakefile.h | 29 +++-------------------------- Source/cmTarget.h | 19 ++----------------- Source/cm_unordered_map.hxx | 25 +++++++++++++++++++++++++ Source/cmake.cxx | 7 ++----- 7 files changed, 40 insertions(+), 120 deletions(-) create mode 100644 Source/cm_unordered_map.hxx hooks/post-receive -- CMake From kwrobot at kitware.com Sat Oct 22 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 22 Oct 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-294-gaf782d0 Message-ID: <20161022040107.9BC12F66FD@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 af782d021345506bb4e0d1e832a7b77fb8a0b12a (commit) from 1e555a44aa4e3d40bca2f88915c9f957098e5a55 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af782d021345506bb4e0d1e832a7b77fb8a0b12a commit af782d021345506bb4e0d1e832a7b77fb8a0b12a Author: Kitware Robot AuthorDate: Sat Oct 22 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Sat Oct 22 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 149e14d..05b766b 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 7) -set(CMake_VERSION_PATCH 20161021) +set(CMake_VERSION_PATCH 20161022) #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 Oct 23 00:01:05 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 23 Oct 2016 00:01:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-295-gaae5a9f Message-ID: <20161023040105.BC9C9F6C6C@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 aae5a9feb1b07bfae6968f2dfb3b3057a04b3c89 (commit) from af782d021345506bb4e0d1e832a7b77fb8a0b12a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aae5a9feb1b07bfae6968f2dfb3b3057a04b3c89 commit aae5a9feb1b07bfae6968f2dfb3b3057a04b3c89 Author: Kitware Robot AuthorDate: Sun Oct 23 00:01:03 2016 -0400 Commit: Kitware Robot CommitDate: Sun Oct 23 00:01:03 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 05b766b..5b0d435 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 7) -set(CMake_VERSION_PATCH 20161022) +set(CMake_VERSION_PATCH 20161023) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Sun Oct 23 04:02:59 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Sun, 23 Oct 2016 04:02:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-674-g797b4d3 Message-ID: <20161023080259.C0D62F6BD5@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 797b4d3a176c01c91b040ac4fc1e787796e62deb (commit) via dcb8b0fb35e74749d07b8aec837b41564691f0c7 (commit) via 2214011f7b3b13fe7ae0f68f0f9d49af11e12edd (commit) via 7f9a8d53aa8a3595f4f1f2f81607f8df3627642d (commit) via fb0b087c4dc65f18aef431e41de3aa9b91e35371 (commit) via 2169b0faa40a20cd9aae25f9170cca074579a023 (commit) via 9855ebf11a1556bd0b73a1eaec39232842871528 (commit) from a8102f933066923c47ed35e0125a5c2e0940a4e8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=797b4d3a176c01c91b040ac4fc1e787796e62deb commit 797b4d3a176c01c91b040ac4fc1e787796e62deb Merge: a8102f9 dcb8b0f Author: Daniel Pfeifer AuthorDate: Sun Oct 23 04:02:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 23 04:02:55 2016 -0400 Merge topic 'remove-cmobject' into next dcb8b0fb Remove cmObject.h and cmTypeMacro.h 2214011f Make cmCPackGenerator not inherit from cmObject 7f9a8d53 Make cmCPackGeneratorFactory not inherit from cmObject fb0b087c Make cmCTestGenericHandler not inherit from cmObject 2169b0fa Make cmCPackLog not inherit from cmObject 9855ebf1 Make cmCommand not inherit from cmObject https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcb8b0fb35e74749d07b8aec837b41564691f0c7 commit dcb8b0fb35e74749d07b8aec837b41564691f0c7 Author: Daniel Pfeifer AuthorDate: Sun Oct 23 01:19:00 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sun Oct 23 08:02:33 2016 +0200 Remove cmObject.h and cmTypeMacro.h diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index 88a3741..d656063 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -10,7 +10,6 @@ #include "cmCPackIFWInstaller.h" #include "cmCPackIFWPackage.h" #include "cmCPackIFWRepository.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPack7zGenerator.h b/Source/CPack/cmCPack7zGenerator.h index 063b032..a617d9b 100644 --- a/Source/CPack/cmCPack7zGenerator.h +++ b/Source/CPack/cmCPack7zGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPack7zGenerator * \brief A generator for 7z files diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index 7010664..df02ae8 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -7,7 +7,6 @@ #include "cmArchiveWrite.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h index f46ae5a..7db933e 100644 --- a/Source/CPack/cmCPackDebGenerator.h +++ b/Source/CPack/cmCPackDebGenerator.h @@ -6,7 +6,6 @@ #include #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index a7652b1..f32dd70 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -6,9 +6,7 @@ #include #include "cmCPackComponentGroup.h" -#include "cmObject.h" #include "cmSystemTools.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index 5381eb2..0a98f91 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -5,9 +5,6 @@ #include -#include "cmObject.h" -#include "cmTypeMacro.h" - #include #include #include diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 2ac805d..9ffe5c4 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -5,9 +5,6 @@ #include -#include "cmObject.h" -#include "cmTypeMacro.h" - #include #include #include diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h index d61341c..b4bf2d4 100644 --- a/Source/CPack/cmCPackNSISGenerator.h +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -6,7 +6,6 @@ #include #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackPKGGenerator.h b/Source/CPack/cmCPackPKGGenerator.h index 5569185..bb3c1a7 100644 --- a/Source/CPack/cmCPackPKGGenerator.h +++ b/Source/CPack/cmCPackPKGGenerator.h @@ -3,6 +3,9 @@ #ifndef cmCPackPKGGenerator_h #define cmCPackPKGGenerator_h +#include +#include + #include "cmCPackGenerator.h" class cmCPackComponent; diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h index f8bcbfe..4d48bd8 100644 --- a/Source/CPack/cmCPackRPMGenerator.h +++ b/Source/CPack/cmCPackRPMGenerator.h @@ -6,7 +6,6 @@ #include #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CPack/cmCPackSTGZGenerator.h b/Source/CPack/cmCPackSTGZGenerator.h index a1bee5f..4b9c1c6 100644 --- a/Source/CPack/cmCPackSTGZGenerator.h +++ b/Source/CPack/cmCPackSTGZGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackGenerator.h" #include "cmCPackTGZGenerator.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CPack/cmCPackTGZGenerator.h b/Source/CPack/cmCPackTGZGenerator.h index e93fb44..ee2e975 100644 --- a/Source/CPack/cmCPackTGZGenerator.h +++ b/Source/CPack/cmCPackTGZGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPackTGZGenerator * \brief A generator for TGZ files diff --git a/Source/CPack/cmCPackTXZGenerator.h b/Source/CPack/cmCPackTXZGenerator.h index b8a7597..876ca7d 100644 --- a/Source/CPack/cmCPackTXZGenerator.h +++ b/Source/CPack/cmCPackTXZGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPackTXZGenerator * \brief A generator for TXZ files diff --git a/Source/CPack/cmCPackTarBZip2Generator.h b/Source/CPack/cmCPackTarBZip2Generator.h index 2e8ba9b..42214fd 100644 --- a/Source/CPack/cmCPackTarBZip2Generator.h +++ b/Source/CPack/cmCPackTarBZip2Generator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPackTarBZip2Generator * \brief A generator for TarBZip2 files diff --git a/Source/CPack/cmCPackTarCompressGenerator.h b/Source/CPack/cmCPackTarCompressGenerator.h index 7d253e1..1476642 100644 --- a/Source/CPack/cmCPackTarCompressGenerator.h +++ b/Source/CPack/cmCPackTarCompressGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPackTarCompressGenerator * \brief A generator for TarCompress files diff --git a/Source/CPack/cmCPackZIPGenerator.h b/Source/CPack/cmCPackZIPGenerator.h index e0334fb..95b6489 100644 --- a/Source/CPack/cmCPackZIPGenerator.h +++ b/Source/CPack/cmCPackZIPGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPackZIPGenerator * \brief A generator for ZIP files diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index c305cbf..b06bd38 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -12,7 +12,6 @@ #include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" -#include "cmTypeMacro.h" #include "cm_auto_ptr.hxx" #include "cmake.h" diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h index 1d424f3..5885738 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.h +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestBuildCommand.h b/Source/CTest/cmCTestBuildCommand.h index acc0ecf..9cc6f7e 100644 --- a/Source/CTest/cmCTestBuildCommand.h +++ b/Source/CTest/cmCTestBuildCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestBuildHandler.h b/Source/CTest/cmCTestBuildHandler.h index 69970d5..5bd1157 100644 --- a/Source/CTest/cmCTestBuildHandler.h +++ b/Source/CTest/cmCTestBuildHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestConfigureCommand.h b/Source/CTest/cmCTestConfigureCommand.h index 95a476f..22d1217 100644 --- a/Source/CTest/cmCTestConfigureCommand.h +++ b/Source/CTest/cmCTestConfigureCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestConfigureHandler.h b/Source/CTest/cmCTestConfigureHandler.h index 4a7c74b..7fa95ed 100644 --- a/Source/CTest/cmCTestConfigureHandler.h +++ b/Source/CTest/cmCTestConfigureHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" /** \class cmCTestConfigureHandler * \brief A class that handles ctest -S invocations diff --git a/Source/CTest/cmCTestCoverageCommand.h b/Source/CTest/cmCTestCoverageCommand.h index 98dd6bf..bf42aa1 100644 --- a/Source/CTest/cmCTestCoverageCommand.h +++ b/Source/CTest/cmCTestCoverageCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h index 0ba4a7a..339b5d7 100644 --- a/Source/CTest/cmCTestCoverageHandler.h +++ b/Source/CTest/cmCTestCoverageHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h index a8d00e0..4c1438b 100644 --- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h +++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index ef9fdc0..4176eb2 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTest.h" -#include "cmObject.h" #include "cmSystemTools.h" #include diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h index 0a1bae4..92748af 100644 --- a/Source/CTest/cmCTestHandlerCommand.h +++ b/Source/CTest/cmCTestHandlerCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestMemCheckCommand.h b/Source/CTest/cmCTestMemCheckCommand.h index efd4ecf..30d9e2b 100644 --- a/Source/CTest/cmCTestMemCheckCommand.h +++ b/Source/CTest/cmCTestMemCheckCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestTestCommand.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h index 2300f68..b12da28 100644 --- a/Source/CTest/cmCTestMemCheckHandler.h +++ b/Source/CTest/cmCTestMemCheckHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestTestHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.h b/Source/CTest/cmCTestReadCustomFilesCommand.h index 53610ba..e155595 100644 --- a/Source/CTest/cmCTestReadCustomFilesCommand.h +++ b/Source/CTest/cmCTestReadCustomFilesCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestRunScriptCommand.h b/Source/CTest/cmCTestRunScriptCommand.h index ac79db4..01ed62e 100644 --- a/Source/CTest/cmCTestRunScriptCommand.h +++ b/Source/CTest/cmCTestRunScriptCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h index 5ba8ecf..47644be 100644 --- a/Source/CTest/cmCTestScriptHandler.h +++ b/Source/CTest/cmCTestScriptHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestSleepCommand.h b/Source/CTest/cmCTestSleepCommand.h index c7e076f..1052f76 100644 --- a/Source/CTest/cmCTestSleepCommand.h +++ b/Source/CTest/cmCTestSleepCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestStartCommand.h b/Source/CTest/cmCTestStartCommand.h index 1686b20..cc72d0c 100644 --- a/Source/CTest/cmCTestStartCommand.h +++ b/Source/CTest/cmCTestStartCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestSubmitCommand.h b/Source/CTest/cmCTestSubmitCommand.h index f8b9a45..f5b52c1 100644 --- a/Source/CTest/cmCTestSubmitCommand.h +++ b/Source/CTest/cmCTestSubmitCommand.h @@ -7,7 +7,6 @@ #include "cmCTest.h" #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index 6e57de8..baaf8af 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -7,7 +7,6 @@ #include "cmCTest.h" #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h index b4a01dc..3250d93 100644 --- a/Source/CTest/cmCTestTestCommand.h +++ b/Source/CTest/cmCTestTestCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 703707f..5b07e98 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestUpdateCommand.h b/Source/CTest/cmCTestUpdateCommand.h index e834a29..5761f50 100644 --- a/Source/CTest/cmCTestUpdateCommand.h +++ b/Source/CTest/cmCTestUpdateCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestUpdateHandler.h b/Source/CTest/cmCTestUpdateHandler.h index 9a3ec1b..87781e8 100644 --- a/Source/CTest/cmCTestUpdateHandler.h +++ b/Source/CTest/cmCTestUpdateHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestUploadCommand.h b/Source/CTest/cmCTestUploadCommand.h index b231844..474f699 100644 --- a/Source/CTest/cmCTestUploadCommand.h +++ b/Source/CTest/cmCTestUploadCommand.h @@ -7,7 +7,6 @@ #include "cmCTest.h" #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestUploadHandler.h b/Source/CTest/cmCTestUploadHandler.h index eb05a86..77c2aec 100644 --- a/Source/CTest/cmCTestUploadHandler.h +++ b/Source/CTest/cmCTestUploadHandler.h @@ -7,7 +7,6 @@ #include "cmCTest.h" #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" /** \class cmCTestUploadHandler * \brief Helper class for CTest diff --git a/Source/cmCommand.h b/Source/cmCommand.h index dcbd0dc..01f9e05 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -3,8 +3,6 @@ #ifndef cmCommand_h #define cmCommand_h -#include "cmObject.h" - #include "cmCommandArgumentsHelper.h" #include "cmListFileCache.h" #include "cmMakefile.h" diff --git a/Source/cmObject.h b/Source/cmObject.h deleted file mode 100644 index 621a06f..0000000 --- a/Source/cmObject.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmObject_h -#define cmObject_h - -#include - -#include "cmStandardIncludes.h" - -/** \class cmObject - * \brief Superclass for all commands and other classes in CMake. - * - * cmObject is the base class for all classes in CMake. It defines some - * methods such as GetNameOfClass, IsA, SafeDownCast. - */ -class cmObject -{ -public: - /** - * Need virtual destructor to destroy real command type. - */ - virtual ~cmObject() {} - - /** - * The class name of the command. - */ - virtual const char* GetNameOfClass() = 0; - - /** - * Returns true if this class is the given class, or a subclass of it. - */ - static bool IsTypeOf(const char* type) { return !strcmp("cmObject", type); } - - /** - * Returns true if this object is an instance of the given class or - * a subclass of it. - */ - virtual bool IsA(const char* type) { return cmObject::IsTypeOf(type); } -}; - -#endif diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 0aab6d9..a2047af 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -49,6 +49,5 @@ extern void operator<<(std::ostream&, const std::ostringstream&); #include "cmCustomCommandLines.h" #include "cmDocumentationEntry.h" #include "cmTargetLinkLibraryType.h" -#include "cmTypeMacro.h" #endif diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 468b191..db1e542 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -10,7 +10,6 @@ #include "cmDefinitions.h" #include "cmListFileCache.h" #include "cmSystemTools.h" -#include "cmTypeMacro.h" #include "cmake.h" #include diff --git a/Source/cmTypeMacro.h b/Source/cmTypeMacro.h deleted file mode 100644 index b302ff1..0000000 --- a/Source/cmTypeMacro.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmTypeMacro_h -#define cmTypeMacro_h - -// All subclasses of cmCommand or cmCTestGenericHandler should -// invoke this macro. -#define cmTypeMacro(thisClass, superclass) \ - const char* GetNameOfClass() CM_OVERRIDE { return #thisClass; } \ - typedef superclass Superclass; \ - static bool IsTypeOf(const char* type) \ - { \ - if (!strcmp(#thisClass, type)) { \ - return true; \ - } \ - return Superclass::IsTypeOf(type); \ - } \ - bool IsA(const char* type) CM_OVERRIDE \ - { \ - return thisClass::IsTypeOf(type); \ - } \ - static thisClass* SafeDownCast(cmObject* c) \ - { \ - if (c && c->IsA(#thisClass)) { \ - return static_cast(c); \ - } \ - return 0; \ - } \ - class cmTypeMacro_UseTrailingSemicolon - -#endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2214011f7b3b13fe7ae0f68f0f9d49af11e12edd commit 2214011f7b3b13fe7ae0f68f0f9d49af11e12edd Author: Daniel Pfeifer AuthorDate: Sun Oct 23 01:12:26 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sun Oct 23 01:12:26 2016 +0200 Make cmCPackGenerator not inherit from cmObject diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index e960a6a..7010664 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -23,7 +23,7 @@ class cmCPackComponent; class cmCPackArchiveGenerator : public cmCPackGenerator { public: - cmTypeMacro(cmCPackArchiveGenerator, cmCPackGenerator); + typedef cmCPackGenerator Superclass; /** * Construct generator diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index db20998..a7652b1 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -20,7 +20,8 @@ class cmInstalledFile; class cmMakefile; #define cmCPackTypeMacro(klass, superclass) \ - cmTypeMacro(klass, superclass); \ + typedef superclass Superclass; \ + const char* GetNameOfClass() CM_OVERRIDE { return #klass; } \ static cmCPackGenerator* CreateGenerator() { return new klass; } \ class cmCPackTypeMacro_UseTrailingSemicolon @@ -36,10 +37,10 @@ class cmMakefile; * \brief A superclass of all CPack Generators * */ -class cmCPackGenerator : public cmObject +class cmCPackGenerator { public: - cmTypeMacro(cmCPackGenerator, cmObject); + virtual const char* GetNameOfClass() = 0; /** * If verbose then more information is printed out */ @@ -83,7 +84,7 @@ public: * Construct generator */ cmCPackGenerator(); - ~cmCPackGenerator() CM_OVERRIDE; + virtual ~cmCPackGenerator(); //! Set and get the options void SetOption(const std::string& op, const char* value); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f9a8d53aa8a3595f4f1f2f81607f8df3627642d commit 7f9a8d53aa8a3595f4f1f2f81607f8df3627642d Author: Daniel Pfeifer AuthorDate: Sun Oct 23 01:01:34 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sun Oct 23 01:01:34 2016 +0200 Make cmCPackGeneratorFactory not inherit from cmObject diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index 145867e..5381eb2 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -19,13 +19,11 @@ class cmCPackLog; * \brief A container for CPack generators * */ -class cmCPackGeneratorFactory : public cmObject +class cmCPackGeneratorFactory { public: - cmTypeMacro(cmCPackGeneratorFactory, cmObject); - cmCPackGeneratorFactory(); - ~cmCPackGeneratorFactory() CM_OVERRIDE; + ~cmCPackGeneratorFactory(); //! Get the generator cmCPackGenerator* NewGenerator(const std::string& name); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb0b087c4dc65f18aef431e41de3aa9b91e35371 commit fb0b087c4dc65f18aef431e41de3aa9b91e35371 Author: Daniel Pfeifer AuthorDate: Sun Oct 23 00:59:55 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sun Oct 23 00:59:55 2016 +0200 Make cmCTestGenericHandler not inherit from cmObject diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h index 8d787ea..1d424f3 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.h +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -22,7 +22,7 @@ class cmake; class cmCTestBuildAndTestHandler : public cmCTestGenericHandler { public: - cmTypeMacro(cmCTestBuildAndTestHandler, cmCTestGenericHandler); + typedef cmCTestGenericHandler Superclass; /* * The main entry point for this class diff --git a/Source/CTest/cmCTestBuildHandler.h b/Source/CTest/cmCTestBuildHandler.h index 16563ce..69970d5 100644 --- a/Source/CTest/cmCTestBuildHandler.h +++ b/Source/CTest/cmCTestBuildHandler.h @@ -25,7 +25,7 @@ class cmXMLWriter; class cmCTestBuildHandler : public cmCTestGenericHandler { public: - cmTypeMacro(cmCTestBuildHandler, cmCTestGenericHandler); + typedef cmCTestGenericHandler Superclass; /* * The main entry point for this class diff --git a/Source/CTest/cmCTestConfigureHandler.h b/Source/CTest/cmCTestConfigureHandler.h index 913e5c9..4a7c74b 100644 --- a/Source/CTest/cmCTestConfigureHandler.h +++ b/Source/CTest/cmCTestConfigureHandler.h @@ -15,7 +15,7 @@ class cmCTestConfigureHandler : public cmCTestGenericHandler { public: - cmTypeMacro(cmCTestConfigureHandler, cmCTestGenericHandler); + typedef cmCTestGenericHandler Superclass; /* * The main entry point for this class diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h index 062f971..0ba4a7a 100644 --- a/Source/CTest/cmCTestCoverageHandler.h +++ b/Source/CTest/cmCTestCoverageHandler.h @@ -38,7 +38,7 @@ public: class cmCTestCoverageHandler : public cmCTestGenericHandler { public: - cmTypeMacro(cmCTestCoverageHandler, cmCTestGenericHandler); + typedef cmCTestGenericHandler Superclass; /* * The main entry point for this class diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index b2ab1d2..ef9fdc0 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -22,7 +22,7 @@ class cmMakefile; * \brief A superclass of all CTest Handlers * */ -class cmCTestGenericHandler : public cmObject +class cmCTestGenericHandler { public: /** @@ -70,7 +70,7 @@ public: * Construct handler */ cmCTestGenericHandler(); - ~cmCTestGenericHandler() CM_OVERRIDE; + virtual ~cmCTestGenericHandler(); typedef std::map t_StringToString; diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h index 8d678af..2300f68 100644 --- a/Source/CTest/cmCTestMemCheckHandler.h +++ b/Source/CTest/cmCTestMemCheckHandler.h @@ -23,7 +23,7 @@ class cmCTestMemCheckHandler : public cmCTestTestHandler friend class cmCTestRunTest; public: - cmTypeMacro(cmCTestMemCheckHandler, cmCTestTestHandler); + typedef cmCTestTestHandler Superclass; void PopulateCustomVectors(cmMakefile* mf) CM_OVERRIDE; diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h index 2bace58..5ba8ecf 100644 --- a/Source/CTest/cmCTestScriptHandler.h +++ b/Source/CTest/cmCTestScriptHandler.h @@ -56,7 +56,7 @@ class cmake; class cmCTestScriptHandler : public cmCTestGenericHandler { public: - cmTypeMacro(cmCTestScriptHandler, cmCTestGenericHandler); + typedef cmCTestGenericHandler Superclass; /** * Add a script to run, and if is should run in the current process diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index abe4fa2..6e57de8 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -23,7 +23,7 @@ class cmCTestSubmitHandler : public cmCTestGenericHandler { public: - cmTypeMacro(cmCTestSubmitHandler, cmCTestGenericHandler); + typedef cmCTestGenericHandler Superclass; cmCTestSubmitHandler(); ~cmCTestSubmitHandler() CM_OVERRIDE { this->LogFile = CM_NULLPTR; } diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 73b3174..703707f 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -32,7 +32,7 @@ class cmCTestTestHandler : public cmCTestGenericHandler friend class cmCTestBatchTestHandler; public: - cmTypeMacro(cmCTestTestHandler, cmCTestGenericHandler); + typedef cmCTestGenericHandler Superclass; /** * The main entry point for this class diff --git a/Source/CTest/cmCTestUpdateHandler.h b/Source/CTest/cmCTestUpdateHandler.h index c9a8682..9a3ec1b 100644 --- a/Source/CTest/cmCTestUpdateHandler.h +++ b/Source/CTest/cmCTestUpdateHandler.h @@ -19,7 +19,7 @@ class cmCTestUpdateHandler : public cmCTestGenericHandler { public: - cmTypeMacro(cmCTestUpdateHandler, cmCTestGenericHandler); + typedef cmCTestGenericHandler Superclass; /* * The main entry point for this class diff --git a/Source/CTest/cmCTestUploadHandler.h b/Source/CTest/cmCTestUploadHandler.h index 251cd3e..eb05a86 100644 --- a/Source/CTest/cmCTestUploadHandler.h +++ b/Source/CTest/cmCTestUploadHandler.h @@ -18,7 +18,7 @@ class cmCTestUploadHandler : public cmCTestGenericHandler { public: - cmTypeMacro(cmCTestUploadHandler, cmCTestGenericHandler); + typedef cmCTestGenericHandler Superclass; cmCTestUploadHandler(); ~cmCTestUploadHandler() CM_OVERRIDE {} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2169b0faa40a20cd9aae25f9170cca074579a023 commit 2169b0faa40a20cd9aae25f9170cca074579a023 Author: Daniel Pfeifer AuthorDate: Sun Oct 23 00:48:09 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sun Oct 23 00:48:09 2016 +0200 Make cmCPackLog not inherit from cmObject diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 370879d..2ac805d 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -23,13 +23,11 @@ * \brief A container for CPack generators * */ -class cmCPackLog : public cmObject +class cmCPackLog { public: - cmTypeMacro(cmCPackLog, cmObject); - cmCPackLog(); - ~cmCPackLog() CM_OVERRIDE; + ~cmCPackLog(); enum __log_tags { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9855ebf11a1556bd0b73a1eaec39232842871528 commit 9855ebf11a1556bd0b73a1eaec39232842871528 Author: Daniel Pfeifer AuthorDate: Sun Oct 23 00:45:08 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sun Oct 23 00:45:08 2016 +0200 Make cmCommand not inherit from cmObject diff --git a/Source/CTest/cmCTestBuildCommand.h b/Source/CTest/cmCTestBuildCommand.h index 0aaf623..acc0ecf 100644 --- a/Source/CTest/cmCTestBuildCommand.h +++ b/Source/CTest/cmCTestBuildCommand.h @@ -47,8 +47,6 @@ public: bool InitialPass(std::vector const& args, cmExecutionStatus& status) CM_OVERRIDE; - cmTypeMacro(cmCTestBuildCommand, cmCTestHandlerCommand); - cmGlobalGenerator* GlobalGenerator; protected: diff --git a/Source/CTest/cmCTestCommand.h b/Source/CTest/cmCTestCommand.h index 2b9b93b..6fc237a 100644 --- a/Source/CTest/cmCTestCommand.h +++ b/Source/CTest/cmCTestCommand.h @@ -26,8 +26,6 @@ public: cmCTest* CTest; cmCTestScriptHandler* CTestScriptHandler; - - cmTypeMacro(cmCTestCommand, cmCommand); }; #endif diff --git a/Source/CTest/cmCTestConfigureCommand.h b/Source/CTest/cmCTestConfigureCommand.h index 8bc69fe..95a476f 100644 --- a/Source/CTest/cmCTestConfigureCommand.h +++ b/Source/CTest/cmCTestConfigureCommand.h @@ -39,8 +39,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "ctest_configure"; } - cmTypeMacro(cmCTestConfigureCommand, cmCTestHandlerCommand); - protected: cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; diff --git a/Source/CTest/cmCTestCoverageCommand.h b/Source/CTest/cmCTestCoverageCommand.h index d54e68d..98dd6bf 100644 --- a/Source/CTest/cmCTestCoverageCommand.h +++ b/Source/CTest/cmCTestCoverageCommand.h @@ -40,7 +40,7 @@ public: */ std::string GetName() const CM_OVERRIDE { return "ctest_coverage"; } - cmTypeMacro(cmCTestCoverageCommand, cmCTestHandlerCommand); + typedef cmCTestHandlerCommand Superclass; protected: cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h index 8b5d5a4..a8d00e0 100644 --- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h +++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h @@ -51,8 +51,6 @@ public: { return "ctest_empty_binary_directory"; } - - cmTypeMacro(cmCTestEmptyBinaryDirectoryCommand, cmCTestCommand); }; #endif diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h index 3fd384f..0a1bae4 100644 --- a/Source/CTest/cmCTestHandlerCommand.h +++ b/Source/CTest/cmCTestHandlerCommand.h @@ -32,8 +32,6 @@ public: bool InitialPass(std::vector const& args, cmExecutionStatus& status) CM_OVERRIDE; - cmTypeMacro(cmCTestHandlerCommand, cmCTestCommand); - enum { ct_NONE, diff --git a/Source/CTest/cmCTestMemCheckCommand.h b/Source/CTest/cmCTestMemCheckCommand.h index d3b8be7..efd4ecf 100644 --- a/Source/CTest/cmCTestMemCheckCommand.h +++ b/Source/CTest/cmCTestMemCheckCommand.h @@ -39,8 +39,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "ctest_memcheck"; } - cmTypeMacro(cmCTestMemCheckCommand, cmCTestTestCommand); - protected: cmCTestGenericHandler* InitializeActualHandler() CM_OVERRIDE; }; diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.h b/Source/CTest/cmCTestReadCustomFilesCommand.h index 29eba90..53610ba 100644 --- a/Source/CTest/cmCTestReadCustomFilesCommand.h +++ b/Source/CTest/cmCTestReadCustomFilesCommand.h @@ -46,8 +46,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "ctest_read_custom_files"; } - - cmTypeMacro(cmCTestReadCustomFilesCommand, cmCTestCommand); }; #endif diff --git a/Source/CTest/cmCTestRunScriptCommand.h b/Source/CTest/cmCTestRunScriptCommand.h index 2978bb9..ac79db4 100644 --- a/Source/CTest/cmCTestRunScriptCommand.h +++ b/Source/CTest/cmCTestRunScriptCommand.h @@ -47,8 +47,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "ctest_run_script"; } - - cmTypeMacro(cmCTestRunScriptCommand, cmCTestCommand); }; #endif diff --git a/Source/CTest/cmCTestSleepCommand.h b/Source/CTest/cmCTestSleepCommand.h index b144012..c7e076f 100644 --- a/Source/CTest/cmCTestSleepCommand.h +++ b/Source/CTest/cmCTestSleepCommand.h @@ -47,8 +47,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "ctest_sleep"; } - - cmTypeMacro(cmCTestSleepCommand, cmCTestCommand); }; #endif diff --git a/Source/CTest/cmCTestStartCommand.h b/Source/CTest/cmCTestStartCommand.h index 6bb0bc6..1686b20 100644 --- a/Source/CTest/cmCTestStartCommand.h +++ b/Source/CTest/cmCTestStartCommand.h @@ -60,8 +60,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "ctest_start"; } - cmTypeMacro(cmCTestStartCommand, cmCTestCommand); - private: bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir); bool CreateNewTag; diff --git a/Source/CTest/cmCTestSubmitCommand.h b/Source/CTest/cmCTestSubmitCommand.h index db8a604..f8b9a45 100644 --- a/Source/CTest/cmCTestSubmitCommand.h +++ b/Source/CTest/cmCTestSubmitCommand.h @@ -55,7 +55,7 @@ public: */ std::string GetName() const CM_OVERRIDE { return "ctest_submit"; } - cmTypeMacro(cmCTestSubmitCommand, cmCTestHandlerCommand); + typedef cmCTestHandlerCommand Superclass; protected: cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h index 6161acb..b4a01dc 100644 --- a/Source/CTest/cmCTestTestCommand.h +++ b/Source/CTest/cmCTestTestCommand.h @@ -39,8 +39,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "ctest_test"; } - cmTypeMacro(cmCTestTestCommand, cmCTestHandlerCommand); - protected: virtual cmCTestGenericHandler* InitializeActualHandler(); cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 4e6f1e9..132d049 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -59,8 +59,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "subdirs"; } - cmTypeMacro(cmCTestSubdirCommand, cmCommand); - cmCTestTestHandler* TestHandler; }; @@ -140,8 +138,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "add_subdirectory"; } - cmTypeMacro(cmCTestAddSubdirectoryCommand, cmCommand); - cmCTestTestHandler* TestHandler; }; @@ -214,8 +210,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "add_test"; } - cmTypeMacro(cmCTestAddTestCommand, cmCommand); - cmCTestTestHandler* TestHandler; }; @@ -254,8 +248,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "set_tests_properties"; } - cmTypeMacro(cmCTestSetTestsPropertiesCommand, cmCommand); - cmCTestTestHandler* TestHandler; }; diff --git a/Source/CTest/cmCTestUpdateCommand.h b/Source/CTest/cmCTestUpdateCommand.h index 9d1a86e..e834a29 100644 --- a/Source/CTest/cmCTestUpdateCommand.h +++ b/Source/CTest/cmCTestUpdateCommand.h @@ -39,8 +39,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "ctest_update"; } - cmTypeMacro(cmCTestUpdateCommand, cmCTestHandlerCommand); - protected: cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; }; diff --git a/Source/CTest/cmCTestUploadCommand.h b/Source/CTest/cmCTestUploadCommand.h index b858077..b231844 100644 --- a/Source/CTest/cmCTestUploadCommand.h +++ b/Source/CTest/cmCTestUploadCommand.h @@ -41,7 +41,7 @@ public: */ std::string GetName() const CM_OVERRIDE { return "ctest_upload"; } - cmTypeMacro(cmCTestUploadCommand, cmCTestHandlerCommand); + typedef cmCTestHandlerCommand Superclass; protected: cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE; diff --git a/Source/cmAddCompileOptionsCommand.h b/Source/cmAddCompileOptionsCommand.h index 52c4b51..9f2cf66 100644 --- a/Source/cmAddCompileOptionsCommand.h +++ b/Source/cmAddCompileOptionsCommand.h @@ -24,8 +24,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "add_compile_options"; } - - cmTypeMacro(cmAddCompileOptionsCommand, cmCommand); }; #endif diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h index 527bb6c..643163c 100644 --- a/Source/cmAddCustomCommandCommand.h +++ b/Source/cmAddCustomCommandCommand.h @@ -31,8 +31,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "add_custom_command"; } - cmTypeMacro(cmAddCustomCommandCommand, cmCommand); - protected: bool CheckOutputs(const std::vector& outputs); }; diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h index a4475c7..2ad244c 100644 --- a/Source/cmAddCustomTargetCommand.h +++ b/Source/cmAddCustomTargetCommand.h @@ -31,8 +31,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "add_custom_target"; } - - cmTypeMacro(cmAddCustomTargetCommand, cmCommand); }; #endif diff --git a/Source/cmAddDefinitionsCommand.h b/Source/cmAddDefinitionsCommand.h index 43d0199..c6b5699 100644 --- a/Source/cmAddDefinitionsCommand.h +++ b/Source/cmAddDefinitionsCommand.h @@ -30,8 +30,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "add_definitions"; } - - cmTypeMacro(cmAddDefinitionsCommand, cmCommand); }; #endif diff --git a/Source/cmAddDependenciesCommand.h b/Source/cmAddDependenciesCommand.h index 95e2ac6..2c7aa02 100644 --- a/Source/cmAddDependenciesCommand.h +++ b/Source/cmAddDependenciesCommand.h @@ -29,8 +29,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "add_dependencies"; } - - cmTypeMacro(cmAddDependenciesCommand, cmCommand); }; #endif diff --git a/Source/cmAddExecutableCommand.h b/Source/cmAddExecutableCommand.h index fc08e8b..03faaf1 100644 --- a/Source/cmAddExecutableCommand.h +++ b/Source/cmAddExecutableCommand.h @@ -30,8 +30,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "add_executable"; } - - cmTypeMacro(cmAddExecutableCommand, cmCommand); }; #endif diff --git a/Source/cmAddLibraryCommand.h b/Source/cmAddLibraryCommand.h index d072b80..d8eba8d 100644 --- a/Source/cmAddLibraryCommand.h +++ b/Source/cmAddLibraryCommand.h @@ -30,8 +30,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "add_library"; } - - cmTypeMacro(cmAddLibraryCommand, cmCommand); }; #endif diff --git a/Source/cmAddSubDirectoryCommand.h b/Source/cmAddSubDirectoryCommand.h index 7347482..f300b2e 100644 --- a/Source/cmAddSubDirectoryCommand.h +++ b/Source/cmAddSubDirectoryCommand.h @@ -31,8 +31,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "add_subdirectory"; } - - cmTypeMacro(cmAddSubDirectoryCommand, cmCommand); }; #endif diff --git a/Source/cmAddTestCommand.h b/Source/cmAddTestCommand.h index 92db7bc..7bbf7cf 100644 --- a/Source/cmAddTestCommand.h +++ b/Source/cmAddTestCommand.h @@ -30,8 +30,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "add_test"; } - cmTypeMacro(cmAddTestCommand, cmCommand); - private: bool HandleNameMode(std::vector const& args); }; diff --git a/Source/cmAuxSourceDirectoryCommand.h b/Source/cmAuxSourceDirectoryCommand.h index cca70dc..9840d8e 100644 --- a/Source/cmAuxSourceDirectoryCommand.h +++ b/Source/cmAuxSourceDirectoryCommand.h @@ -33,8 +33,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "aux_source_directory"; } - - cmTypeMacro(cmAuxSourceDirectoryCommand, cmCommand); }; #endif diff --git a/Source/cmBreakCommand.h b/Source/cmBreakCommand.h index ab58ab2..f1ade9a 100644 --- a/Source/cmBreakCommand.h +++ b/Source/cmBreakCommand.h @@ -34,8 +34,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "break"; } - - cmTypeMacro(cmBreakCommand, cmCommand); }; #endif diff --git a/Source/cmBuildCommand.h b/Source/cmBuildCommand.h index a53a099..0dce4e4 100644 --- a/Source/cmBuildCommand.h +++ b/Source/cmBuildCommand.h @@ -40,8 +40,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "build_command"; } - cmTypeMacro(cmBuildCommand, cmCommand); - private: bool IgnoreErrors() const; }; diff --git a/Source/cmBuildNameCommand.h b/Source/cmBuildNameCommand.h index 7c09d73..6e8d98b 100644 --- a/Source/cmBuildNameCommand.h +++ b/Source/cmBuildNameCommand.h @@ -8,7 +8,6 @@ class cmBuildNameCommand : public cmCommand { public: - cmTypeMacro(cmBuildNameCommand, cmCommand); cmCommand* Clone() CM_OVERRIDE { return new cmBuildNameCommand; } bool InitialPass(std::vector const& args, cmExecutionStatus& status) CM_OVERRIDE; diff --git a/Source/cmCMakeHostSystemInformationCommand.h b/Source/cmCMakeHostSystemInformationCommand.h index 4ab6aa1..bddd7e1 100644 --- a/Source/cmCMakeHostSystemInformationCommand.h +++ b/Source/cmCMakeHostSystemInformationCommand.h @@ -44,8 +44,6 @@ public: return "cmake_host_system_information"; } - cmTypeMacro(cmCMakeHostSystemInformationCommand, cmCommand); - private: bool GetValue(cmsys::SystemInformation& info, std::string const& key, std::string& value); diff --git a/Source/cmCMakeMinimumRequired.h b/Source/cmCMakeMinimumRequired.h index 425aeed..3acedd2 100644 --- a/Source/cmCMakeMinimumRequired.h +++ b/Source/cmCMakeMinimumRequired.h @@ -35,8 +35,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "cmake_minimum_required"; } - cmTypeMacro(cmCMakeMinimumRequired, cmCommand); - private: std::vector UnknownArguments; bool EnforceUnknownArguments(); diff --git a/Source/cmCMakePolicyCommand.h b/Source/cmCMakePolicyCommand.h index d5c5cb5..68d9f7b 100644 --- a/Source/cmCMakePolicyCommand.h +++ b/Source/cmCMakePolicyCommand.h @@ -36,8 +36,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "cmake_policy"; } - cmTypeMacro(cmCMakePolicyCommand, cmCommand); - private: bool HandleSetMode(std::vector const& args); bool HandleGetMode(std::vector const& args); diff --git a/Source/cmCommand.h b/Source/cmCommand.h index d8e337d..dcbd0dc 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -19,11 +19,9 @@ * to support such features as enable/disable, inheritance, * documentation, and construction. */ -class cmCommand : public cmObject +class cmCommand { public: - cmTypeMacro(cmCommand, cmObject); - /** * Construct the command. By default it is enabled with no makefile. */ @@ -36,7 +34,7 @@ public: /** * Need virtual destructor to destroy real command type. */ - ~cmCommand() CM_OVERRIDE {} + virtual ~cmCommand() {} /** * Specify the makefile. @@ -92,12 +90,10 @@ public: virtual bool IsScriptable() const { return false; } /** - * This is used to avoid including this command - * in documentation. This is mainly used by - * cmMacroHelperCommand and cmFunctionHelperCommand - * which cannot provide appropriate documentation. + * This determines if the command is defined in a cmake script. + * It is the case for cmMacroHelperCommand and cmFunctionHelperCommand. */ - virtual bool ShouldAppearInDocumentation() const { return true; } + virtual bool IsUserDefined() const { return false; } /** * The name of the command as specified in CMakeList.txt. diff --git a/Source/cmConfigureFileCommand.h b/Source/cmConfigureFileCommand.h index f9a0f2a..9df4550 100644 --- a/Source/cmConfigureFileCommand.h +++ b/Source/cmConfigureFileCommand.h @@ -8,8 +8,6 @@ class cmConfigureFileCommand : public cmCommand { public: - cmTypeMacro(cmConfigureFileCommand, cmCommand); - cmCommand* Clone() CM_OVERRIDE { return new cmConfigureFileCommand; } /** diff --git a/Source/cmContinueCommand.h b/Source/cmContinueCommand.h index a36d5f3..0c4e650 100644 --- a/Source/cmContinueCommand.h +++ b/Source/cmContinueCommand.h @@ -34,8 +34,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "continue"; } - - cmTypeMacro(cmContinueCommand, cmCommand); }; #endif diff --git a/Source/cmCoreTryCompile.h b/Source/cmCoreTryCompile.h index 43b971f..5f909dd 100644 --- a/Source/cmCoreTryCompile.h +++ b/Source/cmCoreTryCompile.h @@ -37,8 +37,6 @@ protected: void FindOutputFile(const std::string& targetName, cmStateEnums::TargetType targetType); - cmTypeMacro(cmCoreTryCompile, cmCommand); - std::string BinaryDirectory; std::string OutputFile; std::string FindErrorMessage; diff --git a/Source/cmCreateTestSourceList.h b/Source/cmCreateTestSourceList.h index ffd06f0..2f71a00 100644 --- a/Source/cmCreateTestSourceList.h +++ b/Source/cmCreateTestSourceList.h @@ -29,8 +29,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "create_test_sourcelist"; } - - cmTypeMacro(cmCreateTestSourceList, cmCommand); }; #endif diff --git a/Source/cmDefinePropertyCommand.h b/Source/cmDefinePropertyCommand.h index f494123..cdfff9f 100644 --- a/Source/cmDefinePropertyCommand.h +++ b/Source/cmDefinePropertyCommand.h @@ -22,8 +22,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "define_property"; } - cmTypeMacro(cmDefinePropertyCommand, cmCommand); - private: std::string PropertyName; std::string BriefDocs; diff --git a/Source/cmElseCommand.h b/Source/cmElseCommand.h index 33f73ee..32e04a7 100644 --- a/Source/cmElseCommand.h +++ b/Source/cmElseCommand.h @@ -34,8 +34,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "else"; } - - cmTypeMacro(cmElseCommand, cmCommand); }; #endif diff --git a/Source/cmElseIfCommand.h b/Source/cmElseIfCommand.h index a489e30..79484c9 100644 --- a/Source/cmElseIfCommand.h +++ b/Source/cmElseIfCommand.h @@ -34,8 +34,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "elseif"; } - - cmTypeMacro(cmElseIfCommand, cmCommand); }; #endif diff --git a/Source/cmEnableLanguageCommand.h b/Source/cmEnableLanguageCommand.h index 98b3841..34e1d3d 100644 --- a/Source/cmEnableLanguageCommand.h +++ b/Source/cmEnableLanguageCommand.h @@ -32,8 +32,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "enable_language"; } - - cmTypeMacro(cmEnableLanguageCommand, cmCommand); }; #endif diff --git a/Source/cmEnableTestingCommand.h b/Source/cmEnableTestingCommand.h index 750ae8c..b94967a 100644 --- a/Source/cmEnableTestingCommand.h +++ b/Source/cmEnableTestingCommand.h @@ -37,8 +37,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "enable_testing"; } - - cmTypeMacro(cmEnableTestingCommand, cmCommand); }; #endif diff --git a/Source/cmEndForEachCommand.h b/Source/cmEndForEachCommand.h index 3bcc7cf..a146e4d 100644 --- a/Source/cmEndForEachCommand.h +++ b/Source/cmEndForEachCommand.h @@ -44,8 +44,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "endforeach"; } - - cmTypeMacro(cmEndForEachCommand, cmCommand); }; #endif diff --git a/Source/cmEndFunctionCommand.h b/Source/cmEndFunctionCommand.h index 8b4d2f9..ab174fd 100644 --- a/Source/cmEndFunctionCommand.h +++ b/Source/cmEndFunctionCommand.h @@ -44,8 +44,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "endfunction"; } - - cmTypeMacro(cmEndFunctionCommand, cmCommand); }; #endif diff --git a/Source/cmEndIfCommand.h b/Source/cmEndIfCommand.h index b476c72..d068bb4 100644 --- a/Source/cmEndIfCommand.h +++ b/Source/cmEndIfCommand.h @@ -34,8 +34,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "endif"; } - - cmTypeMacro(cmEndIfCommand, cmCommand); }; #endif diff --git a/Source/cmEndMacroCommand.h b/Source/cmEndMacroCommand.h index 806750d..34ae880 100644 --- a/Source/cmEndMacroCommand.h +++ b/Source/cmEndMacroCommand.h @@ -44,8 +44,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "endmacro"; } - - cmTypeMacro(cmEndMacroCommand, cmCommand); }; #endif diff --git a/Source/cmEndWhileCommand.h b/Source/cmEndWhileCommand.h index 861d2f0..2366706 100644 --- a/Source/cmEndWhileCommand.h +++ b/Source/cmEndWhileCommand.h @@ -44,8 +44,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "endwhile"; } - - cmTypeMacro(cmEndWhileCommand, cmCommand); }; #endif diff --git a/Source/cmExecProgramCommand.h b/Source/cmExecProgramCommand.h index 1cc46d3..a3e96ae 100644 --- a/Source/cmExecProgramCommand.h +++ b/Source/cmExecProgramCommand.h @@ -37,8 +37,6 @@ public: */ bool IsScriptable() const CM_OVERRIDE { return true; } - cmTypeMacro(cmExecProgramCommand, cmCommand); - private: static bool RunCommand(const char* command, std::string& output, int& retVal, const char* directory = CM_NULLPTR, diff --git a/Source/cmExecuteProcessCommand.h b/Source/cmExecuteProcessCommand.h index f7e376a..2242998 100644 --- a/Source/cmExecuteProcessCommand.h +++ b/Source/cmExecuteProcessCommand.h @@ -35,8 +35,6 @@ public: * This determines if the command is invoked when in script mode. */ bool IsScriptable() const CM_OVERRIDE { return true; } - - cmTypeMacro(cmExecuteProcessCommand, cmCommand); }; #endif diff --git a/Source/cmExportCommand.h b/Source/cmExportCommand.h index ebde71c..52996d0 100644 --- a/Source/cmExportCommand.h +++ b/Source/cmExportCommand.h @@ -35,8 +35,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "export"; } - cmTypeMacro(cmExportCommand, cmCommand); - private: cmCommandArgumentGroup ArgumentGroup; cmCAStringVector Targets; diff --git a/Source/cmExportLibraryDependenciesCommand.h b/Source/cmExportLibraryDependenciesCommand.h index fa9f353..1d8f330 100644 --- a/Source/cmExportLibraryDependenciesCommand.h +++ b/Source/cmExportLibraryDependenciesCommand.h @@ -8,7 +8,6 @@ class cmExportLibraryDependenciesCommand : public cmCommand { public: - cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand); cmCommand* Clone() CM_OVERRIDE { return new cmExportLibraryDependenciesCommand; diff --git a/Source/cmFLTKWrapUICommand.h b/Source/cmFLTKWrapUICommand.h index 202067f..8807328 100644 --- a/Source/cmFLTKWrapUICommand.h +++ b/Source/cmFLTKWrapUICommand.h @@ -14,8 +14,6 @@ class cmFLTKWrapUICommand : public cmCommand { public: - cmTypeMacro(cmFLTKWrapUICommand, cmCommand); - /** * This is a virtual constructor for the command. */ diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h index 1d21a19..b53bae8 100644 --- a/Source/cmFileCommand.h +++ b/Source/cmFileCommand.h @@ -36,8 +36,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "file"; } - cmTypeMacro(cmFileCommand, cmCommand); - protected: bool HandleRename(std::vector const& args); bool HandleRemove(std::vector const& args, bool recurse); diff --git a/Source/cmFindBase.h b/Source/cmFindBase.h index 8561f5d..2b8d4a2 100644 --- a/Source/cmFindBase.h +++ b/Source/cmFindBase.h @@ -20,7 +20,6 @@ public: * the CMakeLists.txt file. */ virtual bool ParseArguments(std::vector const& args); - cmTypeMacro(cmFindBase, cmFindCommon); protected: void PrintFindStuff(); diff --git a/Source/cmFindCommon.h b/Source/cmFindCommon.h index 3211bc2..1809c0a 100644 --- a/Source/cmFindCommon.h +++ b/Source/cmFindCommon.h @@ -19,7 +19,6 @@ class cmFindCommon : public cmCommand public: cmFindCommon(); ~cmFindCommon() CM_OVERRIDE; - cmTypeMacro(cmFindCommon, cmCommand); protected: friend class cmSearchPath; diff --git a/Source/cmFindFileCommand.h b/Source/cmFindFileCommand.h index feb6ad2..e121784 100644 --- a/Source/cmFindFileCommand.h +++ b/Source/cmFindFileCommand.h @@ -22,8 +22,6 @@ public: */ cmCommand* Clone() CM_OVERRIDE { return new cmFindFileCommand; } std::string GetName() const CM_OVERRIDE { return "find_file"; } - - cmTypeMacro(cmFindFileCommand, cmFindPathCommand); }; #endif diff --git a/Source/cmFindLibraryCommand.h b/Source/cmFindLibraryCommand.h index 39393f6..8531e51 100644 --- a/Source/cmFindLibraryCommand.h +++ b/Source/cmFindLibraryCommand.h @@ -38,8 +38,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "find_library"; } - cmTypeMacro(cmFindLibraryCommand, cmFindBase); - protected: void AddArchitecturePaths(const char* suffix); void AddArchitecturePath(std::string const& dir, diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 501a5a5..101749e 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -60,8 +60,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "find_package"; } - cmTypeMacro(cmFindPackageCommand, cmFindCommon); - private: class PathLabel : public cmFindCommon::PathLabel { diff --git a/Source/cmFindPathCommand.h b/Source/cmFindPathCommand.h index 58cc0f3..4ba67ed 100644 --- a/Source/cmFindPathCommand.h +++ b/Source/cmFindPathCommand.h @@ -38,7 +38,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "find_path"; } - cmTypeMacro(cmFindPathCommand, cmFindBase); bool IncludeFileInPath; private: diff --git a/Source/cmFindProgramCommand.h b/Source/cmFindProgramCommand.h index 2d88b79..4326124 100644 --- a/Source/cmFindProgramCommand.h +++ b/Source/cmFindProgramCommand.h @@ -39,8 +39,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "find_program"; } - cmTypeMacro(cmFindProgramCommand, cmFindBase); - private: std::string FindProgram(); std::string FindNormalProgram(); diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h index 1e3d786..9ba4af0 100644 --- a/Source/cmForEachCommand.h +++ b/Source/cmForEachCommand.h @@ -51,8 +51,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "foreach"; } - cmTypeMacro(cmForEachCommand, cmCommand); - private: bool HandleInMode(std::vector const& args); }; diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 99d883a..21e0c25 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -14,12 +14,9 @@ public: ~cmFunctionHelperCommand() CM_OVERRIDE {} /** - * This is used to avoid including this command - * in documentation. This is mainly used by - * cmMacroHelperCommand and cmFunctionHelperCommand - * which cannot provide appropriate documentation. + * This determines if the command is defined in a cmake script. */ - bool ShouldAppearInDocumentation() const CM_OVERRIDE { return false; } + bool IsUserDefined() const CM_OVERRIDE { return true; } /** * This is a virtual constructor for the command. @@ -58,8 +55,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return this->Args[0]; } - cmTypeMacro(cmFunctionHelperCommand, cmCommand); - std::vector Args; std::vector Functions; cmPolicies::PolicyMap Policies; diff --git a/Source/cmFunctionCommand.h b/Source/cmFunctionCommand.h index 277708b..7d868b2 100644 --- a/Source/cmFunctionCommand.h +++ b/Source/cmFunctionCommand.h @@ -46,8 +46,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "function"; } - - cmTypeMacro(cmFunctionCommand, cmCommand); }; #endif diff --git a/Source/cmGetCMakePropertyCommand.h b/Source/cmGetCMakePropertyCommand.h index 644db33..30bc2d8 100644 --- a/Source/cmGetCMakePropertyCommand.h +++ b/Source/cmGetCMakePropertyCommand.h @@ -26,8 +26,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "get_cmake_property"; } - - cmTypeMacro(cmGetCMakePropertyCommand, cmCommand); }; #endif diff --git a/Source/cmGetDirectoryPropertyCommand.h b/Source/cmGetDirectoryPropertyCommand.h index c6d9329..625adb0 100644 --- a/Source/cmGetDirectoryPropertyCommand.h +++ b/Source/cmGetDirectoryPropertyCommand.h @@ -27,8 +27,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "get_directory_property"; } - cmTypeMacro(cmGetDirectoryPropertyCommand, cmCommand); - private: void StoreResult(const std::string& variable, const char* prop); }; diff --git a/Source/cmGetFilenameComponentCommand.h b/Source/cmGetFilenameComponentCommand.h index 32096d1..68bf31f 100644 --- a/Source/cmGetFilenameComponentCommand.h +++ b/Source/cmGetFilenameComponentCommand.h @@ -35,8 +35,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "get_filename_component"; } - - cmTypeMacro(cmGetFilenameComponentCommand, cmCommand); }; #endif diff --git a/Source/cmGetPropertyCommand.h b/Source/cmGetPropertyCommand.h index ee61416..20268b4 100644 --- a/Source/cmGetPropertyCommand.h +++ b/Source/cmGetPropertyCommand.h @@ -29,8 +29,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "get_property"; } - cmTypeMacro(cmGetPropertyCommand, cmCommand); - private: enum OutType { diff --git a/Source/cmGetSourceFilePropertyCommand.h b/Source/cmGetSourceFilePropertyCommand.h index 184b3ce..1edc392 100644 --- a/Source/cmGetSourceFilePropertyCommand.h +++ b/Source/cmGetSourceFilePropertyCommand.h @@ -24,8 +24,6 @@ public: { return "get_source_file_property"; } - - cmTypeMacro(cmGetSourceFilePropertyCommand, cmCommand); }; #endif diff --git a/Source/cmGetTargetPropertyCommand.h b/Source/cmGetTargetPropertyCommand.h index f16dea7..f36cc48 100644 --- a/Source/cmGetTargetPropertyCommand.h +++ b/Source/cmGetTargetPropertyCommand.h @@ -21,8 +21,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "get_target_property"; } - - cmTypeMacro(cmGetTargetPropertyCommand, cmCommand); }; #endif diff --git a/Source/cmGetTestPropertyCommand.h b/Source/cmGetTestPropertyCommand.h index 527ee1a..5dc89bd 100644 --- a/Source/cmGetTestPropertyCommand.h +++ b/Source/cmGetTestPropertyCommand.h @@ -21,8 +21,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "get_test_property"; } - - cmTypeMacro(cmGetTestPropertyCommand, cmCommand); }; #endif diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h index f449023..e071acb 100644 --- a/Source/cmIfCommand.h +++ b/Source/cmIfCommand.h @@ -66,8 +66,6 @@ public: // Filter the given variable definition based on policy CMP0054. static const char* GetDefinitionIfUnquoted( const cmMakefile* mf, cmExpandedCommandArgument const& argument); - - cmTypeMacro(cmIfCommand, cmCommand); }; #endif diff --git a/Source/cmIncludeCommand.h b/Source/cmIncludeCommand.h index 7ff7b9d..9065ef7 100644 --- a/Source/cmIncludeCommand.h +++ b/Source/cmIncludeCommand.h @@ -35,8 +35,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "include"; } - - cmTypeMacro(cmIncludeCommand, cmCommand); }; #endif diff --git a/Source/cmIncludeDirectoryCommand.h b/Source/cmIncludeDirectoryCommand.h index 46e433a..d0a20b3 100644 --- a/Source/cmIncludeDirectoryCommand.h +++ b/Source/cmIncludeDirectoryCommand.h @@ -31,8 +31,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "include_directories"; } - cmTypeMacro(cmIncludeDirectoryCommand, cmCommand); - protected: // used internally void GetIncludes(const std::string& arg, std::vector& incs); diff --git a/Source/cmIncludeExternalMSProjectCommand.h b/Source/cmIncludeExternalMSProjectCommand.h index 9401016..4f8ec81 100644 --- a/Source/cmIncludeExternalMSProjectCommand.h +++ b/Source/cmIncludeExternalMSProjectCommand.h @@ -37,8 +37,6 @@ public: { return "include_external_msproject"; } - - cmTypeMacro(cmIncludeExternalMSProjectCommand, cmCommand); }; #endif diff --git a/Source/cmIncludeRegularExpressionCommand.h b/Source/cmIncludeRegularExpressionCommand.h index 648bce2..b7c937d 100644 --- a/Source/cmIncludeRegularExpressionCommand.h +++ b/Source/cmIncludeRegularExpressionCommand.h @@ -36,8 +36,6 @@ public: { return "include_regular_expression"; } - - cmTypeMacro(cmIncludeRegularExpressionCommand, cmCommand); }; #endif diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h index 6f785ae..b350330 100644 --- a/Source/cmInstallCommand.h +++ b/Source/cmInstallCommand.h @@ -31,8 +31,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "install"; } - cmTypeMacro(cmInstallCommand, cmCommand); - private: bool HandleScriptMode(std::vector const& args); bool HandleTargetsMode(std::vector const& args); diff --git a/Source/cmInstallFilesCommand.h b/Source/cmInstallFilesCommand.h index a80184a..da09fae 100644 --- a/Source/cmInstallFilesCommand.h +++ b/Source/cmInstallFilesCommand.h @@ -40,8 +40,6 @@ public: void FinalPass() CM_OVERRIDE; bool HasFinalPass() const CM_OVERRIDE { return !this->IsFilesForm; } - cmTypeMacro(cmInstallFilesCommand, cmCommand); - protected: void CreateInstallGenerator() const; std::string FindInstallSource(const char* name) const; diff --git a/Source/cmInstallProgramsCommand.h b/Source/cmInstallProgramsCommand.h index cb85cce..1fb7d91 100644 --- a/Source/cmInstallProgramsCommand.h +++ b/Source/cmInstallProgramsCommand.h @@ -41,8 +41,6 @@ public: bool HasFinalPass() const CM_OVERRIDE { return true; } - cmTypeMacro(cmInstallProgramsCommand, cmCommand); - protected: std::string FindInstallSource(const char* name) const; diff --git a/Source/cmInstallTargetsCommand.h b/Source/cmInstallTargetsCommand.h index 2ddeaf0..0625722 100644 --- a/Source/cmInstallTargetsCommand.h +++ b/Source/cmInstallTargetsCommand.h @@ -31,8 +31,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "install_targets"; } - - cmTypeMacro(cmInstallTargetsCommand, cmCommand); }; #endif diff --git a/Source/cmLinkDirectoriesCommand.h b/Source/cmLinkDirectoriesCommand.h index cd6d2de..ba0313b 100644 --- a/Source/cmLinkDirectoriesCommand.h +++ b/Source/cmLinkDirectoriesCommand.h @@ -33,8 +33,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "link_directories"; } - cmTypeMacro(cmLinkDirectoriesCommand, cmCommand); - private: void AddLinkDir(std::string const& dir); }; diff --git a/Source/cmLinkLibrariesCommand.h b/Source/cmLinkLibrariesCommand.h index b4943b6..75a31c8 100644 --- a/Source/cmLinkLibrariesCommand.h +++ b/Source/cmLinkLibrariesCommand.h @@ -31,8 +31,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "link_libraries"; } - - cmTypeMacro(cmLinkLibrariesCommand, cmCommand); }; #endif diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h index b6b0a47..43a482c 100644 --- a/Source/cmListCommand.h +++ b/Source/cmListCommand.h @@ -34,8 +34,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "list"; } - cmTypeMacro(cmListCommand, cmCommand); - protected: bool HandleLengthCommand(std::vector const& args); bool HandleGetCommand(std::vector const& args); diff --git a/Source/cmLoadCacheCommand.h b/Source/cmLoadCacheCommand.h index 57f64cd..0b57a61 100644 --- a/Source/cmLoadCacheCommand.h +++ b/Source/cmLoadCacheCommand.h @@ -30,8 +30,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "load_cache"; } - cmTypeMacro(cmLoadCacheCommand, cmCommand); - protected: std::set VariablesToRead; std::string Prefix; diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index bcfec79..ed4e009 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -93,8 +93,6 @@ public: } } - cmTypeMacro(cmLoadedCommand, cmCommand); - cmLoadedCommandInfo info; }; diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h index e42d46a..9628464 100644 --- a/Source/cmLoadCommandCommand.h +++ b/Source/cmLoadCommandCommand.h @@ -12,7 +12,6 @@ public: bool InitialPass(std::vector const& args, cmExecutionStatus& status) CM_OVERRIDE; std::string GetName() const CM_OVERRIDE { return "load_command"; } - cmTypeMacro(cmLoadCommandCommand, cmCommand); }; #endif diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 9917394..a8446d9 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -15,12 +15,9 @@ public: ~cmMacroHelperCommand() CM_OVERRIDE {} /** - * This is used to avoid including this command - * in documentation. This is mainly used by - * cmMacroHelperCommand and cmFunctionHelperCommand - * which cannot provide appropriate documentation. + * This determines if the command is defined in a cmake script. */ - bool ShouldAppearInDocumentation() const CM_OVERRIDE { return false; } + bool IsUserDefined() const CM_OVERRIDE { return true; } /** * This is a virtual constructor for the command. @@ -59,8 +56,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return this->Args[0]; } - cmTypeMacro(cmMacroHelperCommand, cmCommand); - std::vector Args; std::vector Functions; cmPolicies::PolicyMap Policies; diff --git a/Source/cmMacroCommand.h b/Source/cmMacroCommand.h index 362d272..8e3cd95 100644 --- a/Source/cmMacroCommand.h +++ b/Source/cmMacroCommand.h @@ -46,8 +46,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "macro"; } - - cmTypeMacro(cmMacroCommand, cmCommand); }; #endif diff --git a/Source/cmMakeDirectoryCommand.h b/Source/cmMakeDirectoryCommand.h index 2117fae..74b4a63 100644 --- a/Source/cmMakeDirectoryCommand.h +++ b/Source/cmMakeDirectoryCommand.h @@ -38,8 +38,6 @@ public: * This determines if the command is invoked when in script mode. */ bool IsScriptable() const CM_OVERRIDE { return true; } - - cmTypeMacro(cmMakeDirectoryCommand, cmCommand); }; #endif diff --git a/Source/cmMarkAsAdvancedCommand.h b/Source/cmMarkAsAdvancedCommand.h index 54fa78a..0f5270c 100644 --- a/Source/cmMarkAsAdvancedCommand.h +++ b/Source/cmMarkAsAdvancedCommand.h @@ -37,8 +37,6 @@ public: * FindUnixMake.cmake used by the CTEST_BUILD command. */ bool IsScriptable() const CM_OVERRIDE { return true; } - - cmTypeMacro(cmMarkAsAdvancedCommand, cmCommand); }; #endif diff --git a/Source/cmMathCommand.h b/Source/cmMathCommand.h index 6fa7389..17a1575 100644 --- a/Source/cmMathCommand.h +++ b/Source/cmMathCommand.h @@ -31,8 +31,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "math"; } - cmTypeMacro(cmMathCommand, cmCommand); - protected: bool HandleExprCommand(std::vector const& args); }; diff --git a/Source/cmMessageCommand.h b/Source/cmMessageCommand.h index a67d52b..cd16ffa 100644 --- a/Source/cmMessageCommand.h +++ b/Source/cmMessageCommand.h @@ -33,8 +33,6 @@ public: * This determines if the command is invoked when in script mode. */ bool IsScriptable() const CM_OVERRIDE { return true; } - - cmTypeMacro(cmMessageCommand, cmCommand); }; #endif diff --git a/Source/cmOptionCommand.h b/Source/cmOptionCommand.h index 3ca62d7..d77215a 100644 --- a/Source/cmOptionCommand.h +++ b/Source/cmOptionCommand.h @@ -34,8 +34,6 @@ public: * This determines if the command is invoked when in script mode. */ bool IsScriptable() const CM_OVERRIDE { return true; } - - cmTypeMacro(cmOptionCommand, cmCommand); }; #endif diff --git a/Source/cmOutputRequiredFilesCommand.h b/Source/cmOutputRequiredFilesCommand.h index 7a81a76..8b7104b 100644 --- a/Source/cmOutputRequiredFilesCommand.h +++ b/Source/cmOutputRequiredFilesCommand.h @@ -10,7 +10,6 @@ class cmDependInformation; class cmOutputRequiredFilesCommand : public cmCommand { public: - cmTypeMacro(cmOutputRequiredFilesCommand, cmCommand); cmCommand* Clone() CM_OVERRIDE { return new cmOutputRequiredFilesCommand; } bool InitialPass(std::vector const& args, cmExecutionStatus& status) CM_OVERRIDE; diff --git a/Source/cmParseArgumentsCommand.h b/Source/cmParseArgumentsCommand.h index fbeb3df..af87d81 100644 --- a/Source/cmParseArgumentsCommand.h +++ b/Source/cmParseArgumentsCommand.h @@ -32,8 +32,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "cmake_parse_arguments"; } - - cmTypeMacro(cmParseArgumentsCommand, cmCommand); }; #endif diff --git a/Source/cmProjectCommand.h b/Source/cmProjectCommand.h index c9c2549..ef554f3 100644 --- a/Source/cmProjectCommand.h +++ b/Source/cmProjectCommand.h @@ -32,8 +32,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "project"; } - - cmTypeMacro(cmProjectCommand, cmCommand); }; #endif diff --git a/Source/cmQTWrapCPPCommand.h b/Source/cmQTWrapCPPCommand.h index 3567fb6..afcaf69 100644 --- a/Source/cmQTWrapCPPCommand.h +++ b/Source/cmQTWrapCPPCommand.h @@ -16,8 +16,6 @@ class cmQTWrapCPPCommand : public cmCommand { public: - cmTypeMacro(cmQTWrapCPPCommand, cmCommand); - /** * This is a virtual constructor for the command. */ diff --git a/Source/cmQTWrapUICommand.h b/Source/cmQTWrapUICommand.h index 84b88a8..8efa747 100644 --- a/Source/cmQTWrapUICommand.h +++ b/Source/cmQTWrapUICommand.h @@ -15,7 +15,6 @@ class cmQTWrapUICommand : public cmCommand { public: - cmTypeMacro(cmQTWrapUICommand, cmCommand); /** * This is a virtual constructor for the command. */ diff --git a/Source/cmRemoveCommand.h b/Source/cmRemoveCommand.h index bf33de0..d7b2a65 100644 --- a/Source/cmRemoveCommand.h +++ b/Source/cmRemoveCommand.h @@ -34,8 +34,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "remove"; } - - cmTypeMacro(cmRemoveCommand, cmCommand); }; #endif diff --git a/Source/cmRemoveDefinitionsCommand.h b/Source/cmRemoveDefinitionsCommand.h index 016f5fd..67dcfee 100644 --- a/Source/cmRemoveDefinitionsCommand.h +++ b/Source/cmRemoveDefinitionsCommand.h @@ -31,8 +31,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "remove_definitions"; } - - cmTypeMacro(cmRemoveDefinitionsCommand, cmCommand); }; #endif diff --git a/Source/cmReturnCommand.h b/Source/cmReturnCommand.h index 1159e78..06b91bc 100644 --- a/Source/cmReturnCommand.h +++ b/Source/cmReturnCommand.h @@ -34,8 +34,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "return"; } - - cmTypeMacro(cmReturnCommand, cmCommand); }; #endif diff --git a/Source/cmSeparateArgumentsCommand.h b/Source/cmSeparateArgumentsCommand.h index 66fbef7..d80d043 100644 --- a/Source/cmSeparateArgumentsCommand.h +++ b/Source/cmSeparateArgumentsCommand.h @@ -34,8 +34,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "separate_arguments"; } - - cmTypeMacro(cmSeparateArgumentsCommand, cmCommand); }; #endif diff --git a/Source/cmSetCommand.h b/Source/cmSetCommand.h index 94f7cf0..6fa3865 100644 --- a/Source/cmSetCommand.h +++ b/Source/cmSetCommand.h @@ -34,8 +34,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "set"; } - - cmTypeMacro(cmSetCommand, cmCommand); }; #endif diff --git a/Source/cmSetDirectoryPropertiesCommand.h b/Source/cmSetDirectoryPropertiesCommand.h index 9abefda..9608742 100644 --- a/Source/cmSetDirectoryPropertiesCommand.h +++ b/Source/cmSetDirectoryPropertiesCommand.h @@ -40,8 +40,6 @@ public: std::vector::const_iterator ait, std::vector::const_iterator aitend, std::string& errors); - - cmTypeMacro(cmSetDirectoryPropertiesCommand, cmCommand); }; #endif diff --git a/Source/cmSetPropertyCommand.h b/Source/cmSetPropertyCommand.h index 01295c1..b4dff76 100644 --- a/Source/cmSetPropertyCommand.h +++ b/Source/cmSetPropertyCommand.h @@ -29,8 +29,6 @@ public: */ bool IsScriptable() const CM_OVERRIDE { return true; } - cmTypeMacro(cmSetPropertyCommand, cmCommand); - private: std::set Names; std::string PropertyName; diff --git a/Source/cmSetSourceFilesPropertiesCommand.h b/Source/cmSetSourceFilesPropertiesCommand.h index c683ac0..62cc404 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.h +++ b/Source/cmSetSourceFilesPropertiesCommand.h @@ -28,8 +28,6 @@ public: return "set_source_files_properties"; } - cmTypeMacro(cmSetSourceFilesPropertiesCommand, cmCommand); - static bool RunCommand(cmMakefile* mf, std::vector::const_iterator filebeg, std::vector::const_iterator fileend, diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h index 6e2a242..ed02fa8 100644 --- a/Source/cmSetTargetPropertiesCommand.h +++ b/Source/cmSetTargetPropertiesCommand.h @@ -28,8 +28,6 @@ public: static bool SetOneTarget(const std::string& tname, std::vector& propertyPairs, cmMakefile* mf); - - cmTypeMacro(cmSetTargetPropertiesCommand, cmCommand); }; #endif diff --git a/Source/cmSetTestsPropertiesCommand.h b/Source/cmSetTestsPropertiesCommand.h index 3f5ce21..04ba76e 100644 --- a/Source/cmSetTestsPropertiesCommand.h +++ b/Source/cmSetTestsPropertiesCommand.h @@ -22,8 +22,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "set_tests_properties"; } - cmTypeMacro(cmSetTestsPropertiesCommand, cmCommand); - static bool SetOneTest(const std::string& tname, std::vector& propertyPairs, cmMakefile* mf, std::string& errors); diff --git a/Source/cmSiteNameCommand.h b/Source/cmSiteNameCommand.h index 5578b03..48d1035 100644 --- a/Source/cmSiteNameCommand.h +++ b/Source/cmSiteNameCommand.h @@ -34,8 +34,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "site_name"; } - - cmTypeMacro(cmSiteNameCommand, cmCommand); }; #endif diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h index e3639df..deee740 100644 --- a/Source/cmSourceGroupCommand.h +++ b/Source/cmSourceGroupCommand.h @@ -30,8 +30,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "source_group"; } - - cmTypeMacro(cmSourceGroupCommand, cmCommand); }; #endif diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 0d1eb3e..468b191 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -446,8 +446,7 @@ void cmState::RemoveUserDefinedCommands() std::vector renamedCommands; for (std::map::iterator j = this->Commands.begin(); j != this->Commands.end();) { - if (j->second->IsA("cmMacroHelperCommand") || - j->second->IsA("cmFunctionHelperCommand")) { + if (j->second->IsUserDefined()) { delete j->second; this->Commands.erase(j++); } else if (j->first != j->second->GetName()) { diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index edb138d..b928f3c 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -39,8 +39,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "string"; } - cmTypeMacro(cmStringCommand, cmCommand); - protected: bool HandleConfigureCommand(std::vector const& args); bool HandleAsciiCommand(std::vector const& args); diff --git a/Source/cmSubdirCommand.h b/Source/cmSubdirCommand.h index c425852..0778638 100644 --- a/Source/cmSubdirCommand.h +++ b/Source/cmSubdirCommand.h @@ -31,8 +31,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "subdirs"; } - - cmTypeMacro(cmSubdirCommand, cmCommand); }; #endif diff --git a/Source/cmSubdirDependsCommand.h b/Source/cmSubdirDependsCommand.h index 0f3deb6..097244d 100644 --- a/Source/cmSubdirDependsCommand.h +++ b/Source/cmSubdirDependsCommand.h @@ -12,7 +12,6 @@ public: bool InitialPass(std::vector const& args, cmExecutionStatus& status) CM_OVERRIDE; std::string GetName() const CM_OVERRIDE { return "subdir_depends"; } - cmTypeMacro(cmSubdirDependsCommand, cmCommand); }; #endif diff --git a/Source/cmTargetCompileDefinitionsCommand.h b/Source/cmTargetCompileDefinitionsCommand.h index b49f616..0aaad4e 100644 --- a/Source/cmTargetCompileDefinitionsCommand.h +++ b/Source/cmTargetCompileDefinitionsCommand.h @@ -31,8 +31,6 @@ public: return "target_compile_definitions"; } - cmTypeMacro(cmTargetCompileDefinitionsCommand, cmTargetPropCommandBase); - private: void HandleImportedTarget(const std::string& tgt) CM_OVERRIDE; void HandleMissingTarget(const std::string& name) CM_OVERRIDE; diff --git a/Source/cmTargetCompileFeaturesCommand.h b/Source/cmTargetCompileFeaturesCommand.h index 8273e02..00c84d7 100644 --- a/Source/cmTargetCompileFeaturesCommand.h +++ b/Source/cmTargetCompileFeaturesCommand.h @@ -14,8 +14,6 @@ class cmTargetCompileFeaturesCommand : public cmTargetPropCommandBase std::string GetName() const CM_OVERRIDE { return "target_compile_features"; } - cmTypeMacro(cmTargetCompileFeaturesCommand, cmTargetPropCommandBase); - private: void HandleImportedTarget(const std::string& tgt) CM_OVERRIDE; void HandleMissingTarget(const std::string& name) CM_OVERRIDE; diff --git a/Source/cmTargetCompileOptionsCommand.h b/Source/cmTargetCompileOptionsCommand.h index f5b4c70..06b05a2 100644 --- a/Source/cmTargetCompileOptionsCommand.h +++ b/Source/cmTargetCompileOptionsCommand.h @@ -25,8 +25,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "target_compile_options"; } - cmTypeMacro(cmTargetCompileOptionsCommand, cmTargetPropCommandBase); - private: void HandleImportedTarget(const std::string& tgt) CM_OVERRIDE; void HandleMissingTarget(const std::string& name) CM_OVERRIDE; diff --git a/Source/cmTargetIncludeDirectoriesCommand.h b/Source/cmTargetIncludeDirectoriesCommand.h index 671627a..d96b28a 100644 --- a/Source/cmTargetIncludeDirectoriesCommand.h +++ b/Source/cmTargetIncludeDirectoriesCommand.h @@ -31,8 +31,6 @@ public: return "target_include_directories"; } - cmTypeMacro(cmTargetIncludeDirectoriesCommand, cmTargetPropCommandBase); - private: void HandleImportedTarget(const std::string& tgt) CM_OVERRIDE; void HandleMissingTarget(const std::string& name) CM_OVERRIDE; diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h index 85888f9..69bb6eb 100644 --- a/Source/cmTargetLinkLibrariesCommand.h +++ b/Source/cmTargetLinkLibrariesCommand.h @@ -32,8 +32,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "target_link_libraries"; } - cmTypeMacro(cmTargetLinkLibrariesCommand, cmCommand); - private: void LinkLibraryTypeSpecifierWarning(int left, int right); static const char* LinkLibraryTypeNames[3]; diff --git a/Source/cmTargetPropCommandBase.h b/Source/cmTargetPropCommandBase.h index de0a7d3..485a7f3 100644 --- a/Source/cmTargetPropCommandBase.h +++ b/Source/cmTargetPropCommandBase.h @@ -21,8 +21,6 @@ public: const std::string& prop, ArgumentFlags flags = NO_FLAGS); - cmTypeMacro(cmTargetPropCommandBase, cmCommand); - protected: std::string Property; cmTarget* Target; diff --git a/Source/cmTargetSourcesCommand.h b/Source/cmTargetSourcesCommand.h index 8f88b25..839f07c 100644 --- a/Source/cmTargetSourcesCommand.h +++ b/Source/cmTargetSourcesCommand.h @@ -25,8 +25,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "target_sources"; } - cmTypeMacro(cmTargetSourcesCommand, cmTargetPropCommandBase); - private: void HandleImportedTarget(const std::string& tgt) CM_OVERRIDE; void HandleMissingTarget(const std::string& name) CM_OVERRIDE; diff --git a/Source/cmTryCompileCommand.h b/Source/cmTryCompileCommand.h index 45d92df..ed74ae1 100644 --- a/Source/cmTryCompileCommand.h +++ b/Source/cmTryCompileCommand.h @@ -29,8 +29,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "try_compile"; } - - cmTypeMacro(cmTryCompileCommand, cmCoreTryCompile); }; #endif diff --git a/Source/cmTryRunCommand.h b/Source/cmTryRunCommand.h index b569b0b..24447ed 100644 --- a/Source/cmTryRunCommand.h +++ b/Source/cmTryRunCommand.h @@ -30,8 +30,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "try_run"; } - cmTypeMacro(cmTryRunCommand, cmCoreTryCompile); - private: void RunExecutable(const std::string& runArgs, std::string* runOutputContents); diff --git a/Source/cmUnsetCommand.h b/Source/cmUnsetCommand.h index b3f045a..37b9270 100644 --- a/Source/cmUnsetCommand.h +++ b/Source/cmUnsetCommand.h @@ -34,8 +34,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "unset"; } - - cmTypeMacro(cmUnsetCommand, cmCommand); }; #endif diff --git a/Source/cmUseMangledMesaCommand.h b/Source/cmUseMangledMesaCommand.h index a5fa146..3200327 100644 --- a/Source/cmUseMangledMesaCommand.h +++ b/Source/cmUseMangledMesaCommand.h @@ -8,7 +8,6 @@ class cmUseMangledMesaCommand : public cmCommand { public: - cmTypeMacro(cmUseMangledMesaCommand, cmCommand); cmCommand* Clone() CM_OVERRIDE { return new cmUseMangledMesaCommand; } bool InitialPass(std::vector const& args, cmExecutionStatus& status) CM_OVERRIDE; diff --git a/Source/cmUtilitySourceCommand.h b/Source/cmUtilitySourceCommand.h index 6ee5f3e..3c28e11 100644 --- a/Source/cmUtilitySourceCommand.h +++ b/Source/cmUtilitySourceCommand.h @@ -8,7 +8,6 @@ class cmUtilitySourceCommand : public cmCommand { public: - cmTypeMacro(cmUtilitySourceCommand, cmCommand); cmCommand* Clone() CM_OVERRIDE { return new cmUtilitySourceCommand; } bool InitialPass(std::vector const& args, cmExecutionStatus& status) CM_OVERRIDE; diff --git a/Source/cmVariableRequiresCommand.h b/Source/cmVariableRequiresCommand.h index e40151b..92878ba 100644 --- a/Source/cmVariableRequiresCommand.h +++ b/Source/cmVariableRequiresCommand.h @@ -8,7 +8,6 @@ class cmVariableRequiresCommand : public cmCommand { public: - cmTypeMacro(cmVariableRequiresCommand, cmCommand); cmCommand* Clone() CM_OVERRIDE { return new cmVariableRequiresCommand; } bool InitialPass(std::vector const& args, cmExecutionStatus& status) CM_OVERRIDE; diff --git a/Source/cmVariableWatchCommand.h b/Source/cmVariableWatchCommand.h index b1862f0..8518fd2 100644 --- a/Source/cmVariableWatchCommand.h +++ b/Source/cmVariableWatchCommand.h @@ -44,8 +44,6 @@ public: */ std::string GetName() const CM_OVERRIDE { return "variable_watch"; } - cmTypeMacro(cmVariableWatchCommand, cmCommand); - protected: std::set WatchedVariables; }; diff --git a/Source/cmWhileCommand.h b/Source/cmWhileCommand.h index 9c70ca2..cc114ec 100644 --- a/Source/cmWhileCommand.h +++ b/Source/cmWhileCommand.h @@ -60,8 +60,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "while"; } - - cmTypeMacro(cmWhileCommand, cmCommand); }; #endif diff --git a/Source/cmWriteFileCommand.h b/Source/cmWriteFileCommand.h index dbadf84..76a0536 100644 --- a/Source/cmWriteFileCommand.h +++ b/Source/cmWriteFileCommand.h @@ -33,8 +33,6 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "write_file"; } - - cmTypeMacro(cmWriteFileCommand, cmCommand); }; #endif ----------------------------------------------------------------------- Summary of changes: Source/CPack/IFW/cmCPackIFWGenerator.h | 1 - Source/CPack/cmCPack7zGenerator.h | 1 - Source/CPack/cmCPackArchiveGenerator.h | 3 +- Source/CPack/cmCPackDebGenerator.h | 1 - Source/CPack/cmCPackGenerator.h | 11 +++--- Source/CPack/cmCPackGeneratorFactory.h | 9 +---- Source/CPack/cmCPackLog.h | 9 +---- Source/CPack/cmCPackNSISGenerator.h | 1 - Source/CPack/cmCPackPKGGenerator.h | 3 ++ Source/CPack/cmCPackRPMGenerator.h | 1 - Source/CPack/cmCPackSTGZGenerator.h | 1 - Source/CPack/cmCPackTGZGenerator.h | 1 - Source/CPack/cmCPackTXZGenerator.h | 1 - Source/CPack/cmCPackTarBZip2Generator.h | 1 - Source/CPack/cmCPackTarCompressGenerator.h | 1 - Source/CPack/cmCPackZIPGenerator.h | 1 - Source/CPack/cpack.cxx | 1 - Source/CTest/cmCTestBuildAndTestHandler.h | 3 +- Source/CTest/cmCTestBuildCommand.h | 3 -- Source/CTest/cmCTestBuildHandler.h | 3 +- Source/CTest/cmCTestCommand.h | 2 - Source/CTest/cmCTestConfigureCommand.h | 3 -- Source/CTest/cmCTestConfigureHandler.h | 3 +- Source/CTest/cmCTestCoverageCommand.h | 3 +- Source/CTest/cmCTestCoverageHandler.h | 3 +- Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h | 3 -- Source/CTest/cmCTestGenericHandler.h | 5 +-- Source/CTest/cmCTestHandlerCommand.h | 3 -- Source/CTest/cmCTestMemCheckCommand.h | 3 -- Source/CTest/cmCTestMemCheckHandler.h | 3 +- Source/CTest/cmCTestReadCustomFilesCommand.h | 3 -- Source/CTest/cmCTestRunScriptCommand.h | 3 -- Source/CTest/cmCTestScriptHandler.h | 3 +- Source/CTest/cmCTestSleepCommand.h | 3 -- Source/CTest/cmCTestStartCommand.h | 3 -- Source/CTest/cmCTestSubmitCommand.h | 3 +- Source/CTest/cmCTestSubmitHandler.h | 3 +- Source/CTest/cmCTestTestCommand.h | 3 -- Source/CTest/cmCTestTestHandler.cxx | 8 ---- Source/CTest/cmCTestTestHandler.h | 3 +- Source/CTest/cmCTestUpdateCommand.h | 3 -- Source/CTest/cmCTestUpdateHandler.h | 3 +- Source/CTest/cmCTestUploadCommand.h | 3 +- Source/CTest/cmCTestUploadHandler.h | 3 +- Source/cmAddCompileOptionsCommand.h | 2 - Source/cmAddCustomCommandCommand.h | 2 - Source/cmAddCustomTargetCommand.h | 2 - Source/cmAddDefinitionsCommand.h | 2 - Source/cmAddDependenciesCommand.h | 2 - Source/cmAddExecutableCommand.h | 2 - Source/cmAddLibraryCommand.h | 2 - Source/cmAddSubDirectoryCommand.h | 2 - Source/cmAddTestCommand.h | 2 - Source/cmAuxSourceDirectoryCommand.h | 2 - Source/cmBreakCommand.h | 2 - Source/cmBuildCommand.h | 2 - Source/cmBuildNameCommand.h | 1 - Source/cmCMakeHostSystemInformationCommand.h | 2 - Source/cmCMakeMinimumRequired.h | 2 - Source/cmCMakePolicyCommand.h | 2 - Source/cmCommand.h | 16 +++----- Source/cmConfigureFileCommand.h | 2 - Source/cmContinueCommand.h | 2 - Source/cmCoreTryCompile.h | 2 - Source/cmCreateTestSourceList.h | 2 - Source/cmDefinePropertyCommand.h | 2 - Source/cmElseCommand.h | 2 - Source/cmElseIfCommand.h | 2 - Source/cmEnableLanguageCommand.h | 2 - Source/cmEnableTestingCommand.h | 2 - Source/cmEndForEachCommand.h | 2 - Source/cmEndFunctionCommand.h | 2 - Source/cmEndIfCommand.h | 2 - Source/cmEndMacroCommand.h | 2 - Source/cmEndWhileCommand.h | 2 - Source/cmExecProgramCommand.h | 2 - Source/cmExecuteProcessCommand.h | 2 - Source/cmExportCommand.h | 2 - Source/cmExportLibraryDependenciesCommand.h | 1 - Source/cmFLTKWrapUICommand.h | 2 - Source/cmFileCommand.h | 2 - Source/cmFindBase.h | 1 - Source/cmFindCommon.h | 1 - Source/cmFindFileCommand.h | 2 - Source/cmFindLibraryCommand.h | 2 - Source/cmFindPackageCommand.h | 2 - Source/cmFindPathCommand.h | 1 - Source/cmFindProgramCommand.h | 2 - Source/cmForEachCommand.h | 2 - Source/cmFunctionCommand.cxx | 9 +---- Source/cmFunctionCommand.h | 2 - Source/cmGetCMakePropertyCommand.h | 2 - Source/cmGetDirectoryPropertyCommand.h | 2 - Source/cmGetFilenameComponentCommand.h | 2 - Source/cmGetPropertyCommand.h | 2 - Source/cmGetSourceFilePropertyCommand.h | 2 - Source/cmGetTargetPropertyCommand.h | 2 - Source/cmGetTestPropertyCommand.h | 2 - Source/cmIfCommand.h | 2 - Source/cmIncludeCommand.h | 2 - Source/cmIncludeDirectoryCommand.h | 2 - Source/cmIncludeExternalMSProjectCommand.h | 2 - Source/cmIncludeRegularExpressionCommand.h | 2 - Source/cmInstallCommand.h | 2 - Source/cmInstallFilesCommand.h | 2 - Source/cmInstallProgramsCommand.h | 2 - Source/cmInstallTargetsCommand.h | 2 - Source/cmLinkDirectoriesCommand.h | 2 - Source/cmLinkLibrariesCommand.h | 2 - Source/cmListCommand.h | 2 - Source/cmLoadCacheCommand.h | 2 - Source/cmLoadCommandCommand.cxx | 2 - Source/cmLoadCommandCommand.h | 1 - Source/cmMacroCommand.cxx | 9 +---- Source/cmMacroCommand.h | 2 - Source/cmMakeDirectoryCommand.h | 2 - Source/cmMarkAsAdvancedCommand.h | 2 - Source/cmMathCommand.h | 2 - Source/cmMessageCommand.h | 2 - Source/cmObject.h | 41 --------------------- Source/cmOptionCommand.h | 2 - Source/cmOutputRequiredFilesCommand.h | 1 - Source/cmParseArgumentsCommand.h | 2 - Source/cmProjectCommand.h | 2 - Source/cmQTWrapCPPCommand.h | 2 - Source/cmQTWrapUICommand.h | 1 - Source/cmRemoveCommand.h | 2 - Source/cmRemoveDefinitionsCommand.h | 2 - Source/cmReturnCommand.h | 2 - Source/cmSeparateArgumentsCommand.h | 2 - Source/cmSetCommand.h | 2 - Source/cmSetDirectoryPropertiesCommand.h | 2 - Source/cmSetPropertyCommand.h | 2 - Source/cmSetSourceFilesPropertiesCommand.h | 2 - Source/cmSetTargetPropertiesCommand.h | 2 - Source/cmSetTestsPropertiesCommand.h | 2 - Source/cmSiteNameCommand.h | 2 - Source/cmSourceGroupCommand.h | 2 - Source/cmStandardIncludes.h | 1 - Source/cmState.cxx | 4 +- Source/cmStringCommand.h | 2 - Source/cmSubdirCommand.h | 2 - Source/cmSubdirDependsCommand.h | 1 - Source/cmTargetCompileDefinitionsCommand.h | 2 - Source/cmTargetCompileFeaturesCommand.h | 2 - Source/cmTargetCompileOptionsCommand.h | 2 - Source/cmTargetIncludeDirectoriesCommand.h | 2 - Source/cmTargetLinkLibrariesCommand.h | 2 - Source/cmTargetPropCommandBase.h | 2 - Source/cmTargetSourcesCommand.h | 2 - Source/cmTryCompileCommand.h | 2 - Source/cmTryRunCommand.h | 2 - Source/cmTypeMacro.h | 31 ---------------- Source/cmUnsetCommand.h | 2 - Source/cmUseMangledMesaCommand.h | 1 - Source/cmUtilitySourceCommand.h | 1 - Source/cmVariableRequiresCommand.h | 1 - Source/cmVariableWatchCommand.h | 2 - Source/cmWhileCommand.h | 2 - Source/cmWriteFileCommand.h | 2 - 160 files changed, 38 insertions(+), 413 deletions(-) delete mode 100644 Source/cmObject.h delete mode 100644 Source/cmTypeMacro.h hooks/post-receive -- CMake From daniel at pfeifer-mail.de Sun Oct 23 04:06:33 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Sun, 23 Oct 2016 04:06:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-677-gbbc1ed0 Message-ID: <20161023080633.C3D9EF6EB2@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 bbc1ed0b6f8669912dbf7151d3c46fa806e04a67 (commit) via 3aa68a0197e510372c26152d4bbf9a1066b082d3 (commit) via f01ee88d0040b4905844af32d10a689d8ccfc672 (commit) from 797b4d3a176c01c91b040ac4fc1e787796e62deb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bbc1ed0b6f8669912dbf7151d3c46fa806e04a67 commit bbc1ed0b6f8669912dbf7151d3c46fa806e04a67 Merge: 797b4d3 3aa68a0 Author: Daniel Pfeifer AuthorDate: Sun Oct 23 04:06:32 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 23 04:06:32 2016 -0400 Merge topic 'cmcommand-no-disable' into next 3aa68a01 Merge topic 'separate-compilation' into cmcommand-no-disable f01ee88d Remove cmCommand::Enabled and all related accessors diff --cc Source/cmCommand.h index 6a1979a,5adca64..dcfe8da --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@@ -17,11 -19,13 +17,11 @@@ * to support such features as enable/disable, inheritance, * documentation, and construction. */ -class cmCommand : public cmObject +class cmCommand { public: - cmTypeMacro(cmCommand, cmObject); - /** - * Construct the command. By default it is enabled with no makefile. + * Construct the command. By default it has no makefile. */ cmCommand() : Makefile(CM_NULLPTR) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3aa68a0197e510372c26152d4bbf9a1066b082d3 commit 3aa68a0197e510372c26152d4bbf9a1066b082d3 Merge: f01ee88 32040cd Author: Daniel Pfeifer AuthorDate: Sun Oct 23 10:06:00 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sun Oct 23 10:06:00 2016 +0200 Merge topic 'separate-compilation' into cmcommand-no-disable diff --cc Source/cmCommand.h index cc34756,9299c71..5adca64 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@@ -104,16 -96,29 +95,9 @@@ public virtual std::string GetName() const = 0; /** - * Enable the command. - */ - void EnabledOn() { this->Enabled = true; } - - /** - * Disable the command. - */ - void EnabledOff() { this->Enabled = false; } - - /** - * Query whether the command is enabled. - */ - bool GetEnabled() const { return this->Enabled; } - - /** - * Disable or enable the command. - */ - void SetEnabled(bool enabled) { this->Enabled = enabled; } - - /** * Return the last error string. */ - const char* GetError() - { - if (this->Error.empty()) { - this->Error = this->GetName(); - this->Error += " unknown error."; - } - return this->Error.c_str(); - } + const char* GetError(); /** * Set the error message https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f01ee88d0040b4905844af32d10a689d8ccfc672 commit f01ee88d0040b4905844af32d10a689d8ccfc672 Author: Daniel Pfeifer AuthorDate: Sun Oct 23 08:55:19 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sun Oct 23 08:55:19 2016 +0200 Remove cmCommand::Enabled and all related accessors Enabled is never set to false. Remove the member variable and all related getters and setters. diff --git a/Source/cmCommand.h b/Source/cmCommand.h index d8e337d..cc34756 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -25,12 +25,11 @@ public: cmTypeMacro(cmCommand, cmObject); /** - * Construct the command. By default it is enabled with no makefile. + * Construct the command. By default it has no makefile. */ cmCommand() + : Makefile(CM_NULLPTR) { - this->Makefile = CM_NULLPTR; - this->Enabled = true; } /** @@ -105,26 +104,6 @@ public: virtual std::string GetName() const = 0; /** - * Enable the command. - */ - void EnabledOn() { this->Enabled = true; } - - /** - * Disable the command. - */ - void EnabledOff() { this->Enabled = false; } - - /** - * Query whether the command is enabled. - */ - bool GetEnabled() const { return this->Enabled; } - - /** - * Disable or enable the command. - */ - void SetEnabled(bool enabled) { this->Enabled = enabled; } - - /** * Return the last error string. */ const char* GetError() @@ -169,7 +148,6 @@ protected: cmCommandArgumentsHelper Helper; private: - bool Enabled; std::string Error; }; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 00c0e82..741ffb8 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -266,7 +266,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, pcmd->SetMakefile(this); // Decide whether to invoke the command. - if (pcmd->GetEnabled() && !cmSystemTools::GetFatalErrorOccured() && + if (!cmSystemTools::GetFatalErrorOccured() && (this->GetCMakeInstance()->GetWorkingMode() != cmake::SCRIPT_MODE || pcmd->IsScriptable())) ----------------------------------------------------------------------- Summary of changes: Source/cmCommand.h | 24 +----------------------- Source/cmMakefile.cxx | 2 +- 2 files changed, 2 insertions(+), 24 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Sun Oct 23 04:25:59 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Sun, 23 Oct 2016 04:25:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-679-ge640244 Message-ID: <20161023082559.72BC5F6CB9@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 e6402444f1f837efb452c50c106a738a66b59d48 (commit) via 645186c0b7e46cf99882616ef2a00f07a472825c (commit) from bbc1ed0b6f8669912dbf7151d3c46fa806e04a67 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6402444f1f837efb452c50c106a738a66b59d48 commit e6402444f1f837efb452c50c106a738a66b59d48 Merge: bbc1ed0 645186c Author: Daniel Pfeifer AuthorDate: Sun Oct 23 04:25:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 23 04:25:57 2016 -0400 Merge topic 'remove-cmobject' into next 645186c0 Revert "Remove cmObject.h and cmTypeMacro.h" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=645186c0b7e46cf99882616ef2a00f07a472825c commit 645186c0b7e46cf99882616ef2a00f07a472825c Author: Daniel Pfeifer AuthorDate: Sun Oct 23 10:25:23 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sun Oct 23 10:25:23 2016 +0200 Revert "Remove cmObject.h and cmTypeMacro.h" This reverts commit dcb8b0fb35e74749d07b8aec837b41564691f0c7. diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index d656063..88a3741 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -10,6 +10,7 @@ #include "cmCPackIFWInstaller.h" #include "cmCPackIFWPackage.h" #include "cmCPackIFWRepository.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPack7zGenerator.h b/Source/CPack/cmCPack7zGenerator.h index a617d9b..063b032 100644 --- a/Source/CPack/cmCPack7zGenerator.h +++ b/Source/CPack/cmCPack7zGenerator.h @@ -7,6 +7,7 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPack7zGenerator * \brief A generator for 7z files diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index df02ae8..7010664 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -7,6 +7,7 @@ #include "cmArchiveWrite.h" #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h index 7db933e..f46ae5a 100644 --- a/Source/CPack/cmCPackDebGenerator.h +++ b/Source/CPack/cmCPackDebGenerator.h @@ -6,6 +6,7 @@ #include #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index f32dd70..a7652b1 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -6,7 +6,9 @@ #include #include "cmCPackComponentGroup.h" +#include "cmObject.h" #include "cmSystemTools.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index 0a98f91..5381eb2 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -5,6 +5,9 @@ #include +#include "cmObject.h" +#include "cmTypeMacro.h" + #include #include #include diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 9ffe5c4..2ac805d 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -5,6 +5,9 @@ #include +#include "cmObject.h" +#include "cmTypeMacro.h" + #include #include #include diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h index b4bf2d4..d61341c 100644 --- a/Source/CPack/cmCPackNSISGenerator.h +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -6,6 +6,7 @@ #include #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackPKGGenerator.h b/Source/CPack/cmCPackPKGGenerator.h index bb3c1a7..5569185 100644 --- a/Source/CPack/cmCPackPKGGenerator.h +++ b/Source/CPack/cmCPackPKGGenerator.h @@ -3,9 +3,6 @@ #ifndef cmCPackPKGGenerator_h #define cmCPackPKGGenerator_h -#include -#include - #include "cmCPackGenerator.h" class cmCPackComponent; diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h index 4d48bd8..f8bcbfe 100644 --- a/Source/CPack/cmCPackRPMGenerator.h +++ b/Source/CPack/cmCPackRPMGenerator.h @@ -6,6 +6,7 @@ #include #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" #include diff --git a/Source/CPack/cmCPackSTGZGenerator.h b/Source/CPack/cmCPackSTGZGenerator.h index 4b9c1c6..a1bee5f 100644 --- a/Source/CPack/cmCPackSTGZGenerator.h +++ b/Source/CPack/cmCPackSTGZGenerator.h @@ -7,6 +7,7 @@ #include "cmCPackGenerator.h" #include "cmCPackTGZGenerator.h" +#include "cmTypeMacro.h" #include diff --git a/Source/CPack/cmCPackTGZGenerator.h b/Source/CPack/cmCPackTGZGenerator.h index ee2e975..e93fb44 100644 --- a/Source/CPack/cmCPackTGZGenerator.h +++ b/Source/CPack/cmCPackTGZGenerator.h @@ -7,6 +7,7 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPackTGZGenerator * \brief A generator for TGZ files diff --git a/Source/CPack/cmCPackTXZGenerator.h b/Source/CPack/cmCPackTXZGenerator.h index 876ca7d..b8a7597 100644 --- a/Source/CPack/cmCPackTXZGenerator.h +++ b/Source/CPack/cmCPackTXZGenerator.h @@ -7,6 +7,7 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPackTXZGenerator * \brief A generator for TXZ files diff --git a/Source/CPack/cmCPackTarBZip2Generator.h b/Source/CPack/cmCPackTarBZip2Generator.h index 42214fd..2e8ba9b 100644 --- a/Source/CPack/cmCPackTarBZip2Generator.h +++ b/Source/CPack/cmCPackTarBZip2Generator.h @@ -7,6 +7,7 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPackTarBZip2Generator * \brief A generator for TarBZip2 files diff --git a/Source/CPack/cmCPackTarCompressGenerator.h b/Source/CPack/cmCPackTarCompressGenerator.h index 1476642..7d253e1 100644 --- a/Source/CPack/cmCPackTarCompressGenerator.h +++ b/Source/CPack/cmCPackTarCompressGenerator.h @@ -7,6 +7,7 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPackTarCompressGenerator * \brief A generator for TarCompress files diff --git a/Source/CPack/cmCPackZIPGenerator.h b/Source/CPack/cmCPackZIPGenerator.h index 95b6489..e0334fb 100644 --- a/Source/CPack/cmCPackZIPGenerator.h +++ b/Source/CPack/cmCPackZIPGenerator.h @@ -7,6 +7,7 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPackZIPGenerator * \brief A generator for ZIP files diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index b06bd38..c305cbf 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -12,6 +12,7 @@ #include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmTypeMacro.h" #include "cm_auto_ptr.hxx" #include "cmake.h" diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h index 5885738..1d424f3 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.h +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -6,6 +6,7 @@ #include #include "cmCTestGenericHandler.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestBuildCommand.h b/Source/CTest/cmCTestBuildCommand.h index 9cc6f7e..acc0ecf 100644 --- a/Source/CTest/cmCTestBuildCommand.h +++ b/Source/CTest/cmCTestBuildCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestHandlerCommand.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestBuildHandler.h b/Source/CTest/cmCTestBuildHandler.h index 5bd1157..69970d5 100644 --- a/Source/CTest/cmCTestBuildHandler.h +++ b/Source/CTest/cmCTestBuildHandler.h @@ -6,6 +6,7 @@ #include #include "cmCTestGenericHandler.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestConfigureCommand.h b/Source/CTest/cmCTestConfigureCommand.h index 22d1217..95a476f 100644 --- a/Source/CTest/cmCTestConfigureCommand.h +++ b/Source/CTest/cmCTestConfigureCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestHandlerCommand.h" +#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestConfigureHandler.h b/Source/CTest/cmCTestConfigureHandler.h index 7fa95ed..4a7c74b 100644 --- a/Source/CTest/cmCTestConfigureHandler.h +++ b/Source/CTest/cmCTestConfigureHandler.h @@ -6,6 +6,7 @@ #include #include "cmCTestGenericHandler.h" +#include "cmTypeMacro.h" /** \class cmCTestConfigureHandler * \brief A class that handles ctest -S invocations diff --git a/Source/CTest/cmCTestCoverageCommand.h b/Source/CTest/cmCTestCoverageCommand.h index bf42aa1..98dd6bf 100644 --- a/Source/CTest/cmCTestCoverageCommand.h +++ b/Source/CTest/cmCTestCoverageCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestHandlerCommand.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h index 339b5d7..0ba4a7a 100644 --- a/Source/CTest/cmCTestCoverageHandler.h +++ b/Source/CTest/cmCTestCoverageHandler.h @@ -6,6 +6,7 @@ #include #include "cmCTestGenericHandler.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h index 4c1438b..a8d00e0 100644 --- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h +++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestCommand.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index 4176eb2..ef9fdc0 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -6,6 +6,7 @@ #include #include "cmCTest.h" +#include "cmObject.h" #include "cmSystemTools.h" #include diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h index 92748af..0a1bae4 100644 --- a/Source/CTest/cmCTestHandlerCommand.h +++ b/Source/CTest/cmCTestHandlerCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestCommand.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestMemCheckCommand.h b/Source/CTest/cmCTestMemCheckCommand.h index 30d9e2b..efd4ecf 100644 --- a/Source/CTest/cmCTestMemCheckCommand.h +++ b/Source/CTest/cmCTestMemCheckCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestTestCommand.h" +#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h index b12da28..2300f68 100644 --- a/Source/CTest/cmCTestMemCheckHandler.h +++ b/Source/CTest/cmCTestMemCheckHandler.h @@ -6,6 +6,7 @@ #include #include "cmCTestTestHandler.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.h b/Source/CTest/cmCTestReadCustomFilesCommand.h index e155595..53610ba 100644 --- a/Source/CTest/cmCTestReadCustomFilesCommand.h +++ b/Source/CTest/cmCTestReadCustomFilesCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestCommand.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestRunScriptCommand.h b/Source/CTest/cmCTestRunScriptCommand.h index 01ed62e..ac79db4 100644 --- a/Source/CTest/cmCTestRunScriptCommand.h +++ b/Source/CTest/cmCTestRunScriptCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestCommand.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h index 47644be..5ba8ecf 100644 --- a/Source/CTest/cmCTestScriptHandler.h +++ b/Source/CTest/cmCTestScriptHandler.h @@ -6,6 +6,7 @@ #include #include "cmCTestGenericHandler.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestSleepCommand.h b/Source/CTest/cmCTestSleepCommand.h index 1052f76..c7e076f 100644 --- a/Source/CTest/cmCTestSleepCommand.h +++ b/Source/CTest/cmCTestSleepCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestCommand.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestStartCommand.h b/Source/CTest/cmCTestStartCommand.h index cc72d0c..1686b20 100644 --- a/Source/CTest/cmCTestStartCommand.h +++ b/Source/CTest/cmCTestStartCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestCommand.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestSubmitCommand.h b/Source/CTest/cmCTestSubmitCommand.h index f5b52c1..f8b9a45 100644 --- a/Source/CTest/cmCTestSubmitCommand.h +++ b/Source/CTest/cmCTestSubmitCommand.h @@ -7,6 +7,7 @@ #include "cmCTest.h" #include "cmCTestHandlerCommand.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index baaf8af..6e57de8 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -7,6 +7,7 @@ #include "cmCTest.h" #include "cmCTestGenericHandler.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h index 3250d93..b4a01dc 100644 --- a/Source/CTest/cmCTestTestCommand.h +++ b/Source/CTest/cmCTestTestCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestHandlerCommand.h" +#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 5b07e98..703707f 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -6,6 +6,7 @@ #include #include "cmCTestGenericHandler.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestUpdateCommand.h b/Source/CTest/cmCTestUpdateCommand.h index 5761f50..e834a29 100644 --- a/Source/CTest/cmCTestUpdateCommand.h +++ b/Source/CTest/cmCTestUpdateCommand.h @@ -6,6 +6,7 @@ #include #include "cmCTestHandlerCommand.h" +#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestUpdateHandler.h b/Source/CTest/cmCTestUpdateHandler.h index 87781e8..9a3ec1b 100644 --- a/Source/CTest/cmCTestUpdateHandler.h +++ b/Source/CTest/cmCTestUpdateHandler.h @@ -6,6 +6,7 @@ #include #include "cmCTestGenericHandler.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestUploadCommand.h b/Source/CTest/cmCTestUploadCommand.h index 474f699..b231844 100644 --- a/Source/CTest/cmCTestUploadCommand.h +++ b/Source/CTest/cmCTestUploadCommand.h @@ -7,6 +7,7 @@ #include "cmCTest.h" #include "cmCTestHandlerCommand.h" +#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestUploadHandler.h b/Source/CTest/cmCTestUploadHandler.h index 77c2aec..eb05a86 100644 --- a/Source/CTest/cmCTestUploadHandler.h +++ b/Source/CTest/cmCTestUploadHandler.h @@ -7,6 +7,7 @@ #include "cmCTest.h" #include "cmCTestGenericHandler.h" +#include "cmTypeMacro.h" /** \class cmCTestUploadHandler * \brief Helper class for CTest diff --git a/Source/cmCommand.h b/Source/cmCommand.h index 01f9e05..dcbd0dc 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -3,6 +3,8 @@ #ifndef cmCommand_h #define cmCommand_h +#include "cmObject.h" + #include "cmCommandArgumentsHelper.h" #include "cmListFileCache.h" #include "cmMakefile.h" diff --git a/Source/cmObject.h b/Source/cmObject.h new file mode 100644 index 0000000..621a06f --- /dev/null +++ b/Source/cmObject.h @@ -0,0 +1,41 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cmObject_h +#define cmObject_h + +#include + +#include "cmStandardIncludes.h" + +/** \class cmObject + * \brief Superclass for all commands and other classes in CMake. + * + * cmObject is the base class for all classes in CMake. It defines some + * methods such as GetNameOfClass, IsA, SafeDownCast. + */ +class cmObject +{ +public: + /** + * Need virtual destructor to destroy real command type. + */ + virtual ~cmObject() {} + + /** + * The class name of the command. + */ + virtual const char* GetNameOfClass() = 0; + + /** + * Returns true if this class is the given class, or a subclass of it. + */ + static bool IsTypeOf(const char* type) { return !strcmp("cmObject", type); } + + /** + * Returns true if this object is an instance of the given class or + * a subclass of it. + */ + virtual bool IsA(const char* type) { return cmObject::IsTypeOf(type); } +}; + +#endif diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index a2047af..0aab6d9 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -49,5 +49,6 @@ extern void operator<<(std::ostream&, const std::ostringstream&); #include "cmCustomCommandLines.h" #include "cmDocumentationEntry.h" #include "cmTargetLinkLibraryType.h" +#include "cmTypeMacro.h" #endif diff --git a/Source/cmState.cxx b/Source/cmState.cxx index db1e542..468b191 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -10,6 +10,7 @@ #include "cmDefinitions.h" #include "cmListFileCache.h" #include "cmSystemTools.h" +#include "cmTypeMacro.h" #include "cmake.h" #include diff --git a/Source/cmTypeMacro.h b/Source/cmTypeMacro.h new file mode 100644 index 0000000..b302ff1 --- /dev/null +++ b/Source/cmTypeMacro.h @@ -0,0 +1,31 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cmTypeMacro_h +#define cmTypeMacro_h + +// All subclasses of cmCommand or cmCTestGenericHandler should +// invoke this macro. +#define cmTypeMacro(thisClass, superclass) \ + const char* GetNameOfClass() CM_OVERRIDE { return #thisClass; } \ + typedef superclass Superclass; \ + static bool IsTypeOf(const char* type) \ + { \ + if (!strcmp(#thisClass, type)) { \ + return true; \ + } \ + return Superclass::IsTypeOf(type); \ + } \ + bool IsA(const char* type) CM_OVERRIDE \ + { \ + return thisClass::IsTypeOf(type); \ + } \ + static thisClass* SafeDownCast(cmObject* c) \ + { \ + if (c && c->IsA(#thisClass)) { \ + return static_cast(c); \ + } \ + return 0; \ + } \ + class cmTypeMacro_UseTrailingSemicolon + +#endif ----------------------------------------------------------------------- Summary of changes: Source/CPack/IFW/cmCPackIFWGenerator.h | 1 + Source/CPack/cmCPack7zGenerator.h | 1 + Source/CPack/cmCPackArchiveGenerator.h | 1 + Source/CPack/cmCPackDebGenerator.h | 1 + Source/CPack/cmCPackGenerator.h | 2 + Source/CPack/cmCPackGeneratorFactory.h | 3 ++ Source/CPack/cmCPackLog.h | 3 ++ Source/CPack/cmCPackNSISGenerator.h | 1 + Source/CPack/cmCPackPKGGenerator.h | 3 -- Source/CPack/cmCPackRPMGenerator.h | 1 + Source/CPack/cmCPackSTGZGenerator.h | 1 + Source/CPack/cmCPackTGZGenerator.h | 1 + Source/CPack/cmCPackTXZGenerator.h | 1 + Source/CPack/cmCPackTarBZip2Generator.h | 1 + Source/CPack/cmCPackTarCompressGenerator.h | 1 + Source/CPack/cmCPackZIPGenerator.h | 1 + Source/CPack/cpack.cxx | 1 + Source/CTest/cmCTestBuildAndTestHandler.h | 1 + Source/CTest/cmCTestBuildCommand.h | 1 + Source/CTest/cmCTestBuildHandler.h | 1 + Source/CTest/cmCTestConfigureCommand.h | 1 + Source/CTest/cmCTestConfigureHandler.h | 1 + Source/CTest/cmCTestCoverageCommand.h | 1 + Source/CTest/cmCTestCoverageHandler.h | 1 + Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h | 1 + Source/CTest/cmCTestGenericHandler.h | 1 + Source/CTest/cmCTestHandlerCommand.h | 1 + Source/CTest/cmCTestMemCheckCommand.h | 1 + Source/CTest/cmCTestMemCheckHandler.h | 1 + Source/CTest/cmCTestReadCustomFilesCommand.h | 1 + Source/CTest/cmCTestRunScriptCommand.h | 1 + Source/CTest/cmCTestScriptHandler.h | 1 + Source/CTest/cmCTestSleepCommand.h | 1 + Source/CTest/cmCTestStartCommand.h | 1 + Source/CTest/cmCTestSubmitCommand.h | 1 + Source/CTest/cmCTestSubmitHandler.h | 1 + Source/CTest/cmCTestTestCommand.h | 1 + Source/CTest/cmCTestTestHandler.h | 1 + Source/CTest/cmCTestUpdateCommand.h | 1 + Source/CTest/cmCTestUpdateHandler.h | 1 + Source/CTest/cmCTestUploadCommand.h | 1 + Source/CTest/cmCTestUploadHandler.h | 1 + Source/cmCommand.h | 2 + Source/cmObject.h | 41 +++++++++++++++++++++ Source/cmStandardIncludes.h | 1 + Source/cmState.cxx | 1 + Source/cmTypeMacro.h | 31 ++++++++++++++++ 47 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 Source/cmObject.h create mode 100644 Source/cmTypeMacro.h hooks/post-receive -- CMake From kwrobot at kitware.com Mon Oct 24 00:01:17 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 24 Oct 2016 00:01:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-296-g9a901dc Message-ID: <20161024040117.BD726F7421@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 9a901dc78de32519dae234719370b5330d5564b4 (commit) from aae5a9feb1b07bfae6968f2dfb3b3057a04b3c89 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a901dc78de32519dae234719370b5330d5564b4 commit 9a901dc78de32519dae234719370b5330d5564b4 Author: Kitware Robot AuthorDate: Mon Oct 24 00:01:13 2016 -0400 Commit: Kitware Robot CommitDate: Mon Oct 24 00:01:13 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 5b0d435..a2acd97 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 7) -set(CMake_VERSION_PATCH 20161023) +set(CMake_VERSION_PATCH 20161024) #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 Oct 24 09:57:23 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 09:57:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-681-g50c3bb9 Message-ID: <20161024135724.92D1FF7595@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 50c3bb901aad305cb7bfa1971d0ee1aeac226389 (commit) via b3b41d113196e5cd8bf8263f08c0ace03faa3ed6 (commit) from e6402444f1f837efb452c50c106a738a66b59d48 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=50c3bb901aad305cb7bfa1971d0ee1aeac226389 commit 50c3bb901aad305cb7bfa1971d0ee1aeac226389 Merge: e640244 b3b41d1 Author: Brad King AuthorDate: Mon Oct 24 09:57:22 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 09:57:22 2016 -0400 Merge topic 'cm_unordered_map' into next b3b41d11 fixup! Introduce CM_UNORDERED_MAP https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3b41d113196e5cd8bf8263f08c0ace03faa3ed6 commit b3b41d113196e5cd8bf8263f08c0ace03faa3ed6 Author: Brad King AuthorDate: Mon Oct 24 09:57:08 2016 -0400 Commit: Brad King CommitDate: Mon Oct 24 09:57:08 2016 -0400 fixup! Introduce CM_UNORDERED_MAP diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index d6a0dfb..3067f2c 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -884,7 +884,7 @@ private: */ cmSourceFile* LinearGetSourceFileWithOutput(const std::string& cname) const; -// A map for fast output to input look up. + // A map for fast output to input look up. typedef CM_UNORDERED_MAP OutputToSourceMap; OutputToSourceMap OutputToSource; ----------------------------------------------------------------------- Summary of changes: Source/cmMakefile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:00:01 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:00:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-683-g4df5915 Message-ID: <20161024140001.8C1A7F7608@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 4df5915b50c57b3f028cb3fb7555c42384bd34e8 (commit) via 1a74e719068c97518d6f9521c86862a17166f32e (commit) from 50c3bb901aad305cb7bfa1971d0ee1aeac226389 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4df5915b50c57b3f028cb3fb7555c42384bd34e8 commit 4df5915b50c57b3f028cb3fb7555c42384bd34e8 Merge: 50c3bb9 1a74e71 Author: Brad King AuthorDate: Mon Oct 24 10:00:00 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:00:00 2016 -0400 Merge topic 'cm_unordered_map' into next 1a74e719 Introduce CM_UNORDERED_MAP https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a74e719068c97518d6f9521c86862a17166f32e commit 1a74e719068c97518d6f9521c86862a17166f32e Author: Daniel Pfeifer AuthorDate: Fri Oct 21 23:52:51 2016 +0200 Commit: Brad King CommitDate: Mon Oct 24 09:58:52 2016 -0400 Introduce CM_UNORDERED_MAP Avoid duplicating switch among std::unordered_map, cmsys::hash_map, and std::map. diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index 569b3a2..8dfb9ea 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -6,20 +6,11 @@ #include #include "cmLinkedTree.h" +#include "cm_unordered_map.hxx" #include #include -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include "cmsys/hash_map.hxx" -#endif -#else -#include -#endif - /** \class cmDefinitions * \brief Store a scope of variable definitions for CMake language. * @@ -85,15 +76,7 @@ private: }; static Def NoDef; -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map MapType; -#else - typedef cmsys::hash_map MapType; -#endif -#else - typedef std::map MapType; -#endif + typedef CM_UNORDERED_MAP MapType; MapType Map; static Def const& GetInternal(const std::string& key, StackIter begin, diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx index a6c9cd0..55d8c2a 100644 --- a/Source/cmFileTimeComparison.cxx +++ b/Source/cmFileTimeComparison.cxx @@ -7,14 +7,7 @@ #include #include -// Use a hash table to avoid duplicate file time checks from disk. -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include -#endif -#endif +#include "cm_unordered_map.hxx" // Use a platform-specific API to get file times efficiently. #if !defined(_WIN32) || defined(__CYGWIN__) @@ -35,27 +28,9 @@ public: bool FileTimesDiffer(const char* f1, const char* f2); private: -#if defined(CMAKE_BUILD_WITH_CMAKE) - // Use a hash table to efficiently map from file name to modification time. - class HashString - { - public: - size_t operator()(const std::string& s) const { return h(s.c_str()); } -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - std::hash h; -#else - cmsys::hash h; -#endif - }; -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map + typedef CM_UNORDERED_MAP FileStatsMap; FileStatsMap Files; -#endif // Internal methods to lookup and compare modification times. inline bool Stat(const char* fname, cmFileTimeComparison_Type* st); @@ -68,7 +43,6 @@ private: bool cmFileTimeComparisonInternal::Stat(const char* fname, cmFileTimeComparison_Type* st) { -#if defined(CMAKE_BUILD_WITH_CMAKE) // Use the stored time if available. cmFileTimeComparisonInternal::FileStatsMap::iterator fit = this->Files.find(fname); @@ -76,7 +50,6 @@ bool cmFileTimeComparisonInternal::Stat(const char* fname, *st = fit->second; return true; } -#endif #if !defined(_WIN32) || defined(__CYGWIN__) // POSIX version. Use the stat function. @@ -97,11 +70,8 @@ bool cmFileTimeComparisonInternal::Stat(const char* fname, *st = fdata.ftLastWriteTime; #endif -#if defined(CMAKE_BUILD_WITH_CMAKE) // Store the time for future use. this->Files[fname] = *st; -#endif - return true; } diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index d8d47a1..4bf4bd1 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -12,6 +12,7 @@ #include "cmTarget.h" #include "cmTargetDepend.h" #include "cm_codecvt.hxx" +#include "cm_unordered_map.hxx" #include #include @@ -22,11 +23,6 @@ #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmFileLockPool.h" -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include -#endif #endif class cmCustomCommandLines; @@ -468,22 +464,9 @@ protected: const char* GetPredefinedTargetsFolder(); private: -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map TargetMap; - typedef std::unordered_map - GeneratorTargetMap; - typedef std::unordered_map MakefileMap; -#else - typedef cmsys::hash_map TargetMap; - typedef cmsys::hash_map GeneratorTargetMap; - typedef cmsys::hash_map MakefileMap; -#endif -#else - typedef std::map TargetMap; - typedef std::map GeneratorTargetMap; - typedef std::map MakefileMap; -#endif + typedef CM_UNORDERED_MAP TargetMap; + typedef CM_UNORDERED_MAP GeneratorTargetMap; + typedef CM_UNORDERED_MAP MakefileMap; // Map efficiently from target name to cmTarget instance. // Do not use this structure for looping over all targets. // It contains both normal and globally visible imported targets. diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index b61e81b..3067f2c 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -12,6 +12,7 @@ #include "cmStateSnapshot.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" +#include "cm_unordered_map.hxx" #include "cmake.h" #if defined(CMAKE_BUILD_WITH_CMAKE) @@ -27,14 +28,6 @@ #include #include -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include -#endif -#endif - class cmCommand; class cmCompiledGeneratorExpression; class cmCustomCommandLines; @@ -783,15 +776,6 @@ protected: // libraries, classes, and executables mutable cmTargets Targets; -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map TargetMap; -#else - typedef cmsys::hash_map TargetMap; -#endif -#else - typedef std::map TargetMap; -#endif std::map AliasTargets; std::vector SourceFiles; @@ -863,6 +847,7 @@ private: friend class cmParseFileScope; std::vector ImportedTargetsOwned; + typedef CM_UNORDERED_MAP TargetMap; TargetMap ImportedTargets; // Internal policy stack management. @@ -899,16 +884,8 @@ private: */ cmSourceFile* LinearGetSourceFileWithOutput(const std::string& cname) const; -// A map for fast output to input look up. -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map OutputToSourceMap; -#else - typedef cmsys::hash_map OutputToSourceMap; -#endif -#else - typedef std::map OutputToSourceMap; -#endif + // A map for fast output to input look up. + typedef CM_UNORDERED_MAP OutputToSourceMap; OutputToSourceMap OutputToSource; void UpdateOutputToSourceMap(std::vector const& outputs, diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 929e204..1f035a1 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -12,6 +12,7 @@ #include "cmPropertyMap.h" #include "cmStateTypes.h" #include "cmTargetLinkLibraryType.h" +#include "cm_unordered_map.hxx" #include #include @@ -20,14 +21,6 @@ #include #include -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include -#endif -#endif - class cmMakefile; class cmSourceFile; class cmGlobalGenerator; @@ -324,15 +317,7 @@ private: cmListFileBacktrace Backtrace; }; -#ifdef CMAKE_BUILD_WITH_CMAKE -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -typedef std::unordered_map cmTargets; -#else -typedef cmsys::hash_map cmTargets; -#endif -#else -typedef std::map cmTargets; -#endif +typedef CM_UNORDERED_MAP cmTargets; class cmTargetSet : public std::set { diff --git a/Source/cm_unordered_map.hxx b/Source/cm_unordered_map.hxx new file mode 100644 index 0000000..dc8ca35 --- /dev/null +++ b/Source/cm_unordered_map.hxx @@ -0,0 +1,25 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef CM_UNORDERED_MAP_HXX +#define CM_UNORDERED_MAP_HXX + +#include + +#if defined(CMake_HAVE_CXX_UNORDERED_MAP) + +#include +#define CM_UNORDERED_MAP std::unordered_map + +#elif defined(CMAKE_BUILD_WITH_CMAKE) + +#include +#define CM_UNORDERED_MAP cmsys::hash_map + +#else + +#include +#define CM_UNORDERED_MAP std::map + +#endif + +#endif diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 388984f..44b76ef 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -27,6 +27,7 @@ #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmGraphVizWriter.h" #include "cmVariableWatch.h" +#include "cm_unordered_map.hxx" #include #endif @@ -122,11 +123,7 @@ class cmCommand; namespace { #if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -typedef std::unordered_map JsonValueMapType; -#else -typedef cmsys::hash_map JsonValueMapType; -#endif +typedef CM_UNORDERED_MAP JsonValueMapType; #endif } // namespace ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:04:42 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:04:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-685-g4f86336 Message-ID: <20161024140442.3E66AF76CA@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 4f8633666382e9b518a5af001146c9f8abfb9844 (commit) via 9af394a2ce6f0815323e9213784494b225bc2a6f (commit) from 4df5915b50c57b3f028cb3fb7555c42384bd34e8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4f8633666382e9b518a5af001146c9f8abfb9844 commit 4f8633666382e9b518a5af001146c9f8abfb9844 Merge: 4df5915 9af394a Author: Brad King AuthorDate: Mon Oct 24 10:04:41 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:04:41 2016 -0400 Merge topic 'cmcommand-no-disable' into next 9af394a2 Revert topic 'cmcommand-no-disable' diff --cc Source/cmCommand.h index b263a61,9299c71..65bb7c5 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@@ -19,11 -19,13 +19,11 @@@ * to support such features as enable/disable, inheritance, * documentation, and construction. */ -class cmCommand : public cmObject +class cmCommand { public: - cmTypeMacro(cmCommand, cmObject); - /** - * Construct the command. By default it has no makefile. + * Construct the command. By default it is enabled with no makefile. */ cmCommand() : Makefile(CM_NULLPTR) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9af394a2ce6f0815323e9213784494b225bc2a6f commit 9af394a2ce6f0815323e9213784494b225bc2a6f Author: Brad King AuthorDate: Mon Oct 24 10:03:15 2016 -0400 Commit: Brad King CommitDate: Mon Oct 24 10:03:15 2016 -0400 Revert topic 'cmcommand-no-disable' It will be rebased and restored to avoid conflicts. diff --git a/Source/cmCommand.h b/Source/cmCommand.h index 5adca64..9299c71 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -25,10 +25,11 @@ public: cmTypeMacro(cmCommand, cmObject); /** - * Construct the command. By default it has no makefile. + * Construct the command. By default it is enabled with no makefile. */ cmCommand() : Makefile(CM_NULLPTR) + , Enabled(true) { } @@ -95,6 +96,26 @@ public: virtual std::string GetName() const = 0; /** + * Enable the command. + */ + void EnabledOn() { this->Enabled = true; } + + /** + * Disable the command. + */ + void EnabledOff() { this->Enabled = false; } + + /** + * Query whether the command is enabled. + */ + bool GetEnabled() const { return this->Enabled; } + + /** + * Disable or enable the command. + */ + void SetEnabled(bool enabled) { this->Enabled = enabled; } + + /** * Return the last error string. */ const char* GetError(); @@ -112,6 +133,7 @@ protected: cmCommandArgumentsHelper Helper; private: + bool Enabled; std::string Error; }; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 741ffb8..00c0e82 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -266,7 +266,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, pcmd->SetMakefile(this); // Decide whether to invoke the command. - if (!cmSystemTools::GetFatalErrorOccured() && + if (pcmd->GetEnabled() && !cmSystemTools::GetFatalErrorOccured() && (this->GetCMakeInstance()->GetWorkingMode() != cmake::SCRIPT_MODE || pcmd->IsScriptable())) ----------------------------------------------------------------------- Summary of changes: Source/cmCommand.h | 24 +++++++++++++++++++++++- Source/cmMakefile.cxx | 2 +- 2 files changed, 24 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:05:11 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:05:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-687-g4ce2ab4 Message-ID: <20161024140511.727C1F76D3@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 4ce2ab4db04cb2278c451b03a039caa00e4381f6 (commit) via be38bde9b8cbabd2b2fd629fc336c04ada52c38d (commit) from 4f8633666382e9b518a5af001146c9f8abfb9844 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ce2ab4db04cb2278c451b03a039caa00e4381f6 commit 4ce2ab4db04cb2278c451b03a039caa00e4381f6 Merge: 4f86336 be38bde Author: Brad King AuthorDate: Mon Oct 24 10:05:10 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:05:10 2016 -0400 Merge topic 'separate-compilation' into next be38bde9 Revise topic 'separate-compilation' style https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be38bde9b8cbabd2b2fd629fc336c04ada52c38d commit be38bde9b8cbabd2b2fd629fc336c04ada52c38d Author: Brad King AuthorDate: Mon Oct 24 10:02:14 2016 -0400 Commit: Brad King CommitDate: Mon Oct 24 10:02:14 2016 -0400 Revise topic 'separate-compilation' style diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 50c3e7e..b70074e 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -11,8 +11,8 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmVersion.h" #include "cmState.h" +#include "cmVersion.h" #include diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 5bc953a..56be0cb 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindLibraryCommand.h" -#include "cmState.h" #include "cmGlobalGenerator.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 1b1d58e..9da4cf6 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFunctionCommand.h" -#include "cmSystemTools.h" #include "cmState.h" +#include "cmSystemTools.h" #include "cmake.h" // define the class for function commands diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index 90813ae..01b41e8 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -4,9 +4,9 @@ #include "cmAlgorithms.h" #include "cmGlobalGenerator.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" -#include "cmState.h" // cmGetCMakePropertyCommand bool cmGetCMakePropertyCommand::InitialPass( diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 1651950..cb8bd58 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -3,9 +3,9 @@ #include "cmMacroCommand.h" #include "cmAlgorithms.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" -#include "cmState.h" // define the class for macro commands class cmMacroHelperCommand : public cmCommand diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx index 46e6043..7297193 100644 --- a/Source/cmMarkAsAdvancedCommand.cxx +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMarkAsAdvancedCommand.h" -#include "cmSystemTools.h" #include "cmState.h" +#include "cmSystemTools.h" // cmMarkAsAdvancedCommand bool cmMarkAsAdvancedCommand::InitialPass(std::vector const& args, diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 8343d1c..d6efa2c 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmOptionCommand.h" -#include "cmSystemTools.h" #include "cmState.h" +#include "cmSystemTools.h" // cmOptionCommand bool cmOptionCommand::InitialPass(std::vector const& args, diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index d93df64..9f59db4 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetCommand.h" -#include "cmSystemTools.h" #include "cmState.h" +#include "cmSystemTools.h" // cmSetCommand bool cmSetCommand::InitialPass(std::vector const& args, diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 9d88493..552f918 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -7,8 +7,8 @@ #include "cmSetTargetPropertiesCommand.h" #include "cmSetTestsPropertiesCommand.h" #include "cmSourceFile.h" -#include "cmTest.h" #include "cmState.h" +#include "cmTest.h" cmSetPropertyCommand::cmSetPropertyCommand() { diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index b249013..9626992 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -4,8 +4,8 @@ #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" -#include "cmSystemTools.h" #include "cmState.h" +#include "cmSystemTools.h" const char* cmTargetLinkLibrariesCommand::LinkLibraryTypeNames[3] = { "general", "debug", "optimized" diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index 5ab5c45..6787c8e 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTryRunCommand.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmTryCompileCommand.h" -#include "cmState.h" #include diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 1a42be3..f98d512 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -4,10 +4,10 @@ #include -#include "cmState.h" #include "cmMakefile.h" #include "cmPolicies.h" #include "cmState.h" +#include "cmState.h" #include "cmSystemTools.h" class cmExecutionStatus; ----------------------------------------------------------------------- Summary of changes: Source/cmCPluginAPI.cxx | 2 +- Source/cmFindLibraryCommand.cxx | 2 +- Source/cmFunctionCommand.cxx | 2 +- Source/cmGetCMakePropertyCommand.cxx | 2 +- Source/cmMacroCommand.cxx | 2 +- Source/cmMarkAsAdvancedCommand.cxx | 2 +- Source/cmOptionCommand.cxx | 2 +- Source/cmSetCommand.cxx | 2 +- Source/cmSetPropertyCommand.cxx | 2 +- Source/cmTargetLinkLibrariesCommand.cxx | 2 +- Source/cmTryRunCommand.cxx | 2 +- Source/cmUtilitySourceCommand.cxx | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:05:39 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:05:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-695-g82876f1 Message-ID: <20161024140539.356DAF76CD@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 82876f13bc5d093e450895ee72d4ac4f38988f71 (commit) via 569509f4bfbf44c67e237a01f957fdfe52223cfa (commit) via 6c9b3b5c03b41842d3d79c1bd80691be7e5c6f89 (commit) via 8483dab8e16b9734ac7d2b90b95d474ce8502e40 (commit) via 4fb70919a57582e4ca7c2a9f6bc4f72b38f9af86 (commit) via 608afd4f62f57fe3f9dcac1e9cc94b8bd1adf9c6 (commit) via 64f9c282f3337335c05a062f341fd5155cade51c (commit) via f69e768d94ff5e0238cbb924836737c4ce11a930 (commit) from 4ce2ab4db04cb2278c451b03a039caa00e4381f6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82876f13bc5d093e450895ee72d4ac4f38988f71 commit 82876f13bc5d093e450895ee72d4ac4f38988f71 Merge: 4ce2ab4 569509f Author: Brad King AuthorDate: Mon Oct 24 10:05:36 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:05:36 2016 -0400 Merge topic 'separate-compilation' into next 569509f4 Fix newly discovered clang-tidy issues 6c9b3b5c cmCommand: implement functions in cxx file 8483dab8 bootstrap: Sort source files lexicographically 4fb70919 Create all commands from a single function 608afd4f Separate compilation for commands included in cmBootstrapCommands2 64f9c282 Separate compilation for commands included in cmBootstrapCommands1 f69e768d Separate compilation for commands included in cmCommands https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=569509f4bfbf44c67e237a01f957fdfe52223cfa commit 569509f4bfbf44c67e237a01f957fdfe52223cfa Author: Daniel Pfeifer AuthorDate: Fri Oct 21 21:32:43 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 21:32:43 2016 +0200 Fix newly discovered clang-tidy issues Clang-tidy reports some issues only from the currently compiled source file and its associated header file. Separating the compilation of commands exposed some clang-tidy issues that were not reported previously. Fix them. diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 18118a3..56cf91a 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -270,8 +270,8 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, yet its linker language. */ if ((type == cmStateEnums::SHARED_LIBRARY || type == cmStateEnums::MODULE_LIBRARY) && - (this->Makefile->GetState()->GetGlobalPropertyAsBool( - "TARGET_SUPPORTS_SHARED_LIBS") == false)) { + !this->Makefile->GetState()->GetGlobalPropertyAsBool( + "TARGET_SUPPORTS_SHARED_LIBS")) { std::ostringstream w; w << "ADD_LIBRARY called with " << (type == cmStateEnums::SHARED_LIBRARY ? "SHARED" : "MODULE") diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 4c0b649..7d98e73 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -222,7 +222,7 @@ bool cmConditionEvaluator::GetBooleanValue( double d = strtod(arg.c_str(), &end); if (*end == '\0') { // The whole string is a number. Use C conversion to bool. - return d ? true : false; + return static_cast(d); } } @@ -444,7 +444,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&, if (this->IsKeyword(keyCOMMAND, *arg) && argP1 != newArgs.end()) { cmCommand* command = this->Makefile.GetState()->GetCommand(argP1->c_str()); - this->HandlePredicate(command ? true : false, reducible, arg, newArgs, + this->HandlePredicate(command != CM_NULLPTR, reducible, arg, newArgs, argP1, argP2); } // does a policy exist @@ -456,7 +456,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&, // does a target exist if (this->IsKeyword(keyTARGET, *arg) && argP1 != newArgs.end()) { this->HandlePredicate( - this->Makefile.FindTargetToUse(argP1->GetValue()) ? true : false, + this->Makefile.FindTargetToUse(argP1->GetValue()) != CM_NULLPTR, reducible, arg, newArgs, argP1, argP2); } // does a test exist @@ -464,7 +464,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&, this->Policy64Status != cmPolicies::WARN) { if (this->IsKeyword(keyTEST, *arg) && argP1 != newArgs.end()) { const cmTest* haveTest = this->Makefile.GetTest(argP1->c_str()); - this->HandlePredicate(haveTest ? true : false, reducible, arg, + this->HandlePredicate(haveTest != CM_NULLPTR, reducible, arg, newArgs, argP1, argP2); } } else if (this->Policy64Status == cmPolicies::WARN && @@ -638,8 +638,8 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList& newArgs, bool success = cmSystemTools::FileTimeCompare( arg->GetValue(), (argP2)->GetValue(), &fileIsNewer); this->HandleBinaryOp( - (success == false || fileIsNewer == 1 || fileIsNewer == 0), - reducible, arg, newArgs, argP1, argP2); + (!success || fileIsNewer == 1 || fileIsNewer == 0), reducible, arg, + newArgs, argP1, argP2); } if (argP1 != newArgs.end() && argP2 != newArgs.end() && diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 8dd204b..6b5870b 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2449,18 +2449,14 @@ public: { } - ~cURLEasyGuard(void) + ~cURLEasyGuard() { if (this->Easy) { ::curl_easy_cleanup(this->Easy); } } - inline void release(void) - { - this->Easy = CM_NULLPTR; - return; - } + void release() { this->Easy = CM_NULLPTR; } private: ::CURL* Easy; diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 9e08f30..118c581 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -302,7 +302,7 @@ bool cmFindBase::CheckForVariableInCache() cmState* state = this->Makefile->GetState(); const char* cacheEntry = state->GetCacheEntryValue(this->VariableName); bool found = !cmSystemTools::IsNOTFOUND(cacheValue); - bool cached = cacheEntry ? true : false; + bool cached = cacheEntry != CM_NULLPTR; if (found) { // If the user specifies the entry on the command line without a // type we should add the type and docstring but keep the diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 2784e16..373b728 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -673,8 +673,8 @@ bool cmFindPackageCommand::HandlePackageMode() bool configFileSetFOUNDFalse = false; if (fileFound) { - if ((this->Makefile->IsDefinitionSet(foundVar)) && - (this->Makefile->IsOn(foundVar) == false)) { + if (this->Makefile->IsDefinitionSet(foundVar) && + !this->Makefile->IsOn(foundVar)) { // by removing Foo_FOUND here if it is FALSE, we don't really change // the situation for the Config file which is about to be included, // but we make it possible to detect later on whether the Config file @@ -693,8 +693,8 @@ bool cmFindPackageCommand::HandlePackageMode() found = true; // Check whether the Config file has set Foo_FOUND to FALSE: - if ((this->Makefile->IsDefinitionSet(foundVar)) && - (this->Makefile->IsOn(foundVar) == false)) { + if (this->Makefile->IsDefinitionSet(foundVar) && + !this->Makefile->IsOn(foundVar)) { // we get here if the Config file has set Foo_FOUND actively to FALSE found = false; configFileSetFOUNDFalse = true; @@ -1416,8 +1416,7 @@ bool cmFindPackageCommand::CheckVersion(std::string const& config_file) // Look for foo-config-version.cmake std::string version_file = version_file_base; version_file += "-version.cmake"; - if ((haveResult == false) && - (cmSystemTools::FileExists(version_file.c_str(), true))) { + if (!haveResult && cmSystemTools::FileExists(version_file.c_str(), true)) { result = this->CheckVersionFile(version_file, version); haveResult = true; } @@ -1425,14 +1424,13 @@ bool cmFindPackageCommand::CheckVersion(std::string const& config_file) // Look for fooConfigVersion.cmake version_file = version_file_base; version_file += "Version.cmake"; - if ((haveResult == false) && - (cmSystemTools::FileExists(version_file.c_str(), true))) { + if (!haveResult && cmSystemTools::FileExists(version_file.c_str(), true)) { result = this->CheckVersionFile(version_file, version); haveResult = true; } // If no version was requested a versionless package is acceptable. - if ((haveResult == false) && (this->Version.empty())) { + if (!haveResult && this->Version.empty()) { result = true; } diff --git a/Source/cmHexFileConverter.cxx b/Source/cmHexFileConverter.cxx index 6f3ea6a..db855d2 100644 --- a/Source/cmHexFileConverter.cxx +++ b/Source/cmHexFileConverter.cxx @@ -206,7 +206,7 @@ bool cmHexFileConverter::TryConvert(const char* inFileName, } else if (type == IntelHex) { success = ConvertIntelHexLine(buf, outFile); } - if (success == false) { + if (!success) { break; } } diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index 12b3aa8..82d2ee3 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -64,7 +64,7 @@ public: void FinalPass() CM_OVERRIDE; bool HasFinalPass() const CM_OVERRIDE { - return this->info.FinalPass ? true : false; + return this->info.FinalPass != CM_NULLPTR; } /** https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c9b3b5c03b41842d3d79c1bd80691be7e5c6f89 commit 6c9b3b5c03b41842d3d79c1bd80691be7e5c6f89 Author: Daniel Pfeifer AuthorDate: Thu Oct 20 00:29:18 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:51 2016 +0200 cmCommand: implement functions in cxx file diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index b2617ae..09c0acf 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -386,6 +386,8 @@ set(SRCS cmake.cxx cmake.h + cmCommand.cxx + cmCommand.h cmCommands.cxx cmCommands.h cmAddCompileOptionsCommand.cxx diff --git a/Source/cmCommand.cxx b/Source/cmCommand.cxx new file mode 100644 index 0000000..3c839de --- /dev/null +++ b/Source/cmCommand.cxx @@ -0,0 +1,48 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmCommand.h" + +bool cmCommand::InvokeInitialPass(const std::vector& args, + cmExecutionStatus& status) +{ + std::vector expandedArguments; + if (!this->Makefile->ExpandArguments(args, expandedArguments)) { + // There was an error expanding arguments. It was already + // reported, so we can skip this command without error. + return true; + } + return this->InitialPass(expandedArguments, status); +} + +const char* cmCommand::GetError() +{ + if (this->Error.empty()) { + this->Error = this->GetName(); + this->Error += " unknown error."; + } + return this->Error.c_str(); +} + +void cmCommand::SetError(const std::string& e) +{ + this->Error = this->GetName(); + this->Error += " "; + this->Error += e; +} + +bool cmCommand::Disallowed(cmPolicies::PolicyID pol, const char* e) +{ + switch (this->Makefile->GetPolicyStatus(pol)) { + case cmPolicies::WARN: + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, + cmPolicies::GetPolicyWarning(pol)); + case cmPolicies::OLD: + return false; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::NEW: + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e); + break; + } + return true; +} diff --git a/Source/cmCommand.h b/Source/cmCommand.h index d8e337d..9299c71 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -28,9 +28,9 @@ public: * Construct the command. By default it is enabled with no makefile. */ cmCommand() + : Makefile(CM_NULLPTR) + , Enabled(true) { - this->Makefile = CM_NULLPTR; - this->Enabled = true; } /** @@ -50,16 +50,7 @@ public: * arguments and then invokes the InitialPass. */ virtual bool InvokeInitialPass(const std::vector& args, - cmExecutionStatus& status) - { - std::vector expandedArguments; - if (!this->Makefile->ExpandArguments(args, expandedArguments)) { - // There was an error expanding arguments. It was already - // reported, so we can skip this command without error. - return true; - } - return this->InitialPass(expandedArguments, status); - } + cmExecutionStatus& status); /** * This is called when the command is first encountered in @@ -127,42 +118,15 @@ public: /** * Return the last error string. */ - const char* GetError() - { - if (this->Error.empty()) { - this->Error = this->GetName(); - this->Error += " unknown error."; - } - return this->Error.c_str(); - } + const char* GetError(); /** * Set the error message */ - void SetError(const std::string& e) - { - this->Error = this->GetName(); - this->Error += " "; - this->Error += e; - } + void SetError(const std::string& e); /** Check if the command is disallowed by a policy. */ - bool Disallowed(cmPolicies::PolicyID pol, const char* e) - { - switch (this->Makefile->GetPolicyStatus(pol)) { - case cmPolicies::WARN: - this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, - cmPolicies::GetPolicyWarning(pol)); - case cmPolicies::OLD: - return false; - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::REQUIRED_ALWAYS: - case cmPolicies::NEW: - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e); - break; - } - return true; - } + bool Disallowed(cmPolicies::PolicyID pol, const char* e); protected: cmMakefile* Makefile; diff --git a/bootstrap b/bootstrap index ab76526..4ce0dee 100755 --- a/bootstrap +++ b/bootstrap @@ -254,6 +254,7 @@ CMAKE_CXX_SOURCES="\ cmCMakePolicyCommand \ cmCPackPropertiesGenerator \ cmCacheManager \ + cmCommand \ cmCommandArgumentLexer \ cmCommandArgumentParser \ cmCommandArgumentParserHelper \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8483dab8e16b9734ac7d2b90b95d474ce8502e40 commit 8483dab8e16b9734ac7d2b90b95d474ce8502e40 Author: Daniel Pfeifer AuthorDate: Wed Oct 19 23:19:41 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:51 2016 +0200 bootstrap: Sort source files lexicographically diff --git a/bootstrap b/bootstrap index eb927d5..ab76526 100755 --- a/bootstrap +++ b/bootstrap @@ -240,91 +240,6 @@ CMAKE_UNUSED_SOURCES="\ " CMAKE_CXX_SOURCES="\ - cmake \ - cmakemain \ - cmcmd \ - cmCommandArgumentLexer \ - cmCommandArgumentParser \ - cmCommandArgumentParserHelper \ - cmCommonTargetGenerator \ - cmCPackPropertiesGenerator \ - cmDefinitions \ - cmDepends \ - cmDependsC \ - cmDocumentationFormatter \ - cmPolicies \ - cmProperty \ - cmPropertyMap \ - cmPropertyDefinition \ - cmPropertyDefinitionMap \ - cmMakefile \ - cmMessenger \ - cmExportBuildFileGenerator \ - cmExportFileGenerator \ - cmExportInstallFileGenerator \ - cmExportTryCompileFileGenerator \ - cmExportSet \ - cmExportSetMap \ - cmExternalMakefileProjectGenerator \ - cmGeneratorExpressionEvaluationFile \ - cmGeneratedFileStream \ - cmGeneratorTarget \ - cmGeneratorExpressionContext \ - cmGeneratorExpressionDAGChecker \ - cmGeneratorExpressionEvaluator \ - cmGeneratorExpressionLexer \ - cmGeneratorExpressionNode \ - cmGeneratorExpressionParser \ - cmGeneratorExpression \ - cmGlobalCommonGenerator \ - cmGlobalGenerator \ - cmInstallDirectoryGenerator \ - cmLocalCommonGenerator \ - cmLocalGenerator \ - cmRulePlaceholderExpander \ - cmInstalledFile \ - cmInstallGenerator \ - cmInstallExportGenerator \ - cmInstallFilesGenerator \ - cmInstallScriptGenerator \ - cmInstallTargetGenerator \ - cmScriptGenerator \ - cmSourceFile \ - cmSourceFileLocation \ - cmState \ - cmStateDirectory \ - cmStateSnapshot \ - cmSystemTools \ - cmTestGenerator \ - cmVersion \ - cmFileTimeComparison \ - cmGlobalUnixMakefileGenerator3 \ - cmLocalUnixMakefileGenerator3 \ - cmLinkLineComputer \ - cmMSVC60LinkLineComputer \ - cmMakefileExecutableTargetGenerator \ - cmMakefileLibraryTargetGenerator \ - cmMakefileTargetGenerator \ - cmMakefileUtilityTargetGenerator \ - cmOutputConverter \ - cmOSXBundleGenerator \ - cmNewLineStyle \ - cmCommands \ - cmTarget \ - cmTargetPropertyComputer \ - cmTest \ - cmCustomCommand \ - cmCustomCommandGenerator \ - cmCacheManager \ - cmListFileCache \ - cmComputeLinkDepends \ - cmComputeLinkInformation \ - cmOrderDirectories \ - cmComputeTargetDepends \ - cmComputeComponentGraph \ - cmExprLexer \ - cmExprParser \ - cmExprParserHelper \ cmAddCustomCommandCommand \ cmAddCustomTargetCommand \ cmAddDefinitionsCommand \ @@ -337,12 +252,30 @@ CMAKE_CXX_SOURCES="\ cmBuildCommand \ cmCMakeMinimumRequired \ cmCMakePolicyCommand \ + cmCPackPropertiesGenerator \ + cmCacheManager \ + cmCommandArgumentLexer \ + cmCommandArgumentParser \ + cmCommandArgumentParserHelper \ cmCommandArgumentsHelper \ + cmCommands \ + cmCommonTargetGenerator \ + cmComputeComponentGraph \ + cmComputeLinkDepends \ + cmComputeLinkInformation \ + cmComputeTargetDepends \ + cmConditionEvaluator \ cmConfigureFileCommand \ cmContinueCommand \ cmCoreTryCompile \ cmCreateTestSourceList \ + cmCustomCommand \ + cmCustomCommandGenerator \ cmDefinePropertyCommand \ + cmDefinitions \ + cmDepends \ + cmDependsC \ + cmDocumentationFormatter \ cmElseCommand \ cmEnableLanguageCommand \ cmEnableTestingCommand \ @@ -353,7 +286,19 @@ CMAKE_CXX_SOURCES="\ cmEndWhileCommand \ cmExecProgramCommand \ cmExecuteProcessCommand \ + cmExpandedCommandArgument \ + cmExportBuildFileGenerator \ + cmExportFileGenerator \ + cmExportInstallFileGenerator \ + cmExportSet \ + cmExportSetMap \ + cmExportTryCompileFileGenerator \ + cmExprLexer \ + cmExprParser \ + cmExprParserHelper \ + cmExternalMakefileProjectGenerator \ cmFileCommand \ + cmFileTimeComparison \ cmFindBase \ cmFindCommon \ cmFindFileCommand \ @@ -363,11 +308,16 @@ CMAKE_CXX_SOURCES="\ cmFindProgramCommand \ cmForEachCommand \ cmFunctionCommand \ - cmParseArgumentsCommand \ - cmPathLabel \ - cmSearchPath \ - cmConditionEvaluator \ - cmExpandedCommandArgument \ + cmGeneratedFileStream \ + cmGeneratorExpression \ + cmGeneratorExpressionContext \ + cmGeneratorExpressionDAGChecker \ + cmGeneratorExpressionEvaluationFile \ + cmGeneratorExpressionEvaluator \ + cmGeneratorExpressionLexer \ + cmGeneratorExpressionNode \ + cmGeneratorExpressionParser \ + cmGeneratorTarget \ cmGetCMakePropertyCommand \ cmGetDirectoryPropertyCommand \ cmGetFilenameComponentCommand \ @@ -375,6 +325,9 @@ CMAKE_CXX_SOURCES="\ cmGetSourceFilePropertyCommand \ cmGetTargetPropertyCommand \ cmGetTestPropertyCommand \ + cmGlobalCommonGenerator \ + cmGlobalGenerator \ + cmGlobalUnixMakefileGenerator3 \ cmHexFileConverter \ cmIfCommand \ cmIncludeCommand \ @@ -382,18 +335,51 @@ CMAKE_CXX_SOURCES="\ cmIncludeRegularExpressionCommand \ cmInstallCommand \ cmInstallCommandArguments \ + cmInstallDirectoryGenerator \ + cmInstallExportGenerator \ cmInstallFilesCommand \ + cmInstallFilesGenerator \ + cmInstallGenerator \ + cmInstallScriptGenerator \ + cmInstallTargetGenerator \ cmInstallTargetsCommand \ + cmInstalledFile \ cmLinkDirectoriesCommand \ + cmLinkLineComputer \ cmListCommand \ + cmListFileCache \ + cmLocalCommonGenerator \ + cmLocalGenerator \ + cmLocalUnixMakefileGenerator3 \ + cmMSVC60LinkLineComputer \ cmMacroCommand \ cmMakeDirectoryCommand \ + cmMakefile \ + cmMakefileExecutableTargetGenerator \ + cmMakefileLibraryTargetGenerator \ + cmMakefileTargetGenerator \ + cmMakefileUtilityTargetGenerator \ cmMarkAsAdvancedCommand \ cmMathCommand \ cmMessageCommand \ + cmMessenger \ + cmNewLineStyle \ + cmOSXBundleGenerator \ cmOptionCommand \ + cmOrderDirectories \ + cmOutputConverter \ + cmParseArgumentsCommand \ + cmPathLabel \ + cmPolicies \ cmProjectCommand \ + cmProperty \ + cmPropertyDefinition \ + cmPropertyDefinitionMap \ + cmPropertyMap \ cmReturnCommand \ + cmRulePlaceholderExpander \ + cmScriptGenerator \ + cmSearchPath \ cmSeparateArgumentsCommand \ cmSetCommand \ cmSetDirectoryPropertiesCommand \ @@ -402,14 +388,28 @@ CMAKE_CXX_SOURCES="\ cmSetTargetPropertiesCommand \ cmSetTestsPropertiesCommand \ cmSiteNameCommand \ + cmSourceFile \ + cmSourceFileLocation \ + cmState \ + cmStateDirectory \ + cmStateSnapshot \ cmStringCommand \ cmSubdirCommand \ + cmSystemTools \ + cmTarget \ cmTargetLinkLibrariesCommand \ + cmTargetPropertyComputer \ + cmTest \ + cmTestGenerator \ cmTimestamp \ cmTryCompileCommand \ cmTryRunCommand \ cmUnsetCommand \ + cmVersion \ cmWhileCommand \ + cmake \ + cmakemain \ + cmcmd \ " if ${cmake_system_mingw}; then https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4fb70919a57582e4ca7c2a9f6bc4f72b38f9af86 commit 4fb70919a57582e4ca7c2a9f6bc4f72b38f9af86 Author: Daniel Pfeifer AuthorDate: Wed Oct 19 23:17:10 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:51 2016 +0200 Create all commands from a single function diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 5c8636e..b2617ae 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -159,14 +159,10 @@ endif() set(SRCS cmArchiveWrite.cxx cmBase32.cxx - cmBootstrapCommands1.cxx - cmBootstrapCommands2.cxx cmCacheManager.cxx cmCacheManager.h - "${CMAKE_CURRENT_BINARY_DIR}/cmCommands.cxx" cmCLocaleEnvironmentScope.h cmCLocaleEnvironmentScope.cxx - cmCommands.h cmCommandArgumentLexer.cxx cmCommandArgumentParser.cxx cmCommandArgumentParserHelper.cxx @@ -390,6 +386,10 @@ set(SRCS cmake.cxx cmake.h + cmCommands.cxx + cmCommands.h + cmAddCompileOptionsCommand.cxx + cmAddCompileOptionsCommand.h cmAddCustomCommandCommand.cxx cmAddCustomCommandCommand.h cmAddCustomTargetCommand.cxx @@ -406,10 +406,16 @@ set(SRCS cmAddSubDirectoryCommand.h cmAddTestCommand.cxx cmAddTestCommand.h + cmAuxSourceDirectoryCommand.cxx + cmAuxSourceDirectoryCommand.h cmBreakCommand.cxx cmBreakCommand.h cmBuildCommand.cxx cmBuildCommand.h + cmBuildNameCommand.cxx + cmBuildNameCommand.h + cmCMakeHostSystemInformationCommand.cxx + cmCMakeHostSystemInformationCommand.h cmCMakeMinimumRequired.cxx cmCMakeMinimumRequired.h cmCMakePolicyCommand.cxx @@ -430,6 +436,8 @@ set(SRCS cmDefinePropertyCommand.h cmElseCommand.cxx cmElseCommand.h + cmElseIfCommand.cxx + cmElseIfCommand.h cmEnableLanguageCommand.cxx cmEnableLanguageCommand.h cmEnableTestingCommand.cxx @@ -450,6 +458,12 @@ set(SRCS cmExecuteProcessCommand.h cmExpandedCommandArgument.cxx cmExpandedCommandArgument.h + cmExportCommand.cxx + cmExportCommand.h + cmExportLibraryDependenciesCommand.cxx + cmExportLibraryDependenciesCommand.h + cmFLTKWrapUICommand.cxx + cmFLTKWrapUICommand.h cmFileCommand.cxx cmFileCommand.h cmFindBase.cxx @@ -492,6 +506,8 @@ set(SRCS cmIncludeCommand.h cmIncludeDirectoryCommand.cxx cmIncludeDirectoryCommand.h + cmIncludeExternalMSProjectCommand.cxx + cmIncludeExternalMSProjectCommand.h cmIncludeRegularExpressionCommand.cxx cmIncludeRegularExpressionCommand.h cmInstallCommand.cxx @@ -500,12 +516,20 @@ set(SRCS cmInstallCommandArguments.h cmInstallFilesCommand.cxx cmInstallFilesCommand.h + cmInstallProgramsCommand.cxx + cmInstallProgramsCommand.h cmInstallTargetsCommand.cxx cmInstallTargetsCommand.h cmLinkDirectoriesCommand.cxx cmLinkDirectoriesCommand.h + cmLinkLibrariesCommand.cxx + cmLinkLibrariesCommand.h cmListCommand.cxx cmListCommand.h + cmLoadCacheCommand.cxx + cmLoadCacheCommand.h + cmLoadCommandCommand.cxx + cmLoadCommandCommand.h cmMacroCommand.cxx cmMacroCommand.h cmMakeDirectoryCommand.cxx @@ -518,12 +542,22 @@ set(SRCS cmMessageCommand.h cmOptionCommand.cxx cmOptionCommand.h + cmOutputRequiredFilesCommand.cxx + cmOutputRequiredFilesCommand.h cmParseArgumentsCommand.cxx cmParseArgumentsCommand.h cmPathLabel.cxx cmPathLabel.h cmProjectCommand.cxx cmProjectCommand.h + cmQTWrapCPPCommand.cxx + cmQTWrapCPPCommand.h + cmQTWrapUICommand.cxx + cmQTWrapUICommand.h + cmRemoveCommand.cxx + cmRemoveCommand.h + cmRemoveDefinitionsCommand.cxx + cmRemoveDefinitionsCommand.h cmReturnCommand.cxx cmReturnCommand.h cmSearchPath.cxx @@ -544,12 +578,28 @@ set(SRCS cmSetTestsPropertiesCommand.h cmSiteNameCommand.cxx cmSiteNameCommand.h + cmSourceGroupCommand.cxx + cmSourceGroupCommand.h cmStringCommand.cxx cmStringCommand.h cmSubdirCommand.cxx cmSubdirCommand.h + cmSubdirDependsCommand.cxx + cmSubdirDependsCommand.h + cmTargetCompileDefinitionsCommand.cxx + cmTargetCompileDefinitionsCommand.h + cmTargetCompileFeaturesCommand.cxx + cmTargetCompileFeaturesCommand.h + cmTargetCompileOptionsCommand.cxx + cmTargetCompileOptionsCommand.h + cmTargetIncludeDirectoriesCommand.cxx + cmTargetIncludeDirectoriesCommand.h cmTargetLinkLibrariesCommand.cxx cmTargetLinkLibrariesCommand.h + cmTargetPropCommandBase.cxx + cmTargetPropCommandBase.h + cmTargetSourcesCommand.cxx + cmTargetSourcesCommand.h cmTimestamp.cxx cmTimestamp.h cmTryCompileCommand.cxx @@ -558,8 +608,18 @@ set(SRCS cmTryRunCommand.h cmUnsetCommand.cxx cmUnsetCommand.h + cmUseMangledMesaCommand.cxx + cmUseMangledMesaCommand.h + cmUtilitySourceCommand.cxx + cmUtilitySourceCommand.h + cmVariableRequiresCommand.cxx + cmVariableRequiresCommand.h + cmVariableWatchCommand.cxx + cmVariableWatchCommand.h cmWhileCommand.cxx cmWhileCommand.h + cmWriteFileCommand.cxx + cmWriteFileCommand.h cm_auto_ptr.hxx cm_get_date.h @@ -572,47 +632,6 @@ set(SRCS cm_codecvt.cxx ) -set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.h\"\n") -list(APPEND SRCS cmTargetPropCommandBase.cxx cmTargetPropCommandBase.h) -set(NEW_COMMANDS "") -foreach(command_file - cmAddCompileOptionsCommand - cmAuxSourceDirectoryCommand - cmBuildNameCommand - cmCMakeHostSystemInformationCommand - cmElseIfCommand - cmExportCommand - cmExportLibraryDependenciesCommand - cmFLTKWrapUICommand - cmIncludeExternalMSProjectCommand - cmInstallProgramsCommand - cmLinkLibrariesCommand - cmLoadCacheCommand - cmLoadCommandCommand - cmOutputRequiredFilesCommand - cmQTWrapCPPCommand - cmQTWrapUICommand - cmRemoveCommand - cmRemoveDefinitionsCommand - cmSourceGroupCommand - cmSubdirDependsCommand - cmTargetCompileDefinitionsCommand - cmTargetCompileFeaturesCommand - cmTargetCompileOptionsCommand - cmTargetIncludeDirectoriesCommand - cmTargetSourcesCommand - cmUseMangledMesaCommand - cmUtilitySourceCommand - cmVariableRequiresCommand - cmVariableWatchCommand - cmWriteFileCommand - ) - set(COMMAND_INCLUDES "${COMMAND_INCLUDES}#include \"${command_file}.h\"\n") - set(NEW_COMMANDS "${NEW_COMMANDS}commands.push_back(new ${command_file});\n") - list(APPEND SRCS ${command_file}.cxx ${command_file}.h) -endforeach() -configure_file(cmCommands.cxx.in ${CMAKE_CURRENT_BINARY_DIR}/cmCommands.cxx @ONLY) - # Kdevelop only works on UNIX and not windows if(UNIX) set(SRCS ${SRCS} cmGlobalKdevelopGenerator.cxx) diff --git a/Source/cmBootstrapCommands1.cxx b/Source/cmBootstrapCommands1.cxx deleted file mode 100644 index afb7ad8..0000000 --- a/Source/cmBootstrapCommands1.cxx +++ /dev/null @@ -1,87 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -// This file is used to compile all the commands -// that CMake knows about at compile time. -// This is sort of a boot strapping approach since you would -// like to have CMake to build CMake. -#include "cmAddCustomCommandCommand.h" -#include "cmAddCustomTargetCommand.h" -#include "cmAddDefinitionsCommand.h" -#include "cmAddDependenciesCommand.h" -#include "cmAddExecutableCommand.h" -#include "cmAddLibraryCommand.h" -#include "cmAddSubDirectoryCommand.h" -#include "cmAddTestCommand.h" -#include "cmBreakCommand.h" -#include "cmBuildCommand.h" -#include "cmCMakeMinimumRequired.h" -#include "cmCMakePolicyCommand.h" -#include "cmCommandArgumentsHelper.h" -#include "cmCommands.h" -#include "cmConfigureFileCommand.h" -#include "cmContinueCommand.h" -#include "cmCoreTryCompile.h" -#include "cmCreateTestSourceList.h" -#include "cmDefinePropertyCommand.h" -#include "cmElseCommand.h" -#include "cmEnableLanguageCommand.h" -#include "cmEnableTestingCommand.h" -#include "cmEndForEachCommand.h" -#include "cmEndFunctionCommand.h" -#include "cmEndIfCommand.h" -#include "cmEndMacroCommand.h" -#include "cmEndWhileCommand.h" -#include "cmExecProgramCommand.h" -#include "cmExecuteProcessCommand.h" -#include "cmFileCommand.h" -#include "cmFindBase.h" -#include "cmFindCommon.h" -#include "cmFindFileCommand.h" -#include "cmFindLibraryCommand.h" -#include "cmFindPackageCommand.h" -#include "cmFindPathCommand.h" -#include "cmFindProgramCommand.h" -#include "cmForEachCommand.h" -#include "cmFunctionCommand.h" -#include "cmParseArgumentsCommand.h" -#include "cmPathLabel.h" -#include "cmSearchPath.h" - -void GetBootstrapCommands1(std::vector& commands) -{ - commands.push_back(new cmAddCustomCommandCommand); - commands.push_back(new cmAddCustomTargetCommand); - commands.push_back(new cmAddDefinitionsCommand); - commands.push_back(new cmAddDependenciesCommand); - commands.push_back(new cmAddExecutableCommand); - commands.push_back(new cmAddLibraryCommand); - commands.push_back(new cmAddSubDirectoryCommand); - commands.push_back(new cmAddTestCommand); - commands.push_back(new cmBreakCommand); - commands.push_back(new cmBuildCommand); - commands.push_back(new cmCMakeMinimumRequired); - commands.push_back(new cmCMakePolicyCommand); - commands.push_back(new cmConfigureFileCommand); - commands.push_back(new cmContinueCommand); - commands.push_back(new cmCreateTestSourceList); - commands.push_back(new cmDefinePropertyCommand); - commands.push_back(new cmElseCommand); - commands.push_back(new cmEnableLanguageCommand); - commands.push_back(new cmEnableTestingCommand); - commands.push_back(new cmEndForEachCommand); - commands.push_back(new cmEndFunctionCommand); - commands.push_back(new cmEndIfCommand); - commands.push_back(new cmEndMacroCommand); - commands.push_back(new cmEndWhileCommand); - commands.push_back(new cmExecProgramCommand); - commands.push_back(new cmExecuteProcessCommand); - commands.push_back(new cmFileCommand); - commands.push_back(new cmFindFileCommand); - commands.push_back(new cmFindLibraryCommand); - commands.push_back(new cmFindPackageCommand); - commands.push_back(new cmFindPathCommand); - commands.push_back(new cmFindProgramCommand); - commands.push_back(new cmForEachCommand); - commands.push_back(new cmFunctionCommand); - commands.push_back(new cmParseArgumentsCommand); -} diff --git a/Source/cmBootstrapCommands2.cxx b/Source/cmBootstrapCommands2.cxx deleted file mode 100644 index 972d5b3..0000000 --- a/Source/cmBootstrapCommands2.cxx +++ /dev/null @@ -1,94 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -// This file is used to compile all the commands -// that CMake knows about at compile time. -// This is sort of a boot strapping approach since you would -// like to have CMake to build CMake. -#include "cmCommands.h" -#include "cmConditionEvaluator.h" -#include "cmExpandedCommandArgument.h" -#include "cmGetCMakePropertyCommand.h" -#include "cmGetDirectoryPropertyCommand.h" -#include "cmGetFilenameComponentCommand.h" -#include "cmGetPropertyCommand.h" -#include "cmGetSourceFilePropertyCommand.h" -#include "cmGetTargetPropertyCommand.h" -#include "cmGetTestPropertyCommand.h" -#include "cmHexFileConverter.h" -#include "cmIfCommand.h" -#include "cmIncludeCommand.h" -#include "cmIncludeDirectoryCommand.h" -#include "cmIncludeRegularExpressionCommand.h" -#include "cmInstallCommand.h" -#include "cmInstallCommandArguments.h" -#include "cmInstallFilesCommand.h" -#include "cmInstallTargetsCommand.h" -#include "cmLinkDirectoriesCommand.h" -#include "cmListCommand.h" -#include "cmMacroCommand.h" -#include "cmMakeDirectoryCommand.h" -#include "cmMarkAsAdvancedCommand.h" -#include "cmMathCommand.h" -#include "cmMessageCommand.h" -#include "cmOptionCommand.h" -#include "cmProjectCommand.h" -#include "cmReturnCommand.h" -#include "cmSeparateArgumentsCommand.h" -#include "cmSetCommand.h" -#include "cmSetDirectoryPropertiesCommand.h" -#include "cmSetPropertyCommand.h" -#include "cmSetSourceFilesPropertiesCommand.h" -#include "cmSetTargetPropertiesCommand.h" -#include "cmSetTestsPropertiesCommand.h" -#include "cmSiteNameCommand.h" -#include "cmStringCommand.h" -#include "cmSubdirCommand.h" -#include "cmTargetLinkLibrariesCommand.h" -#include "cmTimestamp.h" -#include "cmTryCompileCommand.h" -#include "cmTryRunCommand.h" -#include "cmUnsetCommand.h" -#include "cmWhileCommand.h" - -void GetBootstrapCommands2(std::vector& commands) -{ - commands.push_back(new cmGetCMakePropertyCommand); - commands.push_back(new cmGetDirectoryPropertyCommand); - commands.push_back(new cmGetFilenameComponentCommand); - commands.push_back(new cmGetPropertyCommand); - commands.push_back(new cmGetSourceFilePropertyCommand); - commands.push_back(new cmGetTargetPropertyCommand); - commands.push_back(new cmIfCommand); - commands.push_back(new cmIncludeCommand); - commands.push_back(new cmIncludeDirectoryCommand); - commands.push_back(new cmIncludeRegularExpressionCommand); - commands.push_back(new cmInstallCommand); - commands.push_back(new cmInstallFilesCommand); - commands.push_back(new cmInstallTargetsCommand); - commands.push_back(new cmLinkDirectoriesCommand); - commands.push_back(new cmListCommand); - commands.push_back(new cmMacroCommand); - commands.push_back(new cmMakeDirectoryCommand); - commands.push_back(new cmMarkAsAdvancedCommand); - commands.push_back(new cmMathCommand); - commands.push_back(new cmMessageCommand); - commands.push_back(new cmOptionCommand); - commands.push_back(new cmProjectCommand); - commands.push_back(new cmReturnCommand); - commands.push_back(new cmSeparateArgumentsCommand); - commands.push_back(new cmSetCommand); - commands.push_back(new cmSetDirectoryPropertiesCommand); - commands.push_back(new cmSetPropertyCommand); - commands.push_back(new cmSetSourceFilesPropertiesCommand); - commands.push_back(new cmSetTargetPropertiesCommand); - commands.push_back(new cmGetTestPropertyCommand); - commands.push_back(new cmSetTestsPropertiesCommand); - commands.push_back(new cmSiteNameCommand); - commands.push_back(new cmStringCommand); - commands.push_back(new cmSubdirCommand); - commands.push_back(new cmTargetLinkLibrariesCommand); - commands.push_back(new cmTryCompileCommand); - commands.push_back(new cmTryRunCommand); - commands.push_back(new cmUnsetCommand); - commands.push_back(new cmWhileCommand); -} diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx new file mode 100644 index 0000000..0697d4b --- /dev/null +++ b/Source/cmCommands.cxx @@ -0,0 +1,238 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmCommands.h" + +#include "cmAddCustomCommandCommand.h" +#include "cmAddCustomTargetCommand.h" +#include "cmAddDefinitionsCommand.h" +#include "cmAddDependenciesCommand.h" +#include "cmAddExecutableCommand.h" +#include "cmAddLibraryCommand.h" +#include "cmAddSubDirectoryCommand.h" +#include "cmAddTestCommand.h" +#include "cmBreakCommand.h" +#include "cmBuildCommand.h" +#include "cmCMakeMinimumRequired.h" +#include "cmCMakePolicyCommand.h" +#include "cmCommandArgumentsHelper.h" +#include "cmConditionEvaluator.h" +#include "cmConfigureFileCommand.h" +#include "cmContinueCommand.h" +#include "cmCoreTryCompile.h" +#include "cmCreateTestSourceList.h" +#include "cmDefinePropertyCommand.h" +#include "cmElseCommand.h" +#include "cmEnableLanguageCommand.h" +#include "cmEnableTestingCommand.h" +#include "cmEndForEachCommand.h" +#include "cmEndFunctionCommand.h" +#include "cmEndIfCommand.h" +#include "cmEndMacroCommand.h" +#include "cmEndWhileCommand.h" +#include "cmExecProgramCommand.h" +#include "cmExecuteProcessCommand.h" +#include "cmExpandedCommandArgument.h" +#include "cmFileCommand.h" +#include "cmFindBase.h" +#include "cmFindCommon.h" +#include "cmFindFileCommand.h" +#include "cmFindLibraryCommand.h" +#include "cmFindPackageCommand.h" +#include "cmFindPathCommand.h" +#include "cmFindProgramCommand.h" +#include "cmForEachCommand.h" +#include "cmFunctionCommand.h" +#include "cmGetCMakePropertyCommand.h" +#include "cmGetDirectoryPropertyCommand.h" +#include "cmGetFilenameComponentCommand.h" +#include "cmGetPropertyCommand.h" +#include "cmGetSourceFilePropertyCommand.h" +#include "cmGetTargetPropertyCommand.h" +#include "cmGetTestPropertyCommand.h" +#include "cmHexFileConverter.h" +#include "cmIfCommand.h" +#include "cmIncludeCommand.h" +#include "cmIncludeDirectoryCommand.h" +#include "cmIncludeRegularExpressionCommand.h" +#include "cmInstallCommand.h" +#include "cmInstallCommandArguments.h" +#include "cmInstallFilesCommand.h" +#include "cmInstallTargetsCommand.h" +#include "cmLinkDirectoriesCommand.h" +#include "cmListCommand.h" +#include "cmMacroCommand.h" +#include "cmMakeDirectoryCommand.h" +#include "cmMarkAsAdvancedCommand.h" +#include "cmMathCommand.h" +#include "cmMessageCommand.h" +#include "cmOptionCommand.h" +#include "cmParseArgumentsCommand.h" +#include "cmPathLabel.h" +#include "cmProjectCommand.h" +#include "cmReturnCommand.h" +#include "cmSearchPath.h" +#include "cmSeparateArgumentsCommand.h" +#include "cmSetCommand.h" +#include "cmSetDirectoryPropertiesCommand.h" +#include "cmSetPropertyCommand.h" +#include "cmSetSourceFilesPropertiesCommand.h" +#include "cmSetTargetPropertiesCommand.h" +#include "cmSetTestsPropertiesCommand.h" +#include "cmSiteNameCommand.h" +#include "cmStringCommand.h" +#include "cmSubdirCommand.h" +#include "cmTargetLinkLibrariesCommand.h" +#include "cmTimestamp.h" +#include "cmTryCompileCommand.h" +#include "cmTryRunCommand.h" +#include "cmUnsetCommand.h" +#include "cmWhileCommand.h" + +#if defined(CMAKE_BUILD_WITH_CMAKE) +#include "cmAddCompileOptionsCommand.h" +#include "cmAuxSourceDirectoryCommand.h" +#include "cmBuildNameCommand.h" +#include "cmCMakeHostSystemInformationCommand.h" +#include "cmElseIfCommand.h" +#include "cmExportCommand.h" +#include "cmExportLibraryDependenciesCommand.h" +#include "cmFLTKWrapUICommand.h" +#include "cmIncludeExternalMSProjectCommand.h" +#include "cmInstallProgramsCommand.h" +#include "cmLinkLibrariesCommand.h" +#include "cmLoadCacheCommand.h" +#include "cmLoadCommandCommand.h" +#include "cmOutputRequiredFilesCommand.h" +#include "cmQTWrapCPPCommand.h" +#include "cmQTWrapUICommand.h" +#include "cmRemoveCommand.h" +#include "cmRemoveDefinitionsCommand.h" +#include "cmSourceGroupCommand.h" +#include "cmSubdirDependsCommand.h" +#include "cmTargetCompileDefinitionsCommand.h" +#include "cmTargetCompileFeaturesCommand.h" +#include "cmTargetCompileOptionsCommand.h" +#include "cmTargetIncludeDirectoriesCommand.h" +#include "cmTargetPropCommandBase.h" +#include "cmTargetSourcesCommand.h" +#include "cmUseMangledMesaCommand.h" +#include "cmUtilitySourceCommand.h" +#include "cmVariableRequiresCommand.h" +#include "cmVariableWatchCommand.h" +#include "cmWriteFileCommand.h" +#endif + +std::vector GetPredefinedCommands() +{ + std::vector commands; + + commands.push_back(new cmAddCustomCommandCommand); + commands.push_back(new cmAddCustomTargetCommand); + commands.push_back(new cmAddDefinitionsCommand); + commands.push_back(new cmAddDependenciesCommand); + commands.push_back(new cmAddExecutableCommand); + commands.push_back(new cmAddLibraryCommand); + commands.push_back(new cmAddSubDirectoryCommand); + commands.push_back(new cmAddTestCommand); + commands.push_back(new cmBreakCommand); + commands.push_back(new cmBuildCommand); + commands.push_back(new cmCMakeMinimumRequired); + commands.push_back(new cmCMakePolicyCommand); + commands.push_back(new cmConfigureFileCommand); + commands.push_back(new cmContinueCommand); + commands.push_back(new cmCreateTestSourceList); + commands.push_back(new cmDefinePropertyCommand); + commands.push_back(new cmElseCommand); + commands.push_back(new cmEnableLanguageCommand); + commands.push_back(new cmEnableTestingCommand); + commands.push_back(new cmEndForEachCommand); + commands.push_back(new cmEndFunctionCommand); + commands.push_back(new cmEndIfCommand); + commands.push_back(new cmEndMacroCommand); + commands.push_back(new cmEndWhileCommand); + commands.push_back(new cmExecProgramCommand); + commands.push_back(new cmExecuteProcessCommand); + commands.push_back(new cmFileCommand); + commands.push_back(new cmFindFileCommand); + commands.push_back(new cmFindLibraryCommand); + commands.push_back(new cmFindPackageCommand); + commands.push_back(new cmFindPathCommand); + commands.push_back(new cmFindProgramCommand); + commands.push_back(new cmForEachCommand); + commands.push_back(new cmFunctionCommand); + commands.push_back(new cmGetCMakePropertyCommand); + commands.push_back(new cmGetDirectoryPropertyCommand); + commands.push_back(new cmGetFilenameComponentCommand); + commands.push_back(new cmGetPropertyCommand); + commands.push_back(new cmGetSourceFilePropertyCommand); + commands.push_back(new cmGetTargetPropertyCommand); + commands.push_back(new cmGetTestPropertyCommand); + commands.push_back(new cmIfCommand); + commands.push_back(new cmIncludeCommand); + commands.push_back(new cmIncludeDirectoryCommand); + commands.push_back(new cmIncludeRegularExpressionCommand); + commands.push_back(new cmInstallCommand); + commands.push_back(new cmInstallFilesCommand); + commands.push_back(new cmInstallTargetsCommand); + commands.push_back(new cmLinkDirectoriesCommand); + commands.push_back(new cmListCommand); + commands.push_back(new cmMacroCommand); + commands.push_back(new cmMakeDirectoryCommand); + commands.push_back(new cmMarkAsAdvancedCommand); + commands.push_back(new cmMathCommand); + commands.push_back(new cmMessageCommand); + commands.push_back(new cmOptionCommand); + commands.push_back(new cmParseArgumentsCommand); + commands.push_back(new cmProjectCommand); + commands.push_back(new cmReturnCommand); + commands.push_back(new cmSeparateArgumentsCommand); + commands.push_back(new cmSetCommand); + commands.push_back(new cmSetDirectoryPropertiesCommand); + commands.push_back(new cmSetPropertyCommand); + commands.push_back(new cmSetSourceFilesPropertiesCommand); + commands.push_back(new cmSetTargetPropertiesCommand); + commands.push_back(new cmSetTestsPropertiesCommand); + commands.push_back(new cmSiteNameCommand); + commands.push_back(new cmStringCommand); + commands.push_back(new cmSubdirCommand); + commands.push_back(new cmTargetLinkLibrariesCommand); + commands.push_back(new cmTryCompileCommand); + commands.push_back(new cmTryRunCommand); + commands.push_back(new cmUnsetCommand); + commands.push_back(new cmWhileCommand); + +#if defined(CMAKE_BUILD_WITH_CMAKE) + commands.push_back(new cmAddCompileOptionsCommand); + commands.push_back(new cmAuxSourceDirectoryCommand); + commands.push_back(new cmBuildNameCommand); + commands.push_back(new cmCMakeHostSystemInformationCommand); + commands.push_back(new cmElseIfCommand); + commands.push_back(new cmExportCommand); + commands.push_back(new cmExportLibraryDependenciesCommand); + commands.push_back(new cmFLTKWrapUICommand); + commands.push_back(new cmIncludeExternalMSProjectCommand); + commands.push_back(new cmInstallProgramsCommand); + commands.push_back(new cmLinkLibrariesCommand); + commands.push_back(new cmLoadCacheCommand); + commands.push_back(new cmLoadCommandCommand); + commands.push_back(new cmOutputRequiredFilesCommand); + commands.push_back(new cmQTWrapCPPCommand); + commands.push_back(new cmQTWrapUICommand); + commands.push_back(new cmRemoveCommand); + commands.push_back(new cmRemoveDefinitionsCommand); + commands.push_back(new cmSourceGroupCommand); + commands.push_back(new cmSubdirDependsCommand); + commands.push_back(new cmTargetCompileDefinitionsCommand); + commands.push_back(new cmTargetCompileFeaturesCommand); + commands.push_back(new cmTargetCompileOptionsCommand); + commands.push_back(new cmTargetIncludeDirectoriesCommand); + commands.push_back(new cmTargetSourcesCommand); + commands.push_back(new cmUseMangledMesaCommand); + commands.push_back(new cmUtilitySourceCommand); + commands.push_back(new cmVariableRequiresCommand); + commands.push_back(new cmVariableWatchCommand); + commands.push_back(new cmWriteFileCommand); +#endif + + return commands; +} diff --git a/Source/cmCommands.cxx.in b/Source/cmCommands.cxx.in deleted file mode 100644 index 9eddf30..0000000 --- a/Source/cmCommands.cxx.in +++ /dev/null @@ -1,10 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCommands.h" - - at COMMAND_INCLUDES@ - -void GetPredefinedCommands(std::vector& commands) -{ - at NEW_COMMANDS@ -} diff --git a/Source/cmCommands.h b/Source/cmCommands.h index c2a59b8..649dea6 100644 --- a/Source/cmCommands.h +++ b/Source/cmCommands.h @@ -10,13 +10,9 @@ class cmCommand; /** * Global function to return all compiled in commands. - * To add a new command edit cmCommands.cxx or cmBootstrapCommands[12].cxx - * and add your command. - * It is up to the caller to delete the commands created by this - * call. + * To add a new command edit cmCommands.cxx and add your command. + * It is up to the caller to delete the commands created by this call. */ -void GetBootstrapCommands1(std::vector& commands); -void GetBootstrapCommands2(std::vector& commands); -void GetPredefinedCommands(std::vector& commands); +std::vector GetPredefinedCommands(); #endif diff --git a/Source/cmCommandsForBootstrap.cxx b/Source/cmCommandsForBootstrap.cxx deleted file mode 100644 index 1b3bf51..0000000 --- a/Source/cmCommandsForBootstrap.cxx +++ /dev/null @@ -1,7 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCommands.h" - -void GetPredefinedCommands(std::vector&) -{ -} diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 388984f..210ac41 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1652,11 +1652,8 @@ const char* cmake::GetCacheDefinition(const std::string& name) const void cmake::AddDefaultCommands() { - std::vector commands; - GetBootstrapCommands1(commands); - GetBootstrapCommands2(commands); - GetPredefinedCommands(commands); - for (std::vector::iterator i = commands.begin(); + std::vector const commands = GetPredefinedCommands(); + for (std::vector::const_iterator i = commands.begin(); i != commands.end(); ++i) { this->State->AddCommand(*i); } diff --git a/bootstrap b/bootstrap index 5a0b8df..eb927d5 100755 --- a/bootstrap +++ b/bootstrap @@ -309,9 +309,7 @@ CMAKE_CXX_SOURCES="\ cmOutputConverter \ cmOSXBundleGenerator \ cmNewLineStyle \ - cmBootstrapCommands1 \ - cmBootstrapCommands2 \ - cmCommandsForBootstrap \ + cmCommands \ cmTarget \ cmTargetPropertyComputer \ cmTest \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=608afd4f62f57fe3f9dcac1e9cc94b8bd1adf9c6 commit 608afd4f62f57fe3f9dcac1e9cc94b8bd1adf9c6 Author: Daniel Pfeifer AuthorDate: Wed Oct 19 22:30:58 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:51 2016 +0200 Separate compilation for commands included in cmBootstrapCommands2 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index e028c5c..5c8636e 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -416,6 +416,8 @@ set(SRCS cmCMakePolicyCommand.h cmCommandArgumentsHelper.cxx cmCommandArgumentsHelper.h + cmConditionEvaluator.cxx + cmConditionEvaluator.h cmConfigureFileCommand.cxx cmConfigureFileCommand.h cmContinueCommand.cxx @@ -446,6 +448,8 @@ set(SRCS cmExecProgramCommand.h cmExecuteProcessCommand.cxx cmExecuteProcessCommand.h + cmExpandedCommandArgument.cxx + cmExpandedCommandArgument.h cmFileCommand.cxx cmFileCommand.h cmFindBase.cxx @@ -466,12 +470,96 @@ set(SRCS cmForEachCommand.h cmFunctionCommand.cxx cmFunctionCommand.h + cmGetCMakePropertyCommand.cxx + cmGetCMakePropertyCommand.h + cmGetDirectoryPropertyCommand.cxx + cmGetDirectoryPropertyCommand.h + cmGetFilenameComponentCommand.cxx + cmGetFilenameComponentCommand.h + cmGetPropertyCommand.cxx + cmGetPropertyCommand.h + cmGetSourceFilePropertyCommand.cxx + cmGetSourceFilePropertyCommand.h + cmGetTargetPropertyCommand.cxx + cmGetTargetPropertyCommand.h + cmGetTestPropertyCommand.cxx + cmGetTestPropertyCommand.h + cmHexFileConverter.cxx + cmHexFileConverter.h + cmIfCommand.cxx + cmIfCommand.h + cmIncludeCommand.cxx + cmIncludeCommand.h + cmIncludeDirectoryCommand.cxx + cmIncludeDirectoryCommand.h + cmIncludeRegularExpressionCommand.cxx + cmIncludeRegularExpressionCommand.h + cmInstallCommand.cxx + cmInstallCommand.h + cmInstallCommandArguments.cxx + cmInstallCommandArguments.h + cmInstallFilesCommand.cxx + cmInstallFilesCommand.h + cmInstallTargetsCommand.cxx + cmInstallTargetsCommand.h + cmLinkDirectoriesCommand.cxx + cmLinkDirectoriesCommand.h + cmListCommand.cxx + cmListCommand.h + cmMacroCommand.cxx + cmMacroCommand.h + cmMakeDirectoryCommand.cxx + cmMakeDirectoryCommand.h + cmMarkAsAdvancedCommand.cxx + cmMarkAsAdvancedCommand.h + cmMathCommand.cxx + cmMathCommand.h + cmMessageCommand.cxx + cmMessageCommand.h + cmOptionCommand.cxx + cmOptionCommand.h cmParseArgumentsCommand.cxx cmParseArgumentsCommand.h cmPathLabel.cxx cmPathLabel.h + cmProjectCommand.cxx + cmProjectCommand.h + cmReturnCommand.cxx + cmReturnCommand.h cmSearchPath.cxx cmSearchPath.h + cmSeparateArgumentsCommand.cxx + cmSeparateArgumentsCommand.h + cmSetCommand.cxx + cmSetCommand.h + cmSetDirectoryPropertiesCommand.cxx + cmSetDirectoryPropertiesCommand.h + cmSetPropertyCommand.cxx + cmSetPropertyCommand.h + cmSetSourceFilesPropertiesCommand.cxx + cmSetSourceFilesPropertiesCommand.h + cmSetTargetPropertiesCommand.cxx + cmSetTargetPropertiesCommand.h + cmSetTestsPropertiesCommand.cxx + cmSetTestsPropertiesCommand.h + cmSiteNameCommand.cxx + cmSiteNameCommand.h + cmStringCommand.cxx + cmStringCommand.h + cmSubdirCommand.cxx + cmSubdirCommand.h + cmTargetLinkLibrariesCommand.cxx + cmTargetLinkLibrariesCommand.h + cmTimestamp.cxx + cmTimestamp.h + cmTryCompileCommand.cxx + cmTryCompileCommand.h + cmTryRunCommand.cxx + cmTryRunCommand.h + cmUnsetCommand.cxx + cmUnsetCommand.h + cmWhileCommand.cxx + cmWhileCommand.h cm_auto_ptr.hxx cm_get_date.h diff --git a/Source/cmBootstrapCommands2.cxx b/Source/cmBootstrapCommands2.cxx index 625c3e0..972d5b3 100644 --- a/Source/cmBootstrapCommands2.cxx +++ b/Source/cmBootstrapCommands2.cxx @@ -5,50 +5,50 @@ // This is sort of a boot strapping approach since you would // like to have CMake to build CMake. #include "cmCommands.h" -#include "cmConditionEvaluator.cxx" -#include "cmExpandedCommandArgument.cxx" -#include "cmGetCMakePropertyCommand.cxx" -#include "cmGetDirectoryPropertyCommand.cxx" -#include "cmGetFilenameComponentCommand.cxx" -#include "cmGetPropertyCommand.cxx" -#include "cmGetSourceFilePropertyCommand.cxx" -#include "cmGetTargetPropertyCommand.cxx" -#include "cmGetTestPropertyCommand.cxx" -#include "cmHexFileConverter.cxx" -#include "cmIfCommand.cxx" -#include "cmIncludeCommand.cxx" -#include "cmIncludeDirectoryCommand.cxx" -#include "cmIncludeRegularExpressionCommand.cxx" -#include "cmInstallCommand.cxx" -#include "cmInstallCommandArguments.cxx" -#include "cmInstallFilesCommand.cxx" -#include "cmInstallTargetsCommand.cxx" -#include "cmLinkDirectoriesCommand.cxx" -#include "cmListCommand.cxx" -#include "cmMacroCommand.cxx" -#include "cmMakeDirectoryCommand.cxx" -#include "cmMarkAsAdvancedCommand.cxx" -#include "cmMathCommand.cxx" -#include "cmMessageCommand.cxx" -#include "cmOptionCommand.cxx" -#include "cmProjectCommand.cxx" -#include "cmReturnCommand.cxx" -#include "cmSeparateArgumentsCommand.cxx" -#include "cmSetCommand.cxx" -#include "cmSetDirectoryPropertiesCommand.cxx" -#include "cmSetPropertyCommand.cxx" -#include "cmSetSourceFilesPropertiesCommand.cxx" -#include "cmSetTargetPropertiesCommand.cxx" -#include "cmSetTestsPropertiesCommand.cxx" -#include "cmSiteNameCommand.cxx" -#include "cmStringCommand.cxx" -#include "cmSubdirCommand.cxx" -#include "cmTargetLinkLibrariesCommand.cxx" -#include "cmTimestamp.cxx" -#include "cmTryCompileCommand.cxx" -#include "cmTryRunCommand.cxx" -#include "cmUnsetCommand.cxx" -#include "cmWhileCommand.cxx" +#include "cmConditionEvaluator.h" +#include "cmExpandedCommandArgument.h" +#include "cmGetCMakePropertyCommand.h" +#include "cmGetDirectoryPropertyCommand.h" +#include "cmGetFilenameComponentCommand.h" +#include "cmGetPropertyCommand.h" +#include "cmGetSourceFilePropertyCommand.h" +#include "cmGetTargetPropertyCommand.h" +#include "cmGetTestPropertyCommand.h" +#include "cmHexFileConverter.h" +#include "cmIfCommand.h" +#include "cmIncludeCommand.h" +#include "cmIncludeDirectoryCommand.h" +#include "cmIncludeRegularExpressionCommand.h" +#include "cmInstallCommand.h" +#include "cmInstallCommandArguments.h" +#include "cmInstallFilesCommand.h" +#include "cmInstallTargetsCommand.h" +#include "cmLinkDirectoriesCommand.h" +#include "cmListCommand.h" +#include "cmMacroCommand.h" +#include "cmMakeDirectoryCommand.h" +#include "cmMarkAsAdvancedCommand.h" +#include "cmMathCommand.h" +#include "cmMessageCommand.h" +#include "cmOptionCommand.h" +#include "cmProjectCommand.h" +#include "cmReturnCommand.h" +#include "cmSeparateArgumentsCommand.h" +#include "cmSetCommand.h" +#include "cmSetDirectoryPropertiesCommand.h" +#include "cmSetPropertyCommand.h" +#include "cmSetSourceFilesPropertiesCommand.h" +#include "cmSetTargetPropertiesCommand.h" +#include "cmSetTestsPropertiesCommand.h" +#include "cmSiteNameCommand.h" +#include "cmStringCommand.h" +#include "cmSubdirCommand.h" +#include "cmTargetLinkLibrariesCommand.h" +#include "cmTimestamp.h" +#include "cmTryCompileCommand.h" +#include "cmTryRunCommand.h" +#include "cmUnsetCommand.h" +#include "cmWhileCommand.h" void GetBootstrapCommands2(std::vector& commands) { diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index e5949f0..01b41e8 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -4,6 +4,7 @@ #include "cmAlgorithms.h" #include "cmGlobalGenerator.h" +#include "cmState.h" #include "cmStateTypes.h" #include "cmake.h" diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx index 8ebad4e..0670d31 100644 --- a/Source/cmGetDirectoryPropertyCommand.cxx +++ b/Source/cmGetDirectoryPropertyCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetDirectoryPropertyCommand.h" +#include "cmGlobalGenerator.h" +#include "cmSystemTools.h" #include "cmake.h" // cmGetDirectoryPropertyCommand diff --git a/Source/cmHexFileConverter.cxx b/Source/cmHexFileConverter.cxx index e121ece..6f3ea6a 100644 --- a/Source/cmHexFileConverter.cxx +++ b/Source/cmHexFileConverter.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmHexFileConverter.h" +#include "cmSystemTools.h" + #include #include diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index a2dec55..eb85b16 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -4,6 +4,7 @@ #include "cmOutputConverter.h" #include "cmStringCommand.h" +#include "cmSystemTools.h" #include "cmConditionEvaluator.h" diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx index acf51a7..e89641f 100644 --- a/Source/cmIncludeCommand.cxx +++ b/Source/cmIncludeCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeCommand.h" +#include "cmGlobalGenerator.h" +#include "cmSystemTools.h" + // cmIncludeCommand bool cmIncludeCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index f37f1ca..2260366 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeDirectoryCommand.h" +#include "cmSystemTools.h" + // cmIncludeDirectoryCommand bool cmIncludeDirectoryCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index d85748e..476755a 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -3,12 +3,14 @@ #include "cmInstallCommand.h" #include "cmExportSet.h" +#include "cmGlobalGenerator.h" #include "cmInstallCommandArguments.h" #include "cmInstallDirectoryGenerator.h" #include "cmInstallExportGenerator.h" #include "cmInstallFilesGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" +#include "cmSystemTools.h" #include "cmTargetExport.h" #include diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index f072ff5..50f97e9 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -2,7 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallFilesCommand.h" +#include "cmGlobalGenerator.h" #include "cmInstallFilesGenerator.h" +#include "cmSystemTools.h" // cmExecutableCommand bool cmInstallFilesCommand::InitialPass(std::vector const& args, diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx index fca0bf1..07f990d 100644 --- a/Source/cmInstallTargetsCommand.cxx +++ b/Source/cmInstallTargetsCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallTargetsCommand.h" +#include "cmGlobalGenerator.h" + // cmExecutableCommand bool cmInstallTargetsCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmLinkDirectoriesCommand.cxx b/Source/cmLinkDirectoriesCommand.cxx index fc6bf29..3a18a43 100644 --- a/Source/cmLinkDirectoriesCommand.cxx +++ b/Source/cmLinkDirectoriesCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLinkDirectoriesCommand.h" +#include "cmSystemTools.h" + // cmLinkDirectoriesCommand bool cmLinkDirectoriesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 98f3aa3..6cc9590 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -3,6 +3,7 @@ #include "cmListCommand.h" #include "cmAlgorithms.h" +#include "cmSystemTools.h" #include #include diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 9917394..cb8bd58 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -3,6 +3,8 @@ #include "cmMacroCommand.h" #include "cmAlgorithms.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmake.h" // define the class for macro commands diff --git a/Source/cmMakeDirectoryCommand.cxx b/Source/cmMakeDirectoryCommand.cxx index e0011bd..fda9eea 100644 --- a/Source/cmMakeDirectoryCommand.cxx +++ b/Source/cmMakeDirectoryCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakeDirectoryCommand.h" +#include "cmSystemTools.h" + // cmMakeDirectoryCommand bool cmMakeDirectoryCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx index 8f9e288..7297193 100644 --- a/Source/cmMarkAsAdvancedCommand.cxx +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMarkAsAdvancedCommand.h" +#include "cmState.h" +#include "cmSystemTools.h" + // cmMarkAsAdvancedCommand bool cmMarkAsAdvancedCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index 9a83cd9..83d847a 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -3,6 +3,7 @@ #include "cmMessageCommand.h" #include "cmMessenger.h" +#include "cmSystemTools.h" // cmLibraryCommand bool cmMessageCommand::InitialPass(std::vector const& args, diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 0186ef2..d6efa2c 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmOptionCommand.h" +#include "cmState.h" +#include "cmSystemTools.h" + // cmOptionCommand bool cmOptionCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index c27da8e..4188661 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmProjectCommand.h" +#include "cmSystemTools.h" + // cmProjectCommand bool cmProjectCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmReturnCommand.cxx b/Source/cmReturnCommand.cxx index aa056c3..f8b3129 100644 --- a/Source/cmReturnCommand.cxx +++ b/Source/cmReturnCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmReturnCommand.h" +#include "cmExecutionStatus.h" + // cmReturnCommand bool cmReturnCommand::InitialPass(std::vector const&, cmExecutionStatus& status) diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx index b5c3186..77546a3 100644 --- a/Source/cmSeparateArgumentsCommand.cxx +++ b/Source/cmSeparateArgumentsCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSeparateArgumentsCommand.h" +#include "cmSystemTools.h" + // cmSeparateArgumentsCommand bool cmSeparateArgumentsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 65b0e9c..9f59db4 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetCommand.h" +#include "cmState.h" +#include "cmSystemTools.h" + // cmSetCommand bool cmSetCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 2a4101f..552f918 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetPropertyCommand.h" +#include "cmGlobalGenerator.h" #include "cmSetSourceFilesPropertiesCommand.h" #include "cmSetTargetPropertiesCommand.h" #include "cmSetTestsPropertiesCommand.h" +#include "cmSourceFile.h" +#include "cmState.h" +#include "cmTest.h" cmSetPropertyCommand::cmSetPropertyCommand() { diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx index 0021589..6a87d6d 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.cxx +++ b/Source/cmSetSourceFilesPropertiesCommand.cxx @@ -3,6 +3,7 @@ #include "cmSetSourceFilesPropertiesCommand.h" #include "cmSourceFile.h" +#include "cmSystemTools.h" // cmSetSourceFilesPropertiesCommand bool cmSetSourceFilesPropertiesCommand::InitialPass( diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx index 7664eca..18c2a3e 100644 --- a/Source/cmSiteNameCommand.cxx +++ b/Source/cmSiteNameCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSiteNameCommand.h" +#include "cmSystemTools.h" + #include // cmSiteNameCommand diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index c73025a..33d22e4 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -3,6 +3,7 @@ #include "cmStringCommand.h" #include "cmCryptoHash.h" +#include "cmSystemTools.h" #include #include diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx index fe7f659..d502c5f 100644 --- a/Source/cmSubdirCommand.cxx +++ b/Source/cmSubdirCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSubdirCommand.h" +#include "cmSystemTools.h" + // cmSubdirCommand bool cmSubdirCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 804dc5a..9626992 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -3,6 +3,9 @@ #include "cmTargetLinkLibrariesCommand.h" #include "cmGeneratorExpression.h" +#include "cmGlobalGenerator.h" +#include "cmState.h" +#include "cmSystemTools.h" const char* cmTargetLinkLibrariesCommand::LinkLibraryTypeNames[3] = { "general", "debug", "optimized" diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx index 6a8c9c6..9597e09 100644 --- a/Source/cmTimestamp.cxx +++ b/Source/cmTimestamp.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTimestamp.h" +#include "cmSystemTools.h" + #include #include #include diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index b248489..6787c8e 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -2,7 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTryRunCommand.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmTryCompileCommand.h" + #include // cmTryRunCommand diff --git a/Source/cmUnsetCommand.cxx b/Source/cmUnsetCommand.cxx index 746c435..2fea6192 100644 --- a/Source/cmUnsetCommand.cxx +++ b/Source/cmUnsetCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUnsetCommand.h" +#include "cmSystemTools.h" + // cmUnsetCommand bool cmUnsetCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index c52ea40..beb59bf 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -3,6 +3,7 @@ #include "cmWhileCommand.h" #include "cmConditionEvaluator.h" +#include "cmSystemTools.h" cmWhileFunctionBlocker::cmWhileFunctionBlocker(cmMakefile* mf) : Makefile(mf) diff --git a/bootstrap b/bootstrap index cb057c3..5a0b8df 100755 --- a/bootstrap +++ b/bootstrap @@ -368,6 +368,50 @@ CMAKE_CXX_SOURCES="\ cmParseArgumentsCommand \ cmPathLabel \ cmSearchPath \ + cmConditionEvaluator \ + cmExpandedCommandArgument \ + cmGetCMakePropertyCommand \ + cmGetDirectoryPropertyCommand \ + cmGetFilenameComponentCommand \ + cmGetPropertyCommand \ + cmGetSourceFilePropertyCommand \ + cmGetTargetPropertyCommand \ + cmGetTestPropertyCommand \ + cmHexFileConverter \ + cmIfCommand \ + cmIncludeCommand \ + cmIncludeDirectoryCommand \ + cmIncludeRegularExpressionCommand \ + cmInstallCommand \ + cmInstallCommandArguments \ + cmInstallFilesCommand \ + cmInstallTargetsCommand \ + cmLinkDirectoriesCommand \ + cmListCommand \ + cmMacroCommand \ + cmMakeDirectoryCommand \ + cmMarkAsAdvancedCommand \ + cmMathCommand \ + cmMessageCommand \ + cmOptionCommand \ + cmProjectCommand \ + cmReturnCommand \ + cmSeparateArgumentsCommand \ + cmSetCommand \ + cmSetDirectoryPropertiesCommand \ + cmSetPropertyCommand \ + cmSetSourceFilesPropertiesCommand \ + cmSetTargetPropertiesCommand \ + cmSetTestsPropertiesCommand \ + cmSiteNameCommand \ + cmStringCommand \ + cmSubdirCommand \ + cmTargetLinkLibrariesCommand \ + cmTimestamp \ + cmTryCompileCommand \ + cmTryRunCommand \ + cmUnsetCommand \ + cmWhileCommand \ " if ${cmake_system_mingw}; then @@ -1363,12 +1407,6 @@ for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_ objs="${objs} ${a}.o" done -# Generate dependencies for cmBootstrapCommands1.cxx -for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands2.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do - cmBootstrapCommands2Deps="${cmBootstrapCommands2Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`" -done -cmBootstrapCommands2Deps=`echo $cmBootstrapCommands2Deps` - if [ "x${cmake_ansi_cxx_flags}" != "x" ]; then cmake_cxx_flags="${cmake_ansi_cxx_flags} ${cmake_cxx_flags}" fi https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64f9c282f3337335c05a062f341fd5155cade51c commit 64f9c282f3337335c05a062f341fd5155cade51c Author: Daniel Pfeifer AuthorDate: Wed Oct 19 21:59:14 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:51 2016 +0200 Separate compilation for commands included in cmBootstrapCommands1 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 9f8a3e2..e028c5c 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -390,6 +390,89 @@ set(SRCS cmake.cxx cmake.h + cmAddCustomCommandCommand.cxx + cmAddCustomCommandCommand.h + cmAddCustomTargetCommand.cxx + cmAddCustomTargetCommand.h + cmAddDefinitionsCommand.cxx + cmAddDefinitionsCommand.h + cmAddDependenciesCommand.cxx + cmAddDependenciesCommand.h + cmAddExecutableCommand.cxx + cmAddExecutableCommand.h + cmAddLibraryCommand.cxx + cmAddLibraryCommand.h + cmAddSubDirectoryCommand.cxx + cmAddSubDirectoryCommand.h + cmAddTestCommand.cxx + cmAddTestCommand.h + cmBreakCommand.cxx + cmBreakCommand.h + cmBuildCommand.cxx + cmBuildCommand.h + cmCMakeMinimumRequired.cxx + cmCMakeMinimumRequired.h + cmCMakePolicyCommand.cxx + cmCMakePolicyCommand.h + cmCommandArgumentsHelper.cxx + cmCommandArgumentsHelper.h + cmConfigureFileCommand.cxx + cmConfigureFileCommand.h + cmContinueCommand.cxx + cmContinueCommand.h + cmCoreTryCompile.cxx + cmCoreTryCompile.h + cmCreateTestSourceList.cxx + cmCreateTestSourceList.h + cmDefinePropertyCommand.cxx + cmDefinePropertyCommand.h + cmElseCommand.cxx + cmElseCommand.h + cmEnableLanguageCommand.cxx + cmEnableLanguageCommand.h + cmEnableTestingCommand.cxx + cmEnableTestingCommand.h + cmEndForEachCommand.cxx + cmEndForEachCommand.h + cmEndFunctionCommand.cxx + cmEndFunctionCommand.h + cmEndIfCommand.cxx + cmEndIfCommand.h + cmEndMacroCommand.cxx + cmEndMacroCommand.h + cmEndWhileCommand.cxx + cmEndWhileCommand.h + cmExecProgramCommand.cxx + cmExecProgramCommand.h + cmExecuteProcessCommand.cxx + cmExecuteProcessCommand.h + cmFileCommand.cxx + cmFileCommand.h + cmFindBase.cxx + cmFindBase.h + cmFindCommon.cxx + cmFindCommon.h + cmFindFileCommand.cxx + cmFindFileCommand.h + cmFindLibraryCommand.cxx + cmFindLibraryCommand.h + cmFindPackageCommand.cxx + cmFindPackageCommand.h + cmFindPathCommand.cxx + cmFindPathCommand.h + cmFindProgramCommand.cxx + cmFindProgramCommand.h + cmForEachCommand.cxx + cmForEachCommand.h + cmFunctionCommand.cxx + cmFunctionCommand.h + cmParseArgumentsCommand.cxx + cmParseArgumentsCommand.h + cmPathLabel.cxx + cmPathLabel.h + cmSearchPath.cxx + cmSearchPath.h + cm_auto_ptr.hxx cm_get_date.h cm_get_date.c diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index a03d77d..3d0729b 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddExecutableCommand.h" +#include "cmGlobalGenerator.h" + // cmExecutableCommand bool cmAddExecutableCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 0777ef0..18118a3 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -2,8 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddLibraryCommand.h" +#include "cmGlobalGenerator.h" #include "cmState.h" #include "cmStateTypes.h" +#include "cmSystemTools.h" #include "cmake.h" // cmLibraryCommand diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx index bb1e239..0ebe35d 100644 --- a/Source/cmAddSubDirectoryCommand.cxx +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddSubDirectoryCommand.h" +#include "cmSystemTools.h" + // cmAddSubDirectoryCommand bool cmAddSubDirectoryCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmBootstrapCommands1.cxx b/Source/cmBootstrapCommands1.cxx index 2b3b62f..afb7ad8 100644 --- a/Source/cmBootstrapCommands1.cxx +++ b/Source/cmBootstrapCommands1.cxx @@ -4,48 +4,48 @@ // that CMake knows about at compile time. // This is sort of a boot strapping approach since you would // like to have CMake to build CMake. -#include "cmAddCustomCommandCommand.cxx" -#include "cmAddCustomTargetCommand.cxx" -#include "cmAddDefinitionsCommand.cxx" -#include "cmAddDependenciesCommand.cxx" -#include "cmAddExecutableCommand.cxx" -#include "cmAddLibraryCommand.cxx" -#include "cmAddSubDirectoryCommand.cxx" -#include "cmAddTestCommand.cxx" -#include "cmBreakCommand.cxx" -#include "cmBuildCommand.cxx" -#include "cmCMakeMinimumRequired.cxx" -#include "cmCMakePolicyCommand.cxx" -#include "cmCommandArgumentsHelper.cxx" +#include "cmAddCustomCommandCommand.h" +#include "cmAddCustomTargetCommand.h" +#include "cmAddDefinitionsCommand.h" +#include "cmAddDependenciesCommand.h" +#include "cmAddExecutableCommand.h" +#include "cmAddLibraryCommand.h" +#include "cmAddSubDirectoryCommand.h" +#include "cmAddTestCommand.h" +#include "cmBreakCommand.h" +#include "cmBuildCommand.h" +#include "cmCMakeMinimumRequired.h" +#include "cmCMakePolicyCommand.h" +#include "cmCommandArgumentsHelper.h" #include "cmCommands.h" -#include "cmConfigureFileCommand.cxx" -#include "cmContinueCommand.cxx" -#include "cmCoreTryCompile.cxx" -#include "cmCreateTestSourceList.cxx" -#include "cmDefinePropertyCommand.cxx" -#include "cmElseCommand.cxx" -#include "cmEnableLanguageCommand.cxx" -#include "cmEnableTestingCommand.cxx" -#include "cmEndForEachCommand.cxx" -#include "cmEndFunctionCommand.cxx" -#include "cmEndIfCommand.cxx" -#include "cmEndMacroCommand.cxx" -#include "cmEndWhileCommand.cxx" -#include "cmExecProgramCommand.cxx" -#include "cmExecuteProcessCommand.cxx" -#include "cmFileCommand.cxx" -#include "cmFindBase.cxx" -#include "cmFindCommon.cxx" -#include "cmFindFileCommand.cxx" -#include "cmFindLibraryCommand.cxx" -#include "cmFindPackageCommand.cxx" -#include "cmFindPathCommand.cxx" -#include "cmFindProgramCommand.cxx" -#include "cmForEachCommand.cxx" -#include "cmFunctionCommand.cxx" -#include "cmParseArgumentsCommand.cxx" -#include "cmPathLabel.cxx" -#include "cmSearchPath.cxx" +#include "cmConfigureFileCommand.h" +#include "cmContinueCommand.h" +#include "cmCoreTryCompile.h" +#include "cmCreateTestSourceList.h" +#include "cmDefinePropertyCommand.h" +#include "cmElseCommand.h" +#include "cmEnableLanguageCommand.h" +#include "cmEnableTestingCommand.h" +#include "cmEndForEachCommand.h" +#include "cmEndFunctionCommand.h" +#include "cmEndIfCommand.h" +#include "cmEndMacroCommand.h" +#include "cmEndWhileCommand.h" +#include "cmExecProgramCommand.h" +#include "cmExecuteProcessCommand.h" +#include "cmFileCommand.h" +#include "cmFindBase.h" +#include "cmFindCommon.h" +#include "cmFindFileCommand.h" +#include "cmFindLibraryCommand.h" +#include "cmFindPackageCommand.h" +#include "cmFindPathCommand.h" +#include "cmFindProgramCommand.h" +#include "cmForEachCommand.h" +#include "cmFunctionCommand.h" +#include "cmParseArgumentsCommand.h" +#include "cmPathLabel.h" +#include "cmSearchPath.h" void GetBootstrapCommands1(std::vector& commands) { diff --git a/Source/cmCMakeMinimumRequired.cxx b/Source/cmCMakeMinimumRequired.cxx index 80b5108..d71172c 100644 --- a/Source/cmCMakeMinimumRequired.cxx +++ b/Source/cmCMakeMinimumRequired.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakeMinimumRequired.h" +#include "cmSystemTools.h" #include "cmVersion.h" // cmCMakeMinimumRequired diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index 6a451f5..0755dce 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmConfigureFileCommand.h" +#include "cmSystemTools.h" + #include // cmConfigureFileCommand diff --git a/Source/cmContinueCommand.cxx b/Source/cmContinueCommand.cxx index ce36463..dc3e02c 100644 --- a/Source/cmContinueCommand.cxx +++ b/Source/cmContinueCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmContinueCommand.h" +#include "cmExecutionStatus.h" +#include "cmSystemTools.h" + // cmContinueCommand bool cmContinueCommand::InitialPass(std::vector const& args, cmExecutionStatus& status) diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx index ec62c5b..b062d4d 100644 --- a/Source/cmCreateTestSourceList.cxx +++ b/Source/cmCreateTestSourceList.cxx @@ -3,6 +3,7 @@ #include "cmCreateTestSourceList.h" #include "cmSourceFile.h" +#include "cmSystemTools.h" // cmCreateTestSourceList bool cmCreateTestSourceList::InitialPass(std::vector const& args, diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index ff822b8..9e08f30 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -5,6 +5,7 @@ #include "cmAlgorithms.h" #include "cmState.h" #include "cmStateTypes.h" +#include "cmSystemTools.h" cmFindBase::cmFindBase() { diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index bd5298d..bc175ff 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindCommon.h" +#include "cmSystemTools.h" + #include #include diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 5d8aaa2..56be0cb 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -2,7 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindLibraryCommand.h" +#include "cmGlobalGenerator.h" #include "cmState.h" +#include "cmSystemTools.h" +#include "cmVersion.h" + #include cmFindLibraryCommand::cmFindLibraryCommand() diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 029d422..2784e16 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -4,9 +4,12 @@ #include "cmAlgorithms.h" #include "cmState.h" +#include "cmVersion.h" + #include #include #include +#include #include #ifdef CMAKE_BUILD_WITH_CMAKE diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 7d37185..66dc5d7 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindPathCommand.h" +#include "cmSystemTools.h" + #include cmFindPathCommand::cmFindPathCommand() diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index 9886860..d258c3c 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindProgramCommand.h" +#include "cmSystemTools.h" + #include #if defined(__APPLE__) diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 987741b..6fbc93d 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmForEachCommand.h" +#include "cmSystemTools.h" + #include cmForEachFunctionBlocker::cmForEachFunctionBlocker(cmMakefile* mf) diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 99d883a..9da4cf6 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFunctionCommand.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmake.h" // define the class for function commands diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index 55d71ea..e45e3a5 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -3,6 +3,7 @@ #include "cmParseArgumentsCommand.h" #include "cmAlgorithms.h" +#include "cmSystemTools.h" static std::string escape_arg(const std::string& arg) { diff --git a/Source/cmSearchPath.cxx b/Source/cmSearchPath.cxx index c34028e..fd3d482 100644 --- a/Source/cmSearchPath.cxx +++ b/Source/cmSearchPath.cxx @@ -4,6 +4,7 @@ #include "cmAlgorithms.h" #include "cmFindCommon.h" +#include "cmSystemTools.h" cmSearchPath::cmSearchPath(cmFindCommon* findCmd) : FC(findCmd) diff --git a/bootstrap b/bootstrap index 44afbb2..cb057c3 100755 --- a/bootstrap +++ b/bootstrap @@ -327,6 +327,47 @@ CMAKE_CXX_SOURCES="\ cmExprLexer \ cmExprParser \ cmExprParserHelper \ + cmAddCustomCommandCommand \ + cmAddCustomTargetCommand \ + cmAddDefinitionsCommand \ + cmAddDependenciesCommand \ + cmAddExecutableCommand \ + cmAddLibraryCommand \ + cmAddSubDirectoryCommand \ + cmAddTestCommand \ + cmBreakCommand \ + cmBuildCommand \ + cmCMakeMinimumRequired \ + cmCMakePolicyCommand \ + cmCommandArgumentsHelper \ + cmConfigureFileCommand \ + cmContinueCommand \ + cmCoreTryCompile \ + cmCreateTestSourceList \ + cmDefinePropertyCommand \ + cmElseCommand \ + cmEnableLanguageCommand \ + cmEnableTestingCommand \ + cmEndForEachCommand \ + cmEndFunctionCommand \ + cmEndIfCommand \ + cmEndMacroCommand \ + cmEndWhileCommand \ + cmExecProgramCommand \ + cmExecuteProcessCommand \ + cmFileCommand \ + cmFindBase \ + cmFindCommon \ + cmFindFileCommand \ + cmFindLibraryCommand \ + cmFindPackageCommand \ + cmFindPathCommand \ + cmFindProgramCommand \ + cmForEachCommand \ + cmFunctionCommand \ + cmParseArgumentsCommand \ + cmPathLabel \ + cmSearchPath \ " if ${cmake_system_mingw}; then @@ -1323,10 +1364,6 @@ for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_ done # Generate dependencies for cmBootstrapCommands1.cxx -for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands1.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do - cmBootstrapCommands1Deps="${cmBootstrapCommands1Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`" -done -cmBootstrapCommands1Deps=`echo $cmBootstrapCommands1Deps` for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands2.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do cmBootstrapCommands2Deps="${cmBootstrapCommands2Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`" done https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f69e768d94ff5e0238cbb924836737c4ce11a930 commit f69e768d94ff5e0238cbb924836737c4ce11a930 Author: Daniel Pfeifer AuthorDate: Wed Oct 19 08:54:18 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Oct 21 18:14:50 2016 +0200 Separate compilation for commands included in cmCommands diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 2b8c17c..9f8a3e2 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -401,9 +401,8 @@ set(SRCS cm_codecvt.cxx ) -set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.cxx\"\n") -list(APPEND SRCS cmTargetPropCommandBase.cxx) -set_property(SOURCE cmTargetPropCommandBase.cxx PROPERTY HEADER_FILE_ONLY ON) +set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.h\"\n") +list(APPEND SRCS cmTargetPropCommandBase.cxx cmTargetPropCommandBase.h) set(NEW_COMMANDS "") foreach(command_file cmAddCompileOptionsCommand @@ -418,6 +417,7 @@ foreach(command_file cmInstallProgramsCommand cmLinkLibrariesCommand cmLoadCacheCommand + cmLoadCommandCommand cmOutputRequiredFilesCommand cmQTWrapCPPCommand cmQTWrapUICommand @@ -435,15 +435,10 @@ foreach(command_file cmVariableRequiresCommand cmVariableWatchCommand cmWriteFileCommand - # This one must be last because it includes windows.h and - # windows.h #defines GetCurrentDirectory which is a member - # of cmMakefile - cmLoadCommandCommand ) - set(COMMAND_INCLUDES "${COMMAND_INCLUDES}#include \"${command_file}.cxx\"\n") + set(COMMAND_INCLUDES "${COMMAND_INCLUDES}#include \"${command_file}.h\"\n") set(NEW_COMMANDS "${NEW_COMMANDS}commands.push_back(new ${command_file});\n") - list(APPEND SRCS ${command_file}.cxx) - set_property(SOURCE ${command_file}.cxx PROPERTY HEADER_FILE_ONLY ON) + list(APPEND SRCS ${command_file}.cxx ${command_file}.h) endforeach() configure_file(cmCommands.cxx.in ${CMAKE_CURRENT_BINARY_DIR}/cmCommands.cxx @ONLY) diff --git a/Source/cmAddCompileOptionsCommand.cxx b/Source/cmAddCompileOptionsCommand.cxx index 9265cba..21a8012 100644 --- a/Source/cmAddCompileOptionsCommand.cxx +++ b/Source/cmAddCompileOptionsCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddCompileOptionsCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + bool cmAddCompileOptionsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { diff --git a/Source/cmAddCompileOptionsCommand.h b/Source/cmAddCompileOptionsCommand.h index 52c4b51..4c715e7 100644 --- a/Source/cmAddCompileOptionsCommand.h +++ b/Source/cmAddCompileOptionsCommand.h @@ -3,7 +3,14 @@ #ifndef cmAddCompileOptionsCommand_h #define cmAddCompileOptionsCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmAddCompileOptionsCommand : public cmCommand { diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx index 6655911..04e1a0b 100644 --- a/Source/cmAuxSourceDirectoryCommand.cxx +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -2,9 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAuxSourceDirectoryCommand.h" +#include +#include +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmSystemTools.h" +#include "cmake.h" -#include +class cmExecutionStatus; // cmAuxSourceDirectoryCommand bool cmAuxSourceDirectoryCommand::InitialPass( diff --git a/Source/cmAuxSourceDirectoryCommand.h b/Source/cmAuxSourceDirectoryCommand.h index cca70dc..6c15319 100644 --- a/Source/cmAuxSourceDirectoryCommand.h +++ b/Source/cmAuxSourceDirectoryCommand.h @@ -3,7 +3,14 @@ #ifndef cmAuxSourceDirectoryCommand_h #define cmAuxSourceDirectoryCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmAuxSourceDirectoryCommand * \brief Specify auxiliary source code directories. diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx index 816147b..3257c93 100644 --- a/Source/cmBuildNameCommand.cxx +++ b/Source/cmBuildNameCommand.cxx @@ -2,8 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmBuildNameCommand.h" +#include #include +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmBuildNameCommand bool cmBuildNameCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmBuildNameCommand.h b/Source/cmBuildNameCommand.h index 7c09d73..cefa379 100644 --- a/Source/cmBuildNameCommand.h +++ b/Source/cmBuildNameCommand.h @@ -3,7 +3,14 @@ #ifndef cmBuildNameCommand_h #define cmBuildNameCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmBuildNameCommand : public cmCommand { diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx index 018010e..7da93ac 100644 --- a/Source/cmCMakeHostSystemInformationCommand.cxx +++ b/Source/cmCMakeHostSystemInformationCommand.cxx @@ -2,6 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakeHostSystemInformationCommand.h" +#include + +#include "cmMakefile.h" +#include "cmsys/SystemInformation.hxx" + +class cmExecutionStatus; + // cmCMakeHostSystemInformation bool cmCMakeHostSystemInformationCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmCMakeHostSystemInformationCommand.h b/Source/cmCMakeHostSystemInformationCommand.h index 4ab6aa1..585d7fa 100644 --- a/Source/cmCMakeHostSystemInformationCommand.h +++ b/Source/cmCMakeHostSystemInformationCommand.h @@ -3,9 +3,18 @@ #ifndef cmCMakeHostSystemInformationCommand_h #define cmCMakeHostSystemInformationCommand_h +#include +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" -#include +class cmExecutionStatus; +namespace cmsys { +class SystemInformation; +} // namespace cmsys /** \class cmCMakeHostSystemInformationCommand * \brief Query host system specific information diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 155456a..b70074e 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -7,10 +7,12 @@ #include "cmCPluginAPI.h" +#include "cmExecutionStatus.h" +#include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmVersion.h" - #include "cmSourceFile.h" +#include "cmState.h" +#include "cmVersion.h" #include diff --git a/Source/cmElseIfCommand.cxx b/Source/cmElseIfCommand.cxx index cc3624b..1c32248 100644 --- a/Source/cmElseIfCommand.cxx +++ b/Source/cmElseIfCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmElseIfCommand.h" +class cmExecutionStatus; + bool cmElseIfCommand::InitialPass(std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmElseIfCommand.h b/Source/cmElseIfCommand.h index a489e30..6675b16 100644 --- a/Source/cmElseIfCommand.h +++ b/Source/cmElseIfCommand.h @@ -3,7 +3,14 @@ #ifndef cmElseIfCommand_h #define cmElseIfCommand_h -#include "cmIfCommand.h" +#include +#include +#include + +#include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmElseIfCommand * \brief ends an if block diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 4fb5998..c9dac35 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -2,15 +2,22 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExportCommand.h" -#include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmake.h" - -#include #include +#include +#include #include "cmExportBuildAndroidMKGenerator.h" #include "cmExportBuildFileGenerator.h" +#include "cmExportSetMap.h" +#include "cmGeneratedFileStream.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; #if defined(__HAIKU__) #include @@ -271,6 +278,7 @@ bool cmExportCommand::HandlePackage(std::vector const& args) #if defined(_WIN32) && !defined(__CYGWIN__) #include + #undef GetCurrentDirectory void cmExportCommand::ReportRegistryError(std::string const& msg, std::string const& key, long err) diff --git a/Source/cmExportCommand.h b/Source/cmExportCommand.h index ebde71c..8893000 100644 --- a/Source/cmExportCommand.h +++ b/Source/cmExportCommand.h @@ -3,9 +3,15 @@ #ifndef cmExportCommand_h #define cmExportCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmCommandArgumentsHelper.h" +#include "cmTypeMacro.h" -class cmExportBuildFileGenerator; +class cmExecutionStatus; class cmExportSet; /** \class cmExportLibraryDependenciesCommand diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index 66b77a6..bf1ea01 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -2,12 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExportLibraryDependenciesCommand.h" +#include +#include + #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" -#include "cmVersion.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetLinkLibraryType.h" #include "cmake.h" -#include +class cmExecutionStatus; bool cmExportLibraryDependenciesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmExportLibraryDependenciesCommand.h b/Source/cmExportLibraryDependenciesCommand.h index fa9f353..0a7823a 100644 --- a/Source/cmExportLibraryDependenciesCommand.h +++ b/Source/cmExportLibraryDependenciesCommand.h @@ -3,7 +3,14 @@ #ifndef cmExportLibraryDependenciesCommand_h #define cmExportLibraryDependenciesCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmExportLibraryDependenciesCommand : public cmCommand { diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index 5f621f1..1f0ce8d 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFLTKWrapUICommand.h" +#include + +#include "cmCustomCommandLines.h" +#include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; +class cmTarget; // cmFLTKWrapUICommand bool cmFLTKWrapUICommand::InitialPass(std::vector const& args, diff --git a/Source/cmFLTKWrapUICommand.h b/Source/cmFLTKWrapUICommand.h index 202067f..74bb8bb 100644 --- a/Source/cmFLTKWrapUICommand.h +++ b/Source/cmFLTKWrapUICommand.h @@ -3,7 +3,15 @@ #ifndef cmFLTKWrapUICommand_h #define cmFLTKWrapUICommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; +class cmSourceFile; /** \class cmFLTKWrapUICommand * \brief Create .h and .cxx files rules for FLTK user interfaces files diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index d598722..e7e9402 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -2,6 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeExternalMSProjectCommand.h" +#ifdef _WIN32 +#include "cmSystemTools.h" +#endif + +class cmExecutionStatus; + // cmIncludeExternalMSProjectCommand bool cmIncludeExternalMSProjectCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmIncludeExternalMSProjectCommand.h b/Source/cmIncludeExternalMSProjectCommand.h index 9401016..bfe7b2a 100644 --- a/Source/cmIncludeExternalMSProjectCommand.h +++ b/Source/cmIncludeExternalMSProjectCommand.h @@ -3,7 +3,14 @@ #ifndef cmIncludeExternalMSProjectCommand_h #define cmIncludeExternalMSProjectCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmIncludeExternalMSProjectCommand * \brief Specify an external MS project file for inclusion in the workspace. diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index bb2b61f..5ee81fb 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallProgramsCommand.h" +#include "cmGeneratorExpression.h" +#include "cmGlobalGenerator.h" #include "cmInstallFilesGenerator.h" +#include "cmInstallGenerator.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmExecutableCommand bool cmInstallProgramsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmInstallProgramsCommand.h b/Source/cmInstallProgramsCommand.h index cb85cce..aa6c2fc 100644 --- a/Source/cmInstallProgramsCommand.h +++ b/Source/cmInstallProgramsCommand.h @@ -3,7 +3,14 @@ #ifndef cmInstallProgramsCommand_h #define cmInstallProgramsCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmInstallProgramsCommand * \brief Specifies where to install some programs diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index 4202cf5..708ec8c 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLinkLibrariesCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // cmLinkLibrariesCommand bool cmLinkLibrariesCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmLinkLibrariesCommand.h b/Source/cmLinkLibrariesCommand.h index b4943b6..160eeb4 100644 --- a/Source/cmLinkLibrariesCommand.h +++ b/Source/cmLinkLibrariesCommand.h @@ -3,7 +3,14 @@ #ifndef cmLinkLibrariesCommand_h #define cmLinkLibrariesCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmLinkLibrariesCommand * \brief Specify a list of libraries to link into executables. diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index 49db5b0..2a06cb4 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -3,7 +3,13 @@ #include "cmLoadCacheCommand.h" #include -#include + +#include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmLoadCacheCommand bool cmLoadCacheCommand::InitialPass(std::vector const& args, diff --git a/Source/cmLoadCacheCommand.h b/Source/cmLoadCacheCommand.h index 57f64cd..64b82c5 100644 --- a/Source/cmLoadCacheCommand.h +++ b/Source/cmLoadCacheCommand.h @@ -3,7 +3,15 @@ #ifndef cmLoadCacheCommand_h #define cmLoadCacheCommand_h +#include +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmLoadCacheCommand * \brief load a cache file diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index bcfec79..12b3aa8 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -5,16 +5,23 @@ #include "cmCPluginAPI.cxx" #include "cmCPluginAPI.h" #include "cmDynamicLoader.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" -#include +class cmExecutionStatus; +#include +#include +#include #include +#include #ifdef __QNX__ #include /* for malloc/free on QNX */ #endif -#include extern "C" void TrapsForSignalsCFunction(int sig); // a class for loadabple commands diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h index e42d46a..470b9c5 100644 --- a/Source/cmLoadCommandCommand.h +++ b/Source/cmLoadCommandCommand.h @@ -3,7 +3,14 @@ #ifndef cmLoadCommandCommand_h #define cmLoadCommandCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmLoadCommandCommand : public cmCommand { diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index 8b629fe..6ecd942 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -2,8 +2,18 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmOutputRequiredFilesCommand.h" -#include "cmAlgorithms.h" #include +#include + +#include "cmAlgorithms.h" +#include "cmGeneratorExpression.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmSourceFile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" + +class cmExecutionStatus; /** \class cmDependInformation * \brief Store dependency information for a single source file. diff --git a/Source/cmOutputRequiredFilesCommand.h b/Source/cmOutputRequiredFilesCommand.h index 7a81a76..6bce1b7 100644 --- a/Source/cmOutputRequiredFilesCommand.h +++ b/Source/cmOutputRequiredFilesCommand.h @@ -3,9 +3,17 @@ #ifndef cmOutputRequiredFilesCommand_h #define cmOutputRequiredFilesCommand_h +#include +#include +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" class cmDependInformation; +class cmExecutionStatus; class cmOutputRequiredFilesCommand : public cmCommand { diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx index 3a721da..b0ff68d 100644 --- a/Source/cmQTWrapCPPCommand.cxx +++ b/Source/cmQTWrapCPPCommand.cxx @@ -2,6 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmQTWrapCPPCommand.h" +#include "cmCustomCommandLines.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmQTWrapCPPCommand bool cmQTWrapCPPCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmQTWrapCPPCommand.h b/Source/cmQTWrapCPPCommand.h index 3567fb6..015f90e 100644 --- a/Source/cmQTWrapCPPCommand.h +++ b/Source/cmQTWrapCPPCommand.h @@ -3,9 +3,14 @@ #ifndef cmQTWrapCPPCommand_h #define cmQTWrapCPPCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" -#include "cmSourceFile.h" +class cmExecutionStatus; /** \class cmQTWrapCPPCommand * \brief Create moc file rules for Qt classes diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx index 3b0f083..052e633 100644 --- a/Source/cmQTWrapUICommand.cxx +++ b/Source/cmQTWrapUICommand.cxx @@ -2,6 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmQTWrapUICommand.h" +#include "cmCustomCommandLines.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmQTWrapUICommand bool cmQTWrapUICommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmQTWrapUICommand.h b/Source/cmQTWrapUICommand.h index 84b88a8..da43961 100644 --- a/Source/cmQTWrapUICommand.h +++ b/Source/cmQTWrapUICommand.h @@ -3,9 +3,14 @@ #ifndef cmQTWrapUICommand_h #define cmQTWrapUICommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" -#include "cmSourceFile.h" +class cmExecutionStatus; /** \class cmQTWrapUICommand * \brief Create .h and .cxx files rules for Qt user interfaces files diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx index 540f37f..5a52927 100644 --- a/Source/cmRemoveCommand.cxx +++ b/Source/cmRemoveCommand.cxx @@ -2,6 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmRemoveCommand.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmRemoveCommand bool cmRemoveCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmRemoveCommand.h b/Source/cmRemoveCommand.h index bf33de0..5107038 100644 --- a/Source/cmRemoveCommand.h +++ b/Source/cmRemoveCommand.h @@ -3,7 +3,14 @@ #ifndef cmRemoveCommand_h #define cmRemoveCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmRemoveCommand * \brief remove command diff --git a/Source/cmRemoveDefinitionsCommand.cxx b/Source/cmRemoveDefinitionsCommand.cxx index cae5072..f5fe2df 100644 --- a/Source/cmRemoveDefinitionsCommand.cxx +++ b/Source/cmRemoveDefinitionsCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmRemoveDefinitionsCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // cmRemoveDefinitionsCommand bool cmRemoveDefinitionsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmRemoveDefinitionsCommand.h b/Source/cmRemoveDefinitionsCommand.h index 016f5fd..c88c66d 100644 --- a/Source/cmRemoveDefinitionsCommand.h +++ b/Source/cmRemoveDefinitionsCommand.h @@ -3,7 +3,14 @@ #ifndef cmRemoveDefinitionsCommand_h #define cmRemoveDefinitionsCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmRemoveDefinitionsCommand * \brief Specify a list of compiler defines diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx index 2b176b5..ff3ec7f 100644 --- a/Source/cmSourceGroupCommand.cxx +++ b/Source/cmSourceGroupCommand.cxx @@ -2,6 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSourceGroupCommand.h" +#include + +#include "cmMakefile.h" +#include "cmSourceGroup.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmSourceGroupCommand bool cmSourceGroupCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h index e3639df..89d86dc 100644 --- a/Source/cmSourceGroupCommand.h +++ b/Source/cmSourceGroupCommand.h @@ -3,7 +3,14 @@ #ifndef cmSourceGroupCommand_h #define cmSourceGroupCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmSourceGroupCommand * \brief Adds a cmSourceGroup to the cmMakefile. diff --git a/Source/cmSubdirDependsCommand.cxx b/Source/cmSubdirDependsCommand.cxx index b5b4148..9259836 100644 --- a/Source/cmSubdirDependsCommand.cxx +++ b/Source/cmSubdirDependsCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSubdirDependsCommand.h" +#include "cmPolicies.h" + +class cmExecutionStatus; + bool cmSubdirDependsCommand::InitialPass(std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmSubdirDependsCommand.h b/Source/cmSubdirDependsCommand.h index 0f3deb6..c8d9025 100644 --- a/Source/cmSubdirDependsCommand.h +++ b/Source/cmSubdirDependsCommand.h @@ -3,7 +3,14 @@ #ifndef cmSubdirDependsCommand_h #define cmSubdirDependsCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmSubdirDependsCommand : public cmCommand { diff --git a/Source/cmTargetCompileDefinitionsCommand.cxx b/Source/cmTargetCompileDefinitionsCommand.cxx index 9f08ba7..008d1a2 100644 --- a/Source/cmTargetCompileDefinitionsCommand.cxx +++ b/Source/cmTargetCompileDefinitionsCommand.cxx @@ -2,7 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetCompileDefinitionsCommand.h" +#include + #include "cmAlgorithms.h" +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; bool cmTargetCompileDefinitionsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetCompileDefinitionsCommand.h b/Source/cmTargetCompileDefinitionsCommand.h index b49f616..69edfb2 100644 --- a/Source/cmTargetCompileDefinitionsCommand.h +++ b/Source/cmTargetCompileDefinitionsCommand.h @@ -3,7 +3,16 @@ #ifndef cmTargetCompileDefinitionsCommand_h #define cmTargetCompileDefinitionsCommand_h +#include +#include +#include + #include "cmTargetPropCommandBase.h" +#include "cmTypeMacro.h" + +class cmCommand; +class cmExecutionStatus; +class cmTarget; class cmTargetCompileDefinitionsCommand : public cmTargetPropCommandBase { diff --git a/Source/cmTargetCompileFeaturesCommand.cxx b/Source/cmTargetCompileFeaturesCommand.cxx index 7636347..a1c9b82 100644 --- a/Source/cmTargetCompileFeaturesCommand.cxx +++ b/Source/cmTargetCompileFeaturesCommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetCompileFeaturesCommand.h" +#include +#include + #include "cmAlgorithms.h" +#include "cmMakefile.h" +#include "cmake.h" + +class cmExecutionStatus; +class cmTarget; bool cmTargetCompileFeaturesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetCompileFeaturesCommand.h b/Source/cmTargetCompileFeaturesCommand.h index 8273e02..275df43 100644 --- a/Source/cmTargetCompileFeaturesCommand.h +++ b/Source/cmTargetCompileFeaturesCommand.h @@ -3,7 +3,16 @@ #ifndef cmTargetCompileFeaturesCommand_h #define cmTargetCompileFeaturesCommand_h +#include +#include +#include + #include "cmTargetPropCommandBase.h" +#include "cmTypeMacro.h" + +class cmCommand; +class cmExecutionStatus; +class cmTarget; class cmTargetCompileFeaturesCommand : public cmTargetPropCommandBase { diff --git a/Source/cmTargetCompileOptionsCommand.cxx b/Source/cmTargetCompileOptionsCommand.cxx index eb66dd3..a4db55b 100644 --- a/Source/cmTargetCompileOptionsCommand.cxx +++ b/Source/cmTargetCompileOptionsCommand.cxx @@ -2,7 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetCompileOptionsCommand.h" +#include +#include + #include "cmAlgorithms.h" +#include "cmListFileCache.h" +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; bool cmTargetCompileOptionsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetCompileOptionsCommand.h b/Source/cmTargetCompileOptionsCommand.h index f5b4c70..d1a9d5b 100644 --- a/Source/cmTargetCompileOptionsCommand.h +++ b/Source/cmTargetCompileOptionsCommand.h @@ -3,7 +3,16 @@ #ifndef cmTargetCompileOptionsCommand_h #define cmTargetCompileOptionsCommand_h +#include +#include +#include + #include "cmTargetPropCommandBase.h" +#include "cmTypeMacro.h" + +class cmCommand; +class cmExecutionStatus; +class cmTarget; class cmTargetCompileOptionsCommand : public cmTargetPropCommandBase { diff --git a/Source/cmTargetIncludeDirectoriesCommand.cxx b/Source/cmTargetIncludeDirectoriesCommand.cxx index 37b9598..65a3149 100644 --- a/Source/cmTargetIncludeDirectoriesCommand.cxx +++ b/Source/cmTargetIncludeDirectoriesCommand.cxx @@ -2,7 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetIncludeDirectoriesCommand.h" +#include +#include + #include "cmGeneratorExpression.h" +#include "cmListFileCache.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; bool cmTargetIncludeDirectoriesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetIncludeDirectoriesCommand.h b/Source/cmTargetIncludeDirectoriesCommand.h index 671627a..e206823 100644 --- a/Source/cmTargetIncludeDirectoriesCommand.h +++ b/Source/cmTargetIncludeDirectoriesCommand.h @@ -3,7 +3,16 @@ #ifndef cmTargetIncludeDirectoriesCommand_h #define cmTargetIncludeDirectoriesCommand_h +#include +#include +#include + #include "cmTargetPropCommandBase.h" +#include "cmTypeMacro.h" + +class cmCommand; +class cmExecutionStatus; +class cmTarget; class cmTargetIncludeDirectoriesCommand : public cmTargetPropCommandBase { diff --git a/Source/cmTargetSourcesCommand.cxx b/Source/cmTargetSourcesCommand.cxx index 2170247..13c9a8f 100644 --- a/Source/cmTargetSourcesCommand.cxx +++ b/Source/cmTargetSourcesCommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetSourcesCommand.h" -#include "cmGeneratorExpression.h" +#include +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; bool cmTargetSourcesCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmTargetSourcesCommand.h b/Source/cmTargetSourcesCommand.h index 8f88b25..fa5738a 100644 --- a/Source/cmTargetSourcesCommand.h +++ b/Source/cmTargetSourcesCommand.h @@ -3,7 +3,16 @@ #ifndef cmTargetSourcesCommand_h #define cmTargetSourcesCommand_h +#include +#include +#include + #include "cmTargetPropCommandBase.h" +#include "cmTypeMacro.h" + +class cmCommand; +class cmExecutionStatus; +class cmTarget; class cmTargetSourcesCommand : public cmTargetPropCommandBase { diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx index e2b6b1a..ffeaa51 100644 --- a/Source/cmUseMangledMesaCommand.cxx +++ b/Source/cmUseMangledMesaCommand.cxx @@ -2,11 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUseMangledMesaCommand.h" -#include "cmSystemTools.h" - #include #include +#include "cmPolicies.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + bool cmUseMangledMesaCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { diff --git a/Source/cmUseMangledMesaCommand.h b/Source/cmUseMangledMesaCommand.h index a5fa146..bf6352c 100644 --- a/Source/cmUseMangledMesaCommand.h +++ b/Source/cmUseMangledMesaCommand.h @@ -3,7 +3,14 @@ #ifndef cmUseMangledMesaCommand_h #define cmUseMangledMesaCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmUseMangledMesaCommand : public cmCommand { diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index c816114..f98d512 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUtilitySourceCommand.h" +#include + +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" #include "cmState.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; // cmUtilitySourceCommand bool cmUtilitySourceCommand::InitialPass(std::vector const& args, diff --git a/Source/cmUtilitySourceCommand.h b/Source/cmUtilitySourceCommand.h index 6ee5f3e..7d12313 100644 --- a/Source/cmUtilitySourceCommand.h +++ b/Source/cmUtilitySourceCommand.h @@ -3,7 +3,14 @@ #ifndef cmUtilitySourceCommand_h #define cmUtilitySourceCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmUtilitySourceCommand : public cmCommand { diff --git a/Source/cmVariableRequiresCommand.cxx b/Source/cmVariableRequiresCommand.cxx index 7599551..1eb1f20 100644 --- a/Source/cmVariableRequiresCommand.cxx +++ b/Source/cmVariableRequiresCommand.cxx @@ -2,7 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmVariableRequiresCommand.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; // cmLibraryCommand bool cmVariableRequiresCommand::InitialPass( diff --git a/Source/cmVariableRequiresCommand.h b/Source/cmVariableRequiresCommand.h index e40151b..62f89da 100644 --- a/Source/cmVariableRequiresCommand.h +++ b/Source/cmVariableRequiresCommand.h @@ -3,7 +3,14 @@ #ifndef cmVariableRequiresCommand_h #define cmVariableRequiresCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; class cmVariableRequiresCommand : public cmCommand { diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx index 5c1e00a..90b0b28 100644 --- a/Source/cmVariableWatchCommand.cxx +++ b/Source/cmVariableWatchCommand.cxx @@ -2,7 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmVariableWatchCommand.h" +#include + +#include "cmExecutionStatus.h" +#include "cmListFileCache.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" #include "cmVariableWatch.h" +#include "cmake.h" struct cmVariableWatchCallbackData { diff --git a/Source/cmVariableWatchCommand.h b/Source/cmVariableWatchCommand.h index b1862f0..5f5cba8 100644 --- a/Source/cmVariableWatchCommand.h +++ b/Source/cmVariableWatchCommand.h @@ -3,7 +3,15 @@ #ifndef cmVariableWatchCommand_h #define cmVariableWatchCommand_h +#include +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmVariableWatchCommand * \brief Watch when the variable changes and invoke command diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx index 0bdef0f..b3ac31c 100644 --- a/Source/cmWriteFileCommand.cxx +++ b/Source/cmWriteFileCommand.cxx @@ -8,6 +8,11 @@ // include sys/stat.h after sys/types.h #include +#include "cmMakefile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; + // cmLibraryCommand bool cmWriteFileCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmWriteFileCommand.h b/Source/cmWriteFileCommand.h index dbadf84..c6a30b0 100644 --- a/Source/cmWriteFileCommand.h +++ b/Source/cmWriteFileCommand.h @@ -3,7 +3,14 @@ #ifndef cmWriteFileCommand_h #define cmWriteFileCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTypeMacro.h" + +class cmExecutionStatus; /** \class cmWriteFileCommand * \brief Writes a message to a file ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:16:36 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:16:36 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-298-g1ae2c23 Message-ID: <20161024141636.5C9FEF6FA2@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 1ae2c232b652b69bb7605eae765a86c3bb520b8f (commit) via 1a74e719068c97518d6f9521c86862a17166f32e (commit) from 9a901dc78de32519dae234719370b5330d5564b4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ae2c232b652b69bb7605eae765a86c3bb520b8f commit 1ae2c232b652b69bb7605eae765a86c3bb520b8f Merge: 9a901dc 1a74e71 Author: Brad King AuthorDate: Mon Oct 24 10:16:33 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:16:33 2016 -0400 Merge topic 'cm_unordered_map' 1a74e719 Introduce CM_UNORDERED_MAP ----------------------------------------------------------------------- Summary of changes: Source/cmDefinitions.h | 21 ++------------------- Source/cmFileTimeComparison.cxx | 34 ++-------------------------------- Source/cmGlobalGenerator.h | 25 ++++--------------------- Source/cmMakefile.h | 31 ++++--------------------------- Source/cmTarget.h | 19 ++----------------- Source/cm_unordered_map.hxx | 25 +++++++++++++++++++++++++ Source/cmake.cxx | 7 ++----- 7 files changed, 41 insertions(+), 121 deletions(-) create mode 100644 Source/cm_unordered_map.hxx hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:16:39 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:16:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-300-g3d5ec79 Message-ID: <20161024141639.4E30BF6FAB@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 3d5ec790eea47a91c6f70d172c42839db02b8467 (commit) via 295c8efa359cbee22e45e6e9358990209b35aa39 (commit) from 1ae2c232b652b69bb7605eae765a86c3bb520b8f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d5ec790eea47a91c6f70d172c42839db02b8467 commit 3d5ec790eea47a91c6f70d172c42839db02b8467 Merge: 1ae2c23 295c8ef Author: Brad King AuthorDate: Mon Oct 24 10:16:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:16:37 2016 -0400 Merge topic 'android-link-exe' 295c8efa Android: Add missing link flags for device executables ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android-Common.cmake | 4 ++++ Modules/Platform/Android/abi-arm64-v8a-Clang.cmake | 3 +++ Modules/Platform/Android/abi-arm64-v8a-GNU.cmake | 3 +++ Modules/Platform/Android/abi-common.cmake | 6 ++++++ 4 files changed, 16 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:16:42 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:16:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-308-gb899c0a Message-ID: <20161024141642.BA918F6FB8@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 b899c0a92f6833c4996276d86d9e0fb3d42df77c (commit) via 569509f4bfbf44c67e237a01f957fdfe52223cfa (commit) via 6c9b3b5c03b41842d3d79c1bd80691be7e5c6f89 (commit) via 8483dab8e16b9734ac7d2b90b95d474ce8502e40 (commit) via 4fb70919a57582e4ca7c2a9f6bc4f72b38f9af86 (commit) via 608afd4f62f57fe3f9dcac1e9cc94b8bd1adf9c6 (commit) via 64f9c282f3337335c05a062f341fd5155cade51c (commit) via f69e768d94ff5e0238cbb924836737c4ce11a930 (commit) from 3d5ec790eea47a91c6f70d172c42839db02b8467 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b899c0a92f6833c4996276d86d9e0fb3d42df77c commit b899c0a92f6833c4996276d86d9e0fb3d42df77c Merge: 3d5ec79 569509f Author: Brad King AuthorDate: Mon Oct 24 10:16:40 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:16:40 2016 -0400 Merge topic 'separate-compilation' 569509f4 Fix newly discovered clang-tidy issues 6c9b3b5c cmCommand: implement functions in cxx file 8483dab8 bootstrap: Sort source files lexicographically 4fb70919 Create all commands from a single function 608afd4f Separate compilation for commands included in cmBootstrapCommands2 64f9c282 Separate compilation for commands included in cmBootstrapCommands1 f69e768d Separate compilation for commands included in cmCommands ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 287 +++++++++++++++++++----- Source/cmAddCompileOptionsCommand.cxx | 4 + Source/cmAddCompileOptionsCommand.h | 7 + Source/cmAddExecutableCommand.cxx | 2 + Source/cmAddLibraryCommand.cxx | 6 +- Source/cmAddSubDirectoryCommand.cxx | 2 + Source/cmAuxSourceDirectoryCommand.cxx | 10 +- Source/cmAuxSourceDirectoryCommand.h | 7 + Source/cmBootstrapCommands1.cxx | 87 ------- Source/cmBootstrapCommands2.cxx | 94 -------- Source/cmBuildNameCommand.cxx | 8 + Source/cmBuildNameCommand.h | 7 + Source/cmCMakeHostSystemInformationCommand.cxx | 7 + Source/cmCMakeHostSystemInformationCommand.h | 11 +- Source/cmCMakeMinimumRequired.cxx | 1 + Source/cmCPluginAPI.cxx | 6 +- Source/cmCommand.cxx | 48 ++++ Source/cmCommand.h | 48 +--- Source/cmCommands.cxx | 238 ++++++++++++++++++++ Source/cmCommands.cxx.in | 10 - Source/cmCommands.h | 10 +- Source/cmCommandsForBootstrap.cxx | 7 - Source/cmConditionEvaluator.cxx | 12 +- Source/cmConfigureFileCommand.cxx | 2 + Source/cmContinueCommand.cxx | 3 + Source/cmCreateTestSourceList.cxx | 1 + Source/cmElseIfCommand.cxx | 2 + Source/cmElseIfCommand.h | 9 +- Source/cmExportCommand.cxx | 18 +- Source/cmExportCommand.h | 8 +- Source/cmExportLibraryDependenciesCommand.cxx | 12 +- Source/cmExportLibraryDependenciesCommand.h | 7 + Source/cmFLTKWrapUICommand.cxx | 8 + Source/cmFLTKWrapUICommand.h | 8 + Source/cmFileCommand.cxx | 8 +- Source/cmFindBase.cxx | 3 +- Source/cmFindCommon.cxx | 2 + Source/cmFindLibraryCommand.cxx | 4 + Source/cmFindPackageCommand.cxx | 19 +- Source/cmFindPathCommand.cxx | 2 + Source/cmFindProgramCommand.cxx | 2 + Source/cmForEachCommand.cxx | 2 + Source/cmFunctionCommand.cxx | 2 + Source/cmGetCMakePropertyCommand.cxx | 1 + Source/cmGetDirectoryPropertyCommand.cxx | 2 + Source/cmHexFileConverter.cxx | 4 +- Source/cmIfCommand.cxx | 1 + Source/cmIncludeCommand.cxx | 3 + Source/cmIncludeDirectoryCommand.cxx | 2 + Source/cmIncludeExternalMSProjectCommand.cxx | 6 + Source/cmIncludeExternalMSProjectCommand.h | 7 + Source/cmInstallCommand.cxx | 2 + Source/cmInstallFilesCommand.cxx | 2 + Source/cmInstallProgramsCommand.cxx | 8 + Source/cmInstallProgramsCommand.h | 7 + Source/cmInstallTargetsCommand.cxx | 2 + Source/cmLinkDirectoriesCommand.cxx | 2 + Source/cmLinkLibrariesCommand.cxx | 4 + Source/cmLinkLibrariesCommand.h | 7 + Source/cmListCommand.cxx | 1 + Source/cmLoadCacheCommand.cxx | 8 +- Source/cmLoadCacheCommand.h | 8 + Source/cmLoadCommandCommand.cxx | 13 +- Source/cmLoadCommandCommand.h | 7 + Source/cmMacroCommand.cxx | 2 + Source/cmMakeDirectoryCommand.cxx | 2 + Source/cmMarkAsAdvancedCommand.cxx | 3 + Source/cmMessageCommand.cxx | 1 + Source/cmOptionCommand.cxx | 3 + Source/cmOutputRequiredFilesCommand.cxx | 12 +- Source/cmOutputRequiredFilesCommand.h | 8 + Source/cmParseArgumentsCommand.cxx | 1 + Source/cmProjectCommand.cxx | 2 + Source/cmQTWrapCPPCommand.cxx | 7 + Source/cmQTWrapCPPCommand.h | 7 +- Source/cmQTWrapUICommand.cxx | 7 + Source/cmQTWrapUICommand.h | 7 +- Source/cmRemoveCommand.cxx | 5 + Source/cmRemoveCommand.h | 7 + Source/cmRemoveDefinitionsCommand.cxx | 4 + Source/cmRemoveDefinitionsCommand.h | 7 + Source/cmReturnCommand.cxx | 2 + Source/cmSearchPath.cxx | 1 + Source/cmSeparateArgumentsCommand.cxx | 2 + Source/cmSetCommand.cxx | 3 + Source/cmSetPropertyCommand.cxx | 4 + Source/cmSetSourceFilesPropertiesCommand.cxx | 1 + Source/cmSiteNameCommand.cxx | 2 + Source/cmSourceGroupCommand.cxx | 8 + Source/cmSourceGroupCommand.h | 7 + Source/cmStringCommand.cxx | 1 + Source/cmSubdirCommand.cxx | 2 + Source/cmSubdirDependsCommand.cxx | 4 + Source/cmSubdirDependsCommand.h | 7 + Source/cmTargetCompileDefinitionsCommand.cxx | 7 + Source/cmTargetCompileDefinitionsCommand.h | 9 + Source/cmTargetCompileFeaturesCommand.cxx | 8 + Source/cmTargetCompileFeaturesCommand.h | 9 + Source/cmTargetCompileOptionsCommand.cxx | 9 + Source/cmTargetCompileOptionsCommand.h | 9 + Source/cmTargetIncludeDirectoriesCommand.cxx | 10 + Source/cmTargetIncludeDirectoriesCommand.h | 9 + Source/cmTargetLinkLibrariesCommand.cxx | 3 + Source/cmTargetSourcesCommand.cxx | 10 +- Source/cmTargetSourcesCommand.h | 9 + Source/cmTimestamp.cxx | 2 + Source/cmTryRunCommand.cxx | 3 + Source/cmUnsetCommand.cxx | 2 + Source/cmUseMangledMesaCommand.cxx | 7 +- Source/cmUseMangledMesaCommand.h | 7 + Source/cmUtilitySourceCommand.cxx | 8 + Source/cmUtilitySourceCommand.h | 7 + Source/cmVariableRequiresCommand.cxx | 5 + Source/cmVariableRequiresCommand.h | 7 + Source/cmVariableWatchCommand.cxx | 7 + Source/cmVariableWatchCommand.h | 8 + Source/cmWhileCommand.cxx | 1 + Source/cmWriteFileCommand.cxx | 5 + Source/cmWriteFileCommand.h | 7 + Source/cmake.cxx | 7 +- bootstrap | 192 +++++++++++----- 121 files changed, 1225 insertions(+), 409 deletions(-) delete mode 100644 Source/cmBootstrapCommands1.cxx delete mode 100644 Source/cmBootstrapCommands2.cxx create mode 100644 Source/cmCommand.cxx create mode 100644 Source/cmCommands.cxx delete mode 100644 Source/cmCommands.cxx.in delete mode 100644 Source/cmCommandsForBootstrap.cxx hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:16:46 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:16:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-314-gc1b96fd Message-ID: <20161024141646.6528BF6FB9@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 c1b96fddf835d5faf27698d5a1637bd1507274e0 (commit) via 2214011f7b3b13fe7ae0f68f0f9d49af11e12edd (commit) via 7f9a8d53aa8a3595f4f1f2f81607f8df3627642d (commit) via fb0b087c4dc65f18aef431e41de3aa9b91e35371 (commit) via 2169b0faa40a20cd9aae25f9170cca074579a023 (commit) via 9855ebf11a1556bd0b73a1eaec39232842871528 (commit) from b899c0a92f6833c4996276d86d9e0fb3d42df77c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c1b96fddf835d5faf27698d5a1637bd1507274e0 commit c1b96fddf835d5faf27698d5a1637bd1507274e0 Merge: b899c0a 2214011 Author: Brad King AuthorDate: Mon Oct 24 10:16:43 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:16:43 2016 -0400 Merge topic 'remove-cmobject-uses' 2214011f Make cmCPackGenerator not inherit from cmObject 7f9a8d53 Make cmCPackGeneratorFactory not inherit from cmObject fb0b087c Make cmCTestGenericHandler not inherit from cmObject 2169b0fa Make cmCPackLog not inherit from cmObject 9855ebf1 Make cmCommand not inherit from cmObject ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackArchiveGenerator.h | 2 +- Source/CPack/cmCPackGenerator.h | 9 +++++---- Source/CPack/cmCPackGeneratorFactory.h | 6 ++---- Source/CPack/cmCPackLog.h | 6 ++---- Source/CTest/cmCTestBuildAndTestHandler.h | 2 +- Source/CTest/cmCTestBuildCommand.h | 2 -- Source/CTest/cmCTestBuildHandler.h | 2 +- Source/CTest/cmCTestCommand.h | 2 -- Source/CTest/cmCTestConfigureCommand.h | 2 -- Source/CTest/cmCTestConfigureHandler.h | 2 +- Source/CTest/cmCTestCoverageCommand.h | 2 +- Source/CTest/cmCTestCoverageHandler.h | 2 +- Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h | 2 -- Source/CTest/cmCTestGenericHandler.h | 4 ++-- Source/CTest/cmCTestHandlerCommand.h | 2 -- Source/CTest/cmCTestMemCheckCommand.h | 2 -- Source/CTest/cmCTestMemCheckHandler.h | 2 +- Source/CTest/cmCTestReadCustomFilesCommand.h | 2 -- Source/CTest/cmCTestRunScriptCommand.h | 2 -- Source/CTest/cmCTestScriptHandler.h | 2 +- Source/CTest/cmCTestSleepCommand.h | 2 -- Source/CTest/cmCTestStartCommand.h | 2 -- Source/CTest/cmCTestSubmitCommand.h | 2 +- Source/CTest/cmCTestSubmitHandler.h | 2 +- Source/CTest/cmCTestTestCommand.h | 2 -- Source/CTest/cmCTestTestHandler.cxx | 8 -------- Source/CTest/cmCTestTestHandler.h | 2 +- Source/CTest/cmCTestUpdateCommand.h | 2 -- Source/CTest/cmCTestUpdateHandler.h | 2 +- Source/CTest/cmCTestUploadCommand.h | 2 +- Source/CTest/cmCTestUploadHandler.h | 2 +- Source/cmAddCompileOptionsCommand.h | 2 -- Source/cmAddCustomCommandCommand.h | 2 -- Source/cmAddCustomTargetCommand.h | 2 -- Source/cmAddDefinitionsCommand.h | 2 -- Source/cmAddDependenciesCommand.h | 2 -- Source/cmAddExecutableCommand.h | 2 -- Source/cmAddLibraryCommand.h | 2 -- Source/cmAddSubDirectoryCommand.h | 2 -- Source/cmAddTestCommand.h | 2 -- Source/cmAuxSourceDirectoryCommand.h | 2 -- Source/cmBreakCommand.h | 2 -- Source/cmBuildCommand.h | 2 -- Source/cmBuildNameCommand.h | 1 - Source/cmCMakeHostSystemInformationCommand.h | 2 -- Source/cmCMakeMinimumRequired.h | 2 -- Source/cmCMakePolicyCommand.h | 2 -- Source/cmCommand.h | 14 +++++--------- Source/cmConfigureFileCommand.h | 2 -- Source/cmContinueCommand.h | 2 -- Source/cmCoreTryCompile.h | 2 -- Source/cmCreateTestSourceList.h | 2 -- Source/cmDefinePropertyCommand.h | 2 -- Source/cmElseCommand.h | 2 -- Source/cmElseIfCommand.h | 2 -- Source/cmEnableLanguageCommand.h | 2 -- Source/cmEnableTestingCommand.h | 2 -- Source/cmEndForEachCommand.h | 2 -- Source/cmEndFunctionCommand.h | 2 -- Source/cmEndIfCommand.h | 2 -- Source/cmEndMacroCommand.h | 2 -- Source/cmEndWhileCommand.h | 2 -- Source/cmExecProgramCommand.h | 2 -- Source/cmExecuteProcessCommand.h | 2 -- Source/cmExportCommand.h | 2 -- Source/cmExportLibraryDependenciesCommand.h | 1 - Source/cmFLTKWrapUICommand.h | 2 -- Source/cmFileCommand.h | 2 -- Source/cmFindBase.h | 1 - Source/cmFindCommon.h | 1 - Source/cmFindFileCommand.h | 2 -- Source/cmFindLibraryCommand.h | 2 -- Source/cmFindPackageCommand.h | 2 -- Source/cmFindPathCommand.h | 1 - Source/cmFindProgramCommand.h | 2 -- Source/cmForEachCommand.h | 2 -- Source/cmFunctionCommand.cxx | 9 ++------- Source/cmFunctionCommand.h | 2 -- Source/cmGetCMakePropertyCommand.h | 2 -- Source/cmGetDirectoryPropertyCommand.h | 2 -- Source/cmGetFilenameComponentCommand.h | 2 -- Source/cmGetPropertyCommand.h | 2 -- Source/cmGetSourceFilePropertyCommand.h | 2 -- Source/cmGetTargetPropertyCommand.h | 2 -- Source/cmGetTestPropertyCommand.h | 2 -- Source/cmIfCommand.h | 2 -- Source/cmIncludeCommand.h | 2 -- Source/cmIncludeDirectoryCommand.h | 2 -- Source/cmIncludeExternalMSProjectCommand.h | 2 -- Source/cmIncludeRegularExpressionCommand.h | 2 -- Source/cmInstallCommand.h | 2 -- Source/cmInstallFilesCommand.h | 2 -- Source/cmInstallProgramsCommand.h | 2 -- Source/cmInstallTargetsCommand.h | 2 -- Source/cmLinkDirectoriesCommand.h | 2 -- Source/cmLinkLibrariesCommand.h | 2 -- Source/cmListCommand.h | 2 -- Source/cmLoadCacheCommand.h | 2 -- Source/cmLoadCommandCommand.cxx | 2 -- Source/cmLoadCommandCommand.h | 1 - Source/cmMacroCommand.cxx | 9 ++------- Source/cmMacroCommand.h | 2 -- Source/cmMakeDirectoryCommand.h | 2 -- Source/cmMarkAsAdvancedCommand.h | 2 -- Source/cmMathCommand.h | 2 -- Source/cmMessageCommand.h | 2 -- Source/cmOptionCommand.h | 2 -- Source/cmOutputRequiredFilesCommand.h | 1 - Source/cmParseArgumentsCommand.h | 2 -- Source/cmProjectCommand.h | 2 -- Source/cmQTWrapCPPCommand.h | 2 -- Source/cmQTWrapUICommand.h | 1 - Source/cmRemoveCommand.h | 2 -- Source/cmRemoveDefinitionsCommand.h | 2 -- Source/cmReturnCommand.h | 2 -- Source/cmSeparateArgumentsCommand.h | 2 -- Source/cmSetCommand.h | 2 -- Source/cmSetDirectoryPropertiesCommand.h | 2 -- Source/cmSetPropertyCommand.h | 2 -- Source/cmSetSourceFilesPropertiesCommand.h | 2 -- Source/cmSetTargetPropertiesCommand.h | 2 -- Source/cmSetTestsPropertiesCommand.h | 2 -- Source/cmSiteNameCommand.h | 2 -- Source/cmSourceGroupCommand.h | 2 -- Source/cmState.cxx | 3 +-- Source/cmStringCommand.h | 2 -- Source/cmSubdirCommand.h | 2 -- Source/cmSubdirDependsCommand.h | 1 - Source/cmTargetCompileDefinitionsCommand.h | 2 -- Source/cmTargetCompileFeaturesCommand.h | 2 -- Source/cmTargetCompileOptionsCommand.h | 2 -- Source/cmTargetIncludeDirectoriesCommand.h | 2 -- Source/cmTargetLinkLibrariesCommand.h | 2 -- Source/cmTargetPropCommandBase.h | 2 -- Source/cmTargetSourcesCommand.h | 2 -- Source/cmTryCompileCommand.h | 2 -- Source/cmTryRunCommand.h | 2 -- Source/cmUnsetCommand.h | 2 -- Source/cmUseMangledMesaCommand.h | 1 - Source/cmUtilitySourceCommand.h | 1 - Source/cmVariableRequiresCommand.h | 1 - Source/cmVariableWatchCommand.h | 2 -- Source/cmWhileCommand.h | 2 -- Source/cmWriteFileCommand.h | 2 -- 144 files changed, 35 insertions(+), 291 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:16:49 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:16:49 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-316-g21f4492 Message-ID: <20161024141649.19780F6FBA@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 21f449214d9bf4c8fa99b3a90029cff2171e3fac (commit) via e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f (commit) from c1b96fddf835d5faf27698d5a1637bd1507274e0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21f449214d9bf4c8fa99b3a90029cff2171e3fac commit 21f449214d9bf4c8fa99b3a90029cff2171e3fac Merge: c1b96fd e3770c5 Author: Brad King AuthorDate: Mon Oct 24 10:16:47 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:16:47 2016 -0400 Merge topic 'parallel-boostrap-test' e3770c56 BootstrapTest: Use --parallel=... argument. ----------------------------------------------------------------------- Summary of changes: Tests/BootstrapTest.cmake | 9 +++++++-- Tests/CMakeLists.txt | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:17:20 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:17:20 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-704-gc9c6138 Message-ID: <20161024141720.D714FF6FE3@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 c9c61385c9710e273c2287a0d5ced8080e5bc908 (commit) via 21f449214d9bf4c8fa99b3a90029cff2171e3fac (commit) via c1b96fddf835d5faf27698d5a1637bd1507274e0 (commit) via b899c0a92f6833c4996276d86d9e0fb3d42df77c (commit) via 3d5ec790eea47a91c6f70d172c42839db02b8467 (commit) via 1ae2c232b652b69bb7605eae765a86c3bb520b8f (commit) via 9a901dc78de32519dae234719370b5330d5564b4 (commit) via aae5a9feb1b07bfae6968f2dfb3b3057a04b3c89 (commit) via af782d021345506bb4e0d1e832a7b77fb8a0b12a (commit) from 82876f13bc5d093e450895ee72d4ac4f38988f71 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9c61385c9710e273c2287a0d5ced8080e5bc908 commit c9c61385c9710e273c2287a0d5ced8080e5bc908 Merge: 82876f1 21f4492 Author: Brad King AuthorDate: Mon Oct 24 10:17:12 2016 -0400 Commit: Brad King CommitDate: Mon Oct 24 10:17:12 2016 -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 Oct 24 10:19:33 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:19:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-706-g1732d14 Message-ID: <20161024141933.79D99F7262@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 1732d1498b32e173dcf9642964fd7128f04397d0 (commit) via c401f95888938562881cd5d7c21ccea5974fe130 (commit) from c9c61385c9710e273c2287a0d5ced8080e5bc908 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1732d1498b32e173dcf9642964fd7128f04397d0 commit 1732d1498b32e173dcf9642964fd7128f04397d0 Merge: c9c6138 c401f95 Author: Brad King AuthorDate: Mon Oct 24 10:19:32 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:19:32 2016 -0400 Merge topic 'cmcommand-no-disable' into next c401f958 Remove cmCommand::Enabled and all related accessors https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c401f95888938562881cd5d7c21ccea5974fe130 commit c401f95888938562881cd5d7c21ccea5974fe130 Author: Daniel Pfeifer AuthorDate: Sun Oct 23 08:55:19 2016 +0200 Commit: Brad King CommitDate: Mon Oct 24 10:19:09 2016 -0400 Remove cmCommand::Enabled and all related accessors Enabled is never set to false. Remove the member variable and all related getters and setters. diff --git a/Source/cmCommand.h b/Source/cmCommand.h index 65bb7c5..b263a61 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -23,11 +23,10 @@ class cmCommand { public: /** - * Construct the command. By default it is enabled with no makefile. + * Construct the command. By default it has no makefile. */ cmCommand() : Makefile(CM_NULLPTR) - , Enabled(true) { } @@ -92,26 +91,6 @@ public: virtual std::string GetName() const = 0; /** - * Enable the command. - */ - void EnabledOn() { this->Enabled = true; } - - /** - * Disable the command. - */ - void EnabledOff() { this->Enabled = false; } - - /** - * Query whether the command is enabled. - */ - bool GetEnabled() const { return this->Enabled; } - - /** - * Disable or enable the command. - */ - void SetEnabled(bool enabled) { this->Enabled = enabled; } - - /** * Return the last error string. */ const char* GetError(); @@ -129,7 +108,6 @@ protected: cmCommandArgumentsHelper Helper; private: - bool Enabled; std::string Error; }; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 00c0e82..741ffb8 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -266,7 +266,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, pcmd->SetMakefile(this); // Decide whether to invoke the command. - if (pcmd->GetEnabled() && !cmSystemTools::GetFatalErrorOccured() && + if (!cmSystemTools::GetFatalErrorOccured() && (this->GetCMakeInstance()->GetWorkingMode() != cmake::SCRIPT_MODE || pcmd->IsScriptable())) ----------------------------------------------------------------------- Summary of changes: Source/cmCommand.h | 24 +----------------------- Source/cmMakefile.cxx | 2 +- 2 files changed, 2 insertions(+), 24 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:20:52 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:20:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-318-g92be048 Message-ID: <20161024142052.B5C2FF728F@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 92be048b7f40f4ca352bc0ef85c8e1bf4dfc0702 (commit) via c401f95888938562881cd5d7c21ccea5974fe130 (commit) from 21f449214d9bf4c8fa99b3a90029cff2171e3fac (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92be048b7f40f4ca352bc0ef85c8e1bf4dfc0702 commit 92be048b7f40f4ca352bc0ef85c8e1bf4dfc0702 Merge: 21f4492 c401f95 Author: Brad King AuthorDate: Mon Oct 24 10:20:50 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:20:50 2016 -0400 Merge topic 'cmcommand-no-disable' c401f958 Remove cmCommand::Enabled and all related accessors ----------------------------------------------------------------------- Summary of changes: Source/cmCommand.h | 24 +----------------------- Source/cmMakefile.cxx | 2 +- 2 files changed, 2 insertions(+), 24 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:21:07 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:21:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-708-g94b9567 Message-ID: <20161024142107.82F37F72A8@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 94b9567e93acf6740f78acb49b6efec097ad56dd (commit) via 92be048b7f40f4ca352bc0ef85c8e1bf4dfc0702 (commit) from 1732d1498b32e173dcf9642964fd7128f04397d0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=94b9567e93acf6740f78acb49b6efec097ad56dd commit 94b9567e93acf6740f78acb49b6efec097ad56dd Merge: 1732d14 92be048 Author: Brad King AuthorDate: Mon Oct 24 10:21:00 2016 -0400 Commit: Brad King CommitDate: Mon Oct 24 10:21:00 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:28:09 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:28:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-710-g74e42fb Message-ID: <20161024142809.184E8F74BD@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 74e42fbdb1619cc2d68f08910aaae96a78142058 (commit) via 48189697eb2ac97407cf4ffc0d2f3e600f3cd6ac (commit) from 94b9567e93acf6740f78acb49b6efec097ad56dd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74e42fbdb1619cc2d68f08910aaae96a78142058 commit 74e42fbdb1619cc2d68f08910aaae96a78142058 Merge: 94b9567 4818969 Author: Brad King AuthorDate: Mon Oct 24 10:28:08 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:28:08 2016 -0400 Merge topic 'doc-cmake-server-typos' into next 48189697 Help: Fix cmake-server documentation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=48189697eb2ac97407cf4ffc0d2f3e600f3cd6ac commit 48189697eb2ac97407cf4ffc0d2f3e600f3cd6ac Author: Tobias Hunger AuthorDate: Fri Oct 21 19:11:41 2016 +0200 Commit: Brad King CommitDate: Fri Oct 21 13:37:10 2016 -0400 Help: Fix cmake-server documentation Some information was not updated to reflect the latest implementation. Reported-by: Sylvain Joubert diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index afd4e2b..5eec009 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -250,7 +250,9 @@ This is the only message ever sent by the server that is not of type "reply", It will contain "supportedProtocolVersions" with an array of server protocol versions supported by the cmake server. These are JSON objects with "major" and -"minor" keys containing non-negative integer values. +"minor" keys containing non-negative integer values. Some versions may be marked +as experimental. These will contain the "isExperimental" key set to true. Enabling +these requires a special command line argument when starting the cmake server mode. Example:: @@ -403,7 +405,7 @@ CMake will reply like this (after reporting progress for some time):: Type "compute" ^^^^^^^^^^^^^^ -This requist will generate build system files in the build directory and +This request will generate build system files in the build directory and is only available after a project was successfully "configure"d. Example:: @@ -426,8 +428,19 @@ The "codemodel" request can be used after a project was "compute"d successfully. It will list the complete project structure as it is known to cmake. -The reply will contain a key "projects", which will contain a list of -project objects, one for each (sub-)project defined in the cmake build system. +The reply will contain a key "configurations", which will contain a list of +configuration objects. Configuration objects are used to destinquish between +different configurations the build directory might have enabled. While most +generators only support one configuration, others might support several. + +Each configuration object can have the following keys: + +"name" + contains the name of the configuration. The name may be empty. +"projects" + contains a list of project objects, one for each build project. + +Project objects define one (sub-)project defined in the cmake build system. Each project object can have the following keys: @@ -437,19 +450,8 @@ Each project object can have the following keys: contains the current source directory "buildDirectory" contains the current build directory. -"configurations" - contains a list of configuration objects. - -Configuration objects are used to destinquish between different -configurations the build directory might have enabled. While most generators -only support one configuration, others support several. - -Each configuration object can have the following keys: - -"name" - contains the name of the configuration. The name may be empty. "targets" - contains a list of target objects, one for each build target. + contains a list of build system target objects. Target objects define individual build targets for a certain configuration. @@ -520,88 +522,53 @@ sourceDirectory of the target. Example:: [== CMake Server ==[ - {"type":"project"} + {"type":"codemodel"} ]== CMake Server ==] CMake will reply:: [== CMake Server ==[ { - "cookie":"", - "type":"reply", - "inReplyTo":"project", - - "projects": - [ + "configurations": [ { - "name":"CMAKE_FORM", - "sourceDirectory":"/home/code/src/cmake/Source/CursesDialog/form" - "buildDirectory":"/tmp/cmake-build-test/Source/CursesDialog/form", - "configurations": - [ + "name": "", + "projects": [ { - "name":"", - "targets": - [ + "buildDirectory": "/tmp/build/Source/CursesDialog/form", + "name": "CMAKE_FORM", + "sourceDirectory": "/home/code/src/cmake/Source/CursesDialog/form", + "targets": [ { - "artifactDirectory":"/tmp/cmake/Source/CursesDialog/form", - "fileGroups": - [ + "artifacts": [ "/tmp/build/Source/CursesDialog/form/libcmForm.a" ], + "buildDirectory": "/tmp/build/Source/CursesDialog/form", + "fileGroups": [ { - "compileFlags":" -std=gnu11", - "defines": - [ - "SOMETHING=1", - "LIBARCHIVE_STATIC" - ], - "includePath": - [ - { "path":"/tmp/cmake-build-test/Utilities" }, - { "isSystem": true, "path":"/usr/include/something" }, - ... - ] - "language":"C", - "sources": - [ - "fld_arg.c", - ... - "fty_regex.c" - ] + "compileFlags": " -std=gnu11", + "defines": [ "CURL_STATICLIB", "LIBARCHIVE_STATIC" ], + "includePath": [ { "path": "/tmp/build/Utilities" }, <...> ], + "isGenerated": false, + "language": "C", + "sources": [ "fld_arg.c", <...> ] } ], - "fullName":"libcmForm.a", - "linkerLanguage":"C", - "name":"cmForm", - "type":"STATIC_LIBRARY" + "fullName": "libcmForm.a", + "linkerLanguage": "C", + "name": "cmForm", + "sourceDirectory": "/home/code/src/cmake/Source/CursesDialog/form", + "type": "STATIC_LIBRARY" } ] - } - ], - }, - ... - ] + }, + <...> + ] + } + ], + "cookie": "", + "inReplyTo": "codemodel", + "type": "reply" } ]== CMake Server ==] -The output can be tailored to the specific needs via parameter passed when -requesting "project" information. - -You can have a "depth" key, which accepts "project", "configuration" and -"target" as string values. These cause the output to be trimmed at the -appropriate depth of the output tree. - -You can also set "configurations" to an array of strings with configuration -names to list. This will cause any configuration that is not listed to be -trimmed from the output. - -Generated files can be included in the listing by setting "includeGeneratedFiles" -to "true". This setting defaults to "false", so generated files are not -listed by default. - -Finally you can limit the target types that are going to be listed. This is -done by providing a list of target types as an array of strings to the -"targetTypes" key. - Type "cmakeInputs" ^^^^^^^^^^^^^^^^^^ ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 129 +++++++++++++++------------------------- 1 file changed, 48 insertions(+), 81 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:28:21 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:28:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-320-gf660832 Message-ID: <20161024142821.47658F74C5@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 f660832999e086f02a9f3552c028aed900cd7249 (commit) via 48189697eb2ac97407cf4ffc0d2f3e600f3cd6ac (commit) from 92be048b7f40f4ca352bc0ef85c8e1bf4dfc0702 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f660832999e086f02a9f3552c028aed900cd7249 commit f660832999e086f02a9f3552c028aed900cd7249 Merge: 92be048 4818969 Author: Brad King AuthorDate: Mon Oct 24 10:28:19 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:28:19 2016 -0400 Merge topic 'doc-cmake-server-typos' 48189697 Help: Fix cmake-server documentation ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 129 +++++++++++++++------------------------- 1 file changed, 48 insertions(+), 81 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:28:39 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:28:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-712-gdc8b205 Message-ID: <20161024142839.D8362F74D5@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 dc8b205f50d910eabbd0ef5b75873045aa862ea8 (commit) via f660832999e086f02a9f3552c028aed900cd7249 (commit) from 74e42fbdb1619cc2d68f08910aaae96a78142058 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc8b205f50d910eabbd0ef5b75873045aa862ea8 commit dc8b205f50d910eabbd0ef5b75873045aa862ea8 Merge: 74e42fb f660832 Author: Brad King AuthorDate: Mon Oct 24 10:28:33 2016 -0400 Commit: Brad King CommitDate: Mon Oct 24 10:28:33 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 10:32:16 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 10:32:16 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-714-g2d4e194 Message-ID: <20161024143216.C1B43F77B3@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 2d4e1942743e5d150076e57b2cc5efef7f9ab115 (commit) via e983bd326a9e3b7902d8f7cf0d891030ad3bd4c1 (commit) from dc8b205f50d910eabbd0ef5b75873045aa862ea8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d4e1942743e5d150076e57b2cc5efef7f9ab115 commit 2d4e1942743e5d150076e57b2cc5efef7f9ab115 Merge: dc8b205 e983bd3 Author: Brad King AuthorDate: Mon Oct 24 10:32:15 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 10:32:15 2016 -0400 Merge topic 'ninja-subdir-binary-dir' into next e983bd32 Ninja: Use binary dir for `$subdir/all` targets https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e983bd326a9e3b7902d8f7cf0d891030ad3bd4c1 commit e983bd326a9e3b7902d8f7cf0d891030ad3bd4c1 Author: Alexis Murzeau AuthorDate: Sun Oct 23 18:58:28 2016 +0200 Commit: Brad King CommitDate: Mon Oct 24 10:30:02 2016 -0400 Ninja: Use binary dir for `$subdir/all` targets The targets added by commit v3.6.0-rc1~240^2~2 (Ninja: Add `$subdir/all` targets, 2016-03-11) use as `$subdir` the relative path from the top of the source tree to the current source directory. This is not correct when using `add_subdirectory(test test_bin)`. Instead we need to use the relative path from the top of the binary tree to the current binary directory as was done for related targets by commit v3.7.0-rc1~268^2 (Ninja: Add `$subdir/{test,install,package}` targets, 2016-08-05). diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 182d7e4..ee594b0 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -879,20 +879,6 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath( return convPath; } -std::string cmGlobalNinjaGenerator::ConvertToNinjaFolderRule( - const std::string& path) -{ - cmLocalNinjaGenerator* ng = - static_cast(this->LocalGenerators[0]); - std::string convPath = ng->ConvertToRelativePath( - this->LocalGenerators[0]->GetState()->GetSourceDirectory(), path + "/all"); - convPath = this->NinjaOutputPath(convPath); -#ifdef _WIN32 - std::replace(convPath.begin(), convPath.end(), '/', '\\'); -#endif - return convPath; -} - void cmGlobalNinjaGenerator::AddCXXCompileCommand( const std::string& commandLine, const std::string& sourceFile) { @@ -1119,11 +1105,11 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) this->LocalGenerators.begin(); lgi != this->LocalGenerators.end(); ++lgi) { cmLocalGenerator const* lg = *lgi; - const std::string currentSourceFolder( - lg->GetStateSnapshot().GetDirectory().GetCurrentSource()); + const std::string currentBinaryFolder( + lg->GetStateSnapshot().GetDirectory().GetCurrentBinary()); // The directory-level rule should depend on the target-level rules // for all targets in the directory. - targetsPerFolder[currentSourceFolder] = cmNinjaDeps(); + targetsPerFolder[currentBinaryFolder] = cmNinjaDeps(); for (std::vector::const_iterator ti = lg->GetGeneratorTargets().begin(); ti != lg->GetGeneratorTargets().end(); ++ti) { @@ -1136,7 +1122,7 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) type == cmStateEnums::OBJECT_LIBRARY || type == cmStateEnums::UTILITY) && !gt->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { - targetsPerFolder[currentSourceFolder].push_back(gt->GetName()); + targetsPerFolder[currentBinaryFolder].push_back(gt->GetName()); } } @@ -1147,28 +1133,30 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) for (std::vector::const_iterator stateIt = children.begin(); stateIt != children.end(); ++stateIt) { - targetsPerFolder[currentSourceFolder].push_back( - this->ConvertToNinjaFolderRule( - stateIt->GetDirectory().GetCurrentSource())); + std::string const currentBinaryDir = + stateIt->GetDirectory().GetCurrentBinary(); + + targetsPerFolder[currentBinaryFolder].push_back( + this->ConvertToNinjaPath(currentBinaryDir + "/all")); } } - std::string const rootSourceDir = - this->LocalGenerators[0]->GetSourceDirectory(); + std::string const rootBinaryDir = + this->LocalGenerators[0]->GetBinaryDirectory(); for (std::map::const_iterator it = targetsPerFolder.begin(); it != targetsPerFolder.end(); ++it) { cmGlobalNinjaGenerator::WriteDivider(os); - std::string const& currentSourceDir = it->first; + std::string const& currentBinaryDir = it->first; - // Do not generate a rule for the root source dir. - if (rootSourceDir.length() >= currentSourceDir.length()) { + // Do not generate a rule for the root binary dir. + if (rootBinaryDir.length() >= currentBinaryDir.length()) { continue; } - std::string const comment = "Folder: " + currentSourceDir; + std::string const comment = "Folder: " + currentBinaryDir; cmNinjaDeps output(1); - output.push_back(this->ConvertToNinjaFolderRule(currentSourceDir)); + output.push_back(this->ConvertToNinjaPath(currentBinaryDir + "/all")); this->WritePhonyBuild(os, comment, output, it->second); } diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 1084469..81ec3eb 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -241,7 +241,6 @@ public: } std::string ConvertToNinjaPath(const std::string& path) const; - std::string ConvertToNinjaFolderRule(const std::string& path); struct MapToNinjaPathImpl { diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 446dc3c..7b4e51e 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -51,14 +51,23 @@ function(run_SubDir) set(SubDir_all [[SubDir\all]]) set(SubDir_test [[SubDir\test]]) set(SubDir_install [[SubDir\install]]) + set(SubDirBinary_test [[SubDirBinary\test]]) + set(SubDirBinary_all [[SubDirBinary\all]]) + set(SubDirBinary_install [[SubDirBinary\install]]) else() set(SubDir_all [[SubDir/all]]) set(SubDir_test [[SubDir/test]]) set(SubDir_install [[SubDir/install]]) + set(SubDirBinary_all [[SubDirBinary/all]]) + set(SubDirBinary_test [[SubDirBinary/test]]) + set(SubDirBinary_install [[SubDirBinary/install]]) endif() run_cmake_command(SubDir-build ${CMAKE_COMMAND} --build . --target ${SubDir_all}) run_cmake_command(SubDir-test ${CMAKE_COMMAND} --build . --target ${SubDir_test}) run_cmake_command(SubDir-install ${CMAKE_COMMAND} --build . --target ${SubDir_install}) + run_cmake_command(SubDirBinary-build ${CMAKE_COMMAND} --build . --target ${SubDirBinary_all}) + run_cmake_command(SubDirBinary-test ${CMAKE_COMMAND} --build . --target ${SubDirBinary_test}) + run_cmake_command(SubDirBinary-install ${CMAKE_COMMAND} --build . --target ${SubDirBinary_install}) endfunction() run_SubDir() diff --git a/Tests/RunCMake/Ninja/SubDir.cmake b/Tests/RunCMake/Ninja/SubDir.cmake index d227753..11f467a 100644 --- a/Tests/RunCMake/Ninja/SubDir.cmake +++ b/Tests/RunCMake/Ninja/SubDir.cmake @@ -1,5 +1,6 @@ include(CTest) add_subdirectory(SubDir) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/SubDirSource SubDirBinary) add_custom_target(TopFail ALL COMMAND does_not_exist) add_test(NAME TopTest COMMAND ${CMAKE_COMMAND} -E echo "Running TopTest") install(CODE [[ diff --git a/Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt b/Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt new file mode 100644 index 0000000..244eaa0 --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt @@ -0,0 +1 @@ +Building SubDirSourceInAll diff --git a/Tests/RunCMake/Ninja/SubDirBinary-install-stdout.txt b/Tests/RunCMake/Ninja/SubDirBinary-install-stdout.txt new file mode 100644 index 0000000..6b6c6dd --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDirBinary-install-stdout.txt @@ -0,0 +1 @@ +-- Installing SubDirSource diff --git a/Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt b/Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt new file mode 100644 index 0000000..d6d6605 --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt @@ -0,0 +1 @@ +1/1 Test #1: SubDirSourceTest diff --git a/Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt b/Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt new file mode 100644 index 0000000..2664261 --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt @@ -0,0 +1,6 @@ +add_custom_target(SubDirSourceFail COMMAND does_not_exist) +add_custom_target(SubDirSourceInAll ALL COMMAND ${CMAKE_COMMAND} -E echo "Building SubDirSourceInAll") +add_test(NAME SubDirSourceTest COMMAND ${CMAKE_COMMAND} -E echo "Running SubDirSourceTest") +install(CODE [[ + message(STATUS "Installing SubDirSource") +]]) ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalNinjaGenerator.cxx | 44 +++++++------------- Source/cmGlobalNinjaGenerator.h | 1 - Tests/RunCMake/Ninja/RunCMakeTest.cmake | 9 ++++ Tests/RunCMake/Ninja/SubDir.cmake | 1 + Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt | 1 + .../RunCMake/Ninja/SubDirBinary-install-stdout.txt | 1 + Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt | 1 + Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt | 6 +++ 8 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt create mode 100644 Tests/RunCMake/Ninja/SubDirBinary-install-stdout.txt create mode 100644 Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt create mode 100644 Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 13:57:14 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 13:57:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-717-gfddee52 Message-ID: <20161024175714.26B52F7739@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 fddee52d5bdf90d806834411062b3af37a6332bc (commit) via 4c272adbe1d67af4779f4e72d9562457ed851dac (commit) via 6205f1797e33c22ab1f9cda8598d02b24497b806 (commit) from 2d4e1942743e5d150076e57b2cc5efef7f9ab115 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fddee52d5bdf90d806834411062b3af37a6332bc commit fddee52d5bdf90d806834411062b3af37a6332bc Merge: 2d4e194 4c272ad Author: Brad King AuthorDate: Mon Oct 24 13:57:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 13:57:12 2016 -0400 Merge topic 'android-pic' into next 4c272adb Android: Link position-independent executables with proper flags 6205f179 Android: Set CMAKE_POSITION_INDEPENDENT_CODE automatically https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c272adbe1d67af4779f4e72d9562457ed851dac commit 4c272adbe1d67af4779f4e72d9562457ed851dac Author: Brad King AuthorDate: Mon Oct 24 11:45:18 2016 -0400 Commit: Brad King CommitDate: Mon Oct 24 11:45:18 2016 -0400 Android: Link position-independent executables with proper flags Add `-fPIE -pie` to the default executable link flags when `CMAKE_POSITION_INDEPENDENT_CODE` is enabled. This is required by Android 16 and above for executables to run on the device. Closes: #16382 diff --git a/Modules/Platform/Android/abi-common.cmake b/Modules/Platform/Android/abi-common.cmake index 533bd90..3b0eb01 100644 --- a/Modules/Platform/Android/abi-common.cmake +++ b/Modules/Platform/Android/abi-common.cmake @@ -8,6 +8,10 @@ if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() +if(CMAKE_POSITION_INDEPENDENT_CODE) + string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -fPIE -pie") +endif() + string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -Wl,--gc-sections") if(NOT _ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6205f1797e33c22ab1f9cda8598d02b24497b806 commit 6205f1797e33c22ab1f9cda8598d02b24497b806 Author: Brad King AuthorDate: Mon Oct 24 11:40:53 2016 -0400 Commit: Brad King CommitDate: Mon Oct 24 11:40:53 2016 -0400 Android: Set CMAKE_POSITION_INDEPENDENT_CODE automatically If the toolchain file or cache does not set this, enable it automatically based on the Android API version. Versions 16 and above expect position independent code. Use the main `CMAKE_POSITION_INDEPENDENT_CODE` setting in favor of hard-coding `-fpic` or `-fPIC` in the compiler flags for each ABI. This allows CMake to use `-fpie` or `-fPIE` as needed when sources are meant for executables, and `-fpic` or `-fPIC` for other sources. diff --git a/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake b/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake index e56b67b..f4717d5 100644 --- a/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake +++ b/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake @@ -1,10 +1,6 @@ # /build/core/toolchains/aarch64-linux-android-clang/setup.mk set(_ANDROID_ABI_CLANG_TARGET "aarch64-none-linux-android") -string(APPEND _ANDROID_ABI_INIT_CFLAGS - " -fpic" - ) - # Suppress -Wl,-z,nocopyreloc flag on arm64-v8a set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1) diff --git a/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake b/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake index 0bcfc86..b71a674 100644 --- a/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake +++ b/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake @@ -1,7 +1,4 @@ # /build/core/toolchains/aarch64-linux-android-4.9/setup.mk -string(APPEND _ANDROID_ABI_INIT_CFLAGS - " -fpic" - ) # Suppress -Wl,-z,nocopyreloc flag on arm64-v8a set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1) diff --git a/Modules/Platform/Android/abi-armeabi-Clang.cmake b/Modules/Platform/Android/abi-armeabi-Clang.cmake index 4fc3009..b857bd3 100644 --- a/Modules/Platform/Android/abi-armeabi-Clang.cmake +++ b/Modules/Platform/Android/abi-armeabi-Clang.cmake @@ -14,7 +14,6 @@ endif() string(APPEND _ANDROID_ABI_INIT_CFLAGS " -msoft-float" " -mtune=xscale" - " -fpic" ) include(Platform/Android/abi-common-Clang) diff --git a/Modules/Platform/Android/abi-armeabi-GNU.cmake b/Modules/Platform/Android/abi-armeabi-GNU.cmake index 10cac00..33e8b31 100644 --- a/Modules/Platform/Android/abi-armeabi-GNU.cmake +++ b/Modules/Platform/Android/abi-armeabi-GNU.cmake @@ -12,7 +12,6 @@ endif() string(APPEND _ANDROID_ABI_INIT_CFLAGS " -msoft-float" " -mtune=xscale" - " -fpic" ) include(Platform/Android/abi-common-GNU) diff --git a/Modules/Platform/Android/abi-armeabi-v6-Clang.cmake b/Modules/Platform/Android/abi-armeabi-v6-Clang.cmake index 15f1d4a..a7412f5 100644 --- a/Modules/Platform/Android/abi-armeabi-v6-Clang.cmake +++ b/Modules/Platform/Android/abi-armeabi-v6-Clang.cmake @@ -13,7 +13,6 @@ endif() string(APPEND _ANDROID_ABI_INIT_CFLAGS " -mfloat-abi=softfp" - " -fpic" ) include(Platform/Android/abi-common-Clang) diff --git a/Modules/Platform/Android/abi-armeabi-v6-GNU.cmake b/Modules/Platform/Android/abi-armeabi-v6-GNU.cmake index 7492de0..1fda184 100644 --- a/Modules/Platform/Android/abi-armeabi-v6-GNU.cmake +++ b/Modules/Platform/Android/abi-armeabi-v6-GNU.cmake @@ -11,7 +11,6 @@ endif() string(APPEND _ANDROID_ABI_INIT_CFLAGS " -mfloat-abi=softfp" - " -fpic" ) include(Platform/Android/abi-common-GNU) diff --git a/Modules/Platform/Android/abi-armeabi-v7a-Clang.cmake b/Modules/Platform/Android/abi-armeabi-v7a-Clang.cmake index 3a3efb3..e2ab58b 100644 --- a/Modules/Platform/Android/abi-armeabi-v7a-Clang.cmake +++ b/Modules/Platform/Android/abi-armeabi-v7a-Clang.cmake @@ -23,7 +23,6 @@ string(APPEND _ANDROID_ABI_INIT_LDFLAGS string(APPEND _ANDROID_ABI_INIT_CFLAGS " -mfloat-abi=softfp" - " -fpic" ) include(Platform/Android/abi-common-Clang) diff --git a/Modules/Platform/Android/abi-armeabi-v7a-GNU.cmake b/Modules/Platform/Android/abi-armeabi-v7a-GNU.cmake index d27e37e..b7c328d 100644 --- a/Modules/Platform/Android/abi-armeabi-v7a-GNU.cmake +++ b/Modules/Platform/Android/abi-armeabi-v7a-GNU.cmake @@ -17,7 +17,6 @@ endif() string(APPEND _ANDROID_ABI_INIT_CFLAGS " -mfloat-abi=softfp" - " -fpic" ) string(APPEND _ANDROID_ABI_INIT_LDFLAGS diff --git a/Modules/Platform/Android/abi-common.cmake b/Modules/Platform/Android/abi-common.cmake index 84e7dbd..533bd90 100644 --- a/Modules/Platform/Android/abi-common.cmake +++ b/Modules/Platform/Android/abi-common.cmake @@ -3,6 +3,11 @@ string(APPEND _ANDROID_ABI_INIT_CFLAGS " -no-canonical-prefixes" ) +if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE + AND NOT CMAKE_SYSTEM_VERSION VERSION_LESS 16) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) +endif() + string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -Wl,--gc-sections") if(NOT _ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc) diff --git a/Modules/Platform/Android/abi-mips-Clang.cmake b/Modules/Platform/Android/abi-mips-Clang.cmake index bf6b9fc..73addde 100644 --- a/Modules/Platform/Android/abi-mips-Clang.cmake +++ b/Modules/Platform/Android/abi-mips-Clang.cmake @@ -1,8 +1,4 @@ # /build/core/toolchains/mipsel-linux-android-clang/setup.mk set(_ANDROID_ABI_CLANG_TARGET "mipsel-none-linux-android") -string(APPEND _ANDROID_ABI_INIT_CFLAGS - " -fpic" - ) - include(Platform/Android/abi-common-Clang) diff --git a/Modules/Platform/Android/abi-mips-GNU.cmake b/Modules/Platform/Android/abi-mips-GNU.cmake index d380440..982ad46 100644 --- a/Modules/Platform/Android/abi-mips-GNU.cmake +++ b/Modules/Platform/Android/abi-mips-GNU.cmake @@ -1,6 +1,3 @@ # /build/core/toolchains/mipsel-linux-android-4.9/setup.mk -string(APPEND _ANDROID_ABI_INIT_CFLAGS - " -fpic" - ) include(Platform/Android/abi-common-GNU) diff --git a/Modules/Platform/Android/abi-mips64-Clang.cmake b/Modules/Platform/Android/abi-mips64-Clang.cmake index 1a94107..603f1b2 100644 --- a/Modules/Platform/Android/abi-mips64-Clang.cmake +++ b/Modules/Platform/Android/abi-mips64-Clang.cmake @@ -1,8 +1,4 @@ # /build/core/toolchains/mips64el-linux-android-clang/setup.mk set(_ANDROID_ABI_CLANG_TARGET "mips64el-none-linux-android") -string(APPEND _ANDROID_ABI_INIT_CFLAGS - " -fpic" - ) - include(Platform/Android/abi-common-Clang) diff --git a/Modules/Platform/Android/abi-mips64-GNU.cmake b/Modules/Platform/Android/abi-mips64-GNU.cmake index 4525d40..a1bc2c2 100644 --- a/Modules/Platform/Android/abi-mips64-GNU.cmake +++ b/Modules/Platform/Android/abi-mips64-GNU.cmake @@ -1,6 +1,3 @@ # /build/core/toolchains/mips64el-linux-android-4.9/setup.mk -string(APPEND _ANDROID_ABI_INIT_CFLAGS - " -fpic" - ) include(Platform/Android/abi-common-GNU) diff --git a/Modules/Platform/Android/abi-x86-Clang.cmake b/Modules/Platform/Android/abi-x86-Clang.cmake index f63ed36..fe7eace 100644 --- a/Modules/Platform/Android/abi-x86-Clang.cmake +++ b/Modules/Platform/Android/abi-x86-Clang.cmake @@ -1,8 +1,4 @@ # /build/core/toolchains/x86-clang/setup.mk set(_ANDROID_ABI_CLANG_TARGET "i686-none-linux-android") -string(APPEND _ANDROID_ABI_INIT_CFLAGS - " -fPIC" - ) - include(Platform/Android/abi-common-Clang) diff --git a/Modules/Platform/Android/abi-x86_64-Clang.cmake b/Modules/Platform/Android/abi-x86_64-Clang.cmake index c15042b..3cbcd49 100644 --- a/Modules/Platform/Android/abi-x86_64-Clang.cmake +++ b/Modules/Platform/Android/abi-x86_64-Clang.cmake @@ -1,8 +1,4 @@ # /build/core/toolchains/x86_64-clang/setup.mk set(_ANDROID_ABI_CLANG_TARGET "x86_64-none-linux-android") -string(APPEND _ANDROID_ABI_INIT_CFLAGS - " -fPIC" - ) - include(Platform/Android/abi-common-Clang) ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android/abi-arm64-v8a-Clang.cmake | 4 ---- Modules/Platform/Android/abi-arm64-v8a-GNU.cmake | 3 --- Modules/Platform/Android/abi-armeabi-Clang.cmake | 1 - Modules/Platform/Android/abi-armeabi-GNU.cmake | 1 - Modules/Platform/Android/abi-armeabi-v6-Clang.cmake | 1 - Modules/Platform/Android/abi-armeabi-v6-GNU.cmake | 1 - Modules/Platform/Android/abi-armeabi-v7a-Clang.cmake | 1 - Modules/Platform/Android/abi-armeabi-v7a-GNU.cmake | 1 - Modules/Platform/Android/abi-common.cmake | 9 +++++++++ Modules/Platform/Android/abi-mips-Clang.cmake | 4 ---- Modules/Platform/Android/abi-mips-GNU.cmake | 3 --- Modules/Platform/Android/abi-mips64-Clang.cmake | 4 ---- Modules/Platform/Android/abi-mips64-GNU.cmake | 3 --- Modules/Platform/Android/abi-x86-Clang.cmake | 4 ---- Modules/Platform/Android/abi-x86_64-Clang.cmake | 4 ---- 15 files changed, 9 insertions(+), 35 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 14:05:57 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 14:05:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-719-gccf1709 Message-ID: <20161024180557.5A33BF796B@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 ccf17096071718ea9d7ed75d37fd1e7c8fdad196 (commit) via 9f1429e274df81344d260c8e42b3387a402940f1 (commit) from fddee52d5bdf90d806834411062b3af37a6332bc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccf17096071718ea9d7ed75d37fd1e7c8fdad196 commit ccf17096071718ea9d7ed75d37fd1e7c8fdad196 Merge: fddee52 9f1429e Author: Brad King AuthorDate: Mon Oct 24 14:05:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 14:05:55 2016 -0400 Merge topic 'st2-fix-regex' into next 9f1429e2 Sublime: Update generated diagnostic matching expression for MSVC https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f1429e274df81344d260c8e42b3387a402940f1 commit 9f1429e274df81344d260c8e42b3387a402940f1 Author: Bruno Pedrosa AuthorDate: Thu Oct 20 02:35:58 2016 +0200 Commit: Brad King CommitDate: Mon Oct 24 14:02:52 2016 -0400 Sublime: Update generated diagnostic matching expression for MSVC Update the generated `file_regex` to match MSVC-style messages in addition to the GCC-style messages already matched. Use non-capturing sub-patterns to tolerate the differences in message formats while still capturing the four pieces of information in proper group numbers (file name, line number, column number, message). Closes: #16375 diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 41f82a2..b9e4246 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -271,7 +271,9 @@ void cmExtraSublimeTextGenerator::AppendTarget( << this->BuildMakeCommand(make, makefileName.c_str(), targetName) << "],\n"; fout << "\t\t\t\"working_dir\": \"${project_path}\",\n"; - fout << "\t\t\t\"file_regex\": \"^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$\"\n"; + fout << "\t\t\t\"file_regex\": \"" + "^(..[^:]*)(?::|\\\\()([0-9]+)(?::|\\\\))(?:([0-9]+):)?\\\\s*(.*)" + "\"\n"; fout << "\t\t}"; } ----------------------------------------------------------------------- Summary of changes: Source/cmExtraSublimeTextGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 14:30:14 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 14:30:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-721-g818f495 Message-ID: <20161024183014.62E52F7D9C@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 818f49597debd3636bbb96e6aecc4c4f648c0320 (commit) via 881585f9757972473519d5394ea04a7d962ac70e (commit) from ccf17096071718ea9d7ed75d37fd1e7c8fdad196 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=818f49597debd3636bbb96e6aecc4c4f648c0320 commit 818f49597debd3636bbb96e6aecc4c4f648c0320 Merge: ccf1709 881585f Author: Brad King AuthorDate: Mon Oct 24 14:30:13 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 14:30:13 2016 -0400 Merge topic 'intel-compile-features-windows' into next 881585f9 Intel: Fix compiler extension flags on Windows https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=881585f9757972473519d5394ea04a7d962ac70e commit 881585f9757972473519d5394ea04a7d962ac70e Author: Brad King AuthorDate: Mon Oct 24 14:16:22 2016 -0400 Commit: Brad King CommitDate: Mon Oct 24 14:29:40 2016 -0400 Intel: Fix compiler extension flags on Windows The extension flags enabled by commit v3.6.0-rc1~120^2~1 (Features: Record standard flags for Intel C/C++ on Windows, 2016-04-18) of the form `-Qstd=gnu++11` are not supported by the Intel C/C++ Compiler for Windows. Fall back to using the non-extension form of the flags. Issue: #16384 diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index 1d09bd5..61adf40 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -9,20 +9,22 @@ set(CMAKE_DEPFILE_FLAGS_C "-MD -MT -MF ") if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") set(_std -Qstd) + set(_ext c) else() set(_std -std) + set(_ext gnu) endif() if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0) set(CMAKE_C11_STANDARD_COMPILE_OPTION "${_std}=c11") - set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=gnu11") + set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}11") endif() if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0) set(CMAKE_C90_STANDARD_COMPILE_OPTION "${_std}=c89") - set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=gnu89") + set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=${_ext}89") set(CMAKE_C99_STANDARD_COMPILE_OPTION "${_std}=c99") - set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=gnu99") + set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=${_ext}99") endif() if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) @@ -42,6 +44,7 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) endif() unset(_std) +unset(_ext) macro(cmake_record_c_compile_features) macro(_get_intel_c_features std_version list) diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 3cc4503..73dd7fa 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -9,8 +9,10 @@ set(CMAKE_DEPFILE_FLAGS_CXX "-MD -MT -MF ") if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") set(_std -Qstd) + set(_ext c++) else() set(_std -std) + set(_ext gnu++) endif() if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2) @@ -25,15 +27,15 @@ endif() if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0) set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "${_std}=c++11") - set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "${_std}=gnu++11") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}11") elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "${_std}=c++0x") - set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "${_std}=gnu++0x") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}0x") endif() if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98") - set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "${_std}=gnu++98") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "${_std}=${_ext}98") endif() if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) @@ -50,6 +52,7 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) endif() unset(_std) +unset(_ext) macro(cmake_record_cxx_compile_features) macro(_get_intel_features std_version list) ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Intel-C.cmake | 9 ++++++--- Modules/Compiler/Intel-CXX.cmake | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Oct 24 14:37:23 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 24 Oct 2016 14:37:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-723-g08714bc Message-ID: <20161024183723.50795F7F30@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 08714bc5fcc28cc8e66faa6bd6f06c9a1c1b7cc2 (commit) via 9b8dc79cc84d12c1e661ca3cd77b773b463508d7 (commit) from 818f49597debd3636bbb96e6aecc4c4f648c0320 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=08714bc5fcc28cc8e66faa6bd6f06c9a1c1b7cc2 commit 08714bc5fcc28cc8e66faa6bd6f06c9a1c1b7cc2 Merge: 818f495 9b8dc79 Author: Brad King AuthorDate: Mon Oct 24 14:37:22 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 14:37:22 2016 -0400 Merge topic 'cmake-server-message-quoting' into next 9b8dc79c cmake-server: Change message wrapper to avoid ambiguity with content https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b8dc79cc84d12c1e661ca3cd77b773b463508d7 commit 9b8dc79cc84d12c1e661ca3cd77b773b463508d7 Author: Brad King AuthorDate: Mon Oct 24 10:44:44 2016 -0400 Commit: Brad King CommitDate: Mon Oct 24 14:36:13 2016 -0400 cmake-server: Change message wrapper to avoid ambiguity with content Change our message wrapper from [== CMake Server ==[ ... ]== CMake Server ==] to [== "CMake Server" ==[ ... ]== "CMake Server" ==] to guarantee that no JSON content can ever contain the ending string (because it would be encoded as `]== \"CMake Server\" ==]`). diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index 5eec009..a72af14 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -57,17 +57,17 @@ or using a named pipe (with the ``--pipe `` parameter). When connecting to the server (via named pipe or by starting it in ``--debug`` mode), the server will reply with a hello message:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"supportedProtocolVersions":[{"major":1,"minor":0}],"type":"hello"} - ]== CMake Server ==] + ]== "CMake Server" ==] Messages sent to and from the process are wrapped in magic strings:: - [== CMake Server ==[ + [== "CMake Server" ==[ { ... some JSON message ... } - ]== CMake Server ==] + ]== "CMake Server" ==] The server is now ready to accept further requests via the named pipe or stdin. @@ -87,7 +87,7 @@ the response into the given filename. This is a response from the cmake server with "showStats" set to true:: - [== CMake Server ==[ + [== "CMake Server" ==[ { "cookie":"", "errorMessage":"Waiting for type \"handshake\".", @@ -100,7 +100,7 @@ This is a response from the cmake server with "showStats" set to true:: "totalTime":0.025995 } } - ]== CMake Server ==] + ]== "CMake Server" ==] The server has made a copy of this response into the file /tmp/error.txt and took 0.011 seconds to turn the JSON response into a string, and it took 0.025 @@ -137,9 +137,9 @@ contain values. Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"cookie":"zimtstern","inReplyTo":"handshake","type":"reply"} - ]== CMake Server ==] + ]== "CMake Server" ==] Type "error" @@ -150,9 +150,9 @@ contain an "errorMessage". Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"cookie":"","errorMessage":"Protocol version not supported.","inReplyTo":"handshake","type":"error"} - ]== CMake Server ==] + ]== "CMake Server" ==] Type "progress" @@ -181,9 +181,9 @@ box title. Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"cookie":"","message":"Something happened.","title":"Title Text","inReplyTo":"handshake","type":"message"} - ]== CMake Server ==] + ]== "CMake Server" ==] Type "signal" @@ -208,13 +208,13 @@ an influence on the build system is changed. The "dirty" signal may look like this:: - [== CMake Server ==[ + [== "CMake Server" ==[ { "cookie":"", "inReplyTo":"", "name":"dirty", "type":"signal"} - ]== CMake Server ==] + ]== "CMake Server" ==] "fileChange" Signal @@ -226,7 +226,7 @@ that was detected. Possible changes are "change" and "rename". The "fileChange" signal looks like this:: - [== CMake Server ==[ + [== "CMake Server" ==[ { "cookie":"", "inReplyTo":"", @@ -234,7 +234,7 @@ The "fileChange" signal looks like this:: "path":"/absolute/CMakeLists.txt", "properties":["change"], "type":"signal"} - ]== CMake Server ==] + ]== "CMake Server" ==] Specific Message Types @@ -256,9 +256,9 @@ these requires a special command line argument when starting the cmake server mo Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"supportedProtocolVersions":[{"major":0,"minor":1}],"type":"hello"} - ]== CMake Server ==] + ]== "CMake Server" ==] Type "handshake" @@ -280,17 +280,17 @@ Protocol version 1.0 requires the following attributes to be set: Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"cookie":"zimtstern","type":"handshake","protocolVersion":{"major":0}, "sourceDirectory":"/home/code/cmake", "buildDirectory":"/tmp/testbuild", "generator":"Ninja"} - ]== CMake Server ==] + ]== "CMake Server" ==] which will result in a response type "reply":: - [== CMake Server ==[ + [== "CMake Server" ==[ {"cookie":"zimtstern","inReplyTo":"handshake","type":"reply"} - ]== CMake Server ==] + ]== "CMake Server" ==] indicating that the server is ready for action. @@ -303,13 +303,13 @@ JSON structure with information on cmake state. Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"type":"globalSettings"} - ]== CMake Server ==] + ]== "CMake Server" ==] which will result in a response type "reply":: - [== CMake Server ==[ + [== "CMake Server" ==[ { "buildDirectory": "/tmp/test-build", "capabilities": { @@ -346,7 +346,7 @@ which will result in a response type "reply":: "warnUnused": false, "warnUnusedCli": true } - ]== CMake Server ==] + ]== "CMake Server" ==] Type "setGlobalSettings" @@ -364,15 +364,15 @@ The server will respond with an empty reply message or an error. Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"type":"setGlobalSettings","debugOutput":true} - ]== CMake Server ==] + ]== "CMake Server" ==] CMake will reply to this with:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"inReplyTo":"setGlobalSettings","type":"reply"} - ]== CMake Server ==] + ]== "CMake Server" ==] Type "configure" @@ -391,15 +391,15 @@ cache handling that are passed to the cmake command line client. Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"type":"configure", "cacheArguments":["-Dsomething=else"]} - ]== CMake Server ==] + ]== "CMake Server" ==] CMake will reply like this (after reporting progress for some time):: - [== CMake Server ==[ + [== "CMake Server" ==[ {"cookie":"","inReplyTo":"configure","type":"reply"} - ]== CMake Server ==] + ]== "CMake Server" ==] Type "compute" @@ -410,15 +410,15 @@ is only available after a project was successfully "configure"d. Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"type":"compute"} - ]== CMake Server ==] + ]== "CMake Server" ==] CMake will reply (after reporting progress information):: - [== CMake Server ==[ + [== "CMake Server" ==[ {"cookie":"","inReplyTo":"compute","type":"reply"} - ]== CMake Server ==] + ]== "CMake Server" ==] Type "codemodel" @@ -521,13 +521,13 @@ sourceDirectory of the target. Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"type":"codemodel"} - ]== CMake Server ==] + ]== "CMake Server" ==] CMake will reply:: - [== CMake Server ==[ + [== "CMake Server" ==[ { "configurations": [ { @@ -567,7 +567,7 @@ CMake will reply:: "inReplyTo": "codemodel", "type": "reply" } - ]== CMake Server ==] + ]== "CMake Server" ==] Type "cmakeInputs" @@ -581,13 +581,13 @@ This request is only available after a project was successfully Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"type":"cmakeInputs"} - ]== CMake Server ==] + ]== "CMake Server" ==] CMake will reply with the following information:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"buildFiles": [ {"isCMake":true,"isTemporary":false,"sources":["/usr/lib/cmake/...", ... ]}, @@ -600,7 +600,7 @@ CMake will reply with the following information:: "inReplyTo":"cmakeInputs", "type":"reply" } - ]== CMake Server ==] + ]== "CMake Server" ==] All file names are either relative to the top level source directory or absolute. @@ -619,13 +619,13 @@ list the cached configuration values. Example:: - [== CMake Server ==[ + [== "CMake Server" ==[ {"type":"cache"} - ]== CMake Server ==] + ]== "CMake Server" ==] CMake will respond with the following output:: - [== CMake Server ==[ + [== "CMake Server" ==[ { "cookie":"","inReplyTo":"cache","type":"reply", "cache": @@ -641,7 +641,7 @@ CMake will respond with the following output:: "value":"TEST"} ] } - ]== CMake Server ==] + ]== "CMake Server" ==] The output can be limited to a list of keys by passing an array of key names to the "keys" optional field of the "cache" request. @@ -655,16 +655,16 @@ command will report on the files and directories watched. Example:: - [== CMake Server ==] + [== "CMake Server" ==[ {"type":"fileSystemWatchers"} - [== CMake Server ==] + ]== "CMake Server" ==] CMake will respond with the following output:: - [== CMake Server ==] + [== "CMake Server" ==[ { "cookie":"","inReplyTo":"fileSystemWatchers","type":"reply", "watchedFiles": [ "/absolute/path" ], "watchedDirectories": [ "/absolute" ] } - [== CMake Server ==] + ]== "CMake Server" ==] diff --git a/Source/cmServerDictionary.h b/Source/cmServerDictionary.h index c82274a..2d64cbd 100644 --- a/Source/cmServerDictionary.h +++ b/Source/cmServerDictionary.h @@ -87,8 +87,8 @@ static const std::string kWARN_UNUSED_KEY = "warnUnused"; static const std::string kWATCHED_DIRECTORIES_KEY = "watchedDirectories"; static const std::string kWATCHED_FILES_KEY = "watchedFiles"; -static const std::string kSTART_MAGIC = "[== CMake Server ==["; -static const std::string kEND_MAGIC = "]== CMake Server ==]"; +static const std::string kSTART_MAGIC = "[== \"CMake Server\" ==["; +static const std::string kEND_MAGIC = "]== \"CMake Server\" ==]"; static const std::string kRENAME_PROPERTY_VALUE = "rename"; static const std::string kCHANGE_PROPERTY_VALUE = "change"; diff --git a/Tests/Server/cmakelib.py b/Tests/Server/cmakelib.py index 94384eb..d11431d 100644 --- a/Tests/Server/cmakelib.py +++ b/Tests/Server/cmakelib.py @@ -46,11 +46,11 @@ def waitForRawMessage(cmakeCommand): stdoutdata += stdoutdataLine.decode('utf-8') else: break - begin = stdoutdata.find("[== CMake Server ==[\n") - end = stdoutdata.find("]== CMake Server ==]") + begin = stdoutdata.find('[== "CMake Server" ==[\n') + end = stdoutdata.find(']== "CMake Server" ==]') if (begin != -1 and end != -1): - begin += len("[== CMake Server ==[\n") + begin += len('[== "CMake Server" ==[\n') payload = stdoutdata[begin:end] if print_communication: print("\nSERVER>", json.loads(payload), "\n") @@ -59,9 +59,9 @@ def waitForRawMessage(cmakeCommand): def writeRawData(cmakeCommand, content): writeRawData.counter += 1 payload = """ -[== CMake Server ==[ +[== "CMake Server" ==[ %s -]== CMake Server ==] +]== "CMake Server" ==] """ % content rn = ( writeRawData.counter % 2 ) == 0 ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 108 ++++++++++++++++++++-------------------- Source/cmServerDictionary.h | 4 +- Tests/Server/cmakelib.py | 10 ++-- 3 files changed, 61 insertions(+), 61 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Mon Oct 24 15:51:00 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Mon, 24 Oct 2016 15:51:00 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-725-g2b3a600 Message-ID: <20161024195100.81F6DF7547@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 2b3a600e8570df998247ed89da75522cb97e8563 (commit) via 15aa814b85a90fb8e8798eb99617d27957c28f36 (commit) from 08714bc5fcc28cc8e66faa6bd6f06c9a1c1b7cc2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2b3a600e8570df998247ed89da75522cb97e8563 commit 2b3a600e8570df998247ed89da75522cb97e8563 Merge: 08714bc 15aa814 Author: Daniel Pfeifer AuthorDate: Mon Oct 24 15:50:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 15:50:58 2016 -0400 Merge topic 'remove-cmobject' into next 15aa814b Remove cmObject.h and cmTypeMacro.h https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15aa814b85a90fb8e8798eb99617d27957c28f36 commit 15aa814b85a90fb8e8798eb99617d27957c28f36 Author: Daniel Pfeifer AuthorDate: Sun Oct 23 01:19:00 2016 +0200 Commit: Daniel Pfeifer CommitDate: Mon Oct 24 21:49:28 2016 +0200 Remove cmObject.h and cmTypeMacro.h diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index 88a3741..d656063 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -10,7 +10,6 @@ #include "cmCPackIFWInstaller.h" #include "cmCPackIFWPackage.h" #include "cmCPackIFWRepository.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPack7zGenerator.h b/Source/CPack/cmCPack7zGenerator.h index 063b032..a617d9b 100644 --- a/Source/CPack/cmCPack7zGenerator.h +++ b/Source/CPack/cmCPack7zGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPack7zGenerator * \brief A generator for 7z files diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index 7010664..df02ae8 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -7,7 +7,6 @@ #include "cmArchiveWrite.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h index f46ae5a..7db933e 100644 --- a/Source/CPack/cmCPackDebGenerator.h +++ b/Source/CPack/cmCPackDebGenerator.h @@ -6,7 +6,6 @@ #include #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index a7652b1..f32dd70 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -6,9 +6,7 @@ #include #include "cmCPackComponentGroup.h" -#include "cmObject.h" #include "cmSystemTools.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index 5381eb2..0a98f91 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -5,9 +5,6 @@ #include -#include "cmObject.h" -#include "cmTypeMacro.h" - #include #include #include diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 2ac805d..9ffe5c4 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -5,9 +5,6 @@ #include -#include "cmObject.h" -#include "cmTypeMacro.h" - #include #include #include diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h index d61341c..b4bf2d4 100644 --- a/Source/CPack/cmCPackNSISGenerator.h +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -6,7 +6,6 @@ #include #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackPKGGenerator.h b/Source/CPack/cmCPackPKGGenerator.h index 5569185..bb3c1a7 100644 --- a/Source/CPack/cmCPackPKGGenerator.h +++ b/Source/CPack/cmCPackPKGGenerator.h @@ -3,6 +3,9 @@ #ifndef cmCPackPKGGenerator_h #define cmCPackPKGGenerator_h +#include +#include + #include "cmCPackGenerator.h" class cmCPackComponent; diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h index f8bcbfe..4d48bd8 100644 --- a/Source/CPack/cmCPackRPMGenerator.h +++ b/Source/CPack/cmCPackRPMGenerator.h @@ -6,7 +6,6 @@ #include #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CPack/cmCPackSTGZGenerator.h b/Source/CPack/cmCPackSTGZGenerator.h index a1bee5f..4b9c1c6 100644 --- a/Source/CPack/cmCPackSTGZGenerator.h +++ b/Source/CPack/cmCPackSTGZGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackGenerator.h" #include "cmCPackTGZGenerator.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CPack/cmCPackTGZGenerator.h b/Source/CPack/cmCPackTGZGenerator.h index e93fb44..ee2e975 100644 --- a/Source/CPack/cmCPackTGZGenerator.h +++ b/Source/CPack/cmCPackTGZGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPackTGZGenerator * \brief A generator for TGZ files diff --git a/Source/CPack/cmCPackTXZGenerator.h b/Source/CPack/cmCPackTXZGenerator.h index b8a7597..876ca7d 100644 --- a/Source/CPack/cmCPackTXZGenerator.h +++ b/Source/CPack/cmCPackTXZGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPackTXZGenerator * \brief A generator for TXZ files diff --git a/Source/CPack/cmCPackTarBZip2Generator.h b/Source/CPack/cmCPackTarBZip2Generator.h index 2e8ba9b..42214fd 100644 --- a/Source/CPack/cmCPackTarBZip2Generator.h +++ b/Source/CPack/cmCPackTarBZip2Generator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPackTarBZip2Generator * \brief A generator for TarBZip2 files diff --git a/Source/CPack/cmCPackTarCompressGenerator.h b/Source/CPack/cmCPackTarCompressGenerator.h index 7d253e1..1476642 100644 --- a/Source/CPack/cmCPackTarCompressGenerator.h +++ b/Source/CPack/cmCPackTarCompressGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPackTarCompressGenerator * \brief A generator for TarCompress files diff --git a/Source/CPack/cmCPackZIPGenerator.h b/Source/CPack/cmCPackZIPGenerator.h index e0334fb..95b6489 100644 --- a/Source/CPack/cmCPackZIPGenerator.h +++ b/Source/CPack/cmCPackZIPGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPackZIPGenerator * \brief A generator for ZIP files diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index c305cbf..b06bd38 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -12,7 +12,6 @@ #include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" -#include "cmTypeMacro.h" #include "cm_auto_ptr.hxx" #include "cmake.h" diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h index 1d424f3..5885738 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.h +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestBuildCommand.h b/Source/CTest/cmCTestBuildCommand.h index acc0ecf..9cc6f7e 100644 --- a/Source/CTest/cmCTestBuildCommand.h +++ b/Source/CTest/cmCTestBuildCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestBuildHandler.h b/Source/CTest/cmCTestBuildHandler.h index 69970d5..5bd1157 100644 --- a/Source/CTest/cmCTestBuildHandler.h +++ b/Source/CTest/cmCTestBuildHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestConfigureCommand.h b/Source/CTest/cmCTestConfigureCommand.h index 95a476f..22d1217 100644 --- a/Source/CTest/cmCTestConfigureCommand.h +++ b/Source/CTest/cmCTestConfigureCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestConfigureHandler.h b/Source/CTest/cmCTestConfigureHandler.h index 4a7c74b..7fa95ed 100644 --- a/Source/CTest/cmCTestConfigureHandler.h +++ b/Source/CTest/cmCTestConfigureHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" /** \class cmCTestConfigureHandler * \brief A class that handles ctest -S invocations diff --git a/Source/CTest/cmCTestCoverageCommand.h b/Source/CTest/cmCTestCoverageCommand.h index 98dd6bf..bf42aa1 100644 --- a/Source/CTest/cmCTestCoverageCommand.h +++ b/Source/CTest/cmCTestCoverageCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h index 0ba4a7a..339b5d7 100644 --- a/Source/CTest/cmCTestCoverageHandler.h +++ b/Source/CTest/cmCTestCoverageHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h index a8d00e0..4c1438b 100644 --- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h +++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index ef9fdc0..4176eb2 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTest.h" -#include "cmObject.h" #include "cmSystemTools.h" #include diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h index 0a1bae4..92748af 100644 --- a/Source/CTest/cmCTestHandlerCommand.h +++ b/Source/CTest/cmCTestHandlerCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestMemCheckCommand.h b/Source/CTest/cmCTestMemCheckCommand.h index efd4ecf..30d9e2b 100644 --- a/Source/CTest/cmCTestMemCheckCommand.h +++ b/Source/CTest/cmCTestMemCheckCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestTestCommand.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h index 2300f68..b12da28 100644 --- a/Source/CTest/cmCTestMemCheckHandler.h +++ b/Source/CTest/cmCTestMemCheckHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestTestHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.h b/Source/CTest/cmCTestReadCustomFilesCommand.h index 53610ba..e155595 100644 --- a/Source/CTest/cmCTestReadCustomFilesCommand.h +++ b/Source/CTest/cmCTestReadCustomFilesCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestRunScriptCommand.h b/Source/CTest/cmCTestRunScriptCommand.h index ac79db4..01ed62e 100644 --- a/Source/CTest/cmCTestRunScriptCommand.h +++ b/Source/CTest/cmCTestRunScriptCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h index 5ba8ecf..47644be 100644 --- a/Source/CTest/cmCTestScriptHandler.h +++ b/Source/CTest/cmCTestScriptHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestSleepCommand.h b/Source/CTest/cmCTestSleepCommand.h index c7e076f..1052f76 100644 --- a/Source/CTest/cmCTestSleepCommand.h +++ b/Source/CTest/cmCTestSleepCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestStartCommand.h b/Source/CTest/cmCTestStartCommand.h index 1686b20..cc72d0c 100644 --- a/Source/CTest/cmCTestStartCommand.h +++ b/Source/CTest/cmCTestStartCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestSubmitCommand.h b/Source/CTest/cmCTestSubmitCommand.h index f8b9a45..f5b52c1 100644 --- a/Source/CTest/cmCTestSubmitCommand.h +++ b/Source/CTest/cmCTestSubmitCommand.h @@ -7,7 +7,6 @@ #include "cmCTest.h" #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index 6e57de8..baaf8af 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -7,7 +7,6 @@ #include "cmCTest.h" #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h index b4a01dc..3250d93 100644 --- a/Source/CTest/cmCTestTestCommand.h +++ b/Source/CTest/cmCTestTestCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 703707f..5b07e98 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestUpdateCommand.h b/Source/CTest/cmCTestUpdateCommand.h index e834a29..5761f50 100644 --- a/Source/CTest/cmCTestUpdateCommand.h +++ b/Source/CTest/cmCTestUpdateCommand.h @@ -6,7 +6,6 @@ #include #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestUpdateHandler.h b/Source/CTest/cmCTestUpdateHandler.h index 9a3ec1b..87781e8 100644 --- a/Source/CTest/cmCTestUpdateHandler.h +++ b/Source/CTest/cmCTestUpdateHandler.h @@ -6,7 +6,6 @@ #include #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CTest/cmCTestUploadCommand.h b/Source/CTest/cmCTestUploadCommand.h index b231844..474f699 100644 --- a/Source/CTest/cmCTestUploadCommand.h +++ b/Source/CTest/cmCTestUploadCommand.h @@ -7,7 +7,6 @@ #include "cmCTest.h" #include "cmCTestHandlerCommand.h" -#include "cmTypeMacro.h" #include diff --git a/Source/CTest/cmCTestUploadHandler.h b/Source/CTest/cmCTestUploadHandler.h index eb05a86..77c2aec 100644 --- a/Source/CTest/cmCTestUploadHandler.h +++ b/Source/CTest/cmCTestUploadHandler.h @@ -7,7 +7,6 @@ #include "cmCTest.h" #include "cmCTestGenericHandler.h" -#include "cmTypeMacro.h" /** \class cmCTestUploadHandler * \brief Helper class for CTest diff --git a/Source/cmAddCompileOptionsCommand.h b/Source/cmAddCompileOptionsCommand.h index 3625626..71009b4 100644 --- a/Source/cmAddCompileOptionsCommand.h +++ b/Source/cmAddCompileOptionsCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmAuxSourceDirectoryCommand.h b/Source/cmAuxSourceDirectoryCommand.h index 89eba7f..d99bf7b 100644 --- a/Source/cmAuxSourceDirectoryCommand.h +++ b/Source/cmAuxSourceDirectoryCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmBuildNameCommand.h b/Source/cmBuildNameCommand.h index aa8669a..1e1f4b5 100644 --- a/Source/cmBuildNameCommand.h +++ b/Source/cmBuildNameCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmCMakeHostSystemInformationCommand.h b/Source/cmCMakeHostSystemInformationCommand.h index 8420d08..22f3d54 100644 --- a/Source/cmCMakeHostSystemInformationCommand.h +++ b/Source/cmCMakeHostSystemInformationCommand.h @@ -9,7 +9,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; namespace cmsys { diff --git a/Source/cmCommand.h b/Source/cmCommand.h index b263a61..dcfe8da 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -3,8 +3,6 @@ #ifndef cmCommand_h #define cmCommand_h -#include "cmObject.h" - #include "cmCommandArgumentsHelper.h" #include "cmListFileCache.h" #include "cmMakefile.h" diff --git a/Source/cmElseIfCommand.h b/Source/cmElseIfCommand.h index c66d642..3f1ddde 100644 --- a/Source/cmElseIfCommand.h +++ b/Source/cmElseIfCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmExportCommand.h b/Source/cmExportCommand.h index 41c3291..99dac7d 100644 --- a/Source/cmExportCommand.h +++ b/Source/cmExportCommand.h @@ -9,7 +9,6 @@ #include "cmCommand.h" #include "cmCommandArgumentsHelper.h" -#include "cmTypeMacro.h" class cmExecutionStatus; class cmExportSet; diff --git a/Source/cmExportLibraryDependenciesCommand.h b/Source/cmExportLibraryDependenciesCommand.h index 2f6ad65..be53349 100644 --- a/Source/cmExportLibraryDependenciesCommand.h +++ b/Source/cmExportLibraryDependenciesCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmFLTKWrapUICommand.h b/Source/cmFLTKWrapUICommand.h index 5559854..835f0a7 100644 --- a/Source/cmFLTKWrapUICommand.h +++ b/Source/cmFLTKWrapUICommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; class cmSourceFile; diff --git a/Source/cmIncludeExternalMSProjectCommand.h b/Source/cmIncludeExternalMSProjectCommand.h index 2f95589..9fcf467 100644 --- a/Source/cmIncludeExternalMSProjectCommand.h +++ b/Source/cmIncludeExternalMSProjectCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmInstallProgramsCommand.h b/Source/cmInstallProgramsCommand.h index 235ff1a..ca07a2f 100644 --- a/Source/cmInstallProgramsCommand.h +++ b/Source/cmInstallProgramsCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmLinkLibrariesCommand.h b/Source/cmLinkLibrariesCommand.h index 71053f5..66d7ec4 100644 --- a/Source/cmLinkLibrariesCommand.h +++ b/Source/cmLinkLibrariesCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmLoadCacheCommand.h b/Source/cmLoadCacheCommand.h index 432ba36..539c74e 100644 --- a/Source/cmLoadCacheCommand.h +++ b/Source/cmLoadCacheCommand.h @@ -9,7 +9,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h index 6c893fc..d16dfea 100644 --- a/Source/cmLoadCommandCommand.h +++ b/Source/cmLoadCommandCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmObject.h b/Source/cmObject.h deleted file mode 100644 index 621a06f..0000000 --- a/Source/cmObject.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmObject_h -#define cmObject_h - -#include - -#include "cmStandardIncludes.h" - -/** \class cmObject - * \brief Superclass for all commands and other classes in CMake. - * - * cmObject is the base class for all classes in CMake. It defines some - * methods such as GetNameOfClass, IsA, SafeDownCast. - */ -class cmObject -{ -public: - /** - * Need virtual destructor to destroy real command type. - */ - virtual ~cmObject() {} - - /** - * The class name of the command. - */ - virtual const char* GetNameOfClass() = 0; - - /** - * Returns true if this class is the given class, or a subclass of it. - */ - static bool IsTypeOf(const char* type) { return !strcmp("cmObject", type); } - - /** - * Returns true if this object is an instance of the given class or - * a subclass of it. - */ - virtual bool IsA(const char* type) { return cmObject::IsTypeOf(type); } -}; - -#endif diff --git a/Source/cmOutputRequiredFilesCommand.h b/Source/cmOutputRequiredFilesCommand.h index cb48568..c4ce680 100644 --- a/Source/cmOutputRequiredFilesCommand.h +++ b/Source/cmOutputRequiredFilesCommand.h @@ -10,7 +10,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmDependInformation; class cmExecutionStatus; diff --git a/Source/cmQTWrapCPPCommand.h b/Source/cmQTWrapCPPCommand.h index d07eba0..8eb5ff9 100644 --- a/Source/cmQTWrapCPPCommand.h +++ b/Source/cmQTWrapCPPCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmQTWrapUICommand.h b/Source/cmQTWrapUICommand.h index 9b8c5a0..876ddd5 100644 --- a/Source/cmQTWrapUICommand.h +++ b/Source/cmQTWrapUICommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmRemoveCommand.h b/Source/cmRemoveCommand.h index 8d82d6f..c935f28 100644 --- a/Source/cmRemoveCommand.h +++ b/Source/cmRemoveCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmRemoveDefinitionsCommand.h b/Source/cmRemoveDefinitionsCommand.h index 6aed8fc..2bcc12d 100644 --- a/Source/cmRemoveDefinitionsCommand.h +++ b/Source/cmRemoveDefinitionsCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h index 86bd61e..f533be1 100644 --- a/Source/cmSourceGroupCommand.h +++ b/Source/cmSourceGroupCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 0aab6d9..a2047af 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -49,6 +49,5 @@ extern void operator<<(std::ostream&, const std::ostringstream&); #include "cmCustomCommandLines.h" #include "cmDocumentationEntry.h" #include "cmTargetLinkLibraryType.h" -#include "cmTypeMacro.h" #endif diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 468b191..db1e542 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -10,7 +10,6 @@ #include "cmDefinitions.h" #include "cmListFileCache.h" #include "cmSystemTools.h" -#include "cmTypeMacro.h" #include "cmake.h" #include diff --git a/Source/cmSubdirDependsCommand.h b/Source/cmSubdirDependsCommand.h index aa3d2b3..80ff24f 100644 --- a/Source/cmSubdirDependsCommand.h +++ b/Source/cmSubdirDependsCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmTargetCompileDefinitionsCommand.h b/Source/cmTargetCompileDefinitionsCommand.h index 766a9c3..caaf23b 100644 --- a/Source/cmTargetCompileDefinitionsCommand.h +++ b/Source/cmTargetCompileDefinitionsCommand.h @@ -8,7 +8,6 @@ #include #include "cmTargetPropCommandBase.h" -#include "cmTypeMacro.h" class cmCommand; class cmExecutionStatus; diff --git a/Source/cmTargetCompileFeaturesCommand.h b/Source/cmTargetCompileFeaturesCommand.h index c599a37..01f2938 100644 --- a/Source/cmTargetCompileFeaturesCommand.h +++ b/Source/cmTargetCompileFeaturesCommand.h @@ -8,7 +8,6 @@ #include #include "cmTargetPropCommandBase.h" -#include "cmTypeMacro.h" class cmCommand; class cmExecutionStatus; diff --git a/Source/cmTargetCompileOptionsCommand.h b/Source/cmTargetCompileOptionsCommand.h index 7b41352..179013b 100644 --- a/Source/cmTargetCompileOptionsCommand.h +++ b/Source/cmTargetCompileOptionsCommand.h @@ -8,7 +8,6 @@ #include #include "cmTargetPropCommandBase.h" -#include "cmTypeMacro.h" class cmCommand; class cmExecutionStatus; diff --git a/Source/cmTargetIncludeDirectoriesCommand.h b/Source/cmTargetIncludeDirectoriesCommand.h index 81c0b11..bc6cf0d 100644 --- a/Source/cmTargetIncludeDirectoriesCommand.h +++ b/Source/cmTargetIncludeDirectoriesCommand.h @@ -8,7 +8,6 @@ #include #include "cmTargetPropCommandBase.h" -#include "cmTypeMacro.h" class cmCommand; class cmExecutionStatus; diff --git a/Source/cmTargetSourcesCommand.h b/Source/cmTargetSourcesCommand.h index 6f4b49f..b1afac2 100644 --- a/Source/cmTargetSourcesCommand.h +++ b/Source/cmTargetSourcesCommand.h @@ -8,7 +8,6 @@ #include #include "cmTargetPropCommandBase.h" -#include "cmTypeMacro.h" class cmCommand; class cmExecutionStatus; diff --git a/Source/cmTypeMacro.h b/Source/cmTypeMacro.h deleted file mode 100644 index b302ff1..0000000 --- a/Source/cmTypeMacro.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmTypeMacro_h -#define cmTypeMacro_h - -// All subclasses of cmCommand or cmCTestGenericHandler should -// invoke this macro. -#define cmTypeMacro(thisClass, superclass) \ - const char* GetNameOfClass() CM_OVERRIDE { return #thisClass; } \ - typedef superclass Superclass; \ - static bool IsTypeOf(const char* type) \ - { \ - if (!strcmp(#thisClass, type)) { \ - return true; \ - } \ - return Superclass::IsTypeOf(type); \ - } \ - bool IsA(const char* type) CM_OVERRIDE \ - { \ - return thisClass::IsTypeOf(type); \ - } \ - static thisClass* SafeDownCast(cmObject* c) \ - { \ - if (c && c->IsA(#thisClass)) { \ - return static_cast(c); \ - } \ - return 0; \ - } \ - class cmTypeMacro_UseTrailingSemicolon - -#endif diff --git a/Source/cmUseMangledMesaCommand.h b/Source/cmUseMangledMesaCommand.h index 68e77a1..9a49f94 100644 --- a/Source/cmUseMangledMesaCommand.h +++ b/Source/cmUseMangledMesaCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmUtilitySourceCommand.h b/Source/cmUtilitySourceCommand.h index a8549d1..849b966 100644 --- a/Source/cmUtilitySourceCommand.h +++ b/Source/cmUtilitySourceCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmVariableRequiresCommand.h b/Source/cmVariableRequiresCommand.h index 0b6be3b..baf717c 100644 --- a/Source/cmVariableRequiresCommand.h +++ b/Source/cmVariableRequiresCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmVariableWatchCommand.h b/Source/cmVariableWatchCommand.h index 2541ca8..919bac4 100644 --- a/Source/cmVariableWatchCommand.h +++ b/Source/cmVariableWatchCommand.h @@ -9,7 +9,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; diff --git a/Source/cmWriteFileCommand.h b/Source/cmWriteFileCommand.h index df7ccc3..73e6e22 100644 --- a/Source/cmWriteFileCommand.h +++ b/Source/cmWriteFileCommand.h @@ -8,7 +8,6 @@ #include #include "cmCommand.h" -#include "cmTypeMacro.h" class cmExecutionStatus; ----------------------------------------------------------------------- Summary of changes: Source/CPack/IFW/cmCPackIFWGenerator.h | 1 - Source/CPack/cmCPack7zGenerator.h | 1 - Source/CPack/cmCPackArchiveGenerator.h | 1 - Source/CPack/cmCPackDebGenerator.h | 1 - Source/CPack/cmCPackGenerator.h | 2 - Source/CPack/cmCPackGeneratorFactory.h | 3 -- Source/CPack/cmCPackLog.h | 3 -- Source/CPack/cmCPackNSISGenerator.h | 1 - Source/CPack/cmCPackPKGGenerator.h | 3 ++ Source/CPack/cmCPackRPMGenerator.h | 1 - Source/CPack/cmCPackSTGZGenerator.h | 1 - Source/CPack/cmCPackTGZGenerator.h | 1 - Source/CPack/cmCPackTXZGenerator.h | 1 - Source/CPack/cmCPackTarBZip2Generator.h | 1 - Source/CPack/cmCPackTarCompressGenerator.h | 1 - Source/CPack/cmCPackZIPGenerator.h | 1 - Source/CPack/cpack.cxx | 1 - Source/CTest/cmCTestBuildAndTestHandler.h | 1 - Source/CTest/cmCTestBuildCommand.h | 1 - Source/CTest/cmCTestBuildHandler.h | 1 - Source/CTest/cmCTestConfigureCommand.h | 1 - Source/CTest/cmCTestConfigureHandler.h | 1 - Source/CTest/cmCTestCoverageCommand.h | 1 - Source/CTest/cmCTestCoverageHandler.h | 1 - Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h | 1 - Source/CTest/cmCTestGenericHandler.h | 1 - Source/CTest/cmCTestHandlerCommand.h | 1 - Source/CTest/cmCTestMemCheckCommand.h | 1 - Source/CTest/cmCTestMemCheckHandler.h | 1 - Source/CTest/cmCTestReadCustomFilesCommand.h | 1 - Source/CTest/cmCTestRunScriptCommand.h | 1 - Source/CTest/cmCTestScriptHandler.h | 1 - Source/CTest/cmCTestSleepCommand.h | 1 - Source/CTest/cmCTestStartCommand.h | 1 - Source/CTest/cmCTestSubmitCommand.h | 1 - Source/CTest/cmCTestSubmitHandler.h | 1 - Source/CTest/cmCTestTestCommand.h | 1 - Source/CTest/cmCTestTestHandler.h | 1 - Source/CTest/cmCTestUpdateCommand.h | 1 - Source/CTest/cmCTestUpdateHandler.h | 1 - Source/CTest/cmCTestUploadCommand.h | 1 - Source/CTest/cmCTestUploadHandler.h | 1 - Source/cmAddCompileOptionsCommand.h | 1 - Source/cmAuxSourceDirectoryCommand.h | 1 - Source/cmBuildNameCommand.h | 1 - Source/cmCMakeHostSystemInformationCommand.h | 1 - Source/cmCommand.h | 2 - Source/cmElseIfCommand.h | 1 - Source/cmExportCommand.h | 1 - Source/cmExportLibraryDependenciesCommand.h | 1 - Source/cmFLTKWrapUICommand.h | 1 - Source/cmIncludeExternalMSProjectCommand.h | 1 - Source/cmInstallProgramsCommand.h | 1 - Source/cmLinkLibrariesCommand.h | 1 - Source/cmLoadCacheCommand.h | 1 - Source/cmLoadCommandCommand.h | 1 - Source/cmObject.h | 41 --------------------- Source/cmOutputRequiredFilesCommand.h | 1 - Source/cmQTWrapCPPCommand.h | 1 - Source/cmQTWrapUICommand.h | 1 - Source/cmRemoveCommand.h | 1 - Source/cmRemoveDefinitionsCommand.h | 1 - Source/cmSourceGroupCommand.h | 1 - Source/cmStandardIncludes.h | 1 - Source/cmState.cxx | 1 - Source/cmSubdirDependsCommand.h | 1 - Source/cmTargetCompileDefinitionsCommand.h | 1 - Source/cmTargetCompileFeaturesCommand.h | 1 - Source/cmTargetCompileOptionsCommand.h | 1 - Source/cmTargetIncludeDirectoriesCommand.h | 1 - Source/cmTargetSourcesCommand.h | 1 - Source/cmTypeMacro.h | 31 ---------------- Source/cmUseMangledMesaCommand.h | 1 - Source/cmUtilitySourceCommand.h | 1 - Source/cmVariableRequiresCommand.h | 1 - Source/cmVariableWatchCommand.h | 1 - Source/cmWriteFileCommand.h | 1 - 77 files changed, 3 insertions(+), 152 deletions(-) delete mode 100644 Source/cmObject.h delete mode 100644 Source/cmTypeMacro.h hooks/post-receive -- CMake From daniel at pfeifer-mail.de Mon Oct 24 16:36:32 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Mon, 24 Oct 2016 16:36:32 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-727-g1529102 Message-ID: <20161024203632.19286F74A2@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 1529102dab129c3d2e1010f1e37544fd4a698f5d (commit) via c15dc1972839e175afaa9011f74376dadf08277f (commit) from 2b3a600e8570df998247ed89da75522cb97e8563 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1529102dab129c3d2e1010f1e37544fd4a698f5d commit 1529102dab129c3d2e1010f1e37544fd4a698f5d Merge: 2b3a600 c15dc19 Author: Daniel Pfeifer AuthorDate: Mon Oct 24 16:36:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 24 16:36:31 2016 -0400 Merge topic 'cm_unordered_set' into next c15dc197 Introduce CM_UNORDERED_SET https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c15dc1972839e175afaa9011f74376dadf08277f commit c15dc1972839e175afaa9011f74376dadf08277f Author: Daniel Pfeifer AuthorDate: Mon Oct 24 22:33:18 2016 +0200 Commit: Daniel Pfeifer CommitDate: Mon Oct 24 22:34:52 2016 +0200 Introduce CM_UNORDERED_SET Avoid duplicating switch among std::unordered_set, cmsys::hash_set, and std::set. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8ac302a..ca056c0 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -21,6 +21,7 @@ #include "cmTargetLinkLibraryType.h" #include "cmTargetPropertyComputer.h" #include "cm_auto_ptr.hxx" +#include "cm_unordered_set.hxx" #include "cmake.h" #include @@ -34,16 +35,6 @@ #include #include -#if defined(CMake_HAVE_CXX_UNORDERED_SET) -#include -#define UNORDERED_SET std::unordered_set -#elif defined(CMAKE_BUILD_WITH_CMAKE) -#include -#define UNORDERED_SET cmsys::hash_set -#else -#define UNORDERED_SET std::set -#endif - template <> const char* cmTargetPropertyComputer::GetSources( cmGeneratorTarget const* tgt, cmMessenger* /* messenger */, @@ -926,7 +917,7 @@ static void AddInterfaceEntries( static bool processSources( cmGeneratorTarget const* tgt, const std::vector& entries, - std::vector& srcs, UNORDERED_SET& uniqueSrcs, + std::vector& srcs, CM_UNORDERED_SET& uniqueSrcs, cmGeneratorExpressionDAGChecker* dagChecker, std::string const& config, bool debugSources) { @@ -1053,7 +1044,7 @@ void cmGeneratorTarget::GetSourceFiles(std::vector& files, cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), "SOURCES", CM_NULLPTR, CM_NULLPTR); - UNORDERED_SET uniqueSrcs; + CM_UNORDERED_SET uniqueSrcs; bool contextDependentDirectSources = processSources(this, this->SourceEntries, files, uniqueSrcs, &dagChecker, config, debugSources); @@ -1592,7 +1583,7 @@ class cmTargetCollectLinkLanguages public: cmTargetCollectLinkLanguages(cmGeneratorTarget const* target, const std::string& config, - UNORDERED_SET& languages, + CM_UNORDERED_SET& languages, cmGeneratorTarget const* head) : Config(config) , Languages(languages) @@ -1659,7 +1650,7 @@ public: private: std::string Config; - UNORDERED_SET& Languages; + CM_UNORDERED_SET& Languages; cmGeneratorTarget const* HeadTarget; const cmGeneratorTarget* Target; std::set Visited; @@ -1731,7 +1722,7 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config, LinkClosure& lc) const { // Get languages built in this target. - UNORDERED_SET languages; + CM_UNORDERED_SET languages; cmLinkImplementation const* impl = this->GetLinkImplementation(config); assert(impl); for (std::vector::const_iterator li = impl->Languages.begin(); @@ -1748,7 +1739,7 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config, } // Store the transitive closure of languages. - for (UNORDERED_SET::const_iterator li = languages.begin(); + for (CM_UNORDERED_SET::const_iterator li = languages.begin(); li != languages.end(); ++li) { lc.Languages.push_back(*li); } @@ -1769,7 +1760,7 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config, } // Now consider languages that propagate from linked targets. - for (UNORDERED_SET::const_iterator sit = languages.begin(); + for (CM_UNORDERED_SET::const_iterator sit = languages.begin(); sit != languages.end(); ++sit) { std::string propagates = "CMAKE_" + *sit + "_LINKER_PREFERENCE_PROPAGATES"; @@ -2338,7 +2329,7 @@ static void processIncludeDirectories( cmGeneratorTarget const* tgt, const std::vector& entries, std::vector& includes, - UNORDERED_SET& uniqueIncludes, + CM_UNORDERED_SET& uniqueIncludes, cmGeneratorExpressionDAGChecker* dagChecker, const std::string& config, bool debugIncludes, const std::string& language) { @@ -2451,7 +2442,7 @@ std::vector cmGeneratorTarget::GetIncludeDirectories( const std::string& config, const std::string& lang) const { std::vector includes; - UNORDERED_SET uniqueIncludes; + CM_UNORDERED_SET uniqueIncludes; cmGeneratorExpressionDAGChecker dagChecker( this->GetName(), "INCLUDE_DIRECTORIES", CM_NULLPTR, CM_NULLPTR); @@ -2528,7 +2519,8 @@ std::vector cmGeneratorTarget::GetIncludeDirectories( static void processCompileOptionsInternal( cmGeneratorTarget const* tgt, const std::vector& entries, - std::vector& options, UNORDERED_SET& uniqueOptions, + std::vector& options, + CM_UNORDERED_SET& uniqueOptions, cmGeneratorExpressionDAGChecker* dagChecker, const std::string& config, bool debugOptions, const char* logName, std::string const& language) { @@ -2565,7 +2557,8 @@ static void processCompileOptionsInternal( static void processCompileOptions( cmGeneratorTarget const* tgt, const std::vector& entries, - std::vector& options, UNORDERED_SET& uniqueOptions, + std::vector& options, + CM_UNORDERED_SET& uniqueOptions, cmGeneratorExpressionDAGChecker* dagChecker, const std::string& config, bool debugOptions, std::string const& language) { @@ -2578,7 +2571,7 @@ void cmGeneratorTarget::GetCompileOptions(std::vector& result, const std::string& config, const std::string& language) const { - UNORDERED_SET uniqueOptions; + CM_UNORDERED_SET uniqueOptions; cmGeneratorExpressionDAGChecker dagChecker( this->GetName(), "COMPILE_OPTIONS", CM_NULLPTR, CM_NULLPTR); @@ -2618,7 +2611,8 @@ void cmGeneratorTarget::GetCompileOptions(std::vector& result, static void processCompileFeatures( cmGeneratorTarget const* tgt, const std::vector& entries, - std::vector& options, UNORDERED_SET& uniqueOptions, + std::vector& options, + CM_UNORDERED_SET& uniqueOptions, cmGeneratorExpressionDAGChecker* dagChecker, const std::string& config, bool debugOptions) { @@ -2630,7 +2624,7 @@ static void processCompileFeatures( void cmGeneratorTarget::GetCompileFeatures(std::vector& result, const std::string& config) const { - UNORDERED_SET uniqueFeatures; + CM_UNORDERED_SET uniqueFeatures; cmGeneratorExpressionDAGChecker dagChecker( this->GetName(), "COMPILE_FEATURES", CM_NULLPTR, CM_NULLPTR); @@ -2667,7 +2661,8 @@ void cmGeneratorTarget::GetCompileFeatures(std::vector& result, static void processCompileDefinitions( cmGeneratorTarget const* tgt, const std::vector& entries, - std::vector& options, UNORDERED_SET& uniqueOptions, + std::vector& options, + CM_UNORDERED_SET& uniqueOptions, cmGeneratorExpressionDAGChecker* dagChecker, const std::string& config, bool debugOptions, std::string const& language) { @@ -2680,7 +2675,7 @@ void cmGeneratorTarget::GetCompileDefinitions( std::vector& list, const std::string& config, const std::string& language) const { - UNORDERED_SET uniqueOptions; + CM_UNORDERED_SET uniqueOptions; cmGeneratorExpressionDAGChecker dagChecker( this->GetName(), "COMPILE_DEFINITIONS", CM_NULLPTR, CM_NULLPTR); @@ -4149,7 +4144,7 @@ void cmGeneratorTarget::ComputeLinkInterface( this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { // Shared libraries may have runtime implementation dependencies // on other shared libraries that are not in the interface. - UNORDERED_SET emitted; + CM_UNORDERED_SET emitted; for (std::vector::const_iterator li = iface.Libraries.begin(); li != iface.Libraries.end(); ++li) { diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 6f47f85..25ae339 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -16,6 +16,7 @@ #include "cmState.h" #include "cmSystemTools.h" #include "cmTargetPropertyComputer.h" +#include "cm_unordered_set.hxx" #include "cmake.h" #include @@ -26,16 +27,6 @@ #include #include -#if defined(CMake_HAVE_CXX_UNORDERED_SET) -#include -#define UNORDERED_SET std::unordered_set -#elif defined(CMAKE_BUILD_WITH_CMAKE) -#include -#define UNORDERED_SET cmsys::hash_set -#else -#define UNORDERED_SET std::set -#endif - template <> const char* cmTargetPropertyComputer::ComputeLocationForBuild( cmTarget const* tgt) @@ -1145,7 +1136,7 @@ const char* cmTarget::GetComputedProperty( const char* cmTarget::GetProperty(const std::string& prop) const { - static UNORDERED_SET specialProps; + static CM_UNORDERED_SET specialProps; #define MAKE_STATIC_PROP(PROP) static const std::string prop##PROP = #PROP MAKE_STATIC_PROP(LINK_LIBRARIES); MAKE_STATIC_PROP(TYPE); diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx index 36d1940..7cf1fd8 100644 --- a/Source/cmTargetPropertyComputer.cxx +++ b/Source/cmTargetPropertyComputer.cxx @@ -10,16 +10,7 @@ #include "cmSourceFile.h" #include "cmSourceFileLocation.h" #include "cmTarget.h" - -#if defined(CMake_HAVE_CXX_UNORDERED_SET) -#include -#define UNORDERED_SET std::unordered_set -#elif defined(CMAKE_BUILD_WITH_CMAKE) -#include -#define UNORDERED_SET cmsys::hash_set -#else -#define UNORDERED_SET std::set -#endif +#include "cm_unordered_set.hxx" bool cmTargetPropertyComputer::HandleLocationPropertyPolicy( std::string const& tgtName, cmMessenger* messenger, @@ -59,7 +50,7 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty( if (cmHasLiteralPrefix(prop, "INTERFACE_")) { return true; } - static UNORDERED_SET builtIns; + static CM_UNORDERED_SET builtIns; if (builtIns.empty()) { builtIns.insert("COMPATIBLE_INTERFACE_BOOL"); builtIns.insert("COMPATIBLE_INTERFACE_NUMBER_MAX"); diff --git a/Source/cm_unordered_set.hxx b/Source/cm_unordered_set.hxx new file mode 100644 index 0000000..ce58dbf --- /dev/null +++ b/Source/cm_unordered_set.hxx @@ -0,0 +1,25 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef CM_UNORDERED_SET_HXX +#define CM_UNORDERED_SET_HXX + +#include + +#if defined(CMake_HAVE_CXX_UNORDERED_SET) + +#include +#define CM_UNORDERED_SET std::unordered_set + +#elif defined(CMAKE_BUILD_WITH_CMAKE) + +#include +#define CM_UNORDERED_SET cmsys::hash_set + +#else + +#include +#define CM_UNORDERED_SET std::set + +#endif + +#endif ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 49 ++++++++++++++++------------------- Source/cmTarget.cxx | 13 ++-------- Source/cmTargetPropertyComputer.cxx | 13 ++-------- Source/cm_unordered_set.hxx | 25 ++++++++++++++++++ 4 files changed, 51 insertions(+), 49 deletions(-) create mode 100644 Source/cm_unordered_set.hxx hooks/post-receive -- CMake From kwrobot at kitware.com Tue Oct 25 00:01:08 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 25 Oct 2016 00:01:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-321-gc1a5205 Message-ID: <20161025040108.694A1F75B0@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 c1a520513d4c7504fc9e9e4d9e56acc24569f490 (commit) from f660832999e086f02a9f3552c028aed900cd7249 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c1a520513d4c7504fc9e9e4d9e56acc24569f490 commit c1a520513d4c7504fc9e9e4d9e56acc24569f490 Author: Kitware Robot AuthorDate: Tue Oct 25 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Tue Oct 25 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a2acd97..c656fba 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 7) -set(CMake_VERSION_PATCH 20161024) +set(CMake_VERSION_PATCH 20161025) #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 Oct 25 09:05:11 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:05:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-730-gcc04b22 Message-ID: <20161025130511.A209FF774B@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 cc04b2272954e90e97af212ab76ba8322bf225d4 (commit) via 87cc9bfc3c6892c93e10f73421e2b0fdba06b8e9 (commit) via 42db2ebc756a48ecdb15841c18747cb69e9df11f (commit) from 1529102dab129c3d2e1010f1e37544fd4a698f5d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc04b2272954e90e97af212ab76ba8322bf225d4 commit cc04b2272954e90e97af212ab76ba8322bf225d4 Merge: 1529102 87cc9bf Author: Brad King AuthorDate: Tue Oct 25 09:05:08 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 09:05:08 2016 -0400 Merge topic 'ninja-subdir-binary-dir' into next 87cc9bfc Merge branch 'backport-ninja-subdir-binary-dir' into ninja-subdir-binary-dir 42db2ebc Ninja: Use binary dir for `$subdir/all` targets https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87cc9bfc3c6892c93e10f73421e2b0fdba06b8e9 commit 87cc9bfc3c6892c93e10f73421e2b0fdba06b8e9 Merge: e983bd3 42db2eb Author: Brad King AuthorDate: Mon Oct 24 10:30:52 2016 -0400 Commit: Brad King CommitDate: Mon Oct 24 10:30:52 2016 -0400 Merge branch 'backport-ninja-subdir-binary-dir' into ninja-subdir-binary-dir https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42db2ebc756a48ecdb15841c18747cb69e9df11f commit 42db2ebc756a48ecdb15841c18747cb69e9df11f Author: Alexis Murzeau AuthorDate: Sun Oct 23 18:58:28 2016 +0200 Commit: Brad King CommitDate: Mon Oct 24 09:49:23 2016 -0400 Ninja: Use binary dir for `$subdir/all` targets The targets added by commit v3.6.0-rc1~240^2~2 (Ninja: Add `$subdir/all` targets, 2016-03-11) use as `$subdir` the relative path from the top of the source tree to the current source directory. This is not correct when using `add_subdirectory(test test_bin)`. Instead we need to use the relative path from the top of the binary tree to the current binary directory as was done for related targets by commit v3.7.0-rc1~268^2 (Ninja: Add `$subdir/{test,install,package}` targets, 2016-08-05). diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index f5a0e68..5e6036d 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -843,20 +843,6 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) return convPath; } -std::string cmGlobalNinjaGenerator::ConvertToNinjaFolderRule( - const std::string& path) -{ - cmLocalNinjaGenerator* ng = - static_cast(this->LocalGenerators[0]); - std::string convPath = ng->ConvertToRelativePath( - this->LocalGenerators[0]->GetState()->GetSourceDirectory(), path + "/all"); - convPath = this->NinjaOutputPath(convPath); -#ifdef _WIN32 - std::replace(convPath.begin(), convPath.end(), '/', '\\'); -#endif - return convPath; -} - void cmGlobalNinjaGenerator::AddCXXCompileCommand( const std::string& commandLine, const std::string& sourceFile) { @@ -1083,11 +1069,11 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) this->LocalGenerators.begin(); lgi != this->LocalGenerators.end(); ++lgi) { cmLocalGenerator const* lg = *lgi; - const std::string currentSourceFolder( - lg->GetStateSnapshot().GetDirectory().GetCurrentSource()); + const std::string currentBinaryFolder( + lg->GetStateSnapshot().GetDirectory().GetCurrentBinary()); // The directory-level rule should depend on the target-level rules // for all targets in the directory. - targetsPerFolder[currentSourceFolder] = cmNinjaDeps(); + targetsPerFolder[currentBinaryFolder] = cmNinjaDeps(); for (std::vector::const_iterator ti = lg->GetGeneratorTargets().begin(); ti != lg->GetGeneratorTargets().end(); ++ti) { @@ -1098,7 +1084,7 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) type == cmState::MODULE_LIBRARY || type == cmState::OBJECT_LIBRARY || type == cmState::UTILITY) && !gt->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { - targetsPerFolder[currentSourceFolder].push_back(gt->GetName()); + targetsPerFolder[currentBinaryFolder].push_back(gt->GetName()); } } @@ -1109,28 +1095,30 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) for (std::vector::const_iterator stateIt = children.begin(); stateIt != children.end(); ++stateIt) { - targetsPerFolder[currentSourceFolder].push_back( - this->ConvertToNinjaFolderRule( - stateIt->GetDirectory().GetCurrentSource())); + std::string const currentBinaryDir = + stateIt->GetDirectory().GetCurrentBinary(); + + targetsPerFolder[currentBinaryFolder].push_back( + this->ConvertToNinjaPath(currentBinaryDir + "/all")); } } - std::string const rootSourceDir = - this->LocalGenerators[0]->GetSourceDirectory(); + std::string const rootBinaryDir = + this->LocalGenerators[0]->GetBinaryDirectory(); for (std::map::const_iterator it = targetsPerFolder.begin(); it != targetsPerFolder.end(); ++it) { cmGlobalNinjaGenerator::WriteDivider(os); - std::string const& currentSourceDir = it->first; + std::string const& currentBinaryDir = it->first; - // Do not generate a rule for the root source dir. - if (rootSourceDir.length() >= currentSourceDir.length()) { + // Do not generate a rule for the root binary dir. + if (rootBinaryDir.length() >= currentBinaryDir.length()) { continue; } - std::string const comment = "Folder: " + currentSourceDir; + std::string const comment = "Folder: " + currentBinaryDir; cmNinjaDeps output(1); - output.push_back(this->ConvertToNinjaFolderRule(currentSourceDir)); + output.push_back(this->ConvertToNinjaPath(currentBinaryDir + "/all")); this->WritePhonyBuild(os, comment, output, it->second); } diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index dcf7406..2ce3c80 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -234,7 +234,6 @@ public: } std::string ConvertToNinjaPath(const std::string& path); - std::string ConvertToNinjaFolderRule(const std::string& path); struct MapToNinjaPathImpl { diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 778f2c1..1d3639d 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -45,14 +45,23 @@ function(run_SubDir) set(SubDir_all [[SubDir\all]]) set(SubDir_test [[SubDir\test]]) set(SubDir_install [[SubDir\install]]) + set(SubDirBinary_test [[SubDirBinary\test]]) + set(SubDirBinary_all [[SubDirBinary\all]]) + set(SubDirBinary_install [[SubDirBinary\install]]) else() set(SubDir_all [[SubDir/all]]) set(SubDir_test [[SubDir/test]]) set(SubDir_install [[SubDir/install]]) + set(SubDirBinary_all [[SubDirBinary/all]]) + set(SubDirBinary_test [[SubDirBinary/test]]) + set(SubDirBinary_install [[SubDirBinary/install]]) endif() run_cmake_command(SubDir-build ${CMAKE_COMMAND} --build . --target ${SubDir_all}) run_cmake_command(SubDir-test ${CMAKE_COMMAND} --build . --target ${SubDir_test}) run_cmake_command(SubDir-install ${CMAKE_COMMAND} --build . --target ${SubDir_install}) + run_cmake_command(SubDirBinary-build ${CMAKE_COMMAND} --build . --target ${SubDirBinary_all}) + run_cmake_command(SubDirBinary-test ${CMAKE_COMMAND} --build . --target ${SubDirBinary_test}) + run_cmake_command(SubDirBinary-install ${CMAKE_COMMAND} --build . --target ${SubDirBinary_install}) endfunction() run_SubDir() diff --git a/Tests/RunCMake/Ninja/SubDir.cmake b/Tests/RunCMake/Ninja/SubDir.cmake index d227753..11f467a 100644 --- a/Tests/RunCMake/Ninja/SubDir.cmake +++ b/Tests/RunCMake/Ninja/SubDir.cmake @@ -1,5 +1,6 @@ include(CTest) add_subdirectory(SubDir) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/SubDirSource SubDirBinary) add_custom_target(TopFail ALL COMMAND does_not_exist) add_test(NAME TopTest COMMAND ${CMAKE_COMMAND} -E echo "Running TopTest") install(CODE [[ diff --git a/Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt b/Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt new file mode 100644 index 0000000..244eaa0 --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt @@ -0,0 +1 @@ +Building SubDirSourceInAll diff --git a/Tests/RunCMake/Ninja/SubDirBinary-install-stdout.txt b/Tests/RunCMake/Ninja/SubDirBinary-install-stdout.txt new file mode 100644 index 0000000..6b6c6dd --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDirBinary-install-stdout.txt @@ -0,0 +1 @@ +-- Installing SubDirSource diff --git a/Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt b/Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt new file mode 100644 index 0000000..d6d6605 --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt @@ -0,0 +1 @@ +1/1 Test #1: SubDirSourceTest diff --git a/Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt b/Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt new file mode 100644 index 0000000..2664261 --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt @@ -0,0 +1,6 @@ +add_custom_target(SubDirSourceFail COMMAND does_not_exist) +add_custom_target(SubDirSourceInAll ALL COMMAND ${CMAKE_COMMAND} -E echo "Building SubDirSourceInAll") +add_test(NAME SubDirSourceTest COMMAND ${CMAKE_COMMAND} -E echo "Running SubDirSourceTest") +install(CODE [[ + message(STATUS "Installing SubDirSource") +]]) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 09:08:51 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:08:51 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-323-g9a399c2 Message-ID: <20161025130851.47333F7566@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 9a399c27a8c6e9a264cbabf9bb3b091b2e74a71f (commit) via 9b8dc79cc84d12c1e661ca3cd77b773b463508d7 (commit) from c1a520513d4c7504fc9e9e4d9e56acc24569f490 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a399c27a8c6e9a264cbabf9bb3b091b2e74a71f commit 9a399c27a8c6e9a264cbabf9bb3b091b2e74a71f Merge: c1a5205 9b8dc79 Author: Brad King AuthorDate: Tue Oct 25 09:08:49 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 09:08:49 2016 -0400 Merge topic 'cmake-server-message-quoting' 9b8dc79c cmake-server: Change message wrapper to avoid ambiguity with content ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 108 ++++++++++++++++++++-------------------- Source/cmServerDictionary.h | 4 +- Tests/Server/cmakelib.py | 10 ++-- 3 files changed, 61 insertions(+), 61 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 09:08:54 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:08:54 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-327-g9430125 Message-ID: <20161025130854.70499F74A3@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 9430125511865b65e2fa897c59c70414238fbf91 (commit) via 87cc9bfc3c6892c93e10f73421e2b0fdba06b8e9 (commit) via e983bd326a9e3b7902d8f7cf0d891030ad3bd4c1 (commit) via 42db2ebc756a48ecdb15841c18747cb69e9df11f (commit) from 9a399c27a8c6e9a264cbabf9bb3b091b2e74a71f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9430125511865b65e2fa897c59c70414238fbf91 commit 9430125511865b65e2fa897c59c70414238fbf91 Merge: 9a399c2 87cc9bf Author: Brad King AuthorDate: Tue Oct 25 09:08:51 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 09:08:51 2016 -0400 Merge topic 'ninja-subdir-binary-dir' 87cc9bfc Merge branch 'backport-ninja-subdir-binary-dir' into ninja-subdir-binary-dir e983bd32 Ninja: Use binary dir for `$subdir/all` targets 42db2ebc Ninja: Use binary dir for `$subdir/all` targets ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalNinjaGenerator.cxx | 44 +++++++------------- Source/cmGlobalNinjaGenerator.h | 1 - Tests/RunCMake/Ninja/RunCMakeTest.cmake | 9 ++++ Tests/RunCMake/Ninja/SubDir.cmake | 1 + Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt | 1 + .../RunCMake/Ninja/SubDirBinary-install-stdout.txt | 1 + Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt | 1 + Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt | 6 +++ 8 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt create mode 100644 Tests/RunCMake/Ninja/SubDirBinary-install-stdout.txt create mode 100644 Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt create mode 100644 Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 09:08:57 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:08:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-330-g644ff57 Message-ID: <20161025130857.6E55DF77D9@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 644ff572f736ff04f927661fa5bd2283cd3ee3e1 (commit) via 4c272adbe1d67af4779f4e72d9562457ed851dac (commit) via 6205f1797e33c22ab1f9cda8598d02b24497b806 (commit) from 9430125511865b65e2fa897c59c70414238fbf91 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=644ff572f736ff04f927661fa5bd2283cd3ee3e1 commit 644ff572f736ff04f927661fa5bd2283cd3ee3e1 Merge: 9430125 4c272ad Author: Brad King AuthorDate: Tue Oct 25 09:08:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 09:08:55 2016 -0400 Merge topic 'android-pic' 4c272adb Android: Link position-independent executables with proper flags 6205f179 Android: Set CMAKE_POSITION_INDEPENDENT_CODE automatically ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android/abi-arm64-v8a-Clang.cmake | 4 ---- Modules/Platform/Android/abi-arm64-v8a-GNU.cmake | 3 --- Modules/Platform/Android/abi-armeabi-Clang.cmake | 1 - Modules/Platform/Android/abi-armeabi-GNU.cmake | 1 - Modules/Platform/Android/abi-armeabi-v6-Clang.cmake | 1 - Modules/Platform/Android/abi-armeabi-v6-GNU.cmake | 1 - Modules/Platform/Android/abi-armeabi-v7a-Clang.cmake | 1 - Modules/Platform/Android/abi-armeabi-v7a-GNU.cmake | 1 - Modules/Platform/Android/abi-common.cmake | 9 +++++++++ Modules/Platform/Android/abi-mips-Clang.cmake | 4 ---- Modules/Platform/Android/abi-mips-GNU.cmake | 3 --- Modules/Platform/Android/abi-mips64-Clang.cmake | 4 ---- Modules/Platform/Android/abi-mips64-GNU.cmake | 3 --- Modules/Platform/Android/abi-x86-Clang.cmake | 4 ---- Modules/Platform/Android/abi-x86_64-Clang.cmake | 4 ---- 15 files changed, 9 insertions(+), 35 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 09:09:00 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:09:00 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-332-g3062b8a Message-ID: <20161025130900.D4022F77DB@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 3062b8a046b24e4c28b374b5c4235bb0da0a2a2c (commit) via 9f1429e274df81344d260c8e42b3387a402940f1 (commit) from 644ff572f736ff04f927661fa5bd2283cd3ee3e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3062b8a046b24e4c28b374b5c4235bb0da0a2a2c commit 3062b8a046b24e4c28b374b5c4235bb0da0a2a2c Merge: 644ff57 9f1429e Author: Brad King AuthorDate: Tue Oct 25 09:08:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 09:08:58 2016 -0400 Merge topic 'st2-fix-regex' 9f1429e2 Sublime: Update generated diagnostic matching expression for MSVC ----------------------------------------------------------------------- Summary of changes: Source/cmExtraSublimeTextGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 09:09:03 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:09:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-334-g61758bf Message-ID: <20161025130904.01C85F1695@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 61758bf4b9b5d28cec11d2ea68b9e53ad2769ca6 (commit) via 881585f9757972473519d5394ea04a7d962ac70e (commit) from 3062b8a046b24e4c28b374b5c4235bb0da0a2a2c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61758bf4b9b5d28cec11d2ea68b9e53ad2769ca6 commit 61758bf4b9b5d28cec11d2ea68b9e53ad2769ca6 Merge: 3062b8a 881585f Author: Brad King AuthorDate: Tue Oct 25 09:09:01 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 09:09:01 2016 -0400 Merge topic 'intel-compile-features-windows' 881585f9 Intel: Fix compiler extension flags on Windows ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Intel-C.cmake | 9 ++++++--- Modules/Compiler/Intel-CXX.cmake | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 09:09:07 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:09:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-336-gbdc8864 Message-ID: <20161025130908.CE667F5E59@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 bdc88646c1336a209d16de14bd23eb436565363d (commit) via 15aa814b85a90fb8e8798eb99617d27957c28f36 (commit) from 61758bf4b9b5d28cec11d2ea68b9e53ad2769ca6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bdc88646c1336a209d16de14bd23eb436565363d commit bdc88646c1336a209d16de14bd23eb436565363d Merge: 61758bf 15aa814 Author: Brad King AuthorDate: Tue Oct 25 09:09:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 09:09:04 2016 -0400 Merge topic 'remove-cmobject' 15aa814b Remove cmObject.h and cmTypeMacro.h ----------------------------------------------------------------------- Summary of changes: Source/CPack/IFW/cmCPackIFWGenerator.h | 1 - Source/CPack/cmCPack7zGenerator.h | 1 - Source/CPack/cmCPackArchiveGenerator.h | 1 - Source/CPack/cmCPackDebGenerator.h | 1 - Source/CPack/cmCPackGenerator.h | 2 - Source/CPack/cmCPackGeneratorFactory.h | 3 -- Source/CPack/cmCPackLog.h | 3 -- Source/CPack/cmCPackNSISGenerator.h | 1 - Source/CPack/cmCPackPKGGenerator.h | 3 ++ Source/CPack/cmCPackRPMGenerator.h | 1 - Source/CPack/cmCPackSTGZGenerator.h | 1 - Source/CPack/cmCPackTGZGenerator.h | 1 - Source/CPack/cmCPackTXZGenerator.h | 1 - Source/CPack/cmCPackTarBZip2Generator.h | 1 - Source/CPack/cmCPackTarCompressGenerator.h | 1 - Source/CPack/cmCPackZIPGenerator.h | 1 - Source/CPack/cpack.cxx | 1 - Source/CTest/cmCTestBuildAndTestHandler.h | 1 - Source/CTest/cmCTestBuildCommand.h | 1 - Source/CTest/cmCTestBuildHandler.h | 1 - Source/CTest/cmCTestConfigureCommand.h | 1 - Source/CTest/cmCTestConfigureHandler.h | 1 - Source/CTest/cmCTestCoverageCommand.h | 1 - Source/CTest/cmCTestCoverageHandler.h | 1 - Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h | 1 - Source/CTest/cmCTestGenericHandler.h | 1 - Source/CTest/cmCTestHandlerCommand.h | 1 - Source/CTest/cmCTestMemCheckCommand.h | 1 - Source/CTest/cmCTestMemCheckHandler.h | 1 - Source/CTest/cmCTestReadCustomFilesCommand.h | 1 - Source/CTest/cmCTestRunScriptCommand.h | 1 - Source/CTest/cmCTestScriptHandler.h | 1 - Source/CTest/cmCTestSleepCommand.h | 1 - Source/CTest/cmCTestStartCommand.h | 1 - Source/CTest/cmCTestSubmitCommand.h | 1 - Source/CTest/cmCTestSubmitHandler.h | 1 - Source/CTest/cmCTestTestCommand.h | 1 - Source/CTest/cmCTestTestHandler.h | 1 - Source/CTest/cmCTestUpdateCommand.h | 1 - Source/CTest/cmCTestUpdateHandler.h | 1 - Source/CTest/cmCTestUploadCommand.h | 1 - Source/CTest/cmCTestUploadHandler.h | 1 - Source/cmAddCompileOptionsCommand.h | 1 - Source/cmAuxSourceDirectoryCommand.h | 1 - Source/cmBuildNameCommand.h | 1 - Source/cmCMakeHostSystemInformationCommand.h | 1 - Source/cmCommand.h | 2 - Source/cmElseIfCommand.h | 1 - Source/cmExportCommand.h | 1 - Source/cmExportLibraryDependenciesCommand.h | 1 - Source/cmFLTKWrapUICommand.h | 1 - Source/cmIncludeExternalMSProjectCommand.h | 1 - Source/cmInstallProgramsCommand.h | 1 - Source/cmLinkLibrariesCommand.h | 1 - Source/cmLoadCacheCommand.h | 1 - Source/cmLoadCommandCommand.h | 1 - Source/cmObject.h | 41 --------------------- Source/cmOutputRequiredFilesCommand.h | 1 - Source/cmQTWrapCPPCommand.h | 1 - Source/cmQTWrapUICommand.h | 1 - Source/cmRemoveCommand.h | 1 - Source/cmRemoveDefinitionsCommand.h | 1 - Source/cmSourceGroupCommand.h | 1 - Source/cmStandardIncludes.h | 1 - Source/cmState.cxx | 1 - Source/cmSubdirDependsCommand.h | 1 - Source/cmTargetCompileDefinitionsCommand.h | 1 - Source/cmTargetCompileFeaturesCommand.h | 1 - Source/cmTargetCompileOptionsCommand.h | 1 - Source/cmTargetIncludeDirectoriesCommand.h | 1 - Source/cmTargetSourcesCommand.h | 1 - Source/cmTypeMacro.h | 31 ---------------- Source/cmUseMangledMesaCommand.h | 1 - Source/cmUtilitySourceCommand.h | 1 - Source/cmVariableRequiresCommand.h | 1 - Source/cmVariableWatchCommand.h | 1 - Source/cmWriteFileCommand.h | 1 - 77 files changed, 3 insertions(+), 152 deletions(-) delete mode 100644 Source/cmObject.h delete mode 100644 Source/cmTypeMacro.h hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 09:09:12 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:09:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-338-gc9108c7 Message-ID: <20161025130912.3E94AF5FAC@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 c9108c7b81fecb26924596d55a84fc849125507c (commit) via c15dc1972839e175afaa9011f74376dadf08277f (commit) from bdc88646c1336a209d16de14bd23eb436565363d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9108c7b81fecb26924596d55a84fc849125507c commit c9108c7b81fecb26924596d55a84fc849125507c Merge: bdc8864 c15dc19 Author: Brad King AuthorDate: Tue Oct 25 09:09:09 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 09:09:09 2016 -0400 Merge topic 'cm_unordered_set' c15dc197 Introduce CM_UNORDERED_SET ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 49 ++++++++++++++++------------------- Source/cmTarget.cxx | 13 ++-------- Source/cmTargetPropertyComputer.cxx | 13 ++-------- Source/cm_unordered_set.hxx | 25 ++++++++++++++++++ 4 files changed, 51 insertions(+), 49 deletions(-) create mode 100644 Source/cm_unordered_set.hxx hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 09:09:32 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:09:32 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-739-g06f7f9f Message-ID: <20161025130932.4B0C6F1D9B@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 06f7f9f2fac3ff31f8ea909c0a5cd647e8912059 (commit) via c9108c7b81fecb26924596d55a84fc849125507c (commit) via bdc88646c1336a209d16de14bd23eb436565363d (commit) via 61758bf4b9b5d28cec11d2ea68b9e53ad2769ca6 (commit) via 3062b8a046b24e4c28b374b5c4235bb0da0a2a2c (commit) via 644ff572f736ff04f927661fa5bd2283cd3ee3e1 (commit) via 9430125511865b65e2fa897c59c70414238fbf91 (commit) via 9a399c27a8c6e9a264cbabf9bb3b091b2e74a71f (commit) via c1a520513d4c7504fc9e9e4d9e56acc24569f490 (commit) from cc04b2272954e90e97af212ab76ba8322bf225d4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=06f7f9f2fac3ff31f8ea909c0a5cd647e8912059 commit 06f7f9f2fac3ff31f8ea909c0a5cd647e8912059 Merge: cc04b22 c9108c7 Author: Brad King AuthorDate: Tue Oct 25 09:09:23 2016 -0400 Commit: Brad King CommitDate: Tue Oct 25 09:09:23 2016 -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 Oct 25 09:12:43 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:12:43 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-346-g2a567c6 Message-ID: <20161025131244.1474AF6E11@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 2a567c68ce6605071f3e21638560493b71ed2841 (commit) via 4ec0329bf1cc39eddfa9dd5c58e83992b8979181 (commit) via de21e564edddd8a2e53f6982ef8994fd6758170a (commit) via 69a7309cebb95858382ecf2437e3b7dfb19c967d (commit) via 6cd02f08c730449a4275830cb321a14ea51051ab (commit) via 22ef70499e4fe102fb78b761d73f47864ecb50ab (commit) via 6bc03a285fdf3c116e3078f0ed35f41c67788085 (commit) via 914874fdd1fecf8a5227e50ecf32c4322183f26f (commit) from c9108c7b81fecb26924596d55a84fc849125507c (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 Oct 25 09:12:44 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:12:44 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-748-g7d6e859 Message-ID: <20161025131244.74F65F6E29@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 7d6e8599e87ee212861488f62f726afe0fd927db (commit) via 2a567c68ce6605071f3e21638560493b71ed2841 (commit) via 4ec0329bf1cc39eddfa9dd5c58e83992b8979181 (commit) via de21e564edddd8a2e53f6982ef8994fd6758170a (commit) via 69a7309cebb95858382ecf2437e3b7dfb19c967d (commit) via 6cd02f08c730449a4275830cb321a14ea51051ab (commit) via 22ef70499e4fe102fb78b761d73f47864ecb50ab (commit) via 6bc03a285fdf3c116e3078f0ed35f41c67788085 (commit) via 914874fdd1fecf8a5227e50ecf32c4322183f26f (commit) from 06f7f9f2fac3ff31f8ea909c0a5cd647e8912059 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d6e8599e87ee212861488f62f726afe0fd927db commit 7d6e8599e87ee212861488f62f726afe0fd927db Merge: 06f7f9f 2a567c6 Author: Brad King AuthorDate: Tue Oct 25 09:12:18 2016 -0400 Commit: Brad King CommitDate: Tue Oct 25 09:12:18 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 09:12:44 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:12:44 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.7.0-rc2-15-g4ec0329 Message-ID: <20161025131244.DF6E2F679E@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 4ec0329bf1cc39eddfa9dd5c58e83992b8979181 (commit) via de21e564edddd8a2e53f6982ef8994fd6758170a (commit) via 9b8dc79cc84d12c1e661ca3cd77b773b463508d7 (commit) via 881585f9757972473519d5394ea04a7d962ac70e (commit) via 69a7309cebb95858382ecf2437e3b7dfb19c967d (commit) via 4c272adbe1d67af4779f4e72d9562457ed851dac (commit) via 6205f1797e33c22ab1f9cda8598d02b24497b806 (commit) via 6cd02f08c730449a4275830cb321a14ea51051ab (commit) via 42db2ebc756a48ecdb15841c18747cb69e9df11f (commit) via 22ef70499e4fe102fb78b761d73f47864ecb50ab (commit) via 48189697eb2ac97407cf4ffc0d2f3e600f3cd6ac (commit) via 6bc03a285fdf3c116e3078f0ed35f41c67788085 (commit) via 295c8efa359cbee22e45e6e9358990209b35aa39 (commit) via 914874fdd1fecf8a5227e50ecf32c4322183f26f (commit) via 43f4326ece5035a5a028a7bb90a67c193804c997 (commit) from 876da11858ab6649bb088c4bb7758fc84910ba20 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 237 +++++++++----------- Modules/Compiler/Intel-C.cmake | 9 +- Modules/Compiler/Intel-CXX.cmake | 9 +- Modules/Platform/Android-Common.cmake | 4 + Modules/Platform/Android/abi-arm64-v8a-Clang.cmake | 5 +- Modules/Platform/Android/abi-arm64-v8a-GNU.cmake | 6 +- Modules/Platform/Android/abi-armeabi-Clang.cmake | 1 - Modules/Platform/Android/abi-armeabi-GNU.cmake | 1 - .../Platform/Android/abi-armeabi-v6-Clang.cmake | 1 - Modules/Platform/Android/abi-armeabi-v6-GNU.cmake | 1 - .../Platform/Android/abi-armeabi-v7a-Clang.cmake | 1 - Modules/Platform/Android/abi-armeabi-v7a-GNU.cmake | 1 - Modules/Platform/Android/abi-common.cmake | 15 ++ Modules/Platform/Android/abi-mips-Clang.cmake | 4 - Modules/Platform/Android/abi-mips-GNU.cmake | 3 - Modules/Platform/Android/abi-mips64-Clang.cmake | 4 - Modules/Platform/Android/abi-mips64-GNU.cmake | 3 - Modules/Platform/Android/abi-x86-Clang.cmake | 4 - Modules/Platform/Android/abi-x86_64-Clang.cmake | 4 - Modules/Platform/Android/ndk-stl-c++_static.cmake | 2 + Source/cmGlobalNinjaGenerator.cxx | 44 ++-- Source/cmGlobalNinjaGenerator.h | 1 - Source/cmServerDictionary.h | 4 +- Tests/RunCMake/Android/RunCMakeTest.cmake | 5 - Tests/RunCMake/Ninja/RunCMakeTest.cmake | 9 + Tests/RunCMake/Ninja/SubDir.cmake | 1 + Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt | 1 + .../RunCMake/Ninja/SubDirBinary-install-stdout.txt | 1 + Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt | 1 + Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt | 6 + Tests/Server/cmakelib.py | 10 +- 31 files changed, 182 insertions(+), 216 deletions(-) create mode 100644 Tests/RunCMake/Ninja/SubDirBinary-build-stdout.txt create mode 100644 Tests/RunCMake/Ninja/SubDirBinary-install-stdout.txt create mode 100644 Tests/RunCMake/Ninja/SubDirBinary-test-stdout.txt create mode 100644 Tests/RunCMake/Ninja/SubDirSource/CMakeLists.txt hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 09:15:54 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:15:54 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-751-ga5f7a59 Message-ID: <20161025131554.3C3F9F6F4D@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 a5f7a59bbb86a7cfb7792765270722f07a9a679f (commit) via 51cfba8c219a923c924349cd255a523eb797e104 (commit) via 53862f04a0002894c0ef5aeb23d52495e5abe60d (commit) from 7d6e8599e87ee212861488f62f726afe0fd927db (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5f7a59bbb86a7cfb7792765270722f07a9a679f commit a5f7a59bbb86a7cfb7792765270722f07a9a679f Merge: 7d6e859 51cfba8 Author: Brad King AuthorDate: Tue Oct 25 09:15:53 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 09:15:53 2016 -0400 Merge topic 'update-kwsys' into next 51cfba8c Merge branch 'upstream-KWSys' into update-kwsys 53862f04 KWSys 2016-10-23 (b630d2f5) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51cfba8c219a923c924349cd255a523eb797e104 commit 51cfba8c219a923c924349cd255a523eb797e104 Merge: 2a567c6 53862f0 Author: Brad King AuthorDate: Tue Oct 25 09:13:48 2016 -0400 Commit: Brad King CommitDate: Tue Oct 25 09:13:48 2016 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2016-10-23 (b630d2f5) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53862f04a0002894c0ef5aeb23d52495e5abe60d commit 53862f04a0002894c0ef5aeb23d52495e5abe60d Author: KWSys Upstream AuthorDate: Sun Oct 23 04:32:36 2016 +0300 Commit: Brad King CommitDate: Tue Oct 25 09:13:46 2016 -0400 KWSys 2016-10-23 (b630d2f5) Code extracted from: http://public.kitware.com/KWSys.git at commit b630d2f5575be7d70c214bfffc57aaf5069c6369 (master). Upstream Shortlog ----------------- D?vis Mos?ns (1): b630d2f5 ConsoleBuf: Check for actual console with GetConsoleMode diff --git a/ConsoleBuf.hxx.in b/ConsoleBuf.hxx.in index 8aeeda1..2496b45 100644 --- a/ConsoleBuf.hxx.in +++ b/ConsoleBuf.hxx.in @@ -239,8 +239,12 @@ namespace @KWSYS_NAMESPACE@ m_activeInputCodepage = input_file_codepage; break; case FILE_TYPE_CHAR: - m_isConsoleInput = true; - break; + // Check for actual console. + DWORD consoleMode; + m_isConsoleInput = GetConsoleMode(m_hInput, &consoleMode) == 0 ? false : true; + if (m_isConsoleInput) { + break; + } case FILE_TYPE_PIPE: m_activeInputCodepage = input_pipe_codepage; break; @@ -259,8 +263,12 @@ namespace @KWSYS_NAMESPACE@ m_activeOutputCodepage = output_file_codepage; break; case FILE_TYPE_CHAR: - m_isConsoleOutput = true; - break; + // Check for actual console. + DWORD consoleMode; + m_isConsoleOutput = GetConsoleMode(m_hOutput, &consoleMode) == 0 ? false : true; + if (m_isConsoleOutput) { + break; + } case FILE_TYPE_PIPE: m_activeOutputCodepage = output_pipe_codepage; break; ----------------------------------------------------------------------- Summary of changes: Source/kwsys/ConsoleBuf.hxx.in | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 09:52:59 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 09:52:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-755-g24e5bff Message-ID: <20161025135259.9EC75F7621@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 24e5bff0eb7e82d34775a029296858b8142ff02f (commit) via 69fc7bf87db33d88af02602fba811b5c5e740a70 (commit) via e2ed9a70929092ab7b32e036886859e53fbff897 (commit) via 584ab5285b51945e0dd523caf77342985ac97ce4 (commit) from a5f7a59bbb86a7cfb7792765270722f07a9a679f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24e5bff0eb7e82d34775a029296858b8142ff02f commit 24e5bff0eb7e82d34775a029296858b8142ff02f Merge: a5f7a59 69fc7bf Author: Brad King AuthorDate: Tue Oct 25 09:52:56 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 09:52:56 2016 -0400 Merge topic 'vs-toolset-options' into next 69fc7bf8 VS: Choose flag map based on the toolset name e2ed9a70 VS: Move toolset flag table lookup to global generator 584ab528 VS: Add internal API to get platform toolset as string https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69fc7bf87db33d88af02602fba811b5c5e740a70 commit 69fc7bf87db33d88af02602fba811b5c5e740a70 Author: Don Olmstead AuthorDate: Mon Oct 17 17:50:34 2016 -0700 Commit: Brad King CommitDate: Tue Oct 25 09:46:21 2016 -0400 VS: Choose flag map based on the toolset name MSBuild interprets the `.vcxproj` content based on the `PlatformToolset` setting, so our reverse mapping needs to be based on that setting too. For VS 2010 and above, choose the flag map to match the toolset name rather than the generator VS version. Issue: #16153 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 09c0acf..cf9dbb8 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -680,6 +680,8 @@ if (WIN32) cmVisualStudioGeneratorOptions.cxx cmVisualStudio10TargetGenerator.h cmVisualStudio10TargetGenerator.cxx + cmVisualStudio10ToolsetOptions.h + cmVisualStudio10ToolsetOptions.cxx cmLocalVisualStudio10Generator.cxx cmLocalVisualStudio10Generator.h cmGlobalVisualStudio10Generator.h diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 6075e2c..7d91740 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -617,25 +617,40 @@ std::string cmGlobalVisualStudio10Generator::GetInstalledNsightTegraVersion() cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetClFlagTable() const { - return this->DefaultClFlagTable; + cmIDEFlagTable const* table = this->ToolsetOptions.GetClFlagTable( + this->GetPlatformName(), this->GetPlatformToolsetString()); + + return (table != CM_NULLPTR) ? table : this->DefaultClFlagTable; } cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetRcFlagTable() const { - return this->DefaultRcFlagTable; + cmIDEFlagTable const* table = this->ToolsetOptions.GetRcFlagTable( + this->GetPlatformName(), this->GetPlatformToolsetString()); + + return (table != CM_NULLPTR) ? table : this->DefaultRcFlagTable; } cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetLibFlagTable() const { - return this->DefaultLibFlagTable; + cmIDEFlagTable const* table = this->ToolsetOptions.GetLibFlagTable( + this->GetPlatformName(), this->GetPlatformToolsetString()); + + return (table != CM_NULLPTR) ? table : this->DefaultLibFlagTable; } cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetLinkFlagTable() const { - return this->DefaultLinkFlagTable; + cmIDEFlagTable const* table = this->ToolsetOptions.GetLinkFlagTable( + this->GetPlatformName(), this->GetPlatformToolsetString()); + + return (table != CM_NULLPTR) ? table : this->DefaultLinkFlagTable; } cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetMasmFlagTable() const { - return this->DefaultMasmFlagTable; + cmIDEFlagTable const* table = this->ToolsetOptions.GetMasmFlagTable( + this->GetPlatformName(), this->GetPlatformToolsetString()); + + return (table != CM_NULLPTR) ? table : this->DefaultMasmFlagTable; } diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 8418480..4175104 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -4,6 +4,7 @@ #define cmGlobalVisualStudio10Generator_h #include "cmGlobalVisualStudio8Generator.h" +#include "cmVisualStudio10ToolsetOptions.h" /** \class cmGlobalVisualStudio10Generator * \brief Write a Unix makefiles. @@ -146,6 +147,7 @@ private: std::string MSBuildCommand; bool MSBuildCommandInitialized; + cmVisualStudio10ToolsetOptions ToolsetOptions; virtual std::string FindMSBuildCommand(); virtual std::string FindDevEnvCommand(); virtual std::string GetVSMakeProgram() { return this->GetMSBuildCommand(); } diff --git a/Source/cmVisualStudio10ToolsetOptions.cxx b/Source/cmVisualStudio10ToolsetOptions.cxx new file mode 100644 index 0000000..b928f43 --- /dev/null +++ b/Source/cmVisualStudio10ToolsetOptions.cxx @@ -0,0 +1,134 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmVisualStudio10ToolsetOptions.h" + +#include "cmAlgorithms.h" +#include "cmIDEFlagTable.h" +#include "cmVisualStudioGeneratorOptions.h" + +#include "cmVS10CLFlagTable.h" +#include "cmVS10LibFlagTable.h" +#include "cmVS10LinkFlagTable.h" +#include "cmVS10MASMFlagTable.h" +#include "cmVS10RCFlagTable.h" +#include "cmVS11CLFlagTable.h" +#include "cmVS11LibFlagTable.h" +#include "cmVS11LinkFlagTable.h" +#include "cmVS11MASMFlagTable.h" +#include "cmVS11RCFlagTable.h" +#include "cmVS12CLFlagTable.h" +#include "cmVS12LibFlagTable.h" +#include "cmVS12LinkFlagTable.h" +#include "cmVS12MASMFlagTable.h" +#include "cmVS12RCFlagTable.h" +#include "cmVS140CLFlagTable.h" +#include "cmVS141CLFlagTable.h" +#include "cmVS14LibFlagTable.h" +#include "cmVS14LinkFlagTable.h" +#include "cmVS14MASMFlagTable.h" +#include "cmVS14RCFlagTable.h" + +cmIDEFlagTable const* cmVisualStudio10ToolsetOptions::GetClFlagTable( + std::string const& name, std::string const& toolset) const +{ + std::string const useToolset = this->GetToolsetName(name, toolset); + + if (toolset == "v141") { + return cmVS141CLFlagTable; + } else if (useToolset == "v140") { + return cmVS140CLFlagTable; + } else if (useToolset == "v120") { + return cmVS12CLFlagTable; + } else if (useToolset == "v110") { + return cmVS11CLFlagTable; + } else if (useToolset == "v100") { + return cmVS10CLFlagTable; + } else { + return 0; + } +} + +cmIDEFlagTable const* cmVisualStudio10ToolsetOptions::GetRcFlagTable( + std::string const& name, std::string const& toolset) const +{ + std::string const useToolset = this->GetToolsetName(name, toolset); + + if ((useToolset == "v140") || (useToolset == "v141")) { + return cmVS14RCFlagTable; + } else if (useToolset == "v120") { + return cmVS12RCFlagTable; + } else if (useToolset == "v110") { + return cmVS11RCFlagTable; + } else if (useToolset == "v100") { + return cmVS10RCFlagTable; + } else { + return 0; + } +} + +cmIDEFlagTable const* cmVisualStudio10ToolsetOptions::GetLibFlagTable( + std::string const& name, std::string const& toolset) const +{ + std::string const useToolset = this->GetToolsetName(name, toolset); + + if ((useToolset == "v140") || (useToolset == "v141")) { + return cmVS14LibFlagTable; + } else if (useToolset == "v120") { + return cmVS12LibFlagTable; + } else if (useToolset == "v110") { + return cmVS11LibFlagTable; + } else if (useToolset == "v100") { + return cmVS10LibFlagTable; + } else { + return 0; + } +} + +cmIDEFlagTable const* cmVisualStudio10ToolsetOptions::GetLinkFlagTable( + std::string const& name, std::string const& toolset) const +{ + std::string const useToolset = this->GetToolsetName(name, toolset); + + if ((useToolset == "v140") || (useToolset == "v141")) { + return cmVS14LinkFlagTable; + } else if (useToolset == "v120") { + return cmVS12LinkFlagTable; + } else if (useToolset == "v110") { + return cmVS11LinkFlagTable; + } else if (useToolset == "v100") { + return cmVS10LinkFlagTable; + } else { + return 0; + } +} + +cmIDEFlagTable const* cmVisualStudio10ToolsetOptions::GetMasmFlagTable( + std::string const& name, std::string const& toolset) const +{ + std::string const useToolset = this->GetToolsetName(name, toolset); + + if ((useToolset == "v140") || (useToolset == "v141")) { + return cmVS14MASMFlagTable; + } else if (useToolset == "v120") { + return cmVS12MASMFlagTable; + } else if (useToolset == "v110") { + return cmVS11MASMFlagTable; + } else if (useToolset == "v100") { + return cmVS10MASMFlagTable; + } else { + return 0; + } +} + +std::string cmVisualStudio10ToolsetOptions::GetToolsetName( + std::string const& name, std::string const& toolset) const +{ + static_cast(name); + std::size_t length = toolset.length(); + + if (cmHasLiteralSuffix(toolset, "_xp")) { + length -= 3; + } + + return toolset.substr(0, length); +} diff --git a/Source/cmVisualStudio10ToolsetOptions.h b/Source/cmVisualStudio10ToolsetOptions.h new file mode 100644 index 0000000..ea6c9c8 --- /dev/null +++ b/Source/cmVisualStudio10ToolsetOptions.h @@ -0,0 +1,33 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cmVisualStudio10ToolsetOptions_h +#define cmVisualStudio10ToolsetOptions_h + +#include "cmStandardIncludes.h" + +struct cmIDEFlagTable; + +/** \class cmVisualStudio10ToolsetOptions + * \brief Retrieves toolset options for MSBuild. + * + * cmVisualStudio10ToolsetOptions manages toolsets within MSBuild + */ +class cmVisualStudio10ToolsetOptions +{ +public: + cmIDEFlagTable const* GetClFlagTable(std::string const& name, + std::string const& toolset) const; + cmIDEFlagTable const* GetRcFlagTable(std::string const& name, + std::string const& toolset) const; + cmIDEFlagTable const* GetLibFlagTable(std::string const& name, + std::string const& toolset) const; + cmIDEFlagTable const* GetLinkFlagTable(std::string const& name, + std::string const& toolset) const; + cmIDEFlagTable const* GetMasmFlagTable(std::string const& name, + std::string const& toolset) const; + +private: + std::string GetToolsetName(std::string const& name, + std::string const& toolset) const; +}; +#endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e2ed9a70929092ab7b32e036886859e53fbff897 commit e2ed9a70929092ab7b32e036886859e53fbff897 Author: Don Olmstead AuthorDate: Mon Oct 17 17:50:34 2016 -0700 Commit: Brad King CommitDate: Tue Oct 25 09:19:49 2016 -0400 VS: Move toolset flag table lookup to global generator Move `Get*FlagTable` methods to the global generator and have each VS generator version pre-populate its default flag table. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 793c605..6075e2c 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -9,6 +9,11 @@ #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmVS10CLFlagTable.h" +#include "cmVS10LibFlagTable.h" +#include "cmVS10LinkFlagTable.h" +#include "cmVS10MASMFlagTable.h" +#include "cmVS10RCFlagTable.h" #include "cmVisualStudioSlnData.h" #include "cmVisualStudioSlnParser.h" #include "cmake.h" @@ -94,6 +99,11 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( this->SystemIsWindowsStore = false; this->MSBuildCommandInitialized = false; this->DefaultPlatformToolset = "v100"; + this->DefaultClFlagTable = cmVS10CLFlagTable; + this->DefaultLibFlagTable = cmVS10LibFlagTable; + this->DefaultLinkFlagTable = cmVS10LinkFlagTable; + this->DefaultMasmFlagTable = cmVS10MASMFlagTable; + this->DefaultRcFlagTable = cmVS10RCFlagTable; this->Version = VS10; } @@ -604,3 +614,28 @@ std::string cmGlobalVisualStudio10Generator::GetInstalledNsightTegraVersion() version, cmSystemTools::KeyWOW64_32); return version; } + +cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetClFlagTable() const +{ + return this->DefaultClFlagTable; +} + +cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetRcFlagTable() const +{ + return this->DefaultRcFlagTable; +} + +cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetLibFlagTable() const +{ + return this->DefaultLibFlagTable; +} + +cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetLinkFlagTable() const +{ + return this->DefaultLinkFlagTable; +} + +cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetMasmFlagTable() const +{ + return this->DefaultMasmFlagTable; +} diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index ba07a5b..8418480 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -89,6 +89,12 @@ public: static std::string GetInstalledNsightTegraVersion(); + cmIDEFlagTable const* GetClFlagTable() const; + cmIDEFlagTable const* GetRcFlagTable() const; + cmIDEFlagTable const* GetLibFlagTable() const; + cmIDEFlagTable const* GetLinkFlagTable() const; + cmIDEFlagTable const* GetMasmFlagTable() const; + protected: virtual void Generate(); virtual bool InitializeSystem(cmMakefile* mf); @@ -112,6 +118,11 @@ protected: std::string SystemName; std::string SystemVersion; std::string NsightTegraVersion; + cmIDEFlagTable const* DefaultClFlagTable; + cmIDEFlagTable const* DefaultLibFlagTable; + cmIDEFlagTable const* DefaultLinkFlagTable; + cmIDEFlagTable const* DefaultMasmFlagTable; + cmIDEFlagTable const* DefaultRcFlagTable; bool SystemIsWindowsCE; bool SystemIsWindowsPhone; bool SystemIsWindowsStore; diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index f120762..acd2c2b 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -5,6 +5,11 @@ #include "cmAlgorithms.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" +#include "cmVS11CLFlagTable.h" +#include "cmVS11LibFlagTable.h" +#include "cmVS11LinkFlagTable.h" +#include "cmVS11MASMFlagTable.h" +#include "cmVS11RCFlagTable.h" static const char vs11generatorName[] = "Visual Studio 11 2012"; @@ -101,6 +106,11 @@ cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator( "ProductDir", vc11Express, cmSystemTools::KeyWOW64_32); this->DefaultPlatformToolset = "v110"; + this->DefaultClFlagTable = cmVS11CLFlagTable; + this->DefaultLibFlagTable = cmVS11LibFlagTable; + this->DefaultLinkFlagTable = cmVS11LinkFlagTable; + this->DefaultMasmFlagTable = cmVS11MASMFlagTable; + this->DefaultRcFlagTable = cmVS11RCFlagTable; this->Version = VS11; } diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index ec7916c..c18ff9e 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -5,6 +5,11 @@ #include "cmAlgorithms.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" +#include "cmVS12CLFlagTable.h" +#include "cmVS12LibFlagTable.h" +#include "cmVS12LinkFlagTable.h" +#include "cmVS12MASMFlagTable.h" +#include "cmVS12RCFlagTable.h" static const char vs12generatorName[] = "Visual Studio 12 2013"; @@ -83,6 +88,11 @@ cmGlobalVisualStudio12Generator::cmGlobalVisualStudio12Generator( "ProductDir", vc12Express, cmSystemTools::KeyWOW64_32); this->DefaultPlatformToolset = "v120"; + this->DefaultClFlagTable = cmVS12CLFlagTable; + this->DefaultLibFlagTable = cmVS12LibFlagTable; + this->DefaultLinkFlagTable = cmVS12LinkFlagTable; + this->DefaultMasmFlagTable = cmVS12MASMFlagTable; + this->DefaultRcFlagTable = cmVS12RCFlagTable; this->Version = VS12; } diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index 586fe3c..e0b86d7 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -5,6 +5,11 @@ #include "cmAlgorithms.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" +#include "cmVS140CLFlagTable.h" +#include "cmVS14LibFlagTable.h" +#include "cmVS14LinkFlagTable.h" +#include "cmVS14MASMFlagTable.h" +#include "cmVS14RCFlagTable.h" static const char vs14generatorName[] = "Visual Studio 14 2015"; @@ -83,6 +88,11 @@ cmGlobalVisualStudio14Generator::cmGlobalVisualStudio14Generator( "ProductDir", vc14Express, cmSystemTools::KeyWOW64_32); this->DefaultPlatformToolset = "v140"; + this->DefaultClFlagTable = cmVS140CLFlagTable; + this->DefaultLibFlagTable = cmVS14LibFlagTable; + this->DefaultLinkFlagTable = cmVS14LinkFlagTable; + this->DefaultMasmFlagTable = cmVS14MASMFlagTable; + this->DefaultRcFlagTable = cmVS14RCFlagTable; this->Version = VS14; } diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index a833a5f..fbc7a10 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -5,6 +5,7 @@ #include "cmAlgorithms.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" +#include "cmVS141CLFlagTable.h" static const char vs15generatorName[] = "Visual Studio 15"; @@ -80,6 +81,7 @@ cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator( "ProductDir", vc15Express, cmSystemTools::KeyWOW64_32); this->DefaultPlatformToolset = "v141"; + this->DefaultClFlagTable = cmVS141CLFlagTable; this->Version = VS15; } diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 9c857f2..22167ca 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -10,27 +10,6 @@ #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmVS10CLFlagTable.h" -#include "cmVS10LibFlagTable.h" -#include "cmVS10LinkFlagTable.h" -#include "cmVS10MASMFlagTable.h" -#include "cmVS10RCFlagTable.h" -#include "cmVS11CLFlagTable.h" -#include "cmVS11LibFlagTable.h" -#include "cmVS11LinkFlagTable.h" -#include "cmVS11MASMFlagTable.h" -#include "cmVS11RCFlagTable.h" -#include "cmVS12CLFlagTable.h" -#include "cmVS12LibFlagTable.h" -#include "cmVS12LinkFlagTable.h" -#include "cmVS12MASMFlagTable.h" -#include "cmVS12RCFlagTable.h" -#include "cmVS140CLFlagTable.h" -#include "cmVS141CLFlagTable.h" -#include "cmVS14LibFlagTable.h" -#include "cmVS14LinkFlagTable.h" -#include "cmVS14MASMFlagTable.h" -#include "cmVS14RCFlagTable.h" #include "cmVisualStudioGeneratorOptions.h" #include "windows.h" @@ -38,102 +17,6 @@ static std::string const kWINDOWS_7_1_SDK = "Windows7.1SDK"; -cmIDEFlagTable const* cmVisualStudio10TargetGenerator::GetClFlagTable() const -{ - if (this->MSTools) { - cmGlobalVisualStudioGenerator::VSVersion v = - this->LocalGenerator->GetVersion(); - if (v >= cmGlobalVisualStudioGenerator::VS14) { - // FIXME: All flag table selection should be based on the toolset name. - // See issue #16153. For now, treat VS 15's toolset as a special case. - const char* toolset = this->GlobalGenerator->GetPlatformToolset(); - if (toolset && cmHasLiteralPrefix(toolset, "v141")) { - return cmVS141CLFlagTable; - } - return cmVS140CLFlagTable; - } else if (v >= cmGlobalVisualStudioGenerator::VS12) { - return cmVS12CLFlagTable; - } else if (v == cmGlobalVisualStudioGenerator::VS11) { - return cmVS11CLFlagTable; - } else { - return cmVS10CLFlagTable; - } - } - return 0; -} - -cmIDEFlagTable const* cmVisualStudio10TargetGenerator::GetRcFlagTable() const -{ - if (this->MSTools) { - cmGlobalVisualStudioGenerator::VSVersion v = - this->LocalGenerator->GetVersion(); - if (v >= cmGlobalVisualStudioGenerator::VS14) { - return cmVS14RCFlagTable; - } else if (v >= cmGlobalVisualStudioGenerator::VS12) { - return cmVS12RCFlagTable; - } else if (v == cmGlobalVisualStudioGenerator::VS11) { - return cmVS11RCFlagTable; - } else { - return cmVS10RCFlagTable; - } - } - return 0; -} - -cmIDEFlagTable const* cmVisualStudio10TargetGenerator::GetLibFlagTable() const -{ - if (this->MSTools) { - cmGlobalVisualStudioGenerator::VSVersion v = - this->LocalGenerator->GetVersion(); - if (v >= cmGlobalVisualStudioGenerator::VS14) { - return cmVS14LibFlagTable; - } else if (v >= cmGlobalVisualStudioGenerator::VS12) { - return cmVS12LibFlagTable; - } else if (v == cmGlobalVisualStudioGenerator::VS11) { - return cmVS11LibFlagTable; - } else { - return cmVS10LibFlagTable; - } - } - return 0; -} - -cmIDEFlagTable const* cmVisualStudio10TargetGenerator::GetLinkFlagTable() const -{ - if (this->MSTools) { - cmGlobalVisualStudioGenerator::VSVersion v = - this->LocalGenerator->GetVersion(); - if (v >= cmGlobalVisualStudioGenerator::VS14) { - return cmVS14LinkFlagTable; - } else if (v >= cmGlobalVisualStudioGenerator::VS12) { - return cmVS12LinkFlagTable; - } else if (v == cmGlobalVisualStudioGenerator::VS11) { - return cmVS11LinkFlagTable; - } else { - return cmVS10LinkFlagTable; - } - } - return 0; -} - -cmIDEFlagTable const* cmVisualStudio10TargetGenerator::GetMasmFlagTable() const -{ - if (this->MSTools) { - cmGlobalVisualStudioGenerator::VSVersion v = - this->LocalGenerator->GetVersion(); - if (v >= cmGlobalVisualStudioGenerator::VS14) { - return cmVS14MASMFlagTable; - } else if (v >= cmGlobalVisualStudioGenerator::VS12) { - return cmVS12MASMFlagTable; - } else if (v == cmGlobalVisualStudioGenerator::VS11) { - return cmVS11MASMFlagTable; - } else { - return cmVS10MASMFlagTable; - } - } - return 0; -} - static std::string cmVS10EscapeXML(std::string arg) { cmSystemTools::ReplaceString(arg, "&", "&"); @@ -1533,9 +1416,11 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( (*this->BuildFileStream) << firstString; firstString = ""; // only do firstString once hasFlags = true; + cmGlobalVisualStudio10Generator* gg = + static_cast(this->GlobalGenerator); cmVisualStudioGeneratorOptions clOptions( this->LocalGenerator, cmVisualStudioGeneratorOptions::Compiler, - this->GetClFlagTable(), 0, this); + gg->GetClFlagTable(), 0, this); if (compileAs) { clOptions.AddFlag("CompileAs", compileAs); } @@ -1696,8 +1581,10 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( // copied from cmLocalVisualStudio7Generator.cxx 805 // TODO: Integrate code below with cmLocalVisualStudio7Generator. + cmGlobalVisualStudio10Generator* gg = + static_cast(this->GlobalGenerator); CM_AUTO_PTR pOptions(new Options( - this->LocalGenerator, Options::Compiler, this->GetClFlagTable())); + this->LocalGenerator, Options::Compiler, gg->GetClFlagTable())); Options& clOptions = *pOptions; std::string flags; @@ -1861,8 +1748,10 @@ bool cmVisualStudio10TargetGenerator::ComputeRcOptions() bool cmVisualStudio10TargetGenerator::ComputeRcOptions( std::string const& configName) { + cmGlobalVisualStudio10Generator* gg = + static_cast(this->GlobalGenerator); CM_AUTO_PTR pOptions(new Options( - this->LocalGenerator, Options::ResourceCompiler, this->GetRcFlagTable())); + this->LocalGenerator, Options::ResourceCompiler, gg->GetRcFlagTable())); Options& rcOptions = *pOptions; std::string CONFIG = cmSystemTools::UpperCase(configName); @@ -1918,8 +1807,10 @@ bool cmVisualStudio10TargetGenerator::ComputeMasmOptions() bool cmVisualStudio10TargetGenerator::ComputeMasmOptions( std::string const& configName) { + cmGlobalVisualStudio10Generator* gg = + static_cast(this->GlobalGenerator); CM_AUTO_PTR pOptions(new Options( - this->LocalGenerator, Options::MasmCompiler, this->GetMasmFlagTable())); + this->LocalGenerator, Options::MasmCompiler, gg->GetMasmFlagTable())); Options& masmOptions = *pOptions; std::string CONFIG = cmSystemTools::UpperCase(configName); @@ -1968,9 +1859,11 @@ void cmVisualStudio10TargetGenerator::WriteLibOptions( libflags, cmSystemTools::UpperCase(config), this->GeneratorTarget); if (!libflags.empty()) { this->WriteString("\n", 2); + cmGlobalVisualStudio10Generator* gg = + static_cast(this->GlobalGenerator); cmVisualStudioGeneratorOptions libOptions( this->LocalGenerator, cmVisualStudioGeneratorOptions::Linker, - this->GetLibFlagTable(), 0, this); + gg->GetLibFlagTable(), 0, this); libOptions.Parse(libflags.c_str()); libOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", ""); libOptions.OutputFlagMap(*this->BuildFileStream, " "); @@ -2163,8 +2056,10 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions() bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( std::string const& config) { + cmGlobalVisualStudio10Generator* gg = + static_cast(this->GlobalGenerator); CM_AUTO_PTR pOptions(new Options( - this->LocalGenerator, Options::Linker, this->GetLinkFlagTable(), 0, this)); + this->LocalGenerator, Options::Linker, gg->GetLinkFlagTable(), 0, this)); Options& linkOptions = *pOptions; const std::string& linkLanguage = diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index c62be7e..54b9569 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -121,12 +121,6 @@ private: bool IsXamlHeader(const std::string& headerFile); bool IsXamlSource(const std::string& headerFile); - cmIDEFlagTable const* GetClFlagTable() const; - cmIDEFlagTable const* GetRcFlagTable() const; - cmIDEFlagTable const* GetLibFlagTable() const; - cmIDEFlagTable const* GetLinkFlagTable() const; - cmIDEFlagTable const* GetMasmFlagTable() const; - bool ForceOld(const std::string& source) const; private: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=584ab5285b51945e0dd523caf77342985ac97ce4 commit 584ab5285b51945e0dd523caf77342985ac97ce4 Author: Brad King AuthorDate: Tue Oct 18 10:09:57 2016 -0400 Commit: Brad King CommitDate: Tue Oct 25 09:19:49 2016 -0400 VS: Add internal API to get platform toolset as string diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 7af971e..793c605 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -339,13 +339,20 @@ void cmGlobalVisualStudio10Generator::EnableLanguage( const char* cmGlobalVisualStudio10Generator::GetPlatformToolset() const { + return this->GetPlatformToolsetString().c_str(); +} + +std::string const& cmGlobalVisualStudio10Generator::GetPlatformToolsetString() + const +{ if (!this->GeneratorToolset.empty()) { - return this->GeneratorToolset.c_str(); + return this->GeneratorToolset; } if (!this->DefaultPlatformToolset.empty()) { - return this->DefaultPlatformToolset.c_str(); + return this->DefaultPlatformToolset; } - return 0; + static std::string const empty; + return empty; } const char* diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 62b8661..ba07a5b 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -48,6 +48,7 @@ public: /** The toolset name for the target platform. */ const char* GetPlatformToolset() const; + std::string const& GetPlatformToolsetString() const; /** The toolset host architecture name (e.g. x64 for 64-bit host tools). */ const char* GetPlatformToolsetHostArchitecture() const; ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 + Source/cmGlobalVisualStudio10Generator.cxx | 63 ++++++++++++- Source/cmGlobalVisualStudio10Generator.h | 14 +++ Source/cmGlobalVisualStudio11Generator.cxx | 10 ++ Source/cmGlobalVisualStudio12Generator.cxx | 10 ++ Source/cmGlobalVisualStudio14Generator.cxx | 10 ++ Source/cmGlobalVisualStudio15Generator.cxx | 2 + Source/cmVisualStudio10TargetGenerator.cxx | 141 ++++------------------------ Source/cmVisualStudio10TargetGenerator.h | 6 -- Source/cmVisualStudio10ToolsetOptions.cxx | 134 ++++++++++++++++++++++++++ Source/cmVisualStudio10ToolsetOptions.h | 33 +++++++ 11 files changed, 293 insertions(+), 132 deletions(-) create mode 100644 Source/cmVisualStudio10ToolsetOptions.cxx create mode 100644 Source/cmVisualStudio10ToolsetOptions.h hooks/post-receive -- CMake From brad.king at kitware.com Tue Oct 25 13:43:42 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 25 Oct 2016 13:43:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-757-g331a992 Message-ID: <20161025174342.339A1F72AC@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 331a9929897ad4ba864320e12bee96db86ffd8fe (commit) via 68e7250a9facbe7b82cff17af3bf2a831e481f3c (commit) from 24e5bff0eb7e82d34775a029296858b8142ff02f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=331a9929897ad4ba864320e12bee96db86ffd8fe commit 331a9929897ad4ba864320e12bee96db86ffd8fe Merge: 24e5bff 68e7250 Author: Brad King AuthorDate: Tue Oct 25 13:43:41 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 13:43:41 2016 -0400 Merge topic 'fix-right-angle-bracket-feature-test' into next 68e7250a Features: Fix cxx_right_angle_brackets compiler feature test https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68e7250a9facbe7b82cff17af3bf2a831e481f3c commit 68e7250a9facbe7b82cff17af3bf2a831e481f3c Author: Alex Wang AuthorDate: Tue Oct 25 13:30:42 2016 -0400 Commit: Brad King CommitDate: Tue Oct 25 13:38:12 2016 -0400 Features: Fix cxx_right_angle_brackets compiler feature test The clang-format pass in commit v3.6.0-rc1~54^2~1 (Revise C++ coding style using clang-format, 2016-05-16) changed the template right angle brackets from `>>` to `> >`, which defeats the purpose of this test. Change it back and exclude this content from formatting. diff --git a/Tests/CompileFeatures/cxx_right_angle_brackets.cpp b/Tests/CompileFeatures/cxx_right_angle_brackets.cpp index 8f1b0ee..4d494b5 100644 --- a/Tests/CompileFeatures/cxx_right_angle_brackets.cpp +++ b/Tests/CompileFeatures/cxx_right_angle_brackets.cpp @@ -7,6 +7,8 @@ struct A void someFunc() { - A > object; + /* clang-format off */ + A> object; + /* clang-format on */ (void)object; } diff --git a/Utilities/Scripts/clang-format.bash b/Utilities/Scripts/clang-format.bash index a7080fc..ad3b3a1 100755 --- a/Utilities/Scripts/clang-format.bash +++ b/Utilities/Scripts/clang-format.bash @@ -130,6 +130,7 @@ $git_ls -z -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | # Exclude manually-formatted sources (e.g. with long lines). egrep -z -v '^Tests/PositionIndependentTargets/pic_test.h' | + egrep -z -v '^Tests/CompileFeatures/cxx_right_angle_brackets.cpp' | # Exclude sources with encoding not suported by clang-format. egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | ----------------------------------------------------------------------- Summary of changes: Tests/CompileFeatures/cxx_right_angle_brackets.cpp | 4 +++- Utilities/Scripts/clang-format.bash | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Tue Oct 25 15:39:06 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Tue, 25 Oct 2016 15:39:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-759-g5521217 Message-ID: <20161025193906.EA693AF715@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 5521217d66f57464ac4ecf715527682f5148f356 (commit) via c98c12731a987cf83d7aabc3b8127c51ceb8d741 (commit) from 331a9929897ad4ba864320e12bee96db86ffd8fe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5521217d66f57464ac4ecf715527682f5148f356 commit 5521217d66f57464ac4ecf715527682f5148f356 Merge: 331a992 c98c127 Author: Daniel Pfeifer AuthorDate: Tue Oct 25 15:39:03 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Oct 25 15:39:03 2016 -0400 Merge topic 'include-what-you-use' into next c98c1273 Include necessary headers in commands https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c98c12731a987cf83d7aabc3b8127c51ceb8d741 commit c98c12731a987cf83d7aabc3b8127c51ceb8d741 Author: Daniel Pfeifer AuthorDate: Tue Oct 25 20:35:04 2016 +0200 Commit: Daniel Pfeifer CommitDate: Tue Oct 25 21:22:36 2016 +0200 Include necessary headers in commands diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 1ab4ef6..620de31 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -2,11 +2,19 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddCustomCommandCommand.h" -#include "cmTarget.h" +#include +#include "cmCustomCommand.h" +#include "cmCustomCommandLines.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmSourceFile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" -#include "cmGlobalGenerator.h" +class cmExecutionStatus; // cmAddCustomCommandCommand bool cmAddCustomCommandCommand::InitialPass( diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h index 643163c..ea92163 100644 --- a/Source/cmAddCustomCommandCommand.h +++ b/Source/cmAddCustomCommandCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddCustomCommandCommand_h #define cmAddCustomCommandCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddCustomCommandCommand * \brief cmAddCustomCommandCommand defines a new command (rule) that can * be executed within the build process diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index 9c41dac..4e656aa 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -2,8 +2,18 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddCustomTargetCommand.h" +#include + +#include "cmCustomCommandLines.h" #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; // cmAddCustomTargetCommand bool cmAddCustomTargetCommand::InitialPass( diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h index 2ad244c..b679247 100644 --- a/Source/cmAddCustomTargetCommand.h +++ b/Source/cmAddCustomTargetCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddCustomTargetCommand_h #define cmAddCustomTargetCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddCustomTargetCommand * \brief Command that adds a target to the build system. * diff --git a/Source/cmAddDefinitionsCommand.cxx b/Source/cmAddDefinitionsCommand.cxx index 8d82e71..9e0607c 100644 --- a/Source/cmAddDefinitionsCommand.cxx +++ b/Source/cmAddDefinitionsCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddDefinitionsCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // cmAddDefinitionsCommand bool cmAddDefinitionsCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmAddDefinitionsCommand.h b/Source/cmAddDefinitionsCommand.h index c6b5699..735f8cc 100644 --- a/Source/cmAddDefinitionsCommand.h +++ b/Source/cmAddDefinitionsCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddDefinitionsCommand_h #define cmAddDefinitionsCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddDefinitionsCommand * \brief Specify a list of compiler defines * diff --git a/Source/cmAddDependenciesCommand.cxx b/Source/cmAddDependenciesCommand.cxx index 0fa8943..e49d5d5 100644 --- a/Source/cmAddDependenciesCommand.cxx +++ b/Source/cmAddDependenciesCommand.cxx @@ -2,7 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddDependenciesCommand.h" -#include "cmGlobalGenerator.h" +#include + +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; // cmDependenciesCommand bool cmAddDependenciesCommand::InitialPass( diff --git a/Source/cmAddDependenciesCommand.h b/Source/cmAddDependenciesCommand.h index 2c7aa02..8be546c 100644 --- a/Source/cmAddDependenciesCommand.h +++ b/Source/cmAddDependenciesCommand.h @@ -3,8 +3,14 @@ #ifndef cmDependenciessCommand_h #define cmDependenciessCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddDependenciesCommand * \brief Add a dependency to a target * diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index 3d0729b..2a0bb15 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -2,7 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddExecutableCommand.h" +#include + +#include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmStateTypes.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; // cmExecutableCommand bool cmAddExecutableCommand::InitialPass(std::vector const& args, diff --git a/Source/cmAddExecutableCommand.h b/Source/cmAddExecutableCommand.h index 03faaf1..62583d8 100644 --- a/Source/cmAddExecutableCommand.h +++ b/Source/cmAddExecutableCommand.h @@ -3,8 +3,14 @@ #ifndef cmExecutablesCommand_h #define cmExecutablesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmExecutablesCommand * \brief Defines a list of executables to build. * diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 56cf91a..5c9c744 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -2,12 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddLibraryCommand.h" +#include + +#include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cmake.h" +class cmExecutionStatus; + // cmLibraryCommand bool cmAddLibraryCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmAddLibraryCommand.h b/Source/cmAddLibraryCommand.h index d8eba8d..c23b299 100644 --- a/Source/cmAddLibraryCommand.h +++ b/Source/cmAddLibraryCommand.h @@ -3,8 +3,14 @@ #ifndef cmLibrarysCommand_h #define cmLibrarysCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmLibrarysCommand * \brief Defines a list of executables to build. * diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx index 0ebe35d..34ec0e3 100644 --- a/Source/cmAddSubDirectoryCommand.cxx +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -2,8 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddSubDirectoryCommand.h" +#include +#include + +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmAddSubDirectoryCommand bool cmAddSubDirectoryCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmAddSubDirectoryCommand.h b/Source/cmAddSubDirectoryCommand.h index f300b2e..85305e6 100644 --- a/Source/cmAddSubDirectoryCommand.h +++ b/Source/cmAddSubDirectoryCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddSubDirectoryCommand_h #define cmAddSubDirectoryCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddSubDirectoryCommand * \brief Specify a subdirectory to build * diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx index 11342ee..3a3afdb 100644 --- a/Source/cmAddTestCommand.cxx +++ b/Source/cmAddTestCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddTestCommand.h" -#include "cmTestGenerator.h" +#include +#include "cmMakefile.h" #include "cmTest.h" +#include "cmTestGenerator.h" + +class cmExecutionStatus; // cmExecutableCommand bool cmAddTestCommand::InitialPass(std::vector const& args, diff --git a/Source/cmAddTestCommand.h b/Source/cmAddTestCommand.h index 7bbf7cf..07eff68 100644 --- a/Source/cmAddTestCommand.h +++ b/Source/cmAddTestCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddTestCommand_h #define cmAddTestCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddTestCommand * \brief Add a test to the lists of tests to run. * diff --git a/Source/cmBreakCommand.cxx b/Source/cmBreakCommand.cxx index a5b6e84..9bb6137 100644 --- a/Source/cmBreakCommand.cxx +++ b/Source/cmBreakCommand.cxx @@ -2,7 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmBreakCommand.h" +#include + #include "cmExecutionStatus.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmake.h" // cmBreakCommand bool cmBreakCommand::InitialPass(std::vector const& args, diff --git a/Source/cmBreakCommand.h b/Source/cmBreakCommand.h index f1ade9a..5113e18 100644 --- a/Source/cmBreakCommand.h +++ b/Source/cmBreakCommand.h @@ -3,8 +3,14 @@ #ifndef cmBreakCommand_h #define cmBreakCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmBreakCommand * \brief Break from an enclosing foreach or while loop * diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx index 8aa4102..d03b8c4 100644 --- a/Source/cmBuildCommand.cxx +++ b/Source/cmBuildCommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmBuildCommand.h" +#include + #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmStateTypes.h" +#include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; bool cmBuildCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmBuildCommand.h b/Source/cmBuildCommand.h index 0dce4e4..62f1fd3 100644 --- a/Source/cmBuildCommand.h +++ b/Source/cmBuildCommand.h @@ -3,8 +3,14 @@ #ifndef cmBuildCommand_h #define cmBuildCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmBuildCommand * \brief build_command command * diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx index 3257c93..1e1cd21 100644 --- a/Source/cmBuildNameCommand.cxx +++ b/Source/cmBuildNameCommand.cxx @@ -7,7 +7,7 @@ #include "cmMakefile.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" class cmExecutionStatus; diff --git a/Source/cmCMakeMinimumRequired.cxx b/Source/cmCMakeMinimumRequired.cxx index d71172c..655c42a 100644 --- a/Source/cmCMakeMinimumRequired.cxx +++ b/Source/cmCMakeMinimumRequired.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakeMinimumRequired.h" +#include "cmMakefile.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index 67581b6..3ccc815 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -2,8 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakePolicyCommand.h" +#include + +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" -#include "cmVersion.h" +#include "cmStateTypes.h" +#include "cmake.h" + +class cmExecutionStatus; // cmCMakePolicyCommand bool cmCMakePolicyCommand::InitialPass(std::vector const& args, diff --git a/Source/cmCMakePolicyCommand.h b/Source/cmCMakePolicyCommand.h index 68d9f7b..409fc59 100644 --- a/Source/cmCMakePolicyCommand.h +++ b/Source/cmCMakePolicyCommand.h @@ -3,8 +3,14 @@ #ifndef cmCMakePolicyCommand_h #define cmCMakePolicyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmCMakePolicyCommand * \brief Set how CMake should handle policies * diff --git a/Source/cmCommand.cxx b/Source/cmCommand.cxx index 3c839de..181b412 100644 --- a/Source/cmCommand.cxx +++ b/Source/cmCommand.cxx @@ -2,6 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCommand.h" +#include "cmMakefile.h" +#include "cmake.h" + +class cmExecutionStatus; +struct cmListFileArgument; + bool cmCommand::InvokeInitialPass(const std::vector& args, cmExecutionStatus& status) { diff --git a/Source/cmCommand.h b/Source/cmCommand.h index dcfe8da..d9fd5a2 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -3,9 +3,16 @@ #ifndef cmCommand_h #define cmCommand_h +#include +#include +#include + #include "cmCommandArgumentsHelper.h" -#include "cmListFileCache.h" -#include "cmMakefile.h" +#include "cmPolicies.h" + +class cmExecutionStatus; +class cmMakefile; +struct cmListFileArgument; /** \class cmCommand * \brief Superclass for all commands in CMake. diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx index 0697d4b..103e72c 100644 --- a/Source/cmCommands.cxx +++ b/Source/cmCommands.cxx @@ -14,11 +14,8 @@ #include "cmBuildCommand.h" #include "cmCMakeMinimumRequired.h" #include "cmCMakePolicyCommand.h" -#include "cmCommandArgumentsHelper.h" -#include "cmConditionEvaluator.h" #include "cmConfigureFileCommand.h" #include "cmContinueCommand.h" -#include "cmCoreTryCompile.h" #include "cmCreateTestSourceList.h" #include "cmDefinePropertyCommand.h" #include "cmElseCommand.h" @@ -31,10 +28,7 @@ #include "cmEndWhileCommand.h" #include "cmExecProgramCommand.h" #include "cmExecuteProcessCommand.h" -#include "cmExpandedCommandArgument.h" #include "cmFileCommand.h" -#include "cmFindBase.h" -#include "cmFindCommon.h" #include "cmFindFileCommand.h" #include "cmFindLibraryCommand.h" #include "cmFindPackageCommand.h" @@ -49,13 +43,11 @@ #include "cmGetSourceFilePropertyCommand.h" #include "cmGetTargetPropertyCommand.h" #include "cmGetTestPropertyCommand.h" -#include "cmHexFileConverter.h" #include "cmIfCommand.h" #include "cmIncludeCommand.h" #include "cmIncludeDirectoryCommand.h" #include "cmIncludeRegularExpressionCommand.h" #include "cmInstallCommand.h" -#include "cmInstallCommandArguments.h" #include "cmInstallFilesCommand.h" #include "cmInstallTargetsCommand.h" #include "cmLinkDirectoriesCommand.h" @@ -67,10 +59,8 @@ #include "cmMessageCommand.h" #include "cmOptionCommand.h" #include "cmParseArgumentsCommand.h" -#include "cmPathLabel.h" #include "cmProjectCommand.h" #include "cmReturnCommand.h" -#include "cmSearchPath.h" #include "cmSeparateArgumentsCommand.h" #include "cmSetCommand.h" #include "cmSetDirectoryPropertiesCommand.h" @@ -82,7 +72,6 @@ #include "cmStringCommand.h" #include "cmSubdirCommand.h" #include "cmTargetLinkLibrariesCommand.h" -#include "cmTimestamp.h" #include "cmTryCompileCommand.h" #include "cmTryRunCommand.h" #include "cmUnsetCommand.h" @@ -113,7 +102,6 @@ #include "cmTargetCompileFeaturesCommand.h" #include "cmTargetCompileOptionsCommand.h" #include "cmTargetIncludeDirectoriesCommand.h" -#include "cmTargetPropCommandBase.h" #include "cmTargetSourcesCommand.h" #include "cmUseMangledMesaCommand.h" #include "cmUtilitySourceCommand.h" diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 7d98e73..71d6c4e 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -3,6 +3,7 @@ #include "cmConditionEvaluator.h" #include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" diff --git a/Source/cmConditionEvaluator.h b/Source/cmConditionEvaluator.h index 306bee4..3c9d2cd 100644 --- a/Source/cmConditionEvaluator.h +++ b/Source/cmConditionEvaluator.h @@ -5,6 +5,8 @@ #include "cmCommand.h" #include "cmExpandedCommandArgument.h" +#include "cmListFileCache.h" +#include "cmake.h" #include diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index 0755dce..b9c7549 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmConfigureFileCommand.h" +#include + +#include "cmMakefile.h" #include "cmSystemTools.h" +#include "cmake.h" -#include +class cmExecutionStatus; // cmConfigureFileCommand bool cmConfigureFileCommand::InitialPass(std::vector const& args, diff --git a/Source/cmConfigureFileCommand.h b/Source/cmConfigureFileCommand.h index 9df4550..e558b85 100644 --- a/Source/cmConfigureFileCommand.h +++ b/Source/cmConfigureFileCommand.h @@ -3,7 +3,14 @@ #ifndef cmConfigureFileCommand_h #define cmConfigureFileCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmNewLineStyle.h" + +class cmExecutionStatus; class cmConfigureFileCommand : public cmCommand { diff --git a/Source/cmContinueCommand.cxx b/Source/cmContinueCommand.cxx index dc3e02c..53d035d 100644 --- a/Source/cmContinueCommand.cxx +++ b/Source/cmContinueCommand.cxx @@ -3,7 +3,9 @@ #include "cmContinueCommand.h" #include "cmExecutionStatus.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +#include "cmake.h" // cmContinueCommand bool cmContinueCommand::InitialPass(std::vector const& args, diff --git a/Source/cmContinueCommand.h b/Source/cmContinueCommand.h index 0c4e650..c5b8919 100644 --- a/Source/cmContinueCommand.h +++ b/Source/cmContinueCommand.h @@ -3,8 +3,14 @@ #ifndef cmContinueCommand_h #define cmContinueCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmContinueCommand * \brief Continue from an enclosing foreach or while loop * diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index c7b6d58..a1de074 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -5,6 +5,7 @@ #include "cmAlgorithms.h" #include "cmExportTryCompileFileGenerator.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmState.h" #include "cmake.h" diff --git a/Source/cmCoreTryCompile.h b/Source/cmCoreTryCompile.h index 5f909dd..0d9bb79 100644 --- a/Source/cmCoreTryCompile.h +++ b/Source/cmCoreTryCompile.h @@ -4,6 +4,7 @@ #define cmCoreTryCompile_h #include "cmCommand.h" +#include "cmStateTypes.h" /** \class cmCoreTryCompile * \brief Base class for cmTryCompileCommand and cmTryRunCommand diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx index b062d4d..14a6c88 100644 --- a/Source/cmCreateTestSourceList.cxx +++ b/Source/cmCreateTestSourceList.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCreateTestSourceList.h" +#include "cmMakefile.h" #include "cmSourceFile.h" #include "cmSystemTools.h" diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx index af4eff9..9a097f3 100644 --- a/Source/cmDefinePropertyCommand.cxx +++ b/Source/cmDefinePropertyCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDefinePropertyCommand.h" +#include + +#include "cmMakefile.h" +#include "cmProperty.h" #include "cmState.h" -#include "cmStateTypes.h" -#include "cmake.h" + +class cmExecutionStatus; bool cmDefinePropertyCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmDefinePropertyCommand.h b/Source/cmDefinePropertyCommand.h index cdfff9f..02e5b88 100644 --- a/Source/cmDefinePropertyCommand.h +++ b/Source/cmDefinePropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmDefinesPropertyCommand_h #define cmDefinesPropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmDefinePropertyCommand : public cmCommand { public: diff --git a/Source/cmElseCommand.cxx b/Source/cmElseCommand.cxx index 16e53f6..207777e 100644 --- a/Source/cmElseCommand.cxx +++ b/Source/cmElseCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmElseCommand.h" +class cmExecutionStatus; + bool cmElseCommand::InitialPass(std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmElseCommand.h b/Source/cmElseCommand.h index 32e04a7..c0162ad 100644 --- a/Source/cmElseCommand.h +++ b/Source/cmElseCommand.h @@ -3,7 +3,13 @@ #ifndef cmElseCommand_h #define cmElseCommand_h -#include "cmIfCommand.h" +#include +#include +#include + +#include "cmCommand.h" + +class cmExecutionStatus; /** \class cmElseCommand * \brief ends an if block diff --git a/Source/cmEnableLanguageCommand.cxx b/Source/cmEnableLanguageCommand.cxx index 49fd6fd..c57b7b1 100644 --- a/Source/cmEnableLanguageCommand.cxx +++ b/Source/cmEnableLanguageCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEnableLanguageCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // cmEnableLanguageCommand bool cmEnableLanguageCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmEnableLanguageCommand.h b/Source/cmEnableLanguageCommand.h index 34e1d3d..bafb79e 100644 --- a/Source/cmEnableLanguageCommand.h +++ b/Source/cmEnableLanguageCommand.h @@ -3,8 +3,14 @@ #ifndef cmEnableLanguageCommand_h #define cmEnableLanguageCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmEnableLanguageCommand * \brief Specify the name for this build project. * diff --git a/Source/cmEnableTestingCommand.cxx b/Source/cmEnableTestingCommand.cxx index d66c5b3..6a64450 100644 --- a/Source/cmEnableTestingCommand.cxx +++ b/Source/cmEnableTestingCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEnableTestingCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // we do this in the final pass so that we now the subdirs have all // been defined bool cmEnableTestingCommand::InitialPass(std::vector const&, diff --git a/Source/cmEnableTestingCommand.h b/Source/cmEnableTestingCommand.h index b94967a..67cd237 100644 --- a/Source/cmEnableTestingCommand.h +++ b/Source/cmEnableTestingCommand.h @@ -3,8 +3,14 @@ #ifndef cmEnableTestingCommand_h #define cmEnableTestingCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmEnableTestingCommand * \brief Enable testing for this directory and below. * diff --git a/Source/cmEndForEachCommand.cxx b/Source/cmEndForEachCommand.cxx index 7184bae..fe6a7f3 100644 --- a/Source/cmEndForEachCommand.cxx +++ b/Source/cmEndForEachCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndForEachCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + bool cmEndForEachCommand::InvokeInitialPass( std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmEndForEachCommand.h b/Source/cmEndForEachCommand.h index a146e4d..772a139 100644 --- a/Source/cmEndForEachCommand.h +++ b/Source/cmEndForEachCommand.h @@ -3,8 +3,15 @@ #ifndef cmEndForEachCommand_h #define cmEndForEachCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + /** \class cmEndForEachCommand * \brief ends an if block * diff --git a/Source/cmEndFunctionCommand.cxx b/Source/cmEndFunctionCommand.cxx index 82344c6..6adb42b 100644 --- a/Source/cmEndFunctionCommand.cxx +++ b/Source/cmEndFunctionCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndFunctionCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + bool cmEndFunctionCommand::InvokeInitialPass( std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmEndFunctionCommand.h b/Source/cmEndFunctionCommand.h index ab174fd..2599637 100644 --- a/Source/cmEndFunctionCommand.h +++ b/Source/cmEndFunctionCommand.h @@ -3,8 +3,15 @@ #ifndef cmEndFunctionCommand_h #define cmEndFunctionCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + /** \class cmEndFunctionCommand * \brief ends an if block * diff --git a/Source/cmEndIfCommand.cxx b/Source/cmEndIfCommand.cxx index 78a0d0f..50c2b42 100644 --- a/Source/cmEndIfCommand.cxx +++ b/Source/cmEndIfCommand.cxx @@ -3,6 +3,11 @@ #include "cmEndIfCommand.h" #include // required for atof + +#include "cmMakefile.h" + +class cmExecutionStatus; + bool cmEndIfCommand::InitialPass(std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmEndIfCommand.h b/Source/cmEndIfCommand.h index d068bb4..dfd6049 100644 --- a/Source/cmEndIfCommand.h +++ b/Source/cmEndIfCommand.h @@ -3,7 +3,13 @@ #ifndef cmEndIfCommand_h #define cmEndIfCommand_h -#include "cmIfCommand.h" +#include +#include +#include + +#include "cmCommand.h" + +class cmExecutionStatus; /** \class cmEndIfCommand * \brief ends an if block diff --git a/Source/cmEndMacroCommand.cxx b/Source/cmEndMacroCommand.cxx index 189d969..046b0af 100644 --- a/Source/cmEndMacroCommand.cxx +++ b/Source/cmEndMacroCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndMacroCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + bool cmEndMacroCommand::InvokeInitialPass( std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmEndMacroCommand.h b/Source/cmEndMacroCommand.h index 34ae880..3c462d4 100644 --- a/Source/cmEndMacroCommand.h +++ b/Source/cmEndMacroCommand.h @@ -3,8 +3,15 @@ #ifndef cmEndMacroCommand_h #define cmEndMacroCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + /** \class cmEndMacroCommand * \brief ends an if block * diff --git a/Source/cmEndWhileCommand.cxx b/Source/cmEndWhileCommand.cxx index b635168..48f09f1 100644 --- a/Source/cmEndWhileCommand.cxx +++ b/Source/cmEndWhileCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndWhileCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + bool cmEndWhileCommand::InvokeInitialPass( std::vector const& args, cmExecutionStatus&) { diff --git a/Source/cmEndWhileCommand.h b/Source/cmEndWhileCommand.h index 2366706..d4e97b4 100644 --- a/Source/cmEndWhileCommand.h +++ b/Source/cmEndWhileCommand.h @@ -3,8 +3,15 @@ #ifndef cmEndWhileCommand_h #define cmEndWhileCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + /** \class cmEndWhileCommand * \brief ends a while loop * diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx index a3d6852..df92592 100644 --- a/Source/cmExecProgramCommand.cxx +++ b/Source/cmExecProgramCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExecProgramCommand.h" +#include +#include + +#include "cmMakefile.h" #include "cmSystemTools.h" -#include +class cmExecutionStatus; // cmExecProgramCommand bool cmExecProgramCommand::InitialPass(std::vector const& args, diff --git a/Source/cmExecProgramCommand.h b/Source/cmExecProgramCommand.h index a3e96ae..7cdf777 100644 --- a/Source/cmExecProgramCommand.h +++ b/Source/cmExecProgramCommand.h @@ -3,8 +3,14 @@ #ifndef cmExecProgramCommand_h #define cmExecProgramCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmExecProgramCommand * \brief Command that adds a target to the build system. * diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 2bcf244..c8a3a84 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -2,11 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExecuteProcessCommand.h" -#include "cmSystemTools.h" - #include - #include /* isspace */ +#include +#include + +#include "cmMakefile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; static bool cmExecuteProcessCommandIsWhitespace(char c) { diff --git a/Source/cmExecuteProcessCommand.h b/Source/cmExecuteProcessCommand.h index 2242998..9ce4338 100644 --- a/Source/cmExecuteProcessCommand.h +++ b/Source/cmExecuteProcessCommand.h @@ -3,8 +3,14 @@ #ifndef cmExecuteProcessCommand_h #define cmExecuteProcessCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmExecuteProcessCommand * \brief Command that adds a target to the build system. * diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index c9dac35..8102276 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -12,7 +12,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmake.h" diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index bf1ea01..f556a8b 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -2,17 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExportLibraryDependenciesCommand.h" -#include #include +#include +#include #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" +#include "cm_auto_ptr.hxx" +#include "cm_unordered_map.hxx" #include "cmake.h" class cmExecutionStatus; diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 6b5870b..6285894 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -9,9 +9,9 @@ #include "cmGlobalGenerator.h" #include "cmHexFileConverter.h" #include "cmInstallType.h" -#include "cmake.h" - +#include "cmMakefile.h" #include "cmTimestamp.h" +#include "cmake.h" #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmCurl.h" diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h index b53bae8..319864c 100644 --- a/Source/cmFileCommand.h +++ b/Source/cmFileCommand.h @@ -3,9 +3,13 @@ #ifndef cmFileCommand_h #define cmFileCommand_h +#include +#include +#include + #include "cmCommand.h" -struct cmFileInstaller; +class cmExecutionStatus; /** \class cmFileCommand * \brief Command for manipulation of files diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 118c581..3d67ac1 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -3,6 +3,7 @@ #include "cmFindBase.h" #include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index bc175ff..75d1453 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindCommon.h" +#include "cmMakefile.h" #include "cmSystemTools.h" #include diff --git a/Source/cmFindFileCommand.cxx b/Source/cmFindFileCommand.cxx index 9c66cd2..9840c4f 100644 --- a/Source/cmFindFileCommand.cxx +++ b/Source/cmFindFileCommand.cxx @@ -2,8 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindFileCommand.h" -#include "cmSystemTools.h" - cmFindFileCommand::cmFindFileCommand() { this->IncludeFileInPath = true; diff --git a/Source/cmFindFileCommand.h b/Source/cmFindFileCommand.h index e121784..5c94ebf 100644 --- a/Source/cmFindFileCommand.h +++ b/Source/cmFindFileCommand.h @@ -3,8 +3,13 @@ #ifndef cmFindFileCommand_h #define cmFindFileCommand_h +#include +#include + #include "cmFindPathCommand.h" +class cmCommand; + /** \class cmFindFileCommand * \brief Define a command to search for an executable program. * diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 56be0cb..2feedf3 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -2,12 +2,19 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindLibraryCommand.h" +#include +#include +#include +#include +#include + #include "cmGlobalGenerator.h" +#include "cmMakefile.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" -#include "cmVersion.h" -#include +class cmExecutionStatus; cmFindLibraryCommand::cmFindLibraryCommand() { diff --git a/Source/cmFindLibraryCommand.h b/Source/cmFindLibraryCommand.h index 8531e51..aeff629 100644 --- a/Source/cmFindLibraryCommand.h +++ b/Source/cmFindLibraryCommand.h @@ -3,8 +3,15 @@ #ifndef cmFindLibraryCommand_h #define cmFindLibraryCommand_h +#include +#include +#include + #include "cmFindBase.h" +class cmCommand; +class cmExecutionStatus; + /** \class cmFindLibraryCommand * \brief Define a command to search for a library. * diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 373b728..60de74f 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -2,26 +2,38 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindPackageCommand.h" -#include "cmAlgorithms.h" -#include "cmState.h" -#include "cmVersion.h" - +#include +#include #include #include -#include #include +#include #include +#include +#include +#include +#include +#include +#include +#include -#ifdef CMAKE_BUILD_WITH_CMAKE -#include "cmVariableWatch.h" -#endif +#include "cmAlgorithms.h" +#include "cmMakefile.h" +#include "cmSearchPath.h" +#include "cmState.h" +#include "cmStateTypes.h" +#include "cmVersion.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" #if defined(__HAIKU__) #include #include -#include #endif +class cmExecutionStatus; +class cmFileList; + cmFindPackageCommand::PathLabel cmFindPackageCommand::PathLabel::UserRegistry( "PACKAGE_REGISTRY"); cmFindPackageCommand::PathLabel cmFindPackageCommand::PathLabel::Builds( @@ -1549,11 +1561,6 @@ void cmFindPackageCommand::StoreVersionFound() this->Makefile->AddDefinition(ver + "_COUNT", buf); } -#include -#include -#include - -class cmFileList; class cmFileListGeneratorBase { public: diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 101749e..d454892 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -3,9 +3,18 @@ #ifndef cmFindPackageCommand_h #define cmFindPackageCommand_h +#include +#include +#include +#include +#include +#include + #include "cmFindCommon.h" -class cmFindPackageFileList; +class cmCommand; +class cmExecutionStatus; +class cmSearchPath; /** \class cmFindPackageCommand * \brief Load settings from an external project. diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 66dc5d7..0900f46 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindPathCommand.h" +#include + +#include "cmMakefile.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" -#include +class cmExecutionStatus; cmFindPathCommand::cmFindPathCommand() { diff --git a/Source/cmFindPathCommand.h b/Source/cmFindPathCommand.h index 4ba67ed..edeeb3a 100644 --- a/Source/cmFindPathCommand.h +++ b/Source/cmFindPathCommand.h @@ -3,8 +3,15 @@ #ifndef cmFindPathCommand_h #define cmFindPathCommand_h +#include +#include +#include + #include "cmFindBase.h" +class cmCommand; +class cmExecutionStatus; + /** \class cmFindPathCommand * \brief Define a command to search for a library. * diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index d258c3c..2c496ba 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -2,9 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindProgramCommand.h" +#include "cmMakefile.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" -#include +class cmExecutionStatus; #if defined(__APPLE__) #include diff --git a/Source/cmFindProgramCommand.h b/Source/cmFindProgramCommand.h index 4326124..dc17803 100644 --- a/Source/cmFindProgramCommand.h +++ b/Source/cmFindProgramCommand.h @@ -3,8 +3,15 @@ #ifndef cmFindProgramCommand_h #define cmFindProgramCommand_h +#include +#include +#include + #include "cmFindBase.h" +class cmCommand; +class cmExecutionStatus; + /** \class cmFindProgramCommand * \brief Define a command to search for an executable program. * diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 6fbc93d..6273f6e 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -2,9 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmForEachCommand.h" -#include "cmSystemTools.h" +#include +#include +#include -#include +#include "cmExecutionStatus.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" cmForEachFunctionBlocker::cmForEachFunctionBlocker(cmMakefile* mf) : Makefile(mf) diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h index 9ba4af0..93c4676 100644 --- a/Source/cmForEachCommand.h +++ b/Source/cmForEachCommand.h @@ -3,11 +3,17 @@ #ifndef cmForEachCommand_h #define cmForEachCommand_h -#include "cmCommand.h" +#include +#include +#include +#include "cmCommand.h" #include "cmFunctionBlocker.h" #include "cmListFileCache.h" +class cmExecutionStatus; +class cmMakefile; + class cmForEachFunctionBlocker : public cmFunctionBlocker { public: diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index e9d4496..0ba575a 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -2,9 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFunctionCommand.h" +#include +#include + +#include "cmAlgorithms.h" +#include "cmExecutionStatus.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" #include "cmSystemTools.h" -#include "cmake.h" // define the class for function commands class cmFunctionHelperCommand : public cmCommand diff --git a/Source/cmFunctionCommand.h b/Source/cmFunctionCommand.h index 7d868b2..afea6f9 100644 --- a/Source/cmFunctionCommand.h +++ b/Source/cmFunctionCommand.h @@ -3,9 +3,16 @@ #ifndef cmFunctionCommand_h #define cmFunctionCommand_h -#include "cmCommand.h" +#include +#include +#include +#include "cmCommand.h" #include "cmFunctionBlocker.h" +#include "cmListFileCache.h" + +class cmExecutionStatus; +class cmMakefile; class cmFunctionFunctionBlocker : public cmFunctionBlocker { diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index 01b41e8..c92ae21 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -2,11 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetCMakePropertyCommand.h" +#include +#include + #include "cmAlgorithms.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" #include "cmState.h" -#include "cmStateTypes.h" -#include "cmake.h" + +class cmExecutionStatus; // cmGetCMakePropertyCommand bool cmGetCMakePropertyCommand::InitialPass( diff --git a/Source/cmGetCMakePropertyCommand.h b/Source/cmGetCMakePropertyCommand.h index 30bc2d8..41a51a4 100644 --- a/Source/cmGetCMakePropertyCommand.h +++ b/Source/cmGetCMakePropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetCMakePropertyCommand_h #define cmGetCMakePropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetCMakePropertyCommand : public cmCommand { public: diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx index 0670d31..920e1a0 100644 --- a/Source/cmGetDirectoryPropertyCommand.cxx +++ b/Source/cmGetDirectoryPropertyCommand.cxx @@ -3,9 +3,13 @@ #include "cmGetDirectoryPropertyCommand.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmSystemTools.h" #include "cmake.h" +class cmExecutionStatus; + // cmGetDirectoryPropertyCommand bool cmGetDirectoryPropertyCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmGetDirectoryPropertyCommand.h b/Source/cmGetDirectoryPropertyCommand.h index 625adb0..1ae3125 100644 --- a/Source/cmGetDirectoryPropertyCommand.h +++ b/Source/cmGetDirectoryPropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetDirectoryPropertyCommand_h #define cmGetDirectoryPropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetDirectoryPropertyCommand : public cmCommand { public: diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index c183947..5915a67 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -2,8 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetFilenameComponentCommand.h" +#include "cmMakefile.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmGetFilenameComponentCommand bool cmGetFilenameComponentCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmGetFilenameComponentCommand.h b/Source/cmGetFilenameComponentCommand.h index 68bf31f..c0ad903 100644 --- a/Source/cmGetFilenameComponentCommand.h +++ b/Source/cmGetFilenameComponentCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetFilenameComponentCommand_h #define cmGetFilenameComponentCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmGetFilenameComponentCommand * \brief Get a specific component of a filename. * diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 1852eab..d2056d2 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -2,15 +2,26 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetPropertyCommand.h" +#include + #include "cmGlobalGenerator.h" +#include "cmInstalledFile.h" +#include "cmListFileCache.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmProperty.h" #include "cmPropertyDefinition.h" #include "cmSourceFile.h" #include "cmState.h" -#include "cmStateTypes.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetPropertyComputer.h" #include "cmTest.h" #include "cmake.h" +class cmExecutionStatus; +class cmMessenger; + cmGetPropertyCommand::cmGetPropertyCommand() { this->InfoType = OutValue; diff --git a/Source/cmGetPropertyCommand.h b/Source/cmGetPropertyCommand.h index 20268b4..f9a33ac 100644 --- a/Source/cmGetPropertyCommand.h +++ b/Source/cmGetPropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetPropertyCommand_h #define cmGetPropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetPropertyCommand : public cmCommand { public: diff --git a/Source/cmGetSourceFilePropertyCommand.cxx b/Source/cmGetSourceFilePropertyCommand.cxx index 43f9256..509ef95 100644 --- a/Source/cmGetSourceFilePropertyCommand.cxx +++ b/Source/cmGetSourceFilePropertyCommand.cxx @@ -2,8 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetSourceFilePropertyCommand.h" +#include "cmMakefile.h" #include "cmSourceFile.h" +class cmExecutionStatus; + // cmSetSourceFilePropertyCommand bool cmGetSourceFilePropertyCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmGetSourceFilePropertyCommand.h b/Source/cmGetSourceFilePropertyCommand.h index 1edc392..0f71851 100644 --- a/Source/cmGetSourceFilePropertyCommand.h +++ b/Source/cmGetSourceFilePropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetSourceFilePropertyCommand_h #define cmGetSourceFilePropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetSourceFilePropertyCommand : public cmCommand { public: diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx index e78f780..2379292 100644 --- a/Source/cmGetTargetPropertyCommand.cxx +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -2,7 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetTargetPropertyCommand.h" +#include + +#include "cmListFileCache.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmTarget.h" #include "cmTargetPropertyComputer.h" +#include "cmake.h" + +class cmExecutionStatus; +class cmMessenger; // cmSetTargetPropertyCommand bool cmGetTargetPropertyCommand::InitialPass( diff --git a/Source/cmGetTargetPropertyCommand.h b/Source/cmGetTargetPropertyCommand.h index f36cc48..32fe803 100644 --- a/Source/cmGetTargetPropertyCommand.h +++ b/Source/cmGetTargetPropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetTargetPropertyCommand_h #define cmGetTargetPropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetTargetPropertyCommand : public cmCommand { public: diff --git a/Source/cmGetTestPropertyCommand.cxx b/Source/cmGetTestPropertyCommand.cxx index 4a445dc..a8a44b7 100644 --- a/Source/cmGetTestPropertyCommand.cxx +++ b/Source/cmGetTestPropertyCommand.cxx @@ -2,8 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetTestPropertyCommand.h" +#include "cmMakefile.h" #include "cmTest.h" -#include "cmake.h" + +class cmExecutionStatus; // cmGetTestPropertyCommand bool cmGetTestPropertyCommand::InitialPass( diff --git a/Source/cmGetTestPropertyCommand.h b/Source/cmGetTestPropertyCommand.h index 5dc89bd..0491cc8 100644 --- a/Source/cmGetTestPropertyCommand.h +++ b/Source/cmGetTestPropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetTestPropertyCommand_h #define cmGetTestPropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetTestPropertyCommand : public cmCommand { public: diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index eb85b16..a8fa4f9 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -2,15 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIfCommand.h" +#include "cmConditionEvaluator.h" +#include "cmExecutionStatus.h" +#include "cmExpandedCommandArgument.h" +#include "cmMakefile.h" #include "cmOutputConverter.h" -#include "cmStringCommand.h" #include "cmSystemTools.h" - -#include "cmConditionEvaluator.h" - -#include -#include -#include // required for atof +#include "cm_auto_ptr.hxx" +#include "cmake.h" static std::string cmIfCommandError( std::vector const& args) diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h index e071acb..56eef30 100644 --- a/Source/cmIfCommand.h +++ b/Source/cmIfCommand.h @@ -3,9 +3,17 @@ #ifndef cmIfCommand_h #define cmIfCommand_h -#include "cmCommand.h" +#include +#include +#include +#include "cmCommand.h" #include "cmFunctionBlocker.h" +#include "cmListFileCache.h" + +class cmExecutionStatus; +class cmExpandedCommandArgument; +class cmMakefile; class cmIfFunctionBlocker : public cmFunctionBlocker { diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx index e89641f..0f7799e 100644 --- a/Source/cmIncludeCommand.cxx +++ b/Source/cmIncludeCommand.cxx @@ -2,8 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeCommand.h" +#include + #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmIncludeCommand bool cmIncludeCommand::InitialPass(std::vector const& args, diff --git a/Source/cmIncludeCommand.h b/Source/cmIncludeCommand.h index 9065ef7..78edd43 100644 --- a/Source/cmIncludeCommand.h +++ b/Source/cmIncludeCommand.h @@ -3,8 +3,14 @@ #ifndef cmIncludeCommand_h #define cmIncludeCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmIncludeCommand * \brief cmIncludeCommand defines a list of distant * files that can be "included" in the current list file. diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index 2260366..cdb0279 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -2,8 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeDirectoryCommand.h" +#include +#include + +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmIncludeDirectoryCommand bool cmIncludeDirectoryCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmIncludeDirectoryCommand.h b/Source/cmIncludeDirectoryCommand.h index d0a20b3..287b5d3 100644 --- a/Source/cmIncludeDirectoryCommand.h +++ b/Source/cmIncludeDirectoryCommand.h @@ -3,8 +3,14 @@ #ifndef cmIncludeDirectoryCommand_h #define cmIncludeDirectoryCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmIncludeDirectoryCommand * \brief Add include directories to the build. * diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index e7e9402..03388c7 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -3,7 +3,10 @@ #include "cmIncludeExternalMSProjectCommand.h" #ifdef _WIN32 +#include "cmMakefile.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmTarget.h" #endif class cmExecutionStatus; diff --git a/Source/cmIncludeRegularExpressionCommand.cxx b/Source/cmIncludeRegularExpressionCommand.cxx index 6dc20a0..073c95f 100644 --- a/Source/cmIncludeRegularExpressionCommand.cxx +++ b/Source/cmIncludeRegularExpressionCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeRegularExpressionCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // cmIncludeRegularExpressionCommand bool cmIncludeRegularExpressionCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmIncludeRegularExpressionCommand.h b/Source/cmIncludeRegularExpressionCommand.h index b7c937d..c68d9f2 100644 --- a/Source/cmIncludeRegularExpressionCommand.h +++ b/Source/cmIncludeRegularExpressionCommand.h @@ -3,8 +3,14 @@ #ifndef cmIncludeRegularExpressionCommand_h #define cmIncludeRegularExpressionCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmIncludeRegularExpressionCommand * \brief Set the regular expression for following #includes. * diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 476755a..7bf9462 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -2,18 +2,33 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallCommand.h" +#include +#include +#include +#include + +#include "cmAlgorithms.h" +#include "cmCommandArgumentsHelper.h" #include "cmExportSet.h" +#include "cmExportSetMap.h" +#include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmInstallCommandArguments.h" #include "cmInstallDirectoryGenerator.h" #include "cmInstallExportGenerator.h" #include "cmInstallFilesGenerator.h" +#include "cmInstallGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetExport.h" +#include "cmake.h" -#include +class cmExecutionStatus; static cmInstallTargetGenerator* CreateInstallTargetGenerator( cmTarget& target, const cmInstallCommandArguments& args, bool impLib, diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h index b350330..187a6ce 100644 --- a/Source/cmInstallCommand.h +++ b/Source/cmInstallCommand.h @@ -3,8 +3,14 @@ #ifndef cmInstallCommand_h #define cmInstallCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmInstallCommand * \brief Specifies where to install some files * diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index 50f97e9..86fd46d 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -2,10 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallFilesCommand.h" +#include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmInstallFilesGenerator.h" +#include "cmInstallGenerator.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmExecutableCommand bool cmInstallFilesCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmInstallFilesCommand.h b/Source/cmInstallFilesCommand.h index da09fae..c3e2919 100644 --- a/Source/cmInstallFilesCommand.h +++ b/Source/cmInstallFilesCommand.h @@ -3,8 +3,14 @@ #ifndef cmInstallFilesCommand_h #define cmInstallFilesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmInstallFilesCommand * \brief Specifies where to install some files * diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx index 07f990d..e00eba0 100644 --- a/Source/cmInstallTargetsCommand.cxx +++ b/Source/cmInstallTargetsCommand.cxx @@ -2,7 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallTargetsCommand.h" +#include + #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cm_unordered_map.hxx" + +class cmExecutionStatus; // cmExecutableCommand bool cmInstallTargetsCommand::InitialPass(std::vector const& args, diff --git a/Source/cmInstallTargetsCommand.h b/Source/cmInstallTargetsCommand.h index 0625722..150397d 100644 --- a/Source/cmInstallTargetsCommand.h +++ b/Source/cmInstallTargetsCommand.h @@ -3,8 +3,14 @@ #ifndef cmInstallTargetsCommand_h #define cmInstallTargetsCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmInstallTargetsCommand * \brief Specifies where to install some targets * diff --git a/Source/cmLinkDirectoriesCommand.cxx b/Source/cmLinkDirectoriesCommand.cxx index 3a18a43..f863292 100644 --- a/Source/cmLinkDirectoriesCommand.cxx +++ b/Source/cmLinkDirectoriesCommand.cxx @@ -2,7 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLinkDirectoriesCommand.h" +#include + +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmLinkDirectoriesCommand bool cmLinkDirectoriesCommand::InitialPass( diff --git a/Source/cmLinkDirectoriesCommand.h b/Source/cmLinkDirectoriesCommand.h index ba0313b..387b3b9 100644 --- a/Source/cmLinkDirectoriesCommand.h +++ b/Source/cmLinkDirectoriesCommand.h @@ -3,8 +3,14 @@ #ifndef cmLinkDirectoriesCommand_h #define cmLinkDirectoriesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmLinkDirectoriesCommand * \brief Define a list of directories containing files to link. * diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 6cc9590..295ea28 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -2,15 +2,22 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmListCommand.h" -#include "cmAlgorithms.h" -#include "cmSystemTools.h" -#include -#include - #include #include -#include +#include +#include +#include +#include #include // required for atoi + +#include "cmAlgorithms.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; + bool cmListCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h index 43a482c..e7413ca 100644 --- a/Source/cmListCommand.h +++ b/Source/cmListCommand.h @@ -3,8 +3,14 @@ #ifndef cmListCommand_h #define cmListCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmListCommand * \brief Common list operations * diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index 2a06cb4..ea84877 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -5,7 +5,7 @@ #include #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 9bfc70b..d777bd5 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -2,10 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMacroCommand.h" +#include +#include +#include + #include "cmAlgorithms.h" +#include "cmExecutionStatus.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" #include "cmSystemTools.h" -#include "cmake.h" // define the class for macro commands class cmMacroHelperCommand : public cmCommand diff --git a/Source/cmMacroCommand.h b/Source/cmMacroCommand.h index 8e3cd95..acb4233 100644 --- a/Source/cmMacroCommand.h +++ b/Source/cmMacroCommand.h @@ -3,9 +3,16 @@ #ifndef cmMacroCommand_h #define cmMacroCommand_h -#include "cmCommand.h" +#include +#include +#include +#include "cmCommand.h" #include "cmFunctionBlocker.h" +#include "cmListFileCache.h" + +class cmExecutionStatus; +class cmMakefile; class cmMacroFunctionBlocker : public cmFunctionBlocker { diff --git a/Source/cmMakeDirectoryCommand.cxx b/Source/cmMakeDirectoryCommand.cxx index fda9eea..06e295b 100644 --- a/Source/cmMakeDirectoryCommand.cxx +++ b/Source/cmMakeDirectoryCommand.cxx @@ -2,8 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakeDirectoryCommand.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmMakeDirectoryCommand bool cmMakeDirectoryCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmMakeDirectoryCommand.h b/Source/cmMakeDirectoryCommand.h index 74b4a63..d9cce6f 100644 --- a/Source/cmMakeDirectoryCommand.h +++ b/Source/cmMakeDirectoryCommand.h @@ -3,8 +3,14 @@ #ifndef cmMakeDirectoryCommand_h #define cmMakeDirectoryCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmMakeDirectoryCommand * \brief Specify auxiliary source code directories. * diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx index 7297193..b2f0d22 100644 --- a/Source/cmMarkAsAdvancedCommand.cxx +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -2,8 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMarkAsAdvancedCommand.h" +#include "cmMakefile.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmMarkAsAdvancedCommand bool cmMarkAsAdvancedCommand::InitialPass(std::vector const& args, diff --git a/Source/cmMarkAsAdvancedCommand.h b/Source/cmMarkAsAdvancedCommand.h index 0f5270c..26caa66 100644 --- a/Source/cmMarkAsAdvancedCommand.h +++ b/Source/cmMarkAsAdvancedCommand.h @@ -3,8 +3,14 @@ #ifndef cmMarkAsAdvancedCommand_h #define cmMarkAsAdvancedCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmMarkAsAdvancedCommand * \brief mark_as_advanced command * diff --git a/Source/cmMathCommand.cxx b/Source/cmMathCommand.cxx index 42e6b90..c1cd1b6 100644 --- a/Source/cmMathCommand.cxx +++ b/Source/cmMathCommand.cxx @@ -2,7 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMathCommand.h" +#include + #include "cmExprParserHelper.h" +#include "cmMakefile.h" + +class cmExecutionStatus; bool cmMathCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmMathCommand.h b/Source/cmMathCommand.h index 17a1575..9b49b21 100644 --- a/Source/cmMathCommand.h +++ b/Source/cmMathCommand.h @@ -3,8 +3,14 @@ #ifndef cmMathCommand_h #define cmMathCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /// Mathematical expressions: math(EXPR ...) command. class cmMathCommand : public cmCommand { diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index 83d847a..2e15720 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -2,8 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMessageCommand.h" +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmMessenger.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmLibraryCommand bool cmMessageCommand::InitialPass(std::vector const& args, diff --git a/Source/cmMessageCommand.h b/Source/cmMessageCommand.h index cd16ffa..a565635 100644 --- a/Source/cmMessageCommand.h +++ b/Source/cmMessageCommand.h @@ -3,8 +3,14 @@ #ifndef cmMessageCommand_h #define cmMessageCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmMessageCommand * \brief Displays a message to the user * diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index d6efa2c..bbd6090 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -2,9 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmOptionCommand.h" +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmOptionCommand bool cmOptionCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmOptionCommand.h b/Source/cmOptionCommand.h index d77215a..09567ff 100644 --- a/Source/cmOptionCommand.h +++ b/Source/cmOptionCommand.h @@ -3,8 +3,14 @@ #ifndef cmOptionCommand_h #define cmOptionCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmOptionCommand * \brief Provide an option to the user * diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index 6ecd942..32b0a92 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -4,6 +4,8 @@ #include #include +#include +#include #include "cmAlgorithms.h" #include "cmGeneratorExpression.h" @@ -12,6 +14,7 @@ #include "cmSourceFile.h" #include "cmSystemTools.h" #include "cmTarget.h" +#include "cm_unordered_map.hxx" class cmExecutionStatus; diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index e45e3a5..0a2dd12 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -2,8 +2,19 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmParseArgumentsCommand.h" +#include +#include +#include +#include +#include +#include + #include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; static std::string escape_arg(const std::string& arg) { diff --git a/Source/cmParseArgumentsCommand.h b/Source/cmParseArgumentsCommand.h index af87d81..079eadb 100644 --- a/Source/cmParseArgumentsCommand.h +++ b/Source/cmParseArgumentsCommand.h @@ -3,8 +3,14 @@ #ifndef cmParseArgumentsCommand_h #define cmParseArgumentsCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmParseArgumentsCommand * */ diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index 4188661..4e0fa57 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -2,7 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmProjectCommand.h" +#include +#include +#include + +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmProjectCommand bool cmProjectCommand::InitialPass(std::vector const& args, diff --git a/Source/cmProjectCommand.h b/Source/cmProjectCommand.h index ef554f3..cd92176 100644 --- a/Source/cmProjectCommand.h +++ b/Source/cmProjectCommand.h @@ -3,8 +3,14 @@ #ifndef cmProjectCommand_h #define cmProjectCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmProjectCommand * \brief Specify the name for this build project. * diff --git a/Source/cmReturnCommand.h b/Source/cmReturnCommand.h index 06b91bc..9496d67 100644 --- a/Source/cmReturnCommand.h +++ b/Source/cmReturnCommand.h @@ -3,8 +3,14 @@ #ifndef cmReturnCommand_h #define cmReturnCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmReturnCommand * \brief Return from a directory or function * diff --git a/Source/cmSearchPath.cxx b/Source/cmSearchPath.cxx index fd3d482..ff0b836 100644 --- a/Source/cmSearchPath.cxx +++ b/Source/cmSearchPath.cxx @@ -2,8 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSearchPath.h" +#include + #include "cmAlgorithms.h" #include "cmFindCommon.h" +#include "cmMakefile.h" #include "cmSystemTools.h" cmSearchPath::cmSearchPath(cmFindCommon* findCmd) diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx index 77546a3..b27d227 100644 --- a/Source/cmSeparateArgumentsCommand.cxx +++ b/Source/cmSeparateArgumentsCommand.cxx @@ -2,8 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSeparateArgumentsCommand.h" +#include +#include + +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmSeparateArgumentsCommand bool cmSeparateArgumentsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSeparateArgumentsCommand.h b/Source/cmSeparateArgumentsCommand.h index d80d043..1cbf56e 100644 --- a/Source/cmSeparateArgumentsCommand.h +++ b/Source/cmSeparateArgumentsCommand.h @@ -3,8 +3,14 @@ #ifndef cmSeparateArgumentsCommand_h #define cmSeparateArgumentsCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmSeparateArgumentsCommand * \brief separate_arguments command * diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 9f59db4..e49f142 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -2,9 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetCommand.h" +#include +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmSetCommand bool cmSetCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSetCommand.h b/Source/cmSetCommand.h index 6fa3865..190092a 100644 --- a/Source/cmSetCommand.h +++ b/Source/cmSetCommand.h @@ -3,8 +3,14 @@ #ifndef cmSetCommand_h #define cmSetCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmSetCommand * \brief Set a CMAKE variable * diff --git a/Source/cmSetDirectoryPropertiesCommand.cxx b/Source/cmSetDirectoryPropertiesCommand.cxx index b0de021..8d3961a 100644 --- a/Source/cmSetDirectoryPropertiesCommand.cxx +++ b/Source/cmSetDirectoryPropertiesCommand.cxx @@ -2,7 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetDirectoryPropertiesCommand.h" -#include "cmake.h" +#include "cmMakefile.h" + +class cmExecutionStatus; // cmSetDirectoryPropertiesCommand bool cmSetDirectoryPropertiesCommand::InitialPass( diff --git a/Source/cmSetDirectoryPropertiesCommand.h b/Source/cmSetDirectoryPropertiesCommand.h index 9608742..854ad43 100644 --- a/Source/cmSetDirectoryPropertiesCommand.h +++ b/Source/cmSetDirectoryPropertiesCommand.h @@ -3,8 +3,15 @@ #ifndef cmSetDirectoryPropertiesCommand_h #define cmSetDirectoryPropertiesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +class cmMakefile; + class cmSetDirectoryPropertiesCommand : public cmCommand { public: diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 552f918..79221c8 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -2,13 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetPropertyCommand.h" +#include + #include "cmGlobalGenerator.h" -#include "cmSetSourceFilesPropertiesCommand.h" -#include "cmSetTargetPropertiesCommand.h" -#include "cmSetTestsPropertiesCommand.h" +#include "cmInstalledFile.h" +#include "cmMakefile.h" +#include "cmProperty.h" #include "cmSourceFile.h" #include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTest.h" +#include "cmake.h" + +class cmExecutionStatus; cmSetPropertyCommand::cmSetPropertyCommand() { diff --git a/Source/cmSetPropertyCommand.h b/Source/cmSetPropertyCommand.h index b4dff76..fd7c922 100644 --- a/Source/cmSetPropertyCommand.h +++ b/Source/cmSetPropertyCommand.h @@ -3,8 +3,19 @@ #ifndef cmSetsPropertiesCommand_h #define cmSetsPropertiesCommand_h +#include +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +class cmInstalledFile; +class cmSourceFile; +class cmTarget; +class cmTest; + class cmSetPropertyCommand : public cmCommand { public: diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx index 6a87d6d..33e1b2e 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.cxx +++ b/Source/cmSetSourceFilesPropertiesCommand.cxx @@ -2,9 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetSourceFilesPropertiesCommand.h" +#include "cmMakefile.h" #include "cmSourceFile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmSetSourceFilesPropertiesCommand bool cmSetSourceFilesPropertiesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSetSourceFilesPropertiesCommand.h b/Source/cmSetSourceFilesPropertiesCommand.h index 62cc404..8fa12c7 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.h +++ b/Source/cmSetSourceFilesPropertiesCommand.h @@ -3,8 +3,15 @@ #ifndef cmSetSourceFilesPropertiesCommand_h #define cmSetSourceFilesPropertiesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +class cmMakefile; + class cmSetSourceFilesPropertiesCommand : public cmCommand { public: diff --git a/Source/cmSetTargetPropertiesCommand.cxx b/Source/cmSetTargetPropertiesCommand.cxx index 200b42d..da26972 100644 --- a/Source/cmSetTargetPropertiesCommand.cxx +++ b/Source/cmSetTargetPropertiesCommand.cxx @@ -2,7 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetTargetPropertiesCommand.h" -#include "cmGlobalGenerator.h" +#include + +#include "cmMakefile.h" +#include "cmTarget.h" + +class cmExecutionStatus; // cmSetTargetPropertiesCommand bool cmSetTargetPropertiesCommand::InitialPass( diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h index ed02fa8..c3c0d06 100644 --- a/Source/cmSetTargetPropertiesCommand.h +++ b/Source/cmSetTargetPropertiesCommand.h @@ -3,8 +3,15 @@ #ifndef cmSetTargetsPropertiesCommand_h #define cmSetTargetsPropertiesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +class cmMakefile; + class cmSetTargetPropertiesCommand : public cmCommand { public: diff --git a/Source/cmSetTestsPropertiesCommand.cxx b/Source/cmSetTestsPropertiesCommand.cxx index 5abb84e..4fd379f 100644 --- a/Source/cmSetTestsPropertiesCommand.cxx +++ b/Source/cmSetTestsPropertiesCommand.cxx @@ -2,8 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetTestsPropertiesCommand.h" +#include + +#include "cmMakefile.h" #include "cmTest.h" -#include "cmake.h" + +class cmExecutionStatus; // cmSetTestsPropertiesCommand bool cmSetTestsPropertiesCommand::InitialPass( diff --git a/Source/cmSetTestsPropertiesCommand.h b/Source/cmSetTestsPropertiesCommand.h index 04ba76e..45aed79 100644 --- a/Source/cmSetTestsPropertiesCommand.h +++ b/Source/cmSetTestsPropertiesCommand.h @@ -3,8 +3,15 @@ #ifndef cmSetTestsPropertiesCommand_h #define cmSetTestsPropertiesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +class cmMakefile; + class cmSetTestsPropertiesCommand : public cmCommand { public: diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx index 18c2a3e..4322a6d 100644 --- a/Source/cmSiteNameCommand.cxx +++ b/Source/cmSiteNameCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSiteNameCommand.h" +#include + +#include "cmMakefile.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" -#include +class cmExecutionStatus; // cmSiteNameCommand bool cmSiteNameCommand::InitialPass(std::vector const& args, diff --git a/Source/cmSiteNameCommand.h b/Source/cmSiteNameCommand.h index 48d1035..01023b9 100644 --- a/Source/cmSiteNameCommand.h +++ b/Source/cmSiteNameCommand.h @@ -3,8 +3,14 @@ #ifndef cmSiteNameCommand_h #define cmSiteNameCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmSiteNameCommand * \brief site_name command * diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 33d22e4..512bc91 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -2,18 +2,23 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmStringCommand.h" -#include "cmCryptoHash.h" -#include "cmSystemTools.h" - +#include #include -#include - #include -#include // required for atoi -#include +#include +#include +#include + +#include "cmAlgorithms.h" +#include "cmCryptoHash.h" +#include "cmGeneratorExpression.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmTimestamp.h" +#include "cmUuid.h" +#include "cm_auto_ptr.hxx" -#include -#include +class cmExecutionStatus; bool cmStringCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index b928f3c..c63bc3f 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -3,12 +3,13 @@ #ifndef cmStringCommand_h #define cmStringCommand_h +#include +#include +#include + #include "cmCommand.h" -class cmMakefile; -namespace cmsys { -class RegularExpression; -} +class cmExecutionStatus; /** \class cmStringCommand * \brief Common string operations diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx index d502c5f..55761bf 100644 --- a/Source/cmSubdirCommand.cxx +++ b/Source/cmSubdirCommand.cxx @@ -2,8 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSubdirCommand.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmSubdirCommand bool cmSubdirCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSubdirCommand.h b/Source/cmSubdirCommand.h index 0778638..ce1f876 100644 --- a/Source/cmSubdirCommand.h +++ b/Source/cmSubdirCommand.h @@ -3,8 +3,14 @@ #ifndef cmSubdirCommand_h #define cmSubdirCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmSubdirCommand * \brief Specify a list of subdirectories to build. * diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 9626992..e173036 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -2,10 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetLinkLibrariesCommand.h" +#include +#include + #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; const char* cmTargetLinkLibrariesCommand::LinkLibraryTypeNames[3] = { "general", "debug", "optimized" diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h index 69bb6eb..762b48f 100644 --- a/Source/cmTargetLinkLibrariesCommand.h +++ b/Source/cmTargetLinkLibrariesCommand.h @@ -3,7 +3,15 @@ #ifndef cmTargetLinkLibrariesCommand_h #define cmTargetLinkLibrariesCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTargetLinkLibraryType.h" + +class cmExecutionStatus; +class cmTarget; /** \class cmTargetLinkLibrariesCommand * \brief Specify a list of libraries to link into executables. diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx index e2e02ad..7aba0f8 100644 --- a/Source/cmTargetPropCommandBase.cxx +++ b/Source/cmTargetPropCommandBase.cxx @@ -3,6 +3,7 @@ #include "cmTargetPropCommandBase.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" bool cmTargetPropCommandBase::HandleArguments( std::vector const& args, const std::string& prop, diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx index 933818e..b6bfbfa 100644 --- a/Source/cmTryCompileCommand.cxx +++ b/Source/cmTryCompileCommand.cxx @@ -2,6 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTryCompileCommand.h" +#include "cmMakefile.h" +#include "cmake.h" + +class cmExecutionStatus; + // cmTryCompileCommand bool cmTryCompileCommand::InitialPass(std::vector const& argv, cmExecutionStatus&) diff --git a/Source/cmTryCompileCommand.h b/Source/cmTryCompileCommand.h index ed74ae1..52a0345 100644 --- a/Source/cmTryCompileCommand.h +++ b/Source/cmTryCompileCommand.h @@ -3,8 +3,15 @@ #ifndef cmTryCompileCommand_h #define cmTryCompileCommand_h +#include +#include +#include + #include "cmCoreTryCompile.h" +class cmCommand; +class cmExecutionStatus; + /** \class cmTryCompileCommand * \brief Specifies where to install some files * diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index 6787c8e..9457d5b 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -2,11 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTryRunCommand.h" +#include +#include +#include + +#include "cmMakefile.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" -#include "cmTryCompileCommand.h" +#include "cmake.h" -#include +class cmExecutionStatus; // cmTryRunCommand bool cmTryRunCommand::InitialPass(std::vector const& argv, diff --git a/Source/cmTryRunCommand.h b/Source/cmTryRunCommand.h index 24447ed..8b44ac5 100644 --- a/Source/cmTryRunCommand.h +++ b/Source/cmTryRunCommand.h @@ -3,8 +3,15 @@ #ifndef cmTryRunCommand_h #define cmTryRunCommand_h +#include +#include +#include + #include "cmCoreTryCompile.h" +class cmCommand; +class cmExecutionStatus; + /** \class cmTryRunCommand * \brief Specifies where to install some files * diff --git a/Source/cmUnsetCommand.cxx b/Source/cmUnsetCommand.cxx index 2fea6192..31525ba 100644 --- a/Source/cmUnsetCommand.cxx +++ b/Source/cmUnsetCommand.cxx @@ -2,8 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUnsetCommand.h" +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmUnsetCommand bool cmUnsetCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmUnsetCommand.h b/Source/cmUnsetCommand.h index 37b9270..5b07202 100644 --- a/Source/cmUnsetCommand.h +++ b/Source/cmUnsetCommand.h @@ -3,8 +3,14 @@ #ifndef cmUnsetCommand_h #define cmUnsetCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmUnsetCommand * \brief Unset a CMAKE variable * diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index f98d512..3b78abe 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -7,7 +7,7 @@ #include "cmMakefile.h" #include "cmPolicies.h" #include "cmState.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" class cmExecutionStatus; diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index beb59bf..38ea637 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -3,7 +3,12 @@ #include "cmWhileCommand.h" #include "cmConditionEvaluator.h" +#include "cmExecutionStatus.h" +#include "cmExpandedCommandArgument.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" cmWhileFunctionBlocker::cmWhileFunctionBlocker(cmMakefile* mf) : Makefile(mf) diff --git a/Source/cmWhileCommand.h b/Source/cmWhileCommand.h index cc114ec..abd36b3 100644 --- a/Source/cmWhileCommand.h +++ b/Source/cmWhileCommand.h @@ -3,11 +3,17 @@ #ifndef cmWhileCommand_h #define cmWhileCommand_h -#include "cmCommand.h" +#include +#include +#include +#include "cmCommand.h" #include "cmFunctionBlocker.h" #include "cmListFileCache.h" +class cmExecutionStatus; +class cmMakefile; + class cmWhileFunctionBlocker : public cmFunctionBlocker { public: ----------------------------------------------------------------------- Summary of changes: Source/cmAddCustomCommandCommand.cxx | 12 +++++++-- Source/cmAddCustomCommandCommand.h | 6 +++++ Source/cmAddCustomTargetCommand.cxx | 10 +++++++ Source/cmAddCustomTargetCommand.h | 6 +++++ Source/cmAddDefinitionsCommand.cxx | 4 +++ Source/cmAddDefinitionsCommand.h | 6 +++++ Source/cmAddDependenciesCommand.cxx | 8 +++++- Source/cmAddDependenciesCommand.h | 6 +++++ Source/cmAddExecutableCommand.cxx | 10 +++++++ Source/cmAddExecutableCommand.h | 6 +++++ Source/cmAddLibraryCommand.cxx | 8 ++++++ Source/cmAddLibraryCommand.h | 6 +++++ Source/cmAddSubDirectoryCommand.cxx | 6 +++++ Source/cmAddSubDirectoryCommand.h | 6 +++++ Source/cmAddTestCommand.cxx | 6 ++++- Source/cmAddTestCommand.h | 6 +++++ Source/cmBreakCommand.cxx | 5 ++++ Source/cmBreakCommand.h | 6 +++++ Source/cmBuildCommand.cxx | 8 ++++++ Source/cmBuildCommand.h | 6 +++++ Source/cmBuildNameCommand.cxx | 2 +- Source/cmCMakeMinimumRequired.cxx | 1 + Source/cmCMakePolicyCommand.cxx | 9 ++++++- Source/cmCMakePolicyCommand.h | 6 +++++ Source/cmCommand.cxx | 6 +++++ Source/cmCommand.h | 11 ++++++-- Source/cmCommands.cxx | 12 --------- Source/cmConditionEvaluator.cxx | 1 + Source/cmConditionEvaluator.h | 2 ++ Source/cmConfigureFileCommand.cxx | 6 ++++- Source/cmConfigureFileCommand.h | 7 +++++ Source/cmContinueCommand.cxx | 2 ++ Source/cmContinueCommand.h | 6 +++++ Source/cmCoreTryCompile.cxx | 1 + Source/cmCoreTryCompile.h | 1 + Source/cmCreateTestSourceList.cxx | 1 + Source/cmDefinePropertyCommand.cxx | 8 ++++-- Source/cmDefinePropertyCommand.h | 6 +++++ Source/cmElseCommand.cxx | 2 ++ Source/cmElseCommand.h | 8 +++++- Source/cmEnableLanguageCommand.cxx | 4 +++ Source/cmEnableLanguageCommand.h | 6 +++++ Source/cmEnableTestingCommand.cxx | 4 +++ Source/cmEnableTestingCommand.h | 6 +++++ Source/cmEndForEachCommand.cxx | 3 +++ Source/cmEndForEachCommand.h | 7 +++++ Source/cmEndFunctionCommand.cxx | 3 +++ Source/cmEndFunctionCommand.h | 7 +++++ Source/cmEndIfCommand.cxx | 5 ++++ Source/cmEndIfCommand.h | 8 +++++- Source/cmEndMacroCommand.cxx | 3 +++ Source/cmEndMacroCommand.h | 7 +++++ Source/cmEndWhileCommand.cxx | 3 +++ Source/cmEndWhileCommand.h | 7 +++++ Source/cmExecProgramCommand.cxx | 6 ++++- Source/cmExecProgramCommand.h | 6 +++++ Source/cmExecuteProcessCommand.cxx | 10 ++++--- Source/cmExecuteProcessCommand.h | 6 +++++ Source/cmExportCommand.cxx | 2 +- Source/cmExportLibraryDependenciesCommand.cxx | 7 +++-- Source/cmFileCommand.cxx | 4 +-- Source/cmFileCommand.h | 6 ++++- Source/cmFindBase.cxx | 1 + Source/cmFindCommon.cxx | 1 + Source/cmFindFileCommand.cxx | 2 -- Source/cmFindFileCommand.h | 5 ++++ Source/cmFindLibraryCommand.cxx | 11 ++++++-- Source/cmFindLibraryCommand.h | 7 +++++ Source/cmFindPackageCommand.cxx | 35 +++++++++++++++---------- Source/cmFindPackageCommand.h | 11 +++++++- Source/cmFindPathCommand.cxx | 6 ++++- Source/cmFindPathCommand.h | 7 +++++ Source/cmFindProgramCommand.cxx | 4 ++- Source/cmFindProgramCommand.h | 7 +++++ Source/cmForEachCommand.cxx | 10 +++++-- Source/cmForEachCommand.h | 8 +++++- Source/cmFunctionCommand.cxx | 8 +++++- Source/cmFunctionCommand.h | 9 ++++++- Source/cmGetCMakePropertyCommand.cxx | 8 ++++-- Source/cmGetCMakePropertyCommand.h | 6 +++++ Source/cmGetDirectoryPropertyCommand.cxx | 4 +++ Source/cmGetDirectoryPropertyCommand.h | 6 +++++ Source/cmGetFilenameComponentCommand.cxx | 4 +++ Source/cmGetFilenameComponentCommand.h | 6 +++++ Source/cmGetPropertyCommand.cxx | 13 ++++++++- Source/cmGetPropertyCommand.h | 6 +++++ Source/cmGetSourceFilePropertyCommand.cxx | 3 +++ Source/cmGetSourceFilePropertyCommand.h | 6 +++++ Source/cmGetTargetPropertyCommand.cxx | 10 +++++++ Source/cmGetTargetPropertyCommand.h | 6 +++++ Source/cmGetTestPropertyCommand.cxx | 4 ++- Source/cmGetTestPropertyCommand.h | 6 +++++ Source/cmIfCommand.cxx | 13 +++++---- Source/cmIfCommand.h | 10 ++++++- Source/cmIncludeCommand.cxx | 7 +++++ Source/cmIncludeCommand.h | 6 +++++ Source/cmIncludeDirectoryCommand.cxx | 6 +++++ Source/cmIncludeDirectoryCommand.h | 6 +++++ Source/cmIncludeExternalMSProjectCommand.cxx | 3 +++ Source/cmIncludeRegularExpressionCommand.cxx | 4 +++ Source/cmIncludeRegularExpressionCommand.h | 6 +++++ Source/cmInstallCommand.cxx | 17 +++++++++++- Source/cmInstallCommand.h | 6 +++++ Source/cmInstallFilesCommand.cxx | 5 ++++ Source/cmInstallFilesCommand.h | 6 +++++ Source/cmInstallTargetsCommand.cxx | 7 +++++ Source/cmInstallTargetsCommand.h | 6 +++++ Source/cmLinkDirectoriesCommand.cxx | 7 +++++ Source/cmLinkDirectoriesCommand.h | 6 +++++ Source/cmListCommand.cxx | 19 +++++++++----- Source/cmListCommand.h | 6 +++++ Source/cmLoadCacheCommand.cxx | 2 +- Source/cmMacroCommand.cxx | 8 +++++- Source/cmMacroCommand.h | 9 ++++++- Source/cmMakeDirectoryCommand.cxx | 3 +++ Source/cmMakeDirectoryCommand.h | 6 +++++ Source/cmMarkAsAdvancedCommand.cxx | 5 ++++ Source/cmMarkAsAdvancedCommand.h | 6 +++++ Source/cmMathCommand.cxx | 5 ++++ Source/cmMathCommand.h | 6 +++++ Source/cmMessageCommand.cxx | 7 +++++ Source/cmMessageCommand.h | 6 +++++ Source/cmOptionCommand.cxx | 7 +++++ Source/cmOptionCommand.h | 6 +++++ Source/cmOutputRequiredFilesCommand.cxx | 3 +++ Source/cmParseArgumentsCommand.cxx | 11 ++++++++ Source/cmParseArgumentsCommand.h | 6 +++++ Source/cmProjectCommand.cxx | 10 +++++++ Source/cmProjectCommand.h | 6 +++++ Source/cmReturnCommand.h | 6 +++++ Source/cmSearchPath.cxx | 3 +++ Source/cmSeparateArgumentsCommand.cxx | 6 +++++ Source/cmSeparateArgumentsCommand.h | 6 +++++ Source/cmSetCommand.cxx | 8 ++++++ Source/cmSetCommand.h | 6 +++++ Source/cmSetDirectoryPropertiesCommand.cxx | 4 ++- Source/cmSetDirectoryPropertiesCommand.h | 7 +++++ Source/cmSetPropertyCommand.cxx | 13 ++++++--- Source/cmSetPropertyCommand.h | 11 ++++++++ Source/cmSetSourceFilesPropertiesCommand.cxx | 3 +++ Source/cmSetSourceFilesPropertiesCommand.h | 7 +++++ Source/cmSetTargetPropertiesCommand.cxx | 7 ++++- Source/cmSetTargetPropertiesCommand.h | 7 +++++ Source/cmSetTestsPropertiesCommand.cxx | 6 ++++- Source/cmSetTestsPropertiesCommand.h | 7 +++++ Source/cmSiteNameCommand.cxx | 6 ++++- Source/cmSiteNameCommand.h | 6 +++++ Source/cmStringCommand.cxx | 23 +++++++++------- Source/cmStringCommand.h | 9 ++++--- Source/cmSubdirCommand.cxx | 3 +++ Source/cmSubdirCommand.h | 6 +++++ Source/cmTargetLinkLibrariesCommand.cxx | 10 +++++++ Source/cmTargetLinkLibrariesCommand.h | 8 ++++++ Source/cmTargetPropCommandBase.cxx | 1 + Source/cmTryCompileCommand.cxx | 5 ++++ Source/cmTryCompileCommand.h | 7 +++++ Source/cmTryRunCommand.cxx | 10 +++++-- Source/cmTryRunCommand.h | 7 +++++ Source/cmUnsetCommand.cxx | 6 +++++ Source/cmUnsetCommand.h | 6 +++++ Source/cmUtilitySourceCommand.cxx | 2 +- Source/cmWhileCommand.cxx | 5 ++++ Source/cmWhileCommand.h | 8 +++++- 163 files changed, 961 insertions(+), 107 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Oct 26 00:01:06 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 26 Oct 2016 00:01:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-347-g9d203c0 Message-ID: <20161026040106.DA1E9F7775@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 9d203c0051bbec48dfbee90940e6faff87a2bdeb (commit) from 2a567c68ce6605071f3e21638560493b71ed2841 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d203c0051bbec48dfbee90940e6faff87a2bdeb commit 9d203c0051bbec48dfbee90940e6faff87a2bdeb Author: Kitware Robot AuthorDate: Wed Oct 26 00:01:03 2016 -0400 Commit: Kitware Robot CommitDate: Wed Oct 26 00:01:03 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c656fba..ea6bdad 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 7) -set(CMake_VERSION_PATCH 20161025) +set(CMake_VERSION_PATCH 20161026) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Wed Oct 26 03:03:25 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Wed, 26 Oct 2016 03:03:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-762-g1563b93 Message-ID: <20161026070325.B33E4F779F@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 1563b936fd11bb6512d7365a070a6185ffc9fbaf (commit) via 85f893c0535538991218b8caaafe3ff871017b29 (commit) via bf111520211ec74ab847b7fa11637b702af2e8ca (commit) from 5521217d66f57464ac4ecf715527682f5148f356 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1563b936fd11bb6512d7365a070a6185ffc9fbaf commit 1563b936fd11bb6512d7365a070a6185ffc9fbaf Merge: 5521217 85f893c Author: Daniel Pfeifer AuthorDate: Wed Oct 26 03:03:24 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 26 03:03:24 2016 -0400 Merge topic 'include-what-you-use' into next 85f893c0 fixup! Include necessary headers in commands bf111520 fixup! Include necessary headers in commands https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85f893c0535538991218b8caaafe3ff871017b29 commit 85f893c0535538991218b8caaafe3ff871017b29 Author: Daniel Pfeifer AuthorDate: Wed Oct 26 09:01:56 2016 +0200 Commit: Daniel Pfeifer CommitDate: Wed Oct 26 09:01:56 2016 +0200 fixup! Include necessary headers in commands diff --git a/Source/cmEndWhileCommand.cxx b/Source/cmEndWhileCommand.cxx index f24c280..5623f33 100644 --- a/Source/cmEndWhileCommand.cxx +++ b/Source/cmEndWhileCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndWhileCommand.h" -#include "cmListFileArgument.h" +#include "cmListFileCache.h" class cmExecutionStatus; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf111520211ec74ab847b7fa11637b702af2e8ca commit bf111520211ec74ab847b7fa11637b702af2e8ca Author: Daniel Pfeifer AuthorDate: Wed Oct 26 08:58:37 2016 +0200 Commit: Daniel Pfeifer CommitDate: Wed Oct 26 08:58:37 2016 +0200 fixup! Include necessary headers in commands diff --git a/Source/cmEndWhileCommand.cxx b/Source/cmEndWhileCommand.cxx index 48f09f1..f24c280 100644 --- a/Source/cmEndWhileCommand.cxx +++ b/Source/cmEndWhileCommand.cxx @@ -2,8 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndWhileCommand.h" +#include "cmListFileArgument.h" + class cmExecutionStatus; -struct cmListFileArgument; bool cmEndWhileCommand::InvokeInitialPass( std::vector const& args, cmExecutionStatus&) ----------------------------------------------------------------------- Summary of changes: Source/cmEndWhileCommand.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 26 09:22:05 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 26 Oct 2016 09:22:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-764-g6738d19 Message-ID: <20161026132205.2F66CF75B7@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 6738d19b2c8a64709fac9544f9df28be6531ac88 (commit) via 554b4f9010add22ef83bb22858f9fdcb52afbc7e (commit) from 1563b936fd11bb6512d7365a070a6185ffc9fbaf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6738d19b2c8a64709fac9544f9df28be6531ac88 commit 6738d19b2c8a64709fac9544f9df28be6531ac88 Merge: 1563b93 554b4f9 Author: Brad King AuthorDate: Wed Oct 26 09:22:03 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 26 09:22:03 2016 -0400 Merge topic 'intel-17-features' into next 554b4f90 Features: Record features for Intel C++ 17 on UNIX https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=554b4f9010add22ef83bb22858f9fdcb52afbc7e commit 554b4f9010add22ef83bb22858f9fdcb52afbc7e Author: Brad King AuthorDate: Wed Oct 26 09:10:24 2016 -0400 Commit: Brad King CommitDate: Wed Oct 26 09:18:38 2016 -0400 Features: Record features for Intel C++ 17 on UNIX Issue: #16384 diff --git a/Modules/Compiler/Intel-CXX-FeatureTests.cmake b/Modules/Compiler/Intel-CXX-FeatureTests.cmake index e111c07..57a05c8 100644 --- a/Modules/Compiler/Intel-CXX-FeatureTests.cmake +++ b/Modules/Compiler/Intel-CXX-FeatureTests.cmake @@ -1,6 +1,7 @@ # References: # - https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler # - https://software.intel.com/en-us/articles/c14-features-supported-by-intel-c-compiler +# - http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0096r3.html # FIXME: Intel C++ feature detection works only when simulating the GNU compiler. # When simulating MSVC, Intel always sets __cplusplus to 199711L. @@ -8,9 +9,8 @@ if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") return() endif() -# these are not implemented in any version at time of writing -#set(_cmake_feature_test_cxx_variable_templates "${Intel15_CXX14}") -#set(_cmake_feature_test_cxx_relaxed_constexpr "${Intel15_CXX14}") +set(_cmake_feature_test_cxx_variable_templates "__cpp_variable_templates >= 201304") +set(_cmake_feature_test_cxx_relaxed_constexpr "__cpp_constexpr >= 201304") set(_cmake_oldestSupported "__INTEL_COMPILER >= 1210") set(DETECT_CXX11 "((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__))") ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Intel-CXX-FeatureTests.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 26 09:28:15 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 26 Oct 2016 09:28:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-349-g1c8b99c Message-ID: <20161026132815.66544F779F@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 1c8b99ce0b8e3a7a78b029a0cf18dc7256be6aee (commit) via 68e7250a9facbe7b82cff17af3bf2a831e481f3c (commit) from 9d203c0051bbec48dfbee90940e6faff87a2bdeb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c8b99ce0b8e3a7a78b029a0cf18dc7256be6aee commit 1c8b99ce0b8e3a7a78b029a0cf18dc7256be6aee Merge: 9d203c0 68e7250 Author: Brad King AuthorDate: Wed Oct 26 09:28:13 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 26 09:28:13 2016 -0400 Merge topic 'fix-right-angle-bracket-feature-test' 68e7250a Features: Fix cxx_right_angle_brackets compiler feature test ----------------------------------------------------------------------- Summary of changes: Tests/CompileFeatures/cxx_right_angle_brackets.cpp | 4 +++- Utilities/Scripts/clang-format.bash | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 26 09:28:18 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 26 Oct 2016 09:28:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-352-gfa15858 Message-ID: <20161026132818.9AF5BF77B6@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 fa15858a7eee3a6feb84bd39b01478c2116ab21e (commit) via 51cfba8c219a923c924349cd255a523eb797e104 (commit) via 53862f04a0002894c0ef5aeb23d52495e5abe60d (commit) from 1c8b99ce0b8e3a7a78b029a0cf18dc7256be6aee (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa15858a7eee3a6feb84bd39b01478c2116ab21e commit fa15858a7eee3a6feb84bd39b01478c2116ab21e Merge: 1c8b99c 51cfba8 Author: Brad King AuthorDate: Wed Oct 26 09:28:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 26 09:28:16 2016 -0400 Merge topic 'update-kwsys' 51cfba8c Merge branch 'upstream-KWSys' into update-kwsys 53862f04 KWSys 2016-10-23 (b630d2f5) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/ConsoleBuf.hxx.in | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 26 09:28:22 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 26 Oct 2016 09:28:22 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-356-gfdd0ce9 Message-ID: <20161026132822.4939BF77B6@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 fdd0ce915c0ab7e5a9f3b95612b35d845a7a5213 (commit) via 69fc7bf87db33d88af02602fba811b5c5e740a70 (commit) via e2ed9a70929092ab7b32e036886859e53fbff897 (commit) via 584ab5285b51945e0dd523caf77342985ac97ce4 (commit) from fa15858a7eee3a6feb84bd39b01478c2116ab21e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fdd0ce915c0ab7e5a9f3b95612b35d845a7a5213 commit fdd0ce915c0ab7e5a9f3b95612b35d845a7a5213 Merge: fa15858 69fc7bf Author: Brad King AuthorDate: Wed Oct 26 09:28:19 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 26 09:28:19 2016 -0400 Merge topic 'vs-toolset-options' 69fc7bf8 VS: Choose flag map based on the toolset name e2ed9a70 VS: Move toolset flag table lookup to global generator 584ab528 VS: Add internal API to get platform toolset as string ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 + Source/cmGlobalVisualStudio10Generator.cxx | 63 ++++++++++++- Source/cmGlobalVisualStudio10Generator.h | 14 +++ Source/cmGlobalVisualStudio11Generator.cxx | 10 ++ Source/cmGlobalVisualStudio12Generator.cxx | 10 ++ Source/cmGlobalVisualStudio14Generator.cxx | 10 ++ Source/cmGlobalVisualStudio15Generator.cxx | 2 + Source/cmVisualStudio10TargetGenerator.cxx | 141 ++++------------------------ Source/cmVisualStudio10TargetGenerator.h | 6 -- Source/cmVisualStudio10ToolsetOptions.cxx | 134 ++++++++++++++++++++++++++ Source/cmVisualStudio10ToolsetOptions.h | 33 +++++++ 11 files changed, 293 insertions(+), 132 deletions(-) create mode 100644 Source/cmVisualStudio10ToolsetOptions.cxx create mode 100644 Source/cmVisualStudio10ToolsetOptions.h hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 26 09:28:37 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 26 Oct 2016 09:28:37 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-769-g0ab2c47 Message-ID: <20161026132837.145F7F77B7@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 0ab2c473c7c04905a0a791e0c2897ed74c51eb4b (commit) via fdd0ce915c0ab7e5a9f3b95612b35d845a7a5213 (commit) via fa15858a7eee3a6feb84bd39b01478c2116ab21e (commit) via 1c8b99ce0b8e3a7a78b029a0cf18dc7256be6aee (commit) via 9d203c0051bbec48dfbee90940e6faff87a2bdeb (commit) from 6738d19b2c8a64709fac9544f9df28be6531ac88 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ab2c473c7c04905a0a791e0c2897ed74c51eb4b commit 0ab2c473c7c04905a0a791e0c2897ed74c51eb4b Merge: 6738d19 fdd0ce9 Author: Brad King AuthorDate: Wed Oct 26 09:28:28 2016 -0400 Commit: Brad King CommitDate: Wed Oct 26 09:28:28 2016 -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 Wed Oct 26 11:21:35 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 26 Oct 2016 11:21:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-771-ga3dab54 Message-ID: <20161026152135.EB046F78C0@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 a3dab54134c6bd015edcc55d88a74204836649ca (commit) via 335a29cb07a8d014a9ed4d4dbf25e49da3a78b33 (commit) from 0ab2c473c7c04905a0a791e0c2897ed74c51eb4b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3dab54134c6bd015edcc55d88a74204836649ca commit a3dab54134c6bd015edcc55d88a74204836649ca Merge: 0ab2c47 335a29c Author: Brad King AuthorDate: Wed Oct 26 11:21:35 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 26 11:21:35 2016 -0400 Merge topic 'consoleBuf' into next 335a29cb Enable Unicode output to Windows consoles https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=335a29cb07a8d014a9ed4d4dbf25e49da3a78b33 commit 335a29cb07a8d014a9ed4d4dbf25e49da3a78b33 Author: D?vis Mos?ns AuthorDate: Sat Oct 1 03:11:35 2016 +0300 Commit: D?vis Mos?ns CommitDate: Wed Oct 26 17:02:37 2016 +0300 Enable Unicode output to Windows consoles Use KWSys ConsoleBuf to replace the `streambuf` on `std::cout` and `std::cerr` so that process output can be encoded correctly for display in a Windows console. diff --git a/CMakeLists.txt b/CMakeLists.txt index b8a635f..1bc4b4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,6 +260,7 @@ macro (CMAKE_BUILD_UTILITIES) set(KWSYS_USE_MD5 1) set(KWSYS_USE_Process 1) set(KWSYS_USE_CommandLineArguments 1) + set(KWSYS_USE_ConsoleBuf 1) set(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source) set(KWSYS_INSTALL_DOC_DIR "${CMAKE_DOC_DIR}") add_subdirectory(Source/kwsys) diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index b06bd38..06472c6 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -17,6 +17,9 @@ #include #include +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include +#endif #include #include #include @@ -84,6 +87,11 @@ int cpackDefinitionArgument(const char* argument, const char* cValue, // this is CPack. int main(int argc, char const* const* argv) { +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) + // Replace streambuf so we can output Unicode to console + cmsys::ConsoleBuf::Manager consoleOut(std::cout); + cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); +#endif cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = args.argc(); diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index d1159c3..44af966 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -18,6 +18,9 @@ #include #include +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include +#endif #include #include #include @@ -153,6 +156,11 @@ static void cmakemainProgressCallback(const char* m, float prog, int main(int ac, char const* const* av) { +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) + // Replace streambuf so we can output Unicode to console + cmsys::ConsoleBuf::Manager consoleOut(std::cout); + cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); +#endif cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(ac, av); ac = args.argc(); diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 8ab17b9..1acd240 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -10,6 +10,9 @@ #include "cmake.h" #include +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include +#endif #include #include #include @@ -110,6 +113,11 @@ static const char* cmDocumentationOptions[][2] = { // this is a test driver program for cmCTest. int main(int argc, char const* const* argv) { +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) + // Replace streambuf so we can output Unicode to console + cmsys::ConsoleBuf::Manager consoleOut(std::cout); + cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); +#endif cmsys::Encoding::CommandLineArguments encoding_args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = encoding_args.argc(); ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 1 + Source/CPack/cpack.cxx | 8 ++++++++ Source/cmakemain.cxx | 8 ++++++++ Source/ctest.cxx | 8 ++++++++ 4 files changed, 25 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Oct 26 15:04:24 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 26 Oct 2016 15:04:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-773-gafb0f66 Message-ID: <20161026190424.CD0C7F7581@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 afb0f66f0f47813de8c9a77659326a8923a6e1c2 (commit) via 05e05cd2aae9d00d2ed89a4f0cb9ef2f2976ae80 (commit) from a3dab54134c6bd015edcc55d88a74204836649ca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=afb0f66f0f47813de8c9a77659326a8923a6e1c2 commit afb0f66f0f47813de8c9a77659326a8923a6e1c2 Merge: a3dab54 05e05cd Author: Brad King AuthorDate: Wed Oct 26 15:04:23 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Oct 26 15:04:23 2016 -0400 Merge topic 'intel-compiler-windows-c++98' into next 05e05cd2 Intel: Fix compiler C++98 standard flag on Windows https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05e05cd2aae9d00d2ed89a4f0cb9ef2f2976ae80 commit 05e05cd2aae9d00d2ed89a4f0cb9ef2f2976ae80 Author: Brad King AuthorDate: Wed Oct 26 14:56:57 2016 -0400 Commit: Brad King CommitDate: Wed Oct 26 15:03:53 2016 -0400 Intel: Fix compiler C++98 standard flag on Windows The Intel C++ Compiler for Windows does not support the `-Qstd=c++98` flag but does support `-Qstd=gnu++98`. Issue: #16384 diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 73dd7fa..29e02d3 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -34,7 +34,11 @@ elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) endif() if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) - set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98") + if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=gnu++98") + else() + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98") + endif() set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "${_std}=${_ext}98") endif() ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Intel-CXX.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Oct 27 00:01:09 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 27 Oct 2016 00:01:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-357-g5448f00 Message-ID: <20161027040109.9FF76F7777@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 5448f0068cc4e228a7481905412fc956e239a827 (commit) from fdd0ce915c0ab7e5a9f3b95612b35d845a7a5213 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5448f0068cc4e228a7481905412fc956e239a827 commit 5448f0068cc4e228a7481905412fc956e239a827 Author: Kitware Robot AuthorDate: Thu Oct 27 00:01:05 2016 -0400 Commit: Kitware Robot CommitDate: Thu Oct 27 00:01:05 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ea6bdad..195acba 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 7) -set(CMake_VERSION_PATCH 20161026) +set(CMake_VERSION_PATCH 20161027) #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 Thu Oct 27 09:55:19 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 27 Oct 2016 09:55:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-775-g246b82b Message-ID: <20161027135519.574F8F76F0@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 246b82be53e8e68e92c06ddfe261cde92b1d04fa (commit) via e81c323da9c020c91c967184ecf98f806eb95867 (commit) from afb0f66f0f47813de8c9a77659326a8923a6e1c2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=246b82be53e8e68e92c06ddfe261cde92b1d04fa commit 246b82be53e8e68e92c06ddfe261cde92b1d04fa Merge: afb0f66 e81c323 Author: Brad King AuthorDate: Thu Oct 27 09:55:15 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 27 09:55:15 2016 -0400 Merge topic 'include-what-you-use' into next e81c323d Include necessary headers in commands https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e81c323da9c020c91c967184ecf98f806eb95867 commit e81c323da9c020c91c967184ecf98f806eb95867 Author: Daniel Pfeifer AuthorDate: Tue Oct 25 20:35:04 2016 +0200 Commit: Daniel Pfeifer CommitDate: Wed Oct 26 09:02:44 2016 +0200 Include necessary headers in commands diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 1ab4ef6..620de31 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -2,11 +2,19 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddCustomCommandCommand.h" -#include "cmTarget.h" +#include +#include "cmCustomCommand.h" +#include "cmCustomCommandLines.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmSourceFile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" -#include "cmGlobalGenerator.h" +class cmExecutionStatus; // cmAddCustomCommandCommand bool cmAddCustomCommandCommand::InitialPass( diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h index 643163c..ea92163 100644 --- a/Source/cmAddCustomCommandCommand.h +++ b/Source/cmAddCustomCommandCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddCustomCommandCommand_h #define cmAddCustomCommandCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddCustomCommandCommand * \brief cmAddCustomCommandCommand defines a new command (rule) that can * be executed within the build process diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index 9c41dac..4e656aa 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -2,8 +2,18 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddCustomTargetCommand.h" +#include + +#include "cmCustomCommandLines.h" #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; // cmAddCustomTargetCommand bool cmAddCustomTargetCommand::InitialPass( diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h index 2ad244c..b679247 100644 --- a/Source/cmAddCustomTargetCommand.h +++ b/Source/cmAddCustomTargetCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddCustomTargetCommand_h #define cmAddCustomTargetCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddCustomTargetCommand * \brief Command that adds a target to the build system. * diff --git a/Source/cmAddDefinitionsCommand.cxx b/Source/cmAddDefinitionsCommand.cxx index 8d82e71..9e0607c 100644 --- a/Source/cmAddDefinitionsCommand.cxx +++ b/Source/cmAddDefinitionsCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddDefinitionsCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // cmAddDefinitionsCommand bool cmAddDefinitionsCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmAddDefinitionsCommand.h b/Source/cmAddDefinitionsCommand.h index c6b5699..735f8cc 100644 --- a/Source/cmAddDefinitionsCommand.h +++ b/Source/cmAddDefinitionsCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddDefinitionsCommand_h #define cmAddDefinitionsCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddDefinitionsCommand * \brief Specify a list of compiler defines * diff --git a/Source/cmAddDependenciesCommand.cxx b/Source/cmAddDependenciesCommand.cxx index 0fa8943..e49d5d5 100644 --- a/Source/cmAddDependenciesCommand.cxx +++ b/Source/cmAddDependenciesCommand.cxx @@ -2,7 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddDependenciesCommand.h" -#include "cmGlobalGenerator.h" +#include + +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; // cmDependenciesCommand bool cmAddDependenciesCommand::InitialPass( diff --git a/Source/cmAddDependenciesCommand.h b/Source/cmAddDependenciesCommand.h index 2c7aa02..8be546c 100644 --- a/Source/cmAddDependenciesCommand.h +++ b/Source/cmAddDependenciesCommand.h @@ -3,8 +3,14 @@ #ifndef cmDependenciessCommand_h #define cmDependenciessCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddDependenciesCommand * \brief Add a dependency to a target * diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index 3d0729b..2a0bb15 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -2,7 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddExecutableCommand.h" +#include + +#include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmStateTypes.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; // cmExecutableCommand bool cmAddExecutableCommand::InitialPass(std::vector const& args, diff --git a/Source/cmAddExecutableCommand.h b/Source/cmAddExecutableCommand.h index 03faaf1..62583d8 100644 --- a/Source/cmAddExecutableCommand.h +++ b/Source/cmAddExecutableCommand.h @@ -3,8 +3,14 @@ #ifndef cmExecutablesCommand_h #define cmExecutablesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmExecutablesCommand * \brief Defines a list of executables to build. * diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 56cf91a..5c9c744 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -2,12 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddLibraryCommand.h" +#include + +#include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cmake.h" +class cmExecutionStatus; + // cmLibraryCommand bool cmAddLibraryCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmAddLibraryCommand.h b/Source/cmAddLibraryCommand.h index d8eba8d..c23b299 100644 --- a/Source/cmAddLibraryCommand.h +++ b/Source/cmAddLibraryCommand.h @@ -3,8 +3,14 @@ #ifndef cmLibrarysCommand_h #define cmLibrarysCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmLibrarysCommand * \brief Defines a list of executables to build. * diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx index 0ebe35d..34ec0e3 100644 --- a/Source/cmAddSubDirectoryCommand.cxx +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -2,8 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddSubDirectoryCommand.h" +#include +#include + +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmAddSubDirectoryCommand bool cmAddSubDirectoryCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmAddSubDirectoryCommand.h b/Source/cmAddSubDirectoryCommand.h index f300b2e..85305e6 100644 --- a/Source/cmAddSubDirectoryCommand.h +++ b/Source/cmAddSubDirectoryCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddSubDirectoryCommand_h #define cmAddSubDirectoryCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddSubDirectoryCommand * \brief Specify a subdirectory to build * diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx index 11342ee..3a3afdb 100644 --- a/Source/cmAddTestCommand.cxx +++ b/Source/cmAddTestCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddTestCommand.h" -#include "cmTestGenerator.h" +#include +#include "cmMakefile.h" #include "cmTest.h" +#include "cmTestGenerator.h" + +class cmExecutionStatus; // cmExecutableCommand bool cmAddTestCommand::InitialPass(std::vector const& args, diff --git a/Source/cmAddTestCommand.h b/Source/cmAddTestCommand.h index 7bbf7cf..07eff68 100644 --- a/Source/cmAddTestCommand.h +++ b/Source/cmAddTestCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddTestCommand_h #define cmAddTestCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddTestCommand * \brief Add a test to the lists of tests to run. * diff --git a/Source/cmBreakCommand.cxx b/Source/cmBreakCommand.cxx index a5b6e84..9bb6137 100644 --- a/Source/cmBreakCommand.cxx +++ b/Source/cmBreakCommand.cxx @@ -2,7 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmBreakCommand.h" +#include + #include "cmExecutionStatus.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmake.h" // cmBreakCommand bool cmBreakCommand::InitialPass(std::vector const& args, diff --git a/Source/cmBreakCommand.h b/Source/cmBreakCommand.h index f1ade9a..5113e18 100644 --- a/Source/cmBreakCommand.h +++ b/Source/cmBreakCommand.h @@ -3,8 +3,14 @@ #ifndef cmBreakCommand_h #define cmBreakCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmBreakCommand * \brief Break from an enclosing foreach or while loop * diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx index 8aa4102..d03b8c4 100644 --- a/Source/cmBuildCommand.cxx +++ b/Source/cmBuildCommand.cxx @@ -2,7 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmBuildCommand.h" +#include + #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmStateTypes.h" +#include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; bool cmBuildCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmBuildCommand.h b/Source/cmBuildCommand.h index 0dce4e4..62f1fd3 100644 --- a/Source/cmBuildCommand.h +++ b/Source/cmBuildCommand.h @@ -3,8 +3,14 @@ #ifndef cmBuildCommand_h #define cmBuildCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmBuildCommand * \brief build_command command * diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx index 3257c93..1e1cd21 100644 --- a/Source/cmBuildNameCommand.cxx +++ b/Source/cmBuildNameCommand.cxx @@ -7,7 +7,7 @@ #include "cmMakefile.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" class cmExecutionStatus; diff --git a/Source/cmCMakeMinimumRequired.cxx b/Source/cmCMakeMinimumRequired.cxx index d71172c..655c42a 100644 --- a/Source/cmCMakeMinimumRequired.cxx +++ b/Source/cmCMakeMinimumRequired.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakeMinimumRequired.h" +#include "cmMakefile.h" #include "cmSystemTools.h" #include "cmVersion.h" diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index 67581b6..3ccc815 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -2,8 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakePolicyCommand.h" +#include + +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" -#include "cmVersion.h" +#include "cmStateTypes.h" +#include "cmake.h" + +class cmExecutionStatus; // cmCMakePolicyCommand bool cmCMakePolicyCommand::InitialPass(std::vector const& args, diff --git a/Source/cmCMakePolicyCommand.h b/Source/cmCMakePolicyCommand.h index 68d9f7b..409fc59 100644 --- a/Source/cmCMakePolicyCommand.h +++ b/Source/cmCMakePolicyCommand.h @@ -3,8 +3,14 @@ #ifndef cmCMakePolicyCommand_h #define cmCMakePolicyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmCMakePolicyCommand * \brief Set how CMake should handle policies * diff --git a/Source/cmCommand.cxx b/Source/cmCommand.cxx index 3c839de..181b412 100644 --- a/Source/cmCommand.cxx +++ b/Source/cmCommand.cxx @@ -2,6 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCommand.h" +#include "cmMakefile.h" +#include "cmake.h" + +class cmExecutionStatus; +struct cmListFileArgument; + bool cmCommand::InvokeInitialPass(const std::vector& args, cmExecutionStatus& status) { diff --git a/Source/cmCommand.h b/Source/cmCommand.h index dcfe8da..d9fd5a2 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -3,9 +3,16 @@ #ifndef cmCommand_h #define cmCommand_h +#include +#include +#include + #include "cmCommandArgumentsHelper.h" -#include "cmListFileCache.h" -#include "cmMakefile.h" +#include "cmPolicies.h" + +class cmExecutionStatus; +class cmMakefile; +struct cmListFileArgument; /** \class cmCommand * \brief Superclass for all commands in CMake. diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx index 0697d4b..103e72c 100644 --- a/Source/cmCommands.cxx +++ b/Source/cmCommands.cxx @@ -14,11 +14,8 @@ #include "cmBuildCommand.h" #include "cmCMakeMinimumRequired.h" #include "cmCMakePolicyCommand.h" -#include "cmCommandArgumentsHelper.h" -#include "cmConditionEvaluator.h" #include "cmConfigureFileCommand.h" #include "cmContinueCommand.h" -#include "cmCoreTryCompile.h" #include "cmCreateTestSourceList.h" #include "cmDefinePropertyCommand.h" #include "cmElseCommand.h" @@ -31,10 +28,7 @@ #include "cmEndWhileCommand.h" #include "cmExecProgramCommand.h" #include "cmExecuteProcessCommand.h" -#include "cmExpandedCommandArgument.h" #include "cmFileCommand.h" -#include "cmFindBase.h" -#include "cmFindCommon.h" #include "cmFindFileCommand.h" #include "cmFindLibraryCommand.h" #include "cmFindPackageCommand.h" @@ -49,13 +43,11 @@ #include "cmGetSourceFilePropertyCommand.h" #include "cmGetTargetPropertyCommand.h" #include "cmGetTestPropertyCommand.h" -#include "cmHexFileConverter.h" #include "cmIfCommand.h" #include "cmIncludeCommand.h" #include "cmIncludeDirectoryCommand.h" #include "cmIncludeRegularExpressionCommand.h" #include "cmInstallCommand.h" -#include "cmInstallCommandArguments.h" #include "cmInstallFilesCommand.h" #include "cmInstallTargetsCommand.h" #include "cmLinkDirectoriesCommand.h" @@ -67,10 +59,8 @@ #include "cmMessageCommand.h" #include "cmOptionCommand.h" #include "cmParseArgumentsCommand.h" -#include "cmPathLabel.h" #include "cmProjectCommand.h" #include "cmReturnCommand.h" -#include "cmSearchPath.h" #include "cmSeparateArgumentsCommand.h" #include "cmSetCommand.h" #include "cmSetDirectoryPropertiesCommand.h" @@ -82,7 +72,6 @@ #include "cmStringCommand.h" #include "cmSubdirCommand.h" #include "cmTargetLinkLibrariesCommand.h" -#include "cmTimestamp.h" #include "cmTryCompileCommand.h" #include "cmTryRunCommand.h" #include "cmUnsetCommand.h" @@ -113,7 +102,6 @@ #include "cmTargetCompileFeaturesCommand.h" #include "cmTargetCompileOptionsCommand.h" #include "cmTargetIncludeDirectoriesCommand.h" -#include "cmTargetPropCommandBase.h" #include "cmTargetSourcesCommand.h" #include "cmUseMangledMesaCommand.h" #include "cmUtilitySourceCommand.h" diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 7d98e73..71d6c4e 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -3,6 +3,7 @@ #include "cmConditionEvaluator.h" #include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" diff --git a/Source/cmConditionEvaluator.h b/Source/cmConditionEvaluator.h index 306bee4..3c9d2cd 100644 --- a/Source/cmConditionEvaluator.h +++ b/Source/cmConditionEvaluator.h @@ -5,6 +5,8 @@ #include "cmCommand.h" #include "cmExpandedCommandArgument.h" +#include "cmListFileCache.h" +#include "cmake.h" #include diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index 0755dce..b9c7549 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmConfigureFileCommand.h" +#include + +#include "cmMakefile.h" #include "cmSystemTools.h" +#include "cmake.h" -#include +class cmExecutionStatus; // cmConfigureFileCommand bool cmConfigureFileCommand::InitialPass(std::vector const& args, diff --git a/Source/cmConfigureFileCommand.h b/Source/cmConfigureFileCommand.h index 9df4550..e558b85 100644 --- a/Source/cmConfigureFileCommand.h +++ b/Source/cmConfigureFileCommand.h @@ -3,7 +3,14 @@ #ifndef cmConfigureFileCommand_h #define cmConfigureFileCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmNewLineStyle.h" + +class cmExecutionStatus; class cmConfigureFileCommand : public cmCommand { diff --git a/Source/cmContinueCommand.cxx b/Source/cmContinueCommand.cxx index dc3e02c..53d035d 100644 --- a/Source/cmContinueCommand.cxx +++ b/Source/cmContinueCommand.cxx @@ -3,7 +3,9 @@ #include "cmContinueCommand.h" #include "cmExecutionStatus.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +#include "cmake.h" // cmContinueCommand bool cmContinueCommand::InitialPass(std::vector const& args, diff --git a/Source/cmContinueCommand.h b/Source/cmContinueCommand.h index 0c4e650..c5b8919 100644 --- a/Source/cmContinueCommand.h +++ b/Source/cmContinueCommand.h @@ -3,8 +3,14 @@ #ifndef cmContinueCommand_h #define cmContinueCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmContinueCommand * \brief Continue from an enclosing foreach or while loop * diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index c7b6d58..a1de074 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -5,6 +5,7 @@ #include "cmAlgorithms.h" #include "cmExportTryCompileFileGenerator.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmState.h" #include "cmake.h" diff --git a/Source/cmCoreTryCompile.h b/Source/cmCoreTryCompile.h index 5f909dd..0d9bb79 100644 --- a/Source/cmCoreTryCompile.h +++ b/Source/cmCoreTryCompile.h @@ -4,6 +4,7 @@ #define cmCoreTryCompile_h #include "cmCommand.h" +#include "cmStateTypes.h" /** \class cmCoreTryCompile * \brief Base class for cmTryCompileCommand and cmTryRunCommand diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx index b062d4d..14a6c88 100644 --- a/Source/cmCreateTestSourceList.cxx +++ b/Source/cmCreateTestSourceList.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCreateTestSourceList.h" +#include "cmMakefile.h" #include "cmSourceFile.h" #include "cmSystemTools.h" diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx index af4eff9..9a097f3 100644 --- a/Source/cmDefinePropertyCommand.cxx +++ b/Source/cmDefinePropertyCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDefinePropertyCommand.h" +#include + +#include "cmMakefile.h" +#include "cmProperty.h" #include "cmState.h" -#include "cmStateTypes.h" -#include "cmake.h" + +class cmExecutionStatus; bool cmDefinePropertyCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmDefinePropertyCommand.h b/Source/cmDefinePropertyCommand.h index cdfff9f..02e5b88 100644 --- a/Source/cmDefinePropertyCommand.h +++ b/Source/cmDefinePropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmDefinesPropertyCommand_h #define cmDefinesPropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmDefinePropertyCommand : public cmCommand { public: diff --git a/Source/cmElseCommand.cxx b/Source/cmElseCommand.cxx index 16e53f6..207777e 100644 --- a/Source/cmElseCommand.cxx +++ b/Source/cmElseCommand.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmElseCommand.h" +class cmExecutionStatus; + bool cmElseCommand::InitialPass(std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmElseCommand.h b/Source/cmElseCommand.h index 32e04a7..c0162ad 100644 --- a/Source/cmElseCommand.h +++ b/Source/cmElseCommand.h @@ -3,7 +3,13 @@ #ifndef cmElseCommand_h #define cmElseCommand_h -#include "cmIfCommand.h" +#include +#include +#include + +#include "cmCommand.h" + +class cmExecutionStatus; /** \class cmElseCommand * \brief ends an if block diff --git a/Source/cmEnableLanguageCommand.cxx b/Source/cmEnableLanguageCommand.cxx index 49fd6fd..c57b7b1 100644 --- a/Source/cmEnableLanguageCommand.cxx +++ b/Source/cmEnableLanguageCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEnableLanguageCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // cmEnableLanguageCommand bool cmEnableLanguageCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmEnableLanguageCommand.h b/Source/cmEnableLanguageCommand.h index 34e1d3d..bafb79e 100644 --- a/Source/cmEnableLanguageCommand.h +++ b/Source/cmEnableLanguageCommand.h @@ -3,8 +3,14 @@ #ifndef cmEnableLanguageCommand_h #define cmEnableLanguageCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmEnableLanguageCommand * \brief Specify the name for this build project. * diff --git a/Source/cmEnableTestingCommand.cxx b/Source/cmEnableTestingCommand.cxx index d66c5b3..6a64450 100644 --- a/Source/cmEnableTestingCommand.cxx +++ b/Source/cmEnableTestingCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEnableTestingCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // we do this in the final pass so that we now the subdirs have all // been defined bool cmEnableTestingCommand::InitialPass(std::vector const&, diff --git a/Source/cmEnableTestingCommand.h b/Source/cmEnableTestingCommand.h index b94967a..67cd237 100644 --- a/Source/cmEnableTestingCommand.h +++ b/Source/cmEnableTestingCommand.h @@ -3,8 +3,14 @@ #ifndef cmEnableTestingCommand_h #define cmEnableTestingCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmEnableTestingCommand * \brief Enable testing for this directory and below. * diff --git a/Source/cmEndForEachCommand.cxx b/Source/cmEndForEachCommand.cxx index 7184bae..fe6a7f3 100644 --- a/Source/cmEndForEachCommand.cxx +++ b/Source/cmEndForEachCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndForEachCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + bool cmEndForEachCommand::InvokeInitialPass( std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmEndForEachCommand.h b/Source/cmEndForEachCommand.h index a146e4d..772a139 100644 --- a/Source/cmEndForEachCommand.h +++ b/Source/cmEndForEachCommand.h @@ -3,8 +3,15 @@ #ifndef cmEndForEachCommand_h #define cmEndForEachCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + /** \class cmEndForEachCommand * \brief ends an if block * diff --git a/Source/cmEndFunctionCommand.cxx b/Source/cmEndFunctionCommand.cxx index 82344c6..6adb42b 100644 --- a/Source/cmEndFunctionCommand.cxx +++ b/Source/cmEndFunctionCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndFunctionCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + bool cmEndFunctionCommand::InvokeInitialPass( std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmEndFunctionCommand.h b/Source/cmEndFunctionCommand.h index ab174fd..2599637 100644 --- a/Source/cmEndFunctionCommand.h +++ b/Source/cmEndFunctionCommand.h @@ -3,8 +3,15 @@ #ifndef cmEndFunctionCommand_h #define cmEndFunctionCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + /** \class cmEndFunctionCommand * \brief ends an if block * diff --git a/Source/cmEndIfCommand.cxx b/Source/cmEndIfCommand.cxx index 78a0d0f..50c2b42 100644 --- a/Source/cmEndIfCommand.cxx +++ b/Source/cmEndIfCommand.cxx @@ -3,6 +3,11 @@ #include "cmEndIfCommand.h" #include // required for atof + +#include "cmMakefile.h" + +class cmExecutionStatus; + bool cmEndIfCommand::InitialPass(std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmEndIfCommand.h b/Source/cmEndIfCommand.h index d068bb4..dfd6049 100644 --- a/Source/cmEndIfCommand.h +++ b/Source/cmEndIfCommand.h @@ -3,7 +3,13 @@ #ifndef cmEndIfCommand_h #define cmEndIfCommand_h -#include "cmIfCommand.h" +#include +#include +#include + +#include "cmCommand.h" + +class cmExecutionStatus; /** \class cmEndIfCommand * \brief ends an if block diff --git a/Source/cmEndMacroCommand.cxx b/Source/cmEndMacroCommand.cxx index 189d969..046b0af 100644 --- a/Source/cmEndMacroCommand.cxx +++ b/Source/cmEndMacroCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndMacroCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + bool cmEndMacroCommand::InvokeInitialPass( std::vector const&, cmExecutionStatus&) { diff --git a/Source/cmEndMacroCommand.h b/Source/cmEndMacroCommand.h index 34ae880..3c462d4 100644 --- a/Source/cmEndMacroCommand.h +++ b/Source/cmEndMacroCommand.h @@ -3,8 +3,15 @@ #ifndef cmEndMacroCommand_h #define cmEndMacroCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + /** \class cmEndMacroCommand * \brief ends an if block * diff --git a/Source/cmEndWhileCommand.cxx b/Source/cmEndWhileCommand.cxx index b635168..5623f33 100644 --- a/Source/cmEndWhileCommand.cxx +++ b/Source/cmEndWhileCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndWhileCommand.h" +#include "cmListFileCache.h" + +class cmExecutionStatus; + bool cmEndWhileCommand::InvokeInitialPass( std::vector const& args, cmExecutionStatus&) { diff --git a/Source/cmEndWhileCommand.h b/Source/cmEndWhileCommand.h index 2366706..d4e97b4 100644 --- a/Source/cmEndWhileCommand.h +++ b/Source/cmEndWhileCommand.h @@ -3,8 +3,15 @@ #ifndef cmEndWhileCommand_h #define cmEndWhileCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +struct cmListFileArgument; + /** \class cmEndWhileCommand * \brief ends a while loop * diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx index a3d6852..df92592 100644 --- a/Source/cmExecProgramCommand.cxx +++ b/Source/cmExecProgramCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExecProgramCommand.h" +#include +#include + +#include "cmMakefile.h" #include "cmSystemTools.h" -#include +class cmExecutionStatus; // cmExecProgramCommand bool cmExecProgramCommand::InitialPass(std::vector const& args, diff --git a/Source/cmExecProgramCommand.h b/Source/cmExecProgramCommand.h index a3e96ae..7cdf777 100644 --- a/Source/cmExecProgramCommand.h +++ b/Source/cmExecProgramCommand.h @@ -3,8 +3,14 @@ #ifndef cmExecProgramCommand_h #define cmExecProgramCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmExecProgramCommand * \brief Command that adds a target to the build system. * diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 2bcf244..c8a3a84 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -2,11 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExecuteProcessCommand.h" -#include "cmSystemTools.h" - #include - #include /* isspace */ +#include +#include + +#include "cmMakefile.h" +#include "cmSystemTools.h" + +class cmExecutionStatus; static bool cmExecuteProcessCommandIsWhitespace(char c) { diff --git a/Source/cmExecuteProcessCommand.h b/Source/cmExecuteProcessCommand.h index 2242998..9ce4338 100644 --- a/Source/cmExecuteProcessCommand.h +++ b/Source/cmExecuteProcessCommand.h @@ -3,8 +3,14 @@ #ifndef cmExecuteProcessCommand_h #define cmExecuteProcessCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmExecuteProcessCommand * \brief Command that adds a target to the build system. * diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index c9dac35..8102276 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -12,7 +12,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmake.h" diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index bf1ea01..f556a8b 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -2,17 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExportLibraryDependenciesCommand.h" -#include #include +#include +#include #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmPolicies.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmTargetLinkLibraryType.h" +#include "cm_auto_ptr.hxx" +#include "cm_unordered_map.hxx" #include "cmake.h" class cmExecutionStatus; diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 6b5870b..6285894 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -9,9 +9,9 @@ #include "cmGlobalGenerator.h" #include "cmHexFileConverter.h" #include "cmInstallType.h" -#include "cmake.h" - +#include "cmMakefile.h" #include "cmTimestamp.h" +#include "cmake.h" #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmCurl.h" diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h index b53bae8..319864c 100644 --- a/Source/cmFileCommand.h +++ b/Source/cmFileCommand.h @@ -3,9 +3,13 @@ #ifndef cmFileCommand_h #define cmFileCommand_h +#include +#include +#include + #include "cmCommand.h" -struct cmFileInstaller; +class cmExecutionStatus; /** \class cmFileCommand * \brief Command for manipulation of files diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 118c581..3d67ac1 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -3,6 +3,7 @@ #include "cmFindBase.h" #include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index bc175ff..75d1453 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindCommon.h" +#include "cmMakefile.h" #include "cmSystemTools.h" #include diff --git a/Source/cmFindFileCommand.cxx b/Source/cmFindFileCommand.cxx index 9c66cd2..9840c4f 100644 --- a/Source/cmFindFileCommand.cxx +++ b/Source/cmFindFileCommand.cxx @@ -2,8 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindFileCommand.h" -#include "cmSystemTools.h" - cmFindFileCommand::cmFindFileCommand() { this->IncludeFileInPath = true; diff --git a/Source/cmFindFileCommand.h b/Source/cmFindFileCommand.h index e121784..5c94ebf 100644 --- a/Source/cmFindFileCommand.h +++ b/Source/cmFindFileCommand.h @@ -3,8 +3,13 @@ #ifndef cmFindFileCommand_h #define cmFindFileCommand_h +#include +#include + #include "cmFindPathCommand.h" +class cmCommand; + /** \class cmFindFileCommand * \brief Define a command to search for an executable program. * diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 56be0cb..2feedf3 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -2,12 +2,19 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindLibraryCommand.h" +#include +#include +#include +#include +#include + #include "cmGlobalGenerator.h" +#include "cmMakefile.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" -#include "cmVersion.h" -#include +class cmExecutionStatus; cmFindLibraryCommand::cmFindLibraryCommand() { diff --git a/Source/cmFindLibraryCommand.h b/Source/cmFindLibraryCommand.h index 8531e51..aeff629 100644 --- a/Source/cmFindLibraryCommand.h +++ b/Source/cmFindLibraryCommand.h @@ -3,8 +3,15 @@ #ifndef cmFindLibraryCommand_h #define cmFindLibraryCommand_h +#include +#include +#include + #include "cmFindBase.h" +class cmCommand; +class cmExecutionStatus; + /** \class cmFindLibraryCommand * \brief Define a command to search for a library. * diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 373b728..60de74f 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -2,26 +2,38 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindPackageCommand.h" -#include "cmAlgorithms.h" -#include "cmState.h" -#include "cmVersion.h" - +#include +#include #include #include -#include #include +#include #include +#include +#include +#include +#include +#include +#include +#include -#ifdef CMAKE_BUILD_WITH_CMAKE -#include "cmVariableWatch.h" -#endif +#include "cmAlgorithms.h" +#include "cmMakefile.h" +#include "cmSearchPath.h" +#include "cmState.h" +#include "cmStateTypes.h" +#include "cmVersion.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" #if defined(__HAIKU__) #include #include -#include #endif +class cmExecutionStatus; +class cmFileList; + cmFindPackageCommand::PathLabel cmFindPackageCommand::PathLabel::UserRegistry( "PACKAGE_REGISTRY"); cmFindPackageCommand::PathLabel cmFindPackageCommand::PathLabel::Builds( @@ -1549,11 +1561,6 @@ void cmFindPackageCommand::StoreVersionFound() this->Makefile->AddDefinition(ver + "_COUNT", buf); } -#include -#include -#include - -class cmFileList; class cmFileListGeneratorBase { public: diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 101749e..d454892 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -3,9 +3,18 @@ #ifndef cmFindPackageCommand_h #define cmFindPackageCommand_h +#include +#include +#include +#include +#include +#include + #include "cmFindCommon.h" -class cmFindPackageFileList; +class cmCommand; +class cmExecutionStatus; +class cmSearchPath; /** \class cmFindPackageCommand * \brief Load settings from an external project. diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 66dc5d7..0900f46 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindPathCommand.h" +#include + +#include "cmMakefile.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" -#include +class cmExecutionStatus; cmFindPathCommand::cmFindPathCommand() { diff --git a/Source/cmFindPathCommand.h b/Source/cmFindPathCommand.h index 4ba67ed..edeeb3a 100644 --- a/Source/cmFindPathCommand.h +++ b/Source/cmFindPathCommand.h @@ -3,8 +3,15 @@ #ifndef cmFindPathCommand_h #define cmFindPathCommand_h +#include +#include +#include + #include "cmFindBase.h" +class cmCommand; +class cmExecutionStatus; + /** \class cmFindPathCommand * \brief Define a command to search for a library. * diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index d258c3c..2c496ba 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -2,9 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindProgramCommand.h" +#include "cmMakefile.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" -#include +class cmExecutionStatus; #if defined(__APPLE__) #include diff --git a/Source/cmFindProgramCommand.h b/Source/cmFindProgramCommand.h index 4326124..dc17803 100644 --- a/Source/cmFindProgramCommand.h +++ b/Source/cmFindProgramCommand.h @@ -3,8 +3,15 @@ #ifndef cmFindProgramCommand_h #define cmFindProgramCommand_h +#include +#include +#include + #include "cmFindBase.h" +class cmCommand; +class cmExecutionStatus; + /** \class cmFindProgramCommand * \brief Define a command to search for an executable program. * diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 6fbc93d..6273f6e 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -2,9 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmForEachCommand.h" -#include "cmSystemTools.h" +#include +#include +#include -#include +#include "cmExecutionStatus.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" cmForEachFunctionBlocker::cmForEachFunctionBlocker(cmMakefile* mf) : Makefile(mf) diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h index 9ba4af0..93c4676 100644 --- a/Source/cmForEachCommand.h +++ b/Source/cmForEachCommand.h @@ -3,11 +3,17 @@ #ifndef cmForEachCommand_h #define cmForEachCommand_h -#include "cmCommand.h" +#include +#include +#include +#include "cmCommand.h" #include "cmFunctionBlocker.h" #include "cmListFileCache.h" +class cmExecutionStatus; +class cmMakefile; + class cmForEachFunctionBlocker : public cmFunctionBlocker { public: diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index e9d4496..0ba575a 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -2,9 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFunctionCommand.h" +#include +#include + +#include "cmAlgorithms.h" +#include "cmExecutionStatus.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" #include "cmSystemTools.h" -#include "cmake.h" // define the class for function commands class cmFunctionHelperCommand : public cmCommand diff --git a/Source/cmFunctionCommand.h b/Source/cmFunctionCommand.h index 7d868b2..afea6f9 100644 --- a/Source/cmFunctionCommand.h +++ b/Source/cmFunctionCommand.h @@ -3,9 +3,16 @@ #ifndef cmFunctionCommand_h #define cmFunctionCommand_h -#include "cmCommand.h" +#include +#include +#include +#include "cmCommand.h" #include "cmFunctionBlocker.h" +#include "cmListFileCache.h" + +class cmExecutionStatus; +class cmMakefile; class cmFunctionFunctionBlocker : public cmFunctionBlocker { diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index 01b41e8..c92ae21 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -2,11 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetCMakePropertyCommand.h" +#include +#include + #include "cmAlgorithms.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" #include "cmState.h" -#include "cmStateTypes.h" -#include "cmake.h" + +class cmExecutionStatus; // cmGetCMakePropertyCommand bool cmGetCMakePropertyCommand::InitialPass( diff --git a/Source/cmGetCMakePropertyCommand.h b/Source/cmGetCMakePropertyCommand.h index 30bc2d8..41a51a4 100644 --- a/Source/cmGetCMakePropertyCommand.h +++ b/Source/cmGetCMakePropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetCMakePropertyCommand_h #define cmGetCMakePropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetCMakePropertyCommand : public cmCommand { public: diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx index 0670d31..920e1a0 100644 --- a/Source/cmGetDirectoryPropertyCommand.cxx +++ b/Source/cmGetDirectoryPropertyCommand.cxx @@ -3,9 +3,13 @@ #include "cmGetDirectoryPropertyCommand.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmSystemTools.h" #include "cmake.h" +class cmExecutionStatus; + // cmGetDirectoryPropertyCommand bool cmGetDirectoryPropertyCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmGetDirectoryPropertyCommand.h b/Source/cmGetDirectoryPropertyCommand.h index 625adb0..1ae3125 100644 --- a/Source/cmGetDirectoryPropertyCommand.h +++ b/Source/cmGetDirectoryPropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetDirectoryPropertyCommand_h #define cmGetDirectoryPropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetDirectoryPropertyCommand : public cmCommand { public: diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index c183947..5915a67 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -2,8 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetFilenameComponentCommand.h" +#include "cmMakefile.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmGetFilenameComponentCommand bool cmGetFilenameComponentCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmGetFilenameComponentCommand.h b/Source/cmGetFilenameComponentCommand.h index 68bf31f..c0ad903 100644 --- a/Source/cmGetFilenameComponentCommand.h +++ b/Source/cmGetFilenameComponentCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetFilenameComponentCommand_h #define cmGetFilenameComponentCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmGetFilenameComponentCommand * \brief Get a specific component of a filename. * diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 1852eab..d2056d2 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -2,15 +2,26 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetPropertyCommand.h" +#include + #include "cmGlobalGenerator.h" +#include "cmInstalledFile.h" +#include "cmListFileCache.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmProperty.h" #include "cmPropertyDefinition.h" #include "cmSourceFile.h" #include "cmState.h" -#include "cmStateTypes.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetPropertyComputer.h" #include "cmTest.h" #include "cmake.h" +class cmExecutionStatus; +class cmMessenger; + cmGetPropertyCommand::cmGetPropertyCommand() { this->InfoType = OutValue; diff --git a/Source/cmGetPropertyCommand.h b/Source/cmGetPropertyCommand.h index 20268b4..f9a33ac 100644 --- a/Source/cmGetPropertyCommand.h +++ b/Source/cmGetPropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetPropertyCommand_h #define cmGetPropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetPropertyCommand : public cmCommand { public: diff --git a/Source/cmGetSourceFilePropertyCommand.cxx b/Source/cmGetSourceFilePropertyCommand.cxx index 43f9256..509ef95 100644 --- a/Source/cmGetSourceFilePropertyCommand.cxx +++ b/Source/cmGetSourceFilePropertyCommand.cxx @@ -2,8 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetSourceFilePropertyCommand.h" +#include "cmMakefile.h" #include "cmSourceFile.h" +class cmExecutionStatus; + // cmSetSourceFilePropertyCommand bool cmGetSourceFilePropertyCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmGetSourceFilePropertyCommand.h b/Source/cmGetSourceFilePropertyCommand.h index 1edc392..0f71851 100644 --- a/Source/cmGetSourceFilePropertyCommand.h +++ b/Source/cmGetSourceFilePropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetSourceFilePropertyCommand_h #define cmGetSourceFilePropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetSourceFilePropertyCommand : public cmCommand { public: diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx index e78f780..2379292 100644 --- a/Source/cmGetTargetPropertyCommand.cxx +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -2,7 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetTargetPropertyCommand.h" +#include + +#include "cmListFileCache.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmTarget.h" #include "cmTargetPropertyComputer.h" +#include "cmake.h" + +class cmExecutionStatus; +class cmMessenger; // cmSetTargetPropertyCommand bool cmGetTargetPropertyCommand::InitialPass( diff --git a/Source/cmGetTargetPropertyCommand.h b/Source/cmGetTargetPropertyCommand.h index f36cc48..32fe803 100644 --- a/Source/cmGetTargetPropertyCommand.h +++ b/Source/cmGetTargetPropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetTargetPropertyCommand_h #define cmGetTargetPropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetTargetPropertyCommand : public cmCommand { public: diff --git a/Source/cmGetTestPropertyCommand.cxx b/Source/cmGetTestPropertyCommand.cxx index 4a445dc..a8a44b7 100644 --- a/Source/cmGetTestPropertyCommand.cxx +++ b/Source/cmGetTestPropertyCommand.cxx @@ -2,8 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGetTestPropertyCommand.h" +#include "cmMakefile.h" #include "cmTest.h" -#include "cmake.h" + +class cmExecutionStatus; // cmGetTestPropertyCommand bool cmGetTestPropertyCommand::InitialPass( diff --git a/Source/cmGetTestPropertyCommand.h b/Source/cmGetTestPropertyCommand.h index 5dc89bd..0491cc8 100644 --- a/Source/cmGetTestPropertyCommand.h +++ b/Source/cmGetTestPropertyCommand.h @@ -3,8 +3,14 @@ #ifndef cmGetTestPropertyCommand_h #define cmGetTestPropertyCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + class cmGetTestPropertyCommand : public cmCommand { public: diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index eb85b16..a8fa4f9 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -2,15 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIfCommand.h" +#include "cmConditionEvaluator.h" +#include "cmExecutionStatus.h" +#include "cmExpandedCommandArgument.h" +#include "cmMakefile.h" #include "cmOutputConverter.h" -#include "cmStringCommand.h" #include "cmSystemTools.h" - -#include "cmConditionEvaluator.h" - -#include -#include -#include // required for atof +#include "cm_auto_ptr.hxx" +#include "cmake.h" static std::string cmIfCommandError( std::vector const& args) diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h index e071acb..56eef30 100644 --- a/Source/cmIfCommand.h +++ b/Source/cmIfCommand.h @@ -3,9 +3,17 @@ #ifndef cmIfCommand_h #define cmIfCommand_h -#include "cmCommand.h" +#include +#include +#include +#include "cmCommand.h" #include "cmFunctionBlocker.h" +#include "cmListFileCache.h" + +class cmExecutionStatus; +class cmExpandedCommandArgument; +class cmMakefile; class cmIfFunctionBlocker : public cmFunctionBlocker { diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx index e89641f..0f7799e 100644 --- a/Source/cmIncludeCommand.cxx +++ b/Source/cmIncludeCommand.cxx @@ -2,8 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeCommand.h" +#include + #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmIncludeCommand bool cmIncludeCommand::InitialPass(std::vector const& args, diff --git a/Source/cmIncludeCommand.h b/Source/cmIncludeCommand.h index 9065ef7..78edd43 100644 --- a/Source/cmIncludeCommand.h +++ b/Source/cmIncludeCommand.h @@ -3,8 +3,14 @@ #ifndef cmIncludeCommand_h #define cmIncludeCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmIncludeCommand * \brief cmIncludeCommand defines a list of distant * files that can be "included" in the current list file. diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index 2260366..cdb0279 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -2,8 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeDirectoryCommand.h" +#include +#include + +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmIncludeDirectoryCommand bool cmIncludeDirectoryCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmIncludeDirectoryCommand.h b/Source/cmIncludeDirectoryCommand.h index d0a20b3..287b5d3 100644 --- a/Source/cmIncludeDirectoryCommand.h +++ b/Source/cmIncludeDirectoryCommand.h @@ -3,8 +3,14 @@ #ifndef cmIncludeDirectoryCommand_h #define cmIncludeDirectoryCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmIncludeDirectoryCommand * \brief Add include directories to the build. * diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index e7e9402..03388c7 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -3,7 +3,10 @@ #include "cmIncludeExternalMSProjectCommand.h" #ifdef _WIN32 +#include "cmMakefile.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmTarget.h" #endif class cmExecutionStatus; diff --git a/Source/cmIncludeRegularExpressionCommand.cxx b/Source/cmIncludeRegularExpressionCommand.cxx index 6dc20a0..073c95f 100644 --- a/Source/cmIncludeRegularExpressionCommand.cxx +++ b/Source/cmIncludeRegularExpressionCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIncludeRegularExpressionCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // cmIncludeRegularExpressionCommand bool cmIncludeRegularExpressionCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmIncludeRegularExpressionCommand.h b/Source/cmIncludeRegularExpressionCommand.h index b7c937d..c68d9f2 100644 --- a/Source/cmIncludeRegularExpressionCommand.h +++ b/Source/cmIncludeRegularExpressionCommand.h @@ -3,8 +3,14 @@ #ifndef cmIncludeRegularExpressionCommand_h #define cmIncludeRegularExpressionCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmIncludeRegularExpressionCommand * \brief Set the regular expression for following #includes. * diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 476755a..7bf9462 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -2,18 +2,33 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallCommand.h" +#include +#include +#include +#include + +#include "cmAlgorithms.h" +#include "cmCommandArgumentsHelper.h" #include "cmExportSet.h" +#include "cmExportSetMap.h" +#include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmInstallCommandArguments.h" #include "cmInstallDirectoryGenerator.h" #include "cmInstallExportGenerator.h" #include "cmInstallFilesGenerator.h" +#include "cmInstallGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetExport.h" +#include "cmake.h" -#include +class cmExecutionStatus; static cmInstallTargetGenerator* CreateInstallTargetGenerator( cmTarget& target, const cmInstallCommandArguments& args, bool impLib, diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h index b350330..187a6ce 100644 --- a/Source/cmInstallCommand.h +++ b/Source/cmInstallCommand.h @@ -3,8 +3,14 @@ #ifndef cmInstallCommand_h #define cmInstallCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmInstallCommand * \brief Specifies where to install some files * diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index 50f97e9..86fd46d 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -2,10 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallFilesCommand.h" +#include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmInstallFilesGenerator.h" +#include "cmInstallGenerator.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmExecutableCommand bool cmInstallFilesCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmInstallFilesCommand.h b/Source/cmInstallFilesCommand.h index da09fae..c3e2919 100644 --- a/Source/cmInstallFilesCommand.h +++ b/Source/cmInstallFilesCommand.h @@ -3,8 +3,14 @@ #ifndef cmInstallFilesCommand_h #define cmInstallFilesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmInstallFilesCommand * \brief Specifies where to install some files * diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx index 07f990d..e00eba0 100644 --- a/Source/cmInstallTargetsCommand.cxx +++ b/Source/cmInstallTargetsCommand.cxx @@ -2,7 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallTargetsCommand.h" +#include + #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cm_unordered_map.hxx" + +class cmExecutionStatus; // cmExecutableCommand bool cmInstallTargetsCommand::InitialPass(std::vector const& args, diff --git a/Source/cmInstallTargetsCommand.h b/Source/cmInstallTargetsCommand.h index 0625722..150397d 100644 --- a/Source/cmInstallTargetsCommand.h +++ b/Source/cmInstallTargetsCommand.h @@ -3,8 +3,14 @@ #ifndef cmInstallTargetsCommand_h #define cmInstallTargetsCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmInstallTargetsCommand * \brief Specifies where to install some targets * diff --git a/Source/cmLinkDirectoriesCommand.cxx b/Source/cmLinkDirectoriesCommand.cxx index 3a18a43..f863292 100644 --- a/Source/cmLinkDirectoriesCommand.cxx +++ b/Source/cmLinkDirectoriesCommand.cxx @@ -2,7 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLinkDirectoriesCommand.h" +#include + +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmLinkDirectoriesCommand bool cmLinkDirectoriesCommand::InitialPass( diff --git a/Source/cmLinkDirectoriesCommand.h b/Source/cmLinkDirectoriesCommand.h index ba0313b..387b3b9 100644 --- a/Source/cmLinkDirectoriesCommand.h +++ b/Source/cmLinkDirectoriesCommand.h @@ -3,8 +3,14 @@ #ifndef cmLinkDirectoriesCommand_h #define cmLinkDirectoriesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmLinkDirectoriesCommand * \brief Define a list of directories containing files to link. * diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 6cc9590..295ea28 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -2,15 +2,22 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmListCommand.h" -#include "cmAlgorithms.h" -#include "cmSystemTools.h" -#include -#include - #include #include -#include +#include +#include +#include +#include #include // required for atoi + +#include "cmAlgorithms.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; + bool cmListCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h index 43a482c..e7413ca 100644 --- a/Source/cmListCommand.h +++ b/Source/cmListCommand.h @@ -3,8 +3,14 @@ #ifndef cmListCommand_h #define cmListCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmListCommand * \brief Common list operations * diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index 2a06cb4..ea84877 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -5,7 +5,7 @@ #include #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 9bfc70b..d777bd5 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -2,10 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMacroCommand.h" +#include +#include +#include + #include "cmAlgorithms.h" +#include "cmExecutionStatus.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" #include "cmSystemTools.h" -#include "cmake.h" // define the class for macro commands class cmMacroHelperCommand : public cmCommand diff --git a/Source/cmMacroCommand.h b/Source/cmMacroCommand.h index 8e3cd95..acb4233 100644 --- a/Source/cmMacroCommand.h +++ b/Source/cmMacroCommand.h @@ -3,9 +3,16 @@ #ifndef cmMacroCommand_h #define cmMacroCommand_h -#include "cmCommand.h" +#include +#include +#include +#include "cmCommand.h" #include "cmFunctionBlocker.h" +#include "cmListFileCache.h" + +class cmExecutionStatus; +class cmMakefile; class cmMacroFunctionBlocker : public cmFunctionBlocker { diff --git a/Source/cmMakeDirectoryCommand.cxx b/Source/cmMakeDirectoryCommand.cxx index fda9eea..06e295b 100644 --- a/Source/cmMakeDirectoryCommand.cxx +++ b/Source/cmMakeDirectoryCommand.cxx @@ -2,8 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakeDirectoryCommand.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmMakeDirectoryCommand bool cmMakeDirectoryCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmMakeDirectoryCommand.h b/Source/cmMakeDirectoryCommand.h index 74b4a63..d9cce6f 100644 --- a/Source/cmMakeDirectoryCommand.h +++ b/Source/cmMakeDirectoryCommand.h @@ -3,8 +3,14 @@ #ifndef cmMakeDirectoryCommand_h #define cmMakeDirectoryCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmMakeDirectoryCommand * \brief Specify auxiliary source code directories. * diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx index 7297193..b2f0d22 100644 --- a/Source/cmMarkAsAdvancedCommand.cxx +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -2,8 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMarkAsAdvancedCommand.h" +#include "cmMakefile.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmMarkAsAdvancedCommand bool cmMarkAsAdvancedCommand::InitialPass(std::vector const& args, diff --git a/Source/cmMarkAsAdvancedCommand.h b/Source/cmMarkAsAdvancedCommand.h index 0f5270c..26caa66 100644 --- a/Source/cmMarkAsAdvancedCommand.h +++ b/Source/cmMarkAsAdvancedCommand.h @@ -3,8 +3,14 @@ #ifndef cmMarkAsAdvancedCommand_h #define cmMarkAsAdvancedCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmMarkAsAdvancedCommand * \brief mark_as_advanced command * diff --git a/Source/cmMathCommand.cxx b/Source/cmMathCommand.cxx index 42e6b90..c1cd1b6 100644 --- a/Source/cmMathCommand.cxx +++ b/Source/cmMathCommand.cxx @@ -2,7 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMathCommand.h" +#include + #include "cmExprParserHelper.h" +#include "cmMakefile.h" + +class cmExecutionStatus; bool cmMathCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmMathCommand.h b/Source/cmMathCommand.h index 17a1575..9b49b21 100644 --- a/Source/cmMathCommand.h +++ b/Source/cmMathCommand.h @@ -3,8 +3,14 @@ #ifndef cmMathCommand_h #define cmMathCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /// Mathematical expressions: math(EXPR ...) command. class cmMathCommand : public cmCommand { diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index 83d847a..2e15720 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -2,8 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMessageCommand.h" +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmMessenger.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmLibraryCommand bool cmMessageCommand::InitialPass(std::vector const& args, diff --git a/Source/cmMessageCommand.h b/Source/cmMessageCommand.h index cd16ffa..a565635 100644 --- a/Source/cmMessageCommand.h +++ b/Source/cmMessageCommand.h @@ -3,8 +3,14 @@ #ifndef cmMessageCommand_h #define cmMessageCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmMessageCommand * \brief Displays a message to the user * diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index d6efa2c..bbd6090 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -2,9 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmOptionCommand.h" +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmOptionCommand bool cmOptionCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmOptionCommand.h b/Source/cmOptionCommand.h index d77215a..09567ff 100644 --- a/Source/cmOptionCommand.h +++ b/Source/cmOptionCommand.h @@ -3,8 +3,14 @@ #ifndef cmOptionCommand_h #define cmOptionCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmOptionCommand * \brief Provide an option to the user * diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index 6ecd942..32b0a92 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -4,6 +4,8 @@ #include #include +#include +#include #include "cmAlgorithms.h" #include "cmGeneratorExpression.h" @@ -12,6 +14,7 @@ #include "cmSourceFile.h" #include "cmSystemTools.h" #include "cmTarget.h" +#include "cm_unordered_map.hxx" class cmExecutionStatus; diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index e45e3a5..0a2dd12 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -2,8 +2,19 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmParseArgumentsCommand.h" +#include +#include +#include +#include +#include +#include + #include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; static std::string escape_arg(const std::string& arg) { diff --git a/Source/cmParseArgumentsCommand.h b/Source/cmParseArgumentsCommand.h index af87d81..079eadb 100644 --- a/Source/cmParseArgumentsCommand.h +++ b/Source/cmParseArgumentsCommand.h @@ -3,8 +3,14 @@ #ifndef cmParseArgumentsCommand_h #define cmParseArgumentsCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmParseArgumentsCommand * */ diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index 4188661..4e0fa57 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -2,7 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmProjectCommand.h" +#include +#include +#include + +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmake.h" + +class cmExecutionStatus; // cmProjectCommand bool cmProjectCommand::InitialPass(std::vector const& args, diff --git a/Source/cmProjectCommand.h b/Source/cmProjectCommand.h index ef554f3..cd92176 100644 --- a/Source/cmProjectCommand.h +++ b/Source/cmProjectCommand.h @@ -3,8 +3,14 @@ #ifndef cmProjectCommand_h #define cmProjectCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmProjectCommand * \brief Specify the name for this build project. * diff --git a/Source/cmReturnCommand.h b/Source/cmReturnCommand.h index 06b91bc..9496d67 100644 --- a/Source/cmReturnCommand.h +++ b/Source/cmReturnCommand.h @@ -3,8 +3,14 @@ #ifndef cmReturnCommand_h #define cmReturnCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmReturnCommand * \brief Return from a directory or function * diff --git a/Source/cmSearchPath.cxx b/Source/cmSearchPath.cxx index fd3d482..ff0b836 100644 --- a/Source/cmSearchPath.cxx +++ b/Source/cmSearchPath.cxx @@ -2,8 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSearchPath.h" +#include + #include "cmAlgorithms.h" #include "cmFindCommon.h" +#include "cmMakefile.h" #include "cmSystemTools.h" cmSearchPath::cmSearchPath(cmFindCommon* findCmd) diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx index 77546a3..b27d227 100644 --- a/Source/cmSeparateArgumentsCommand.cxx +++ b/Source/cmSeparateArgumentsCommand.cxx @@ -2,8 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSeparateArgumentsCommand.h" +#include +#include + +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmSeparateArgumentsCommand bool cmSeparateArgumentsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSeparateArgumentsCommand.h b/Source/cmSeparateArgumentsCommand.h index d80d043..1cbf56e 100644 --- a/Source/cmSeparateArgumentsCommand.h +++ b/Source/cmSeparateArgumentsCommand.h @@ -3,8 +3,14 @@ #ifndef cmSeparateArgumentsCommand_h #define cmSeparateArgumentsCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmSeparateArgumentsCommand * \brief separate_arguments command * diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 9f59db4..e49f142 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -2,9 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetCommand.h" +#include +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmSetCommand bool cmSetCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSetCommand.h b/Source/cmSetCommand.h index 6fa3865..190092a 100644 --- a/Source/cmSetCommand.h +++ b/Source/cmSetCommand.h @@ -3,8 +3,14 @@ #ifndef cmSetCommand_h #define cmSetCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmSetCommand * \brief Set a CMAKE variable * diff --git a/Source/cmSetDirectoryPropertiesCommand.cxx b/Source/cmSetDirectoryPropertiesCommand.cxx index b0de021..8d3961a 100644 --- a/Source/cmSetDirectoryPropertiesCommand.cxx +++ b/Source/cmSetDirectoryPropertiesCommand.cxx @@ -2,7 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetDirectoryPropertiesCommand.h" -#include "cmake.h" +#include "cmMakefile.h" + +class cmExecutionStatus; // cmSetDirectoryPropertiesCommand bool cmSetDirectoryPropertiesCommand::InitialPass( diff --git a/Source/cmSetDirectoryPropertiesCommand.h b/Source/cmSetDirectoryPropertiesCommand.h index 9608742..854ad43 100644 --- a/Source/cmSetDirectoryPropertiesCommand.h +++ b/Source/cmSetDirectoryPropertiesCommand.h @@ -3,8 +3,15 @@ #ifndef cmSetDirectoryPropertiesCommand_h #define cmSetDirectoryPropertiesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +class cmMakefile; + class cmSetDirectoryPropertiesCommand : public cmCommand { public: diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 552f918..79221c8 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -2,13 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetPropertyCommand.h" +#include + #include "cmGlobalGenerator.h" -#include "cmSetSourceFilesPropertiesCommand.h" -#include "cmSetTargetPropertiesCommand.h" -#include "cmSetTestsPropertiesCommand.h" +#include "cmInstalledFile.h" +#include "cmMakefile.h" +#include "cmProperty.h" #include "cmSourceFile.h" #include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTest.h" +#include "cmake.h" + +class cmExecutionStatus; cmSetPropertyCommand::cmSetPropertyCommand() { diff --git a/Source/cmSetPropertyCommand.h b/Source/cmSetPropertyCommand.h index b4dff76..fd7c922 100644 --- a/Source/cmSetPropertyCommand.h +++ b/Source/cmSetPropertyCommand.h @@ -3,8 +3,19 @@ #ifndef cmSetsPropertiesCommand_h #define cmSetsPropertiesCommand_h +#include +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +class cmInstalledFile; +class cmSourceFile; +class cmTarget; +class cmTest; + class cmSetPropertyCommand : public cmCommand { public: diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx index 6a87d6d..33e1b2e 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.cxx +++ b/Source/cmSetSourceFilesPropertiesCommand.cxx @@ -2,9 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetSourceFilesPropertiesCommand.h" +#include "cmMakefile.h" #include "cmSourceFile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmSetSourceFilesPropertiesCommand bool cmSetSourceFilesPropertiesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSetSourceFilesPropertiesCommand.h b/Source/cmSetSourceFilesPropertiesCommand.h index 62cc404..8fa12c7 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.h +++ b/Source/cmSetSourceFilesPropertiesCommand.h @@ -3,8 +3,15 @@ #ifndef cmSetSourceFilesPropertiesCommand_h #define cmSetSourceFilesPropertiesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +class cmMakefile; + class cmSetSourceFilesPropertiesCommand : public cmCommand { public: diff --git a/Source/cmSetTargetPropertiesCommand.cxx b/Source/cmSetTargetPropertiesCommand.cxx index 200b42d..da26972 100644 --- a/Source/cmSetTargetPropertiesCommand.cxx +++ b/Source/cmSetTargetPropertiesCommand.cxx @@ -2,7 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetTargetPropertiesCommand.h" -#include "cmGlobalGenerator.h" +#include + +#include "cmMakefile.h" +#include "cmTarget.h" + +class cmExecutionStatus; // cmSetTargetPropertiesCommand bool cmSetTargetPropertiesCommand::InitialPass( diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h index ed02fa8..c3c0d06 100644 --- a/Source/cmSetTargetPropertiesCommand.h +++ b/Source/cmSetTargetPropertiesCommand.h @@ -3,8 +3,15 @@ #ifndef cmSetTargetsPropertiesCommand_h #define cmSetTargetsPropertiesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +class cmMakefile; + class cmSetTargetPropertiesCommand : public cmCommand { public: diff --git a/Source/cmSetTestsPropertiesCommand.cxx b/Source/cmSetTestsPropertiesCommand.cxx index 5abb84e..4fd379f 100644 --- a/Source/cmSetTestsPropertiesCommand.cxx +++ b/Source/cmSetTestsPropertiesCommand.cxx @@ -2,8 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSetTestsPropertiesCommand.h" +#include + +#include "cmMakefile.h" #include "cmTest.h" -#include "cmake.h" + +class cmExecutionStatus; // cmSetTestsPropertiesCommand bool cmSetTestsPropertiesCommand::InitialPass( diff --git a/Source/cmSetTestsPropertiesCommand.h b/Source/cmSetTestsPropertiesCommand.h index 04ba76e..45aed79 100644 --- a/Source/cmSetTestsPropertiesCommand.h +++ b/Source/cmSetTestsPropertiesCommand.h @@ -3,8 +3,15 @@ #ifndef cmSetTestsPropertiesCommand_h #define cmSetTestsPropertiesCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; +class cmMakefile; + class cmSetTestsPropertiesCommand : public cmCommand { public: diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx index 18c2a3e..4322a6d 100644 --- a/Source/cmSiteNameCommand.cxx +++ b/Source/cmSiteNameCommand.cxx @@ -2,9 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSiteNameCommand.h" +#include + +#include "cmMakefile.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" -#include +class cmExecutionStatus; // cmSiteNameCommand bool cmSiteNameCommand::InitialPass(std::vector const& args, diff --git a/Source/cmSiteNameCommand.h b/Source/cmSiteNameCommand.h index 48d1035..01023b9 100644 --- a/Source/cmSiteNameCommand.h +++ b/Source/cmSiteNameCommand.h @@ -3,8 +3,14 @@ #ifndef cmSiteNameCommand_h #define cmSiteNameCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmSiteNameCommand * \brief site_name command * diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 33d22e4..512bc91 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -2,18 +2,23 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmStringCommand.h" -#include "cmCryptoHash.h" -#include "cmSystemTools.h" - +#include #include -#include - #include -#include // required for atoi -#include +#include +#include +#include + +#include "cmAlgorithms.h" +#include "cmCryptoHash.h" +#include "cmGeneratorExpression.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmTimestamp.h" +#include "cmUuid.h" +#include "cm_auto_ptr.hxx" -#include -#include +class cmExecutionStatus; bool cmStringCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index b928f3c..c63bc3f 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -3,12 +3,13 @@ #ifndef cmStringCommand_h #define cmStringCommand_h +#include +#include +#include + #include "cmCommand.h" -class cmMakefile; -namespace cmsys { -class RegularExpression; -} +class cmExecutionStatus; /** \class cmStringCommand * \brief Common string operations diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx index d502c5f..55761bf 100644 --- a/Source/cmSubdirCommand.cxx +++ b/Source/cmSubdirCommand.cxx @@ -2,8 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSubdirCommand.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmSubdirCommand bool cmSubdirCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmSubdirCommand.h b/Source/cmSubdirCommand.h index 0778638..ce1f876 100644 --- a/Source/cmSubdirCommand.h +++ b/Source/cmSubdirCommand.h @@ -3,8 +3,14 @@ #ifndef cmSubdirCommand_h #define cmSubdirCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmSubdirCommand * \brief Specify a list of subdirectories to build. * diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 9626992..e173036 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -2,10 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetLinkLibrariesCommand.h" +#include +#include + #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; const char* cmTargetLinkLibrariesCommand::LinkLibraryTypeNames[3] = { "general", "debug", "optimized" diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h index 69bb6eb..762b48f 100644 --- a/Source/cmTargetLinkLibrariesCommand.h +++ b/Source/cmTargetLinkLibrariesCommand.h @@ -3,7 +3,15 @@ #ifndef cmTargetLinkLibrariesCommand_h #define cmTargetLinkLibrariesCommand_h +#include +#include +#include + #include "cmCommand.h" +#include "cmTargetLinkLibraryType.h" + +class cmExecutionStatus; +class cmTarget; /** \class cmTargetLinkLibrariesCommand * \brief Specify a list of libraries to link into executables. diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx index e2e02ad..7aba0f8 100644 --- a/Source/cmTargetPropCommandBase.cxx +++ b/Source/cmTargetPropCommandBase.cxx @@ -3,6 +3,7 @@ #include "cmTargetPropCommandBase.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" bool cmTargetPropCommandBase::HandleArguments( std::vector const& args, const std::string& prop, diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx index 933818e..b6bfbfa 100644 --- a/Source/cmTryCompileCommand.cxx +++ b/Source/cmTryCompileCommand.cxx @@ -2,6 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTryCompileCommand.h" +#include "cmMakefile.h" +#include "cmake.h" + +class cmExecutionStatus; + // cmTryCompileCommand bool cmTryCompileCommand::InitialPass(std::vector const& argv, cmExecutionStatus&) diff --git a/Source/cmTryCompileCommand.h b/Source/cmTryCompileCommand.h index ed74ae1..52a0345 100644 --- a/Source/cmTryCompileCommand.h +++ b/Source/cmTryCompileCommand.h @@ -3,8 +3,15 @@ #ifndef cmTryCompileCommand_h #define cmTryCompileCommand_h +#include +#include +#include + #include "cmCoreTryCompile.h" +class cmCommand; +class cmExecutionStatus; + /** \class cmTryCompileCommand * \brief Specifies where to install some files * diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index 6787c8e..9457d5b 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -2,11 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTryRunCommand.h" +#include +#include +#include + +#include "cmMakefile.h" #include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" -#include "cmTryCompileCommand.h" +#include "cmake.h" -#include +class cmExecutionStatus; // cmTryRunCommand bool cmTryRunCommand::InitialPass(std::vector const& argv, diff --git a/Source/cmTryRunCommand.h b/Source/cmTryRunCommand.h index 24447ed..8b44ac5 100644 --- a/Source/cmTryRunCommand.h +++ b/Source/cmTryRunCommand.h @@ -3,8 +3,15 @@ #ifndef cmTryRunCommand_h #define cmTryRunCommand_h +#include +#include +#include + #include "cmCoreTryCompile.h" +class cmCommand; +class cmExecutionStatus; + /** \class cmTryRunCommand * \brief Specifies where to install some files * diff --git a/Source/cmUnsetCommand.cxx b/Source/cmUnsetCommand.cxx index 2fea6192..31525ba 100644 --- a/Source/cmUnsetCommand.cxx +++ b/Source/cmUnsetCommand.cxx @@ -2,8 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUnsetCommand.h" +#include + +#include "cmAlgorithms.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +class cmExecutionStatus; + // cmUnsetCommand bool cmUnsetCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmUnsetCommand.h b/Source/cmUnsetCommand.h index 37b9270..5b07202 100644 --- a/Source/cmUnsetCommand.h +++ b/Source/cmUnsetCommand.h @@ -3,8 +3,14 @@ #ifndef cmUnsetCommand_h #define cmUnsetCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmUnsetCommand * \brief Unset a CMAKE variable * diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index f98d512..3b78abe 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -7,7 +7,7 @@ #include "cmMakefile.h" #include "cmPolicies.h" #include "cmState.h" -#include "cmState.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" class cmExecutionStatus; diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index beb59bf..38ea637 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -3,7 +3,12 @@ #include "cmWhileCommand.h" #include "cmConditionEvaluator.h" +#include "cmExecutionStatus.h" +#include "cmExpandedCommandArgument.h" +#include "cmMakefile.h" #include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" cmWhileFunctionBlocker::cmWhileFunctionBlocker(cmMakefile* mf) : Makefile(mf) diff --git a/Source/cmWhileCommand.h b/Source/cmWhileCommand.h index cc114ec..abd36b3 100644 --- a/Source/cmWhileCommand.h +++ b/Source/cmWhileCommand.h @@ -3,11 +3,17 @@ #ifndef cmWhileCommand_h #define cmWhileCommand_h -#include "cmCommand.h" +#include +#include +#include +#include "cmCommand.h" #include "cmFunctionBlocker.h" #include "cmListFileCache.h" +class cmExecutionStatus; +class cmMakefile; + class cmWhileFunctionBlocker : public cmFunctionBlocker { public: ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 27 11:08:50 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 27 Oct 2016 11:08:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-777-ga69d7a4 Message-ID: <20161027150850.15526F790E@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 a69d7a4ee0eff002f0ab4a4b19164a33b7157333 (commit) via 0caca40fccead726db6c4d5f5b4ea990958914df (commit) from 246b82be53e8e68e92c06ddfe261cde92b1d04fa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a69d7a4ee0eff002f0ab4a4b19164a33b7157333 commit a69d7a4ee0eff002f0ab4a4b19164a33b7157333 Merge: 246b82b 0caca40 Author: Brad King AuthorDate: Thu Oct 27 11:08:48 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 27 11:08:48 2016 -0400 Merge topic 'vs-fix-no-toolset' into next 0caca40f VS: Fix use of `Windows7.1SDK` 64-bit toolset with VS 2010 Express https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0caca40fccead726db6c4d5f5b4ea990958914df commit 0caca40fccead726db6c4d5f5b4ea990958914df Author: Brad King AuthorDate: Thu Oct 27 10:39:06 2016 -0400 Commit: Brad King CommitDate: Thu Oct 27 10:42:36 2016 -0400 VS: Fix use of `Windows7.1SDK` 64-bit toolset with VS 2010 Express Refactoring in commit 584ab528 (VS: Add internal API to get platform toolset as string, 2016-10-18) accidentally changed the semantics of the original `cmGlobalVisualStudio10Generator::GetPlatformToolset` implementation to return a pointer to an empty string instead of `nullptr` when no toolset is configured. This broke cases that tested for `nullptr` to detect the lack of any specific toolset, such as the call in `Find64BitTools`. Restore the `nullptr` return in this case. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 793c605..5c010b4 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -339,7 +339,11 @@ void cmGlobalVisualStudio10Generator::EnableLanguage( const char* cmGlobalVisualStudio10Generator::GetPlatformToolset() const { - return this->GetPlatformToolsetString().c_str(); + std::string const& toolset = this->GetPlatformToolsetString(); + if (toolset.empty()) { + return CM_NULLPTR; + } + return toolset.c_str(); } std::string const& cmGlobalVisualStudio10Generator::GetPlatformToolsetString() ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio10Generator.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 27 11:17:04 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 27 Oct 2016 11:17:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-359-gfe03a86 Message-ID: <20161027151704.2F469F70F2@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 fe03a86eb392b5c9a0f551e40b625cefa972e04b (commit) via 0caca40fccead726db6c4d5f5b4ea990958914df (commit) from 5448f0068cc4e228a7481905412fc956e239a827 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe03a86eb392b5c9a0f551e40b625cefa972e04b commit fe03a86eb392b5c9a0f551e40b625cefa972e04b Merge: 5448f00 0caca40 Author: Brad King AuthorDate: Thu Oct 27 11:17:01 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 27 11:17:01 2016 -0400 Merge topic 'vs-fix-no-toolset' 0caca40f VS: Fix use of `Windows7.1SDK` 64-bit toolset with VS 2010 Express ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio10Generator.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 27 11:17:08 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 27 Oct 2016 11:17:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-361-g6613434 Message-ID: <20161027151708.57305F70F6@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 6613434376740218fc74950ae5fc2e32baa5fa89 (commit) via 554b4f9010add22ef83bb22858f9fdcb52afbc7e (commit) from fe03a86eb392b5c9a0f551e40b625cefa972e04b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6613434376740218fc74950ae5fc2e32baa5fa89 commit 6613434376740218fc74950ae5fc2e32baa5fa89 Merge: fe03a86 554b4f9 Author: Brad King AuthorDate: Thu Oct 27 11:17:05 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 27 11:17:05 2016 -0400 Merge topic 'intel-17-features' 554b4f90 Features: Record features for Intel C++ 17 on UNIX ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Intel-CXX-FeatureTests.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 27 11:17:11 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 27 Oct 2016 11:17:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-363-g8f6fd09 Message-ID: <20161027151711.37859F70FE@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 8f6fd091b8b2faac52082a5dc854966e70ab3447 (commit) via 05e05cd2aae9d00d2ed89a4f0cb9ef2f2976ae80 (commit) from 6613434376740218fc74950ae5fc2e32baa5fa89 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f6fd091b8b2faac52082a5dc854966e70ab3447 commit 8f6fd091b8b2faac52082a5dc854966e70ab3447 Merge: 6613434 05e05cd Author: Brad King AuthorDate: Thu Oct 27 11:17:09 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 27 11:17:09 2016 -0400 Merge topic 'intel-compiler-windows-c++98' 05e05cd2 Intel: Fix compiler C++98 standard flag on Windows ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Intel-CXX.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 27 11:17:14 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 27 Oct 2016 11:17:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-365-g402b133 Message-ID: <20161027151714.2F45BF70FF@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 402b133d7b13c691a3d3f3a354bd10eea1ff24f1 (commit) via 335a29cb07a8d014a9ed4d4dbf25e49da3a78b33 (commit) from 8f6fd091b8b2faac52082a5dc854966e70ab3447 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=402b133d7b13c691a3d3f3a354bd10eea1ff24f1 commit 402b133d7b13c691a3d3f3a354bd10eea1ff24f1 Merge: 8f6fd09 335a29c Author: Brad King AuthorDate: Thu Oct 27 11:17:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 27 11:17:12 2016 -0400 Merge topic 'consoleBuf' 335a29cb Enable Unicode output to Windows consoles ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 1 + Source/CPack/cpack.cxx | 8 ++++++++ Source/cmakemain.cxx | 8 ++++++++ Source/ctest.cxx | 8 ++++++++ 4 files changed, 25 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 27 11:17:17 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 27 Oct 2016 11:17:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-367-gc6c8c24 Message-ID: <20161027151717.27B48F70FD@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 c6c8c24908e108b7b3c5c76e29197323ac3a4287 (commit) via e81c323da9c020c91c967184ecf98f806eb95867 (commit) from 402b133d7b13c691a3d3f3a354bd10eea1ff24f1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6c8c24908e108b7b3c5c76e29197323ac3a4287 commit c6c8c24908e108b7b3c5c76e29197323ac3a4287 Merge: 402b133 e81c323 Author: Brad King AuthorDate: Thu Oct 27 11:17:14 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 27 11:17:14 2016 -0400 Merge topic 'include-what-you-use' e81c323d Include necessary headers in commands ----------------------------------------------------------------------- Summary of changes: Source/cmAddCustomCommandCommand.cxx | 12 +++++++-- Source/cmAddCustomCommandCommand.h | 6 +++++ Source/cmAddCustomTargetCommand.cxx | 10 +++++++ Source/cmAddCustomTargetCommand.h | 6 +++++ Source/cmAddDefinitionsCommand.cxx | 4 +++ Source/cmAddDefinitionsCommand.h | 6 +++++ Source/cmAddDependenciesCommand.cxx | 8 +++++- Source/cmAddDependenciesCommand.h | 6 +++++ Source/cmAddExecutableCommand.cxx | 10 +++++++ Source/cmAddExecutableCommand.h | 6 +++++ Source/cmAddLibraryCommand.cxx | 8 ++++++ Source/cmAddLibraryCommand.h | 6 +++++ Source/cmAddSubDirectoryCommand.cxx | 6 +++++ Source/cmAddSubDirectoryCommand.h | 6 +++++ Source/cmAddTestCommand.cxx | 6 ++++- Source/cmAddTestCommand.h | 6 +++++ Source/cmBreakCommand.cxx | 5 ++++ Source/cmBreakCommand.h | 6 +++++ Source/cmBuildCommand.cxx | 8 ++++++ Source/cmBuildCommand.h | 6 +++++ Source/cmBuildNameCommand.cxx | 2 +- Source/cmCMakeMinimumRequired.cxx | 1 + Source/cmCMakePolicyCommand.cxx | 9 ++++++- Source/cmCMakePolicyCommand.h | 6 +++++ Source/cmCommand.cxx | 6 +++++ Source/cmCommand.h | 11 ++++++-- Source/cmCommands.cxx | 12 --------- Source/cmConditionEvaluator.cxx | 1 + Source/cmConditionEvaluator.h | 2 ++ Source/cmConfigureFileCommand.cxx | 6 ++++- Source/cmConfigureFileCommand.h | 7 +++++ Source/cmContinueCommand.cxx | 2 ++ Source/cmContinueCommand.h | 6 +++++ Source/cmCoreTryCompile.cxx | 1 + Source/cmCoreTryCompile.h | 1 + Source/cmCreateTestSourceList.cxx | 1 + Source/cmDefinePropertyCommand.cxx | 8 ++++-- Source/cmDefinePropertyCommand.h | 6 +++++ Source/cmElseCommand.cxx | 2 ++ Source/cmElseCommand.h | 8 +++++- Source/cmEnableLanguageCommand.cxx | 4 +++ Source/cmEnableLanguageCommand.h | 6 +++++ Source/cmEnableTestingCommand.cxx | 4 +++ Source/cmEnableTestingCommand.h | 6 +++++ Source/cmEndForEachCommand.cxx | 3 +++ Source/cmEndForEachCommand.h | 7 +++++ Source/cmEndFunctionCommand.cxx | 3 +++ Source/cmEndFunctionCommand.h | 7 +++++ Source/cmEndIfCommand.cxx | 5 ++++ Source/cmEndIfCommand.h | 8 +++++- Source/cmEndMacroCommand.cxx | 3 +++ Source/cmEndMacroCommand.h | 7 +++++ Source/cmEndWhileCommand.cxx | 4 +++ Source/cmEndWhileCommand.h | 7 +++++ Source/cmExecProgramCommand.cxx | 6 ++++- Source/cmExecProgramCommand.h | 6 +++++ Source/cmExecuteProcessCommand.cxx | 10 ++++--- Source/cmExecuteProcessCommand.h | 6 +++++ Source/cmExportCommand.cxx | 2 +- Source/cmExportLibraryDependenciesCommand.cxx | 7 +++-- Source/cmFileCommand.cxx | 4 +-- Source/cmFileCommand.h | 6 ++++- Source/cmFindBase.cxx | 1 + Source/cmFindCommon.cxx | 1 + Source/cmFindFileCommand.cxx | 2 -- Source/cmFindFileCommand.h | 5 ++++ Source/cmFindLibraryCommand.cxx | 11 ++++++-- Source/cmFindLibraryCommand.h | 7 +++++ Source/cmFindPackageCommand.cxx | 35 +++++++++++++++---------- Source/cmFindPackageCommand.h | 11 +++++++- Source/cmFindPathCommand.cxx | 6 ++++- Source/cmFindPathCommand.h | 7 +++++ Source/cmFindProgramCommand.cxx | 4 ++- Source/cmFindProgramCommand.h | 7 +++++ Source/cmForEachCommand.cxx | 10 +++++-- Source/cmForEachCommand.h | 8 +++++- Source/cmFunctionCommand.cxx | 8 +++++- Source/cmFunctionCommand.h | 9 ++++++- Source/cmGetCMakePropertyCommand.cxx | 8 ++++-- Source/cmGetCMakePropertyCommand.h | 6 +++++ Source/cmGetDirectoryPropertyCommand.cxx | 4 +++ Source/cmGetDirectoryPropertyCommand.h | 6 +++++ Source/cmGetFilenameComponentCommand.cxx | 4 +++ Source/cmGetFilenameComponentCommand.h | 6 +++++ Source/cmGetPropertyCommand.cxx | 13 ++++++++- Source/cmGetPropertyCommand.h | 6 +++++ Source/cmGetSourceFilePropertyCommand.cxx | 3 +++ Source/cmGetSourceFilePropertyCommand.h | 6 +++++ Source/cmGetTargetPropertyCommand.cxx | 10 +++++++ Source/cmGetTargetPropertyCommand.h | 6 +++++ Source/cmGetTestPropertyCommand.cxx | 4 ++- Source/cmGetTestPropertyCommand.h | 6 +++++ Source/cmIfCommand.cxx | 13 +++++---- Source/cmIfCommand.h | 10 ++++++- Source/cmIncludeCommand.cxx | 7 +++++ Source/cmIncludeCommand.h | 6 +++++ Source/cmIncludeDirectoryCommand.cxx | 6 +++++ Source/cmIncludeDirectoryCommand.h | 6 +++++ Source/cmIncludeExternalMSProjectCommand.cxx | 3 +++ Source/cmIncludeRegularExpressionCommand.cxx | 4 +++ Source/cmIncludeRegularExpressionCommand.h | 6 +++++ Source/cmInstallCommand.cxx | 17 +++++++++++- Source/cmInstallCommand.h | 6 +++++ Source/cmInstallFilesCommand.cxx | 5 ++++ Source/cmInstallFilesCommand.h | 6 +++++ Source/cmInstallTargetsCommand.cxx | 7 +++++ Source/cmInstallTargetsCommand.h | 6 +++++ Source/cmLinkDirectoriesCommand.cxx | 7 +++++ Source/cmLinkDirectoriesCommand.h | 6 +++++ Source/cmListCommand.cxx | 19 +++++++++----- Source/cmListCommand.h | 6 +++++ Source/cmLoadCacheCommand.cxx | 2 +- Source/cmMacroCommand.cxx | 8 +++++- Source/cmMacroCommand.h | 9 ++++++- Source/cmMakeDirectoryCommand.cxx | 3 +++ Source/cmMakeDirectoryCommand.h | 6 +++++ Source/cmMarkAsAdvancedCommand.cxx | 5 ++++ Source/cmMarkAsAdvancedCommand.h | 6 +++++ Source/cmMathCommand.cxx | 5 ++++ Source/cmMathCommand.h | 6 +++++ Source/cmMessageCommand.cxx | 7 +++++ Source/cmMessageCommand.h | 6 +++++ Source/cmOptionCommand.cxx | 7 +++++ Source/cmOptionCommand.h | 6 +++++ Source/cmOutputRequiredFilesCommand.cxx | 3 +++ Source/cmParseArgumentsCommand.cxx | 11 ++++++++ Source/cmParseArgumentsCommand.h | 6 +++++ Source/cmProjectCommand.cxx | 10 +++++++ Source/cmProjectCommand.h | 6 +++++ Source/cmReturnCommand.h | 6 +++++ Source/cmSearchPath.cxx | 3 +++ Source/cmSeparateArgumentsCommand.cxx | 6 +++++ Source/cmSeparateArgumentsCommand.h | 6 +++++ Source/cmSetCommand.cxx | 8 ++++++ Source/cmSetCommand.h | 6 +++++ Source/cmSetDirectoryPropertiesCommand.cxx | 4 ++- Source/cmSetDirectoryPropertiesCommand.h | 7 +++++ Source/cmSetPropertyCommand.cxx | 13 ++++++--- Source/cmSetPropertyCommand.h | 11 ++++++++ Source/cmSetSourceFilesPropertiesCommand.cxx | 3 +++ Source/cmSetSourceFilesPropertiesCommand.h | 7 +++++ Source/cmSetTargetPropertiesCommand.cxx | 7 ++++- Source/cmSetTargetPropertiesCommand.h | 7 +++++ Source/cmSetTestsPropertiesCommand.cxx | 6 ++++- Source/cmSetTestsPropertiesCommand.h | 7 +++++ Source/cmSiteNameCommand.cxx | 6 ++++- Source/cmSiteNameCommand.h | 6 +++++ Source/cmStringCommand.cxx | 23 +++++++++------- Source/cmStringCommand.h | 9 ++++--- Source/cmSubdirCommand.cxx | 3 +++ Source/cmSubdirCommand.h | 6 +++++ Source/cmTargetLinkLibrariesCommand.cxx | 10 +++++++ Source/cmTargetLinkLibrariesCommand.h | 8 ++++++ Source/cmTargetPropCommandBase.cxx | 1 + Source/cmTryCompileCommand.cxx | 5 ++++ Source/cmTryCompileCommand.h | 7 +++++ Source/cmTryRunCommand.cxx | 10 +++++-- Source/cmTryRunCommand.h | 7 +++++ Source/cmUnsetCommand.cxx | 6 +++++ Source/cmUnsetCommand.h | 6 +++++ Source/cmUtilitySourceCommand.cxx | 2 +- Source/cmWhileCommand.cxx | 5 ++++ Source/cmWhileCommand.h | 8 +++++- 163 files changed, 962 insertions(+), 107 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Oct 27 11:17:35 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 27 Oct 2016 11:17:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-784-g0a18af8 Message-ID: <20161027151735.88613F70FD@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 0a18af8b167218e096b1411ee39dc025707c959a (commit) via c6c8c24908e108b7b3c5c76e29197323ac3a4287 (commit) via 402b133d7b13c691a3d3f3a354bd10eea1ff24f1 (commit) via 8f6fd091b8b2faac52082a5dc854966e70ab3447 (commit) via 6613434376740218fc74950ae5fc2e32baa5fa89 (commit) via fe03a86eb392b5c9a0f551e40b625cefa972e04b (commit) via 5448f0068cc4e228a7481905412fc956e239a827 (commit) from a69d7a4ee0eff002f0ab4a4b19164a33b7157333 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a18af8b167218e096b1411ee39dc025707c959a commit 0a18af8b167218e096b1411ee39dc025707c959a Merge: a69d7a4 c6c8c24 Author: Brad King AuthorDate: Thu Oct 27 11:17:26 2016 -0400 Commit: Brad King CommitDate: Thu Oct 27 11:17:26 2016 -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 Oct 27 14:21:54 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 27 Oct 2016 14:21:54 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-787-g1aaa28a Message-ID: <20161027182200.09B8DF71FF@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 1aaa28a5cc18cd0a8f80e7ce84ab233bc38a023f (commit) via 0a4028759c12de9846d3ffe9cce74523353bf0bc (commit) via d792491c405ce47bcd779f53fa0f9422bb3df494 (commit) from 0a18af8b167218e096b1411ee39dc025707c959a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1aaa28a5cc18cd0a8f80e7ce84ab233bc38a023f commit 1aaa28a5cc18cd0a8f80e7ce84ab233bc38a023f Merge: 0a18af8 0a40287 Author: Brad King AuthorDate: Thu Oct 27 14:21:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Oct 27 14:21:45 2016 -0400 Merge topic 'cmake-server-handshake-improvements' into next 0a402875 server-mode: Handle generator toolset and platform in handshake d792491c cmake-server: Better error reporting during handshake https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a4028759c12de9846d3ffe9cce74523353bf0bc commit 0a4028759c12de9846d3ffe9cce74523353bf0bc Author: Tobias Hunger AuthorDate: Thu Oct 27 11:48:31 2016 +0200 Commit: Brad King CommitDate: Thu Oct 27 14:18:49 2016 -0400 server-mode: Handle generator toolset and platform in handshake diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index a72af14..9520cc1 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -276,7 +276,9 @@ Protocol version 1.0 requires the following attributes to be set: * "sourceDirectory" with a path to the sources * "buildDirectory" with a path to the build directory * "generator" with the generator name - * "extraGenerator" (optional!) with the extra generator to be used. + * "extraGenerator" (optional!) with the extra generator to be used + * "platform" with the generator platform (if supported by the generator) + * "toolset" with the generator toolset (if supported by the generator) Example:: diff --git a/Source/cmServerDictionary.h b/Source/cmServerDictionary.h index 2d64cbd..e6a7ae6 100644 --- a/Source/cmServerDictionary.h +++ b/Source/cmServerDictionary.h @@ -62,6 +62,7 @@ static const std::string kMESSAGE_KEY = "message"; static const std::string kMINOR_KEY = "minor"; static const std::string kNAME_KEY = "name"; static const std::string kPATH_KEY = "path"; +static const std::string kPLATFORM_KEY = "platform"; static const std::string kPROGRESS_CURRENT_KEY = "progressCurrent"; static const std::string kPROGRESS_MAXIMUM_KEY = "progressMaximum"; static const std::string kPROGRESS_MESSAGE_KEY = "progressMessage"; @@ -77,6 +78,7 @@ static const std::string kSUPPORTED_PROTOCOL_VERSIONS = static const std::string kSYSROOT_KEY = "sysroot"; static const std::string kTARGETS_KEY = "targets"; static const std::string kTITLE_KEY = "title"; +static const std::string kTOOLSET_KEY = "toolset"; static const std::string kTRACE_EXPAND_KEY = "traceExpand"; static const std::string kTRACE_KEY = "trace"; static const std::string kTYPE_KEY = "type"; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index f3ecfaa..47093c3 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -276,6 +276,8 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, request.Data[kBUILD_DIRECTORY_KEY].asString(); std::string generator = request.Data[kGENERATOR_KEY].asString(); std::string extraGenerator = request.Data[kEXTRA_GENERATOR_KEY].asString(); + std::string toolset = request.Data[kTOOLSET_KEY].asString(); + std::string platform = request.Data[kPLATFORM_KEY].asString(); if (buildDirectory.empty()) { setErrorMessage(errorMessage, std::string("\"") + kBUILD_DIRECTORY_KEY + @@ -312,6 +314,18 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, "source directory", errorMessage)) { return false; } + + // check toolset: + if (!testValue(state, "CMAKE_GENERATOR_TOOLSET", toolset, "toolset", + errorMessage)) { + return false; + } + + // check platform: + if (!testValue(state, "CMAKE_GENERATOR_PLATFORM", platform, "platform", + errorMessage)) { + return false; + } } } @@ -354,11 +368,26 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, "\" is not supported.")); return false; } + if (!extraIt->supportsToolset && !toolset.empty()) { + setErrorMessage(errorMessage, + std::string("Toolset was provided but is not supported by " + "the requested generator.")); + return false; + } + if (!extraIt->supportsPlatform && !platform.empty()) { + setErrorMessage(errorMessage, + std::string("Platform was provided but is not supported " + "by the requested generator.")); + return false; + } const std::string fullGeneratorName = cmExternalMakefileProjectGenerator::CreateFullGeneratorName( generator, extraGenerator); + cm->SetGeneratorToolset(toolset); + cm->SetGeneratorPlatform(platform); + cmGlobalGenerator* gg = cm->CreateGlobalGenerator(fullGeneratorName); if (!gg) { setErrorMessage( https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d792491c405ce47bcd779f53fa0f9422bb3df494 commit d792491c405ce47bcd779f53fa0f9422bb3df494 Author: Tobias Hunger AuthorDate: Thu Oct 27 11:34:45 2016 +0200 Commit: Brad King CommitDate: Thu Oct 27 14:18:42 2016 -0400 cmake-server: Better error reporting during handshake Catch more problematic input during handshake and report failure. These were caught before when trying to configure, but it is way better to get these reports early. diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a2bdf49..f3ecfaa 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -244,6 +244,30 @@ std::pair cmServerProtocol1_0::ProtocolVersion() const return std::make_pair(1, 0); } +static void setErrorMessage(std::string* errorMessage, const std::string& text) +{ + if (errorMessage) { + *errorMessage = text; + } +} + +static bool testValue(cmState* state, const std::string& key, + std::string& value, const std::string& keyDescription, + std::string* errorMessage) +{ + const std::string cachedValue = std::string(state->GetCacheEntryValue(key)); + if (!cachedValue.empty() && !value.empty() && cachedValue != value) { + setErrorMessage(errorMessage, std::string("\"") + key + + "\" is set but incompatible with configured " + + keyDescription + "value."); + return false; + } + if (value.empty()) { + value = cachedValue; + } + return true; +} + bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, std::string* errorMessage) { @@ -254,19 +278,16 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, std::string extraGenerator = request.Data[kEXTRA_GENERATOR_KEY].asString(); if (buildDirectory.empty()) { - if (errorMessage) { - *errorMessage = - std::string("\"") + kBUILD_DIRECTORY_KEY + "\" is missing."; - } + setErrorMessage(errorMessage, std::string("\"") + kBUILD_DIRECTORY_KEY + + "\" is missing."); return false; } + cmake* cm = CMakeInstance(); if (cmSystemTools::PathExists(buildDirectory)) { if (!cmSystemTools::FileIsDirectory(buildDirectory)) { - if (errorMessage) { - *errorMessage = std::string("\"") + kBUILD_DIRECTORY_KEY + - "\" exists but is not a directory."; - } + setErrorMessage(errorMessage, std::string("\"") + kBUILD_DIRECTORY_KEY + + "\" exists but is not a directory."); return false; } @@ -275,77 +296,62 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, cmState* state = cm->GetState(); // Check generator: - const std::string cachedGenerator = - std::string(state->GetCacheEntryValue("CMAKE_GENERATOR")); - if (cachedGenerator.empty() && generator.empty()) { - if (errorMessage) { - *errorMessage = - std::string("\"") + kGENERATOR_KEY + "\" is required but unset."; - } - return false; - } - if (generator.empty()) { - generator = cachedGenerator; - } - if (generator != cachedGenerator) { - if (errorMessage) { - *errorMessage = std::string("\"") + kGENERATOR_KEY + - "\" set but incompatible with configured generator."; - } + if (!testValue(state, "CMAKE_GENERATOR", generator, "generator", + errorMessage)) { return false; } // check extra generator: - const std::string cachedExtraGenerator = - std::string(state->GetCacheEntryValue("CMAKE_EXTRA_GENERATOR")); - if (!cachedExtraGenerator.empty() && !extraGenerator.empty() && - cachedExtraGenerator != extraGenerator) { - if (errorMessage) { - *errorMessage = std::string("\"") + kEXTRA_GENERATOR_KEY + - "\" is set but incompatible with configured extra generator."; - } + if (!testValue(state, "CMAKE_EXTRA_GENERATOR", extraGenerator, + "extra generator", errorMessage)) { return false; } - if (extraGenerator.empty()) { - extraGenerator = cachedExtraGenerator; - } // check sourcedir: - const std::string cachedSourceDirectory = - std::string(state->GetCacheEntryValue("CMAKE_HOME_DIRECTORY")); - if (!cachedSourceDirectory.empty() && !sourceDirectory.empty() && - cachedSourceDirectory != sourceDirectory) { - if (errorMessage) { - *errorMessage = std::string("\"") + kSOURCE_DIRECTORY_KEY + - "\" is set but incompatible with configured source directory."; - } + if (!testValue(state, "CMAKE_HOME_DIRECTORY", sourceDirectory, + "source directory", errorMessage)) { return false; } - if (sourceDirectory.empty()) { - sourceDirectory = cachedSourceDirectory; - } } } if (sourceDirectory.empty()) { - if (errorMessage) { - *errorMessage = std::string("\"") + kSOURCE_DIRECTORY_KEY + - "\" is unset but required."; - } + setErrorMessage(errorMessage, std::string("\"") + kSOURCE_DIRECTORY_KEY + + "\" is unset but required."); return false; } if (!cmSystemTools::FileIsDirectory(sourceDirectory)) { - if (errorMessage) { - *errorMessage = - std::string("\"") + kSOURCE_DIRECTORY_KEY + "\" is not a directory."; - } + setErrorMessage(errorMessage, std::string("\"") + kSOURCE_DIRECTORY_KEY + + "\" is not a directory."); return false; } if (generator.empty()) { - if (errorMessage) { - *errorMessage = - std::string("\"") + kGENERATOR_KEY + "\" is unset but required."; - } + setErrorMessage(errorMessage, std::string("\"") + kGENERATOR_KEY + + "\" is unset but required."); + return false; + } + + std::vector generators; + cm->GetRegisteredGenerators(generators); + auto baseIt = std::find_if(generators.begin(), generators.end(), + [&generator](const cmake::GeneratorInfo& info) { + return info.name == generator; + }); + if (baseIt == generators.end()) { + setErrorMessage(errorMessage, std::string("Generator \"") + generator + + "\" not supported."); + return false; + } + auto extraIt = std::find_if( + generators.begin(), generators.end(), + [&generator, &extraGenerator](const cmake::GeneratorInfo& info) { + return info.baseName == generator && info.extraName == extraGenerator; + }); + if (extraIt == generators.end()) { + setErrorMessage(errorMessage, + std::string("The combination of generator \"" + generator + + "\" and extra generator \"" + extraGenerator + + "\" is not supported.")); return false; } @@ -355,11 +361,10 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, cmGlobalGenerator* gg = cm->CreateGlobalGenerator(fullGeneratorName); if (!gg) { - if (errorMessage) { - *errorMessage = - std::string("Could not set up the requested combination of \"") + - kGENERATOR_KEY + "\" and \"" + kEXTRA_GENERATOR_KEY + "\""; - } + setErrorMessage( + errorMessage, + std::string("Could not set up the requested combination of \"") + + kGENERATOR_KEY + "\" and \"" + kEXTRA_GENERATOR_KEY + "\""); return false; } diff --git a/Tests/Server/tc_handshake.json b/Tests/Server/tc_handshake.json index 5261581..975bb3d 100644 --- a/Tests/Server/tc_handshake.json +++ b/Tests/Server/tc_handshake.json @@ -59,10 +59,10 @@ { "recv": {"cookie":"zimtstern","inReplyTo":"handshake","type":"error","errorMessage":"Failed to activate protocol version: \"generator\" is unset but required."} }, { "send": {"cookie":"zimtstern","type": "handshake","protocolVersion":{"major":1},"sourceDirectory":".","buildDirectory":"/tmp/build","generator":"XXXX","extraGenerator":"CodeBlocks"} }, -{ "recv": {"cookie":"zimtstern","inReplyTo":"handshake","type":"error","errorMessage":"Failed to activate protocol version: Could not set up the requested combination of \"generator\" and \"extraGenerator\""} }, +{ "recv": {"cookie":"zimtstern","inReplyTo":"handshake","type":"error","errorMessage":"Failed to activate protocol version: Generator \"XXXX\" not supported."} }, { "send": {"cookie":"zimtstern","type": "handshake","protocolVersion":{"major":1},"sourceDirectory":".","buildDirectory":"/tmp/build","generator":"Ninja","extraGenerator":"XXXX"} }, -{ "recv": {"cookie":"zimtstern","inReplyTo":"handshake","type":"error","errorMessage":"Failed to activate protocol version: Could not set up the requested combination of \"generator\" and \"extraGenerator\""} }, +{ "recv": {"cookie":"zimtstern","inReplyTo":"handshake","type":"error","errorMessage":"Failed to activate protocol version: The combination of generator \"Ninja\" and extra generator \"XXXX\" is not supported."} }, { "send": {"cookie":"zimtstern","type": "handshake","protocolVersion":{"major":1},"sourceDirectory":".","buildDirectory":"/tmp/build","generator":"Ninja","extraGenerator":"CodeBlocks"} }, { "recv": {"cookie":"zimtstern","inReplyTo":"handshake","type":"reply"} }, ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 4 +- Source/cmServerDictionary.h | 2 + Source/cmServerProtocol.cxx | 160 ++++++++++++++++++++++++---------------- Tests/Server/tc_handshake.json | 4 +- 4 files changed, 104 insertions(+), 66 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Oct 28 00:01:09 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 28 Oct 2016 00:01:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-368-g891711a Message-ID: <20161028040110.0823EF7A00@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 891711aaffb150456d83f0698d401f61463d5ced (commit) from c6c8c24908e108b7b3c5c76e29197323ac3a4287 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=891711aaffb150456d83f0698d401f61463d5ced commit 891711aaffb150456d83f0698d401f61463d5ced Author: Kitware Robot AuthorDate: Fri Oct 28 00:01:03 2016 -0400 Commit: Kitware Robot CommitDate: Fri Oct 28 00:01:03 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 195acba..e3c01fe 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 7) -set(CMake_VERSION_PATCH 20161027) +set(CMake_VERSION_PATCH 20161028) #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 Fri Oct 28 08:20:22 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 08:20:22 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-789-g3accc28 Message-ID: <20161028122022.7B1A8F793C@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 3accc2823c60bc93c779d5911bfd7d9c3fc9d091 (commit) via f2ff94958f22e36976854ebf97029614e4c460bf (commit) from 1aaa28a5cc18cd0a8f80e7ce84ab233bc38a023f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3accc2823c60bc93c779d5911bfd7d9c3fc9d091 commit 3accc2823c60bc93c779d5911bfd7d9c3fc9d091 Merge: 1aaa28a f2ff949 Author: Brad King AuthorDate: Fri Oct 28 08:20:21 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 28 08:20:21 2016 -0400 Merge topic 'FindSDL-sound-fix' into next f2ff9495 FindSDL_sound: Fix SDL_SOUND_LIBRARIES result value https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2ff94958f22e36976854ebf97029614e4c460bf commit f2ff94958f22e36976854ebf97029614e4c460bf Author: Brad King AuthorDate: Fri Oct 28 08:13:00 2016 -0400 Commit: Brad King CommitDate: Fri Oct 28 08:15:16 2016 -0400 FindSDL_sound: Fix SDL_SOUND_LIBRARIES result value The value is meant to be a plain-variable ;-list. Remove quotes and caching. Patch-by: Aleksey Chernov (virx on gitlab.kitware.com) Closes: #16390 diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake index 3198088..cf33a4c 100644 --- a/Modules/FindSDL_sound.cmake +++ b/Modules/FindSDL_sound.cmake @@ -19,7 +19,7 @@ # SDL_SOUND_INCLUDE_DIR, where to find SDL_sound.h # SDL_SOUND_FOUND, if false, do not try to link to SDL_sound # SDL_SOUND_LIBRARIES, this contains the list of libraries that you need -# to link against. This is a read-only variable and is marked INTERNAL. +# to link against. # SDL_SOUND_EXTRAS, this is an optional variable for you to add your own # flags to SDL_SOUND_LIBRARIES. This is prepended to SDL_SOUND_LIBRARIES. # This is available mostly for cases this module failed to anticipate for @@ -367,11 +367,10 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) endif() endif() + set(SDL_SOUND_LIBRARIES ${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARIES_TMP}) else() - set(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARY}" CACHE INTERNAL "SDL_sound and dependent libraries") + set(SDL_SOUND_LIBRARIES ${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARY}) endif() - - set(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARIES_TMP}" CACHE INTERNAL "SDL_sound and dependent libraries") endif() if(SDL_SOUND_INCLUDE_DIR AND EXISTS "${SDL_SOUND_INCLUDE_DIR}/SDL_sound.h") ----------------------------------------------------------------------- Summary of changes: Modules/FindSDL_sound.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 28 08:23:02 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 08:23:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-791-gd79b8e8 Message-ID: <20161028122302.211E0F79BE@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 d79b8e85700981667f30e1b35ee9ba1b3c323ce5 (commit) via 3837a64f0f4956aefb08c4ce4cd838607492503b (commit) from 3accc2823c60bc93c779d5911bfd7d9c3fc9d091 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d79b8e85700981667f30e1b35ee9ba1b3c323ce5 commit d79b8e85700981667f30e1b35ee9ba1b3c323ce5 Merge: 3accc28 3837a64 Author: Brad King AuthorDate: Fri Oct 28 08:23:01 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 28 08:23:01 2016 -0400 Merge topic 'cmake-server-handshake-improvements' into next 3837a64f Revise topic 'cmake-server-handshake-improvements' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3837a64f0f4956aefb08c4ce4cd838607492503b commit 3837a64f0f4956aefb08c4ce4cd838607492503b Author: Brad King AuthorDate: Fri Oct 28 08:22:35 2016 -0400 Commit: Brad King CommitDate: Fri Oct 28 08:22:35 2016 -0400 Revise topic 'cmake-server-handshake-improvements' Fix typo. diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 47093c3..09b08fe 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -259,7 +259,7 @@ static bool testValue(cmState* state, const std::string& key, if (!cachedValue.empty() && !value.empty() && cachedValue != value) { setErrorMessage(errorMessage, std::string("\"") + key + "\" is set but incompatible with configured " + - keyDescription + "value."); + keyDescription + " value."); return false; } if (value.empty()) { ----------------------------------------------------------------------- Summary of changes: Source/cmServerProtocol.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 28 08:26:15 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 08:26:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-793-gfd04f8c Message-ID: <20161028122615.681B8F7A49@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 fd04f8cf253bfea097ba9e3021fa6a55c2fbc718 (commit) via 42ccbee11c1b3be12c5ebb9f69cb769d79d491ad (commit) from d79b8e85700981667f30e1b35ee9ba1b3c323ce5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd04f8cf253bfea097ba9e3021fa6a55c2fbc718 commit fd04f8cf253bfea097ba9e3021fa6a55c2fbc718 Merge: d79b8e8 42ccbee Author: Brad King AuthorDate: Fri Oct 28 08:26:14 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 28 08:26:14 2016 -0400 Merge topic 'cmake-server-handshake-improvements' into next 42ccbee1 server-mode: Handle generator toolset and platform in handshake https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42ccbee11c1b3be12c5ebb9f69cb769d79d491ad commit 42ccbee11c1b3be12c5ebb9f69cb769d79d491ad Author: Tobias Hunger AuthorDate: Thu Oct 27 11:48:31 2016 +0200 Commit: Tobias Hunger CommitDate: Fri Oct 28 13:46:15 2016 +0200 server-mode: Handle generator toolset and platform in handshake diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index a72af14..9520cc1 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -276,7 +276,9 @@ Protocol version 1.0 requires the following attributes to be set: * "sourceDirectory" with a path to the sources * "buildDirectory" with a path to the build directory * "generator" with the generator name - * "extraGenerator" (optional!) with the extra generator to be used. + * "extraGenerator" (optional!) with the extra generator to be used + * "platform" with the generator platform (if supported by the generator) + * "toolset" with the generator toolset (if supported by the generator) Example:: diff --git a/Source/cmServerDictionary.h b/Source/cmServerDictionary.h index 2d64cbd..e6a7ae6 100644 --- a/Source/cmServerDictionary.h +++ b/Source/cmServerDictionary.h @@ -62,6 +62,7 @@ static const std::string kMESSAGE_KEY = "message"; static const std::string kMINOR_KEY = "minor"; static const std::string kNAME_KEY = "name"; static const std::string kPATH_KEY = "path"; +static const std::string kPLATFORM_KEY = "platform"; static const std::string kPROGRESS_CURRENT_KEY = "progressCurrent"; static const std::string kPROGRESS_MAXIMUM_KEY = "progressMaximum"; static const std::string kPROGRESS_MESSAGE_KEY = "progressMessage"; @@ -77,6 +78,7 @@ static const std::string kSUPPORTED_PROTOCOL_VERSIONS = static const std::string kSYSROOT_KEY = "sysroot"; static const std::string kTARGETS_KEY = "targets"; static const std::string kTITLE_KEY = "title"; +static const std::string kTOOLSET_KEY = "toolset"; static const std::string kTRACE_EXPAND_KEY = "traceExpand"; static const std::string kTRACE_KEY = "trace"; static const std::string kTYPE_KEY = "type"; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index f3ecfaa..09b08fe 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -259,7 +259,7 @@ static bool testValue(cmState* state, const std::string& key, if (!cachedValue.empty() && !value.empty() && cachedValue != value) { setErrorMessage(errorMessage, std::string("\"") + key + "\" is set but incompatible with configured " + - keyDescription + "value."); + keyDescription + " value."); return false; } if (value.empty()) { @@ -276,6 +276,8 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, request.Data[kBUILD_DIRECTORY_KEY].asString(); std::string generator = request.Data[kGENERATOR_KEY].asString(); std::string extraGenerator = request.Data[kEXTRA_GENERATOR_KEY].asString(); + std::string toolset = request.Data[kTOOLSET_KEY].asString(); + std::string platform = request.Data[kPLATFORM_KEY].asString(); if (buildDirectory.empty()) { setErrorMessage(errorMessage, std::string("\"") + kBUILD_DIRECTORY_KEY + @@ -312,6 +314,18 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, "source directory", errorMessage)) { return false; } + + // check toolset: + if (!testValue(state, "CMAKE_GENERATOR_TOOLSET", toolset, "toolset", + errorMessage)) { + return false; + } + + // check platform: + if (!testValue(state, "CMAKE_GENERATOR_PLATFORM", platform, "platform", + errorMessage)) { + return false; + } } } @@ -354,11 +368,26 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, "\" is not supported.")); return false; } + if (!extraIt->supportsToolset && !toolset.empty()) { + setErrorMessage(errorMessage, + std::string("Toolset was provided but is not supported by " + "the requested generator.")); + return false; + } + if (!extraIt->supportsPlatform && !platform.empty()) { + setErrorMessage(errorMessage, + std::string("Platform was provided but is not supported " + "by the requested generator.")); + return false; + } const std::string fullGeneratorName = cmExternalMakefileProjectGenerator::CreateFullGeneratorName( generator, extraGenerator); + cm->SetGeneratorToolset(toolset); + cm->SetGeneratorPlatform(platform); + cmGlobalGenerator* gg = cm->CreateGlobalGenerator(fullGeneratorName); if (!gg) { setErrorMessage( ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 28 08:26:52 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 08:26:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-371-g18a966c Message-ID: <20161028122652.359F8F7A62@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 18a966c80feb7459aadbda1e34f2c0a63beb7044 (commit) via 42ccbee11c1b3be12c5ebb9f69cb769d79d491ad (commit) via d792491c405ce47bcd779f53fa0f9422bb3df494 (commit) from 891711aaffb150456d83f0698d401f61463d5ced (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=18a966c80feb7459aadbda1e34f2c0a63beb7044 commit 18a966c80feb7459aadbda1e34f2c0a63beb7044 Merge: 891711a 42ccbee Author: Brad King AuthorDate: Fri Oct 28 08:26:49 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 28 08:26:49 2016 -0400 Merge topic 'cmake-server-handshake-improvements' 42ccbee1 server-mode: Handle generator toolset and platform in handshake d792491c cmake-server: Better error reporting during handshake ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 4 +- Source/cmServerDictionary.h | 2 + Source/cmServerProtocol.cxx | 160 ++++++++++++++++++++++++---------------- Tests/Server/tc_handshake.json | 4 +- 4 files changed, 104 insertions(+), 66 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 28 08:28:53 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 08:28:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-374-gee0f2d2 Message-ID: <20161028122853.080B4F7A95@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 ee0f2d23fcf3cd7a67ad8d7bd132a475ed78405f (commit) via a316f5fd6d01ce0ba452671eb0b41812db9bf81b (commit) via 075cc0f28c4409b94f1baaf6405acf923abfb1b6 (commit) from 18a966c80feb7459aadbda1e34f2c0a63beb7044 (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 Fri Oct 28 08:28:53 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 08:28:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-799-gdb98cfb Message-ID: <20161028122853.25BC4F7A96@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 db98cfbdaa2eae996d46a0d21f195dbb2e030c9d (commit) via ee0f2d23fcf3cd7a67ad8d7bd132a475ed78405f (commit) via a316f5fd6d01ce0ba452671eb0b41812db9bf81b (commit) via 18a966c80feb7459aadbda1e34f2c0a63beb7044 (commit) via 891711aaffb150456d83f0698d401f61463d5ced (commit) via 075cc0f28c4409b94f1baaf6405acf923abfb1b6 (commit) from fd04f8cf253bfea097ba9e3021fa6a55c2fbc718 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db98cfbdaa2eae996d46a0d21f195dbb2e030c9d commit db98cfbdaa2eae996d46a0d21f195dbb2e030c9d Merge: fd04f8c ee0f2d2 Author: Brad King AuthorDate: Fri Oct 28 08:28:30 2016 -0400 Commit: Brad King CommitDate: Fri Oct 28 08:28:30 2016 -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 Fri Oct 28 08:28:53 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 08:28:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.7.0-rc2-20-ga316f5f Message-ID: <20161028122853.3D33AF7A95@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 a316f5fd6d01ce0ba452671eb0b41812db9bf81b (commit) via 42ccbee11c1b3be12c5ebb9f69cb769d79d491ad (commit) via d792491c405ce47bcd779f53fa0f9422bb3df494 (commit) via 075cc0f28c4409b94f1baaf6405acf923abfb1b6 (commit) via 554b4f9010add22ef83bb22858f9fdcb52afbc7e (commit) from 4ec0329bf1cc39eddfa9dd5c58e83992b8979181 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 4 +- Modules/Compiler/Intel-CXX-FeatureTests.cmake | 6 +- Source/cmServerDictionary.h | 2 + Source/cmServerProtocol.cxx | 160 +++++++++++++++---------- Tests/Server/tc_handshake.json | 4 +- 5 files changed, 107 insertions(+), 69 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 28 09:02:59 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 09:02:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-804-g6dc7f3c Message-ID: <20161028130259.3205EF7738@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 6dc7f3cd015c7ffae07e391f102dafa211c475b9 (commit) via 369d580937b49c1c5672ba3512c2a736581d545c (commit) via a5a3642f9292bb697176aaf1077fc98302f286b7 (commit) via d34ac22fec975a9f5b6b6b37134e1722ffa06025 (commit) via 967dcf36d07ba9b7e40383834906fe1d657456b3 (commit) from db98cfbdaa2eae996d46a0d21f195dbb2e030c9d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6dc7f3cd015c7ffae07e391f102dafa211c475b9 commit 6dc7f3cd015c7ffae07e391f102dafa211c475b9 Merge: db98cfb 369d580 Author: Brad King AuthorDate: Fri Oct 28 09:02:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 28 09:02:57 2016 -0400 Merge topic 'intel-compile-features-windows' into next 369d5809 Features: Record features for Intel Compiler on Windows a5a3642f Features: Port Intel CXX features to test macros where possible d34ac22f Features: Unset Intel CXX feature temporaries 967dcf36 Intel: Remove incorrect C++98 standard compiler flag on Windows https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=369d580937b49c1c5672ba3512c2a736581d545c commit 369d580937b49c1c5672ba3512c2a736581d545c Author: Brad King AuthorDate: Wed Oct 26 15:02:35 2016 -0400 Commit: Brad King CommitDate: Thu Oct 27 13:33:10 2016 -0400 Features: Record features for Intel Compiler on Windows Since this compiler always defines `__cplusplus` to `1` we need to use `_MSC_VER`, `__INTEL_CXX11_MODE__`, and the feature test macro named `__cpp_aggregate_nsdmi` to detect C++11 and C++14 modes. With no `-Qstd=` flag this compiler defaults to C++98 plus a subset of C++11/C++14 features needed to be compatible with MSVC. We pretend it is plain C++98 and add a `-Qstd=` flag whenever needed for C++11 or above features even if they would happen to be available in MSVC-mode. Closes: #16384 diff --git a/Help/manual/cmake-compile-features.7.rst b/Help/manual/cmake-compile-features.7.rst index 7289e61..9862d4a 100644 --- a/Help/manual/cmake-compile-features.7.rst +++ b/Help/manual/cmake-compile-features.7.rst @@ -309,4 +309,4 @@ versions specified for each: * ``GNU``: GNU compiler versions 4.4 through 5.0. * ``MSVC``: Microsoft Visual Studio versions 2010 through 2015. * ``SunPro``: Oracle SolarisStudio version 12.4. -* ``Intel``: Intel compiler versions 12.1 through 16.0 on UNIX platforms. +* ``Intel``: Intel compiler versions 12.1 through 17.0. diff --git a/Help/release/dev/intel-compile-features-windows.rst b/Help/release/dev/intel-compile-features-windows.rst new file mode 100644 index 0000000..6a2cdfe --- /dev/null +++ b/Help/release/dev/intel-compile-features-windows.rst @@ -0,0 +1,6 @@ +intel-compile-features-windows +------------------------------ + +* The :manual:`Compile Features ` functionality + is now aware of features supported by Intel C++ compilers versions 12.1 + through 17.0 on UNIX and Windows platforms. diff --git a/Modules/Compiler/Intel-C-FeatureTests.cmake b/Modules/Compiler/Intel-C-FeatureTests.cmake index 34175c8..5d09767 100644 --- a/Modules/Compiler/Intel-C-FeatureTests.cmake +++ b/Modules/Compiler/Intel-C-FeatureTests.cmake @@ -3,15 +3,11 @@ # - https://software.intel.com/en-us/articles/c99-support-in-intel-c-compiler # - https://software.intel.com/en-us/articles/c11-support-in-intel-c-compiler -# FIXME: Intel C feature detection works only when simulating the GNU compiler. -if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") - return() -endif() - set(DETECT_C99 "defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L") +set(DETECT_C11 "defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L") #static assert is only around in version 1500 update 2 and above -set(_cmake_feature_test_c_static_assert "(__INTEL_COMPILER > 1500 || (__INTEL_COMPILER == 1500 && __INTEL_COMPILER_UPDATE > 1) ) && ${DETECT_C99}") +set(_cmake_feature_test_c_static_assert "(__INTEL_COMPILER > 1500 || (__INTEL_COMPILER == 1500 && __INTEL_COMPILER_UPDATE > 1) ) && (${DETECT_C11} || ${DETECT_C99} && !defined(_MSC_VER))") set(_cmake_oldestSupported "__INTEL_COMPILER >= 1110") set(Intel_C99 "${_cmake_oldestSupported} && ${DETECT_C99}") @@ -21,3 +17,4 @@ set(_cmake_feature_test_c_function_prototypes "${_cmake_oldestSupported}") unset(Intel_C99) unset(DETECT_C99) +unset(DETECT_C11) diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index 61adf40..5815857 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -52,8 +52,7 @@ macro(cmake_record_c_compile_features) endmacro() set(_result 0) - if (NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC" AND - NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0) _get_intel_c_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES) endif() diff --git a/Modules/Compiler/Intel-CXX-FeatureTests.cmake b/Modules/Compiler/Intel-CXX-FeatureTests.cmake index 71641ff..5b74fab 100644 --- a/Modules/Compiler/Intel-CXX-FeatureTests.cmake +++ b/Modules/Compiler/Intel-CXX-FeatureTests.cmake @@ -12,12 +12,6 @@ # - __cpp_rvalue_references 200610 # - __cpp_variadic_templates 200704 -# FIXME: Intel C++ feature detection works only when simulating the GNU compiler. -# When simulating MSVC, Intel always sets __cplusplus to 199711L. -if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") - return() -endif() - set(_cmake_feature_test_cxx_variable_templates "__cpp_variable_templates >= 201304") set(_cmake_feature_test_cxx_relaxed_constexpr "__cpp_constexpr >= 201304") @@ -27,7 +21,7 @@ set(DETECT_CXX11 "((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || #if you are compiling as 98/11/14. So to properly detect C++14 with this version #we look for the existence of __GXX_EXPERIMENTAL_CXX0X__ but not __INTEL_CXX11_MODE__ set(DETECT_BUGGY_ICC15 "((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE == 1))") -set(DETECT_CXX14 "((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) || ((${DETECT_BUGGY_ICC15}) && defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(__INTEL_CXX11_MODE__) ) )") +set(DETECT_CXX14 "((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) || ((${DETECT_BUGGY_ICC15}) && defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(__INTEL_CXX11_MODE__) ) || (defined(_MSC_VER) && defined(__INTEL_CXX11_MODE__) && defined(__cpp_aggregate_nsdmi)) )") unset(DETECT_BUGGY_ICC15) set(Intel16_CXX14 "__INTEL_COMPILER >= 1600 && ${DETECT_CXX14}") @@ -61,7 +55,7 @@ unset(Intel15_CXX11) set(Intel14_CXX11 "${DETECT_CXX11} && (__INTEL_COMPILER > 1400 || (__INTEL_COMPILER == 1400 && __INTEL_COMPILER_UPDATE >= 2))") # Documented as 12.0+ but in testing it only works on 14.0.2+ -set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${Intel14_CXX11}") +set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${Intel14_CXX11} && !defined(_MSC_VER)") set(Intel14_CXX11 "__INTEL_COMPILER >= 1400 && ${DETECT_CXX11}") set(_cmake_feature_test_cxx_delegating_constructors "${Intel14_CXX11}") diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 63081cc..b6bc2ee 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -65,8 +65,7 @@ macro(cmake_record_cxx_compile_features) endmacro() set(_result 0) - if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC" AND - NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0) _get_intel_features("${CMAKE_CXX14_STANDARD_COMPILE_OPTION}" CMAKE_CXX14_COMPILE_FEATURES) endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5a3642f9292bb697176aaf1077fc98302f286b7 commit a5a3642f9292bb697176aaf1077fc98302f286b7 Author: Brad King AuthorDate: Wed Oct 26 13:47:00 2016 -0400 Commit: Brad King CommitDate: Thu Oct 27 13:28:34 2016 -0400 Features: Port Intel CXX features to test macros where possible The Intel 16 and 17 compilers define feature test macros of the form `__cpp_`. Use them where possible to detect corresponding features. diff --git a/Modules/Compiler/Intel-CXX-FeatureTests.cmake b/Modules/Compiler/Intel-CXX-FeatureTests.cmake index c8db99e..71641ff 100644 --- a/Modules/Compiler/Intel-CXX-FeatureTests.cmake +++ b/Modules/Compiler/Intel-CXX-FeatureTests.cmake @@ -3,6 +3,15 @@ # - https://software.intel.com/en-us/articles/c14-features-supported-by-intel-c-compiler # - http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0096r3.html +# Notes: +# [1] Some Intel versions define some feature macros under -std=gnu++98 +# that do not work in that mode (or work with warnings): +# - __cpp_attributes 200809 +# - __cpp_init_captures 201304 +# - __cpp_lambdas 200907 +# - __cpp_rvalue_references 200610 +# - __cpp_variadic_templates 200704 + # FIXME: Intel C++ feature detection works only when simulating the GNU compiler. # When simulating MSVC, Intel always sets __cplusplus to 199711L. if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") @@ -24,27 +33,29 @@ unset(DETECT_BUGGY_ICC15) set(Intel16_CXX14 "__INTEL_COMPILER >= 1600 && ${DETECT_CXX14}") set(_cmake_feature_test_cxx_aggregate_default_initializers "${Intel16_CXX14}") set(_cmake_feature_test_cxx_contextual_conversions "${Intel16_CXX14}") -set(_cmake_feature_test_cxx_generic_lambdas "${Intel16_CXX14}") +set(_cmake_feature_test_cxx_generic_lambdas "__cpp_generic_lambdas >= 201304") set(_cmake_feature_test_cxx_digit_separators "${Intel16_CXX14}") # This test is supposed to work in Intel 14 but the compiler has a bug # in versions 14 and 15:: # https://software.intel.com/en-us/forums/intel-c-compiler/topic/600514 -# It also appears to fail with an internal compiler error on Intel 16. +# It also appears to fail with an internal compiler error on Intel 16 and 17. #set(_cmake_feature_test_cxx_generalized_initializers "${Intel16_CXX14}") unset(Intel16_CXX14) -set(Intel15_CXX14 "__INTEL_COMPILER >= 1500 && ${DETECT_CXX14}") -set(_cmake_feature_test_cxx_decltype_auto "${Intel15_CXX14}") -set(_cmake_feature_test_cxx_lambda_init_captures "${Intel15_CXX14}") +set(Intel15 "__INTEL_COMPILER >= 1500") +set(Intel15_CXX14 "${Intel15} && ${DETECT_CXX14}") +set(_cmake_feature_test_cxx_decltype_auto "__cpp_decltype_auto >= 201304 || ${Intel15_CXX14}") +set(_cmake_feature_test_cxx_lambda_init_captures "(__cpp_init_captures >= 201304 || ${Intel15}) && ${DETECT_CXX14}") # [1] set(_cmake_feature_test_cxx_attribute_deprecated "${Intel15_CXX14}") -set(_cmake_feature_test_cxx_return_type_deduction "${Intel15_CXX14}") +set(_cmake_feature_test_cxx_return_type_deduction "__cpp_return_type_deduction >= 201304 || ${Intel15_CXX14}") unset(Intel15_CXX14) +unset(Intel15) set(Intel15_CXX11 "__INTEL_COMPILER >= 1500 && ${DETECT_CXX11}") set(_cmake_feature_test_cxx_alignas "${Intel15_CXX11}") set(_cmake_feature_test_cxx_alignof "${Intel15_CXX11}") set(_cmake_feature_test_cxx_inheriting_constructors "${Intel15_CXX11}") -set(_cmake_feature_test_cxx_user_literals "${Intel15_CXX11}") +set(_cmake_feature_test_cxx_user_literals "__cpp_user_defined_literals >= 200809 || ${Intel15_CXX11}") set(_cmake_feature_test_cxx_thread_local "${Intel15_CXX11}") unset(Intel15_CXX11) @@ -54,12 +65,12 @@ set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${Intel14_CXX11}") set(Intel14_CXX11 "__INTEL_COMPILER >= 1400 && ${DETECT_CXX11}") set(_cmake_feature_test_cxx_delegating_constructors "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_constexpr "${Intel14_CXX11}") +set(_cmake_feature_test_cxx_constexpr "__cpp_constexpr >= 200704 || ${Intel14_CXX11}") set(_cmake_feature_test_cxx_sizeof_member "${Intel14_CXX11}") set(_cmake_feature_test_cxx_strong_enums "${Intel14_CXX11}") set(_cmake_feature_test_cxx_reference_qualified_functions "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_raw_string_literals "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_unicode_literals "${Intel14_CXX11}") +set(_cmake_feature_test_cxx_raw_string_literals "__cpp_raw_strings >= 200710 || ${Intel14_CXX11}") +set(_cmake_feature_test_cxx_unicode_literals "__cpp_unicode_literals >= 200710 || ${Intel14_CXX11}") set(_cmake_feature_test_cxx_inline_namespaces "${Intel14_CXX11}") set(_cmake_feature_test_cxx_unrestricted_unions "${Intel14_CXX11}") set(_cmake_feature_test_cxx_nonstatic_member_init "${Intel14_CXX11}") @@ -77,22 +88,23 @@ set(_cmake_feature_test_cxx_range_for "${Intel13_CXX11}") set(_cmake_feature_test_cxx_uniform_initialization "${Intel13_CXX11}") unset(Intel13_CXX11) -set(Intel121_CXX11 "${_cmake_oldestSupported} && ${DETECT_CXX11}") -set(_cmake_feature_test_cxx_variadic_templates "${Intel121_CXX11}") +set(Intel121 "${_cmake_oldestSupported}") +set(Intel121_CXX11 "${Intel121} && ${DETECT_CXX11}") +set(_cmake_feature_test_cxx_variadic_templates "(__cpp_variadic_templates >= 200704 || ${Intel121}) && ${DETECT_CXX11}") # [1] set(_cmake_feature_test_cxx_alias_templates "${Intel121_CXX11}") set(_cmake_feature_test_cxx_nullptr "${Intel121_CXX11}") set(_cmake_feature_test_cxx_trailing_return_types "${Intel121_CXX11}") -set(_cmake_feature_test_cxx_attributes "${Intel121_CXX11}") +set(_cmake_feature_test_cxx_attributes "__cpp_attributes >= 200809 || ${Intel121}") set(_cmake_feature_test_cxx_default_function_template_args "${Intel121_CXX11}") set(_cmake_feature_test_cxx_extended_friend_declarations "${Intel121_CXX11}") -set(_cmake_feature_test_cxx_rvalue_references "${Intel121_CXX11}") -set(_cmake_feature_test_cxx_decltype "${Intel121_CXX11}") +set(_cmake_feature_test_cxx_rvalue_references "(__cpp_rvalue_references >= 200610 || ${Intel121}) && ${DETECT_CXX11}") # [1] +set(_cmake_feature_test_cxx_decltype "__cpp_decltype >= 200707 || ${Intel121_CXX11}") set(_cmake_feature_test_cxx_defaulted_functions "${Intel121_CXX11}") set(_cmake_feature_test_cxx_deleted_functions "${Intel121_CXX11}") set(_cmake_feature_test_cxx_local_type_template_args "${Intel121_CXX11}") -set(_cmake_feature_test_cxx_lambdas "${Intel121_CXX11}") -set(_cmake_feature_test_cxx_binary_literals "${Intel121_CXX11}") -set(_cmake_feature_test_cxx_static_assert "${Intel121_CXX11}") +set(_cmake_feature_test_cxx_lambdas "(__cpp_lambdas >= 200907 || ${Intel121}) && ${DETECT_CXX11}") # [1] +set(_cmake_feature_test_cxx_binary_literals "__cpp_binary_literals >= 201304 || ${Intel121}") +set(_cmake_feature_test_cxx_static_assert "(__cpp_static_assert >= 200410 || ${Intel121}) && ${DETECT_CXX11}") set(_cmake_feature_test_cxx_right_angle_brackets "${Intel121_CXX11}") set(_cmake_feature_test_cxx_auto_type "${Intel121_CXX11}") set(_cmake_feature_test_cxx_extern_templates "${Intel121_CXX11}") @@ -101,6 +113,7 @@ set(_cmake_feature_test_cxx_long_long_type "${Intel121_CXX11}") set(_cmake_feature_test_cxx_func_identifier "${Intel121_CXX11}") set(_cmake_feature_test_cxx_template_template_parameters "${Intel121_CXX11}") unset(Intel121_CXX11) +unset(Intel121) unset(DETECT_CXX11) unset(DETECT_CXX14) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d34ac22fec975a9f5b6b6b37134e1722ffa06025 commit d34ac22fec975a9f5b6b6b37134e1722ffa06025 Author: Brad King AuthorDate: Wed Oct 26 13:46:11 2016 -0400 Commit: Brad King CommitDate: Thu Oct 27 13:28:34 2016 -0400 Features: Unset Intel CXX feature temporaries diff --git a/Modules/Compiler/Intel-CXX-FeatureTests.cmake b/Modules/Compiler/Intel-CXX-FeatureTests.cmake index 57a05c8..c8db99e 100644 --- a/Modules/Compiler/Intel-CXX-FeatureTests.cmake +++ b/Modules/Compiler/Intel-CXX-FeatureTests.cmake @@ -19,6 +19,7 @@ set(DETECT_CXX11 "((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || #we look for the existence of __GXX_EXPERIMENTAL_CXX0X__ but not __INTEL_CXX11_MODE__ set(DETECT_BUGGY_ICC15 "((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE == 1))") set(DETECT_CXX14 "((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) || ((${DETECT_BUGGY_ICC15}) && defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(__INTEL_CXX11_MODE__) ) )") +unset(DETECT_BUGGY_ICC15) set(Intel16_CXX14 "__INTEL_COMPILER >= 1600 && ${DETECT_CXX14}") set(_cmake_feature_test_cxx_aggregate_default_initializers "${Intel16_CXX14}") @@ -30,12 +31,14 @@ set(_cmake_feature_test_cxx_digit_separators "${Intel16_CXX14}") # https://software.intel.com/en-us/forums/intel-c-compiler/topic/600514 # It also appears to fail with an internal compiler error on Intel 16. #set(_cmake_feature_test_cxx_generalized_initializers "${Intel16_CXX14}") +unset(Intel16_CXX14) set(Intel15_CXX14 "__INTEL_COMPILER >= 1500 && ${DETECT_CXX14}") set(_cmake_feature_test_cxx_decltype_auto "${Intel15_CXX14}") set(_cmake_feature_test_cxx_lambda_init_captures "${Intel15_CXX14}") set(_cmake_feature_test_cxx_attribute_deprecated "${Intel15_CXX14}") set(_cmake_feature_test_cxx_return_type_deduction "${Intel15_CXX14}") +unset(Intel15_CXX14) set(Intel15_CXX11 "__INTEL_COMPILER >= 1500 && ${DETECT_CXX11}") set(_cmake_feature_test_cxx_alignas "${Intel15_CXX11}") @@ -43,6 +46,7 @@ set(_cmake_feature_test_cxx_alignof "${Intel15_CXX11}") set(_cmake_feature_test_cxx_inheriting_constructors "${Intel15_CXX11}") set(_cmake_feature_test_cxx_user_literals "${Intel15_CXX11}") set(_cmake_feature_test_cxx_thread_local "${Intel15_CXX11}") +unset(Intel15_CXX11) set(Intel14_CXX11 "${DETECT_CXX11} && (__INTEL_COMPILER > 1400 || (__INTEL_COMPILER == 1400 && __INTEL_COMPILER_UPDATE >= 2))") # Documented as 12.0+ but in testing it only works on 14.0.2+ @@ -64,12 +68,14 @@ set(_cmake_feature_test_cxx_override "${Intel14_CXX11}") set(_cmake_feature_test_cxx_final "${Intel14_CXX11}") set(_cmake_feature_test_cxx_noexcept "${Intel14_CXX11}") set(_cmake_feature_test_cxx_defaulted_move_initializers "${Intel14_CXX11}") +unset(Intel14_CXX11) set(Intel13_CXX11 "__INTEL_COMPILER >= 1300 && ${DETECT_CXX11}") set(_cmake_feature_test_cxx_explicit_conversions "${Intel13_CXX11}") set(_cmake_feature_test_cxx_range_for "${Intel13_CXX11}") # Cannot find Intel documentation for N2640: cxx_uniform_initialization set(_cmake_feature_test_cxx_uniform_initialization "${Intel13_CXX11}") +unset(Intel13_CXX11) set(Intel121_CXX11 "${_cmake_oldestSupported} && ${DETECT_CXX11}") set(_cmake_feature_test_cxx_variadic_templates "${Intel121_CXX11}") @@ -94,3 +100,7 @@ set(_cmake_feature_test_cxx_variadic_macros "${Intel121_CXX11}") set(_cmake_feature_test_cxx_long_long_type "${Intel121_CXX11}") set(_cmake_feature_test_cxx_func_identifier "${Intel121_CXX11}") set(_cmake_feature_test_cxx_template_template_parameters "${Intel121_CXX11}") +unset(Intel121_CXX11) + +unset(DETECT_CXX11) +unset(DETECT_CXX14) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=967dcf36d07ba9b7e40383834906fe1d657456b3 commit 967dcf36d07ba9b7e40383834906fe1d657456b3 Author: Brad King AuthorDate: Thu Oct 27 13:11:10 2016 -0400 Commit: Brad King CommitDate: Thu Oct 27 13:28:34 2016 -0400 Intel: Remove incorrect C++98 standard compiler flag on Windows The change in commit 05e05cd2 (Intel: Fix compiler C++98 standard flag on Windows, 2016-10-26) was wrong. The Intel C++ Compiler for Windows does not support either `-Qstd=c++98` or `-Qstd=gnu++98`. Simply remove both flags for this compiler and use no options at all to achieve this mode. Issue: #16384 diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 29e02d3..63081cc 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -35,11 +35,12 @@ endif() if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") - set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=gnu++98") + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "") else() set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "${_std}=gnu++98") endif() - set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "${_std}=${_ext}98") endif() if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) @@ -67,13 +68,13 @@ macro(cmake_record_cxx_compile_features) if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0) - _get_intel_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES) + _get_intel_features("${CMAKE_CXX14_STANDARD_COMPILE_OPTION}" CMAKE_CXX14_COMPILE_FEATURES) endif() if (_result EQUAL 0) - _get_intel_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES) + _get_intel_features("${CMAKE_CXX11_STANDARD_COMPILE_OPTION}" CMAKE_CXX11_COMPILE_FEATURES) endif() if (_result EQUAL 0) - _get_intel_features(${CMAKE_CXX98_STANDARD_COMPILE_OPTION} CMAKE_CXX98_COMPILE_FEATURES) + _get_intel_features("${CMAKE_CXX98_STANDARD_COMPILE_OPTION}" CMAKE_CXX98_COMPILE_FEATURES) endif() endif() endmacro() ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-compile-features.7.rst | 2 +- .../release/dev/intel-compile-features-windows.rst | 6 ++ Modules/Compiler/Intel-C-FeatureTests.cmake | 9 +-- Modules/Compiler/Intel-C.cmake | 3 +- Modules/Compiler/Intel-CXX-FeatureTests.cmake | 67 ++++++++++++-------- Modules/Compiler/Intel-CXX.cmake | 14 ++-- 6 files changed, 60 insertions(+), 41 deletions(-) create mode 100644 Help/release/dev/intel-compile-features-windows.rst hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 28 09:10:38 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 09:10:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-806-gab06931 Message-ID: <20161028131038.A25F9F6838@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 ab0693126ee1cf32aaef440b778f8a0a62e127dc (commit) via 95805d725d49af665c2254f97effbe8b812239ea (commit) from 6dc7f3cd015c7ffae07e391f102dafa211c475b9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab0693126ee1cf32aaef440b778f8a0a62e127dc commit ab0693126ee1cf32aaef440b778f8a0a62e127dc Merge: 6dc7f3c 95805d7 Author: Brad King AuthorDate: Fri Oct 28 09:10:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 28 09:10:37 2016 -0400 Merge topic 'st2-env-vars-variable' into next 95805d72 Sublime: Add option to specify env vars for the .sublime-project https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95805d725d49af665c2254f97effbe8b812239ea commit 95805d725d49af665c2254f97effbe8b812239ea Author: Bruno Pedrosa AuthorDate: Wed Oct 26 20:58:11 2016 +0200 Commit: Brad King CommitDate: Thu Oct 27 14:07:18 2016 -0400 Sublime: Add option to specify env vars for the .sublime-project Create a `CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS` variable to control addition of env vars in the `.sublime-project`. Closes: #16387 diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index a5b1daa..93e809a 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -160,6 +160,7 @@ Variables that Change Behavior /variable/CMAKE_PROJECT_PROJECT-NAME_INCLUDE /variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY /variable/CMAKE_STAGING_PREFIX + /variable/CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS /variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE /variable/CMAKE_SYSTEM_APPBUNDLE_PATH /variable/CMAKE_SYSTEM_FRAMEWORK_PATH diff --git a/Help/release/dev/st2-env-settings.rst b/Help/release/dev/st2-env-settings.rst new file mode 100644 index 0000000..7b36347 --- /dev/null +++ b/Help/release/dev/st2-env-settings.rst @@ -0,0 +1,6 @@ +st2-env-settings +---------------- + +* The :generator:`Sublime Text 2` extra generator learned to place + environment variables in the generated ``.sublime-project``. + See the :variable:`CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS` variable. diff --git a/Help/variable/CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS.rst b/Help/variable/CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS.rst new file mode 100644 index 0000000..02c8663 --- /dev/null +++ b/Help/variable/CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS.rst @@ -0,0 +1,25 @@ +CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS +--------------------------------- + +This variable contains a list of env vars as a list of tokens with the +syntax ``var=value``. + +Example: + +.. code-block:: cmake + + set(CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS + "FOO=FOO1\;FOO2\;FOON" + "BAR=BAR1\;BAR2\;BARN" + "BAZ=BAZ1\;BAZ2\;BAZN" + "FOOBAR=FOOBAR1\;FOOBAR2\;FOOBARN" + "VALID=" + ) + +In case of malformed variables CMake will fail: + +.. code-block:: cmake + + set(CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS + "THIS_IS_NOT_VALID" + ) diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index f46019e..ff5036f 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -62,6 +62,8 @@ void cmExtraSublimeTextGenerator::Generate() { this->ExcludeBuildFolder = this->GlobalGenerator->GlobalSettingIsOn( "CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE"); + this->EnvSettings = this->GlobalGenerator->GetSafeGlobalSetting( + "CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS"); // for each sub project in the project create a sublime text 2 project for (std::map >::const_iterator @@ -130,7 +132,37 @@ void cmExtraSublimeTextGenerator::CreateNewProjectFile( // End of build_systems fout << "\n\t]"; - fout << "\n\t}"; + std::string systemName = mf->GetSafeDefinition("CMAKE_SYSTEM_NAME"); + std::vector tokens; + cmSystemTools::ExpandListArgument(this->EnvSettings, tokens); + + if (!this->EnvSettings.empty()) { + fout << ","; + fout << "\n\t\"env\":"; + fout << "\n\t{"; + fout << "\n\t\t" << systemName << ":"; + fout << "\n\t\t{"; + for (std::vector::iterator i = tokens.begin(); + i != tokens.end(); ++i) { + size_t const pos = i->find_first_of('='); + + if (pos != std::string::npos) { + std::string varName = i->substr(0, pos); + std::string varValue = i->substr(pos + 1); + + fout << "\n\t\t\t\"" << varName << "\":\"" << varValue << "\""; + } else { + std::ostringstream e; + e << "Could not parse Env Vars specified in " + "\"CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS\"" + << ", corrupted string " << *i; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + } + } + fout << "\n\t\t}"; + fout << "\n\t}"; + } + fout << "\n}"; } void cmExtraSublimeTextGenerator::AppendAllTargets( diff --git a/Source/cmExtraSublimeTextGenerator.h b/Source/cmExtraSublimeTextGenerator.h index 0c58221..a860d34 100644 --- a/Source/cmExtraSublimeTextGenerator.h +++ b/Source/cmExtraSublimeTextGenerator.h @@ -66,6 +66,7 @@ private: cmGeneratorTarget* gtgt); bool ExcludeBuildFolder; + std::string EnvSettings; }; #endif ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 1 + Help/release/dev/st2-env-settings.rst | 6 ++++ .../variable/CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS.rst | 25 ++++++++++++++ Source/cmExtraSublimeTextGenerator.cxx | 34 +++++++++++++++++++- Source/cmExtraSublimeTextGenerator.h | 1 + 5 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 Help/release/dev/st2-env-settings.rst create mode 100644 Help/variable/CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS.rst hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 28 10:42:44 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 10:42:44 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-808-ge7f1465 Message-ID: <20161028144244.4EEF7F6E6B@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 e7f14657496e3ff5ef5824a95d7ddb1eb533120f (commit) via e29f33cd20520d216a478348fcae456ec47e68be (commit) from ab0693126ee1cf32aaef440b778f8a0a62e127dc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7f14657496e3ff5ef5824a95d7ddb1eb533120f commit e7f14657496e3ff5ef5824a95d7ddb1eb533120f Merge: ab06931 e29f33c Author: Brad King AuthorDate: Fri Oct 28 10:42:43 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 28 10:42:43 2016 -0400 Merge topic 'FindMatlab-9.1' into next e29f33cd FindMatlab: Add support for Matlab 2016b (9.1) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e29f33cd20520d216a478348fcae456ec47e68be commit e29f33cd20520d216a478348fcae456ec47e68be Author: Francesco Romano AuthorDate: Fri Oct 28 11:47:16 2016 +0200 Commit: Brad King CommitDate: Fri Oct 28 10:41:43 2016 -0400 FindMatlab: Add support for Matlab 2016b (9.1) diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index b7f2db5..7ecc134 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -225,6 +225,7 @@ if(NOT MATLAB_ADDITIONAL_VERSIONS) endif() set(MATLAB_VERSIONS_MAPPING + "R2016b=9.1" "R2016a=9.0" "R2015b=8.6" "R2015a=8.5" ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 28 11:20:28 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 11:20:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-811-g940627d Message-ID: <20161028152028.0DBCEF71E4@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 940627da617082b135d09ee3712970fc42f00aa2 (commit) via 9a58517df4168a5d928b715fcaa96fc24df9b40c (commit) via 1e4bb358946a100ea04bbc97f8195b90b44a5e9c (commit) from e7f14657496e3ff5ef5824a95d7ddb1eb533120f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=940627da617082b135d09ee3712970fc42f00aa2 commit 940627da617082b135d09ee3712970fc42f00aa2 Merge: e7f1465 9a58517 Author: Brad King AuthorDate: Fri Oct 28 11:20:26 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 28 11:20:26 2016 -0400 Merge topic 'src-COMPILE_FLAGS-genex' into next 9a58517d Tests: Add case for Xcode per-config per-source COMPILE_FLAGS diagnostic 1e4bb358 Add generator expression support to per-source COMPILE_FLAGS https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a58517df4168a5d928b715fcaa96fc24df9b40c commit 9a58517df4168a5d928b715fcaa96fc24df9b40c Author: Brad King AuthorDate: Fri Oct 28 11:18:15 2016 -0400 Commit: Brad King CommitDate: Fri Oct 28 11:18:15 2016 -0400 Tests: Add case for Xcode per-config per-source COMPILE_FLAGS diagnostic diff --git a/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-result.txt b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-stderr.txt b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-stderr.txt new file mode 100644 index 0000000..6500649 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-stderr.txt @@ -0,0 +1,8 @@ +^CMake Error in CMakeLists.txt: + Xcode does not support per-config per-source COMPILE_FLAGS: + + \$<\$:-DMYDEBUG> + + specified for source: + + .*/Tests/RunCMake/XcodeProject/main.c$ diff --git a/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags.cmake b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags.cmake new file mode 100644 index 0000000..99cec5b --- /dev/null +++ b/Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags.cmake @@ -0,0 +1,3 @@ +enable_language(C) +add_executable(main main.c) +set_property(SOURCE main.c PROPERTY COMPILE_FLAGS "$<$:-DMYDEBUG>") diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index d43c80d..60912c2 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -13,6 +13,8 @@ if (NOT XCODE_VERSION VERSION_LESS 6) run_cmake(XcodePlatformFrameworks) endif() +run_cmake(PerConfigPerSourceFlags) + # Use a single build tree for a few tests without cleaning. if(NOT XCODE_VERSION VERSION_LESS 5) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e4bb358946a100ea04bbc97f8195b90b44a5e9c commit 1e4bb358946a100ea04bbc97f8195b90b44a5e9c Author: Zsolt Parragi AuthorDate: Tue Oct 25 18:23:22 2016 +0200 Commit: Brad King CommitDate: Fri Oct 28 11:18:03 2016 -0400 Add generator expression support to per-source COMPILE_FLAGS This allows users to specify different genex-based compile flags for each file in a target, e.g. compiling just a single file with `Od/Ox` in release builds on Visual Studio. diff --git a/Help/prop_sf/COMPILE_FLAGS.rst b/Help/prop_sf/COMPILE_FLAGS.rst index 086a063..1012164 100644 --- a/Help/prop_sf/COMPILE_FLAGS.rst +++ b/Help/prop_sf/COMPILE_FLAGS.rst @@ -6,3 +6,10 @@ Additional flags to be added when compiling this source file. These flags will be added to the list of compile flags when this source file builds. Use :prop_sf:`COMPILE_DEFINITIONS` to pass additional preprocessor definitions. + +Contents of ``COMPILE_FLAGS`` may use "generator expressions" +with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` +manual for available expressions. However, :generator:`Xcode` +does not support per-config per-source settings, so expressions +that depend on the build configuration are not allowed with that +generator. diff --git a/Help/release/dev/src-COMPILE_FLAGS-genex.rst b/Help/release/dev/src-COMPILE_FLAGS-genex.rst new file mode 100644 index 0000000..26cd3ef --- /dev/null +++ b/Help/release/dev/src-COMPILE_FLAGS-genex.rst @@ -0,0 +1,5 @@ +src-COMPILE_FLAGS-genex +----------------------- + +* The :prop_sf:`COMPILE_FLAGS` source file property learned to support + :manual:`generator expressions `. diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index f46019e..0480d10 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -341,7 +341,11 @@ std::string cmExtraSublimeTextGenerator::ComputeFlagsForObject( } // Add source file specific flags. - lg->AppendFlags(flags, source->GetProperty("COMPILE_FLAGS")); + if (const char* cflags = source->GetProperty("COMPILE_FLAGS")) { + cmGeneratorExpression ge; + const char* processed = ge.Parse(cflags)->Evaluate(lg, config); + lg->AppendFlags(flags, processed); + } return flags; } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 8424ded..84a8c5e 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -675,7 +675,24 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( default: break; } - lg->AppendFlags(flags, sf->GetProperty("COMPILE_FLAGS")); + if (const char* cflags = sf->GetProperty("COMPILE_FLAGS")) { + cmGeneratorExpression ge; + std::string configName = "NO-PER-CONFIG-SUPPORT-IN-XCODE"; + CM_AUTO_PTR compiledExpr = ge.Parse(cflags); + const char* processed = compiledExpr->Evaluate(lg, configName); + if (compiledExpr->GetHadContextSensitiveCondition()) { + std::ostringstream e; + /* clang-format off */ + e << + "Xcode does not support per-config per-source COMPILE_FLAGS:\n" + " " << cflags << "\n" + "specified for source:\n" + " " << sf->GetFullPath() << "\n"; + /* clang-format on */ + lg->IssueMessage(cmake::FATAL_ERROR, e.str()); + } + lg->AppendFlags(flags, processed); + } // Add per-source definitions. BuildObjectListOrString flagsBuild(this, false); diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 7c32e6c..49b057b 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1464,7 +1464,9 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo( needfc = true; } if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) { - fc.CompileFlags = cflags; + cmGeneratorExpression ge; + CM_AUTO_PTR cge = ge.Parse(cflags); + fc.CompileFlags = cge->Evaluate(lg, *i); needfc = true; } if (lg->FortranProject) { diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 68c166e..68aabef 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -437,8 +437,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( langFlags += "_FLAGS)"; this->LocalGenerator->AppendFlags(flags, langFlags); - std::string configUpper = - cmSystemTools::UpperCase(this->LocalGenerator->GetConfigName()); + std::string config = this->LocalGenerator->GetConfigName(); + std::string configUpper = cmSystemTools::UpperCase(config); // Add Fortran format flags. if (lang == "Fortran") { @@ -446,12 +446,14 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } // Add flags from source file properties. - if (source.GetProperty("COMPILE_FLAGS")) { - this->LocalGenerator->AppendFlags(flags, - source.GetProperty("COMPILE_FLAGS")); + if (const char* cflags = source.GetProperty("COMPILE_FLAGS")) { + cmGeneratorExpression ge; + CM_AUTO_PTR cge = ge.Parse(cflags); + const char* evaluatedFlags = cge->Evaluate(this->LocalGenerator, config, + false, this->GeneratorTarget); + this->LocalGenerator->AppendFlags(flags, evaluatedFlags); *this->FlagFileStream << "# Custom flags: " << relativeObj - << "_FLAGS = " << source.GetProperty("COMPILE_FLAGS") - << "\n" + << "_FLAGS = " << evaluatedFlags << "\n" << "\n"; } diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index b48387c..cf60892 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -132,8 +132,14 @@ std::string cmNinjaTargetGenerator::ComputeFlagsForObject( } // Add source file specific flags. - this->LocalGenerator->AppendFlags(flags, - source->GetProperty("COMPILE_FLAGS")); + if (const char* cflags = source->GetProperty("COMPILE_FLAGS")) { + std::string config = this->LocalGenerator->GetConfigName(); + cmGeneratorExpression ge; + CM_AUTO_PTR cge = ge.Parse(cflags); + const char* evaluatedFlags = cge->Evaluate(this->LocalGenerator, config, + false, this->GeneratorTarget); + this->LocalGenerator->AppendFlags(flags, evaluatedFlags); + } return flags; } diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 857ce39..00dc0b5 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -686,7 +686,12 @@ static Json::Value DumpSourceFilesList( cmLocalGenerator* lg = target->GetLocalGenerator(); std::string compileFlags = ld.Flags; - lg->AppendFlags(compileFlags, file->GetProperty("COMPILE_FLAGS")); + if (const char* cflags = file->GetProperty("COMPILE_FLAGS")) { + cmGeneratorExpression ge; + const char* processed = + ge.Parse(cflags)->Evaluate(target->GetLocalGenerator(), config); + lg->AppendFlags(compileFlags, processed); + } fileData.Flags = compileFlags; fileData.IncludePathList = ld.IncludePathList; diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 22167ca..97eb3c7 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1355,8 +1355,13 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( objectName = this->GeneratorTarget->GetObjectName(&sf); } std::string flags; + bool configDependentFlags = false; std::string defines; if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) { + + if (cmGeneratorExpression::Find(cflags) != std::string::npos) { + configDependentFlags = true; + } flags += cflags; } if (const char* cdefs = sf.GetProperty("COMPILE_DEFINITIONS")) { @@ -1412,7 +1417,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( } // if we have flags or defines for this config then // use them - if (!flags.empty() || !configDefines.empty() || compileAs || noWinRT) { + if (!flags.empty() || configDependentFlags || !configDefines.empty() || + compileAs || noWinRT) { (*this->BuildFileStream) << firstString; firstString = ""; // only do firstString once hasFlags = true; @@ -1427,7 +1433,15 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( if (noWinRT) { clOptions.AddFlag("CompileAsWinRT", "false"); } - clOptions.Parse(flags.c_str()); + if (configDependentFlags) { + cmGeneratorExpression ge; + CM_AUTO_PTR cge = ge.Parse(flags); + std::string evaluatedFlags = + cge->Evaluate(this->LocalGenerator, *config); + clOptions.Parse(evaluatedFlags.c_str()); + } else { + clOptions.Parse(flags.c_str()); + } if (clOptions.HasFlag("AdditionalIncludeDirectories")) { clOptions.AppendFlag("AdditionalIncludeDirectories", "%(AdditionalIncludeDirectories)"); diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt index 4f2f434..f0d6abf 100644 --- a/Tests/GeneratorExpression/CMakeLists.txt +++ b/Tests/GeneratorExpression/CMakeLists.txt @@ -257,6 +257,7 @@ add_custom_target(check-part4 ALL # Cover test properties with generator expressions. add_executable(echo echo.c) add_executable(pwd pwd.c) +set_property(SOURCE echo.c PROPERTY COMPILE_FLAGS $<1:-DSRC_GENEX_WORKS>) add_test(NAME echo-configuration COMMAND echo $) set_property(TEST echo-configuration PROPERTY diff --git a/Tests/GeneratorExpression/echo.c b/Tests/GeneratorExpression/echo.c index 06b0844..41596a2 100644 --- a/Tests/GeneratorExpression/echo.c +++ b/Tests/GeneratorExpression/echo.c @@ -3,6 +3,9 @@ int main(int argc, char* argv[]) { +#ifndef SRC_GENEX_WORKS +#error SRC_GENEX_WORKS not defined +#endif printf("%s\n", argv[1]); return EXIT_SUCCESS; } ----------------------------------------------------------------------- Summary of changes: Help/prop_sf/COMPILE_FLAGS.rst | 7 +++++++ Help/release/dev/src-COMPILE_FLAGS-genex.rst | 5 +++++ Source/cmExtraSublimeTextGenerator.cxx | 6 +++++- Source/cmGlobalXCodeGenerator.cxx | 19 ++++++++++++++++++- Source/cmLocalVisualStudio7Generator.cxx | 4 +++- Source/cmMakefileTargetGenerator.cxx | 16 +++++++++------- Source/cmNinjaTargetGenerator.cxx | 10 ++++++++-- Source/cmServerProtocol.cxx | 7 ++++++- Source/cmVisualStudio10TargetGenerator.cxx | 18 ++++++++++++++++-- Tests/GeneratorExpression/CMakeLists.txt | 1 + Tests/GeneratorExpression/echo.c | 3 +++ .../PerConfigPerSourceFlags-result.txt} | 0 .../XcodeProject/PerConfigPerSourceFlags-stderr.txt | 8 ++++++++ .../XcodeProject/PerConfigPerSourceFlags.cmake | 3 +++ Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 2 ++ 15 files changed, 94 insertions(+), 15 deletions(-) create mode 100644 Help/release/dev/src-COMPILE_FLAGS-genex.rst copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => XcodeProject/PerConfigPerSourceFlags-result.txt} (100%) create mode 100644 Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags-stderr.txt create mode 100644 Tests/RunCMake/XcodeProject/PerConfigPerSourceFlags.cmake hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 28 15:21:16 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 15:21:16 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-813-g2d2bec4 Message-ID: <20161028192116.E671FF7516@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 2d2bec4b3d42deff6f8a9b529967fb80fc1465a8 (commit) via f2de70799c91924a5185a9a85ed4f5dabc47ca51 (commit) from 940627da617082b135d09ee3712970fc42f00aa2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d2bec4b3d42deff6f8a9b529967fb80fc1465a8 commit 2d2bec4b3d42deff6f8a9b529967fb80fc1465a8 Merge: 940627d f2de707 Author: Brad King AuthorDate: Fri Oct 28 15:21:14 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 28 15:21:14 2016 -0400 Merge topic 'FindMatlab-fix-typo' into next f2de7079 FindMatlab: Fix typo in matlab_add_unit_test implementation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2de70799c91924a5185a9a85ed4f5dabc47ca51 commit f2de70799c91924a5185a9a85ed4f5dabc47ca51 Author: Matthew Woehlke AuthorDate: Fri Oct 28 13:40:58 2016 -0400 Commit: Brad King CommitDate: Fri Oct 28 15:19:24 2016 -0400 FindMatlab: Fix typo in matlab_add_unit_test implementation Fix typo in variable used to communicate between matlab_add_unit_test and its helper script MatlabTestsRedirect.cmake that was introduced in commit v3.7.0-rc1~116^2 (FindMatlab: Extend matlab_add_unit_test to run arbitrary test code, 2016-08-30). diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index b7f2db5..670bfb3 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -793,7 +793,7 @@ function(matlab_add_unit_test) "-Dworking_directory=${${prefix}_WORKING_DIRECTORY}" "-DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM}" "-Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK}" - "-DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS}" + "-DMatlab_ADDITIONAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS}" "-Dunittest_file_to_run=${${prefix}_UNITTEST_FILE}" "-Dcustom_Matlab_test_command=${${prefix}_CUSTOM_TEST_COMMAND}" "-Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND}" diff --git a/Modules/MatlabTestsRedirect.cmake b/Modules/MatlabTestsRedirect.cmake index a0c6621..64d580d 100644 --- a/Modules/MatlabTestsRedirect.cmake +++ b/Modules/MatlabTestsRedirect.cmake @@ -10,14 +10,14 @@ # -Dadditional_paths="" # -Dno_unittest_framework="" # -DMatlab_PROGRAM=matlab_exe_location -# -DMatlab_ADDITIONNAL_STARTUP_OPTIONS="" +# -DMatlab_ADDITIONAL_STARTUP_OPTIONS="" # -Dtest_name=name_of_the_test # -Dcustom_Matlab_test_command="" # -Dcmd_to_run_before_test="" # -Dunittest_file_to_run # -P FindMatlab_TestsRedirect.cmake -set(Matlab_UNIT_TESTS_CMD -nosplash -nodesktop -nodisplay ${Matlab_ADDITIONNAL_STARTUP_OPTIONS}) +set(Matlab_UNIT_TESTS_CMD -nosplash -nodesktop -nodisplay ${Matlab_ADDITIONAL_STARTUP_OPTIONS}) if(WIN32) set(Matlab_UNIT_TESTS_CMD ${Matlab_UNIT_TESTS_CMD} -wait) endif() ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 2 +- Modules/MatlabTestsRedirect.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 28 15:52:04 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 15:52:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-815-g7d27002 Message-ID: <20161028195204.B4657F71E7@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 7d270027fec3938cdbf68e8e0f8df9741cf07c0c (commit) via 353f6362baffbcc8750b9ff9649552bf9d555a63 (commit) from 2d2bec4b3d42deff6f8a9b529967fb80fc1465a8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d270027fec3938cdbf68e8e0f8df9741cf07c0c commit 7d270027fec3938cdbf68e8e0f8df9741cf07c0c Merge: 2d2bec4 353f636 Author: Brad King AuthorDate: Fri Oct 28 15:52:03 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 28 15:52:03 2016 -0400 Merge topic 'ninja-windows-POST_BUILD-noop' into next 353f6362 Ninja: Fix POST_BUILD noop on Windows https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=353f6362baffbcc8750b9ff9649552bf9d555a63 commit 353f6362baffbcc8750b9ff9649552bf9d555a63 Author: Brad King AuthorDate: Fri Oct 28 15:39:56 2016 -0400 Commit: Brad King CommitDate: Fri Oct 28 15:44:04 2016 -0400 Ninja: Fix POST_BUILD noop on Windows Use `cd .` instead of `:` in a Windows shell. Closes: #16393 diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index ee594b0..830ab7f 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -34,6 +34,11 @@ const char* cmGlobalNinjaGenerator::NINJA_BUILD_FILE = "build.ninja"; const char* cmGlobalNinjaGenerator::NINJA_RULES_FILE = "rules.ninja"; const char* cmGlobalNinjaGenerator::INDENT = " "; +#ifdef _WIN32 +std::string const cmGlobalNinjaGenerator::SHELL_NOOP = "cd ."; +#else +std::string const cmGlobalNinjaGenerator::SHELL_NOOP = ":"; +#endif void cmGlobalNinjaGenerator::Indent(std::ostream& os, int count) { diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 81ec3eb..064ff0b 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -58,6 +58,9 @@ public: /// The indentation string used when generating Ninja's build file. static const char* INDENT; + /// The shell command used for a no-op. + static std::string const SHELL_NOOP; + /// Write @a count times INDENT level to output stream @a os. static void Indent(std::ostream& os, int count); diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index cd9af54..c27ab09 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -299,15 +299,11 @@ void cmLocalNinjaGenerator::AppendCustomCommandDeps( std::string cmLocalNinjaGenerator::BuildCommandLine( const std::vector& cmdLines) { - // If we have no commands but we need to build a command anyway, use ":". + // If we have no commands but we need to build a command anyway, use noop. // This happens when building a POST_BUILD value for link targets that // don't use POST_BUILD. if (cmdLines.empty()) { -#ifdef _WIN32 - return "cd ."; -#else - return ":"; -#endif + return cmGlobalNinjaGenerator::SHELL_NOOP; } std::ostringstream cmd; diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 11773f9..d70bf8e 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -675,7 +675,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() if (!symlinkNeeded) { vars["POST_BUILD"] = postBuildCmdLine; } else { - vars["POST_BUILD"] = ":"; + vars["POST_BUILD"] = cmGlobalNinjaGenerator::SHELL_NOOP; symlinkVars["POST_BUILD"] = postBuildCmdLine; } cmGlobalNinjaGenerator& globalGen = *this->GetGlobalGenerator(); ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalNinjaGenerator.cxx | 5 +++++ Source/cmGlobalNinjaGenerator.h | 3 +++ Source/cmLocalNinjaGenerator.cxx | 8 ++------ Source/cmNinjaNormalTargetGenerator.cxx | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Oct 28 16:03:33 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 28 Oct 2016 16:03:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-818-gb45687a Message-ID: <20161028200333.19282F753B@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 b45687a47df2c5bd075f0316eb753c1a786c08b3 (commit) via f648b9be6347046583ee795f42e39713f248a608 (commit) via e7480d670b9a20bc5d8b17db5a9427fafb212e85 (commit) from 7d270027fec3938cdbf68e8e0f8df9741cf07c0c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b45687a47df2c5bd075f0316eb753c1a786c08b3 commit b45687a47df2c5bd075f0316eb753c1a786c08b3 Merge: 7d27002 f648b9b Author: Brad King AuthorDate: Fri Oct 28 16:03:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Oct 28 16:03:31 2016 -0400 Merge topic 'custom-command-CROSSCOMPILING_EMULATOR' into next f648b9be Tests: Check that CROSSCOMPILING_EMULATOR is not used on imported targets e7480d67 Fix custom command target substitution with CROSSCOMPILING_EMULATOR https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f648b9be6347046583ee795f42e39713f248a608 commit f648b9be6347046583ee795f42e39713f248a608 Author: Brad King AuthorDate: Fri Oct 28 14:45:15 2016 -0400 Commit: Brad King CommitDate: Fri Oct 28 15:08:08 2016 -0400 Tests: Check that CROSSCOMPILING_EMULATOR is not used on imported targets diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddCustomCommand.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddCustomCommand.cmake index 67fa30f..c4db11b 100644 --- a/Tests/RunCMake/CrosscompilingEmulator/AddCustomCommand.cmake +++ b/Tests/RunCMake/CrosscompilingEmulator/AddCustomCommand.cmake @@ -4,7 +4,15 @@ set(CMAKE_CROSSCOMPILING 1) add_executable(generated_exe_emulator_expected simple_src_exiterror.cxx) # Executable: Return error code equal to 0 -add_executable(generated_exe_emulator_unexpected simple_src_exitsuccess.cxx) +add_executable(generated_exe_emulator_unexpected generated_exe_emulator_unexpected.cxx) +# Place the executable in a predictable location. +set_property(TARGET generated_exe_emulator_unexpected PROPERTY RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_BINARY_DIR}>) + +# Executable: Imported version of above. Fake the imported target to use the above. +add_executable(generated_exe_emulator_unexpected_imported IMPORTED) +set_property(TARGET generated_exe_emulator_unexpected_imported PROPERTY IMPORTED_LOCATION + "${CMAKE_CURRENT_BINARY_DIR}/generated_exe_emulator_unexpected${CMAKE_EXECUTABLE_SUFFIX}") +add_dependencies(generated_exe_emulator_unexpected_imported generated_exe_emulator_unexpected) # DoesNotUseEmulator add_custom_command(OUTPUT output1 @@ -22,6 +30,12 @@ add_custom_command(OUTPUT output3 COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/output3 DEPENDS generated_exe_emulator_unexpected) +# DoesNotUseEmulator: The command will fail if emulator is prepended +add_custom_command(OUTPUT outputImp + COMMAND generated_exe_emulator_unexpected_imported + COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/outputImp + ) + # UsesEmulator: The command only succeeds if the emulator is prepended # to the command. add_custom_command(OUTPUT output4 @@ -34,5 +48,6 @@ add_custom_target(ensure_build ALL ${CMAKE_CURRENT_BINARY_DIR}/output1 ${CMAKE_CURRENT_BINARY_DIR}/output2 ${CMAKE_CURRENT_BINARY_DIR}/output3 + ${CMAKE_CURRENT_BINARY_DIR}/outputImp ${CMAKE_CURRENT_BINARY_DIR}/output4 ) diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddCustomTarget.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddCustomTarget.cmake index ced569f..5b01abc 100644 --- a/Tests/RunCMake/CrosscompilingEmulator/AddCustomTarget.cmake +++ b/Tests/RunCMake/CrosscompilingEmulator/AddCustomTarget.cmake @@ -4,7 +4,15 @@ set(CMAKE_CROSSCOMPILING 1) add_executable(generated_exe_emulator_expected simple_src_exiterror.cxx) # Executable: Return error code equal to 0 -add_executable(generated_exe_emulator_unexpected simple_src_exitsuccess.cxx) +add_executable(generated_exe_emulator_unexpected generated_exe_emulator_unexpected.cxx) +# Place the executable in a predictable location. +set_property(TARGET generated_exe_emulator_unexpected PROPERTY RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_BINARY_DIR}>) + +# Executable: Imported version of above. Fake the imported target to use the above. +add_executable(generated_exe_emulator_unexpected_imported IMPORTED) +set_property(TARGET generated_exe_emulator_unexpected_imported PROPERTY IMPORTED_LOCATION + "${CMAKE_CURRENT_BINARY_DIR}/generated_exe_emulator_unexpected${CMAKE_EXECUTABLE_SUFFIX}") +add_dependencies(generated_exe_emulator_unexpected_imported generated_exe_emulator_unexpected) # DoesNotUseEmulator add_custom_target(generate_output1 ALL @@ -22,6 +30,12 @@ add_custom_target(generate_output3 ALL COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/output3 DEPENDS generated_exe_emulator_unexpected) +# DoesNotUseEmulator: The command will fail if emulator is prepended +add_custom_target(generate_outputImp ALL + COMMAND generated_exe_emulator_unexpected_imported + COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/outputImp + ) + # UsesEmulator: The command only succeeds if the emulator is prepended # to the command. add_custom_target(generate_output4 ALL diff --git a/Tests/RunCMake/CrosscompilingEmulator/generated_exe_emulator_unexpected.cxx b/Tests/RunCMake/CrosscompilingEmulator/generated_exe_emulator_unexpected.cxx new file mode 100644 index 0000000..233f432 --- /dev/null +++ b/Tests/RunCMake/CrosscompilingEmulator/generated_exe_emulator_unexpected.cxx @@ -0,0 +1,9 @@ +#include + +int main(int argc, const char* argv[]) +{ + for (int i = 1; i < argc; ++i) { + fprintf(stderr, "unexpected argument: '%s'\n", argv[i]); + } + return argc == 1 ? 0 : 1; +} diff --git a/Tests/RunCMake/CrosscompilingEmulator/simple_src_exitsuccess.cxx b/Tests/RunCMake/CrosscompilingEmulator/simple_src_exitsuccess.cxx deleted file mode 100644 index a3dd891..0000000 --- a/Tests/RunCMake/CrosscompilingEmulator/simple_src_exitsuccess.cxx +++ /dev/null @@ -1,4 +0,0 @@ -int main(int, char**) -{ - return 0; -} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7480d670b9a20bc5d8b17db5a9427fafb212e85 commit e7480d670b9a20bc5d8b17db5a9427fafb212e85 Author: Brad King AuthorDate: Fri Oct 28 11:33:02 2016 -0400 Commit: Brad King CommitDate: Fri Oct 28 15:08:03 2016 -0400 Fix custom command target substitution with CROSSCOMPILING_EMULATOR In commit v3.6.0-rc1~88^2 (CustomCommandGenerator: Add support for CROSSCOMPILING_EMULATOR, 2016-05-04) logic was introduced to substitute a target's `CROSSCOMPILING_EMULATOR` for argv0 in a custom command. However, it broke the case when the argv0 was a target name and now fails to expand the target name to its location at the same time as inserting the emulator. Fix the latter case. Inspired-by: Brian Maher Closes: #16288 diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 2125f1b..8bd3a89 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -38,32 +38,44 @@ unsigned int cmCustomCommandGenerator::GetNumberOfCommands() const return static_cast(this->CC.GetCommandLines().size()); } -bool cmCustomCommandGenerator::UseCrossCompilingEmulator(unsigned int c) const +const char* cmCustomCommandGenerator::GetCrossCompilingEmulator( + unsigned int c) const { + if (!this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING")) { + return CM_NULLPTR; + } std::string const& argv0 = this->CC.GetCommandLines()[c][0]; cmGeneratorTarget* target = this->LG->FindGeneratorTargetToUse(argv0); - if (target && target->GetType() == cmStateEnums::EXECUTABLE) { - return target->GetProperty("CROSSCOMPILING_EMULATOR") != CM_NULLPTR; + if (target && target->GetType() == cmStateEnums::EXECUTABLE && + !target->IsImported()) { + return target->GetProperty("CROSSCOMPILING_EMULATOR"); } - return false; + return CM_NULLPTR; } -std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const +const char* cmCustomCommandGenerator::GetArgv0Location(unsigned int c) const { std::string const& argv0 = this->CC.GetCommandLines()[c][0]; cmGeneratorTarget* target = this->LG->FindGeneratorTargetToUse(argv0); if (target && target->GetType() == cmStateEnums::EXECUTABLE && (target->IsImported() || + target->GetProperty("CROSSCOMPILING_EMULATOR") || !this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING"))) { return target->GetLocation(this->Config); } - if (target && target->GetType() == cmStateEnums::EXECUTABLE) { - const char* emulator = target->GetProperty("CROSSCOMPILING_EMULATOR"); - if (emulator) { - return std::string(emulator); - } + return CM_NULLPTR; +} + +std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const +{ + if (const char* emulator = this->GetCrossCompilingEmulator(c)) { + return std::string(emulator); + } + if (const char* location = this->GetArgv0Location(c)) { + return std::string(location); } + std::string const& argv0 = this->CC.GetCommandLines()[c][0]; CM_AUTO_PTR cge = this->GE->Parse(argv0); std::string exe = cge->Evaluate(this->LG, this->Config); @@ -99,13 +111,20 @@ void cmCustomCommandGenerator::AppendArguments(unsigned int c, std::string& cmd) const { unsigned int offset = 1; - if (this->UseCrossCompilingEmulator(c)) { + if (this->GetCrossCompilingEmulator(c) != CM_NULLPTR) { offset = 0; } cmCustomCommandLine const& commandLine = this->CC.GetCommandLines()[c]; for (unsigned int j = offset; j < commandLine.size(); ++j) { - std::string arg = - this->GE->Parse(commandLine[j])->Evaluate(this->LG, this->Config); + std::string arg; + if (const char* location = + j == 0 ? this->GetArgv0Location(c) : CM_NULLPTR) { + // GetCommand returned the emulator instead of the argv0 location, + // so transform the latter now. + arg = location; + } else { + arg = this->GE->Parse(commandLine[j])->Evaluate(this->LG, this->Config); + } cmd += " "; if (this->OldStyle) { cmd += escapeForShellOldStyle(arg); diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h index 23cc596..8983c54 100644 --- a/Source/cmCustomCommandGenerator.h +++ b/Source/cmCustomCommandGenerator.h @@ -23,6 +23,9 @@ class cmCustomCommandGenerator mutable bool DependsDone; mutable std::vector Depends; + const char* GetCrossCompilingEmulator(unsigned int c) const; + const char* GetArgv0Location(unsigned int c) const; + public: cmCustomCommandGenerator(cmCustomCommand const& cc, const std::string& config, cmLocalGenerator* lg); @@ -30,7 +33,6 @@ public: cmCustomCommand const& GetCC() const { return this->CC; } unsigned int GetNumberOfCommands() const; std::string GetCommand(unsigned int c) const; - bool UseCrossCompilingEmulator(unsigned int c) const; void AppendArguments(unsigned int c, std::string& cmd) const; const char* GetComment() const; std::string GetWorkingDirectory() const; diff --git a/Tests/RunCMake/pseudo_emulator_custom_command.c b/Tests/RunCMake/pseudo_emulator_custom_command.c index 760e83c..3a94795 100644 --- a/Tests/RunCMake/pseudo_emulator_custom_command.c +++ b/Tests/RunCMake/pseudo_emulator_custom_command.c @@ -14,7 +14,8 @@ int main(int argc, const char* argv[]) { const char* substring_failure = "generated_exe_emulator_unexpected"; - const char* substring_success = "generated_exe_emulator_expected"; + // Require a slash to make sure it is a path and not a target name. + const char* substring_success = "/generated_exe_emulator_expected"; const char* str = argv[1]; if (argc < 2) { return EXIT_FAILURE; ----------------------------------------------------------------------- Summary of changes: Source/cmCustomCommandGenerator.cxx | 45 ++++++++++++++------ Source/cmCustomCommandGenerator.h | 4 +- .../CrosscompilingEmulator/AddCustomCommand.cmake | 17 +++++++- .../CrosscompilingEmulator/AddCustomTarget.cmake | 16 ++++++- .../generated_exe_emulator_unexpected.cxx | 9 ++++ .../simple_src_exitsuccess.cxx | 4 -- Tests/RunCMake/pseudo_emulator_custom_command.c | 3 +- 7 files changed, 77 insertions(+), 21 deletions(-) create mode 100644 Tests/RunCMake/CrosscompilingEmulator/generated_exe_emulator_unexpected.cxx delete mode 100644 Tests/RunCMake/CrosscompilingEmulator/simple_src_exitsuccess.cxx hooks/post-receive -- CMake From kwrobot at kitware.com Sat Oct 29 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 29 Oct 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-375-gcc9987f Message-ID: <20161029040107.BD9CBF7576@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 cc9987f1ae6319e6641fcfa4cf5997dc7c907948 (commit) from ee0f2d23fcf3cd7a67ad8d7bd132a475ed78405f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc9987f1ae6319e6641fcfa4cf5997dc7c907948 commit cc9987f1ae6319e6641fcfa4cf5997dc7c907948 Author: Kitware Robot AuthorDate: Sat Oct 29 00:01:03 2016 -0400 Commit: Kitware Robot CommitDate: Sat Oct 29 00:01:03 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e3c01fe..2afbd95 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 7) -set(CMake_VERSION_PATCH 20161028) +set(CMake_VERSION_PATCH 20161029) #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 Oct 30 00:01:10 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 30 Oct 2016 00:01:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-376-g6b90e28 Message-ID: <20161030040110.DD042F79ED@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 6b90e2850c1bd5df0aab0f1a93ea12f21bb9213f (commit) from cc9987f1ae6319e6641fcfa4cf5997dc7c907948 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b90e2850c1bd5df0aab0f1a93ea12f21bb9213f commit 6b90e2850c1bd5df0aab0f1a93ea12f21bb9213f Author: Kitware Robot AuthorDate: Sun Oct 30 00:01:08 2016 -0400 Commit: Kitware Robot CommitDate: Sun Oct 30 00:01:08 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 2afbd95..57500e5 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 7) -set(CMake_VERSION_PATCH 20161029) +set(CMake_VERSION_PATCH 20161030) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Sun Oct 30 14:51:07 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Sun, 30 Oct 2016 14:51:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-824-g4b4bebc Message-ID: <20161030185107.50A3CF818D@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 4b4bebc7e19687ff9d1d28374555e647e5b1a634 (commit) via 5214bb354b508cafc859b4a05b4e5f8ed44767e0 (commit) via 602b78aa79f6d99e775fa0a84fb441156d192833 (commit) via c58c739da7287a1cb33558f4e121ecdb23cfadd9 (commit) via 6b90e2850c1bd5df0aab0f1a93ea12f21bb9213f (commit) via cc9987f1ae6319e6641fcfa4cf5997dc7c907948 (commit) from b45687a47df2c5bd075f0316eb753c1a786c08b3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b4bebc7e19687ff9d1d28374555e647e5b1a634 commit 4b4bebc7e19687ff9d1d28374555e647e5b1a634 Merge: b45687a 5214bb3 Author: Daniel Pfeifer AuthorDate: Sun Oct 30 14:51:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Oct 30 14:51:04 2016 -0400 Merge topic 'clang-tidy' into next 5214bb35 Avoid some copies 602b78aa Remove redundant c_str() calls c58c739d Use the empty method to check for emptiness 6b90e285 CMake Nightly Date Stamp cc9987f1 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5214bb354b508cafc859b4a05b4e5f8ed44767e0 commit 5214bb354b508cafc859b4a05b4e5f8ed44767e0 Author: Daniel Pfeifer AuthorDate: Sun Oct 30 19:50:19 2016 +0100 Commit: Daniel Pfeifer CommitDate: Sun Oct 30 19:50:19 2016 +0100 Avoid some copies diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx index b55341b..9844306 100644 --- a/Source/cmFileMonitor.cxx +++ b/Source/cmFileMonitor.cxx @@ -247,7 +247,10 @@ public: void StopWatching() final {} - void AppendCallback(cmFileMonitor::Callback cb) { CbList.push_back(cb); } + void AppendCallback(cmFileMonitor::Callback const& cb) + { + this->CbList.push_back(cb); + } std::string Path() const final { @@ -310,7 +313,7 @@ cmFileMonitor::~cmFileMonitor() } void cmFileMonitor::MonitorPaths(const std::vector& paths, - Callback cb) + Callback const& cb) { for (const auto& p : paths) { std::vector pathSegments; diff --git a/Source/cmFileMonitor.h b/Source/cmFileMonitor.h index e05f48d..48169b8 100644 --- a/Source/cmFileMonitor.h +++ b/Source/cmFileMonitor.h @@ -17,7 +17,7 @@ public: ~cmFileMonitor(); using Callback = std::function; - void MonitorPaths(const std::vector& paths, Callback cb); + void MonitorPaths(const std::vector& paths, Callback const& cb); void StopMonitoring(); std::vector WatchedFiles() const; diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 17d49e8..90caaf9 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -963,7 +963,7 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule( (type == cmStateEnums::OBJECT_LIBRARY) || (type == cmStateEnums::GLOBAL_TARGET) || (type == cmStateEnums::UTILITY)) { - std::string name = target->GetName(); + std::string const& name = target->GetName(); if (emittedTargets.insert(name).second) { path = "... "; path += name; diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index f3aa79c..7a17f2c 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -180,26 +180,23 @@ protected: while (cmSystemTools::GetLineFromStream(fin, line)) { if (cmHasLiteralPrefix(line.c_str(), "#include")) { // if it is an include line then create a string class - std::string currentline = line; - size_t qstart = currentline.find('\"', 8); + size_t qstart = line.find('\"', 8); size_t qend; // if a quote is not found look for a < if (qstart == std::string::npos) { - qstart = currentline.find('<', 8); + qstart = line.find('<', 8); // if a < is not found then move on if (qstart == std::string::npos) { - cmSystemTools::Error("unknown include directive ", - currentline.c_str()); + cmSystemTools::Error("unknown include directive ", line.c_str()); continue; } else { - qend = currentline.find('>', qstart + 1); + qend = line.find('>', qstart + 1); } } else { - qend = currentline.find('\"', qstart + 1); + qend = line.find('\"', qstart + 1); } // extract the file being included - std::string includeFile = - currentline.substr(qstart + 1, qend - qstart - 1); + std::string includeFile = line.substr(qstart + 1, qend - qstart - 1); // see if the include matches the regular expression if (!this->IncludeFileRegularExpression.find(includeFile)) { if (this->Verbose) { diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 857ce39..853704b 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -82,7 +82,7 @@ static void getCMakeInputs(const cmGlobalGenerator* gg, std::vector* tmpFiles) { const std::string cmakeRootDir = cmSystemTools::GetCMakeRoot() + '/'; - const std::vector makefiles = gg->GetMakefiles(); + std::vector const& makefiles = gg->GetMakefiles(); for (auto it = makefiles.begin(); it != makefiles.end(); ++it) { const std::vector listFiles = (*it)->GetListFiles(); @@ -850,7 +850,7 @@ static Json::Value DumpTargetsList( return result; } -static Json::Value DumpProjectList(const cmake* cm, const std::string config) +static Json::Value DumpProjectList(const cmake* cm, std::string const& config) { Json::Value result = Json::arrayValue; @@ -1059,7 +1059,7 @@ cmServerResponse cmServerProtocol1_0::ProcessGlobalSettings( } static void setBool(const cmServerRequest& request, const std::string& key, - std::function setter) + std::function const& setter) { if (request.Data[key].isNull()) { return; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=602b78aa79f6d99e775fa0a84fb441156d192833 commit 602b78aa79f6d99e775fa0a84fb441156d192833 Author: Daniel Pfeifer AuthorDate: Sun Oct 30 18:34:06 2016 +0100 Commit: Daniel Pfeifer CommitDate: Sun Oct 30 18:34:06 2016 +0100 Remove redundant c_str() calls diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx index 04e1a0b..ecff0c3 100644 --- a/Source/cmAuxSourceDirectoryCommand.cxx +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -44,7 +44,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass( // Load all the files in the directory cmsys::Directory dir; - if (dir.Load(tdir.c_str())) { + if (dir.Load(tdir)) { size_t numfiles = dir.GetNumberOfFiles(); for (size_t i = 0; i < numfiles; ++i) { std::string file = dir.GetFile(static_cast(i)); diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx index d03b8c4..6836151 100644 --- a/Source/cmBuildCommand.cxx +++ b/Source/cmBuildCommand.cxx @@ -90,8 +90,7 @@ bool cmBuildCommand::MainSignature(std::vector const& args) std::string makecommand = this->Makefile->GetGlobalGenerator()->GenerateCMakeBuildCommand( - target, configuration.c_str(), "", - this->Makefile->IgnoreErrorsCMP0061()); + target, configuration, "", this->Makefile->IgnoreErrorsCMP0061()); this->Makefile->AddDefinition(variable, makecommand.c_str()); diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index a1de074..b7d2196 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -40,7 +40,7 @@ static std::string const kCMAKE_TRY_COMPILE_PLATFORM_VARIABLES = int cmCoreTryCompile::TryCompileCode(std::vector const& argv, bool isTryRun) { - this->BinaryDirectory = argv[1].c_str(); + this->BinaryDirectory = argv[1]; this->OutputFile = ""; // which signature were we called with ? this->SrcFileSignature = true; @@ -149,13 +149,13 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, } } } else if (doing == DoingOutputVariable) { - outputVariable = argv[i].c_str(); + outputVariable = argv[i]; doing = DoingNone; } else if (doing == DoingCopyFile) { - copyFile = argv[i].c_str(); + copyFile = argv[i]; doing = DoingNone; } else if (doing == DoingCopyFileError) { - copyFileError = argv[i].c_str(); + copyFileError = argv[i]; doing = DoingNone; } else if (doing == DoingSources) { sources.push_back(argv[i]); @@ -163,7 +163,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, this->SrcFileSignature = false; projectName = argv[i].c_str(); } else if (i == 4 && !this->SrcFileSignature) { - targetName = argv[i].c_str(); + targetName = argv[i]; } else { std::ostringstream m; m << "try_compile given unknown argument \"" << argv[i] << "\"."; diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index 1f0ce8d..1e8ca06 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -82,8 +82,8 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector const& args, no_working_dir); cmSourceFile* sf = this->Makefile->GetSource(cxxres); - sf->AddDepend(hname.c_str()); - sf->AddDepend(origname.c_str()); + sf->AddDepend(hname); + sf->AddDepend(origname); this->GeneratedSourcesClasses.push_back(sf); } } diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 6285894..ac76191 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2600,7 +2600,7 @@ bool cmFileCommand::HandleDownloadCommand(std::vector const& args) // Do not return error for compatibility reason. std::string err = "Unexpected argument: "; err += *i; - this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, err.c_str()); + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, err); } ++i; } @@ -2884,7 +2884,7 @@ bool cmFileCommand::HandleUploadCommand(std::vector const& args) // Do not return error for compatibility reason. std::string err = "Unexpected argument: "; err += *i; - this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, err.c_str()); + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, err); } ++i; diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx index 0f7799e..12e0c9a 100644 --- a/Source/cmIncludeCommand.cxx +++ b/Source/cmIncludeCommand.cxx @@ -69,7 +69,7 @@ bool cmIncludeCommand::InitialPass(std::vector const& args, module += ".cmake"; std::string mfile = this->Makefile->GetModulesFile(module.c_str()); if (!mfile.empty()) { - fname = mfile.c_str(); + fname = mfile; } } @@ -111,7 +111,7 @@ bool cmIncludeCommand::InitialPass(std::vector const& args, } std::string listFile = cmSystemTools::CollapseFullPath( - fname.c_str(), this->Makefile->GetCurrentSourceDirectory()); + fname, this->Makefile->GetCurrentSourceDirectory()); if (optional && !cmSystemTools::FileExists(listFile.c_str())) { if (!resultVarName.empty()) { this->Makefile->AddDefinition(resultVarName, "NOTFOUND"); diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 7bf9462..bf59e88 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -986,7 +986,7 @@ bool cmInstallCommand::HandleDirectoryMode( std::ostringstream e; e << args[0] << " does not allow \"" << args[i] << "\" after PATTERN or REGEX."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } exclude_from_all = true; diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index e042b07..b6743f1 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -208,7 +208,7 @@ bool cmLoadCommandCommand::InitialPass(std::vector const& args, } // Try to find the program. - std::string fullPath = cmSystemTools::FindFile(moduleName.c_str(), path); + std::string fullPath = cmSystemTools::FindFile(moduleName, path); if (fullPath == "") { std::ostringstream e; e << "Attempt to load command failed from file \"" << moduleName << "\""; @@ -237,14 +237,14 @@ bool cmLoadCommandCommand::InitialPass(std::vector const& args, // find the init function std::string initFuncName = args[0] + "Init"; CM_INIT_FUNCTION initFunction = - (CM_INIT_FUNCTION)cmsys::DynamicLoader::GetSymbolAddress( - lib, initFuncName.c_str()); + (CM_INIT_FUNCTION)cmsys::DynamicLoader::GetSymbolAddress(lib, + initFuncName); if (!initFunction) { initFuncName = "_"; initFuncName += args[0]; initFuncName += "Init"; initFunction = (CM_INIT_FUNCTION)( - cmsys::DynamicLoader::GetSymbolAddress(lib, initFuncName.c_str())); + cmsys::DynamicLoader::GetSymbolAddress(lib, initFuncName)); } // if the symbol is found call it to set the name on the // function blocker diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index 32b0a92..f3aa79c 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -206,7 +206,7 @@ protected: std::string message = "Skipping "; message += includeFile; message += " for file "; - message += info->FullPath.c_str(); + message += info->FullPath; cmSystemTools::Error(message.c_str(), CM_NULLPTR); } continue; @@ -520,7 +520,7 @@ bool cmOutputRequiredFilesCommand::InitialPass( const cmDependInformation* info = md.FindDependencies(this->File.c_str()); if (info) { // write them out - FILE* fout = cmsys::SystemTools::Fopen(this->OutputFile.c_str(), "w"); + FILE* fout = cmsys::SystemTools::Fopen(this->OutputFile, "w"); if (!fout) { std::string err = "Can not open output file: "; err += this->OutputFile; diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 79221c8..60c198a 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -342,7 +342,7 @@ bool cmSetPropertyCommand::HandleCacheMode() return false; } } else if (this->PropertyName == "TYPE") { - if (!cmState::IsCacheEntryType(this->PropertyValue.c_str())) { + if (!cmState::IsCacheEntryType(this->PropertyValue)) { std::ostringstream e; e << "given invalid CACHE entry TYPE \"" << this->PropertyValue << "\""; this->SetError(e.str()); diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx index ff3ec7f..3f20d4e 100644 --- a/Source/cmSourceGroupCommand.cxx +++ b/Source/cmSourceGroupCommand.cxx @@ -69,7 +69,7 @@ bool cmSourceGroupCommand::InitialPass(std::vector const& args, src += "/"; src += args[i]; } - src = cmSystemTools::CollapseFullPath(src.c_str()); + src = cmSystemTools::CollapseFullPath(src); sg->AddGroupFile(src); } else { std::ostringstream err; diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx index 55761bf..3727dfa 100644 --- a/Source/cmSubdirCommand.cxx +++ b/Source/cmSubdirCommand.cxx @@ -31,12 +31,10 @@ bool cmSubdirCommand::InitialPass(std::vector const& args, // if they specified a relative path then compute the full std::string srcPath = - std::string(this->Makefile->GetCurrentSourceDirectory()) + "/" + - i->c_str(); + std::string(this->Makefile->GetCurrentSourceDirectory()) + "/" + *i; if (cmSystemTools::FileIsDirectory(srcPath)) { std::string binPath = - std::string(this->Makefile->GetCurrentBinaryDirectory()) + "/" + - i->c_str(); + std::string(this->Makefile->GetCurrentBinaryDirectory()) + "/" + *i; this->Makefile->AddSubDirectory(srcPath, binPath, excludeFromAll, false); } // otherwise it is a full path diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx index ffeaa51..3e72d75 100644 --- a/Source/cmUseMangledMesaCommand.cxx +++ b/Source/cmUseMangledMesaCommand.cxx @@ -108,5 +108,5 @@ void cmUseMangledMesaCommand::CopyAndFullPathMesaHeader(const char* source, fin.close(); fout.close(); cmSystemTools::CopyFileIfDifferent(tempOutputFile.c_str(), outFile.c_str()); - cmSystemTools::RemoveFile(tempOutputFile.c_str()); + cmSystemTools::RemoveFile(tempOutputFile); } diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx index b3ac31c..96c8e27 100644 --- a/Source/cmWriteFileCommand.cxx +++ b/Source/cmWriteFileCommand.cxx @@ -65,7 +65,7 @@ bool cmWriteFileCommand::InitialPass(std::vector const& args, overwrite ? std::ios::out : std::ios::app); if (!file) { std::string error = "Internal CMake error when trying to open file: "; - error += fileName.c_str(); + error += fileName; error += " for writing."; this->SetError(error); return false; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c58c739da7287a1cb33558f4e121ecdb23cfadd9 commit c58c739da7287a1cb33558f4e121ecdb23cfadd9 Author: Daniel Pfeifer AuthorDate: Sun Oct 30 18:27:35 2016 +0100 Commit: Daniel Pfeifer CommitDate: Sun Oct 30 18:27:35 2016 +0100 Use the empty method to check for emptiness diff --git a/Source/cmExportInstallAndroidMKGenerator.cxx b/Source/cmExportInstallAndroidMKGenerator.cxx index f9f5f3a..2069785 100644 --- a/Source/cmExportInstallAndroidMKGenerator.cxx +++ b/Source/cmExportInstallAndroidMKGenerator.cxx @@ -26,7 +26,7 @@ void cmExportInstallAndroidMKGenerator::GenerateImportHeaderCode( std::string installDir = this->IEGen->GetDestination(); os << "LOCAL_PATH := $(call my-dir)\n"; size_t numDotDot = cmSystemTools::CountChar(installDir.c_str(), '/'); - numDotDot += (installDir.size() > 0) ? 1 : 0; + numDotDot += installDir.empty() ? 0 : 1; std::string path; for (size_t n = 0; n < numDotDot; n++) { path += "/.."; diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index 9457d5b..c4fc94e 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -86,8 +86,9 @@ bool cmTryRunCommand::InitialPass(std::vector const& argv, // although they could be used together, don't allow it, because // using OUTPUT_VARIABLE makes crosscompiling harder - if (this->OutputVariable.size() && (!this->RunOutputVariable.empty() || - !this->CompileOutputVariable.empty())) { + if (!this->OutputVariable.empty() && + (!this->RunOutputVariable.empty() || + !this->CompileOutputVariable.empty())) { cmSystemTools::Error( "You cannot use OUTPUT_VARIABLE together with COMPILE_OUTPUT_VARIABLE " "or RUN_OUTPUT_VARIABLE. Please use only COMPILE_OUTPUT_VARIABLE and/or " ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Source/cmAuxSourceDirectoryCommand.cxx | 2 +- Source/cmBuildCommand.cxx | 3 +-- Source/cmCoreTryCompile.cxx | 10 +++++----- Source/cmExportInstallAndroidMKGenerator.cxx | 2 +- Source/cmFLTKWrapUICommand.cxx | 4 ++-- Source/cmFileCommand.cxx | 4 ++-- Source/cmFileMonitor.cxx | 7 +++++-- Source/cmFileMonitor.h | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 2 +- Source/cmIncludeCommand.cxx | 4 ++-- Source/cmInstallCommand.cxx | 2 +- Source/cmLoadCommandCommand.cxx | 8 ++++---- Source/cmOutputRequiredFilesCommand.cxx | 19 ++++++++----------- Source/cmServerProtocol.cxx | 6 +++--- Source/cmSetPropertyCommand.cxx | 2 +- Source/cmSourceGroupCommand.cxx | 2 +- Source/cmSubdirCommand.cxx | 6 ++---- Source/cmTryRunCommand.cxx | 5 +++-- Source/cmUseMangledMesaCommand.cxx | 2 +- Source/cmWriteFileCommand.cxx | 2 +- 21 files changed, 47 insertions(+), 49 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Oct 31 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 31 Oct 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.0-rc2-377-g098a18c Message-ID: <20161031040107.14D84F7FF4@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 098a18c476b5e60b3bacc0e47f23359fc4a3ea2c (commit) from 6b90e2850c1bd5df0aab0f1a93ea12f21bb9213f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=098a18c476b5e60b3bacc0e47f23359fc4a3ea2c commit 098a18c476b5e60b3bacc0e47f23359fc4a3ea2c Author: Kitware Robot AuthorDate: Mon Oct 31 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Mon Oct 31 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 57500e5..3eef512 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 7) -set(CMake_VERSION_PATCH 20161030) +set(CMake_VERSION_PATCH 20161031) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From gjasny at googlemail.com Mon Oct 31 07:25:12 2016 From: gjasny at googlemail.com (Gregor Jasny) Date: Mon, 31 Oct 2016 07:25:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-828-gd3c45a8 Message-ID: <20161031112512.45291F7CAC@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 d3c45a83f489137874715c4a7d0c4f6f50a9cc13 (commit) via 32737a1de163185236e867e10a276e60334a0836 (commit) via e52e454f2cf9c8c6c9ab86afd4ce0c58df9e16ff (commit) via 098a18c476b5e60b3bacc0e47f23359fc4a3ea2c (commit) from 4b4bebc7e19687ff9d1d28374555e647e5b1a634 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3c45a83f489137874715c4a7d0c4f6f50a9cc13 commit d3c45a83f489137874715c4a7d0c4f6f50a9cc13 Merge: 4b4bebc 32737a1 Author: Gregor Jasny AuthorDate: Mon Oct 31 07:25:11 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Oct 31 07:25:11 2016 -0400 Merge topic 'fix-macos-sysroot' into next 32737a1d Darwin: Remove deployment target version check e52e454f Revert "Xcode: Convert maybe unversioned OSX sysroot into versioned SDK path" 098a18c4 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32737a1de163185236e867e10a276e60334a0836 commit 32737a1de163185236e867e10a276e60334a0836 Author: Gregor Jasny AuthorDate: Mon Oct 31 10:29:44 2016 +0100 Commit: Gregor Jasny CommitDate: Mon Oct 31 12:24:20 2016 +0100 Darwin: Remove deployment target version check Querying the SDK version via xcodebuild -sdk -version Path gives bogus results for the Command Line Tools installed into /. Instead of adding another work-around I find it cleaner to remove the deployment target version check altogether. Resolves: http://public.kitware.com/pipermail/cmake-developers/2016-October/029539.html Resolves: #16323 diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake index 3606144..b539e45 100644 --- a/Modules/Platform/Darwin-Initialize.cmake +++ b/Modules/Platform/Darwin-Initialize.cmake @@ -113,7 +113,6 @@ set(CMAKE_OSX_SYSROOT "${_CMAKE_OSX_SYSROOT_DEFAULT}" CACHE ${_CMAKE_OSX_SYSROOT "The product will be built against the headers and libraries located inside the indicated SDK.") # Transform the cached value to something we can use. -set(_CMAKE_OSX_SYSROOT_ORIG "${CMAKE_OSX_SYSROOT}") set(_CMAKE_OSX_SYSROOT_PATH "") if(CMAKE_OSX_SYSROOT) if("x${CMAKE_OSX_SYSROOT}" MATCHES "/") @@ -122,7 +121,6 @@ if(CMAKE_OSX_SYSROOT) message(WARNING "Ignoring CMAKE_OSX_SYSROOT value:\n ${CMAKE_OSX_SYSROOT}\n" "because the directory does not exist.") set(CMAKE_OSX_SYSROOT "") - set(_CMAKE_OSX_SYSROOT_ORIG "") endif() set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") else() diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index c09bac4..727baa6 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -64,30 +64,6 @@ if(NOT DEFINED CMAKE_INSTALL_NAME_TOOL) mark_as_advanced(CMAKE_INSTALL_NAME_TOOL) endif() -# Make sure the combination of SDK and Deployment Target are allowed -if(CMAKE_OSX_DEPLOYMENT_TARGET) - if("${_CMAKE_OSX_SYSROOT_PATH}" MATCHES "/MacOSX([0-9]+\\.[0-9]+)[^/]*\\.sdk") - set(_sdk_ver "${CMAKE_MATCH_1}") - elseif("${_CMAKE_OSX_SYSROOT_ORIG}" MATCHES "^macosx([0-9]+\\.[0-9]+)$") - set(_sdk_ver "${CMAKE_MATCH_1}") - elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/") - set(_sdk_ver "${_CURRENT_OSX_VERSION}") - else() - message(FATAL_ERROR - "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' " - "but CMAKE_OSX_SYSROOT:\n \"${_CMAKE_OSX_SYSROOT_ORIG}\"\n" - "is not set to a MacOSX SDK with a recognized version. " - "Either set CMAKE_OSX_SYSROOT to a valid SDK or set " - "CMAKE_OSX_DEPLOYMENT_TARGET to empty.") - endif() - if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER "${_sdk_ver}") - message(FATAL_ERROR - "CMAKE_OSX_DEPLOYMENT_TARGET (${CMAKE_OSX_DEPLOYMENT_TARGET}) " - "is greater than CMAKE_OSX_SYSROOT SDK:\n ${_CMAKE_OSX_SYSROOT_ORIG}\n" - "Please set CMAKE_OSX_DEPLOYMENT_TARGET to ${_sdk_ver} or lower.") - endif() -endif() - # Enable shared library versioning. set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e52e454f2cf9c8c6c9ab86afd4ce0c58df9e16ff commit e52e454f2cf9c8c6c9ab86afd4ce0c58df9e16ff Author: Gregor Jasny AuthorDate: Mon Oct 31 10:25:38 2016 +0100 Commit: Gregor Jasny CommitDate: Mon Oct 31 10:25:38 2016 +0100 Revert "Xcode: Convert maybe unversioned OSX sysroot into versioned SDK path" This reverts commit 540815eec2b83a8b43689580c54e8950d9f5868b. For a rationale see: http://public.kitware.com/pipermail/cmake-developers/2016-October/029539.html diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake index 39374e1..3606144 100644 --- a/Modules/Platform/Darwin-Initialize.cmake +++ b/Modules/Platform/Darwin-Initialize.cmake @@ -125,10 +125,8 @@ if(CMAKE_OSX_SYSROOT) set(_CMAKE_OSX_SYSROOT_ORIG "") endif() set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") - endif() - - if(CMAKE_OSX_SYSROOT) - # Transform the (maybe unversioned) sysroot into a versioned path. + else() + # Transform the sdk name into a path. execute_process( COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path OUTPUT_VARIABLE _stdout ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Darwin-Initialize.cmake | 8 ++------ Modules/Platform/Darwin.cmake | 24 ------------------------ Source/CMakeVersion.cmake | 2 +- 3 files changed, 3 insertions(+), 31 deletions(-) hooks/post-receive -- CMake